function renderepgstation($con, $stationname, $start) { //戻り値 なし EPGの局表示 $now = date("YmdHi"); $today = date("Ymd"); $tomorrow = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); //$today = "20051013"; //$tomorrow = "20051014"; //$epgstart = $today . "2000"; $epgstart = $start; //$epgend = $tomorrow . "0400"; $epgend = calcendtime($start, 8 * 60); $query = "\n\t\tSELECT startdatetime , enddatetime , lengthmin , epgtitle , epgdesc , epgcategory ,ontvchannel ,epgid\n\t\tFROM foltia_epg\n\t\tWHERE foltia_epg.ontvchannel = '{$stationname}' AND\n\t\tenddatetime > {$epgstart} AND\n\t\tstartdatetime < {$epgend}\n\t\tORDER BY foltia_epg.startdatetime ASC\n\t\t"; $rs = m_query($con, $query, "DBクエリに失敗しました"); $rowdata = $rs->fetch(); if (!$rowdata) { print "番組データがありません<BR>"; } else { print "<table width=\"100%\" border=\"0\">\n"; //print "<ul><!-- ($maxrows) $query -->\n"; do { $printstarttime = substr($rowdata[0], 8, 2) . ":" . substr($rowdata[0], 10, 2); $tdclass = "t" . substr($rowdata[0], 8, 2) . substr($rowdata[0], 10, 2); $title = htmlspecialchars($rowdata[3]); $title = z2h($title); $desc = htmlspecialchars($rowdata[4]); $desc = z2h($desc); $height = htmlspecialchars($rowdata[2]) * 3; $epgid = htmlspecialchars($rowdata[7]); print "\n\t\t\t\t<tr>\n\t\t\t\t<td height = \"{$height}\" >{$printstarttime} <A HREF=\"./reserveepg.php?epgid={$epgid}\">{$title}</A> {$desc} <!-- {$rowdata['0']} - {$rowdata['1']} --></td>\n\t\t\t\t</tr>\n\t\t\t\t"; /*print"<li style=\"height:" . $height ."px;\" class=\"$tdclass\"> $printstarttime <A HREF=\"./reserveepg.php?epgid=$epgid\">$title</A> $desc($rowdata[0] - $rowdata[1]) </li>\n"; */ } while ($rowdata = $rs->fetch()); //do //print "</ul>\n"; print "</table>\n"; } //if }
$reserve = reserveCheck($con, $epgstart, $epgend, $stationid); $query = "\n\t SELECT\n startdatetime,\n enddatetime,\n lengthmin,\n epgtitle,\n epgdesc,\n epgcategory,\n ontvchannel,\n epgid,\n epgcategory\n FROM foltia_epg\n WHERE foltia_epg.ontvchannel = ?\n AND enddatetime > ?\n AND startdatetime < ?\n\t ORDER BY foltia_epg.startdatetime ASC"; $statiodh = sql_query($con, $query, "DBクエリに失敗しました", array($stationname, $epgstart, $epgend)); $stationrowdata = $statiodh->fetch(); if (!$stationrowdata) { $item[0]["{$stationname}"] = ">番組データがありません"; } else { do { $startdatetime = $stationrowdata['startdatetime']; $enddatetime = $stationrowdata['enddatetime']; $printstarttime = substr($startdatetime, 8, 2) . ':' . substr($startdatetime, 10, 2); $tdclass = 't' . substr($startdatetime, 8, 2) . substr($startdatetime, 10, 2); $title = $stationrowdata['epgtitle']; $title = htmlspecialchars(z2h($title)); $desc = $stationrowdata['epgdesc']; $desc = htmlspecialchars(z2h($desc)); if ($epgviewstyle) { $desc .= "<br><br>\n"; $desc .= " <!-- " . htmlspecialchars(foldate2print($enddatetime)) . "-->"; } else { $desc .= "<br><br>\n"; $desc .= " " . htmlspecialchars(foldate2print($enddatetime)); } $height = htmlspecialchars($stationrowdata['lengthmin']) * 3; $epgid = htmlspecialchars($stationrowdata['epgid']); $epgcategory = htmlspecialchars($stationrowdata['epgcategory']); if (isset($timetablehash[$startdatetime])) { $number = $timetablehash[$startdatetime]; //print "$stationname $stationrowdata[0] [$number] $printstarttime $title $desc<br>\n"; } else { $number = 0;
EPGから下記番組を録画予約します。 <br><br> <?php $stationjname = htmlspecialchars($rowdata[8]); $startfoltime = htmlspecialchars($rowdata[1]); $startprinttime = foldate2print($startfoltime); $endfoltime = htmlspecialchars($rowdata[2]); $endprinttime = foldate2print($endfoltime); $lengthmin = htmlspecialchars($rowdata[3]); $recch = htmlspecialchars($rowdata[9]); $progname = htmlspecialchars($rowdata[5]); $progname = z2h($progname); $progdesc = htmlspecialchars($rowdata[6]); $progdesc = z2h($progdesc); $progcat = htmlspecialchars(z2h($rowdata[7])); if ($progcat == "information") { $progcat = '情報'; } elseif ($progcat == "anime") { $progcat = 'アニメ・特撮'; } elseif ($progcat == "news") { $progcat = 'ニュース・報道'; } elseif ($progcat == "drama") { $progcat = 'ドラマ'; } elseif ($progcat == "variety") { $progcat = 'バラエティ'; } elseif ($progcat == "documentary") { $progcat = 'ドキュメンタリー・教養'; } elseif ($progcat == "education") { $progcat = '教育'; } elseif ($progcat == "music") {
function deleteObject($obj) { $cobj = z2h($obj); if ($cobj != '.' && $cobj != '..') { if ($this->is_dir($obj)) { if ($list = @ftp_nlist($this->connection, "{$obj}")) { for ($x = 0; $x < @count($list); $x++) { $o = z2h($list[$x]); if ($o != '.' && $o != '..') { $this->deleteObject(z1a($obj) . $o); } } } @ftp_rmdir($this->connection, "{$obj}"); } else { $this->deleteFile("{$obj}"); } } }