Esempio n. 1
0
function addHotelFirstTime()
{
    $hotel = new Hotels();
    $members = new Members();
    $mailClass = new mailClass();
    $members->setMemberId(Sessions::getMemberId());
    $members->extractor($members->getMemberFromId());
    $hotel->setValues($_REQUEST);
    $hotel->setHotelSeoUrl($_REQUEST['seo']);
    $hotel_seo = $hotel->getHotelIdFromSeoName();
    if ($hotel_seo == 0) {
        $hotel_id = $hotel->addHotelFirstTime();
        if ($hotel_id) {
            //INFO: Log
            //$temp_hotel = $_REQUEST;
            //$TransactionLog=new TransactionLog($hotel_id,Libs::getKey('hotel_sections','Property Details'),'Insert',Sessions::getMemberId(),'hotels',$temp_hotel,'');
            //$TransactionLog->log();
            //$temp_hotel=null;
            //INFO: Log//
            $profilecomplete = new ProfileCompletion();
            $profilecomplete->setHotelStepHotelsId($hotel_id);
            $profilecomplete->setHotelStep1(1);
            $profilecomplete->newProfileCompletion();
            $mailClass->HotelRegistration($members->memberTitle(), $members->memberFirstName(), $members->memberLastName(), $members->memberEmail(), $_REQUEST['hotel_name'], $_REQUEST['hotel_email'], $_REQUEST['hotel_email']);
            $hotel = null;
        }
        echo $hotel_id;
    } else {
        echo "Failed";
    }
}
Esempio n. 2
0
function addHotelFirstTime()
{
    $hotel = new Hotels();
    $hotel->setValues($_REQUEST);
    $hotel->setHotelSeoUrl($_REQUEST['seo']);
    $hotel_id = $hotel->addHotelFirstTime();
    if ($hotel_id) {
        $profilecomplete = new ProfileCompletion();
        $profilecomplete->setHotelStepHotelsId($hotel_id);
        $profilecomplete->setHotelStep1(1);
        $profilecomplete->newProfileCompletion();
    }
    echo $hotel_id;
}