| Server IP : 104.21.21.239 / Your IP : 216.73.216.37 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-dev/public_html/ |
Upload File : |
<?php
//error_reporting(E_ALL);
//error_reporting(0);
define('RSVP_IP_LIMITER', 3);
require_once('mod/_sanitize.php');
//header("HTTP/1.1 202 Accepted");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, proxy-revalidate, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Cache-Control: max-age=10000000, s-maxage=1000000");
header("Pragma: no-cache");
session_start();
include_once('config.php');
date_default_timezone_set(APP_TIMEZONE);
try {
$db = new PDO(DB_CONNECT_STRING, DB_USER, DB_PWD);
} catch (Exception $e) {
die('Could not connect: ' . 'Database Error!');
}
$sql_tz = "SET time_zone = '".APP_TIMEZONE."'";
$db->query($sql_tz);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
require_once('mod/_functions.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
if ((isset($_SERVER['HTTP_X_MOZ'])) && ($_SERVER['HTTP_X_MOZ'] == 'prefetch')) :
// This is a prefetch request. Block it.
header('HTTP/1.0 403 Forbidden');
echo '403: Forbidden<br><br>Prefetching not allowed here.';
die();
endif;
?>
<!--<link type="text/css" href="css/south-street/jquery-ui-1.8.1.custom.css" rel="stylesheet" />-->
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="css/rsvp.css?ver=<?php echo filemtime(__DIR__.'/css/rsvp.css') ?>" type="text/css" />
<link rel="stylesheet" href="css/datePicker.css?ver=<?php echo filemtime(__DIR__.'/css/datePicker.css') ?>" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="description" content="Davler Media Group - City Guide Event RSVP" />
<meta name="keywords" content="Davler,Media,Group,City,Guide,Event,RSVP" />
<title>City Guide | Event RSVP</title>
<script type="text/javascript" src="js/jquery-1.11.2.min.js?ver=<?php echo filemtime(__DIR__.'/js/jquery-1.11.2.min.js') ?>"></script>
<script type="text/javascript" src="js/jquery-migrate-1.2.1.min.js?ver=<?php echo filemtime(__DIR__.'/js/jquery-migrate-1.2.1.min.js') ?>"></script>
<script type="text/javascript" src="js/jquery.form.js?ver=<?php echo filemtime(__DIR__.'/js/jquery.form.js') ?>"></script>
<script type="text/javascript" src="js/jquery.ui.touch-punch.min.js?ver=<?php echo filemtime(__DIR__.'/js/jquery.ui.touch-punch.min.js') ?>"></script>
<script type="text/javascript" src="js/date.js?ver=<?php echo filemtime(__DIR__.'/js/date.js') ?>"></script>
<script type="text/javascript" src="js/jquery.datePicker.js?ver=<?php echo filemtime(__DIR__.'/js/jquery.datePicker.js') ?>"></script>
<?php
if (empty($_GET['event'])) :
die('Not Authorized!');
endif;
$_GET['event'] = intval($_GET['event']);
$sql = "SELECT * FROM events WHERE event_id = ".nz(trim($_GET['event'] / APP_PRIME_NUMBER), '0')." AND (master_event_id IS NULL OR master_event_id <= 0) ";
$result_echk = $db->query($sql) or die('Database Error!');
if ($result_echk->rowCount() < 1) :
die('Not Authorized!');
endif;
$row_echk = $result_echk->fetch(PDO::FETCH_OBJ);
$invalid_unauthorized_text = !empty($row_echk->online_rsvp_invalid_unauthorized_text) ? nl2br($row_echk->online_rsvp_invalid_unauthorized_text) : 'Not Authorized!';
$sql = "SELECT *,
(COALESCE((SELECT SUM(IF(rsvp_1 = 1,nbr_of_guests,0)) FROM events_concierges ec WHERE ec.event_id = e.event_id), 0)
+ COALESCE((SELECT SUM(IF(rsvp_1 = 1,nbr_of_guests,0)) FROM events_guests eg WHERE eg.event_id = e.event_id), 0)) AS nbr_rsvp
FROM events e WHERE e.event_id = ".nz(trim($_GET['event'] / APP_PRIME_NUMBER), '0')." AND (e.master_event_id IS NULL OR e.master_event_id <= 0) AND e.online_rsvp_enabled = 1 AND e.online_rsvp_expires >= CURDATE() ";
$result_e = $db->query($sql) or die('Database Error!');
if ($result_e->rowCount() < 1) :
die($invalid_unauthorized_text);
endif;
$ar_err = [];
$row_e = $result_e->fetch(PDO::FETCH_OBJ);
$waitlist = 0;
$waitlist2 = 0;
if ($row_e->master_event != 1 && $row_e->online_rsvp_enforce_capacity_limit == 1 && $row_e->nbr_rsvp >= $row_e->capacity_1) :
if ($row_e->online_rsvp_capacity_limit_waitlist == 1) :
$waitlist = 1;
else :
echo '<h1>Sorry - capacity for this event has been exceeded!</h1>';
die;
endif;
endif;
if ($row_e->master_event == 1) :
$sql = "SELECT * FROM events e WHERE (event_id = ".$row_e->event_id." OR master_event_id = ".$row_e->event_id.") AND event_date_time >= NOW()
AND IF(e.online_rsvp_enforce_capacity_limit = 1,
IF(
COALESCE((SELECT SUM(IF(rsvp_1 = 1,nbr_of_guests,0)) FROM events_concierges ec WHERE ec.event_id = e.event_id), 0)
+ COALESCE((SELECT SUM(IF(rsvp_1 = 1,nbr_of_guests,0)) FROM events_guests eg WHERE eg.event_id = e.event_id), 0)
>= e.capacity_1, false, true
)
, true)
ORDER BY event_date_time ASC ";
$result_l = $db->query($sql) or die('Database Error!');
endif;
$unauthorized_text = !empty($row_e->online_rsvp_unauthorized_text) ? nl2br($row_e->online_rsvp_unauthorized_text) : 'Not Authorized!';
$rsvp_title = 'RSVP for ';
if (!empty($_GET['ical'])) :
$rsvp_type = 'ical';
$rsvp_title = 'Add to my calendar - ';
elseif (!empty($_GET['email']) && empty($_GET['assoc'])) :
//******** Concierges with email ********
$rsvp_type = 'concierge_email';
$sql = "SELECT DISTINCT c.*, h.hotel_name FROM concierges c LEFT OUTER JOIN hotels h ON (c.hotel_id = h.hotel_id) WHERE c.status <> 0 AND (c.primary_email = ".$db->quote(trim($_GET['email']))." OR c.secondary_email = ".$db->quote(trim($_GET['email']))." OR c.email_3 = ".$db->quote(trim($_GET['email']))." OR c.email_4 = ".$db->quote(trim($_GET['email'])).") ";
$result_c = $db->query($sql) or die('Database Error!');
if ($result_c->rowCount() > 0) :
if ($_POST['submitted'] == '1') :
if ($row_e->online_rsvp_require_cell_phone == 1) :
form_validate('cell_phone', 'string', true);
endif;
if (!$err_flag) :
$_POST['concierge_id'] = intval($_POST['concierge_id']);
$concierge_id = nz(trim($_POST['concierge_id'] / APP_PRIME_NUMBER), '0');
$sql = "SELECT c.* FROM concierges c WHERE concierge_id = ".$concierge_id." AND c.status <> 0 AND (c.primary_email = ".$db->quote(trim($_GET['email']))." OR c.secondary_email = ".$db->quote(trim($_GET['email']))." OR c.email_3 = ".$db->quote(trim($_GET['email']))." OR c.email_4 = ".$db->quote(trim($_GET['email'])).") ";
$result_valid = $db->query($sql) or die('Database Error!');
if ($result_valid->rowCount() <> 1) :
die($unauthorized_text);
endif;
$row_valid = $result_valid->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT * FROM events_concierges WHERE (event_id = ".$row_e->event_id." OR event_id IN (SELECT event_id FROM events WHERE master_event_id = ".$row_e->event_id.")) AND concierge_id = ".$concierge_id." ";
$result_dup = $db->query($sql) or die('Database Error!');
if ($result_dup->rowCount() > 0) :
echo '<h1>You have already RSVP\'d for this event!</h1>';
return;
endif;
if ($row_e->online_rsvp_require_cell_phone == 1) :
$sql = "UPDATE concierges SET ".
"cell_phone = " . $db->quote($_POST['cell_phone']) . " ".
"WHERE concierge_id = " . $concierge_id . " ";
$db->query($sql) or die('Database Error!');
endif;
$nbr_guests = 1;
if ($_POST['guest_option'] == 'Y') :
$nbr_guests = 2;
endif;
$rsvp2 = 0;
if (!empty($row_e->event_venue_2)) :
$rsvp2 = 1;
$waitlist2 = $waitlist;
endif;
$sql = "INSERT INTO events_concierges (event_id, concierge_id, rsvp_1, attended_1, wait_1, rsvp_2, attended_2, wait_2, nbr_of_guests, guest_name, corrections, external_ip, rsvp_date_time) VALUES (".
nz($_POST['event_id'], '0') / APP_PRIME_NUMBER.", $concierge_id, 1, 1, $waitlist, $rsvp2, $rsvp2, $waitlist2, $nbr_guests, ".
$db->quote($_POST['guest_name']) . ', ' . $db->quote($_POST['corrections']).", ".
$db->quote(get_client_ip()).", ".
$db->quote(date('Y-m-d H:i:s')).
")";
//echo $sql;
$db->query($sql) or die('Database Error!');
if ($waitlist) :
echo "<h1>Thanks for RSVPing to {$row_e->event_name}</h1>";
echo '<h2>Presently it is filled, so you are on the wait list. Often spots will open up and we will send you a confirmation if there is a space available.</h2>';
else :
echo '<h1>Thank you for your RSVP!</h1>';
if ($row_e->autoresponder_send && !empty($row_e->autoresponder_subject) && !empty($row_e->autoresponder_text)) :
send_mail($row_e->autoresponder_subject, trim($_GET['email']), '', $row_e->autoresponder_bcc, $row_e->autoresponder_text, [], $row_valid);
endif;
endif;
return;
endif;
endif;
else :
die($unauthorized_text);
endif;
elseif (!empty($_GET['assoc']) && $row_e->online_rsvp_allow_association_guests) :
//************* Association Guests ****************
if (!empty($_GET['email'])) :
$sql = "SELECT DISTINCT g.* FROM guests g JOIN associations a ON (g.association_id = a.association_id) ".
" WHERE g.active = 1 AND a.active = 1 AND g.email = ".$db->quote(trim($_GET['email'])).
" AND a.name = ".$db->quote(trim($_GET['assoc']));
$result_g = $db->query($sql) or die('Database Error!');
if ($result_g->rowCount() > 0) :
$rsvp_type = 'guest_email';
elseif ($row_e->online_rsvp_allow_association_guests_new) :
$rsvp_type = 'guest_no_email';
$_POST['email'] = $_GET['email'];
else :
die($unauthorized_text);
endif;
elseif ($row_e->online_rsvp_allow_association_guests_new) :
$rsvp_type = 'guest_no_email';
else :
die($invalid_unauthorized_text);
endif;
if ($rsvp_type == 'guest_email') :
//******** Guests with email ********
if ($_POST['submitted'] == '1') :
$_POST['guest_id'] = intval($_POST['guest_id']);
$guest_id = nz(trim($_POST['guest_id'] / APP_PRIME_NUMBER), '0');
$sql = "SELECT g.* FROM guests g WHERE guest_id = ".$guest_id." AND g.active = 1 AND g.email = ".$db->quote(trim($_GET['email']))." ";
$result_valid = $db->query($sql) or die('Database Error!');
if ($result_valid->rowCount() <> 1) :
die($unauthorized_text);
endif;
$row_valid = $result_valid->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT * FROM events_guests WHERE (event_id = ".$row_e->event_id." OR event_id IN (SELECT event_id FROM events WHERE master_event_id = ".$row_e->event_id.")) AND guest_id = ".$guest_id." ";
$result_dup = $db->query($sql) or die('Database Error!');
if ($result_dup->rowCount() > 0) :
echo '<h1>You have already RSVP\'d for this event!</h1>';
return;
endif;
$nbr_guests = 1;
if ($_POST['guest_option'] == 'Y') :
$nbr_guests = 2;
endif;
$rsvp2 = 0;
if (!empty($row_e->event_venue_2)) :
$rsvp2 = 1;
$waitlist2 = $waitlist;
endif;
$sql = "INSERT INTO events_guests (event_id, guest_id, rsvp_1, attended_1, wait_1, rsvp_2, attended_2, wait_2, nbr_of_guests, guest_name, external_ip, rsvp_date_time) VALUES (".
nz($_POST['event_id'], '0') / APP_PRIME_NUMBER.", $guest_id, 1, 1, $waitlist, $rsvp2, $rsvp2, $waitlist2, $nbr_guests, ".
$db->quote($_POST['guest_name']).", ".
$db->quote(get_client_ip()).", ".
$db->quote(date('Y-m-d H:i:s')).
" )";
//echo $sql;
$db->query($sql) or die('Database Error!');
if ($waitlist) :
echo "<h1>Thanks for RSVPing to {$row_e->event_name}</h1>";
echo '<h2>Presently it is filled, so you are on the wait list. Often spots will open up and we will send you a confirmation if there is a space available.</h2>';
else :
echo '<h1>Thank you for your RSVP!</h1>';
if ($row_e->autoresponder_send && !empty($row_e->autoresponder_subject) && !empty($row_e->autoresponder_text)) :
send_mail($row_e->autoresponder_subject, trim($_GET['email']), '', $row_e->autoresponder_bcc, $row_e->autoresponder_text, [], $row_valid);
endif;
endif;
return;
endif;
elseif ($rsvp_type == 'guest_no_email') :
//******** Guests without email ********
if ($_POST['submitted'] == '1') :
form_validate('first_name', 'string', true);
form_validate('last_name', 'string', true);
form_validate('phone', 'string', true);
form_validate('email', 'email', true);
form_validate('company', 'string', true);
form_validate('g-recaptcha-response', 'captcha', true);
if (!$err_flag) :
$sql = "SELECT * FROM events_guests WHERE (event_id = ".$row_e->event_id." OR event_id IN (SELECT event_id FROM events WHERE master_event_id = ".$row_e->event_id.")) AND external_ip = ".$db->quote(get_client_ip())." ";
$result_valid = $db->query($sql) or die('Database Error!');
if ($result_valid->rowCount() >= RSVP_IP_LIMITER) :
die('Not Authorized');
endif;
$sql = "SELECT * FROM associations WHERE active = 1 AND name = ".$db->quote($_GET['assoc'])." ";
$result_a = $db->query($sql) or die('Database Error!');
if ($result_a->rowCount() < 1) :
die('Not Authorized');
endif;
$row_a = $result_a->fetch(PDO::FETCH_OBJ);
$sql = "INSERT INTO guests (first_name, last_name, phone, email, company, association_id, active) VALUES (".
$db->quote($_POST['first_name']).", ".
$db->quote($_POST['last_name']).", ".
$db->quote($_POST['phone']).", ".
$db->quote($_POST['email']).", ".
$db->quote($_POST['company']).", ".
nz($row_a->association_id, '0').", ".
"1 ".
" )";
//echo $sql;
$db->query($sql) or die('Database Error!');
$guest_id = $db->lastInsertId();
$nbr_guests = 1;
if ($_POST['guest_option'] == 'Y') :
$nbr_guests = 2;
endif;
$rsvp2 = 0;
if (!empty($row_e->event_venue_2)) :
$rsvp2 = 1;
$waitlist2 = $waitlist;
endif;
$sql = "INSERT INTO events_guests (event_id, guest_id, rsvp_1, attended_1, wait_1, rsvp_2, attended_2, wait_2, nbr_of_guests, guest_name, external_ip, rsvp_date_time) VALUES (".
nz($_POST['event_id'], '0') / APP_PRIME_NUMBER.", $guest_id, 1, 1, $waitlist, $rsvp2, $rsvp2, $waitlist2, $nbr_guests, ".
$db->quote($_POST['guest_name']).", ".
$db->quote(get_client_ip()).", ".
$db->quote(date('Y-m-d H:i:s')).
" )";
//echo $sql;
$db->query($sql) or die('Database Error!');
if ($waitlist) :
echo "<h1>Thanks for RSVPing to {$row_e->event_name}</h1>";
echo '<h2>Presently it is filled, so you are on the wait list. Often spots will open up and we will send you a confirmation if there is a space available.</h2>';
else :
echo '<h1>Thank you for your RSVP!</h1>';
if ($row_e->autoresponder_send && !empty($row_e->autoresponder_subject) && !empty($row_e->autoresponder_text)) :
send_mail($row_e->autoresponder_subject, trim($_GET['email']), '', $row_e->autoresponder_bcc, $row_e->autoresponder_text, [], $_POST);
endif;
endif;
return;
endif;
endif;
else :
die('Not Authorized!');
endif;
endif;
?>
<script type="text/javascript">
var ar_c = [];
load_concierge = function(ix) {
//alert(ix);
$('#concierge_id').val(ar_c[ix].concierge_id);
$('#td_first_name').html(ar_c[ix].first_name);
$('#td_last_name').html(ar_c[ix].last_name);
$('#td_work_phone').html(ar_c[ix].work_phone);
$('#td_cell_phone').text(ar_c[ix].cell_phone);
$('#cell_phone').val(ar_c[ix].cell_phone);
$('#td_primary_email').html(ar_c[ix].primary_email);
$('#td_hotel_name').html(ar_c[ix].hotel_name);
if (ar_c[ix].cell_phone > ' ') {
$('#td_cell_phone').show();
$('#cell_phone').hide();
} else {
$('#td_cell_phone').hide();
$('#cell_phone').show();
}
}
var ar_g = [];
load_guest = function(ix) {
//alert(ix);
$('#guest_id').val(ar_g[ix].guest_id);
$('#td_first_name').html(ar_g[ix].first_name);
$('#td_last_name').html(ar_g[ix].last_name);
$('#td_phone').html(ar_g[ix].phone);
$('#td_email').html(ar_g[ix].email);
$('#td_company').html(ar_g[ix].company);
}
guest_toggle = function() {
if ($('#guest_option option:selected').val() == 'Y') {
$('#row_guest_name').show();
} else {
$('#row_guest_name').hide();
$('#guest_name').val('');
}
}
</script>
</head>
<body>
<div class="main">
<img src="rsvp_artwork/<?php echo $row_e->online_rsvp_artwork; ?>" class="artwork" />
<br />
<h1><?=$rsvp_title . $row_e->event_name ?></h1>
<h2><?=date('l, F j, Y, g:i a', strtotime($row_e->event_date_time)) ?></h2>
<?php if ($rsvp_type == 'ical') : ?>
<?php elseif ($rsvp_type == 'concierge_email') : ?>
<form name="frm_event" id="frm_event" method="post" enctype="multipart/form-data" action="">
<input name="submitted" type="hidden" value="1" />
<input name="concierge_id" id="concierge_id" type="hidden" value="0" />
<?php
select_master($row_e, $result_l);
?>
Please select your name:
<select name="concierge" id="concierge" class="wide" onchange="load_concierge($(this).val());" >
<?php
$i = 0;
while ($row_c = $result_c->fetch(PDO::FETCH_OBJ)) :
$i = $i + 1;
?>
<script>
ar_c[<?php echo $i; ?>] = {
concierge_id : '<?php echo $row_c->concierge_id * APP_PRIME_NUMBER; ?>',
first_name : '<?php echo $row_c->first_name; ?>',
last_name : '<?php echo $row_c->last_name; ?>',
work_phone : '<?php echo $row_c->work_phone; ?>',
cell_phone : '<?php echo $row_c->cell_phone; ?>',
primary_email : '<?php echo $row_c->primary_email; ?>',
hotel_name : '<?php echo $row_c->hotel_name; ?>'
};
</script>
<option value="<?php echo $i; ?>" <?php if ($i == $_POST['concierge']) echo ' selected="selected" '; ?> ><?php echo $row_c->first_name.' '.$row_c->last_name; ?></option>
<?php
endwhile;
?>
</select>
<table border="0" background="0" class="rsvp">
<tr>
<td>
First Name:
</td>
<td class="data" id="td_first_name">
<?php echo $row_c->first_name; ?>
</td>
<td>
Last Name:
</td>
<td class="data" id="td_last_name">
<?php echo $row_c->last_name; ?>
</td>
</tr>
<tr>
<td>
Phone:
</td>
<td class="data" id="td_work_phone">
<?php echo $row_c->work_phone; ?>
</td>
<td>
Email:
</td>
<td class="data" id="td_primary_email">
<?php echo $row_c->primary_email; ?>
</td>
</tr>
<tr>
<td>
Hotel:
</td>
<td class="data" id="td_hotel_name">
<?php echo $row_c->hotel_name; ?>
</td>
<?php
if ($row_e->online_rsvp_allow_guest == 1) :
?>
<td>
I plan to bring a guest:
</td>
<td class="data">
<select id="guest_option" name="guest_option" onchange="guest_toggle();">
<option value="Y" selected="selected">Yes</option>
<option value="N">No</option>
</select>
</td>
<?php
endif;
?>
</tr>
<?php
if ($row_e->online_rsvp_allow_guest == 1 && $row_e->online_rsvp_allow_guest_name == 1) :
?>
<tr id="row_guest_name">
<td></td>
<td></td>
<td>
Guest Name:
</td>
<td class="data">
<input id="guest_name" name="guest_name" maxlength="90" />
</td>
</tr>
<?php
endif;
?>
<?php
if ($row_e->online_rsvp_require_cell_phone == 1) :
?>
<tr id="row_cell_phone">
<td>
Cell Phone:
</td>
<td class="data">
<span id="td_cell_phone"></span>
<input id="cell_phone" name="cell_phone" maxlength="25" />
<?php show_form_error($ar_err['cell_phone']); ?>
</td>
<td></td>
<td></td>
</tr>
<?php
endif;
?>
<?php
if ($row_e->online_rsvp_allow_corrections == 1) :
?>
<tr id="row_corrections_label">
<td colspan="4">
<h3>If any of your information above is incorrect, please enter corrections below:</h3>
</td>
</tr>
<tr id="row_corrections">
<td colspan="4">
<textarea id="corrections" name="corrections" rows="6" cols="100"></textarea>
</td>
</tr>
<?php
endif;
?>
</table>
<input type="submit" value="RSVP" />
<br />
<br />
</form>
<script>
load_concierge($('#concierge').val());
guest_toggle();
</script>
<?php elseif ($rsvp_type == 'guest_email') : ?>
<form name="frm_event" id="frm_event" method="post" enctype="multipart/form-data" action="">
<input name="submitted" type="hidden" value="1" />
<input name="guest_id" id="guest_id" type="hidden" value="0" />
<?php
select_master($row_e, $result_l);
?>
Please select your name:
<select name="guest" id="guest" class="wide" onchange="load_guest($(this).val());" >
<?php
$i = 0;
while ($row_g = $result_g->fetch(PDO::FETCH_OBJ)) :
$i = $i + 1;
?>
<script>
ar_g[<?php echo $i; ?>] = {
guest_id : '<?php echo $row_g->guest_id * APP_PRIME_NUMBER; ?>',
first_name : '<?php echo $row_g->first_name; ?>',
last_name : '<?php echo $row_g->last_name; ?>',
phone : '<?php echo $row_g->phone; ?>',
email : '<?php echo $row_g->email; ?>',
company : '<?php echo $row_g->company; ?>'
};
</script>
<option value="<?php echo $i; ?>" ><?php echo $row_g->first_name.' '.$row_g->last_name; ?></option>
<?php
endwhile;
?>
</select>
<table border="0" background="0" class="rsvp">
<tr>
<td>
First Name:
</td>
<td class="data" id="td_first_name">
<?php echo $row_g->first_name; ?>
</td>
<td>
Last Name:
</td>
<td class="data" id="td_last_name">
<?php echo $row_g->last_name; ?>
</td>
</tr>
<tr>
<td>
Phone:
</td>
<td class="data" id="td_phone">
<?php echo $row_g->phone; ?>
</td>
<td>
Email:
</td>
<td class="data" id="td_email">
<?php echo $row_g->email; ?>
</td>
</tr>
<tr>
<td>
Company:
</td>
<td class="data" id="td_company">
<?php echo $row_g->company; ?>
</td>
<?php
if ($row_e->online_rsvp_allow_guest == 1) :
?>
<td>
I plan to bring a guest:
</td>
<td class="data">
<select id="guest_option" name="guest_option" onchange="guest_toggle();">
<option value="Y" selected="selected">Yes</option>
<option value="N">No</option>
</select>
</td>
<?php
endif;
?>
</tr>
<?php
if ($row_e->online_rsvp_allow_guest == 1 && $row_e->online_rsvp_allow_guest_name == 1) :
?>
<tr id="row_guest_name">
<td></td>
<td></td>
<td>
Guest Name:
</td>
<td class="data">
<input id="guest_name" name="guest_name" maxlength="90" />
</td>
</tr>
<?php
endif;
?>
</table>
<input type="submit" value="RSVP" />
<br />
<br />
</form>
<script>
load_guest($('#guest').val());
guest_toggle();
</script>
<?php elseif ($rsvp_type == 'guest_no_email') : ?>
<form name="frm_event" id="frm_event" method="post" enctype="multipart/form-data" action="">
<input name="submitted" type="hidden" value="1" />
<input name="guest_id" id="guest_id" type="hidden" value="0" />
<?php
select_master($row_e, $result_l);
?>
All fields are required
<table border="0" background="0" class="rsvp">
<tr>
<td>
First Name:
</td>
<td class="data" id="td_first_name">
<input id="first_name" name="first_name" maxlength="30" value="<?=$_POST['first_name'] ?>" />
<?php show_form_error($ar_err['first_name']); ?>
</td>
</tr>
<tr>
<td>
Last Name:
</td>
<td class="data" id="td_last_name">
<input id="last_name" name="last_name" maxlength="30" value="<?=$_POST['last_name'] ?>" />
<?php show_form_error($ar_err['last_name']); ?>
</td>
</tr>
<tr>
<td>
Phone:
</td>
<td class="data" id="td_phone">
<input id="phone" name="phone" maxlength="30" value="<?=$_POST['phone'] ?>" />
<?php show_form_error($ar_err['phone']); ?>
</td>
</tr>
<tr>
<td>
Email:
</td>
<td class="data" id="td_email">
<input id="email" name="email" maxlength="50" value="<?=$_POST['email'] ?>" />
<?php show_form_error($ar_err['email']); ?>
</td>
</tr>
<tr>
<td>
Company:
</td>
<td class="data" id="td_company">
<input id="company" name="company" maxlength="50" value="<?=$_POST['company'] ?>" />
<?php show_form_error($ar_err['company']); ?>
</td>
</tr>
<?php
if ($row_e->online_rsvp_allow_guest == 1) :
?>
<tr>
<td>
I plan to bring a guest:
</td>
<td class="data">
<select id="guest_option" name="guest_option" onchange="guest_toggle();">
<option value="Y" selected="selected">Yes</option>
<option value="N">No</option>
</select>
</td>
</tr>
<?php
endif;
?>
<?php
if ($row_e->online_rsvp_allow_guest == 1 && $row_e->online_rsvp_allow_guest_name == 1) :
?>
<tr id="row_guest_name">
<td>
Guest Name:
</td>
<td class="data">
<input id="guest_name" name="guest_name" maxlength="30" value="<?=$_POST['guest_name'] ?>" />
</td>
</tr>
<?php
endif;
?>
<tr>
<td colspan="2">
<div class="g-recaptcha" data-sitekey="<?=APP_RECAPTCHA_SITE_KEY ?>"></div>
<?php show_form_error($ar_err['g-recaptcha-response']); ?>
</td>
</tr>
</table>
<input type="submit" value="RSVP" />
<br />
<br />
</form>
<script>
//load_guest($('#guest').val());
guest_toggle();
</script>
<?php endif ?>
</div>
</body>
<script src='https://www.google.com/recaptcha/api.js' async defer ></script>
</html>
<?php
function select_master($row_e, $result_l) {
if ($row_e->master_event == 1) :
if ($result_l->rowCount() > 0) :
?>
Please select date:
<select name="event_id" id="event_id" class="wide" >
<?php
while ($row_l = $result_l->fetch(PDO::FETCH_OBJ)) :
echo '<option value="'.($row_l->event_id * APP_PRIME_NUMBER).'" >'.date("l, m/d/Y - g:i a", strtotime($row_l->event_date_time)).'</option>';
endwhile;
?>
</select>
<br /><br />
<?php
else :
echo '<h1>Sorry - no more dates are available for this event!</h1>';
return;
endif;
else :
echo '<input name="event_id" id="event_id" type="hidden" value="'.($row_e->event_id * APP_PRIME_NUMBER).'" />';
endif;
}