a584bd38 by Kevin Burton

User Manager Event Registration, Refs#1070

1 parent 209c88fc
...@@ -602,4 +602,7 @@ div.tablesorterPager input { ...@@ -602,4 +602,7 @@ div.tablesorterPager input {
602 602
603 div.dataTables_paginate span.paginate_active { 603 div.dataTables_paginate span.paginate_active {
604 color: #DF3224; 604 color: #DF3224;
605 }
...\ No newline at end of file ...\ No newline at end of file
605 }
606
607 .small-table {}
608 .small-table td { font-size:11px; padding:3px; }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -943,6 +943,8 @@ class Actions { ...@@ -943,6 +943,8 @@ class Actions {
943 $reg_deadline = get_post_meta($event_id,'reg_deadline',true); 943 $reg_deadline = get_post_meta($event_id,'reg_deadline',true);
944 $event_date = get_post_meta($event_id,'event_date',true); 944 $event_date = get_post_meta($event_id,'event_date',true);
945 945
946 $give_earlybird_discount = isset($_POST['discount_earlybird']) ? true : false;
947 $give_member_discount = isset($_POST['discount_member']) ? true : false;
946 948
947 $event_term_slugs = array(); 949 $event_term_slugs = array();
948 $terms = get_the_terms($event_id,'event_type'); 950 $terms = get_the_terms($event_id,'event_type');
...@@ -958,7 +960,7 @@ class Actions { ...@@ -958,7 +960,7 @@ class Actions {
958 $new_cost = $cost; 960 $new_cost = $cost;
959 $total_discount = 0; 961 $total_discount = 0;
960 962
961 if ( ($user->getRole()=="member" || $user->getRole()=="student") && !empty($member_discount) ) { 963 if ( $give_member_discount && !empty($member_discount) ) {
962 $show_member_discount = true; 964 $show_member_discount = true;
963 965
964 $discounts[] = Array( 966 $discounts[] = Array(
...@@ -970,7 +972,7 @@ class Actions { ...@@ -970,7 +972,7 @@ class Actions {
970 $total_discount = ($total_discount + $member_discount); 972 $total_discount = ($total_discount + $member_discount);
971 973
972 } 974 }
973 if (!empty($early_bird_deadline) && $early_bird_deadline > time()) { 975 if ( $give_earlybird_discount && !empty($early_bird_discount) ) {
974 $show_early_discount = true; 976 $show_early_discount = true;
975 977
976 $discounts[] = Array( 978 $discounts[] = Array(
...@@ -1009,7 +1011,7 @@ class Actions { ...@@ -1009,7 +1011,7 @@ class Actions {
1009 $invoice_post = $_POST; 1011 $invoice_post = $_POST;
1010 1012
1011 1013
1012 $details = Array('dietary', 1014 $details = Array('dietary','event_notes',
1013 'mealopt_one','mealopt_two','mealopt_three','mealopt_four','mealopt_five','mealopt_six','mealopt_seven','mealopt_eight','mealopt_nine','mealopt_ten', 1015 'mealopt_one','mealopt_two','mealopt_three','mealopt_four','mealopt_five','mealopt_six','mealopt_seven','mealopt_eight','mealopt_nine','mealopt_ten',
1014 'session_one','session_two','session_three','session_four','session_five','session_six','session_seven','session_eight','session_nine','session_ten'); 1016 'session_one','session_two','session_three','session_four','session_five','session_six','session_seven','session_eight','session_nine','session_ten');
1015 1017
...@@ -1072,7 +1074,12 @@ class Actions { ...@@ -1072,7 +1074,12 @@ class Actions {
1072 1074
1073 1075
1074 //create($items = array(), $invoice_type = 'event', $title = "Invoice", $user_id = 0, $status = 'pending', $reference = '', $publish = 'draft') 1076 //create($items = array(), $invoice_type = 'event', $title = "Invoice", $user_id = 0, $status = 'pending', $reference = '', $publish = 'draft')
1075 Invoice\create($invoice_data, 'event', 'Registration for Event via CBV Admin: '.$event->post_title, $user->ID, $status, 'publish',number_format(($new_cost + $taxes),2)); 1077 $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));
1078 $extras['invoice_id'] = $invoice_id;
1079 $extras['discounts'] = array(
1080 'member' => ($give_member_discount) ? "Y" : "N"
1081 , 'earlybird' => ($give_earlybird_discount) ? "Y" : "N"
1082 );
1076 1083
1077 Events\set_attending($user->ID,$event_id,'paid',md5(rand()),$extras); 1084 Events\set_attending($user->ID,$event_id,'paid',md5(rand()),$extras);
1078 1085
...@@ -1268,6 +1275,8 @@ class Actions { ...@@ -1268,6 +1275,8 @@ class Actions {
1268 $user_event_meta = Array(); 1275 $user_event_meta = Array();
1269 } 1276 }
1270 1277
1278 //CBV\trace($user_event_meta);
1279
1271 $post = Events\get_event($_GET['event_id']); 1280 $post = Events\get_event($_GET['event_id']);
1272 1281
1273 $show_dietary = get_post_meta($post->ID, 'show_dietary', true); 1282 $show_dietary = get_post_meta($post->ID, 'show_dietary', true);
...@@ -1297,6 +1306,10 @@ class Actions { ...@@ -1297,6 +1306,10 @@ class Actions {
1297 $mealopt_nine = get_post_meta($post->ID, 'mealopt_nine', true); 1306 $mealopt_nine = get_post_meta($post->ID, 'mealopt_nine', true);
1298 $mealopt_ten = get_post_meta($post->ID, 'mealopt_ten', true); 1307 $mealopt_ten = get_post_meta($post->ID, 'mealopt_ten', true);
1299 1308
1309 $early_bird_deadline = get_post_meta($post->ID,'early_bird_deadline',true);
1310 $early_bird_discount = get_post_meta($post->ID,'early_bird_discount',true);
1311 $member_discount = get_post_meta($post->ID,'student_member_discount',true);
1312
1300 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'edit_event.php'); 1313 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'edit_event.php');
1301 1314
1302 $content = ob_get_contents(); 1315 $content = ob_get_contents();
...@@ -1536,7 +1549,7 @@ HTML; ...@@ -1536,7 +1549,7 @@ HTML;
1536 add_submenu_page('cbv_users','New User', 'New User',CAPABILITY,'cbv_users_create',__NAMESPACE__ . '\create_user'); 1549 add_submenu_page('cbv_users','New User', 'New User',CAPABILITY,'cbv_users_create',__NAMESPACE__ . '\create_user');
1537 add_submenu_page('cbv_users','New User', 'Awaiting Validation',CAPABILITY,'cbv_users_signups',__NAMESPACE__ . '\signups'); 1550 add_submenu_page('cbv_users','New User', 'Awaiting Validation',CAPABILITY,'cbv_users_signups',__NAMESPACE__ . '\signups');
1538 add_submenu_page('cbv_users', 'Merge Users', 'Merge Users', CAPABILITY, 'cbv_users_merge', __NAMESPACE__ . '\merge_users'); 1551 add_submenu_page('cbv_users', 'Merge Users', 'Merge Users', CAPABILITY, 'cbv_users_merge', __NAMESPACE__ . '\merge_users');
1539 add_submenu_page('cbv_users', 'Fix Unpaid', 'Fix Unpaid', CAPABILITY, 'cbv_users_fix_unpaid', __NAMESPACE__ . '\fix_unpaid'); 1552 //add_submenu_page('cbv_users', 'Fix Unpaid', 'Fix Unpaid', CAPABILITY, 'cbv_users_fix_unpaid', __NAMESPACE__ . '\fix_unpaid');
1540 } 1553 }
1541 1554
1542 public static function admin_init() { 1555 public static function admin_init() {
......
...@@ -34,227 +34,391 @@ ...@@ -34,227 +34,391 @@
34 34
35 <body> 35 <body>
36 36
37 <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> 37 <div style="width: 760px;">
38 38
39 39 <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>
40 <div style="padding: 0px 0px 10px 0px;"> 40
41 <?php 41 <div style="padding: 10px 0px 10px 10px; width:350px; float:left;">
42 $extras = $user_event_meta['extras']; 42 <table class="small-table">
43 ?> 43
44 44 <?php
45 <form method="post" action="" id="edit-event-form"> 45 // get categories....
46 46 $event_term_slugs = array();
47 <input type="hidden" name="uid" value="<?php echo $uid; ?>" /> 47 $terms = get_the_terms($post->ID,'event_type');
48 <input type="hidden" name="event_id" value="<?php echo $post->ID; ?>" /> 48
49 <input type="hidden" name="type" value="<?php echo $action; ?>" /> 49 $external_only = false;
50 50 if (!empty($terms)) {
51 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> 51 foreach($terms as $types) {
52 <div class="dashboard-section-title">HOW TO PROCESS THE REGISTRATION:</div> 52 $event_term_slugs[$types->slug] = $types->name;
53 <div class="dashboard-section-links"></div> 53 }
54 <div class="dashboard-section-content small"> 54 }
55 <select name="status"> 55
56 <option value="unpaid" <?php echo ($user_event_meta['status']=="unpaid") ? "selected" : ""; ?>>Invoice User</option> 56 $location = get_post_meta($post->ID, 'location', true);
57 <option value="complementary" <?php echo ($user_event_meta['status']=="complementary") ? "selected" : ""; ?>>Complementary</option> 57
58 <option value="visa" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="visa") ? "selected" : ""; ?>>Paid by Prepaid Visa</option> 58 $cost = get_post_meta($post->ID,'cost',true);
59 <option value="mc" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="mc") ? "selected" : ""; ?>>Paid by Prepaid Mastercard</option> 59
60 <option value="amex" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="amex") ? "selected" : ""; ?>>Paid by Prepaid American Express</option> 60 if ( ($cost == "0" || $cost == "0.00" || strtolower($cost) == "free") && !$external_only ) {
61 <option value="cheque" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="cheque") ? "selected" : ""; ?>>Paid by Cheque</option> 61 $purchasable = false;
62 </select> 62 $cost = "FREE";
63 </div> 63 } elseif ( (!empty($cost) && (int) $cost < 1) && !$external_only ) {
64 </div> 64 $purchasable = false;
65 65 $cost = $cost;
66 <?php 66 } elseif ( (empty($cost) && (int) $cost < 1) && !$external_only ) {
67 if (!empty($show_dietary)): ?> 67 $purchasable = false;
68 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> 68 $cost = $cost;
69 <div class="dashboard-section-title">SPECIAL DIETARY REQUIREMENTS</div> 69 } elseif ($external_only) {
70 <div class="dashboard-section-links"></div> 70
71 <div class="dashboard-section-content small"> 71 $purchasable = false;
72 <textarea name="dietary" class="input-field-css input-large" rows="5" style="width:350px;"><?php echo isset($extras['dietary']) ? $extras['dietary'] : ""; ?></textarea> 72
73 </div> 73 } else {
74 </div> 74 $cost = (int) $cost;
75 <?php endif; ?> 75 $cost = str_replace(",","",$cost);
76 76 $purchasable = true;
77 <?php if (!empty($mealopt_description) || !empty($mealopt_one) || !empty($mealopt_two) || !empty($mealopt_three) || !empty($mealopt_four)):?> 77 }
78 78
79 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> 79 ?>
80 <div class="dashboard-section-title">MEAL OPTIONS</div> 80
81 <div class="dashboard-section-links"></div> 81 <tr>
82 <div class="dashboard-section-content small"> 82 <td width="140"><strong>Event Type</strong></td>
83 <?php if (!empty($mealopt_description)) { echo "<div><strong>".$mealopt_description."</strong></div>"; } ?> 83 <td>
84 <table class="clean no-left-padding"> 84 <?php
85 <tbody> 85 foreach($terms as $term) {
86 <?php if (!empty($mealopt_one) && $mealopt_one != ""):?> 86 echo $term->name.'<br />';
87 <tr> 87 }
88 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_one" value="on" <?php echo (isset($extras['mealopt_one'])) ? "checked" : ""; ?> /></th> 88 ?>
89 <td><?php echo $mealopt_one; ?></td> 89 </td>
90 </tr> 90 </tr>
91 <?php endif; ?> 91 <?php if (!empty($location)):?>
92 92 <tr>
93 <?php if (!empty($mealopt_two) && $mealopt_two != ""):?> 93 <td><strong>Location</strong></td>
94 <tr> 94 <td><?php echo $location; ?></td>
95 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_two" value="on" <?php echo (isset($extras['mealopt_two'])) ? "checked" : ""; ?> /></th> 95 </tr>
96 <td><?php echo $mealopt_two; ?></td> 96 <?php endif; ?>
97 </tr> 97 <tr>
98 <?php endif; ?> 98 <td><strong>When</strong></td>
99 99 <td>
100 <?php if (!empty($mealopt_three) && $mealopt_three != ""):?> 100 <?php
101 <tr> 101
102 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_three" value="on" <?php echo (isset($extras['mealopt_three'])) ? "checked" : ""; ?> /></th> 102 $event_date = get_post_meta($post->ID, 'event_date', true);
103 <td><?php echo $mealopt_three; ?></td> 103 $event_date_end = get_post_meta($post->ID, 'event_date_end', true);
104 </tr> 104
105 <?php endif; ?> 105 if ( empty($event_date_end) ) {
106 106 echo date("M j, Y",$event_date);
107 <?php if (!empty($mealopt_four) && $mealopt_four != ""):?> 107 } else {
108 <tr> 108 $start_month = date("M", $event_date);
109 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_four" value="on" <?php echo (isset($extras['mealopt_four'])) ? "checked" : ""; ?> /></th> 109 $start_day = date("d", $event_date);
110 <td><?php echo $mealopt_four; ?></td> 110 $start_year = date("Y", $event_date);
111 </tr>
112 <?php endif; ?>
113
114 <?php if (!empty($mealopt_five) && $mealopt_five != ""):?>
115 <tr>
116 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_five" value="on" <?php echo (isset($extras['mealopt_five'])) ? "checked" : ""; ?> /></th>
117 <td><?php echo $mealopt_five; ?></td>
118 </tr>
119 <?php endif; ?>
120
121 <?php if (!empty($mealopt_six) && $mealopt_six != ""):?>
122 <tr>
123 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_six" value="on" <?php echo (isset($extras['mealopt_six'])) ? "checked" : ""; ?> /></th>
124 <td><?php echo $mealopt_six; ?></td>
125 </tr>
126 <?php endif; ?>
127
128 <?php if (!empty($mealopt_seven) && $mealopt_seven != ""):?>
129 <tr>
130 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_seven" value="on" <?php echo (isset($extras['mealopt_seven'])) ? "checked" : ""; ?> /></th>
131 <td><?php echo $mealopt_seven; ?></td>
132 </tr>
133 <?php endif; ?>
134
135 <?php if (!empty($mealopt_eight) && $mealopt_eight != ""):?>
136 <tr>
137 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_eight" value="on" <?php echo (isset($extras['mealopt_eight'])) ? "checked" : ""; ?> /></th>
138 <td><?php echo $mealopt_eight; ?></td>
139 </tr>
140 <?php endif; ?>
141
142 <?php if (!empty($mealopt_nine) && $mealopt_nine != ""):?>
143 <tr>
144 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_nine" value="on" <?php echo (isset($extras['mealopt_nine'])) ? "checked" : ""; ?> /></th>
145 <td><?php echo $mealopt_nine; ?></td>
146 </tr>
147 <?php endif; ?>
148 111
149 <?php if (!empty($mealopt_ten) && $mealopt_ten != ""):?> 112 $end_month = date("M", $event_date_end);
150 <tr> 113 $end_day = date("d", $event_date_end);
151 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_ten" value="on" <?php echo (isset($extras['mealopt_ten'])) ? "checked" : ""; ?> /></th> 114 $end_year = date("Y", $event_date_end);
152 <td><?php echo $mealopt_ten; ?></td>
153 </tr>
154 <?php endif; ?>
155 115
116 // format: April 3-7, 2011
117 if ($start_month == $end_month && $start_year == $end_year) {
118 echo $start_month." ".$start_day."-".$end_day.", ".$start_year;
119 } elseif ($start_month != $end_month && $start_year == $end_year) {
120 echo $start_month." ".$start_day." - ".$end_month." ".$end_day.", ".$start_year;
121 } else {
122 // format: April 3 - May 2, 2011
123 echo $start_month." ".$start_day.", ".$start_year." - ".$end_month." ".$end_day.", ".$start_year;
124 }
125
156 126
157 </tbody> 127 }
158 </table> 128
159 </div> 129 ?>
130 </td>
131 </tr>
132 <tr>
133 <td><strong>Cost</strong></td>
134 <td><?php echo ($purchasable) ? "$".number_format($cost,2) : $cost; ?></td>
135 </tr>
136 <tr>
137 <td><strong>Stud./Mem. Discount</strong></td>
138 <td><?php echo (!empty($member_discount)) ? "$".number_format($member_discount,2) : "<em>None</em>";?></td>
139 </tr>
140 <tr>
141 <td><strong>Earlybird Discount</strong></td>
142 <td><?php echo (!empty($early_bird_discount)) ? "$".number_format($early_bird_discount,2) : "<em>None</em>";?></td>
143 </tr>
144 <?php if (!empty($early_bird_deadline) && !empty($early_bird_discount)): ?>
145 <tr>
146 <td><strong>Earlybird Deadline</strong></td>
147 <td><?php echo date("M d, Y",$early_bird_deadline); ?></td>
148 </tr>
149 <?php endif; ?>
150
151 </table>
160 </div> 152 </div>
161 <?php endif; ?>
162 153
163 <?php if (!empty($session_description) || !empty($session_one) || !empty($session_two) || !empty($session_three) || !empty($session_four) || !empty($session_five) || !empty($session_six)):?> 154 <div style="padding: 0px 0px 10px 0px; width:380px; float:right;">
164 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> 155 <?php
165 <div class="dashboard-section-title">SESSION OPTIONS</div> 156 $extras = $user_event_meta['extras'];
166 <div class="dashboard-section-links"></div> 157 ?>
167 <div class="dashboard-section-content small"> 158
168 <?php if (!empty($session_description)) { echo "<div><strong>".$session_description."</strong></div>"; } ?> 159 <form method="post" action="" id="edit-event-form">
169 <table class="clean no-left-padding"> 160
170 <tbody> 161 <input type="hidden" name="uid" value="<?php echo $uid; ?>" />
171 162 <input type="hidden" name="event_id" value="<?php echo $post->ID; ?>" />
172 <?php if (!empty($session_one)):?> 163 <input type="hidden" name="type" value="<?php echo $action; ?>" />
173 <tr> 164
174 <th width="40" style="text-align:right;"><input type="checkbox" name="session_one" value="on" <?php echo (isset($extras['session_one'])) ? "checked" : ""; ?> /></th> 165 <?php if ($action != "edit"): ?>
175 <td><?php echo $session_one; ?></td> 166 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
176 </tr> 167 <div class="dashboard-section-title">HOW TO PROCESS THE REGISTRATION:</div>
177 <?php endif; ?> 168 <div class="dashboard-section-links"></div>
178 169 <div class="dashboard-section-content small">
179 <?php if (!empty($session_two)):?> 170 <select name="status">
180 <tr> 171 <option value="unpaid" <?php echo ($user_event_meta['status']=="unpaid") ? "selected" : ""; ?>>Invoice User</option>
181 <th width="40" style="text-align:right;"><input type="checkbox" name="session_two" value="on" <?php echo (isset($extras['session_two'])) ? "checked" : ""; ?> /></th> 172 <option value="complementary" <?php echo ($user_event_meta['status']=="complementary") ? "selected" : ""; ?>>Complementary</option>
182 <td><?php echo $session_two; ?></td> 173 <option value="visa" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="visa") ? "selected" : ""; ?>>Paid by Prepaid Visa</option>
183 </tr> 174 <option value="mc" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="mc") ? "selected" : ""; ?>>Paid by Prepaid Mastercard</option>
184 <?php endif; ?> 175 <option value="amex" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="amex") ? "selected" : ""; ?>>Paid by Prepaid American Express</option>
185 176 <option value="cheque" <?php echo ($user_event_meta['status']=="paid" && $user_event_meta['extras']['paid_by']=="cheque") ? "selected" : ""; ?>>Paid by Cheque</option>
186 <?php if (!empty($session_three)):?> 177 </select>
187 <tr> 178 </div>
188 <th width="40" style="text-align:right;"><input type="checkbox" name="session_three" value="on" <?php echo (isset($extras['session_three'])) ? "checked" : ""; ?> /></th> 179 </div>
189 <td><?php echo $session_three; ?></td> 180
190 </tr> 181 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
191 <?php endif; ?> 182 <div class="dashboard-section-title">ASSIGN DISCOUNTS:</div>
192 183 <div class="dashboard-section-links"></div>
193 <?php if (!empty($session_four)):?> 184 <div class="dashboard-section-content small">
194 <tr> 185
195 <th width="40" style="text-align:right;"><input type="checkbox" name="session_four" value="on" <?php echo (isset($extras['session_four'])) ? "checked" : ""; ?> /></th> 186 <?php if ( empty($member_discount) && empty($early_bird_discount) ): ?>
196 <td><?php echo $session_four; ?></td> 187 <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>
197 </tr> 188 <?php else: ?>
198 <?php endif; ?> 189
199 190
200 <?php if (!empty($session_five)):?> 191 <table>
201 <tr> 192 <?php if (!empty($member_discount)):
202 <th width="40" style="text-align:right;"><input type="checkbox" name="session_five" value="on" <?php echo (isset($extras['session_five'])) ? "checked" : ""; ?> /></th>
203 <td><?php echo $session_five; ?></td>
204 </tr>
205 <?php endif; ?>
206
207 <?php if (!empty($session_six)):?>
208 <tr>
209 <th width="40" style="text-align:right;"><input type="checkbox" name="session_six" value="on" <?php echo (isset($extras['session_six'])) ? "checked" : ""; ?> /></th>
210 <td><?php echo $session_six; ?></td>
211 </tr>
212 <?php endif; ?>
213 193
214 <?php if (!empty($session_seven)):?> 194 $is_member = ($role=="member" OR $role=="student") ? true : false;
195
196 ?>
215 <tr> 197 <tr>
216 <th width="40" style="text-align:right;"><input type="checkbox" name="session_seven" value="on" <?php echo (isset($extras['session_seven'])) ? "checked" : ""; ?> /></th> 198 <td width="20"><input type="checkbox" id="discount_member" name="discount_member" value="on" <?php echo ($is_member) ? "checked='checked'" : "";?> /></td>
217 <td><?php echo $session_seven; ?></td> 199 <td><label for="discount_member">Student/Member Discount</label></td>
218 </tr> 200 </tr>
219 <?php endif; ?> 201 <?php endif; ?>
220 202
221 <?php if (!empty($session_eight)):?> 203 <?php if (!empty($early_bird_discount)):
222 <tr>
223 <th width="40" style="text-align:right;"><input type="checkbox" name="session_eight" value="on" <?php echo (isset($extras['session_eight'])) ? "checked" : ""; ?> /></th>
224 <td><?php echo $session_eight; ?></td>
225 </tr>
226 <?php endif; ?>
227 204
228 <?php if (!empty($session_nine)):?> 205 $is_eb_avail = (!empty($early_bird_deadline) && $early_bird_deadline > time()) ? true : false;
206
207 ?>
229 <tr> 208 <tr>
230 <th width="40" style="text-align:right;"><input type="checkbox" name="session_nine" value="on" <?php echo (isset($extras['session_nine'])) ? "checked" : ""; ?> /></th> 209 <td width="20"><input type="checkbox" id="discount_earlybird" name="discount_earlybird" value="on" <?php echo ($is_eb_avail) ? "checked='checked'" : ""; ?> /></td>
231 <td><?php echo $session_nine; ?></td> 210 <td><label for="discount_earlybird">Earlybird Discount</label></td>
232 </tr> 211 </tr>
233 <?php endif; ?> 212 <?php endif; ?>
234 213 </table>
235 <?php if (!empty($session_ten)):?> 214 <?php endif; ?>
236 <tr> 215 </div>
237 <th width="40" style="text-align:right;"><input type="checkbox" name="session_ten" value="on" <?php echo (isset($extras['session_ten'])) ? "checked" : ""; ?> /></th>
238 <td><?php echo $session_ten; ?></td>
239 </tr>
240 <?php endif; ?>
241
242 </tbody>
243 </table>
244 </div> 216 </div>
217 <?php endif; ?>
218
219 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
220 <div class="dashboard-section-title">ADDITIONAL NOTES</div>
221 <div class="dashboard-section-links"></div>
222 <div class="dashboard-section-content small">
223 <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>
224 </div>
225 </div>
226
227 <?php
228 if (!empty($show_dietary)): ?>
229 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
230 <div class="dashboard-section-title">SPECIAL DIETARY REQUIREMENTS</div>
231 <div class="dashboard-section-links"></div>
232 <div class="dashboard-section-content small">
233 <textarea name="dietary" class="input-field-css input-large" rows="5" style="width:350px;"><?php echo isset($extras['dietary']) ? $extras['dietary'] : ""; ?></textarea>
234 </div>
235 </div>
236 <?php endif; ?>
237
238 <?php if (!empty($mealopt_description) || !empty($mealopt_one) || !empty($mealopt_two) || !empty($mealopt_three) || !empty($mealopt_four)):?>
239
240 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
241 <div class="dashboard-section-title">MEAL OPTIONS</div>
242 <div class="dashboard-section-links"></div>
243 <div class="dashboard-section-content small">
244 <?php if (!empty($mealopt_description)) { echo "<div><strong>".$mealopt_description."</strong></div>"; } ?>
245 <table class="clean no-left-padding">
246 <tbody>
247 <?php if (!empty($mealopt_one) && $mealopt_one != ""):?>
248 <tr>
249 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_one" value="on" <?php echo (isset($extras['mealopt_one'])) ? "checked" : ""; ?> /></th>
250 <td><?php echo $mealopt_one; ?></td>
251 </tr>
252 <?php endif; ?>
253
254 <?php if (!empty($mealopt_two) && $mealopt_two != ""):?>
255 <tr>
256 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_two" value="on" <?php echo (isset($extras['mealopt_two'])) ? "checked" : ""; ?> /></th>
257 <td><?php echo $mealopt_two; ?></td>
258 </tr>
259 <?php endif; ?>
260
261 <?php if (!empty($mealopt_three) && $mealopt_three != ""):?>
262 <tr>
263 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_three" value="on" <?php echo (isset($extras['mealopt_three'])) ? "checked" : ""; ?> /></th>
264 <td><?php echo $mealopt_three; ?></td>
265 </tr>
266 <?php endif; ?>
267
268 <?php if (!empty($mealopt_four) && $mealopt_four != ""):?>
269 <tr>
270 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_four" value="on" <?php echo (isset($extras['mealopt_four'])) ? "checked" : ""; ?> /></th>
271 <td><?php echo $mealopt_four; ?></td>
272 </tr>
273 <?php endif; ?>
274
275 <?php if (!empty($mealopt_five) && $mealopt_five != ""):?>
276 <tr>
277 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_five" value="on" <?php echo (isset($extras['mealopt_five'])) ? "checked" : ""; ?> /></th>
278 <td><?php echo $mealopt_five; ?></td>
279 </tr>
280 <?php endif; ?>
281
282 <?php if (!empty($mealopt_six) && $mealopt_six != ""):?>
283 <tr>
284 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_six" value="on" <?php echo (isset($extras['mealopt_six'])) ? "checked" : ""; ?> /></th>
285 <td><?php echo $mealopt_six; ?></td>
286 </tr>
287 <?php endif; ?>
288
289 <?php if (!empty($mealopt_seven) && $mealopt_seven != ""):?>
290 <tr>
291 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_seven" value="on" <?php echo (isset($extras['mealopt_seven'])) ? "checked" : ""; ?> /></th>
292 <td><?php echo $mealopt_seven; ?></td>
293 </tr>
294 <?php endif; ?>
295
296 <?php if (!empty($mealopt_eight) && $mealopt_eight != ""):?>
297 <tr>
298 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_eight" value="on" <?php echo (isset($extras['mealopt_eight'])) ? "checked" : ""; ?> /></th>
299 <td><?php echo $mealopt_eight; ?></td>
300 </tr>
301 <?php endif; ?>
302
303 <?php if (!empty($mealopt_nine) && $mealopt_nine != ""):?>
304 <tr>
305 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_nine" value="on" <?php echo (isset($extras['mealopt_nine'])) ? "checked" : ""; ?> /></th>
306 <td><?php echo $mealopt_nine; ?></td>
307 </tr>
308 <?php endif; ?>
309
310 <?php if (!empty($mealopt_ten) && $mealopt_ten != ""):?>
311 <tr>
312 <th width="40" style="text-align:right;"><input type="checkbox" name="mealopt_ten" value="on" <?php echo (isset($extras['mealopt_ten'])) ? "checked" : ""; ?> /></th>
313 <td><?php echo $mealopt_ten; ?></td>
314 </tr>
315 <?php endif; ?>
316
317
318 </tbody>
319 </table>
320 </div>
321 </div>
322 <?php endif; ?>
323
324 <?php if (!empty($session_description) || !empty($session_one) || !empty($session_two) || !empty($session_three) || !empty($session_four) || !empty($session_five) || !empty($session_six)):?>
325 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
326 <div class="dashboard-section-title">SESSION OPTIONS</div>
327 <div class="dashboard-section-links"></div>
328 <div class="dashboard-section-content small">
329 <?php if (!empty($session_description)) { echo "<div><strong>".$session_description."</strong></div>"; } ?>
330 <table class="clean no-left-padding">
331 <tbody>
332
333 <?php if (!empty($session_one)):?>
334 <tr>
335 <th width="40" style="text-align:right;"><input type="checkbox" name="session_one" value="on" <?php echo (isset($extras['session_one'])) ? "checked" : ""; ?> /></th>
336 <td><?php echo $session_one; ?></td>
337 </tr>
338 <?php endif; ?>
339
340 <?php if (!empty($session_two)):?>
341 <tr>
342 <th width="40" style="text-align:right;"><input type="checkbox" name="session_two" value="on" <?php echo (isset($extras['session_two'])) ? "checked" : ""; ?> /></th>
343 <td><?php echo $session_two; ?></td>
344 </tr>
345 <?php endif; ?>
346
347 <?php if (!empty($session_three)):?>
348 <tr>
349 <th width="40" style="text-align:right;"><input type="checkbox" name="session_three" value="on" <?php echo (isset($extras['session_three'])) ? "checked" : ""; ?> /></th>
350 <td><?php echo $session_three; ?></td>
351 </tr>
352 <?php endif; ?>
353
354 <?php if (!empty($session_four)):?>
355 <tr>
356 <th width="40" style="text-align:right;"><input type="checkbox" name="session_four" value="on" <?php echo (isset($extras['session_four'])) ? "checked" : ""; ?> /></th>
357 <td><?php echo $session_four; ?></td>
358 </tr>
359 <?php endif; ?>
360
361 <?php if (!empty($session_five)):?>
362 <tr>
363 <th width="40" style="text-align:right;"><input type="checkbox" name="session_five" value="on" <?php echo (isset($extras['session_five'])) ? "checked" : ""; ?> /></th>
364 <td><?php echo $session_five; ?></td>
365 </tr>
366 <?php endif; ?>
367
368 <?php if (!empty($session_six)):?>
369 <tr>
370 <th width="40" style="text-align:right;"><input type="checkbox" name="session_six" value="on" <?php echo (isset($extras['session_six'])) ? "checked" : ""; ?> /></th>
371 <td><?php echo $session_six; ?></td>
372 </tr>
373 <?php endif; ?>
374
375 <?php if (!empty($session_seven)):?>
376 <tr>
377 <th width="40" style="text-align:right;"><input type="checkbox" name="session_seven" value="on" <?php echo (isset($extras['session_seven'])) ? "checked" : ""; ?> /></th>
378 <td><?php echo $session_seven; ?></td>
379 </tr>
380 <?php endif; ?>
381
382 <?php if (!empty($session_eight)):?>
383 <tr>
384 <th width="40" style="text-align:right;"><input type="checkbox" name="session_eight" value="on" <?php echo (isset($extras['session_eight'])) ? "checked" : ""; ?> /></th>
385 <td><?php echo $session_eight; ?></td>
386 </tr>
387 <?php endif; ?>
388
389 <?php if (!empty($session_nine)):?>
390 <tr>
391 <th width="40" style="text-align:right;"><input type="checkbox" name="session_nine" value="on" <?php echo (isset($extras['session_nine'])) ? "checked" : ""; ?> /></th>
392 <td><?php echo $session_nine; ?></td>
393 </tr>
394 <?php endif; ?>
395
396 <?php if (!empty($session_ten)):?>
397 <tr>
398 <th width="40" style="text-align:right;"><input type="checkbox" name="session_ten" value="on" <?php echo (isset($extras['session_ten'])) ? "checked" : ""; ?> /></th>
399 <td><?php echo $session_ten; ?></td>
400 </tr>
401 <?php endif; ?>
402
403 </tbody>
404 </table>
405 </div>
406 </div>
407 <?php endif; ?>
408
409
410 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
411 <div class="dashboard-section-title"></div>
412 <div class="dashboard-section-links"></div>
413 <div class="dashboard-section-content small">
414 <div><input type="submit" value="<?php echo ($action=="edit") ? "Update" : "Register"; ?>" /></div>
415 </div>
416 </div>
417
418 </form>
245 </div> 419 </div>
246 <?php endif; ?> 420 <div style="clear:both;"></div>
247
248
249 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
250 <div class="dashboard-section-title"></div>
251 <div class="dashboard-section-links"></div>
252 <div class="dashboard-section-content small">
253 <div><input type="submit" value="<?php echo ($action=="edit") ? "Update" : "Register"; ?>" /></div>
254 </div>
255 </div>
256 421
257 </form>
258 </div> 422 </div>
259 </body> 423 </body>
260 </html> 424 </html>
...\ No newline at end of file ...\ No newline at end of file
......