| 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 | 
 | 
|---|
| 25 | 
<?php | 
|---|
| 26 | 
 | 
|---|
| 27 | 
  include("./foltialib.php"); | 
|---|
| 28 | 
   | 
|---|
| 29 | 
$epgid = getgetnumform(epgid); | 
|---|
| 30 | 
        if ($epgid == "") { | 
|---|
| 31 | 
        print "    <title>foltia:EPG予約:Error</title></head>\n"; | 
|---|
| 32 | 
        die_exit("登録番組がありません<BR>"); | 
|---|
| 33 | 
        } | 
|---|
| 34 | 
print "    <title>foltia:EPG予約:$epgid</title> | 
|---|
| 35 | 
</head>\n"; | 
|---|
| 36 | 
 | 
|---|
| 37 | 
 | 
|---|
| 38 | 
$con = m_connect(); | 
|---|
| 39 | 
$now = date("YmdHi");    | 
|---|
| 40 | 
 | 
|---|
| 41 | 
 | 
|---|
| 42 | 
$query = " | 
|---|
| 43 | 
 | 
|---|
| 44 | 
 | 
|---|
| 45 | 
 | 
|---|
| 46 | 
 | 
|---|
| 47 | 
; | 
|---|
| 48 | 
$rs = m_query($con, $query, "DBクエリに失敗しました"); | 
|---|
| 49 | 
$maxrows = pg_num_rows($rs); | 
|---|
| 50 | 
 | 
|---|
| 51 | 
$maxrows == 0) { | 
|---|
| 52 | 
die_exit("登録番組がありません<BR>"); | 
|---|
| 53 | 
 | 
|---|
| 54 | 
$rowdata = pg_fetch_row($rs, 0); | 
|---|
| 55 | 
 | 
|---|
| 56 | 
?> | 
|---|
| 57 | 
<body BGCOLOR="#ffffff" TEXT="#494949" LINK="#0047ff" VLINK="#000000" ALINK="#c6edff" > | 
|---|
| 58 | 
 | 
|---|
| 59 | 
<?php  | 
|---|
| 60 | 
    printhtmlpageheader(); | 
|---|
| 61 | 
?> | 
|---|
| 62 | 
 | 
|---|
| 63 | 
  <p align="left"><font color="#494949" size="6">番組予約</font></p> | 
|---|
| 64 | 
  <hr size="4"> | 
|---|
| 65 | 
EPGから下記番組を録画予約します。 <br> | 
|---|
| 66 | 
<form name="recordingsetting" method="POST" action="reserveepgcomp.php"> | 
|---|
| 67 | 
<input type="submit" value="予約" > | 
|---|
| 68 | 
<br> | 
|---|
| 69 | 
 | 
|---|
| 70 | 
 | 
|---|
| 71 | 
<?php     | 
|---|
| 72 | 
$stationjname = htmlspecialchars($rowdata[8]); | 
|---|
| 73 | 
$startfoltime = htmlspecialchars($rowdata[1]); | 
|---|
| 74 | 
$startprinttime =  foldate2print($startfoltime); | 
|---|
| 75 | 
$endfoltime = htmlspecialchars($rowdata[2]); | 
|---|
| 76 | 
$endprinttime = foldate2print($endfoltime); | 
|---|
| 77 | 
$lengthmin = htmlspecialchars($rowdata[3]); | 
|---|
| 78 | 
$recch = htmlspecialchars($rowdata[9]); | 
|---|
| 79 | 
$progname = htmlspecialchars($rowdata[5]); | 
|---|
| 80 | 
$progname = z2h($progname); | 
|---|
| 81 | 
$progdesc = htmlspecialchars($rowdata[6]); | 
|---|
| 82 | 
$progdesc =  z2h($progdesc); | 
|---|
| 83 | 
$progcat = htmlspecialchars(z2h($rowdata[7])); | 
|---|
| 84 | 
 | 
|---|
| 85 | 
if ($progcat == "information"){ | 
|---|
| 86 | 
$progcat =  '情報'; | 
|---|
| 87 | 
}elseif ($progcat == "anime"){ | 
|---|
| 88 | 
$progcat =  'アニメ・特撮'; | 
|---|
| 89 | 
}elseif ($progcat == "news"){ | 
|---|
| 90 | 
$progcat =  'ニュース・報道'; | 
|---|
| 91 | 
}elseif ($progcat == "drama"){ | 
|---|
| 92 | 
$progcat =  'ドラマ'; | 
|---|
| 93 | 
}elseif ($progcat == "variety"){ | 
|---|
| 94 | 
$progcat =  'バラエティ'; | 
|---|
| 95 | 
}elseif ($progcat == "documentary"){ | 
|---|
| 96 | 
$progcat =  'ドキュメンタリー・教養'; | 
|---|
| 97 | 
}elseif ($progcat == "education"){ | 
|---|
| 98 | 
$progcat =  '教育'; | 
|---|
| 99 | 
}elseif ($progcat == "music"){ | 
|---|
| 100 | 
$progcat =  '音楽'; | 
|---|
| 101 | 
}elseif ($progcat == "cinema"){ | 
|---|
| 102 | 
$progcat =  '映画'; | 
|---|
| 103 | 
}elseif ($progcat == "hobby"){ | 
|---|
| 104 | 
$progcat =  '趣味・実用'; | 
|---|
| 105 | 
}elseif ($progcat == "kids"){ | 
|---|
| 106 | 
$progcat =  'キッズ'; | 
|---|
| 107 | 
}elseif ($progcat == "sports"){ | 
|---|
| 108 | 
$progcat =  'スポーツ'; | 
|---|
| 109 | 
}elseif ($progcat == "etc"){ | 
|---|
| 110 | 
$progcat =  'その他'; | 
|---|
| 111 | 
}elseif ($progcat == "stage"){ | 
|---|
| 112 | 
$progcat =  '演劇'; | 
|---|
| 113 | 
} | 
|---|
| 114 | 
 | 
|---|
| 115 | 
$epgid = $epgid ; | 
|---|
| 116 | 
$stationid = htmlspecialchars($rowdata[10]); | 
|---|
| 117 | 
 | 
|---|
| 118 | 
if ($now > $endfoltime){ | 
|---|
| 119 | 
    print "この番組はすでに終了しているため、録画されません。<br>"; | 
|---|
| 120 | 
}elseif($now > $startfoltime){ | 
|---|
| 121 | 
    print "この番組はすでに放映開始しているため、録画されません。<br>"; | 
|---|
| 122 | 
}elseif($now > ($startfoltime - 10) ){ | 
|---|
| 123 | 
    print "この番組は放映直前なため、録画されない可能性があります。<br>"; | 
|---|
| 124 | 
} | 
|---|
| 125 | 
 | 
|---|
| 126 | 
 | 
|---|
| 127 | 
 | 
|---|
| 128 | 
$query = " | 
|---|
| 129 | 
 | 
|---|
| 130 | 
 | 
|---|
| 131 | 
 | 
|---|
| 132 | 
 | 
|---|
| 133 | 
 | 
|---|
| 134 | 
 | 
|---|
| 135 | 
 | 
|---|
| 136 | 
 | 
|---|
| 137 | 
;     | 
|---|
| 138 | 
 | 
|---|
| 139 | 
$rs = m_query($con, $query, "DBクエリに失敗しました"); | 
|---|
| 140 | 
$maxrows = pg_num_rows($rs); | 
|---|
| 141 | 
 | 
|---|
| 142 | 
$maxrows == 0) { | 
|---|
| 143 | 
 | 
|---|
| 144 | 
}else{ | 
|---|
| 145 | 
$chkoverwrap = pg_fetch_row($rs, 0); | 
|---|
| 146 | 
$prereservedtitle = htmlspecialchars($chkoverwrap[0]); | 
|---|
| 147 | 
$tid =  htmlspecialchars($chkoverwrap[1]); | 
|---|
| 148 | 
$pid =  htmlspecialchars($chkoverwrap[2]); | 
|---|
| 149 | 
"<strong>この番組は既に予約済みです。</strong> \n"; | 
|---|
| 150 | 
$tid > 1){ | 
|---|
| 151 | 
"予約番組名:<a href=\"http://cal.syoboi.jp/tid/$tid/time/#$pid\" target=\"_blank\">$prereservedtitle</a><br>\n"; | 
|---|
| 152 | 
 | 
|---|
| 153 | 
"予約方法:EPG録画<br>\n"; | 
|---|
| 154 | 
 | 
|---|
| 155 | 
 | 
|---|
| 156 | 
 | 
|---|
| 157 | 
 | 
|---|
| 158 | 
 | 
|---|
| 159 | 
"<table width=\"100%\" border=\"0\"> | 
|---|
| 160 | 
 | 
|---|
| 161 | 
 | 
|---|
| 162 | 
 | 
|---|
| 163 | 
 | 
|---|
| 164 | 
 | 
|---|
| 165 | 
 | 
|---|
| 166 | 
 | 
|---|
| 167 | 
 | 
|---|
| 168 | 
 | 
|---|
| 169 | 
 | 
|---|
| 170 | 
 | 
|---|
| 171 | 
 | 
|---|
| 172 | 
 | 
|---|
| 173 | 
 | 
|---|
| 174 | 
 | 
|---|
| 175 | 
 | 
|---|
| 176 | 
 | 
|---|
| 177 | 
 | 
|---|
| 178 | 
 | 
|---|
| 179 | 
; | 
|---|
| 180 | 
 | 
|---|
| 181 | 
 | 
|---|
| 182 | 
?> | 
|---|
| 183 | 
 | 
|---|
| 184 | 
</FORM> | 
|---|
| 185 | 
 | 
|---|
| 186 | 
 | 
|---|
| 187 | 
</body> | 
|---|
| 188 | 
</html> | 
|---|
| 189 | 
 | 
|---|