0){ if(!isset($_SESSION["adminon"])){ if(isset($_POST['currentparty']) and $_POST["currentparty"] != 'select...'){ $_SESSION["currentparty"] = $myparties[stripslashes($_POST["currentparty"])]; $_REQUEST["summary"] = 1; $subnavset = '4'; } } } } if(isset($_REQUEST["editpartyspecs"]) or isset($_POST["update"])) $subnavset = '1'; if(isset($_REQUEST["editacts"])) $subnavset = '2'; if(isset($_REQUEST["editextras"])) $subnavset = '3'; if(isset($_REQUEST["addact"])) $subnavset = '2'; if(isset($_REQUEST["removeact"])) $subnavset = '2'; if(isset($_REQUEST["summary"])) $subnavset = '4'; if(isset($_REQUEST["bookit"])) $subnavset = '4'; if(isset($_REQUEST["bookit2"])) $subnavset = '4'; if(isset($_REQUEST["editparticipants"])) $subnavset = '5'; if(isset($_REQUEST["editkid"])) $subnavset = '5'; if(isset($_REQUEST["deletekid"])) $subnavset = '5'; if(isset($_REQUEST["deletemekidid"])) $subnavset = '5'; if(isset($_REQUEST["undeletekids"])) $subnavset = '5'; if(isset($_REQUEST["undeleteid"])) $subnavset = '5'; if(isset($_REQUEST["update_address"])) $subnavset = '1'; if(isset($_REQUEST["dorosee"])){ // $subnavset = '1'; $_REQUEST["help"] = 1; } if(!isset($_SESSION["adminon"]) and isset($_POST['currentparty']) and $_POST["currentparty"] != 'select...') $subnavset = '4'; if(isset($_REQUEST["topnavset"])) $topnavset = $_REQUEST["topnavset"]; // if($_SESSION["dorosee"] != 1){ if(isset($_SESSION["currentparty"])){ $query = "select requested,booked,locked from $parties where $party_id = '$_SESSION[currentparty]'"; // echo $query; $result =mysql_query($query); $requested = mysql_result($result,0,"requested"); $booked = mysql_result($result,0,"booked"); $locked = mysql_result($result,0,"locked"); if($requested != '')$partyrequested = 1; if($locked != ''){ $partylocked = 1; unset($_REQUEST["editpartyspecs"]); unset($_REQUEST["editacts"]); unset($_REQUEST["editextras"]); unset($_REQUEST["editparticipants"]); if(!isset($_REQUEST["help"]) and !isset($_REQUEST["gotools"])){ $_REQUEST["summary"] = 1; $subnavset = '4'; } else $subnavset = 'main'; } } // } if(isset($_REQUEST["gotools"]) and $partyrequested == '1') $subnavset = '6'; include_once ('./includes/header.php'); include_once ("./includes/programs_nav.inc"); // include_once("./includes/bday_subnav.inc"); function addparty($userid,$userfullname){ global $parties,$user_id; $query = "select * from $parties where $user_id = '$userid'"; // echo $query; $result = mysql_query($query); $num = mysql_numrows($result); $next = $num + 1; $query = "insert into $parties set $user_id = '$userid', name = '$userfullname party $next', date = now(), time = now(), participants = 0"; // echo $query; mysql_query($query); $newpartyid = mysql_insert_id(); $_SESSION["currentparty"] = $newpartyid; } $PHP_SELF = $_SERVER["PHP_SELF"]; $magicquotes = get_magic_quotes_gpc(); // print_r($_SESSION); if($_SESSION["adminon"] == 1 and (isset($_REQUEST["addclientparty"]) or (isset($_REQUEST["editpartyspecs"]) and isset($clientpartycount) and $clientpartycount == 0))){ $clientid = $_SESSION["clientid"]; $clientname = $_SESSION["clientname"]; echo "from here

"; addparty($clientid,$clientname); // $_SESSION["currentparty"] = mysql_insert_id(); } // echo "Uid = $userid, name = $userfullname"; $query = "select * from $parties where $user_id = '$userid'"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)){ $myparties[$row['name']] = $row["$party_id"]; } $mypartycount = count($myparties); if($_SESSION["adminon"] != 1 and (isset($_REQUEST["addparty"]) or $mypartycount == 0)){ addparty($userid,$userfullname); if(isset($_REQUEST["addparty"])) $_REQUEST["editpartyspecs"] = '1'; $_SESSION["currentparty"] = mysql_insert_id(); } $query = "select * from $parties where $user_id = '$userid'"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)){ $myparties[$row['name']] = $row["$party_id"]; } $mypartycount = count($myparties); if(isset($_SESSION["clientid"])){ $query = "select * from $parties where $user_id = $_SESSION[clientid]"; $result = mysql_query($query); $clientpartycount = mysql_numrows($result); $query = "select concat_ws(' ',first,last) as clientname from users where users_id = '$_SESSION[clientid]'"; // echo $query; $result = mysql_query($query); $clientname = mysql_result($result,0,"clientname"); $_SESSION["clientname"] = $clientname; } if($_SESSION["adminon"] != 1 and $mypartycount == 1){ $arrayvals = array_values($myparties); $_SESSION["currentparty"] = $arrayvals[0]; if(!isset($_SESSION["editextras"]) and !isset($_REQUEST["editacts"]) and !isset($_REQUEST["editpartyspecs"]) and !isset($_REQUEST["addact"]) and !isset($_REQUEST["removeact"]) and !isset($_POST["update"]) and !isset($_REQUEST["help"]) and !isset($_REQUEST["editextras"]) and !isset($_POST["editextras"]) and !isset($_REQUEST["gotools"]) and !isset($_REQUEST["editparticipants"])){ $_REQUEST["summary"] = 1; } } if(!isset($_POST["create"])){ echo "

"; echo ""; echo << Welcome $userfullname. eod; if($_SESSION["dorosee"] != 1){ if($userlevel == 5) echo " admin"; echo <<Last login: $lastlogon.
[ change password ] [ log out ] eod; } } if($_SESSION["dorosee"] != 1){ if($mypartycount > 0){ if(!isset($_SESSION["adminon"])){ if(isset($_POST['currentparty']) and $_POST["currentparty"] != 'select...'){ $_SESSION["currentparty"] = $myparties[stripslashes($_POST["currentparty"])]; $_REQUEST["summary"] = 1; $subnavset = '4'; } $party = "party"; if($mypartycount > 1) $party = "parties"; if(!isset($_POST["create"])){ /* echo << You have $mypartycount stored $party eod; */ // print_r($_REQUEST); // print_r($_SESSION); echo <<
Select Event'; } echo <<
eod; } } // print_r($_SESSION); $addpartymsg = ''; if(!isset($_POST["create"])){ if($_SESSION["adminon"] == '1' and isset($_SESSION["clientid"])){ $addpartymsg = "currently working on client $_SESSION[clientname]"; $addpartylink = ""; } else $addpartylink = ""; echo " $addpartymsg [ $addpartylink add a party ] "; } } else{ echo " You are working on a temporary party. log in to save your work."; $_SESSION["currentparty"] = $session; } echo ""; echo ""; // print_r($_REQUEST); include_once("./includes/bday_subnav.inc"); $missing = array(); if(isset($_POST["bookit2"]) or isset($_POST["updateaddress"])){ // first verify all input if($_SESSION["dorosee"] == '1'){ if($_POST["booker_first"] == ''){ $missing[] = 'First Name'; } if($_POST["booker_last"] == ''){ $missing[] = 'Last Name'; } if($_POST["booker_email"] == ''){ $missing[] = 'Email'; } if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST["booker_email"])){ $missing[] = 'Email'; } } if($_POST["address"] == ''){ $missing[] = 'Address'; } if($_POST["city"] == ''){ $missing[] = 'City'; } if($_POST["state"] == ''){ $missing[] = 'State'; } if($_POST["zip"] == ''){ $missing[] = 'Zip'; } if($_POST["phone"] == ''){ $missing[] = 'Phone'; } if($_POST["party_venue"] != '' or $_POST["party_address"] != '' or $_POST["party_city"] != '' or $_POST["party_state"] != '' or $_POST["party_zip"] != '' or $_POST["party_phone"] != ''){ if($_POST["party_venue"] == ''){ $missing[] = 'Party Venue'; } if($_POST["party_address"] == ''){ $missing[] = 'Party Address'; } if($_POST["party_city"] == ''){ $missing[] = 'Party City'; } if($_POST["party_state"] == ''){ $missing[] = 'Party State'; } if($_POST["party_zip"] == ''){ $missing[] = 'Party Zip'; } if($_POST["party_phone"] == ''){ $missing[] = 'Party Phone'; } } if(count($missing) != 0){ foreach ($_POST as $key => $val){ $row[$key] = $val; } if(isset($_POST["bookit2"])) $_POST["bookit"] = 1; if(isset($_REQUEST["updateaddress"])) $_REQUEST["update_address"] = 1; $retry = 1; } else{ foreach($_POST as $key => $val){ $_POST[$key] = addslashes($val); } if(isset($_SESSION["clientid"])) $query = "update users set address = '$_POST[address]', city = '$_POST[city]', state = '$_POST[state]', zip = '$_POST[zip]', phone = '$_POST[phone]' where users_id = '$_SESSION[clientid]'"; else $query = "update users set address = '$_POST[address]', city = '$_POST[city]', state = '$_POST[state]', zip = '$_POST[zip]', phone = '$_POST[phone]' where email = '$_SESSION[uid]'"; mysql_query($query) or die(mysql_error()); if($_POST["party_address"] != ''){ $query = "update $parties set party_venue = '$_POST[party_venue]', party_address = '$_POST[party_address]', party_city = '$_POST[party_city]', party_state = '$_POST[party_state]', party_zip = '$_POST[party_zip]', party_phone = '$_POST[party_phone]'"; if($_SESSION["dorosee"] == '1') $query .= ",booker_first = '$_POST[booker_first]', booker_last = '$_POST[booker_last]', booker_email = '$_POST[booker_email]'"; $query .= " where $party_id = '$_SESSION[currentparty]'"; } else{ $query = "update $parties set party_venue = 'same as above', party_address = '$_POST[address]', party_city = '$_POST[city]', party_state = '$_POST[state]', party_zip = '$_POST[zip]', party_phone = '$_POST[phone]'"; if($_SESSION["dorosee"] == '1') $query .= ",booker_first = '$_POST[booker_first]', booker_last = '$_POST[booker_last]', booker_email = '$_POST[booker_email]'"; $query .= " where $party_id = '$_SESSION[currentparty]'"; } // echo $query; mysql_query($query) or die(mysql_error()); if(isset($_POST["bookit2"])){ $partyid = $_SESSION["currentparty"]; $query = "select * from $parties where $party_id = '$partyid'"; $result = mysql_query($query); $list = mysql_fetch_array($result); // extract($list); $query = "update $parties set requested = now() where $party_id = '$partyid'"; mysql_query($query); $from = "From: bookings@cirqueamongus.com\n"; $repto = "Reply-To: info@cirqueamongus.com\n"; $xmail = "X-Mailer: PHP/" .phpversion(); $xtrahdrs = $from.$repto.$xmail; $to = $uid; $subject = "Your Cirque Amongus Event"; $message = "Dear $userfullname:\nYour request for $list[name] on $list[date] at $list[time] has been logged.\nYou will receive a confirmation after availability of your requested date and acts have been confirmed.\n\nThank You\n\n Cirque Amongus Event Planner"; // if($_POST["bookit"] == 'Update') $message = "Dear $userfullname:\n Your update to $name on $date at $time has been logged.\nYou will receive a confirmation after availability of your requested date and acts have been confirmed.\n\nThank You\n\n Cirque Amongus Party Planner"; mail($to,$subject,$message,$xtrahdrs); mail('info@cirqueamongus.com','birthday party request logged',"party id: $list[partyid]\nparty name: $list[name]\ndate: $list[date]\ntime:$list[time]\nparticipants: $list[participants]",$xtrahdrs); unset($_SESSION["currentparty"]); $conftext = "Your request for $list[name] on $list[date] at $list[time] has been logged.

You will receive a confirmation after availability of your requested date and acts have been confirmed."; if($_POST["bookit"] == 'Update') $conftext = "Your update to $list[name] on $list[date] at $list[time] has been logged.

You will receive a confirmation after availability of your requested date and acts have been confirmed."; echo "

4

"; echo <<Request sent successfully eod; echo ""; echo $conftext; echo ""; echo "

>>>Next, Enter the names of the Participants>>>

"; } else{ unset($_REQUEST["update_address"]); $_REQUEST["editpartyspecs"] = 1; } } } if(isset($_POST["bookit"]) or isset($_REQUEST["update_address"])){ $mystep = 4; if(isset($_REQUEST["update_address"])) $mystep = 1; $partyid = $_SESSION["currentparty"]; // print_r($_SESSION); $partyid = $_SESSION["currentparty"]; if(isset($_SESSION["clientid"])) $query = "select * from users left join $parties on $parties.$user_id = users.users_id where users_id = '$_SESSION[clientid]' and $party_id = '$partyid'"; else $query = "select * from users left join $parties on $parties.$user_id = users.users_id where email = '$_SESSION[uid]' and $party_id = '$partyid'"; $confirm = 'supply'; // echo $query; $result = mysql_query($query); $row2 = mysql_fetch_assoc($result); if($row2["address"] != '') $confirm = 'update / confirm'; echo "

$mystep

Please $confirm the contact information below:

"; if(count($missing) > 0){ echo "Please fill in / correct the required fields marked in red:
"; // $list = implode('
',$missing); // echo "$list"; echo "
"; echo "

"; } else $row = $row2; echo <<Billing Address (this is where we will send the contract) eod; echo ""; echo "

"; echo << eod; if($_SESSION["dorosee"] == '1'){ echo ""; if(in_array('First Name',$missing)) echo ""; echo "First Name"; if(in_array('First Name',$missing)) echo ""; echo ""; echo ""; if(in_array('Last Name',$missing)) echo ""; echo "Last Name"; if(in_array('Last Name',$missing)) echo ""; echo ""; echo ""; if(in_array('Email',$missing)) echo ""; echo "Email"; if(in_array('Email',$missing)) echo ""; echo ""; } echo""; if(in_array('Address',$missing)) echo ""; echo "Address"; if(in_array('Address',$missing)) echo ""; echo ""; echo ""; if(in_array('City',$missing)) echo ""; echo "City"; if(in_array('City',$missing)) echo ""; echo ""; echo ""; if(in_array('State',$missing)) echo ""; echo "State"; if(in_array('State',$missing)) echo ""; echo ""; echo ""; if(in_array('Zip',$missing)) echo ""; echo "Zip"; if(in_array('Zip',$missing)) echo ""; echo ""; echo ""; if(in_array('Phone',$missing)) echo ""; echo "Phone"; if(in_array('Phone',$missing)) echo ""; echo ""; // if($activity_center != 0){ echo ""; echo ""; // } $query = "select * from $parties where $party_id = '$partyid'"; $result = mysql_query($query); $activity_center = mysql_result($result,0,"activity_center"); $eventtype = mysql_result($result,0,"event_name"); if($activity_center == 0){ echo "$eventtype Address (this is where the $eventtype will be held. Leave blank if same as above)"; echo ""; echo << Venue eod; echo ""; if(in_array('Party Address',$missing)) echo ""; echo "Address"; if(in_array('Party Address',$missing)) echo ""; echo ""; echo ""; if(in_array('Party City',$missing)) echo ""; echo "City"; if(in_array('Party City',$missing)) echo ""; echo ""; echo ""; if(in_array('Party State',$missing)) echo ""; echo "State"; if(in_array('Party State',$missing)) echo ""; echo ""; echo ""; if(in_array('Party Zip',$missing)) echo ""; echo "Zip"; if(in_array('Party Zip',$missing)) echo ""; echo ""; echo ""; if(in_array('Party Phone',$missing)) echo ""; echo "Phone"; if(in_array('Party Phone',$missing)) echo ""; echo ""; if(isset($_REQUEST["update_address"])) echo ""; else echo ""; } else{ if(isset($_REQUEST["update_address"])) echo ""; else echo ""; $query = "select * from activity_centers where center_id = '$activity_center'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); echo "$eventtype Address:"; echo ""; echo ""; echo "Cirque Amongus
$row[center_name]
$row[center_address]
$row[center_city], $row[center_state] $row[center_zip]
$row[center_phone]"; echo ""; echo ""; } if($activity_center == 0){ echo << eod; } echo ""; } else{ if(!isset($_POST["update"]) and !isset($_POST["create"]) and !isset($_REQUEST["editpartyspecs"]) and !isset($_REQUEST["editacts"]) and !isset($_REQUEST["editextras"]) and !isset($_REQUEST["summary"]) and !isset($_REQUEST["editparticipants"]) and !isset($_REQUEST["gotools"]) and !isset($_REQUEST["addact"]) and !isset($_REQUEST["removeact"]) and !isset($_REQUEST["editkid"]) and !isset($_REQUEST["editextras"]) and !isset($_REQUEST["deletekid"]) and !isset($_REQUEST["deletemekidid"]) and !isset($_REQUEST["undeletekids"]) and !isset($_REQUEST["undeleteid"]) and !isset($_REQUEST["bookit2"]) and !isset($_REQUEST["bookit"])){ echo <<Create your personalized event

Follow the six steps along the top to easily set up all details about your event.

eod; if($_SESSION["dorosee"] != 1) echo "Your work is automatically saved at every step so you can go back and forth between steps or leave and return to continue where you left off at a different time."; else echo "Since you are not logged in, your work will only be saved for as long as you keep your browser window open. You can sign in and have your progress saved at any time. Then, you will be able to leave and return to continue where you left off at a different time.

"; echo <<There is no commitment to book an event. You only submit a formal request for a date when you click on the submit button on the summary / confirmation page (step 4). At that time we will send you a contract and your date will be reserved pending receipt of your deposit. A 20% deposit is due with the signed contract. The balance is due on the day of the event before setup starts.

You can still make changes other than date & time until your event is locked in about a week before the event date.

>>> work on your event now >>>

eod; } echo "
"; if(!isset($_SESSION["currentparty"])){ if(!isset($_POST["bookit2"])){ echo "

Please select an event first

"; } echo "
"; if(isset($_SESSION["adminon"])){ include_once('./admin.php'); } } else{ include_once("./edit_party.php"); } } include_once ('./includes/footer.inc'); ?>