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:record plan</title> |
---|
25 |
</head> |
---|
26 |
|
---|
27 |
<?php |
---|
28 |
|
---|
29 |
include("./foltialib.php"); |
---|
30 |
|
---|
31 |
$con = m_connect(); |
---|
32 |
|
---|
33 |
$now = date("YmdHi"); |
---|
34 |
|
---|
35 |
$query = " |
---|
36 |
SELECT |
---|
37 |
foltia_program .tid, |
---|
38 |
stationname, |
---|
39 |
foltia_program .title, |
---|
40 |
foltia_subtitle.countno, |
---|
41 |
foltia_subtitle.subtitle, |
---|
42 |
foltia_subtitle.startdatetime , |
---|
43 |
foltia_subtitle.lengthmin , |
---|
44 |
foltia_tvrecord.bitrate , |
---|
45 |
foltia_subtitle.startoffset , |
---|
46 |
foltia_subtitle.pid |
---|
47 |
FROM foltia_subtitle , foltia_program ,foltia_station ,foltia_tvrecord |
---|
48 |
WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid |
---|
49 |
AND foltia_subtitle.enddatetime >= '$now' |
---|
50 |
UNION |
---|
51 |
SELECT |
---|
52 |
foltia_program .tid, |
---|
53 |
stationname, |
---|
54 |
foltia_program .title, |
---|
55 |
foltia_subtitle.countno, |
---|
56 |
foltia_subtitle.subtitle, |
---|
57 |
foltia_subtitle.startdatetime , |
---|
58 |
foltia_subtitle.lengthmin , |
---|
59 |
foltia_tvrecord.bitrate , |
---|
60 |
foltia_subtitle.startoffset , |
---|
61 |
foltia_subtitle.pid |
---|
62 |
FROM foltia_tvrecord |
---|
63 |
LEFT OUTER JOIN foltia_subtitle on (foltia_tvrecord.tid = foltia_subtitle.tid ) |
---|
64 |
LEFT OUTER JOIN foltia_program on (foltia_tvrecord.tid = foltia_program.tid ) |
---|
65 |
LEFT OUTER JOIN foltia_station on (foltia_subtitle.stationid = foltia_station.stationid ) |
---|
66 |
WHERE foltia_tvrecord.stationid = 0 AND |
---|
67 |
foltia_subtitle.enddatetime >= '$now' ORDER BY \"startdatetime\" ASC |
---|
68 |
"; |
---|
69 |
|
---|
70 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
71 |
$maxrows = pg_num_rows($rs); |
---|
72 |
|
---|
73 |
?> |
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 |
<body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > |
---|
78 |
<div align="center"> |
---|
79 |
<?php |
---|
80 |
printhtmlpageheader(); |
---|
81 |
?> |
---|
82 |
<p align="left"><font color="#494949" size="6">予約一覧</font></p> |
---|
83 |
<hr size="4"> |
---|
84 |
<p align="left">録画予約番組放映予定と予約番組名を表示します。</p> |
---|
85 |
|
---|
86 |
<? |
---|
87 |
if ($maxrows == 0) { |
---|
88 |
print "番組データがありません<BR>\n"; |
---|
89 |
}else{ |
---|
90 |
|
---|
91 |
|
---|
92 |
|
---|
93 |
$maxcols = pg_num_fields($rs); |
---|
94 |
?> |
---|
95 |
<table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%"> |
---|
96 |
<thead> |
---|
97 |
<tr> |
---|
98 |
<th align="left">TID</th> |
---|
99 |
<th align="left">放映局</th> |
---|
100 |
<th align="left">タイトル</th> |
---|
101 |
<th align="left">話数</th> |
---|
102 |
<th align="left">サブタイトル</th> |
---|
103 |
<th align="left">開始時刻</th> |
---|
104 |
<th align="left">総尺</th> |
---|
105 |
<th align="left">画質</th> |
---|
106 |
|
---|
107 |
</tr> |
---|
108 |
</thead> |
---|
109 |
|
---|
110 |
<tbody> |
---|
111 |
<?php |
---|
112 |
|
---|
113 |
for ($row = 0; $row < $maxrows; $row++) { |
---|
114 |
echo("<tr>\n"); |
---|
115 |
|
---|
116 |
$rowdata = pg_fetch_row($rs, $row); |
---|
117 |
$pid = htmlspecialchars($rowdata[9]); |
---|
118 |
|
---|
119 |
$tid = htmlspecialchars($rowdata[0]); |
---|
120 |
$title = htmlspecialchars($rowdata[2]); |
---|
121 |
$subtitle = htmlspecialchars($rowdata[4]); |
---|
122 |
|
---|
123 |
echo("<tr class=\"$rclass\">\n"); |
---|
124 |
|
---|
125 |
print "<td>"; |
---|
126 |
if ($tid == 0 ){ |
---|
127 |
print "$tid"; |
---|
128 |
}else{ |
---|
129 |
print "<a href=\"reserveprogram.php?tid=$tid\">$tid</a>"; |
---|
130 |
} |
---|
131 |
print "</td>\n"; |
---|
132 |
|
---|
133 |
echo("<td>".htmlspecialchars($rowdata[1])."<br></td>\n"); |
---|
134 |
|
---|
135 |
print "<td>"; |
---|
136 |
if ($tid == 0 ){ |
---|
137 |
print "$title"; |
---|
138 |
}else{ |
---|
139 |
print "<a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">$title</a>"; |
---|
140 |
} |
---|
141 |
print "</td>\n"; |
---|
142 |
|
---|
143 |
echo("<td>".htmlspecialchars($rowdata[3])."<br></td>\n"); |
---|
144 |
|
---|
145 |
if ($pid > 0 ){ |
---|
146 |
print "<td><a href=\"http://cal.syoboi.jp/tid/$tid/time#$pid\" target=\"_blank\">$subtitle<br></td>\n"; |
---|
147 |
}else{ |
---|
148 |
if ($protectmode) { |
---|
149 |
print "<td>$subtitle<br></td>\n"; |
---|
150 |
}else{ |
---|
151 |
print "<td>$subtitle [<a href=\"delepgp.php?pid=$pid\">予約解除</a>]<br></td>\n"; |
---|
152 |
} |
---|
153 |
} |
---|
154 |
|
---|
155 |
echo("<td>".htmlspecialchars(foldate2print($rowdata[5]))."<br>(".htmlspecialchars($rowdata[8]).")</td>\n"); |
---|
156 |
|
---|
157 |
echo("<td>".htmlspecialchars($rowdata[6])."<br></td>\n"); |
---|
158 |
|
---|
159 |
|
---|
160 |
echo("<td>".htmlspecialchars($rowdata[7])."<br></td>\n"); |
---|
161 |
echo("</tr>\n"); |
---|
162 |
} |
---|
163 |
?> |
---|
164 |
</tbody> |
---|
165 |
</table> |
---|
166 |
<?php |
---|
167 |
} |
---|
168 |
|
---|
169 |
|
---|
170 |
$query = " |
---|
171 |
SELECT |
---|
172 |
foltia_program.tid, |
---|
173 |
stationname, |
---|
174 |
foltia_program .title , |
---|
175 |
foltia_tvrecord.bitrate , |
---|
176 |
foltia_tvrecord.stationid |
---|
177 |
FROM foltia_tvrecord , foltia_program , foltia_station |
---|
178 |
WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid |
---|
179 |
ORDER BY foltia_program.tid DESC |
---|
180 |
"; |
---|
181 |
$rs = m_query($con, $query, "DBクエリに失敗しました"); |
---|
182 |
$maxrows = pg_num_rows($rs); |
---|
183 |
|
---|
184 |
if ($maxrows == 0) { |
---|
185 |
|
---|
186 |
|
---|
187 |
}else{ |
---|
188 |
$maxcols = pg_num_fields($rs); |
---|
189 |
|
---|
190 |
?> |
---|
191 |
<p align="left">録画予約番組タイトルを表示します。</p> |
---|
192 |
<table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%"> |
---|
193 |
<thead> |
---|
194 |
<tr> |
---|
195 |
<th align="left">予約解除</th> |
---|
196 |
<th align="left">TID</th> |
---|
197 |
<th align="left">放映局</th> |
---|
198 |
<th align="left">タイトル</th> |
---|
199 |
<th align="left">録画リスト</th> |
---|
200 |
<th align="left">画質</th> |
---|
201 |
</tr> |
---|
202 |
</thead> |
---|
203 |
|
---|
204 |
<tbody> |
---|
205 |
<?php |
---|
206 |
|
---|
207 |
for ($row = 0; $row < $maxrows; $row++) { |
---|
208 |
/* pg_fetch_row で一行取り出す */ |
---|
209 |
$rowdata = pg_fetch_row($rs, $row); |
---|
210 |
|
---|
211 |
$tid = htmlspecialchars($rowdata[0]); |
---|
212 |
|
---|
213 |
if ($tid > 0){ |
---|
214 |
echo("<tr>\n"); |
---|
215 |
|
---|
216 |
if ($protectmode) { |
---|
217 |
echo("<td>−</td>"); |
---|
218 |
}else{ |
---|
219 |
echo("<td><a href=\"delreserve.php?tid=$tid&sid=" . |
---|
220 |
htmlspecialchars($rowdata[4]) . "\">解除</a></td>\n"); |
---|
221 |
} |
---|
222 |
|
---|
223 |
echo("<td><a href=\"reserveprogram.php?tid=$tid\">$tid</a></td>\n"); |
---|
224 |
|
---|
225 |
echo("<td>".htmlspecialchars($rowdata[1])."<br></td>\n"); |
---|
226 |
|
---|
227 |
echo("<td><a href=\"http://cal.syoboi.jp/progedit.php?TID=$tid\" target=\"_blank\">" . |
---|
228 |
htmlspecialchars($rowdata[2]) . "</a></td>\n"); |
---|
229 |
|
---|
230 |
|
---|
231 |
echo("<td><a href=\"showlibc.php?tid=$tid\">mp4</a></td>\n"); |
---|
232 |
|
---|
233 |
echo("<td>".htmlspecialchars($rowdata[3])."<br></td>\n"); |
---|
234 |
|
---|
235 |
echo("</tr>\n"); |
---|
236 |
}else{ |
---|
237 |
print "<tr> |
---|
238 |
<td>−</td><td>0</td> |
---|
239 |
<td>[全局]<br></td> |
---|
240 |
<td>EPG録画</td> |
---|
241 |
<td><a href=\"showlibc.php?tid=0\">mp4</a></td>"; |
---|
242 |
echo("<td>".htmlspecialchars($rowdata[3])."<br></td>\n</tr>"); |
---|
243 |
} |
---|
244 |
} |
---|
245 |
} |
---|
246 |
?> |
---|
247 |
</tbody> |
---|
248 |
</table> |
---|
249 |
|
---|
250 |
|
---|
251 |
</body> |
---|
252 |
</html> |
---|
253 |
|
---|