$lang = get_language(); load_language($lang); $logofile = Get_LogoFile(); access("guest"); //check if user is allowed to access this page $search = ""; $stype = 0; $agent = array(); if (isset($_GET['del']) && $_GET['del'] > 0) { if (is_ebridgeCustomer()) { include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_functions.php"; delete_advProfile($_GET['del']); } } if (isset($_GET['id']) && isset($_GET['action']) && $_GET['id'] > 0 && $_GET['action'] == "remove") { delete_guest($_GET['id']); } if (isset($_POST['Submit'])) { $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT); $action = $_POST['Submit']; switch ($action) { case 'List': return; break; case $_L['BTN_search']: //check if user is searching using name, payrollno, national id number or other fields $search = $_POST["search"]; $stype = 0; if (isset($_POST["optFind"])) { $stype = $_POST["optFind"]; }
$db->delete_guest_threads($vars['guest_id']); $t->assign('msg', "Guest deleted"); $t->assign('link', 'newsletter_guests.php'); $t->display("admin/newsletter_guest_saved.html"); } //////////////////// main //////////////////////////////////////// $vars = get_input_vars(); if ($vars['guest_id']) { $t->assign('guest_id', $vars['guest_id']); } if (isset($vars['start'])) { $start = $vars['start']; } switch ($vars['action']) { case 'create': create_guest($vars); break; case 'edit': display_edit_form(); break; case 'update': update_guest($vars); break; case 'delete': delete_guest(); break; default: display_guest_list(); display_form(); break; }