a584bd38 by Kevin Burton

User Manager Event Registration, Refs#1070

1 parent 209c88fc
......@@ -602,4 +602,7 @@ div.tablesorterPager input {
div.dataTables_paginate span.paginate_active {
color: #DF3224;
}
\ No newline at end of file
}
.small-table {}
.small-table td { font-size:11px; padding:3px; }
\ No newline at end of file
......
......@@ -943,6 +943,8 @@ class Actions {
$reg_deadline = get_post_meta($event_id,'reg_deadline',true);
$event_date = get_post_meta($event_id,'event_date',true);
$give_earlybird_discount = isset($_POST['discount_earlybird']) ? true : false;
$give_member_discount = isset($_POST['discount_member']) ? true : false;
$event_term_slugs = array();
$terms = get_the_terms($event_id,'event_type');
......@@ -958,7 +960,7 @@ class Actions {
$new_cost = $cost;
$total_discount = 0;
if ( ($user->getRole()=="member" || $user->getRole()=="student") && !empty($member_discount) ) {
if ( $give_member_discount && !empty($member_discount) ) {
$show_member_discount = true;
$discounts[] = Array(
......@@ -970,7 +972,7 @@ class Actions {
$total_discount = ($total_discount + $member_discount);
}
if (!empty($early_bird_deadline) && $early_bird_deadline > time()) {
if ( $give_earlybird_discount && !empty($early_bird_discount) ) {
$show_early_discount = true;
$discounts[] = Array(
......@@ -1009,7 +1011,7 @@ class Actions {
$invoice_post = $_POST;
$details = Array('dietary',
$details = Array('dietary','event_notes',
'mealopt_one','mealopt_two','mealopt_three','mealopt_four','mealopt_five','mealopt_six','mealopt_seven','mealopt_eight','mealopt_nine','mealopt_ten',
'session_one','session_two','session_three','session_four','session_five','session_six','session_seven','session_eight','session_nine','session_ten');
......@@ -1072,7 +1074,12 @@ class Actions {
//create($items = array(), $invoice_type = 'event', $title = "Invoice", $user_id = 0, $status = 'pending', $reference = '', $publish = 'draft')
Invoice\create($invoice_data, 'event', 'Registration for Event via CBV Admin: '.$event->post_title, $user->ID, $status, 'publish',number_format(($new_cost + $taxes),2));
$invoice_id = Invoice\create($invoice_data, 'event', 'Registration for Event via CBV Admin: '.$event->post_title, $user->ID, $status, 'publish',number_format(($new_cost + $taxes),2));
$extras['invoice_id'] = $invoice_id;
$extras['discounts'] = array(
'member' => ($give_member_discount) ? "Y" : "N"
, 'earlybird' => ($give_earlybird_discount) ? "Y" : "N"
);
Events\set_attending($user->ID,$event_id,'paid',md5(rand()),$extras);
......@@ -1268,6 +1275,8 @@ class Actions {
$user_event_meta = Array();
}
//CBV\trace($user_event_meta);
$post = Events\get_event($_GET['event_id']);
$show_dietary = get_post_meta($post->ID, 'show_dietary', true);
......@@ -1297,6 +1306,10 @@ class Actions {
$mealopt_nine = get_post_meta($post->ID, 'mealopt_nine', true);
$mealopt_ten = get_post_meta($post->ID, 'mealopt_ten', true);
$early_bird_deadline = get_post_meta($post->ID,'early_bird_deadline',true);
$early_bird_discount = get_post_meta($post->ID,'early_bird_discount',true);
$member_discount = get_post_meta($post->ID,'student_member_discount',true);
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'edit_event.php');
$content = ob_get_contents();
......@@ -1536,7 +1549,7 @@ HTML;
add_submenu_page('cbv_users','New User', 'New User',CAPABILITY,'cbv_users_create',__NAMESPACE__ . '\create_user');
add_submenu_page('cbv_users','New User', 'Awaiting Validation',CAPABILITY,'cbv_users_signups',__NAMESPACE__ . '\signups');
add_submenu_page('cbv_users', 'Merge Users', 'Merge Users', CAPABILITY, 'cbv_users_merge', __NAMESPACE__ . '\merge_users');
add_submenu_page('cbv_users', 'Fix Unpaid', 'Fix Unpaid', CAPABILITY, 'cbv_users_fix_unpaid', __NAMESPACE__ . '\fix_unpaid');
//add_submenu_page('cbv_users', 'Fix Unpaid', 'Fix Unpaid', CAPABILITY, 'cbv_users_fix_unpaid', __NAMESPACE__ . '\fix_unpaid');
}
public static function admin_init() {
......
......@@ -34,227 +34,391 @@
<body>
<div class="title-link" style="display:block;color:#f7bd55; font-size: 12px;font-weight: bold;text-align: left;line-height: 1.75em; background-color: #3b0d32; border: solid 1px #FFF; border-bottom: solid 1px #999; cursor: default; padding: 0em; padding:3px 10px 3px 10px; margin: 0em;"><?php echo $post->post_title;?></div>
<div style="width: 760px;">
<div style="padding: 0px 0px 10px 0px;">
<?php
$extras = $user_event_meta['extras'];
?>
<form method="post" action="" id="edit-event-form">
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="event_id" value="<?php echo $post->ID; ?>" />
<input type="hidden" name="type" value="<?php echo $action; ?>" />
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">HOW TO PROCESS THE REGISTRATION:</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<select name="status">
<option value="unpaid" <?php echo ($user_event_meta['status']=="unpaid") ? "selected" : ""; ?>>Invoice User</option>
<option value="complementary" <?php echo ($user_event_meta['status']=="complementary") ? "selected" : ""; ?>>Complementary</option>
<option value="visa" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="visa") ? "selected" : ""; ?>>Paid by Prepaid Visa</option>
<option value="mc" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="mc") ? "selected" : ""; ?>>Paid by Prepaid Mastercard</option>
<option value="amex" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="amex") ? "selected" : ""; ?>>Paid by Prepaid American Express</option>
<option value="cheque" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="cheque") ? "selected" : ""; ?>>Paid by Cheque</option>
</select>
</div>
</div>
<?php
if (!empty($show_dietary)): ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">SPECIAL DIETARY REQUIREMENTS</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<textarea name="dietary" class="input-field-css input-large" rows="5" style="width:350px;"><?php echo isset($extras['dietary']) ? $extras['dietary'] : ""; ?></textarea>
</div>
</div>
<?php endif; ?>
<?php if (!empty($mealopt_description) || !empty($mealopt_one) || !empty($mealopt_two) || !empty($mealopt_three) || !empty($mealopt_four)):?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">MEAL OPTIONS</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<?php if (!empty($mealopt_description)) { echo "<div><strong>".$mealopt_description."</strong></div>"; } ?>
<table class="clean no-left-padding">
<tbody>
<?php if (!empty($mealopt_one) && $mealopt_one != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_one" value="on" <?php echo (isset($extras['mealopt_one'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_one; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_two) && $mealopt_two != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_two" value="on" <?php echo (isset($extras['mealopt_two'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_two; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_three) && $mealopt_three != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_three" value="on" <?php echo (isset($extras['mealopt_three'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_three; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_four) && $mealopt_four != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_four" value="on" <?php echo (isset($extras['mealopt_four'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_four; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_five) && $mealopt_five != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_five" value="on" <?php echo (isset($extras['mealopt_five'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_five; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_six) && $mealopt_six != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_six" value="on" <?php echo (isset($extras['mealopt_six'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_six; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_seven) && $mealopt_seven != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_seven" value="on" <?php echo (isset($extras['mealopt_seven'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_seven; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_eight) && $mealopt_eight != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_eight" value="on" <?php echo (isset($extras['mealopt_eight'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_eight; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_nine) && $mealopt_nine != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_nine" value="on" <?php echo (isset($extras['mealopt_nine'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_nine; ?></td>
</tr>
<?php endif; ?>
<div class="title-link" style="display:block;color:#f7bd55; font-size: 12px;font-weight: bold;text-align: left;line-height: 1.75em; background-color: #3b0d32; border: solid 1px #FFF; border-bottom: solid 1px #999; cursor: default; padding: 0em; padding:3px 10px 3px 10px; margin: 0em;">Admin Event Registration: <?php echo $post->post_title;?></div>
<div style="padding: 10px 0px 10px 10px; width:350px; float:left;">
<table class="small-table">
<?php
// get categories....
$event_term_slugs = array();
$terms = get_the_terms($post->ID,'event_type');
$external_only = false;
if (!empty($terms)) {
foreach($terms as $types) {
$event_term_slugs[$types->slug] = $types->name;
}
}
$location = get_post_meta($post->ID, 'location', true);
$cost = get_post_meta($post->ID,'cost',true);
if ( ($cost == "0" || $cost == "0.00" || strtolower($cost) == "free") && !$external_only ) {
$purchasable = false;
$cost = "FREE";
} elseif ( (!empty($cost) && (int) $cost < 1) && !$external_only ) {
$purchasable = false;
$cost = $cost;
} elseif ( (empty($cost) && (int) $cost < 1) && !$external_only ) {
$purchasable = false;
$cost = $cost;
} elseif ($external_only) {
$purchasable = false;
} else {
$cost = (int) $cost;
$cost = str_replace(",","",$cost);
$purchasable = true;
}
?>
<tr>
<td width="140"><strong>Event Type</strong></td>
<td>
<?php
foreach($terms as $term) {
echo $term->name.'<br />';
}
?>
</td>
</tr>
<?php if (!empty($location)):?>
<tr>
<td><strong>Location</strong></td>
<td><?php echo $location; ?></td>
</tr>
<?php endif; ?>
<tr>
<td><strong>When</strong></td>
<td>
<?php
$event_date = get_post_meta($post->ID, 'event_date', true);
$event_date_end = get_post_meta($post->ID, 'event_date_end', true);
if ( empty($event_date_end) ) {
echo date("M j, Y",$event_date);
} else {
$start_month = date("M", $event_date);
$start_day = date("d", $event_date);
$start_year = date("Y", $event_date);
<?php if (!empty($mealopt_ten) && $mealopt_ten != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_ten" value="on" <?php echo (isset($extras['mealopt_ten'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_ten; ?></td>
</tr>
<?php endif; ?>
$end_month = date("M", $event_date_end);
$end_day = date("d", $event_date_end);
$end_year = date("Y", $event_date_end);
// format: April 3-7, 2011
if ($start_month == $end_month && $start_year == $end_year) {
echo $start_month." ".$start_day."-".$end_day.", ".$start_year;
} elseif ($start_month != $end_month && $start_year == $end_year) {
echo $start_month." ".$start_day." - ".$end_month." ".$end_day.", ".$start_year;
} else {
// format: April 3 - May 2, 2011
echo $start_month." ".$start_day.", ".$start_year." - ".$end_month." ".$end_day.", ".$start_year;
}
</tbody>
</table>
</div>
}
?>
</td>
</tr>
<tr>
<td><strong>Cost</strong></td>
<td><?php echo ($purchasable) ? "$".number_format($cost,2) : $cost; ?></td>
</tr>
<tr>
<td><strong>Stud./Mem. Discount</strong></td>
<td><?php echo (!empty($member_discount)) ? "$".number_format($member_discount,2) : "<em>None</em>";?></td>
</tr>
<tr>
<td><strong>Earlybird Discount</strong></td>
<td><?php echo (!empty($early_bird_discount)) ? "$".number_format($early_bird_discount,2) : "<em>None</em>";?></td>
</tr>
<?php if (!empty($early_bird_deadline) && !empty($early_bird_discount)): ?>
<tr>
<td><strong>Earlybird Deadline</strong></td>
<td><?php echo date("M d, Y",$early_bird_deadline); ?></td>
</tr>
<?php endif; ?>
</table>
</div>
<?php endif; ?>
<?php if (!empty($session_description) || !empty($session_one) || !empty($session_two) || !empty($session_three) || !empty($session_four) || !empty($session_five) || !empty($session_six)):?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">SESSION OPTIONS</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<?php if (!empty($session_description)) { echo "<div><strong>".$session_description."</strong></div>"; } ?>
<table class="clean no-left-padding">
<tbody>
<?php if (!empty($session_one)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_one" value="on" <?php echo (isset($extras['session_one'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_one; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_two)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_two" value="on" <?php echo (isset($extras['session_two'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_two; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_three)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_three" value="on" <?php echo (isset($extras['session_three'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_three; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_four)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_four" value="on" <?php echo (isset($extras['session_four'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_four; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_five)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_five" value="on" <?php echo (isset($extras['session_five'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_five; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_six)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_six" value="on" <?php echo (isset($extras['session_six'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_six; ?></td>
</tr>
<?php endif; ?>
<div style="padding: 0px 0px 10px 0px; width:380px; float:right;">
<?php
$extras = $user_event_meta['extras'];
?>
<form method="post" action="" id="edit-event-form">
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="event_id" value="<?php echo $post->ID; ?>" />
<input type="hidden" name="type" value="<?php echo $action; ?>" />
<?php if ($action != "edit"): ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">HOW TO PROCESS THE REGISTRATION:</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<select name="status">
<option value="unpaid" <?php echo ($user_event_meta['status']=="unpaid") ? "selected" : ""; ?>>Invoice User</option>
<option value="complementary" <?php echo ($user_event_meta['status']=="complementary") ? "selected" : ""; ?>>Complementary</option>
<option value="visa" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="visa") ? "selected" : ""; ?>>Paid by Prepaid Visa</option>
<option value="mc" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="mc") ? "selected" : ""; ?>>Paid by Prepaid Mastercard</option>
<option value="amex" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="amex") ? "selected" : ""; ?>>Paid by Prepaid American Express</option>
<option value="cheque" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="cheque") ? "selected" : ""; ?>>Paid by Cheque</option>
</select>
</div>
</div>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">ASSIGN DISCOUNTS:</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<?php if ( empty($member_discount) && empty($early_bird_discount) ): ?>
<p style="color:#999;padding-top:0; margin-top:0;">In order to assign a discount, the discount must have a numeric value in the Event Admin.</p>
<?php else: ?>
<table>
<?php if (!empty($member_discount)):
<?php if (!empty($session_seven)):?>
$is_member = ($role=="member" OR $role=="student") ? true : false;
?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_seven" value="on" <?php echo (isset($extras['session_seven'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_seven; ?></td>
<td width="20"><input type="checkbox" id="discount_member" name="discount_member" value="on" <?php echo ($is_member) ? "checked='checked'" : "";?> /></td>
<td><label for="discount_member">Student/Member Discount</label></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_eight)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_eight" value="on" <?php echo (isset($extras['session_eight'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_eight; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($early_bird_discount)):
<?php if (!empty($session_nine)):?>
$is_eb_avail = (!empty($early_bird_deadline) && $early_bird_deadline > time()) ? true : false;
?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_nine" value="on" <?php echo (isset($extras['session_nine'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_nine; ?></td>
<td width="20"><input type="checkbox" id="discount_earlybird" name="discount_earlybird" value="on" <?php echo ($is_eb_avail) ? "checked='checked'" : ""; ?> /></td>
<td><label for="discount_earlybird">Earlybird Discount</label></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_ten)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_ten" value="on" <?php echo (isset($extras['session_ten'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_ten; ?></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</table>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">ADDITIONAL NOTES</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<textarea name="event_notes" class="input-field-css input-large" rows="3" style="width:350px;"><?php echo isset($extras['event_notes']) ? $extras['event_notes'] : ""; ?></textarea>
</div>
</div>
<?php
if (!empty($show_dietary)): ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">SPECIAL DIETARY REQUIREMENTS</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<textarea name="dietary" class="input-field-css input-large" rows="5" style="width:350px;"><?php echo isset($extras['dietary']) ? $extras['dietary'] : ""; ?></textarea>
</div>
</div>
<?php endif; ?>
<?php if (!empty($mealopt_description) || !empty($mealopt_one) || !empty($mealopt_two) || !empty($mealopt_three) || !empty($mealopt_four)):?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">MEAL OPTIONS</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<?php if (!empty($mealopt_description)) { echo "<div><strong>".$mealopt_description."</strong></div>"; } ?>
<table class="clean no-left-padding">
<tbody>
<?php if (!empty($mealopt_one) && $mealopt_one != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_one" value="on" <?php echo (isset($extras['mealopt_one'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_one; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_two) && $mealopt_two != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_two" value="on" <?php echo (isset($extras['mealopt_two'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_two; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_three) && $mealopt_three != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_three" value="on" <?php echo (isset($extras['mealopt_three'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_three; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_four) && $mealopt_four != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_four" value="on" <?php echo (isset($extras['mealopt_four'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_four; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_five) && $mealopt_five != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_five" value="on" <?php echo (isset($extras['mealopt_five'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_five; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_six) && $mealopt_six != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_six" value="on" <?php echo (isset($extras['mealopt_six'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_six; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_seven) && $mealopt_seven != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_seven" value="on" <?php echo (isset($extras['mealopt_seven'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_seven; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_eight) && $mealopt_eight != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_eight" value="on" <?php echo (isset($extras['mealopt_eight'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_eight; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_nine) && $mealopt_nine != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_nine" value="on" <?php echo (isset($extras['mealopt_nine'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_nine; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($mealopt_ten) && $mealopt_ten != ""):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_ten" value="on" <?php echo (isset($extras['mealopt_ten'])) ? "checked" : ""; ?> /></th>
<td><?php echo $mealopt_ten; ?></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php endif; ?>
<?php if (!empty($session_description) || !empty($session_one) || !empty($session_two) || !empty($session_three) || !empty($session_four) || !empty($session_five) || !empty($session_six)):?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">SESSION OPTIONS</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<?php if (!empty($session_description)) { echo "<div><strong>".$session_description."</strong></div>"; } ?>
<table class="clean no-left-padding">
<tbody>
<?php if (!empty($session_one)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_one" value="on" <?php echo (isset($extras['session_one'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_one; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_two)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_two" value="on" <?php echo (isset($extras['session_two'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_two; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_three)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_three" value="on" <?php echo (isset($extras['session_three'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_three; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_four)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_four" value="on" <?php echo (isset($extras['session_four'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_four; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_five)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_five" value="on" <?php echo (isset($extras['session_five'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_five; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_six)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_six" value="on" <?php echo (isset($extras['session_six'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_six; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_seven)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_seven" value="on" <?php echo (isset($extras['session_seven'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_seven; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_eight)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_eight" value="on" <?php echo (isset($extras['session_eight'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_eight; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_nine)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_nine" value="on" <?php echo (isset($extras['session_nine'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_nine; ?></td>
</tr>
<?php endif; ?>
<?php if (!empty($session_ten)):?>
<tr>
<th width="40" style="text-align:right;"><input type="checkbox" name="session_ten" value="on" <?php echo (isset($extras['session_ten'])) ? "checked" : ""; ?> /></th>
<td><?php echo $session_ten; ?></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php endif; ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title"></div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<div><input type="submit" value="<?php echo ($action=="edit") ? "Update" : "Register"; ?>" /></div>
</div>
</div>
</form>
</div>
<?php endif; ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title"></div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<div><input type="submit" value="<?php echo ($action=="edit") ? "Update" : "Register"; ?>" /></div>
</div>
</div>
<div style="clear:both;"></div>
</form>
</div>
</body>
</html>
\ No newline at end of file
......