[insert_php] if(!isset($_GET[‘event’])){ echo ‘‘; } $eventID = $_GET[‘event’]; $successText = ”; $warningText = ”; $event = getEventByEventID($_POST[‘eventID’]); if($event){ $orgPhone = trimPhone($_POST[‘organizationPhoneField’]); $orgName = $_POST[‘organizationNameField’]; $orgAddress = $_POST[‘organizationAddressField’]; $orgCity = $_POST[‘organizationCityField’]; $orgState = strtoupper($_POST[‘organizationStateField’]); $orgZip = $_POST[‘organizationZipField’]; $contactEmail = $_POST[‘contactEmailField’]; $contactFirstName = $_POST[‘contactFirstNameField’]; $contactLastName = $_POST[‘contactLastNameField’]; $contactPhone = trimPhone($_POST[‘contactPhoneField’]); $numberTables = $_POST[‘numberTablesField’]; $numberLunches = $_POST[‘numberLunchesField’]; $comments = $_POST[‘commentsField’]; $organization = getOrganizationByPhone($orgPhone); $orgFieldArray = array(‘name’,’address’,’city’,’state’,’zip’,’phone’); $orgValueArray = array($orgName,$orgAddress,$orgCity,$orgState,$orgZip,$orgPhone); if($organization){ updateValues(‘Organizations’,’organizationID’,$organization->organizationID,$orgFieldArray,$orgValueArray); }else{ insertValues(‘Organizations’,$orgFieldArray,$orgValueArray); } $organization = getOrganizationByPhone($orgPhone); $vendorContactFieldArray = array( ‘organization_id’, ‘contactEmail’, ‘contactFirstName’, ‘contactLastName’, ‘contactPhone’); $vendorContactValueArray = array( $organization->organizationID, $contactEmail, $contactFirstName, $contactLastName, $contactPhone); insertValues(‘Vendors’,$vendorContactFieldArray,$vendorContactValueArray); $vendorEventFieldArray = array( ‘organization_id’, ‘contactEmail’, ‘contactFirstName’, ‘contactLastName’, ‘contactPhone’); $vendorEvent (combine ValueArray = array( $organization->organizationID, $contactEmail, $contactFirstName, $contactLastName, $contactPhone); insertValues(‘Vendors’,$vendorContactFieldArray,$vendorContactValueArray); $successText = ‘Thank you for submitting a vendor application. You will hear back from us with additional details as the event gets closer.’; } echo ‘‘ . $warningText . ‘‘; echo ‘‘ . $successText . ‘‘; [/insert_php]
[insert_php] formSectionTitle(‘Organization Information’); formTextField(‘organizationPhone’ ,’Phone’ ,” ,1 ,15); formTextField(‘organizationName’ ,’Name’ ,” ,2 ,100); formTextField(‘organizationAddress’ ,’Address’ ,” ,1 ,50); formTextField(‘organizationCity’ ,’City’ ,” ,2 ,50); formTextField(‘organizationState’ ,’State’ ,” ,1 ,2); formTextField(‘organizationZip’ ,’Zip’ ,” ,2 ,5); formSectionTitle(‘Point of Contact Information’); formTextField(‘contactEmail’ ,’E-mail’ ,” ,1 ,75); formTextField(‘contactFirstName’ ,’First Name’ ,” ,2 ,50); formTextField(‘contactLastName’ ,’Last Name’ ,” ,1 ,50); formTextField(‘contactPhone’ ,’Phone’ ,” ,2 ,15); formSectionTitle(‘Event Details’); formDropDown(‘numberTables’ ,’Number of Tables’ ,” ,1 ,array(‘1′,’2’),array(‘1 (\$60)’,’2 (\$100)’)); formTextField(‘numberLunches’ ,’Number of Lunches ($20 each)’ ,” ,2 ,10); formTextArea(‘comments’ ,’Additional Requests (power strip, etc.)’ ,” ,1 ,10, 30); [/insert_php]