| 1 | <?php | 
|---|
| 2 |  | 
|---|
| 3 |  | 
|---|
| 4 |  | 
|---|
| 5 |  | 
|---|
| 6 |  | 
|---|
| 7 |  | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 |  | 
|---|
| 11 |  | 
|---|
| 12 |  | 
|---|
| 13 |  | 
|---|
| 14 |  | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | ?> | 
|---|
| 18 |  | 
|---|
| 19 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | 
|---|
| 20 | <html lang="ja"> | 
|---|
| 21 | <head> | 
|---|
| 22 | <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> | 
|---|
| 23 | <meta http-equiv="Content-Style-Type" content="text/css"> | 
|---|
| 24 | <link rel="stylesheet" type="text/css" href="graytable.css"> | 
|---|
| 25 | <title>foltia:MP4 Lib</title> | 
|---|
| 26 | </head> | 
|---|
| 27 |  | 
|---|
| 28 | <?php | 
|---|
| 29 |  | 
|---|
| 30 | include("./foltialib.php"); | 
|---|
| 31 |  | 
|---|
| 32 | $con = m_connect(); | 
|---|
| 33 | $now = date("YmdHi"); | 
|---|
| 34 |  | 
|---|
| 35 | ?> | 
|---|
| 36 | <body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > | 
|---|
| 37 | <div align="center"> | 
|---|
| 38 | <?php | 
|---|
| 39 | printhtmlpageheader(); | 
|---|
| 40 | ?> | 
|---|
| 41 | <p align="left"><font color="#494949" size="6">録画ライブラリ表示</font></p> | 
|---|
| 42 | <hr size="4"> | 
|---|
| 43 | <p align="left">再生可能ライブラリを表示します。<br> | 
|---|
| 44 |  | 
|---|
| 45 | <? | 
|---|
| 46 |  | 
|---|
| 47 | $query = " | 
|---|
| 48 | SELECT foltia_mp4files.tid,foltia_program.title , count(foltia_mp4files.mp4filename) | 
|---|
| 49 | FROM   foltia_mp4files ,  foltia_program | 
|---|
| 50 | WHERE  foltia_program.tid = foltia_mp4files.tid | 
|---|
| 51 | GROUP BY foltia_mp4files.tid ,foltia_program.title | 
|---|
| 52 | ORDER BY foltia_mp4files.tid DESC | 
|---|
| 53 | "; | 
|---|
| 54 |  | 
|---|
| 55 | $rs = m_query($con, $query, "DBクエリに失敗しました"); | 
|---|
| 56 |  | 
|---|
| 57 | $maxrows = pg_num_rows($rs); | 
|---|
| 58 |  | 
|---|
| 59 | if ($maxrows > 0 ){ | 
|---|
| 60 | print " | 
|---|
| 61 | <table BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\"> | 
|---|
| 62 | <thead> | 
|---|
| 63 | <tr> | 
|---|
| 64 | <th align=\"left\">TID</th> | 
|---|
| 65 | <th align=\"left\">タイトル(内容リンク)</th> | 
|---|
| 66 | <th align=\"left\">内容数</th> | 
|---|
| 67 | <th align=\"left\">リンク</th> | 
|---|
| 68 | </tr> | 
|---|
| 69 | </thead> | 
|---|
| 70 | <tbody> | 
|---|
| 71 | "; | 
|---|
| 72 | for ($row = 0; $row < $maxrows; $row++) { | 
|---|
| 73 | $rowdata = pg_fetch_row($rs, $row); | 
|---|
| 74 | $title = $rowdata[1]; | 
|---|
| 75 | $counts = $rowdata[2]; | 
|---|
| 76 | $tid = htmlspecialchars($rowdata[0]); | 
|---|
| 77 | $title = htmlspecialchars($title); | 
|---|
| 78 | $counts = htmlspecialchars($counts); | 
|---|
| 79 |  | 
|---|
| 80 | print " | 
|---|
| 81 | <tr> | 
|---|
| 82 | <td>$tid<br></td> | 
|---|
| 83 | <td><a href=\"showlibc.php?tid=$tid\">$title</a></td> | 
|---|
| 84 | <td>$counts<br></td> | 
|---|
| 85 | <td><a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">しょぼかる-$tid</a><br></td> | 
|---|
| 86 | </tr>\n | 
|---|
| 87 | "; | 
|---|
| 88 | } | 
|---|
| 89 | print " | 
|---|
| 90 | </tbody> | 
|---|
| 91 | </table> | 
|---|
| 92 | </body> | 
|---|
| 93 | </html> | 
|---|
| 94 | "; | 
|---|
| 95 | }else{ | 
|---|
| 96 | print "録画ファイルが存在しません。</body></html>"; | 
|---|
| 97 |  | 
|---|
| 98 | } | 
|---|
| 99 | /* | 
|---|
| 100 | //旧仕様 | 
|---|
| 101 | //ディレクトリからファイル一覧を取得 | 
|---|
| 102 | exec ("ls  $recfolderpath | grep localized | sort -r", $libdir); | 
|---|
| 103 | //print "libdir:$libdir<BR>\n"; | 
|---|
| 104 |  | 
|---|
| 105 | foreach($libdir as $fName) { | 
|---|
| 106 |  | 
|---|
| 107 | if(($fName == ".") or ($fName == "..") ){ continue; } | 
|---|
| 108 | if (ereg(".localized", $fName)){ | 
|---|
| 109 | $filesplit = split("\.",$fName); | 
|---|
| 110 | $query = " | 
|---|
| 111 | SELECT | 
|---|
| 112 | foltia_program.tid,foltia_program.title | 
|---|
| 113 | FROM   foltia_program | 
|---|
| 114 | WHERE foltia_program.tid = $filesplit[0] | 
|---|
| 115 | "; | 
|---|
| 116 | $rs = m_query($con, $query, "DBクエリに失敗しました"); | 
|---|
| 117 | $rowdata = pg_fetch_row($rs, $row); | 
|---|
| 118 | //print" $fName./$rowdata[1]/$rowdata[2]/$rowdata[3]<BR>\n"; | 
|---|
| 119 | $title = $rowdata[1]; | 
|---|
| 120 |  | 
|---|
| 121 | $tid = htmlspecialchars($rowdata[0]); | 
|---|
| 122 | $title = htmlspecialchars($title); | 
|---|
| 123 | //-- | 
|---|
| 124 | print " | 
|---|
| 125 | <tr> | 
|---|
| 126 | <td>$tid<br></td> | 
|---|
| 127 | <td><a href=\"showlibc.php?tid=$tid\">$title</a></td> | 
|---|
| 128 | <td>"; | 
|---|
| 129 | //計数 | 
|---|
| 130 | $counts = system ("ls  $recfolderpath/$fName/mp4/*.MP4 | wc -l"); | 
|---|
| 131 | print "<br></td> | 
|---|
| 132 | <td><a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">しょぼかる-$tid</a><br></td> | 
|---|
| 133 | </tr>\n | 
|---|
| 134 | "; | 
|---|
| 135 | }//end if ereg m2p | 
|---|
| 136 | }//end foreach | 
|---|
| 137 | //旧仕様ココまで | 
|---|
| 138 | */ | 
|---|
| 139 | //$d->close(); | 
|---|
| 140 | ?> | 
|---|
| 141 |  | 
|---|