當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonController::insertFacilityType方法代碼示例

本文整理匯總了PHP中CommonController::insertFacilityType方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonController::insertFacilityType方法的具體用法?PHP CommonController::insertFacilityType怎麽用?PHP CommonController::insertFacilityType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonController的用法示例。


在下文中一共展示了CommonController::insertFacilityType方法的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';
開發者ID:aniketbasu14,項目名稱:snoozeover,代碼行數:31,代碼來源:add_edit_establishments.php


注:本文中的CommonController::insertFacilityType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。