| 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 | 
    $tid = getgetnumform("tid"); | 
|---|
| 47 | 
        if ($tid == "") { | 
|---|
| 48 | 
        die_exit("番組がありません<BR>"); | 
|---|
| 49 | 
        } | 
|---|
| 50 | 
    $sid = getgetnumform("sid"); | 
|---|
| 51 | 
        if ($sid == "") { | 
|---|
| 52 | 
        die_exit("局がありません<BR>"); | 
|---|
| 53 | 
        } | 
|---|
| 54 | 
 | 
|---|
| 55 | 
$now = date("YmdHi");    | 
|---|
| 56 | 
?> | 
|---|
| 57 | 
<body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > | 
|---|
| 58 | 
 | 
|---|
| 59 | 
<?php  | 
|---|
| 60 | 
    printhtmlpageheader(); | 
|---|
| 61 | 
 | 
|---|
| 62 | 
 | 
|---|
| 63 | 
$query = " | 
|---|
| 64 | 
SELECT  | 
|---|
| 65 | 
foltia_program.tid, | 
|---|
| 66 | 
stationname, | 
|---|
| 67 | 
foltia_program .title , | 
|---|
| 68 | 
foltia_tvrecord.bitrate , | 
|---|
| 69 | 
foltia_tvrecord.stationid   | 
|---|
| 70 | 
FROM  foltia_tvrecord , foltia_program , foltia_station  | 
|---|
| 71 | 
WHERE foltia_tvrecord.tid = foltia_program.tid  AND foltia_tvrecord.stationid = foltia_station .stationid  AND foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ?  "; | 
|---|
| 72 | 
 | 
|---|
| 73 | 
 | 
|---|
| 74 | 
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid)); | 
|---|
| 75 | 
$rowdata = $rs->fetch(); | 
|---|
| 76 | 
 | 
|---|
| 77 | 
if (! $rowdata ) { | 
|---|
| 78 | 
        die_exit("登録番組がありません<BR>"); | 
|---|
| 79 | 
        } | 
|---|
| 80 | 
        $tid = htmlspecialchars($rowdata[0]); | 
|---|
| 81 | 
        $stationname = htmlspecialchars($rowdata[1]); | 
|---|
| 82 | 
        $title = htmlspecialchars($rowdata[2]); | 
|---|
| 83 | 
        $bitrate = htmlspecialchars($rowdata[3]); | 
|---|
| 84 | 
        $stationid = htmlspecialchars($rowdata[4]); | 
|---|
| 85 | 
 | 
|---|
| 86 | 
$delflag = getgetnumform(delflag); | 
|---|
| 87 | 
 | 
|---|
| 88 | 
?> | 
|---|
| 89 | 
 | 
|---|
| 90 | 
  <p align="left"><font color="#494949" size="6">予約解除</font></p> | 
|---|
| 91 | 
  <hr size="4"> | 
|---|
| 92 | 
<?php | 
|---|
| 93 | 
if ($delflag == "1") { | 
|---|
| 94 | 
    print "「".$title."」の自動録画予約を解除しました。 <br>\n"; | 
|---|
| 95 | 
 | 
|---|
| 96 | 
 | 
|---|
| 97 | 
if (($demomode) || ($protectmode) ){ | 
|---|
| 98 | 
 | 
|---|
| 99 | 
}else{ | 
|---|
| 100 | 
 | 
|---|
| 101 | 
 | 
|---|
| 102 | 
$oserr = system("$toolpath/perl/addatq.pl $tid $sid DELETE"); | 
|---|
| 103 | 
 | 
|---|
| 104 | 
$query = " | 
|---|
| 105 | 
DELETE   | 
|---|
| 106 | 
FROM  foltia_tvrecord   | 
|---|
| 107 | 
WHERE foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ?  "; | 
|---|
| 108 | 
$rs->closeCursor(); | 
|---|
| 109 | 
 | 
|---|
| 110 | 
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid)); | 
|---|
| 111 | 
 | 
|---|
| 112 | 
 | 
|---|
| 113 | 
 | 
|---|
| 114 | 
"「".$title."」の自動録画予約を解除します。 <br>\n"; | 
|---|
| 115 | 
 | 
|---|
| 116 | 
"<form name=\"deletereserve\" method=\"GET\" action=\"delreserve.php\"> | 
|---|
| 117 | 
; | 
|---|
| 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><?php print"$title"; ?></td> | 
|---|
| 131 | 
    <td><?php print"$stationname"; ?></td> | 
|---|
| 132 | 
    <td><?php print"$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 >= ?  AND foltia_program.tid = ?   | 
|---|
| 167 | 
ORDER BY foltia_subtitle.startdatetime  ASC | 
|---|
| 168 | 
"; | 
|---|
| 169 | 
 | 
|---|
| 170 | 
$rs = sql_query($con, $query, "DBクエリに失敗しました",array($now,$tid)); | 
|---|
| 171 | 
$rowdata = $rs->fetch(); | 
|---|
| 172 | 
if (! $rowdata) { | 
|---|
| 173 | 
        echo("放映予定はありません<BR>"); | 
|---|
| 174 | 
}else{ | 
|---|
| 175 | 
    $maxcols = $rs->columnCount(); | 
|---|
| 176 | 
?> | 
|---|
| 177 | 
  <table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%" BGCOLOR="#bcf1be"> | 
|---|
| 178 | 
    <thead> | 
|---|
| 179 | 
        <tr> | 
|---|
| 180 | 
            <th align="left">放映局</th> | 
|---|
| 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 | 
 | 
|---|
| 187 | 
        </tr> | 
|---|
| 188 | 
    </thead> | 
|---|
| 189 | 
 | 
|---|
| 190 | 
    <tbody> | 
|---|
| 191 | 
        <?php | 
|---|
| 192 | 
             | 
|---|
| 193 | 
         do { | 
|---|
| 194 | 
                echo("<tr>\n"); | 
|---|
| 195 | 
                for ($col = 0; $col < $maxcols; $col++) {  | 
|---|
| 196 | 
                    echo("<td>".htmlspecialchars($rowdata[$col])."<br></td>\n"); | 
|---|
| 197 | 
                } | 
|---|
| 198 | 
                echo("</tr>\n"); | 
|---|
| 199 | 
         } while ($row = $rs->fetch()); | 
|---|
| 200 | 
        } | 
|---|
| 201 | 
        ?> | 
|---|
| 202 | 
    </tbody> | 
|---|
| 203 | 
</table> | 
|---|
| 204 | 
 | 
|---|
| 205 | 
 | 
|---|
| 206 | 
 | 
|---|
| 207 | 
</body> | 
|---|
| 208 | 
</html> | 
|---|
| 209 | 
 | 
|---|