1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 |
include("./foltialib.php"); |
---|
19 |
$con = m_connect(); |
---|
20 |
|
---|
21 |
if ($useenvironmentpolicy == 1){ |
---|
22 |
if (!isset($_SERVER['PHP_AUTH_USER'])) { |
---|
23 |
header("WWW-Authenticate: Basic realm=\"foltia\""); |
---|
24 |
header("HTTP/1.0 401 Unauthorized"); |
---|
25 |
redirectlogin(); |
---|
26 |
exit; |
---|
27 |
} else { |
---|
28 |
login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); |
---|
29 |
} |
---|
30 |
} |
---|
31 |
|
---|
32 |
$tid = getgetnumform(tid); |
---|
33 |
|
---|
34 |
if ($tid == "") { |
---|
35 |
header("Status: 404 Not Found",TRUE,404); |
---|
36 |
} |
---|
37 |
|
---|
38 |
?> |
---|
39 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
40 |
<html lang="ja"> |
---|
41 |
<head> |
---|
42 |
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> |
---|
43 |
<?php |
---|
44 |
if (file_exists ( "./iui/iui.css" )){ |
---|
45 |
$useragent = $_SERVER['HTTP_USER_AGENT']; |
---|
46 |
} |
---|
47 |
if(ereg("iPhone",$useragent)){ |
---|
48 |
print "<meta name=\"viewport\" content=\"width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;\"/> |
---|
49 |
<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"./img/icon.png\" /> |
---|
50 |
<style type=\"text/css\" media=\"screen\">@import \"./iui/iui.css\";</style> |
---|
51 |
<script type=\"application/x-javascript\" src=\"./iui/iui.js\"></script>"; |
---|
52 |
}else{ |
---|
53 |
print "<meta http-equiv=\"Content-Style-Type\" content=\"text/css\"> |
---|
54 |
<link rel=\"stylesheet\" type=\"text/css\" href=\"graytable.css\"> |
---|
55 |
<script src=\"http://images.apple.com/main/js/ac_quicktime.js\" language=\"JavaScript\" type=\"text/javascript\"></script> |
---|
56 |
<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"./folcast.php?tid=$tid\" /> |
---|
57 |
"; |
---|
58 |
} |
---|
59 |
if ($tid == "") { |
---|
60 |
print "<title>foltia:Lib</title> |
---|
61 |
</head><body BGCOLOR=\"#ffffff\" TEXT=\"#494949\" LINK=\"#0047ff\" VLINK=\"#000000\" ALINK=\"#c6edff\" > \n"; |
---|
62 |
printhtmlpageheader(); |
---|
63 |
die_exit("再生可能番組がありません<BR>"); |
---|
64 |
} |
---|
65 |
|
---|
66 |
?> |
---|
67 |
|
---|
68 |
|
---|
69 |
<?php |
---|
70 |
|
---|
71 |
|
---|
72 |
$lim = 53; |
---|
73 |
|
---|
74 |
$p = getgetnumform(p); |
---|
75 |
|
---|
76 |
list($st,$p,$p2) = number_page($p,$lim); |
---|
77 |
|
---|
78 |
|
---|
79 |
$now = date("YmdHi"); |
---|
80 |
|
---|
81 |
$query = " |
---|
82 |
SELECT foltia_program.title |
---|
83 |
FROM foltia_program |
---|
84 |
WHERE foltia_program.tid = ? |
---|
85 |
"; |
---|
86 |
|
---|
87 |
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); |
---|
88 |
$rowdata = $rs->fetch(); |
---|
89 |
if (! $rowdata) { |
---|
90 |
$syobocaldb = `curl "http://cal.syoboi.jp/db?Command=TitleLookup&TID=$tid" | head -2 `; |
---|
91 |
$syobocaldb = mb_convert_encoding($syobocaldb, "EUC-JP", "UTF-8"); |
---|
92 |
$syobocaldb = preg_match("/<Title>.*<\/Title>/", $syobocaldb,$title); |
---|
93 |
$title = $title[0]; |
---|
94 |
$title = strip_tags($title); |
---|
95 |
$title = htmlspecialchars($title) ; |
---|
96 |
}else{ |
---|
97 |
$title = $rowdata[0]; |
---|
98 |
$title = htmlspecialchars($title) ; |
---|
99 |
} |
---|
100 |
|
---|
101 |
print "<title>foltia:Lib $tid:$title</title></head>"; |
---|
102 |
$serveruri = getserveruri(); |
---|
103 |
|
---|
104 |
|
---|
105 |
if(ereg("iPhone",$useragent)){ |
---|
106 |
print "<body onclick=\"console.log('Hello', event.target);\"> |
---|
107 |
<div class=\"toolbar\"> |
---|
108 |
<h1 id=\"pageTitle\"></h1> |
---|
109 |
<a id=\"backButton\" class=\"button\" href=\"#\"></a> |
---|
110 |
</div> |
---|
111 |
"; |
---|
112 |
}else{ |
---|
113 |
|
---|
114 |
print "<body BGCOLOR=\"#ffffff\" TEXT=\"#494949\" LINK=\"#0047ff\" VLINK=\"#000000\" ALINK=\"#c6edff\" > |
---|
115 |
<div align=\"center\"> |
---|
116 |
"; |
---|
117 |
printhtmlpageheader(); |
---|
118 |
print " <p align=\"left\"><font color=\"#494949\" size=\"6\">録画ライブラリ番組個別表示</font></p> |
---|
119 |
<hr size=\"4\"> |
---|
120 |
<p align=\"left\">再生可能ムービーを表示します。<br>"; |
---|
121 |
if ($tid == 0){ |
---|
122 |
print "$title 【<A HREF = \"./folcast.php?tid=$tid\">この番組のFolcast</A> [<a href=\"itpc://$serveruri/folcast.php?tid=$tid\">iTunesに登録</a>]】 <br>\n"; |
---|
123 |
}else{ |
---|
124 |
print "<a href=\"http://cal.syoboi.jp/tid/" . |
---|
125 |
htmlspecialchars($tid) . "\" target=\"_blank\">$title</a> |
---|
126 |
【<A HREF = \"./folcast.php?tid=$tid\">この番組のFolcast</A> |
---|
127 |
[<a href=\"itpc://$serveruri/folcast.php?tid=$tid\">iTunesに登録</a>]】 <br>\n"; |
---|
128 |
} |
---|
129 |
} |
---|
130 |
|
---|
131 |
//確認 |
---|
132 |
if (file_exists ("$recfolderpath/$tid.localized")){ |
---|
133 |
|
---|
134 |
}else{ |
---|
135 |
|
---|
136 |
print "再生可能番組がありません<BR>\n</body></html>"; |
---|
137 |
|
---|
138 |
|
---|
139 |
|
---|
140 |
|
---|
141 |
if (file_exists("./selectcaptureimage.php") ) { |
---|
142 |
$sbpluginexist = 1; |
---|
143 |
} |
---|
144 |
$serverfqdn = getserverfqdn(); |
---|
145 |
|
---|
146 |
|
---|
147 |
|
---|
148 |
echo "<div id=contents class=autopagerize_page_element />"; |
---|
149 |
?> |
---|
150 |
|
---|
151 |
<form name="deletemovie" method="POST" action="./deletemovie.php"> |
---|
152 |
<p align="left"><input type="submit" value="項目削除" ></p> |
---|
153 |
|
---|
154 |
|
---|
155 |
<?php |
---|
156 |
|
---|
157 |
|
---|
158 |
|
---|
159 |
$query = " |
---|
160 |
|
---|
161 |
|
---|
162 |
|
---|
163 |
|
---|
164 |
|
---|
165 |
|
---|
166 |
|
---|
167 |
|
---|
168 |
; |
---|
169 |
|
---|
170 |
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); |
---|
171 |
$rowdata = $rs->fetch(); |
---|
172 |
$dtcnt = htmlspecialchars($rowdata[0]); |
---|
173 |
|
---|
174 |
|
---|
175 |
if (! $rowdata) { |
---|
176 |
die_exit("番組データがありません。<BR>"); |
---|
177 |
} |
---|
178 |
|
---|
179 |
////////////////////////////////////////////////////////// |
---|
180 |
//レコード表示 |
---|
181 |
$query = " |
---|
182 |
SELECT |
---|
183 |
foltia_program.tid, |
---|
184 |
foltia_program.title, |
---|
185 |
foltia_subtitle.countno, |
---|
186 |
foltia_subtitle.subtitle, |
---|
187 |
foltia_subtitle.startdatetime , |
---|
188 |
foltia_subtitle.m2pfilename , |
---|
189 |
foltia_subtitle.pid , |
---|
190 |
foltia_mp4files.mp4filename |
---|
191 |
FROM foltia_mp4files |
---|
192 |
LEFT JOIN foltia_subtitle |
---|
193 |
ON foltia_mp4files.mp4filename = foltia_subtitle.pspfilename |
---|
194 |
LEFT JOIN foltia_program |
---|
195 |
ON foltia_mp4files.tid = foltia_program.tid |
---|
196 |
WHERE foltia_mp4files.tid = ? |
---|
197 |
ORDER BY \"startdatetime\" ASC |
---|
198 |
LIMIT $lim OFFSET $st |
---|
199 |
"; |
---|
200 |
|
---|
201 |
$rs = ""; |
---|
202 |
|
---|
203 |
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); |
---|
204 |
$rowdata = $rs->fetch(); |
---|
205 |
if ($rowdata) { |
---|
206 |
if(ereg("iPhone",$useragent)){ |
---|
207 |
print "<ul id=\"home\" title=\"$title\" selected=\"true\">"; |
---|
208 |
}else{ |
---|
209 |
print " |
---|
210 |
<table BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\"> |
---|
211 |
<tbody> |
---|
212 |
"; |
---|
213 |
} |
---|
214 |
|
---|
215 |
do { |
---|
216 |
$title = $rowdata[1]; |
---|
217 |
|
---|
218 |
if ($rowdata[2]== "" ){ |
---|
219 |
$count = "[話数]"; |
---|
220 |
}else{ |
---|
221 |
$count = $rowdata[2]; |
---|
222 |
} |
---|
223 |
if ($rowdata[3]== "" ){ |
---|
224 |
$subtitle = "[サブタイトル]"; |
---|
225 |
}else{ |
---|
226 |
$subtitle = $rowdata[3]; |
---|
227 |
} |
---|
228 |
$onairdate = $rowdata[4]; |
---|
229 |
|
---|
230 |
$tid = htmlspecialchars($rowdata[0]); |
---|
231 |
$title = htmlspecialchars($title); |
---|
232 |
$count = htmlspecialchars($count); |
---|
233 |
$subtitle = htmlspecialchars($subtitle); |
---|
234 |
$onairdate = htmlspecialchars($onairdate); |
---|
235 |
$pid = htmlspecialchars($rowdata[6]); |
---|
236 |
$fName = htmlspecialchars($rowdata[7]); |
---|
237 |
|
---|
238 |
if (ereg(".MP4", $fName)){ |
---|
239 |
$thumbnail = $fName; |
---|
240 |
$thumbnail = ereg_replace(".MP4", ".THM", $thumbnail); |
---|
241 |
} |
---|
242 |
if ($onairdate == ""){ |
---|
243 |
$onairdate = "[放送日]"; |
---|
244 |
}else{ |
---|
245 |
$day = substr($onairdate,0,4)."/".substr($onairdate,4,2)."/".substr($onairdate,6,2); |
---|
246 |
$time = substr($onairdate,8,2).":".substr($onairdate,10,2); |
---|
247 |
$onairdate = "$day $time"; |
---|
248 |
} |
---|
249 |
|
---|
250 |
|
---|
251 |
$caplink = ""; |
---|
252 |
|
---|
253 |
if ($sbpluginexist == 1) { |
---|
254 |
|
---|
255 |
$capimgpath = htmlspecialchars(preg_replace("/.m2./", "", $rowdata[5])); |
---|
256 |
|
---|
257 |
if (($capimgpath != "") && (file_exists("$recfolderpath/$tid.localized/img/$capimgpath") )){ |
---|
258 |
$caplink = " / <a href = \"./selectcaptureimage.php?pid=$rowdata[6]\">キャプ</a>"; |
---|
259 |
}else{ |
---|
260 |
$caplink = " / キャプなし"; |
---|
261 |
} |
---|
262 |
}else{ |
---|
263 |
$caplink = ""; |
---|
264 |
} |
---|
265 |
|
---|
266 |
if (file_exists("$recfolderpath/$tid.localized/mp4/$thumbnail") ){ |
---|
267 |
$imgsrcuri = "$httpmediamappath/$tid.localized/mp4/$thumbnail\" alt=\"$title $count $subtitle"; |
---|
268 |
}else{ |
---|
269 |
$imgsrcuri = "./img/no-thumbnail-img.png\" alt=\"NO IMAGE"; |
---|
270 |
} |
---|
271 |
|
---|
272 |
if(ereg("iPhone",$useragent)){ |
---|
273 |
|
---|
274 |
print "<li><a href=\"http://$serverfqdn/$httpmediamappath/$tid.localized/mp4/$fName\" target=\"_self\">$count $subtitle $onairdate</a></li>\n"; |
---|
275 |
|
---|
276 |
}else{ |
---|
277 |
print " <tr> |
---|
278 |
<td rowspan=\"4\" width=\"170\"><a href=\"./mp4player.php?p=$pid\" target=\"_blank\"><img src = \"$imgsrcuri\" width=\"160\" height=\"120\"></a></td> |
---|
279 |
<td>$count</td> |
---|
280 |
</tr> |
---|
281 |
<tr> |
---|
282 |
"; |
---|
283 |
if ($tid == 0){ |
---|
284 |
print "\n <td>$subtitle</td>"; |
---|
285 |
}else{ |
---|
286 |
print "\n <td><a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">$subtitle</a></td>"; |
---|
287 |
} |
---|
288 |
|
---|
289 |
|
---|
290 |
print " </tr> |
---|
291 |
<tr> |
---|
292 |
<td>$onairdate</td> |
---|
293 |
</tr> |
---|
294 |
<tr> |
---|
295 |
<td><INPUT TYPE='checkbox' NAME='delete[]' VALUE='$fName'>削除 / |
---|
296 |
<a href =\"$httpmediamappath/$tid.localized/mp4/$fName\" target=\"_blank\">$fName</A> / |
---|
297 |
<a href=\"./mp4player.php?p=$pid\" target=\"_blank\">Player</a> / |
---|
298 |
<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> |
---|
299 |
</tr> |
---|
300 |
"; |
---|
301 |
|
---|
302 |
|
---|
303 |
} |
---|
304 |
|
---|
305 |
} while ($rowdata = $rs->fetch()); |
---|
306 |
}else{ |
---|
307 |
print "録画ファイルがありません<br>\n"; |
---|
308 |
} |
---|
309 |
|
---|
310 |
if(ereg("iPhone",$useragent)){ |
---|
311 |
print "<li><a href=\"http://$serveruri/showlib.php\" target=\"_self\">一覧へ戻る</a></li>\n"; |
---|
312 |
print "</ul>\n"; |
---|
313 |
}else{ |
---|
314 |
print "</tbody></table>\n"; |
---|
315 |
} |
---|
316 |
|
---|
317 |
|
---|
318 |
|
---|
319 |
$query_st = $tid; |
---|
320 |
|
---|
321 |
page_display($query_st,$p,$p2,$lim,$dtcnt,""); |
---|
322 |
|
---|
323 |
?> |
---|
324 |
|
---|
325 |
</body> |
---|
326 |
</html> |
---|
327 |
|
---|
328 |
|
---|
329 |
|
---|