| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
include("./foltialib.php"); |
|---|
| 19 |
|
|---|
| 20 |
$tid = getgetnumform(tid); |
|---|
| 21 |
|
|---|
| 22 |
if ($tid == "") { |
|---|
| 23 |
header("Status: 404 Not Found",TRUE,404); |
|---|
| 24 |
} |
|---|
| 25 |
|
|---|
| 26 |
?> |
|---|
| 27 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|---|
| 28 |
<html lang="ja"> |
|---|
| 29 |
<head> |
|---|
| 30 |
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> |
|---|
| 31 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
|---|
| 32 |
<link rel="stylesheet" type="text/css" href="graytable.css"> |
|---|
| 33 |
<script src="http://images.apple.com/main/js/ac_quicktime.js" language="JavaScript" type="text/javascript"></script> |
|---|
| 34 |
<?php |
|---|
| 35 |
print "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"./folcast.php?tid=$tid\" /> |
|---|
| 36 |
<title>foltia:Lib $tid</title> |
|---|
| 37 |
</head> |
|---|
| 38 |
"; |
|---|
| 39 |
if ($tid == "") { |
|---|
| 40 |
print "<body BGCOLOR=\"#ffffff\" TEXT=\"#494949\" LINK=\"#0047ff\" VLINK=\"#000000\" ALINK=\"#c6edff\" > \n"; |
|---|
| 41 |
printhtmlpageheader(); |
|---|
| 42 |
die_exit("再生可能番組がありません<BR>"); |
|---|
| 43 |
} |
|---|
| 44 |
|
|---|
| 45 |
$con = m_connect(); |
|---|
| 46 |
$now = date("YmdHi"); |
|---|
| 47 |
|
|---|
| 48 |
?> |
|---|
| 49 |
<body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > |
|---|
| 50 |
<div align="center"> |
|---|
| 51 |
<?php |
|---|
| 52 |
printhtmlpageheader(); |
|---|
| 53 |
?> |
|---|
| 54 |
<p align="left"><font color="#494949" size="6">録画ライブラリ番組個別表示</font></p> |
|---|
| 55 |
<hr size="4"> |
|---|
| 56 |
<p align="left">再生可能ムービーを表示します。<br> |
|---|
| 57 |
|
|---|
| 58 |
<?php |
|---|
| 59 |
$query = " |
|---|
| 60 |
SELECT foltia_program.title |
|---|
| 61 |
FROM foltia_program |
|---|
| 62 |
WHERE foltia_program.tid = $tid |
|---|
| 63 |
"; |
|---|
| 64 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
|---|
| 65 |
$maxrows = pg_num_rows($rs); |
|---|
| 66 |
if ($maxrows == 0 ){ |
|---|
| 67 |
$syobocaldb = `curl "http://cal.syoboi.jp/db?Command=TitleLookup&TID=$tid" | head -2 `; |
|---|
| 68 |
$syobocaldb = mb_convert_encoding($syobocaldb, "EUC-JP", "UTF-8"); |
|---|
| 69 |
$syobocaldb = preg_match("/<Title>.*<\/Title>/", $syobocaldb,$title); |
|---|
| 70 |
$title = $title[0]; |
|---|
| 71 |
$title = strip_tags($title); |
|---|
| 72 |
}else{ |
|---|
| 73 |
$rowdata = pg_fetch_row($rs, 0); |
|---|
| 74 |
$title = $rowdata[0]; |
|---|
| 75 |
} |
|---|
| 76 |
print "<a href=\"http://cal.syoboi.jp/tid/" . |
|---|
| 77 |
htmlspecialchars($tid) . "\" target=\"_blank\">" . |
|---|
| 78 |
htmlspecialchars($title) . "</a> 【<A HREF = \"./folcast.php?tid=$tid\">この番組のFolcast</A>】 <br>\n"; |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
if (file_exists ("$recfolderpath/$tid.localized")){ |
|---|
| 83 |
|
|---|
| 84 |
}else{ |
|---|
| 85 |
|
|---|
| 86 |
print "再生可能番組がありません<BR>\n</body></html>"; |
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
if (file_exists("./selectcaptureimage.php") ) { |
|---|
| 94 |
$sbpluginexist = 1; |
|---|
| 95 |
} |
|---|
| 96 |
$serverfqdn = getserverfqdn(); |
|---|
| 97 |
|
|---|
| 98 |
$query = " |
|---|
| 99 |
SELECT |
|---|
| 100 |
foltia_program.tid, |
|---|
| 101 |
foltia_program.title, |
|---|
| 102 |
foltia_subtitle.countno, |
|---|
| 103 |
foltia_subtitle.subtitle, |
|---|
| 104 |
foltia_subtitle.startdatetime , |
|---|
| 105 |
foltia_subtitle.m2pfilename , |
|---|
| 106 |
foltia_subtitle.pid , |
|---|
| 107 |
foltia_mp4files.mp4filename |
|---|
| 108 |
FROM foltia_mp4files |
|---|
| 109 |
LEFT JOIN foltia_subtitle |
|---|
| 110 |
ON foltia_mp4files.mp4filename = foltia_subtitle.pspfilename |
|---|
| 111 |
LEFT JOIN foltia_program |
|---|
| 112 |
ON foltia_mp4files.tid = foltia_program.tid |
|---|
| 113 |
WHERE foltia_mp4files.tid = $tid |
|---|
| 114 |
ORDER BY \"startdatetime\" ASC |
|---|
| 115 |
"; |
|---|
| 116 |
|
|---|
| 117 |
$rs = ""; |
|---|
| 118 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
|---|
| 119 |
$maxrows = pg_num_rows($rs); |
|---|
| 120 |
if ($maxrows > 0 ){ |
|---|
| 121 |
print " |
|---|
| 122 |
<table BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\"> |
|---|
| 123 |
<tbody> |
|---|
| 124 |
"; |
|---|
| 125 |
|
|---|
| 126 |
for ($row = 0; $row < $maxrows; $row++) { |
|---|
| 127 |
$rowdata = pg_fetch_row($rs, $row); |
|---|
| 128 |
|
|---|
| 129 |
$title = $rowdata[1]; |
|---|
| 130 |
|
|---|
| 131 |
if ($rowdata[2]== "" ){ |
|---|
| 132 |
$count = "[話数]"; |
|---|
| 133 |
}else{ |
|---|
| 134 |
$count = $rowdata[2]; |
|---|
| 135 |
} |
|---|
| 136 |
if ($rowdata[3]== "" ){ |
|---|
| 137 |
$subtitle = "[サブタイトル]"; |
|---|
| 138 |
}else{ |
|---|
| 139 |
$subtitle = $rowdata[3]; |
|---|
| 140 |
} |
|---|
| 141 |
$onairdate = $rowdata[4]; |
|---|
| 142 |
|
|---|
| 143 |
$tid = htmlspecialchars($rowdata[0]); |
|---|
| 144 |
$title = htmlspecialchars($title); |
|---|
| 145 |
$count = htmlspecialchars($count); |
|---|
| 146 |
$subtitle = htmlspecialchars($subtitle); |
|---|
| 147 |
$onairdate = htmlspecialchars($onairdate); |
|---|
| 148 |
$fName = htmlspecialchars($rowdata[7]); |
|---|
| 149 |
if (ereg(".MP4", $fName)){ |
|---|
| 150 |
$thumbnail = $fName; |
|---|
| 151 |
$thumbnail = ereg_replace(".MP4", ".THM", $thumbnail); |
|---|
| 152 |
} |
|---|
| 153 |
if ($onairdate == ""){ |
|---|
| 154 |
$onairdate = "[放送日]"; |
|---|
| 155 |
}else{ |
|---|
| 156 |
$day = substr($onairdate,0,4)."/".substr($onairdate,4,2)."/".substr($onairdate,6,2); |
|---|
| 157 |
$time = substr($onairdate,8,2).":".substr($onairdate,10,2); |
|---|
| 158 |
$onairdate = "$day $time"; |
|---|
| 159 |
} |
|---|
| 160 |
|
|---|
| 161 |
|
|---|
| 162 |
$caplink = ""; |
|---|
| 163 |
|
|---|
| 164 |
if (($sbpluginexist == 1) && (pg_num_rows ($rs ) > 0)){ |
|---|
| 165 |
$capimgpath = htmlspecialchars(preg_replace("/.m2p/", "", $rowdata[5])); |
|---|
| 166 |
if (file_exists("$recfolderpath/$tid.localized/img/$capimgpath") ){ |
|---|
| 167 |
$caplink = " / <a href = \"./selectcaptureimage.php?pid=$rowdata[6]\">キャプ</a>"; |
|---|
| 168 |
}else{ |
|---|
| 169 |
$caplink = " / キャプなし"; |
|---|
| 170 |
} |
|---|
| 171 |
}else{ |
|---|
| 172 |
$caplink = ""; |
|---|
| 173 |
} |
|---|
| 174 |
|
|---|
| 175 |
print " |
|---|
| 176 |
<tr> |
|---|
| 177 |
<td rowspan=\"4\" width=\"170\"><A HREF=\"$httpmediamappath/$tid.localized/mp4/$fName\" target=\"_blank\"><IMG SRC = \"$httpmediamappath/$tid.localized/mp4/$thumbnail\" WIDTH = \"160\" HEIGHT = \"120\"></A></td> |
|---|
| 178 |
<td>$count</td> |
|---|
| 179 |
</tr> |
|---|
| 180 |
<tr> |
|---|
| 181 |
<td>$subtitle</td> |
|---|
| 182 |
</tr> |
|---|
| 183 |
<tr> |
|---|
| 184 |
<td>$onairdate</td> |
|---|
| 185 |
</tr> |
|---|
| 186 |
<tr> |
|---|
| 187 |
<td><A HREF=\"$httpmediamappath/$tid.localized/mp4/$fName\" target=\"_blank\">$fName</A> / <script language=\"JavaScript\" type=\"text/javascript\">QT_WriteOBJECT_XHTML('http://g.hatena.ne.jp/images/podcasting.gif','16','16','','controller','FALSE','href','http://$serverfqdn/$httpmediamappath/$tid.localized/mp4/$fName','target','QuickTimePlayer','type','video/mp4');</script> $caplink</td> |
|---|
| 188 |
</tr> |
|---|
| 189 |
"; |
|---|
| 190 |
|
|---|
| 191 |
|
|---|
| 192 |
} |
|---|
| 193 |
}else{ |
|---|
| 194 |
print "録画ファイルがありません<br>\n"; |
|---|
| 195 |
} |
|---|
| 196 |
|
|---|
| 197 |
//旧仕様 |
|---|
| 198 |
/* |
|---|
| 199 |
//ディレクトリからファイル一覧を取得 |
|---|
| 200 |
exec ("ls $recfolderpath/$tid.localized/mp4/*.MP4", $mp4files); |
|---|
| 201 |
|
|---|
| 202 |
if (file_exists("./selectcaptureimage.php") ) { |
|---|
| 203 |
$sbpluginexist = 1; |
|---|
| 204 |
} |
|---|
| 205 |
|
|---|
| 206 |
$serverfqdn = getserverfqdn(); |
|---|
| 207 |
|
|---|
| 208 |
foreach($mp4files as $pathfName) { |
|---|
| 209 |
$fName = ""; |
|---|
| 210 |
$fNametmp = split("/",$pathfName); |
|---|
| 211 |
$fName = array_pop($fNametmp); |
|---|
| 212 |
if(($fName == ".") or ($fName == "..") ){ continue; } |
|---|
| 213 |
|
|---|
| 214 |
if (ereg(".MP4", $fName)){ |
|---|
| 215 |
$thumbnail = $fName; |
|---|
| 216 |
$thumbnail = ereg_replace(".MP4", ".THM", $thumbnail); |
|---|
| 217 |
// $filesplit = split("-",$fName); |
|---|
| 218 |
//print "<!-- FILENAME:$fName:$pathfName:$query -->\n"; |
|---|
| 219 |
$query = ""; |
|---|
| 220 |
|
|---|
| 221 |
$query = " |
|---|
| 222 |
SELECT |
|---|
| 223 |
foltia_program.tid, |
|---|
| 224 |
foltia_program.title, |
|---|
| 225 |
foltia_subtitle.countno, |
|---|
| 226 |
foltia_subtitle.subtitle, |
|---|
| 227 |
foltia_subtitle.startdatetime , |
|---|
| 228 |
foltia_subtitle.m2pfilename , |
|---|
| 229 |
foltia_subtitle.pid |
|---|
| 230 |
FROM foltia_subtitle , foltia_program |
|---|
| 231 |
WHERE foltia_subtitle.pspfilename = '$fName' |
|---|
| 232 |
AND foltia_program.tid = foltia_subtitle.tid |
|---|
| 233 |
AND foltia_program.tid = $tid |
|---|
| 234 |
"; |
|---|
| 235 |
//print "<!-- FILENAME:$fName:$pathfName:$query -->\n"; |
|---|
| 236 |
$rs = ""; |
|---|
| 237 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
|---|
| 238 |
|
|---|
| 239 |
if (pg_num_rows ($rs ) == 0){ |
|---|
| 240 |
|
|---|
| 241 |
$count = "[話数]"; |
|---|
| 242 |
$subtitle = "[サブタイトル]"; |
|---|
| 243 |
$onairdate = "[放映日]"; |
|---|
| 244 |
$caplink = ""; |
|---|
| 245 |
}else{ |
|---|
| 246 |
|
|---|
| 247 |
$rowdata = pg_fetch_row($rs, $row); |
|---|
| 248 |
$title = $rowdata[1]; |
|---|
| 249 |
|
|---|
| 250 |
if ($rowdata[2]== "" ){ |
|---|
| 251 |
$count = "[話数]"; |
|---|
| 252 |
}else{ |
|---|
| 253 |
$count = $rowdata[2]; |
|---|
| 254 |
} |
|---|
| 255 |
if ($rowdata[3]== "" ){ |
|---|
| 256 |
$subtitle = "[サブタイトル]"; |
|---|
| 257 |
}else{ |
|---|
| 258 |
$subtitle = $rowdata[3]; |
|---|
| 259 |
} |
|---|
| 260 |
$onairdate = $rowdata[4]; |
|---|
| 261 |
|
|---|
| 262 |
$tid = htmlspecialchars($rowdata[0]); |
|---|
| 263 |
$title = htmlspecialchars($title); |
|---|
| 264 |
$count = htmlspecialchars($count); |
|---|
| 265 |
$subtitle = htmlspecialchars($subtitle); |
|---|
| 266 |
$onairdate = htmlspecialchars($onairdate); |
|---|
| 267 |
|
|---|
| 268 |
$day = substr($onairdate,0,4)."/".substr($onairdate,4,2)."/".substr($onairdate,6,2); |
|---|
| 269 |
$time = substr($onairdate,8,2).":".substr($onairdate,10,2); |
|---|
| 270 |
$onairdate = "$day $time"; |
|---|
| 271 |
|
|---|
| 272 |
//Starlight Breaker向け拡張 |
|---|
| 273 |
//$debug_pg_num_rows = pg_num_rows ($rs ); |
|---|
| 274 |
$caplink = ""; |
|---|
| 275 |
|
|---|
| 276 |
if (($sbpluginexist == 1) && (pg_num_rows ($rs ) > 0)){ |
|---|
| 277 |
$capimgpath = htmlspecialchars(preg_replace("/.m2p/", "", $rowdata[5])); |
|---|
| 278 |
if (file_exists("$recfolderpath/$tid.localized/img/$capimgpath") ){ |
|---|
| 279 |
$caplink = " / <a href = \"./selectcaptureimage.php?pid=$rowdata[6]\">キャプ</a>"; |
|---|
| 280 |
}else{ |
|---|
| 281 |
$caplink = " / キャプなし"; |
|---|
| 282 |
} |
|---|
| 283 |
}else{ |
|---|
| 284 |
$caplink = ""; |
|---|
| 285 |
}//end if sb |
|---|
| 286 |
|
|---|
| 287 |
} //end if 検索件数が0のとき |
|---|
| 288 |
//-- |
|---|
| 289 |
print " |
|---|
| 290 |
<tr> |
|---|
| 291 |
<td rowspan=\"4\" width=\"170\"><A HREF=\"$httpmediamappath/$tid.localized/mp4/$fName\" target=\"_blank\"><IMG SRC = \"$httpmediamappath/$tid.localized/mp4/$thumbnail\" WIDTH = \"160\" HEIGHT = \"120\"></A></td> |
|---|
| 292 |
<td>$count</td> |
|---|
| 293 |
</tr> |
|---|
| 294 |
<tr> |
|---|
| 295 |
<td>$subtitle</td> |
|---|
| 296 |
</tr> |
|---|
| 297 |
<tr> |
|---|
| 298 |
<td>$onairdate</td> |
|---|
| 299 |
</tr> |
|---|
| 300 |
<tr> |
|---|
| 301 |
<td><A HREF=\"$httpmediamappath/$tid.localized/mp4/$fName\" target=\"_blank\">$fName</A> / <script language=\"JavaScript\" type=\"text/javascript\">QT_WriteOBJECT_XHTML('http://g.hatena.ne.jp/images/podcasting.gif','16','16','','controller','FALSE','href','http://$serverfqdn/$httpmediamappath/$tid.localized/mp4/$fName','target','QuickTimePlayer','type','video/mp4');</script> $caplink</td> |
|---|
| 302 |
</tr> |
|---|
| 303 |
"; |
|---|
| 304 |
|
|---|
| 305 |
}//end if ereg m2p |
|---|
| 306 |
}//end foreach |
|---|
| 307 |
|
|---|
| 308 |
*/ |
|---|
| 309 |
//旧仕様ココまで |
|---|
| 310 |
?> |
|---|
| 311 |
</tbody> |
|---|
| 312 |
</table> |
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
</body> |
|---|
| 316 |
</html> |
|---|
| 317 |
|
|---|