コード例 #1
0
ファイル: rooms.php プロジェクト: bogiesoft/hotelmis-ota
 $roomno = $_POST["roomno"];
 $roomtypeid = $_POST["roomtypeid"];
 $roomname = $_POST["roomname"];
 $noofrooms = $_POST["noofrooms"];
 $occupancy = $_POST["occupancy"];
 $status = $_POST["status"];
 $photo = $_POST["photo"];
 $filetype = $_POST["filetype"];
 $bedcount = $_POST["bedcount"];
 $bedtype1 = $_POST["bedtype1"];
 $bedtype2 = $_POST["bedtype2"];
 $bedtype3 = $_POST["bedtype3"];
 $bedtype4 = $_POST["bedtype4"];
 $ratesid = $_POST["ratesid"];
 if ($roomid > 0 || $roomid == 0 && !in_array($roomno, $rmNoList)) {
     $roomid = modify_room($roomid, $roomno, $roomtypeid, $roomname, $noofrooms, $bedcount, $bedtype1, $bedtype2, $bedtype3, $bedtype4, $occupancy, $status, $photo, $filetype, $ratesid);
     if (is_ebridgeCustomer()) {
         include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_functions.php";
         CustomPagesFormRead(HTL_PAGE_ROOM, $roomid);
     }
 }
 if (!$roomid) {
     echo "<div align=\"center\"><h1>" . $_L['RM_error'] . "</h1></div>";
 } else {
     if ($action == $_L['BTN_update']) {
         echo "<div align=\"center\"><h1>" . $_L['RM_updatesuccess'] . "</h1></div>";
     } else {
         echo "<div align=\"center\"><h1>" . $_L['RM_addsuccess'] . "</h1></div>";
     }
 }
 /** After successfully saving the room details, the room amenities
コード例 #2
0
         $date_stopped = date('d/m/Y', strtotime(date("d/m/Y", mktime()) . " + 365 day"));
         //Room No. File Name
         $roomno_file = "roomno.txt";
         $roomno = 100;
         if (file_exists($roomno_file)) {
             $roomno = file_get_contents($roomno_file);
         }
         //Default Room URL
         $defurl = "http://www.example.com/image.jpg";
         $rateid = modify_rate(0, $ratecode, "Default Rate", 15, "F", 1, 1, 1, 1, 1, 0, $currency, $date_started, $date_stopped);
         modify_rateitem(0, $rateid, 1, 1, 16773247, 1, 1, $roomcost, 0);
         $roomtypeid = modify_roomtype(0, $roomtype, $roomtype, $rateid, $defurl);
         for ($i = 0; $i < $roomcount; $i++) {
             $add_roomno = $roomno + $i;
             $roomstatus = "V";
             $roomid = modify_room(0, $add_roomno, $roomtypeid, "", 1, 1, 1, 0, 0, 0, 1, $roomstatus, "", "", $rateid);
             if (isset($_POST['AMENITIES'])) {
                 $amenitylist = $_POST['AMENITIES'];
                 //print_r($amenitylist);
                 foreach ($amenitylist as $amenity) {
                     add_roomamenity($roomid, $amenity);
                 }
             }
         }
         $roomno = $roomno + 100;
         $fh = fopen($roomno_file, 'w');
         fwrite($fh, $roomno);
         fclose($fh);
     }
     break;
 case $_L['BTN_next']:
コード例 #3
0
ファイル: index.php プロジェクト: ATCS-BCA/bca-apps
                include "edit_room.php";
                exit;
            } else {
                if ($action == "edit_room") {
                    $choice = filter_input(INPUT_POST, "choice");
                    $rm_nbr = filter_input(INPUT_POST, "rm_nbr");
                    $rm_cap = filter_input(INPUT_POST, "rm_cap");
                    $rm_id = filter_input(INPUT_POST, "rm_id");
                    if ($choice == "Make Changes") {
                        $error_msg = "";
                        if (empty($rm_nbr)) {
                            $error_msg .= "A room number is required. <BR>";
                        }
                        if (empty($rm_cap)) {
                            $error_msg .= "A capacity for the room is required <BR>";
                        }
                        if ($error_msg != "") {
                            include "edit_room.php";
                            exit;
                        } else {
                            modify_room($rm_id, $rm_nbr, $rm_cap);
                        }
                    }
                }
            }
        }
    }
}
$rm_list = get_room_list();
include "view.php";
exit;
コード例 #4
0
ファイル: index.php プロジェクト: ATCS-BCA/bca-apps
        }
        $roomList = get_room_list();
        include 'room_list.php';
        break;
    case 'show_modify_room':
        $room_id = filter_input(INPUT_GET, 'room_id');
        $room = get_room($room_id);
        $room_nbr = $room['rm_nbr'];
        include 'room_modify.php';
        exit;
        break;
    case 'modify_room':
        $choice = filter_input(INPUT_POST, 'choice');
        $room_nbr = filter_input(INPUT_POST, 'room_nbr');
        $room_id = filter_input(INPUT_POST, 'room_id');
        modify_room($room_id, $room_nbr);
        $roomList = get_room_list();
        include 'room_list.php';
        exit;
        break;
    case 'delete_room':
        $room_id = filter_input(INPUT_GET, 'room_id');
        delete_room($room_id);
        $roomList = get_room_list();
        include 'room_list.php';
        exit;
        break;
    default:
        display_error('Unknown workshop action: ' . $action);
        break;
}