root/trunk/install/php/delepgp.php

リビジョン 1, 3.7 kB (コミッタ: jplcom, コミット時期: 17 年 前)

initial import

Line 
1 <?php
2 /*
3  Anime recording system foltia
4  http://www.dcc-jpl.com/soft/foltia/
5
6 delepgp.php
7
8 目的
9 EPG録画予約の予約解除を行います
10
11 引数
12 pid:プログラムID
13 delflag:確認フラグ
14
15  DCC-JPL Japan/foltia project
16
17 */
18 ?>
19 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
20 <html lang="ja">
21 <head>
22 <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
23 <meta http-equiv="Content-Style-Type" content="text/css">
24 <link rel="stylesheet" type="text/css" href="graytable.css">
25 <title>foltia:delete EPG Program</title>
26 </head>
27
28 <?php
29
30   include("./foltialib.php");
31
32 $pid = getgetform(pid);
33         if ($pid == "") {
34         die_exit("番組がありません<BR>");
35         }
36
37 $con = m_connect();
38 $now = date("YmdHi");   
39 ?>
40 <body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" >
41
42 <?php
43     printhtmlpageheader();
44
45 //タイトル取得
46 $query = "
47 SELECT
48 foltia_subtitle.pid  ,
49 foltia_subtitle.stationid ,
50 foltia_subtitle.countno ,
51 foltia_subtitle.subtitle  ,
52 foltia_subtitle.startdatetime ,
53 foltia_subtitle.enddatetime ,
54 foltia_subtitle.lengthmin ,
55 foltia_station.stationname ,
56 foltia_station.stationrecch
57 FROM     foltia_subtitle
58 WHERE    foltia_subtitle.tid = 0 AND
59 foltia_station.stationid = foltia_subtitle.stationid AND
60 foltia_subtitle.pid = $pid
61  ";
62
63     $rs = m_query($con, $query, "DBクエリに失敗しました");
64     $maxrows = pg_num_rows($rs);
65             
66         if ($maxrows == 0) {
67         die_exit("登録番組がありません<BR>");
68         }
69         $rowdata = pg_fetch_row($rs, 0);
70
71         $pid = htmlspecialchars($rowdata[0]);
72         $stationid = htmlspecialchars($rowdata[1]);
73         $countno = htmlspecialchars($rowdata[2]);
74         $subtitle = htmlspecialchars($rowdata[3]);
75         $starttime = htmlspecialchars($rowdata[4]);
76         $startprinttime = htmlspecialchars(foldate2print($rowdata[4]));
77         $endtime = htmlspecialchars($rowdata[5]);
78         $endprinttime = htmlspecialchars(foldate2print($rowdata[5]));
79         $lengthmin = htmlspecialchars($rowdata[6]);
80         $stationjname = htmlspecialchars($rowdata[7]);
81         $recch = htmlspecialchars($rowdata[8]);
82 $delflag = getgetnumform(delflag);
83 ?>
84
85   <p align="left"><font color="#494949" size="6">EPG予約解除</font></p>
86   <hr size="4">
87 <?php
88 if ($delflag == "1") {
89     //時刻確認
90     if ($now < $starttime ){
91         print "EPG予約「".$subtitle."」の録画予約を解除しました。 <br>\n";
92         
93         //削除処理
94         if (($demomode) || ($protectmode) ){
95         //demomodeやprotectmodeならなにもしない
96         }else{
97         //キュー更新
98 //        $oserr = system("$toolpath/perl/addatq.pl 0 $stationid ");
99         $oserr = system("$toolpath/perl/addpidatq.pl $pid ");
100         //DB削除
101         $query = "
102         DELETE 
103         FROM  foltia_subtitle 
104         WHERE foltia_subtitle.pid = $pid AND  foltia_subtitle.tid = 0 ";
105             $rs = m_query($con, $query, "DBクエリに失敗しました");
106         }
107     }else{
108         print "<strong>過去番組は予約削除出来ません。</strong>";
109     }//end if
110
111 }else{//delflagが1じゃなければ
112
113     //時刻確認
114     if ($now < $starttime ){
115     print "EPG予約「".$subtitle."」の録画予約を解除します。 <br>\n";
116
117     print "<form name=\"deletereserve\" method=\"GET\" action=\"delepgp.php\">
118     <input type=\"submit\" value=\"予約解除\" >\n";
119     }else{
120     print "<strong>過去番組は予約削除出来ません。</strong>";
121     }//end if
122 }
123
124 print "<br>
125     <table width=\"100%\" border=\"0\">
126     <tr><td>放送局</td><td>$stationjname</td></tr>
127     <tr><td>放送開始</td><td>$startprinttime</td></tr>
128     <tr><td>放送終了</td><td>$endprinttime</td></tr>
129     <tr><td>尺(分)</td><td>$lengthmin</td></tr>
130     <tr><td>放送チャンネル</td><td>$recch</td></tr>
131     <tr><td>番組名</td><td>$subtitle</td></tr>
132     <tr><td>番組ID</td><td>$pid</td></tr>
133     <tr><td>局コード</td><td>$stationid</td></tr>
134     
135 </table>
136 ";
137
138 if ($delflag == "1") {
139
140 }else{
141 print "
142 <input type=\"hidden\" name=\"pid\" value=\"$pid\">
143 <input type=\"hidden\" name=\"delflag\" value=\"1\">
144 </form>\n";
145
146 }
147
148 ?> 
149 </table>
150
151 </body>
152 </html>
153
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed