<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Media_Model.php'; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; switch ($_GET['option']) { // Upload case 1: $model = new Layout_Model(); $data = $backend->loadBackend(); $allowedExtensions = array("jpg", "JPG", "jpeg", "png"); $sizeLimit = 20 * 1024 * 1024; $uploader = new Media_Model($allowedExtensions, $sizeLimit); $savePath = $root . '/img-up/companies_pictures/original/'; $medium = $root . '/img-up/companies_pictures/logo-medium/'; $pre = 'logo-' . Tools::slugify($_POST['companyName']); $mediumWidth = 300; if ($result = $uploader->handleUpload($savePath, $pre)) { $uploader->getThumb($result['fileName'], $savePath, $medium, $mediumWidth, 'width', ''); $newData = getimagesize($medium . $result['fileName']); $wp = $newData[0]; $hp = $newData[1]; $lastId = 0; if ($newData) { if ($_POST['lastIdLogo'] > 0) { if ($model->updateCompanyLogo($_POST['lastIdLogo'], $result['fileName'])) { $lastId = $_POST['lastIdLogo']; } } else {
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Media_Model.php'; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; $model = new Layout_Model(); $data = $backend->loadBackend(); switch ($_GET['option']) { // get subcategories by category_id case 1: $subcategories = $model->getSubcategoriesByCategoryId($_POST['category']); if (sizeof($subcategories) > 0) { ?> <ul> <?php foreach ($subcategories as $subcategory) { ?> <li><a href="javascript: void(0);" id="sub_<?php echo $subcategory['subcategory_id']; ?> " subcategory="<?php echo $subcategory['subcategory_id']; ?> " ><?php echo $subcategory['name']; ?> </a></li> <?php }
$model = new Layout_Model(); if (!empty($_POST)) { if ($model->updateCategory($_POST)) { echo 1; } else { echo 0; } } break; case 4: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteCategory($_POST)) { echo 1; } else { echo 0; } } break; case 5: $model = new Layout_Model(); if (!empty($_POST)) { $lastSub = 0; if ($lastSub = $model->addSubcategory($_POST)) { echo $lastSub; } else { echo 0; } } break; }
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/views/Layout_View.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; $model = new Layout_Model(); $memberId = (int) $_POST['memberId']; switch ($_POST['opt']) { case 1: if ($tasks = $model->getPendingTasksByUser()) { echo Layout_View::listTasks($tasks); } else { ?> <div class="alert alert-dismissible alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Great! </strong> There are no pending tasks! </div> <?php } break; case 2: if ($tasks = $model->getTodayTasksByUser()) { echo Layout_View::listTasks($tasks); } else { ?> <div class="alert alert-dismissible alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Great! </strong> There are no tasks for today! </div>
<option value="<?php echo $s['District']; ?> "><?php echo $s['District']; ?> </option> <?php } } else { echo 0; } } break; case 2: $model = new Layout_Model(); if (!empty($_POST)) { $cities = $model->getCitiesByEstate($_POST['state']); if ($cities != '') { ?> <option value="0">Select City</option> <?php foreach ($cities as $c) { ?> <option value="<?php echo $c['Name']; ?> "><?php echo $c['Name']; ?> </option>
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/front/Layout_Model.php'; $model = new Layout_Model(); $pictures = $model->getGalleryBySection($_GET['section']); ?> <!DOCTYPE html> <html class='no-js' lang='en'> <head> <title>Villa Aqua Rental - Sections</title> <link rel="shortcut icon" href="favicon.ico" /> <link rel="icon" type="image/gif" href="/images/favicon.png" /> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Des"> <meta name="keywords" content="Key"> <meta name="author" content="Where to GO"> <meta name="generator" content="By my great hand" /> <meta property="og:type" content="website" /> <meta property="og:site_name" content="Villa Aqua Rental"/> <meta property="og:url" content="http://villaaqua.com/" /> <meta name="format-detection" content="telephone=no" /> <link rel='stylesheet' id='layerslider-css' href='/css/layerslider.css?ver=5.4.0' type='text/css' media='all' /> <link rel='stylesheet' id='contact-form-7-css' href='/css/styles.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='normalize-css' href='/css/normalize.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='bootstrap.min-css' href='/css/bootstrap.min.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='font-awesome.min-css' href='/css/font-awesome.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='icomoon-css' href='/css/icomoon.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='owl-carousel-css' href='/css/owl.carousel.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='jquery-fancybox-css' href='/css/jquery.fancybox.css?ver=2.0' type='text/css' media='all' />
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/views/Layout_View.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; $model = new Layout_Model(); $memberId = (int) $_POST['memberId']; switch ($_POST['opt']) { case 1: if ($rooms = $model->searchRooms($_POST)) { // echo "<pre>"; // var_dump($rooms); // echo "</pre>"; echo Layout_View::getRoomsList($rooms); } break; case 2: if ($memberId = $model->addMemberFromReservation($_POST)) { echo $memberId; } else { ?> <div class="alert alert-dismissible alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Great! </strong> There are no tasks for today! </div> <?php } break; case 3:
} break; // Publish // Publish case 'publish': $model = new Layout_Model(); if (!empty($_POST)) { $model->publishCompany($_POST['companyId'], $_POST['todo']); } break; // Close // Close case 'close': $model = new Layout_Model(); if (!empty($_POST)) { $model->closeCompany($_POST['companyId'], $_POST['todo']); } break; // Create // Create case 'create': $model = new Layout_Model(); if (!empty($_POST)) { $companyId = 0; $companyId = $model->createCompany($_POST['companyName']); if ($companyId > 0) { echo $companyId; } } break; }
case 'info': $model = new Layout_Model(); if (!empty($_POST)) { $model->updateMemberInfo($_POST); } break; // Email // Email case 'email': $model = new Layout_Model(); if (!empty($_POST)) { if ($_POST['emailId'] == 0) { $model->addMemberEmail($_POST); } else { $model->updateMemberEmail($_POST); } } break; // Phones // Phones case 'phone': $model = new Layout_Model(); if (!empty($_POST)) { if ($_POST['phoneId'] == 0) { $model->addMemberPhone($_POST); } else { $model->updateMemberPhone($_POST); } } break; }
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/views/Layout_View.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; $model = new Layout_Model(); $memberId = (int) $_POST['memberId']; switch ($_POST['opt']) { case 1: if ($memberId > 0) { if ($updateMember = $model->updateMember($_POST)) { echo str_pad($updateMember, 4, 0, STR_PAD_LEFT); } else { echo 0; } } else { if ($newMember = $model->addMember($_POST)) { echo str_pad($newMember, 4, 0, STR_PAD_LEFT); } else { echo 0; } } break; // E-mails // E-mails case 2: if ($_POST['memberId'] && $_POST['emailVal']) { if ($_POST['emailId'] > 0) { $model->updateMemberEmail($_POST);
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Media_Model.php'; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; switch ($_GET['option']) { // Update settings case 1: $model = new Layout_Model(); if (!empty($_POST)) { $videoInfo = array(); if ($videoInfo = $model->addVideo($_POST['video'])) { echo htmlspecialchars(json_encode($videoInfo), ENT_NOQUOTES); } else { echo 0; } } break; case 2: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteVideo($_POST['videoId'])) { echo 1; } else { echo 0; } } break; }
break; case 2: $model = new Layout_Model(); if (!empty($_POST)) { if ($info = $model->getLocationInfoById($_POST['locId'])) { $data['locationInfo'] = $info; echo htmlspecialchars(json_encode($data), ENT_NOQUOTES); } } break; case 3: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->updateLocation($_POST)) { echo 1; } else { echo 0; } } break; case 4: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteLocation($_POST)) { echo 1; } else { echo 0; } } break; }
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/views/Layout_View.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; $model = new Layout_Model(); $memberId = (int) $_POST['memberId']; switch ($_POST['opt']) { // Returns a list of available rooms depending on check-in & check-out case 1: if ($rooms = $model->searchRooms($_POST)) { echo Layout_View::getRoomsList($rooms); } break; // Add a new member when a reservation take place // Add a new member when a reservation take place case 2: if ($memberId = $model->addMemberFromReservation($_POST)) { echo $memberId; } break; // Add the reservation at the same time that the member is added // Add the reservation at the same time that the member is added case 3: $model->addReservation($_POST); break; // Add the reservation when the member is already created // Add the reservation when the member is already created case 4:
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Media_Model.php'; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; switch ($_GET['option']) { // Update settings case 1: $model = new Layout_Model(); if (!empty($_POST)) { $model->updateSettings($_POST); } break; }
$allowedExtensions = array("jpg", "JPG", "jpeg", "png"); $sizeLimit = 20 * 1024 * 1024; $uploader = new Media_Model($allowedExtensions, $sizeLimit); $savePath = $root . '/img-up/companies_pictures/original/'; $medium = $root . '/img-up/companies_pictures/galery/'; $pre = 'gallery-' . Tools::slugify($_POST['companyName']); $mediumWidth = 200; if ($result = $uploader->handleUpload($savePath, $pre)) { $uploader->getThumb($result['fileName'], $savePath, $medium, $mediumWidth, 'width', ''); $newData = getimagesize($medium . $result['fileName']); $wp = $newData[0]; $hp = $newData[1]; $lastId = 0; if ($newData) { $lastId = $model->addCompanyGallery($_POST['companyId'], $result['fileName']); } $data = array('success' => true, 'fileName' => $result['fileName'], 'wp' => $wp, 'hp' => $hp, 'lastId' => $lastId); echo htmlspecialchars(json_encode($data), ENT_NOQUOTES); } break; // Delete // Delete case 2: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteCompanyGallery($_POST['pictureId'])) { echo 1; } } break; }
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/back/Layout_Model.php'; require_once $root . '/views/Layout_View.php'; require_once $root . '/backends/admin-backend.php'; require_once $root . '/Framework/Tools.php'; $model = new Layout_Model(); $memberId = (int) $_POST['memberId']; switch ($_POST['opt']) { case 1: if ($model->addAgency($_POST['agency'])) { echo 1; } break; case 2: if ($agencies = $model->getAgencies()) { echo Layout_View::listAgencies($agencies); } break; default: break; }
<?php $root = $_SERVER['DOCUMENT_ROOT']; require_once $root . '/models/front/Layout_Model.php'; $model = new Layout_Model(); $pictures = $model->getGalleryBySection('Testimonials'); ?> <!DOCTYPE html> <html class='no-js' lang='en'> <head> <title>Villa Aqua Rental - Main Slider</title> <link rel="shortcut icon" href="favicon.ico" /> <link rel="icon" type="image/gif" href="/images/favicon.png" /> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Des"> <meta name="keywords" content="Key"> <meta name="author" content="Where to GO"> <meta name="generator" content="By my great hand" /> <meta property="og:type" content="website" /> <meta property="og:site_name" content="Villa Aqua Rental"/> <meta property="og:url" content="http://villaaqua.com/" /> <meta name="format-detection" content="telephone=no" /> <link rel='stylesheet' id='layerslider-css' href='/css/layerslider.css?ver=5.4.0' type='text/css' media='all' /> <link rel='stylesheet' id='contact-form-7-css' href='/css/styles.css?ver=4.2.2' type='text/css' media='all' /> <link rel='stylesheet' id='normalize-css' href='/css/normalize.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='bootstrap.min-css' href='/css/bootstrap.min.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='font-awesome.min-css' href='/css/font-awesome.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='icomoon-css' href='/css/icomoon.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='owl-carousel-css' href='/css/owl.carousel.css?ver=2.0' type='text/css' media='all' /> <link rel='stylesheet' id='jquery-fancybox-css' href='/css/jquery.fancybox.css?ver=2.0' type='text/css' media='all' />
$data = array('success' => true, 'fileName' => $result['fileName'], 'wp' => $wp, 'hp' => $hp, 'lastId' => $lastId); echo htmlspecialchars(json_encode($data), ENT_NOQUOTES); } break; // Delete // Delete case 2: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteGallery($_POST['pictureId'])) { echo 1; } } break; case 3: $model = new Layout_Model(); $allowedExtensions = array("jpg", "JPG", "jpeg", "png"); $sizeLimit = 20 * 1024 * 1024; $uploader = new Media_Model($allowedExtensions, $sizeLimit); $savePath = $root . '/images/media/original/'; $medium = $root . '/images/media/thumb/'; $pre = 'Villa-Aqua-' . Tools::slugify($_POST['sectionName']); $mediumWidth = 550; if ($result = $uploader->handleUpload($savePath, $pre)) { $uploader->getThumb($result['fileName'], $savePath, $medium, $mediumWidth, 'width', ''); $newData = getimagesize($medium . $result['fileName']); $wp = $newData[0]; $hp = $newData[1]; $lastId = 0; if ($newData) { $lastId = $model->addGallery($_POST['sectionName'], $result['fileName']);
$dstImageHeight = 370; $source = $root . 'img-up/main-gallery/original/' . $_POST['imgId']; $destination = $root . 'img-up/main-gallery/front/' . $_POST['imgId']; if ($model->cropImage($_POST, $dstWidth, $dstImageHeight, $source, $destination)) { if ($model->cropImage($model->getThumb($_POST['imgId'], $root . 'img-up/main-gallery/front/', $root . 'img-up/main-gallery/thumb/', 200, 'width', ''))) { echo '1'; } else { echo '0'; } } } break; // Update // Update case 3: $model = new Layout_Model(); if (!empty($_POST)) { $model->editSliderInfo($_POST); } break; // Update // Update case 4: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteSlider($_POST['sliderId'])) { echo 1; } } break; }
if (!empty($_POST)) { $model->closeCompany($_POST['companyId'], $_POST['todo']); } break; // Create // Create case 'create': $model = new Layout_Model(); if (!empty($_POST)) { $companyId = 0; $companyId = $model->createCompany($_POST['companyName']); if ($companyId > 0) { echo $companyId; } } break; case 'checkPromoted': $model = new Layout_Model(); if (!empty($_POST)) { echo $model->countCompanyPromoted(); } break; case 'promote': $model = new Layout_Model(); if (!empty($_POST)) { if ($model->promoteCompany($_POST['companyId'], $_POST['todo'])) { echo 1; } } break; }
echo htmlspecialchars(json_encode($data), ENT_NOQUOTES); } break; // Crop // Crop case 2: $model = new Media_Model(); $data = $backend->loadBackend(); if (!empty($_POST)) { $dstWidth = 640; $dstImageHeight = 255; $source = $root . '/img-up/companies_pictures/original/' . $_POST['imgId']; $destination = $root . '/img-up/companies_pictures/sliders/' . $_POST['imgId']; if ($model->cropImage($_POST, $dstWidth, $dstImageHeight, $source, $destination)) { echo '1'; } else { echo '0'; } } break; // Delete // Delete case 3: $model = new Layout_Model(); if (!empty($_POST)) { if ($model->deleteCompanySlider($_POST['sliderId'])) { echo 1; } } break; }