本文整理汇总了PHP中Reservation::custom方法的典型用法代码示例。如果您正苦于以下问题:PHP Reservation::custom方法的具体用法?PHP Reservation::custom怎么用?PHP Reservation::custom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reservation
的用法示例。
在下文中一共展示了Reservation::custom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
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);
} catch (Exception $e) {
exit("Error:" . $e->getMessage());
}
exit("" . $program_id);
示例2: exit
include_once INSTALL_PATH . "/DBRecord.class.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(date('Y-m-d H:i:s', $start_time), date('Y-m-d H:i:s', $end_time), $channel_id, $title, $description, $category_id, $program_id, 0, $mode);
} catch (Exception $e) {
exit("Error:" . $e->getMessage());
}
exit("" . $program_id);