| Server IP : 104.21.21.239 / Your IP : 216.73.216.11 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/hotel-prod/public_html/mod/ |
Upload File : |
<?php include('_mod_security.php'); ?>
<?php
//form_prep('concierge_intake', 'basic_info');
$xform_uid = generate_random_string();
$_SESSION[$xform_uid] = true;
$action = "Add New";
$active_tab = 'basic_info';
$form_success = false;
if ($_POST['ajax_event_submitted'] == '1') :
form_reload_check();
if (isset($_POST['active_tab'])) :
$active_tab = $_POST['active_tab'];
else :
$active_tab = 'basic_info';
endif;
$ar_err = array();
if (empty($_POST['first_name'])) :
$ar_err['first_name'] = 'First name is required!';
$err_flag = true;
$err_tab = 'basic_info';
endif;
if (empty($_POST['last_name'])) :
$ar_err['last_name'] = 'Last name is required!';
$err_flag = true;
$err_tab = 'basic_info';
endif;
if (empty($_POST['title'])) :
$ar_err['title'] = 'Title is required!';
$err_flag = true;
$err_tab = 'basic_info';
endif;
if (empty($_POST['hotel_id'])) :
$ar_err['hotel_id'] = 'Hotel is required!';
$err_flag = true;
$err_tab = 'basic_info';
endif;
if (empty($_POST['primary_email'])) :
$ar_err['primary_email'] = 'Work email is required!';
$err_flag = true;
$err_tab = 'basic_info';
endif;
if (!$err_flag) :
$set = "title = ".$db->quote(trim($_POST['title'])).", ".
"first_name = ".$db->quote(trim($_POST['first_name'])).", ".
"last_name = ".$db->quote(trim($_POST['last_name'])).", ".
"primary_email = ".$db->quote(trim($_POST['primary_email'])).", ".
"secondary_email = ".$db->quote(trim($_POST['secondary_email'])).", ".
"work_phone = ".$db->quote(trim($_POST['work_phone'])).", ".
"cell_phone = ".$db->quote(trim($_POST['cell_phone'])).", ".
//"concierge_service = ".$db->quote(trim($_POST['concierge_service'])).", ".
"hotel_id = ".nz(trim($_POST['hotel_id']), '0').", ".
//"nycahc_member = ".nz(trim($_POST['nycahc_member']),'0').", ".
//"lcd = ".nz(trim($_POST['lcd']),'0').", ".
//"fyi = ".nz(trim($_POST['fyi']),'0').", ".
//"on_the_promenade = ".nz(trim($_POST['on_the_promenade']),'0').", ".
//"fyi_email = ".nz(trim($_POST['fyi_email']),'0').", ".
//"on_the_promenade_email = ".nz(trim($_POST['on_the_promenade_email']),'0').", ".
"status = ".nz(trim($_POST['status']),'1').", ".
"facebook = ".$db->quote(trim($_POST['facebook'])).", ".
"twitter = ".$db->quote(trim($_POST['twitter'])).", ".
"instagram = ".$db->quote(trim($_POST['instagram'])).", ".
//"comments = ".$db->quote(trim($_POST['comments'])).", ".
"update_date = '".date('Y-m-d H:i:s')."' ";
if ($action == 'Edit') :
/*
$sql = "UPDATE concierges_pending set ".$set.
"WHERE concierge_id = ".nz(trim($_REQUEST['id']), '0')." ";
$db->query($sql) or die('Database Error!');
//echo '==='.$sql.'===';
post_set_update();
*/
else :
if ($action == 'Add New') :
$sql = "INSERT INTO concierges_pending SET ".
"create_date = '".date('Y-m-d H:i:s')."', ".
$set;
//echo '==='.$sql.'===';
$db->query($sql) or die('Database Error!');
/*
$_REQUEST['id'] = last_id();
$_POST['concierge_id'] = $_REQUEST['id'];
post_set_create_update();
*/
endif;
endif;
$form_message = "Saved sucessfully!";
$form_success = true;
form_uid_reset();
else :
$active_tab = $err_tab;
$form_message = "Errors found!";
endif;
/*
else:
if ($action == 'Edit') :
$sql = "SELECT * FROM concierges_pending WHERE concierge_id = ".nz(trim($_REQUEST['id']), '0')." ";
$result = $db->query($sql) or die('Database Error!');
if ($result->rowCount() > 0) :
$row = $result->fetch(PDO::FETCH_OBJ);
$_POST['concierge_id'] = $row->concierge_id;
$_POST['title'] = $row->title;
$_POST['first_name'] = $row->first_name;
$_POST['last_name'] = $row->last_name;
$_POST['primary_email'] = $row->primary_email;
$_POST['secondary_email'] = $row->secondary_email;
$_POST['work_phone'] = $row->work_phone;
$_POST['cell_phone'] = $row->cell_phone;
$_POST['concierge_service'] = $row->concierge_service;
$_POST['hotel_id'] = $row->hotel_id;
$_POST['nycahc_member'] = $row->nycahc_member;
$_POST['lcd'] = $row->lcd;
$_POST['fyi'] = $row->fyi;
$_POST['on_the_promenade'] = $row->on_the_promenade;
$_POST['fyi_email'] = $row->fyi_email;
$_POST['on_the_promenade_email'] = $row->on_the_promenade_email;
$_POST['status'] = $row->status;
$_POST['facebook'] = $row->facebook;
$_POST['twitter'] = $row->twitter;
$_POST['instagram'] = $row->instagram;
$_POST['comments'] = $row->comments;
post_set_load_create_update();
else :
echo form_fatal_error('Invalid Operation!');
return;
endif;
else :
if (!empty($_GET['hotel_id'])) :
$_POST['hotel_id'] = $_REQUEST['hotel_id'];
endif;
$_POST['status'] = 1;
endif;
*/
endif;
?>
<script>
var active_page = '<?php echo $_REQUEST['IX']; ?>';
var active_tab = '';
update_header = function()
{
if ($("#first_name").val() > "" && $("#last_name").val() > "" )
{
$("#header_repeater").text(" - " + $("#first_name").val() + ' ' + $("#last_name").val());
}
}
$(document).ready(function()
{
switch_tab('<?php echo $active_tab; ?>');
update_header();
$(':input:not(.search)').change(function() {sheet_dirty = true; } );
}
)
</script>
<h1>Concierge Information Form</h1>
<?php echo form_message($form_message); ?>
<?php
if ($form_success) :
echo '<input type="button" value="Done" onclick="window.location.href=\'https://www.davlermedia.com\';" />';
return;
endif;
?>
<form style="" name="frm_concierge" id="frm_concierge" method="post" action="">
<input name="ajax_event_submitted" type="hidden" value="1" />
<input name="id" type="hidden" value="<?php echo $_REQUEST['id']; ?>" />
<input name="active_tab" id="active_tab" type="hidden" value="basic_info" />
<div class="tab_strip">
<?php
form_tab_header('basic_info', 'Basic Info', 'admin,eventmgr');
?>
</div>
<div class="cleardiv">
</div>
<div class="tab_content" id="tab_content_basic_info">
<div class="form_header">
Please enter your information and click "Submit"
</div>
<div class="input_column">
<?php
//form_field('concierge_id', 'text', 10, 0, false, false, true, '', '', 'concierge_id', 'Concierge ID');
form_field('first_name', 'text', 50, 0, true, false, false, '', '', 'first_name', 'First Name');
form_field('last_name', 'text', 50, 0, true, false, false, '', '', 'last_name', 'Last Name');
form_field('title', 'text', 50, 0, true, false, false, '', '', 'title', 'Title');
$sql = "SELECT hotel_id, hotel_name FROM hotels ORDER BY hotel_name ";
$result = $db->query($sql) or die('Database Error!');
$ar_hotels = $result->fetchAll(PDO::FETCH_KEY_PAIR);
form_field('hotel_id', 'select', 50, 0, true, false, false, '', '', 'hotel_id', 'Hotel', $ar_hotels);
//$ar_status = array('1'=>'Active', '0'=>'Inactive', '2'=>'In Transition', );
//form_field('status', 'radiogroup', 50, 0, false, false, false, '', '', 'status', 'Status', $ar_status);
?>
</div>
<div class="input_column">
<?php
form_field('primary_email', 'text', 50, 0, true, false, false, '', '', 'primary_email', 'Work Email');
form_field('secondary_email', 'text', 50, 0, false, false, false, '', '', 'secondary_email', 'Personal Email');
form_field('work_phone', 'text', 50, 0, false, false, false, '', '', 'work_phone', 'Work Phone');
form_field('cell_phone', 'text', 50, 0, false, false, false, '', '', 'cell_phone', 'Cell Phone');
//form_field('concierge_service', 'select', 50, 0, false, false, false, '', '', 'concierge_service', 'Concierge Service', APP_CONCIERGE_SERVICES);
form_field('facebook', 'text', 100, 0, false, false, false, '', '', 'facebook', 'Facebook');
form_field('twitter', 'text', 100, 0, false, false, false, '', '', 'twitter', 'Twitter');
form_field('instagram', 'text', 100, 0, false, false, false, '', '', 'instagram', 'Instagram');
?>
</div>
<?php /* ?>
<div class="input_column">
<?php
form_field('comments', 'textarea', 70, 9, false, false, false, '', '', 'comments', 'Comments');
form_field('nycahc_member', 'checkbox', 50, 0, false, false, false, '', '', 'nycahc_member', 'NYCAHC Member');
form_field('lcd', 'checkbox', 50, 0, false, false, false, '', '', 'lcd', 'LCD');
echo '<br /><br />';
form_field('fyi', 'checkbox', 50, 0, false, false, false, '', '', 'fyi', 'FYI');
form_field('on_the_promenade', 'checkbox', 50, 0, false, false, false, '', '', 'on_the_promenade', 'On The Promenade');
form_field('fyi_email', 'checkbox', 50, 0, false, false, false, '', '', 'fyi_email', 'FYI Email');
form_field('on_the_promenade_email', 'checkbox', 50, 0, false, false, false, '', '', 'on_the_promenade_email', 'On The Promenade Email');
?>
</div>
<?php */ ?>
</div>
<!-- -------------------------------------------------------------------------------------------------------------- -->
<?php
$strip_buttons = [
'save' => ['show' => true, 'caption' => 'Submit', 'js' => "sheet_dirty = false; this.form.submit();"],
'save_close' => ['show' => false, 'caption' => 'Save & Close', 'js' => "sheet_dirty = false; document.getElementById('xsubmit').value = this.value; this.form.submit();"],
'save_new' => ['show' => false, 'caption' => 'Save & New', 'js' => "sheet_dirty = false; document.getElementById('xsubmit').value = this.value; this.form.submit();"],
'cancel' => ['show' => true, 'caption' => 'Cancel', 'js' => "sheet_dirty = false; window.location.href='https://www.davlermedia.com';"],
];
form_button_strip('bottom', $strip_buttons, false);
?>
</form>