1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
?> |
---|
18 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
19 |
<html lang="ja"> |
---|
20 |
<head> |
---|
21 |
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> |
---|
22 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
---|
23 |
<link rel="stylesheet" type="text/css" href="graytable.css"> |
---|
24 |
<title>foltia:ファイル削除</title> |
---|
25 |
</head> |
---|
26 |
|
---|
27 |
<?php |
---|
28 |
include("./foltialib.php"); |
---|
29 |
$con = m_connect(); |
---|
30 |
$now = date("YmdHi"); |
---|
31 |
|
---|
32 |
$delete = $_POST['delete']; |
---|
33 |
|
---|
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">次の番組を削除しました。</p> |
---|
44 |
|
---|
45 |
|
---|
46 |
<table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%"> |
---|
47 |
<thead> |
---|
48 |
<tr> |
---|
49 |
<th align="left">ファイル名</th> |
---|
50 |
<th align="left">タイトル</th> |
---|
51 |
<th align="left">話数</th> |
---|
52 |
<th align="left">サブタイ</th> |
---|
53 |
</tr> |
---|
54 |
</thead> |
---|
55 |
|
---|
56 |
<tbody> |
---|
57 |
<? |
---|
58 |
|
---|
59 |
|
---|
60 |
|
---|
61 |
foreach ($delete as $fName) { |
---|
62 |
|
---|
63 |
$filesplit = split("-",$fName); |
---|
64 |
|
---|
65 |
if ($filesplit[1] == ""){ |
---|
66 |
$query = " |
---|
67 |
SELECT |
---|
68 |
foltia_program.tid,foltia_program.title,foltia_subtitle.subtitle |
---|
69 |
FROM foltia_subtitle , foltia_program |
---|
70 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
71 |
AND foltia_subtitle.tid = $filesplit[0] |
---|
72 |
"; |
---|
73 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
74 |
$rowdata = pg_fetch_row($rs, $row); |
---|
75 |
|
---|
76 |
$title = $rowdata[1]; |
---|
77 |
$subtitle = ""; |
---|
78 |
$count = ""; |
---|
79 |
}else{ |
---|
80 |
|
---|
81 |
$query = " |
---|
82 |
SELECT |
---|
83 |
foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle |
---|
84 |
FROM foltia_subtitle , foltia_program |
---|
85 |
WHERE foltia_program.tid = foltia_subtitle.tid |
---|
86 |
AND foltia_subtitle.tid = $filesplit[0] |
---|
87 |
AND foltia_subtitle.countno = $filesplit[1] |
---|
88 |
"; |
---|
89 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
90 |
$rowdata = pg_fetch_row($rs, $row); |
---|
91 |
|
---|
92 |
$title = $rowdata[1]; |
---|
93 |
$count = $rowdata[2]; |
---|
94 |
$subtitle = $rowdata[3]; |
---|
95 |
|
---|
96 |
} |
---|
97 |
|
---|
98 |
$tid = htmlspecialchars($rowdata[0]); |
---|
99 |
$title = htmlspecialchars($title); |
---|
100 |
$count = htmlspecialchars($count); |
---|
101 |
$subtitle = htmlspecialchars($subtitle); |
---|
102 |
|
---|
103 |
|
---|
104 |
|
---|
105 |
|
---|
106 |
print " |
---|
107 |
<tr> |
---|
108 |
<td>$fName<br></td> |
---|
109 |
<td><a href=\"http://cal.syoboi.jp/progedit.php?TID=$tid\" target=\"_blank\">$title</a></td> |
---|
110 |
<td>$count<br></td> |
---|
111 |
<td>$subtitle<br></td> |
---|
112 |
</tr>\n |
---|
113 |
"; |
---|
114 |
|
---|
115 |
|
---|
116 |
if ($demomode){ |
---|
117 |
}else{ |
---|
118 |
|
---|
119 |
$query = " |
---|
120 |
DELETE FROM foltia_m2pfiles |
---|
121 |
WHERE m2pfilename = '$fName' |
---|
122 |
"; |
---|
123 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
124 |
|
---|
125 |
|
---|
126 |
$oserr = system("$toolpath/perl/deletemovie.pl $fName"); |
---|
127 |
} |
---|
128 |
|
---|
129 |
} |
---|
130 |
|
---|
131 |
?> |
---|
132 |
</tbody> |
---|
133 |
</table> |
---|
134 |
|
---|
135 |
</body> |
---|
136 |
</html> |
---|
137 |
|
---|