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