Mercurial > epgrec.yaz
view customReservation.php @ 143:42f6eb738567
mod: ΐΡ€ί»Δ€·€ς½€ΐ΅
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sun, 21 Mar 2010 21:54:03 +0900 |
parents | 481e789605e3 |
children |
line wrap: on
line source
<?php include_once('config.php'); include_once( INSTALL_PATH . "/DBRecord.class.php" ); include_once( INSTALL_PATH . "/reclib.php" ); include_once( INSTALL_PATH . "/Reservation.class.php" ); include_once( INSTALL_PATH . "/Settings.class.php" ); $settings = Settings::factory(); $program_id = 0; if( isset( $_POST['program_id'] ) ) $program_id = $_POST['program_id']; if(!( isset($_POST['shour']) && isset($_POST['smin']) && isset($_POST['smonth']) && isset($_POST['sday']) && isset($_POST['syear']) && isset($_POST['ehour']) && isset($_POST['emin']) && isset($_POST['emonth']) && isset($_POST['eday']) && isset($_POST['eyear']) && isset($_POST['channel_id']) && isset($_POST['title']) && isset($_POST['description']) && isset($_POST['category_id']) && isset($_POST['record_mode'])) ) { exit("Error:δΊη΄γ«εΏ θ¦γͺε€γγ»γγγγγ¦γγΎγγ"); } $start_time = @mktime( $_POST['shour'], $_POST['smin'], 0, $_POST['smonth'], $_POST['sday'], $_POST['syear'] ); if( ($start_time < 0) || ($start_time === false) ) { exit("Error:ιε§ζιγδΈζ£γ§γ" ); } $end_time = @mktime( $_POST['ehour'], $_POST['emin'], 0, $_POST['emonth'], $_POST['eday'], $_POST['eyear'] ); if( ($end_time < 0) || ($end_time === false) ) { exit("Error:η΅δΊζιγδΈζ£γ§γ" ); } $channel_id = $_POST['channel_id']; $title = $_POST['title']; $description = $_POST['description']; $category_id = $_POST['category_id']; $mode = $_POST['record_mode']; $rval = 0; try{ $rval = Reservation::custom( toDatetime($start_time), toDatetime($end_time), $channel_id, $title, $description, $category_id, $program_id, 0, // θͺει²η» $mode, // ι²η»γ’γΌγ 1 // γγΌγγ£γγ©γ° ); } catch( Exception $e ) { exit( "Error:".$e->getMessage() ); } exit( "".$program_id ); ?>