Skip to content

Instantly share code, notes, and snippets.

@naeluh
Created July 17, 2013 00:14
Show Gist options
  • Save naeluh/6016471 to your computer and use it in GitHub Desktop.
Save naeluh/6016471 to your computer and use it in GitHub Desktop.
if (count($specialevents) > 0) {
foreach ($specialevents as $myspevent) {
$conf = "Event Name: <b>" .$myspevent->event_name . "</b><br>";
$conf .= "Group ID: <b>" . $myspevent->groupid . "</b><br>";
$conf .= "Dates: <b>" . $myspevent->b_month . "/" . $myspevent->b_day . "/" . $myspevent->b_year . "</b><br>";
if ($nextdayend == "sameday") {
$conf .= "Times: <b> ". $myspevent->b_time . $myspevent->b_time2 . " - " . $myspevent->e_time . $myspevent->e_time2 . "</b><br>";
} else {
$conf .= "Times: <b> ". $myspevent->b_time . $myspevent->b_time2 . " - " . $myspevent->e_time . $myspevent->e_time2 . " Next Day" . "</b><br>";
}
$conf .= "Locations: <b>" . $myspevent->locations_text . "</b><br>";
$conf .= "Vendors: " . $myspevent->vendors . "<br>";
$conf .= "Set Up Needs: " . $myspevent->setup_needs . "<br>";
$conf .= "Requested by: " . $myspevent->request_name . "; " . $myspevent->request_email . "";
$conf .= $exec_office_txt;
if (isset($_POST['status']) && $_POST['status'] != "edit") {
print "<br><div class='instructions'><span class='blacktext'><b>SUMMARY - Don't Forget to Finilize Your Request Below</b><br>The Following Events can be successfully booked: <br>$conf<br></span></div><br><br>";
} else {
print "<br><div class='instructions'><span class='blacktext'><br><b>SUMMARY - Don't Forget to Finilize Your Request Below</b><br>The Following Events can be successfully updated: <br>$conf<br></span></div><br><br>";
}
} // END foreach
$hidden_form = '<form action="specialevents_confirm.php?mode=input" method="post" name="addevent" id="addevent">';
$event_count = 0;
foreach ($specialevents as $myevent) {
$event_count ++;
foreach ($myevent as $key => $value) {
$hidden_form .= '<input type="hidden" name="eventcount' . $event_count . '_' . $key . '" id="' . $event_count . '_' . $key . '" value="' . $value . '">';
//print "Total: " . $myevent[$key] . "; Key: " . $key . "; Value: " . $value . "<br>";
}
} // END foreach
if ($frequency != '') {
foreach ($recurrence as $key => $value) {
$hidden_form .= '<input type="hidden" name="' . $key . '" id="' . $key . '" value="' . $value . '">';
//print "Total: " . $myevent[$key] . "; Key: " . $key . "; Value: " . $value . "<br>";
}
} // END IF
$hidden_form .= '<input type="hidden" name="eventcount" id="eventcount" value="' . $event_count . '">';
if (isset($_POST['status'])) {
$hidden_form .= '<input type="hidden" name="status" id="status" value="' . $_POST['status'] . '">';
} else {
$hidden_form .= '<input type="hidden" name="status" id="status" value="">';
}
$hidden_form .= '<input type="hidden" name="username" id="username" value="' . $_POST['request_name'] . '">';
$hidden_form .= '<div class="instructions"><span class="black14"><a href="#" onClick="javascript:document.addevent.submit();"><strong>Click here to FINILIZE YOUR RESERVATION</strong></a></span></div> or <div class="instructions"><span class="black14"><a href="javascript:history.back()">Go Back to make edits to your request</a></span></div></form>';
print $hidden_form;
}
else {
print "<br><div class='instructions'><span class='blacktext'>The events you requested cannot be booked because of overlap with existing reservations. <br><strong><a href='javascript:history.back()'>Please go back and revise your request</a></strong>. <br>Thank you.</span></div>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment