Index: trunk/install/php/showlibc.php =================================================================== --- trunk/install/php/showlibc.php (リビジョン 124) +++ trunk/install/php/showlibc.php (リビジョン 1) @@ -16,17 +16,5 @@ */ -include("./foltialib.php"); -$con = m_connect(); - -if ($useenvironmentpolicy == 1){ - if (!isset($_SERVER['PHP_AUTH_USER'])) { - header("WWW-Authenticate: Basic realm=\"foltia\""); - header("HTTP/1.0 401 Unauthorized"); - redirectlogin(); - exit; - } else { - login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); - } -}//end if login + include("./foltialib.php"); $tid = getgetnumform(tid); @@ -41,92 +29,54 @@ + + + - - -"; -}else{ -print " - - - -"; -} -if ($tid == "") { - print "foltia:Lib - \n"; +print " +foltia:Lib $tid + +"; + if ($tid == "") { + print " \n"; printhtmlpageheader(); die_exit("再生可能番組がありません
"); - } + } + +$con = m_connect(); +$now = date("YmdHi"); ?> - + +
+ +

録画ライブラリ番組個別表示

+
+

再生可能ムービーを表示します。
fetch(); -if (! $rowdata) { -$syobocaldb = `curl "http://cal.syoboi.jp/db?Command=TitleLookup&TID=$tid" | head -2 `; +WHERE foltia_program.tid = $tid +"; +$rs = m_query($con, $query, "DBクエリに失敗しました"); +$maxrows = pg_num_rows($rs); +if ($maxrows == 0 ){ + $syobocaldb = `curl "http://cal.syoboi.jp/db?Command=TitleLookup&TID=$tid" | head -2 `; $syobocaldb = mb_convert_encoding($syobocaldb, "EUC-JP", "UTF-8"); $syobocaldb = preg_match("/.*<\/Title>/", $syobocaldb,$title); $title = $title[0]; $title = strip_tags($title); - $title = htmlspecialchars($title) ; -}else{ +}else{ +$rowdata = pg_fetch_row($rs, 0); $title = $rowdata[0]; -$title = htmlspecialchars($title) ; -} -//ヘッダ続き -print "<title>foltia:Lib $tid:$title"; -$serveruri = getserveruri(); - - -if(ereg("iPhone",$useragent)){ - print " -

-

- -
-"; -}else{ - -print " -
-"; - printhtmlpageheader(); -print "

録画ライブラリ番組個別表示

-
-

再生可能ムービーを表示します。
"; -if ($tid == 0){ -print "$title 【この番組のFolcastiTunesに登録]】
\n"; -}else{ +} print "$title -【この番組のFolcast -[iTunesに登録]】
\n"; -} -}// endif if(ereg("iPhone",$useragent)) - + htmlspecialchars($tid) . "\" target=\"_blank\">" . + htmlspecialchars($title) . " 【この番組のFolcast
\n"; + + //確認 if (file_exists ("$recfolderpath/$tid.localized")){ @@ -138,4 +88,6 @@ } + + //新仕様/* 2006/10/26 */ if (file_exists("./selectcaptureimage.php") ) { @@ -144,39 +96,4 @@ $serverfqdn = getserverfqdn(); - -//Autopager -echo "

"; -?> - -
-

- - -fetch(); -$dtcnt = htmlspecialchars($rowdata[0]); -//echo $dtcnt; -// -if (! $rowdata) { - die_exit("番組データがありません。
"); -}//endif - -////////////////////////////////////////////////////////// -//レコード表示 $query = " SELECT @@ -194,24 +111,20 @@ LEFT JOIN foltia_program ON foltia_mp4files.tid = foltia_program.tid -WHERE foltia_mp4files.tid = ? +WHERE foltia_mp4files.tid = $tid ORDER BY \"startdatetime\" ASC -LIMIT $lim OFFSET $st "; $rs = ""; -//$rs = m_query($con, $query, "DBクエリに失敗しました"); -$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); -$rowdata = $rs->fetch(); -if ($rowdata) { -if(ereg("iPhone",$useragent)){ - print "
    "; -}else{ +$rs = m_query($con, $query, "DBクエリに失敗しました"); +$maxrows = pg_num_rows($rs); +if ($maxrows > 0 ){ print " "; -} - - do { + +for ($row = 0; $row < $maxrows; $row++) { + $rowdata = pg_fetch_row($rs, $row); + $title = $rowdata[1]; @@ -233,7 +146,5 @@ $subtitle = htmlspecialchars($subtitle); $onairdate = htmlspecialchars($onairdate); -$pid = htmlspecialchars($rowdata[6]); $fName = htmlspecialchars($rowdata[7]); - if (ereg(".MP4", $fName)){ $thumbnail = $fName; @@ -248,12 +159,10 @@ } //Starlight Breaker向け拡張 -//$debug_pg_num_rows = $rs ->rowCount(); +//$debug_pg_num_rows = pg_num_rows ($rs ); $caplink = ""; - if ($sbpluginexist == 1) { - //$capimgpath = htmlspecialchars(preg_replace("/.m2p/", "", $rowdata[5])); - $capimgpath = htmlspecialchars(preg_replace("/.m2./", "", $rowdata[5])); - - if (($capimgpath != "") && (file_exists("$recfolderpath/$tid.localized/img/$capimgpath") )){ +if (($sbpluginexist == 1) && (pg_num_rows ($rs ) > 0)){ + $capimgpath = htmlspecialchars(preg_replace("/.m2p/", "", $rowdata[5])); + if (file_exists("$recfolderpath/$tid.localized/img/$capimgpath") ){ $caplink = " / キャプ"; }else{ @@ -264,65 +173,144 @@ }//end if sb -if (file_exists("$recfolderpath/$tid.localized/mp4/$thumbnail") ){ - $imgsrcuri = "$httpmediamappath/$tid.localized/mp4/$thumbnail\" alt=\"$title $count $subtitle"; -}else{ - $imgsrcuri = "./img/no-thumbnail-img.png\" alt=\"NO IMAGE"; -} - -if(ereg("iPhone",$useragent)){ - -print "
  • $count $subtitle $onairdate
  • \n"; - -}else{ -print " - +print " + + -"; - if ($tid == 0){ - print "\n "; - }else{ - print "\n "; - }//if - - -print " + + - - -"; - - -}//endif iPhone - - } while ($rowdata = $rs->fetch()); + + +"; + + +}//for }else{ print "録画ファイルがありません
    \n"; }//if -if(ereg("iPhone",$useragent)){ - print "
  • 一覧へ戻る
  • \n"; - print "\n"; -}else{ - print "
    $count
    $subtitle$subtitle
    $subtitle
    $onairdate
    削除 / - $fName / - Player / - $caplink
    $fName / $caplink
    \n"; -} - -////////////////////////////////////////////// -//クエリ代入 -$query_st = $tid; -//Autopager処理とページのリンク表示 -page_display($query_st,$p,$p2,$lim,$dtcnt,""); -////////////////////////////////////////////// +//旧仕様 +/* +//ディレクトリからファイル一覧を取得 + exec ("ls $recfolderpath/$tid.localized/mp4/*.MP4", $mp4files); + +if (file_exists("./selectcaptureimage.php") ) { + $sbpluginexist = 1; +} + +$serverfqdn = getserverfqdn(); + +foreach($mp4files as $pathfName) { +$fName = ""; +$fNametmp = split("/",$pathfName); +$fName = array_pop($fNametmp); + if(($fName == ".") or ($fName == "..") ){ continue; } + +if (ereg(".MP4", $fName)){ + $thumbnail = $fName; + $thumbnail = ereg_replace(".MP4", ".THM", $thumbnail); + // $filesplit = split("-",$fName); +//print "\n"; +$query = ""; + +$query = " +SELECT +foltia_program.tid, +foltia_program.title, +foltia_subtitle.countno, +foltia_subtitle.subtitle, +foltia_subtitle.startdatetime , +foltia_subtitle.m2pfilename , +foltia_subtitle.pid +FROM foltia_subtitle , foltia_program +WHERE foltia_subtitle.pspfilename = '$fName' +AND foltia_program.tid = foltia_subtitle.tid +AND foltia_program.tid = $tid +"; +//print "\n"; +$rs = ""; +$rs = m_query($con, $query, "DBクエリに失敗しました"); + +if (pg_num_rows ($rs ) == 0){ + + $count = "[話数]"; + $subtitle = "[サブタイトル]"; + $onairdate = "[放映日]"; + $caplink = ""; +}else{ + +$rowdata = pg_fetch_row($rs, $row); +$title = $rowdata[1]; + +if ($rowdata[2]== "" ){ + $count = "[話数]"; +}else{ + $count = $rowdata[2]; +} +if ($rowdata[3]== "" ){ + $subtitle = "[サブタイトル]"; +}else{ + $subtitle = $rowdata[3]; +} +$onairdate = $rowdata[4]; + +$tid = htmlspecialchars($rowdata[0]); +$title = htmlspecialchars($title); +$count = htmlspecialchars($count); +$subtitle = htmlspecialchars($subtitle); +$onairdate = htmlspecialchars($onairdate); + +$day = substr($onairdate,0,4)."/".substr($onairdate,4,2)."/".substr($onairdate,6,2); +$time = substr($onairdate,8,2).":".substr($onairdate,10,2); +$onairdate = "$day $time"; + +//Starlight Breaker向け拡張 +//$debug_pg_num_rows = pg_num_rows ($rs ); +$caplink = ""; + +if (($sbpluginexist == 1) && (pg_num_rows ($rs ) > 0)){ + $capimgpath = htmlspecialchars(preg_replace("/.m2p/", "", $rowdata[5])); + if (file_exists("$recfolderpath/$tid.localized/img/$capimgpath") ){ + $caplink = " / キャプ"; + }else{ + $caplink = " / キャプなし"; + } +}else{ +$caplink = ""; +}//end if sb + +} //end if 検索件数が0のとき +//-- +print " + + + $count + + + $subtitle + + + $onairdate + + + $fName / $caplink + +"; + + }//end if ereg m2p +}//end foreach + +*/ +//旧仕様ココまで ?> + + + - -