| Server IP : 172.67.201.108 / Your IP : 216.73.216.25 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/connections/mod/ |
Upload File : |
<?php include('_mod_security.php'); ?>
<?php
form_prep('venues', 'basic_info', 'frm_venue_submit', false);
$form_success = false;
if ($_POST['ajax_event_submitted'] == '1') :
form_prep_submit();
$ar_optional_fields = [
'title_2',
'first_name_2',
'last_name_2',
'contact_type_2',
'email_2',
'office_phone_2',
'cell_phone_2',
'accepts_texts_2',
'other_phone_2',
'preferred_phone_2',
];
$ar_exclusions = $ar_optional_fields;
$second_contact = false;
foreach ($_POST as $key => $value) :
if (in_array($key, $ar_optional_fields) && !empty($value)) :
$ar_exclusions = [];
$second_contact = true;
endif;
endforeach;
form_validate_all($ar_exclusions);
if (empty($_POST['captcha']) || $_SESSION['lcs_captcha_key_contactform'] != md5($_POST['captcha'])) :
$ar_err['captcha'] = 'Invalid verification!';
$err_flag = true;
$err_tab = 'basic_info';
endif;
if (!$err_flag) :
if (spam_count_exceeded(APP_SPAM_SUBMISSION_LIMIT, 'venues')) :
echo '<h1>Number of submissions has exceeded allowable threshold.</h1>';
return;
endif;
try {
$db->beginTransaction();
$submitter_info =
"submitted_by = " . $db->quote($_POST['submitted_by']) . ", " .
"submitted_ip = " . $db->quote(get_client_ip()) . ", " .
"status = 2, ";
$set = sql_set_create() . sql_set_update() . $submitter_info . form_generate_set();
$sql = "INSERT INTO venues SET " . $set;
$db->query($sql);
$last_venue_id = last_id();
//*********** First contact ***********
$set = sql_set_create() . sql_set_update() . $submitter_info .
"venue_id = " . nz($last_venue_id, 0) . ", ".
"contact_type = " . $db->quote($_POST['contact_type_1']) . ", " .
"title = " . $db->quote($_POST['title_1']) . ", " .
"first_name = " . $db->quote($_POST['first_name_1']) . ", " .
"last_name = " . $db->quote($_POST['last_name_1']) . ", " .
"email = " . $db->quote($_POST['email_1']) . ", " .
"office_phone = " . $db->quote($_POST['office_phone_1']) . ", " .
"cell_phone = " . $db->quote($_POST['cell_phone_1']) . ", " .
"other_phone = " . $db->quote($_POST['other_phone_1']) . ", " .
"preferred_phone = " . $db->quote($_POST['preferred_phone_1']) . ", " .
"accepts_texts = " . nz($_POST['accepts_texts_1'], 0) . "; ";
$sql = "INSERT INTO contacts SET " . $set;
$db->query($sql);
//*********** Second contact ***********
if ($second_contact) :
$set = sql_set_create() . sql_set_update() . $submitter_info .
"venue_id = " . nz($last_venue_id, 0) . ", ".
"contact_type = " . $db->quote($_POST['contact_type_2']) . ", " .
"title = " . $db->quote($_POST['title_2']) . ", " .
"first_name = " . $db->quote($_POST['first_name_2']) . ", " .
"last_name = " . $db->quote($_POST['last_name_2']) . ", " .
"email = " . $db->quote($_POST['email_2']) . ", " .
"office_phone = " . $db->quote($_POST['office_phone_2']) . ", " .
"cell_phone = " . $db->quote($_POST['cell_phone_2']) . ", " .
"other_phone = " . $db->quote($_POST['other_phone_2']) . ", " .
"preferred_phone = " . $db->quote($_POST['preferred_phone_2']) . ", " .
"accepts_texts = " . nz($_POST['accepts_texts_2'], 0) . "; ";
$sql = "INSERT INTO contacts SET " . $set;
$db->query($sql);
endif;
$db->commit();
} catch(Exception $e) {
db_err_rollback($e);
}
form_success();
$form_success = true;
$mail_body = "
<p><b>{$_POST['submitted_by']}</b> has submitted venue and contact information for <b>{$_POST['name']}</b>.</p>
<p>The following contacts have also been submitted:</p>
<p><b>{$_POST['contact_type_1']} - {$_POST['first_name_1']} {$_POST['last_name_1']}</b></p>
<p><b>{$_POST['contact_type_2']} - {$_POST['first_name_2']} {$_POST['last_name_2']}</b></p>
<p>Please review at <a href=\"" . APP_BASE_SECURE . "admin\">" . APP_BASE_SECURE . "admin</a>, then TOP MENU - VENUES - PENDING VENUES and either mark ACTIVE or delete the venue and all contacts for this venue.</p>
<p>This is an auto-generated email, replies will be ignored.</p?
";
send_mail('Online Venue Submission', APP_MAIL_ADMIN, '', APP_MAIL_BCC, $mail_body);
else :
$active_tab = $err_tab;
$form_message = "Errors found!";
endif;
else :
$_POST['state'] = 'NY';
$_POST['city'] = 'New York';
endif;
$ar_phone_types = [
'office_phone' => 'Special Reservation Phone Number',
'cell_phone' => 'Contact\'s Direct Phone (cell)',
'other_phone' => 'Other',
];
?>
<script>
var active_page = '<?php echo $_REQUEST['IX']; ?>';
var active_tab = '';
$(document).ready(function() {
switch_tab('<?php echo $active_tab; ?>');
$(':input:not(.search)').change(function() {
sheet_dirty = true;
});
})
</script>
<?php
if ($form_success) :
?>
<div class="form_instructions">
<p>
Your information has been received and will be reviewed for Concierge Connections. Thank you
</p>
</div>
<?php
return;
endif;
?>
<div class="form_instructions">
<p>
Concierges requested direct contacts to make special reservations for their VIPs and groups. This <strong><em>Concierge Connections</em></strong> database will be available at their desks.
</p>
<p>
If you want to be included, please complete this form below.
<p>
</div>
<?php echo form_message($form_message); ?>
<form name="frm_venue_submit" id="frm_venue_submit" 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="cleardiv">
</div>
<?php form_tab_start('basic_info', 'Please fill out the form below'); ?>
<div class="input_column">
<div class="form_header">
Venue Information
</div>
<?php
//form_field('id', 'text', 10, 0, false, false, true, '', '', 'id', 'Venue ID');
form_field('name', 'text', 100, 0, true, false, false, '', '', 'name', 'Venue Name');
$sql = "SELECT id, description FROM categories WHERE active = 1 ORDER BY description ";
$result = $db->query($sql) or die('Database Error!');
$ar_categories = $result->fetchAll(PDO::FETCH_KEY_PAIR);
form_field('category_id', 'select', 50, 0, true, false, false, '', '', 'category_id', 'Category', $ar_categories);
form_field('street', 'text', 75, 0, true, false, false, '', '', 'street', 'Street');
form_field('city', 'text', 50, 0, true, false, false, '', '', 'city', 'City');
$sql = "SELECT state, CONCAT((CASE country_sort_code WHEN 1 THEN '' WHEN 2 THEN 'Canada - ' END), state_name) AS country_state FROM states WHERE country_sort_code IN (1) ORDER BY country_sort_code, state_name ";
$result = $db->query($sql) or die('Database Error!');
$ar_states = $result->fetchAll(PDO::FETCH_KEY_PAIR);
form_field('state', 'select', 50, 0, true, false, false, '', '', 'state', 'State', $ar_states);
form_field('zip', 'text', 15, 0, true, false, false, '', '', 'zip', 'Zip Code');
form_field('main_phone', 'text', 100, 0, false, false, false, '', '', 'main_phone', 'Main Phone');
form_field('website', 'text', 100, 0, false, false, false, '', '', 'website', 'Website');
form_field('reservation_link', 'text', 200, 0, false, false, false, '', '', 'reservation_link', 'Direct Reservation Link (Resy, OpenTable, etc.)');
form_field('comments', 'textarea', 60, 5, false, false, false, '', '', 'comments', 'Special Instructions');
?>
</div>
<div class="input_column">
<div class="form_header">
Contact Person 1
</div>
<?php
form_field('first_name_1', 'text', 100, 0, true, false, false, '', '', '', 'First Name');
form_field('last_name_1', 'text', 100, 0, true, false, false, '', '', '', 'Last Name');
form_field('title_1', 'text', 50, 0, true, false, false, '', '', '', 'Title');
form_field('contact_type_1', 'select', 50, 0, true, false, false, '', '', '', 'Contact Type', APP_CONTACT_TYPES);
form_field('email_1', 'text', 50, 0, true, false, false, '', '', '', 'Email', [], '', '', '', 'email');
form_field('office_phone_1', 'text', 50, 0, true, false, false, '', '', '', 'Special Reservation Phone Number');
form_field('cell_phone_1', 'text', 50, 0, true, false, false, '', '', '', 'Contact\'s Direct Phone (cell)');
form_field('accepts_texts_1', 'checkbox', 50, 0, false, false, false, '', '', '', 'Accepts Texts');
form_field('other_phone_1', 'text', 50, 0, false, false, false, '', '', '', 'Other Phone');
form_field('preferred_phone_1', 'select', 50, 0, false, false, false, '', '', '', 'Preferred Phone', $ar_phone_types);
?>
</div>
<div class="input_column">
<div class="form_header">
Contact Person 2
</div>
<?php
form_field('first_name_2', 'text', 100, 0, true, false, false, '', '', '', 'First Name');
form_field('last_name_2', 'text', 100, 0, true, false, false, '', '', '', 'Last Name');
form_field('title_2', 'text', 50, 0, true, false, false, '', '', '', 'Title');
form_field('contact_type_2', 'select', 50, 0, true, false, false, '', '', '', 'Contact Type', APP_CONTACT_TYPES);
form_field('email_2', 'text', 50, 0, true, false, false, '', '', '', 'Email', [], '', '', '', 'email');
form_field('office_phone_2', 'text', 50, 0, true, false, false, '', '', '', 'Special Reservation Phone Number');
form_field('cell_phone_2', 'text', 50, 0, true, false, false, '', '', '', 'Contact\'s Direct Phone (cell)');
form_field('accepts_texts_2', 'checkbox', 50, 0, false, false, false, '', '', '', 'Accepts Texts');
form_field('other_phone_2', 'text', 50, 0, false, false, false, '', '', '', 'Other Phone');
form_field('preferred_phone_2', 'select', 50, 0, false, false, false, '', '', '', 'Preferred Phone', $ar_phone_types);
?>
</div>
<div class="cleardiv">
</div>
<hr/>
<div class="input_column">
<?php
form_field('submitted_by', 'text', 50, 0, true, false, false, '', '', '', 'Submitter Name');
echo '<div style="width:45%; min-width:140px; display:inline-block; margin-right:5px;">';
form_field('captcha', 'text', 15, 0, true, false, false, '', '', '', 'Verification Code', null, '', '', 'If you can\'t read the verification code, click the <b>Reload</b> icon.');
echo '</div>';
echo '<div style="width:48%; min-width:140px; display:inline-block; vertical-align:top; margin-top:22px;">';
echo '<img id="contact_captcha" class="captcha" style="vertical-align:middle;" align="middle" src="ajax.php?call=_captcha&captcha_type=contactform" />';
echo '<img style="vertical-align:middle; cursor:pointer;" align="middle" src="img/reload_icon_gray.png" onclick="reload_captcha(\'contact_captcha\', \'contactform\');" />';
echo '</div>';
?>
</div>
<?php form_tab_end(); ?>
<!-- -------------------------------------------------------------------------------------------------------------- -->
<?php form_button_strip('bottom',[
'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' => false, 'caption' => 'Cancel', 'js' => "sheet_dirty = false; appstack_pop();"],
] , false, 'center'); ?>
</form>