Created
July 17, 2013 21:44
-
-
Save naeluh/6024817 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$specialevents = array(); | |
if ($reserv_status == "success") { | |
// print the confirmation form that will then input the event into the database | |
unset($toemails); | |
$spevent = new event; | |
$spevent->id = $_POST["id"]; | |
if (isset($recurrence->groupid)) { | |
$spevent->groupid = $recurrence->groupid; | |
} else { | |
$spevent->groupid = ''; | |
} | |
$spevent->groupid = $recurrence->groupid; | |
$spevent->event_name = $_POST['event_name']; | |
$spevent->b_day = $mybday; | |
$spevent->b_month = $mybmonth; | |
$spevent->b_year = $mybyear; | |
$spevent->b_time = $b_time; | |
$spevent->b_time2 = $b_time2; | |
$spevent->b_tindex = $b_tindex; | |
$spevent->e_day = $myeday; | |
$spevent->e_month = $myemonth; | |
$spevent->e_year = $myeyear; | |
$spevent->e_time = $e_time; | |
$spevent->e_time2 = $e_time2; | |
$spevent->e_tindex = $e_tindex; | |
$spevent->locations = ""; | |
$spevent->locations_text = ""; | |
foreach ($locations_order as $mylocation) { | |
$loc_var = "location" . $mylocation->location_id; | |
if ($loc_status[$loc_var] == "selected") { | |
$spevent->locations .= $loc_var . ","; | |
$spevent->locations_text .= $mylocation->location_name . ", "; | |
$approver1 = $mylocation->approver1; | |
$approver2 = $mylocation->approver2; | |
$approver3 = $mylocation->approver3; | |
$toemails[] = $approver1->email; | |
if (!empty($approver2->email)) { | |
$toemails[] = $approver2->email; | |
} | |
if (!empty($approver3->email)) { | |
$toemails[] = $approver3->email; | |
} | |
} | |
} // END foreach | |
$spevent->vendors = $_POST['vendors']; | |
$spevent->setup_needs = $_POST['setup_needs']; | |
$spevent->request_name = $_POST['request_name']; | |
$spevent->request_email = $_POST['request_email']; | |
$spevent->appr_emails = ""; | |
foreach ($toemails as $myemail) { | |
$spevent->appr_emails .= $myemail . ","; | |
} | |
$spevent->approval = "pending"; | |
$successes += 1; | |
foreach ($spevent as $spevents) { | |
$specialevents[] = $spevents; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment