本文整理汇总了PHP中CommonController::insertWorkingTime方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonController::insertWorkingTime方法的具体用法?PHP CommonController::insertWorkingTime怎么用?PHP CommonController::insertWorkingTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonController
的用法示例。
在下文中一共展示了CommonController::insertWorkingTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$childAgeFlag = 1;
if ($data['child_allowed'] == 1) {
if ($data['child_age_from'] > $data['child_age_to']) {
$childAgeFlag = 0;
$msg = !empty($msg) ? '<br />' : '' . 'Child age from should be greater than child age to.';
$class = 'danger';
$display = 'style="display:block"';
}
}
if ($uploadFlag && $flag && $childAgeFlag) {
$id = $commonController->insertUpdateData($data);
$flagOk = false;
if ($id > 0) {
$commonController->insertAccommodationType($_POST['accommodation_type'], $id);
$commonController->insertFacilityType($_POST['facility_type'], $id);
$commonController->insertWorkingTime($_POST['txtWorkingTime'], $id);
$commonController->insertEstablishmentLanguages($_POST['language_type'], $id);
if (!empty($_FILES['imageGallery']['name'][0])) {
$commonController->insertGalleryPhotos($_FILES['imageGallery'], $id, '../images/listings/');
}
if (!empty($_POST['txtGalleryVideo'])) {
$commonController->insertGalleryVideo($_POST['txtGalleryVideo'], $id);
}
if (!empty($_POST['txtRoomTitle']) && count($_POST['txtRoomTitle']) > 0) {
$commonController->insertRooms(array('txtRoomTitle' => $_POST['txtRoomTitle'], 'ddlRoomType' => $_POST['ddlRoomType'], 'txtRoomRate' => $_POST['txtRoomRate'], 'txtRoomDescription' => $_POST['txtRoomDescription'], 'txtRoomMinimumStay' => $_POST['txtRoomMinimumStay'], 'txtRoomFacilities' => $_POST['txtRoomFacilities']), $id);
}
$flagOk = true;
}
if ($flagOk) {
$msg = 'Saved successfully';
$class = 'success';