1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 |
|
---|
20 |
|
---|
21 |
|
---|
22 |
include("./foltialib.php"); |
---|
23 |
$con = m_connect(); |
---|
24 |
|
---|
25 |
if ($useenvironmentpolicy == 1){ |
---|
26 |
if (!isset($_SERVER['PHP_AUTH_USER'])) { |
---|
27 |
header("WWW-Authenticate: Basic realm=\"foltia\""); |
---|
28 |
header("HTTP/1.0 401 Unauthorized"); |
---|
29 |
redirectlogin(); |
---|
30 |
exit; |
---|
31 |
} else { |
---|
32 |
login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); |
---|
33 |
} |
---|
34 |
} |
---|
35 |
|
---|
36 |
|
---|
37 |
?> |
---|
38 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
39 |
<html lang="ja"> |
---|
40 |
<head> |
---|
41 |
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> |
---|
42 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
---|
43 |
<link rel="stylesheet" type="text/css" href="graytable.css"> |
---|
44 |
<?php |
---|
45 |
|
---|
46 |
|
---|
47 |
$useragent = $_SERVER['HTTP_USER_AGENT']; |
---|
48 |
|
---|
49 |
|
---|
50 |
warndiskfreearea(); |
---|
51 |
|
---|
52 |
print "<title>foltia:recorded file list</title> |
---|
53 |
</head>"; |
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 |
|
---|
58 |
$lim = 300; |
---|
59 |
|
---|
60 |
$p = getgetnumform(p); |
---|
61 |
|
---|
62 |
list($st,$p,$p2) = number_page($p,$lim); |
---|
63 |
|
---|
64 |
|
---|
65 |
$now = date("YmdHi"); |
---|
66 |
?> |
---|
67 |
<body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > |
---|
68 |
<div align="center"> |
---|
69 |
|
---|
70 |
<?php |
---|
71 |
printhtmlpageheader(); |
---|
72 |
?> |
---|
73 |
|
---|
74 |
<p align="left"><font color="#494949" size="6">録画一覧表示</font></p> |
---|
75 |
<hr size="4"> |
---|
76 |
<p align="left">再生可能番組リストを表示します。<br> |
---|
77 |
|
---|
78 |
<?php |
---|
79 |
if ($demomode){ |
---|
80 |
}else{ |
---|
81 |
printdiskusage(); |
---|
82 |
printtrcnprocesses(); |
---|
83 |
} |
---|
84 |
|
---|
85 |
|
---|
86 |
|
---|
87 |
|
---|
88 |
$list = getgetform('list'); |
---|
89 |
|
---|
90 |
echo "<div id=contents class=autopagerize_page_element />"; |
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 |
?> |
---|
95 |
<form name="deletemovie" method="POST" action="./deletemovie.php"> |
---|
96 |
<p align="left"><input type="submit" value="項目削除" ></p> |
---|
97 |
|
---|
98 |
<table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%"> |
---|
99 |
<thead> |
---|
100 |
<tr> |
---|
101 |
<th align="left">削除</th> |
---|
102 |
<th align="left"><A HREF="./showplaylist.php">ファイル名</A></th> |
---|
103 |
<th align="left"><A HREF="./showplaylist.php?list=title">タイトル</A></th> |
---|
104 |
<th align="left">話数</th> |
---|
105 |
<th align="left">サブタイ</th> |
---|
106 |
|
---|
107 |
<?php |
---|
108 |
if (file_exists("./selectcaptureimage.php") ) { |
---|
109 |
print " <th align=\"left\">キャプ</th>\n"; |
---|
110 |
} |
---|
111 |
?> |
---|
112 |
</tr> |
---|
113 |
</thead> |
---|
114 |
|
---|
115 |
<tbody> |
---|
116 |
|
---|
117 |
|
---|
118 |
|
---|
119 |
<?php |
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 |
|
---|
124 |
if($list == "raw"){ |
---|
125 |
exec ("ls -t $recfolderpath/*.???", $m2pfiles); |
---|
126 |
|
---|
127 |
|
---|
128 |
foreach($m2pfiles as $pathfName) { |
---|
129 |
|
---|
130 |
$fNametmp = split("/",$pathfName); |
---|
131 |
$fName = array_pop($fNametmp); |
---|
132 |
|
---|
133 |
|
---|
134 |
if(($fName == ".") or ($fName == "..") ){ continue; } |
---|
135 |
if ((ereg(".m2.+", $fName))|| (ereg(".aac", $fName))){ |
---|
136 |
$filesplit = split("-",$fName); |
---|
137 |
|
---|
138 |
if (preg_match("/^\d+$/", $filesplit[0])) { |
---|
139 |
if ($filesplit[1] == ""){ |
---|
140 |
$query = " |
---|
141 |
SELECT |
---|
142 |
foltia_program.tid,foltia_program.title,foltia_subtitle.subtitle |
---|
143 |
FROM foltia_subtitle , foltia_program |
---|
144 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
145 |
AND foltia_subtitle.tid = ? |
---|
146 |
"; |
---|
147 |
|
---|
148 |
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0])); |
---|
149 |
$rall = $rs->fetchAll(); |
---|
150 |
$rowdata = $rall[0]; |
---|
151 |
|
---|
152 |
$title = $rowdata[1]; |
---|
153 |
$subtitle = ""; |
---|
154 |
$count = ""; |
---|
155 |
|
---|
156 |
}else{ |
---|
157 |
|
---|
158 |
$query = " |
---|
159 |
SELECT |
---|
160 |
foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle |
---|
161 |
FROM foltia_subtitle , foltia_program |
---|
162 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
163 |
AND foltia_subtitle.tid = ? |
---|
164 |
AND foltia_subtitle.countno = ? |
---|
165 |
"; |
---|
166 |
|
---|
167 |
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0],$filesplit[1])); |
---|
168 |
$rall = $rs->fetchAll(); |
---|
169 |
$rowdata = $rall[0]; |
---|
170 |
|
---|
171 |
$title = $rowdata[1]; |
---|
172 |
$count = $rowdata[2]; |
---|
173 |
$subtitle = $rowdata[3]; |
---|
174 |
} |
---|
175 |
|
---|
176 |
$tid = htmlspecialchars($rowdata[0]); |
---|
177 |
$title = htmlspecialchars($title); |
---|
178 |
$count = htmlspecialchars($count); |
---|
179 |
$subtitle = htmlspecialchars($subtitle); |
---|
180 |
|
---|
181 |
|
---|
182 |
print " |
---|
183 |
<tr> |
---|
184 |
<td><INPUT TYPE='checkbox' NAME='delete[]' VALUE='$fName'><br></td> |
---|
185 |
<td><A HREF=\"$httpmediamappath/$fName\">$fName</A><br></td> |
---|
186 |
<td><a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">$title</a></td> |
---|
187 |
<td>$count<br></td> |
---|
188 |
<td>$subtitle<br></td>"; |
---|
189 |
if (file_exists("./selectcaptureimage.php") ) { |
---|
190 |
|
---|
191 |
print " <td align=\"left\"> N/A </td>\n"; |
---|
192 |
|
---|
193 |
|
---|
194 |
"</tr>\n |
---|
195 |
; |
---|
196 |
|
---|
197 |
|
---|
198 |
} |
---|
199 |
|
---|
200 |
} |
---|
201 |
} |
---|
202 |
print " </tbody>\n</table>\n</FORM>\n</body>\n</html>\n"; |
---|
203 |
exit; |
---|
204 |
|
---|
205 |
}elseif ($list== "title"){ |
---|
206 |
$query = " |
---|
207 |
SELECT |
---|
208 |
foltia_program.tid, |
---|
209 |
foltia_program.title, |
---|
210 |
foltia_subtitle.countno, |
---|
211 |
foltia_subtitle.subtitle , |
---|
212 |
foltia_m2pfiles.m2pfilename , |
---|
213 |
foltia_subtitle.pid |
---|
214 |
FROM foltia_subtitle , foltia_program , foltia_m2pfiles |
---|
215 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
216 |
AND foltia_subtitle.m2pfilename = foltia_m2pfiles.m2pfilename |
---|
217 |
ORDER BY foltia_subtitle.tid DESC , foltia_subtitle.startdatetime ASC |
---|
218 |
LIMIT $lim OFFSET $st |
---|
219 |
|
---|
220 |
"; |
---|
221 |
}else{ |
---|
222 |
$query = " |
---|
223 |
SELECT |
---|
224 |
foltia_program.tid, |
---|
225 |
foltia_program.title, |
---|
226 |
foltia_subtitle.countno, |
---|
227 |
foltia_subtitle.subtitle , |
---|
228 |
foltia_m2pfiles.m2pfilename , |
---|
229 |
foltia_subtitle.pid |
---|
230 |
FROM foltia_subtitle , foltia_program , foltia_m2pfiles |
---|
231 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
232 |
AND foltia_subtitle.m2pfilename = foltia_m2pfiles.m2pfilename |
---|
233 |
ORDER BY foltia_subtitle.startdatetime DESC |
---|
234 |
LIMIT $lim OFFSET $st |
---|
235 |
"; |
---|
236 |
} |
---|
237 |
|
---|
238 |
|
---|
239 |
$rs = sql_query($con, $query, "DBクエリに失敗しました"); |
---|
240 |
$rowdata = $rs->fetch(); |
---|
241 |
|
---|
242 |
|
---|
243 |
|
---|
244 |
$query2 = " |
---|
245 |
|
---|
246 |
|
---|
247 |
|
---|
248 |
; |
---|
249 |
$rs2 = sql_query($con, $query2, "DB\?\ィ\e?E?oCO???T????"); |
---|
250 |
$rowdata2 = $rs2->fetch(); |
---|
251 |
if (! $rowdata2) { |
---|
252 |
die_exit("番組データがありません<BR>"); |
---|
253 |
} |
---|
254 |
|
---|
255 |
$dtcnt = $rowdata2[0]; |
---|
256 |
|
---|
257 |
|
---|
258 |
|
---|
259 |
if ($rowdata) { |
---|
260 |
|
---|
261 |
do { |
---|
262 |
$tid = htmlspecialchars($rowdata[0]); |
---|
263 |
$title = htmlspecialchars($rowdata[1]); |
---|
264 |
$count = htmlspecialchars($rowdata[2]); |
---|
265 |
$subtitle = htmlspecialchars($rowdata[3]); |
---|
266 |
$fName = htmlspecialchars($rowdata[4]); |
---|
267 |
$pid = htmlspecialchars($rowdata[5]); |
---|
268 |
|
---|
269 |
|
---|
270 |
|
---|
271 |
print " |
---|
272 |
<tr> |
---|
273 |
<td><INPUT TYPE='checkbox' NAME='delete[]' VALUE='$fName'><br></td>"; |
---|
274 |
if (ereg("syabas",$useragent)){ |
---|
275 |
print "<td><A HREF=\"./view_syabas.php?pid=$pid\" vod=playlist>$fName</td>"; |
---|
276 |
} |
---|
277 |
else{ |
---|
278 |
print "<td><A HREF=\"$httpmediamappath/$fName\">$fName</A><br></td>"; |
---|
279 |
} |
---|
280 |
if ($tid > 0){ |
---|
281 |
print"<td><a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">$title</a></td> |
---|
282 |
<td>$count<br></td> |
---|
283 |
<td><a href = \"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">$subtitle</a><br></td>"; |
---|
284 |
}else{ |
---|
285 |
print"<td>$title</td> |
---|
286 |
<td>$count<br></td> |
---|
287 |
<td>$subtitle<br></td>"; |
---|
288 |
} |
---|
289 |
|
---|
290 |
if (file_exists("./selectcaptureimage.php") ) { |
---|
291 |
$capimgpath = preg_replace("/.m2.+/", "", $fName); |
---|
292 |
print " <td align=\"left\"><a href=\"./selectcaptureimage.php?pid=$pid\">キャプ</a></td>\n"; |
---|
293 |
} |
---|
294 |
|
---|
295 |
print "</tr>\n |
---|
296 |
"; |
---|
297 |
|
---|
298 |
|
---|
299 |
|
---|
300 |
|
---|
301 |
} while ($rowdata = $rs->fetch()); |
---|
302 |
|
---|
303 |
|
---|
304 |
" |
---|
305 |
|
---|
306 |
|
---|
307 |
|
---|
308 |
; |
---|
309 |
|
---|
310 |
|
---|
311 |
|
---|
312 |
|
---|
313 |
print "</tbody> |
---|
314 |
</table> |
---|
315 |
</FORM>\n"; |
---|
316 |
|
---|
317 |
|
---|
318 |
|
---|
319 |
$query_st = $list; |
---|
320 |
|
---|
321 |
list($p2,$page) = page_display($query_st,$p,$p2,$lim,$dtcnt,""); |
---|
322 |
|
---|
323 |
print "</div>"; |
---|
324 |
|
---|
325 |
|
---|
326 |
//番組ソートの時、未読番組のタイトルだけ表示 |
---|
327 |
//if ($list== "title" && $p2 > $page){ |
---|
328 |
if ($list== "title"){ |
---|
329 |
|
---|
330 |
$query = " |
---|
331 |
SELECT distinct |
---|
332 |
foltia_program.tid, |
---|
333 |
foltia_program.title |
---|
334 |
FROM foltia_subtitle , foltia_program , foltia_m2pfiles |
---|
335 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
336 |
AND foltia_subtitle.m2pfilename = foltia_m2pfiles.m2pfilename |
---|
337 |
ORDER BY foltia_program.tid DESC |
---|
338 |
"; |
---|
339 |
|
---|
340 |
|
---|
341 |
$rs = sql_query($con, $query, "DBクエリに失敗しました"); |
---|
342 |
$rowdata = $rs->fetch(); |
---|
343 |
if ($rowdata) { |
---|
344 |
print "<hr> |
---|
345 |
<p align=\"left\">未読タイトルを表示します。<br> |
---|
346 |
<table BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\"> |
---|
347 |
<thead> |
---|
348 |
<tr> |
---|
349 |
<th align=\"left\">TID</th> |
---|
350 |
<th align=\"left\">タイトル</th> |
---|
351 |
</tr> |
---|
352 |
</thead> |
---|
353 |
<tbody> |
---|
354 |
"; |
---|
355 |
|
---|
356 |
do { |
---|
357 |
$tid = htmlspecialchars($rowdata[0]); |
---|
358 |
$title = htmlspecialchars($rowdata[1]); |
---|
359 |
print "<tr><td>$tid</td><td>$title</td></tr>\n"; |
---|
360 |
|
---|
361 |
} while ($rowdata = $rs->fetch()); |
---|
362 |
print "</tbody></table>\n"; |
---|
363 |
} |
---|
364 |
} |
---|
365 |
|
---|
366 |
|
---|
367 |
?> |
---|
368 |
|
---|
369 |
</body> |
---|
370 |
</html> |
---|
371 |
|
---|