1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 |
?> |
---|
20 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
21 |
<html lang="ja"> |
---|
22 |
<head> |
---|
23 |
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> |
---|
24 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
---|
25 |
<link rel="stylesheet" type="text/css" href="graytable.css"> |
---|
26 |
<title>foltia:delete schedule</title> |
---|
27 |
</head> |
---|
28 |
|
---|
29 |
<?php |
---|
30 |
|
---|
31 |
include("./foltialib.php"); |
---|
32 |
|
---|
33 |
$tid = getgetnumform(tid); |
---|
34 |
if ($tid == "") { |
---|
35 |
die_exit("番組がありません<BR>"); |
---|
36 |
} |
---|
37 |
$sid = getgetnumform(sid); |
---|
38 |
if ($sid == "") { |
---|
39 |
die_exit("局がありません<BR>"); |
---|
40 |
} |
---|
41 |
|
---|
42 |
$con = m_connect(); |
---|
43 |
$now = date("YmdHi"); |
---|
44 |
?> |
---|
45 |
<body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > |
---|
46 |
|
---|
47 |
<?php |
---|
48 |
printhtmlpageheader(); |
---|
49 |
|
---|
50 |
|
---|
51 |
$query = " |
---|
52 |
SELECT |
---|
53 |
foltia_program.tid, |
---|
54 |
stationname, |
---|
55 |
foltia_program .title , |
---|
56 |
foltia_tvrecord.bitrate , |
---|
57 |
foltia_tvrecord.stationid |
---|
58 |
FROM foltia_tvrecord , foltia_program , foltia_station |
---|
59 |
WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid "; |
---|
60 |
|
---|
61 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
62 |
$maxrows = pg_num_rows($rs); |
---|
63 |
|
---|
64 |
if ($maxrows == 0) { |
---|
65 |
die_exit("登録番組がありません<BR>"); |
---|
66 |
} |
---|
67 |
$rowdata = pg_fetch_row($rs, 0); |
---|
68 |
|
---|
69 |
$tid = htmlspecialchars($rowdata[0]); |
---|
70 |
$stationname = htmlspecialchars($rowdata[1]); |
---|
71 |
$title = htmlspecialchars($rowdata[2]); |
---|
72 |
$bitrate = htmlspecialchars($rowdata[3]); |
---|
73 |
$stationid = htmlspecialchars($rowdata[4]); |
---|
74 |
|
---|
75 |
$delflag = getgetnumform(delflag); |
---|
76 |
|
---|
77 |
?> |
---|
78 |
|
---|
79 |
<p align="left"><font color="#494949" size="6">予約解除</font></p> |
---|
80 |
<hr size="4"> |
---|
81 |
<?php |
---|
82 |
if ($delflag == "1") { |
---|
83 |
print "「".$title."」の自動録画予約を解除しました。 <br>\n"; |
---|
84 |
|
---|
85 |
|
---|
86 |
if (($demomode) || ($protectmode) ){ |
---|
87 |
|
---|
88 |
}else{ |
---|
89 |
|
---|
90 |
|
---|
91 |
$oserr = system("$toolpath/perl/addatq.pl $tid $sid DELETE"); |
---|
92 |
|
---|
93 |
$query = " |
---|
94 |
DELETE |
---|
95 |
FROM foltia_tvrecord |
---|
96 |
WHERE foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid "; |
---|
97 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
98 |
} |
---|
99 |
|
---|
100 |
}else{ |
---|
101 |
print "「".$title."」の自動録画予約を解除します。 <br>\n"; |
---|
102 |
|
---|
103 |
print "<form name=\"deletereserve\" method=\"GET\" action=\"delreserve.php\"> |
---|
104 |
<input type=\"submit\" value=\"予約解除\" >\n"; |
---|
105 |
|
---|
106 |
} |
---|
107 |
|
---|
108 |
?> |
---|
109 |
<br> |
---|
110 |
<table width="100%" border="0"> |
---|
111 |
<tr> |
---|
112 |
<td>タイトル</td> |
---|
113 |
<td>放送局</td> |
---|
114 |
<td>ビットレート</td> |
---|
115 |
</tr> |
---|
116 |
<tr> |
---|
117 |
<td><?=$title?></td> |
---|
118 |
<td><?=$stationname?></td> |
---|
119 |
<td><?=$bitrate?></td> |
---|
120 |
|
---|
121 |
</tr> |
---|
122 |
</table> |
---|
123 |
|
---|
124 |
<?php |
---|
125 |
if ($delflag == "1") { |
---|
126 |
|
---|
127 |
}else{ |
---|
128 |
print " |
---|
129 |
<input type=\"hidden\" name=\"tid\" value=\"$tid\"> |
---|
130 |
<input type=\"hidden\" name=\"sid\" value=\"$sid\"> |
---|
131 |
<input type=\"hidden\" name=\"delflag\" value=\"1\"> |
---|
132 |
</form>\n"; |
---|
133 |
|
---|
134 |
} |
---|
135 |
|
---|
136 |
?> |
---|
137 |
|
---|
138 |
<p> </p> |
---|
139 |
<p><br> |
---|
140 |
今後の放映予定 </p> |
---|
141 |
|
---|
142 |
<?php |
---|
143 |
$query = " |
---|
144 |
SELECT |
---|
145 |
stationname, |
---|
146 |
foltia_subtitle.countno, |
---|
147 |
foltia_subtitle.subtitle, |
---|
148 |
foltia_subtitle.startdatetime , |
---|
149 |
foltia_subtitle.lengthmin , |
---|
150 |
foltia_subtitle.startoffset |
---|
151 |
FROM foltia_subtitle , foltia_program ,foltia_station |
---|
152 |
WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid |
---|
153 |
AND foltia_subtitle.startdatetime >= '$now' AND foltia_program.tid ='$tid' |
---|
154 |
ORDER BY foltia_subtitle.startdatetime ASC |
---|
155 |
"; |
---|
156 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
157 |
$maxrows = pg_num_rows($rs); |
---|
158 |
|
---|
159 |
if ($maxrows == 0) { |
---|
160 |
echo("放映予定はありません<BR>"); |
---|
161 |
} |
---|
162 |
else{ |
---|
163 |
$maxcols = pg_num_fields($rs); |
---|
164 |
?> |
---|
165 |
<table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%" BGCOLOR="#bcf1be"> |
---|
166 |
<thead> |
---|
167 |
<tr> |
---|
168 |
<th align="left">放映局</th> |
---|
169 |
<th align="left">話数</th> |
---|
170 |
<th align="left">サブタイトル</th> |
---|
171 |
<th align="left">開始時刻</th> |
---|
172 |
<th align="left">総尺</th> |
---|
173 |
<th align="left">時刻ずれ</th> |
---|
174 |
|
---|
175 |
</tr> |
---|
176 |
</thead> |
---|
177 |
|
---|
178 |
<tbody> |
---|
179 |
<?php |
---|
180 |
|
---|
181 |
for ($row = 0; $row < $maxrows; $row++) { |
---|
182 |
echo("<tr>\n"); |
---|
183 |
|
---|
184 |
$rowdata = pg_fetch_row($rs, $row); |
---|
185 |
|
---|
186 |
for ($col = 0; $col < $maxcols; $col++) { |
---|
187 |
echo("<td>".htmlspecialchars($rowdata[$col])."<br></td>\n"); |
---|
188 |
} |
---|
189 |
echo("</tr>\n"); |
---|
190 |
} |
---|
191 |
} |
---|
192 |
?> |
---|
193 |
</tbody> |
---|
194 |
</table> |
---|
195 |
|
---|
196 |
|
---|
197 |
|
---|
198 |
</body> |
---|
199 |
</html> |
---|
200 |
|
---|