Exemple #1
0
function uploadRoomImageEdit($path)
{
    $pic = $_FILES['pic'];
    echo $pic;
    $upload_dir = DOC_ROOT . 'uploads/' . $path;
    $new_name = "roomista" . time() . "." . get_extension($pic['name']);
    Sessions::setRoomImage($new_name);
    if (move_uploaded_file($pic['tmp_name'], $upload_dir . $new_name)) {
        echo "done";
    }
}
Exemple #2
0
function updateHotelsStep_3()
{
    $hotelroomtype = new HotelRoomType();
    $_REQUEST['room_type_img'] = Sessions::getRoomImage();
    $hotelroomtype->setValues($_REQUEST);
    //$hotelroomtype->setRoomTypeImg();
    if ($hotelroomtype->newHotelRoomType()) {
        //INFO: Log
        //$temp_room_type = $_REQUEST;
        //$TransactionLog=new TransactionLog($temp_room_type['room_type_hotel_id'],Libs::getKey('hotel_sections','Room Types - Add'),'Insert',Sessions::getMemberId(),'hotel_room_types',$temp_room_type,'');
        //$TransactionLog->log();
        //$temp_room_type=null;
        //INFO: Log//
        $complete = new ProfileCompletion();
        $complete->setHotelStepId($_REQUEST['hotel_step_id']);
        $complete->setHotelStep1(1);
        $complete->updateProfileCompletionStep('4');
        echo $_REQUEST['hotel_step_id'];
        Sessions::setRoomImage("");
        Common::jsonSuccess("");
    } else {
        Common::jsonError("Error");
    }
}