testapp

<?php /* Data Acquisition Form Written by Kevin Olson */
error_reporting(E_ERROR | E_PARSE );
function sanityCheck($string, $type, $minlength, $maxlength, $extraValidation){
// returns -1 for success   // returns -2 for wrong type   // returns -3 for too long   // returns -4 for too short   // returns -5 for extra validation failed
// now we see if the string is too short   if(strlen($string) < $minlength && $minlength > 0){      return -4;   }
// then we check if the string is too long   if(strlen($string) > $maxlength && $maxlength > 0){      return -3;   }
if($extraValidation != '' && $extraValidation != 'CheckString'){      switch ($extraValidation){         case 'CheckDate':            if(!validateDate($string,'MM-DD-YYYY')){return -5;}else{return -1;}            break;         case 'CheckEmail':            if(!checkEmail($string)){return -5;}else{return -1;}            break;      }   }
// if all is well, we return TRUE         return -1;   }

/**      * This function checks if an email address in a valid format      *      * @access private      *      * @param string $email The email address to check   *      * return bool      */      function checkEmail($email){      return (preg_match('/^\S+@[\w\d.-]{2,}\.[\w]{2,6}$/iU', $email) ? TRUE : FALSE) && (strlen($email)>5);}
/**      *      * Validate a date      *      * @param    string    $date      * @param    string    format      * @return    bool      *      */function validateDate( $date, $format='YYYY-MM-DD'){   switch( $format ){      case 'YYYY/MM/DD':      case 'YYYY-MM-DD':         list( $y, $m, $d ) = preg_split( '/[-\.\/ ]/', $date );         break;
case 'YYYY/DD/MM':      case 'YYYY-DD-MM':         list( $y, $d, $m ) = preg_split( '/[-\.\/ ]/', $date );         break;
case 'DD-MM-YYYY':      case 'DD/MM/YYYY':         list( $d, $m, $y ) = preg_split( '/[-\.\/ ]/', $date );         break;
case 'MM-DD-YYYY':      case 'MM/DD/YYYY':         list( $m, $d, $y ) = preg_split( '/[-\.\/ ]/', $date );         break;
case 'YYYYMMDD':         $y = substr( $date, 0, 4 );         $m = substr( $date, 4, 2 );         $d = substr( $date, 6, 2 );         break;
case 'YYYYDDMM':         $y = substr( $date, 0, 4 );         $d = substr( $date, 4, 2 );         $m = substr( $date, 6, 2 );         break;
default:         throw new Exception( 'Invalid Date Format' );   }   if(!is_null($m) && !is_null($d) && !is_null($y)){      return checkdate( $m, $d, $y );   }   else {      return false;   }}      /**      * This function can be used to check the length of a string      *      * @access private      *      * @param string $string The variable name you would like to check      * @param string $min The minimum length of the variable      * @param string $max The maximum length of the variable      *      * return bool      */
function checkStrLen($string, $min, $max){
if((strlen($string) >= intval($min) || $min == '0') && (strlen($string)<=intval($max)) || $max=='0'){      return TRUE;   }   else {      return FALSE;   }}
/**      * Remove HTML tags, including invisible text such as style and      * script code, and embedded objects.  Add line breaks around      * block-level tags to prevent word joining after tag removal.      */function strip_html_tags( $text ) {   $text = preg_replace(      array(         // Remove invisible content         '@<head[^>]*?>.*?</head>@siu',         '@<style[^>]*?>.*?</style>@siu',         '@<script[^>]*?.*?</script>@siu',         '@<object[^>]*?.*?</object>@siu',         '@<embed[^>]*?.*?</embed>@siu',         '@<applet[^>]*?.*?</applet>@siu',         '@<noframes[^>]*?.*?</noframes>@siu',         '@<noscript[^>]*?.*?</noscript>@siu',         '@<noembed[^>]*?.*?</noembed>@siu',         // Add line breaks before and after blocks         '@</?((address)|(blockquote)|(center)|(del))@iu',         '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',         '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',         '@</?((table)|(th)|(td)|(caption))@iu',         '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',         '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',         '@</?((frameset)|(frame)|(iframe))@iu',      ),   array(      ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',         "\n\$0", "\n\$0", "\n\$0", "\n\$0", "\n\$0", "\n\$0",         "\n\$0", "\n\$0",      ),   $text );   return strip_tags( $text );}function errMsgRtn($QuestionName, $ErrorCode, $min, $max){
if($ErrorCode == -2){return $QuestionName.' is the wrong type of variable.';}   if($ErrorCode == -3){return $QuestionName.' is too long.  It must be shorter than '.$max.' characters.';}   if($ErrorCode == -4){return $QuestionName.' is too short.  It must be longer than '.$min.' characters.';}   if($ErrorCode == -5){return $QuestionName.' was not formatted correctly.';}   return 'An unspecified error occured with '.$QuestionName.'.  Error code '.$ErrorCode.'.';}?><?php date_default_timezone_set('America/Los_Angeles'); ?>   <?php $TimeDateNow = strtotime('now');   $TimeDateOpen = strtotime('3/17/2011 12:00:00 PM');   $TimeDateClose = strtotime('3/17/2011 9:49:00 PM + 30 minutes');   if ($TimeDateOpen > $TimeDateNow) {exit ("The application window for The River has not opened yet.  Please try again on or after Thursday, March 17, 2011 at 12:00:00 PM.  Please contact Leigh (<a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>) for more information.");}   if ($TimeDateClose < $TimeDateNow) {exit ("The application window for The River closed on Thursday, March 17, 2011 at 9:49:00 PM.  Please contact Leigh (<a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>) for more information.");} ?>   <?php $curPage = $_COOKIE['curPage']; $btnSubmit = $_POST['submit']; unset($_POST['submit']); ?>   <?php if($curPage != '1' && $curPage != '2' && $curPage != '3' && $curPage != '4' && $curPage != '5' && $curPage != '6' && $curPage != '7' && $curPage != '8' && $curPage != '9' && $curPage != '10' && $curPage != 'REVIEW' && $curPage != 'SUBMIT') {$curPage = '1';} ?>   <?php if($curPage == '1' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPFirstName = htmlspecialchars($_POST['FirstName']);         setcookie('FirstName', $SRPFirstName, time() + 691200);}      else {         $SRPFirstName = $_COOKIE['FirstName'];}      $sanityCheckValue = sanityCheck($SRPFirstName, 'string', 1, 40, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['FirstName'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['FirstName'] = errMsgRtn('First Name', $sanityCheckValue, '1','40'); $bgclr['FirstName'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPLastName = htmlspecialchars($_POST['LastName']);         setcookie('LastName', $SRPLastName, time() + 691200);}      else {         $SRPLastName = $_COOKIE['LastName'];}      $sanityCheckValue = sanityCheck($SRPLastName, 'string', 1, 40, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['LastName'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['LastName'] = errMsgRtn('Last Name', $sanityCheckValue, '1','40'); $bgclr['LastName'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAddress = htmlspecialchars($_POST['Address']);         setcookie('Address', $SRPAddress, time() + 691200);}      else {         $SRPAddress = $_COOKIE['Address'];}      $sanityCheckValue = sanityCheck($SRPAddress, 'string', 1, 40, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['Address'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Address'] = errMsgRtn('Address', $sanityCheckValue, '1','40'); $bgclr['Address'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPCity = htmlspecialchars($_POST['City']);         setcookie('City', $SRPCity, time() + 691200);}      else {         $SRPCity = $_COOKIE['City'];}      $sanityCheckValue = sanityCheck($SRPCity, 'string', 1, 40, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['City'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['City'] = errMsgRtn('City', $sanityCheckValue, '1','40'); $bgclr['City'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPState = htmlspecialchars($_POST['State']);         setcookie('State', $SRPState, time() + 691200);}      else {         $SRPState = $_COOKIE['State'];}      $sanityCheckValue = sanityCheck($SRPState, 'string', 1, 20, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['State'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['State'] = errMsgRtn('State', $sanityCheckValue, '1','20'); $bgclr['State'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPZip = htmlspecialchars($_POST['Zip']);         setcookie('Zip', $SRPZip, time() + 691200);}      else {         $SRPZip = $_COOKIE['Zip'];}      $sanityCheckValue = sanityCheck($SRPZip, 'string', 5, 10, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['Zip'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Zip'] = errMsgRtn('Zip Code (##### or #####-####)', $sanityCheckValue, '5','10'); $bgclr['Zip'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPPhone = htmlspecialchars($_POST['Phone']);         setcookie('Phone', $SRPPhone, time() + 691200);}      else {         $SRPPhone = $_COOKIE['Phone'];}      $sanityCheckValue = sanityCheck($SRPPhone, 'string', 10, 14, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['Phone'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Phone'] = errMsgRtn('Phone (###-###-####)', $sanityCheckValue, '10','14'); $bgclr['Phone'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPPhoneType = htmlspecialchars($_POST['PhoneType']);         setcookie('PhoneType', $SRPPhoneType, time() + 691200);}      else {         $SRPPhoneType = $_COOKIE['PhoneType'];}      $sanityCheckValue = sanityCheck($SRPPhoneType, 'string', 1, 10, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['PhoneType'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['PhoneType'] = errMsgRtn('Phone Type', $sanityCheckValue, '1','10'); $bgclr['PhoneType'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPNoMessages = htmlspecialchars($_POST['NoMessages']);         setcookie('NoMessages', $SRPNoMessages, time() + 691200);}      else {         $SRPNoMessages = $_COOKIE['NoMessages'];}      $sanityCheckValue = sanityCheck($SRPNoMessages, 'string', 0, 60, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['NoMessages'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['NoMessages'] = errMsgRtn('', $sanityCheckValue, '0','60'); $bgclr['NoMessages'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPEmail = htmlspecialchars($_POST['Email']);         setcookie('Email', $SRPEmail, time() + 691200);}      else {         $SRPEmail = $_COOKIE['Email'];}      $sanityCheckValue = sanityCheck($SRPEmail, 'string', 1, 40, 'CheckEmail');      if($sanityCheckValue == -1){         $bgclr['Email'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Email'] = errMsgRtn('Email (Check the format of your email address)', $sanityCheckValue, '1','40'); $bgclr['Email'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSex = htmlspecialchars($_POST['Sex']);         setcookie('Sex', $SRPSex, time() + 691200);}      else {         $SRPSex = $_COOKIE['Sex'];}      $sanityCheckValue = sanityCheck($SRPSex, 'string', 1, 6, 'CheckString');      if($sanityCheckValue == -1){         $bgclr['Sex'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Sex'] = errMsgRtn('Sex', $sanityCheckValue, '1','6'); $bgclr['Sex'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPBirthday = htmlspecialchars($_POST['Birthday']);         setcookie('Birthday', $SRPBirthday, time() + 691200);}      else {         $SRPBirthday = $_COOKIE['Birthday'];}      $sanityCheckValue = sanityCheck($SRPBirthday, 'string', 8, 10, 'CheckDate');      if($sanityCheckValue == -1){         $bgclr['Birthday'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Birthday'] = errMsgRtn('Birthday (MM/DD/YYYY or MM-DD-YYYY)', $sanityCheckValue, '8','10'); $bgclr['Birthday'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPStudent = htmlspecialchars($_POST['Student']);         setcookie('Student', $SRPStudent, time() + 691200);}      else {         $SRPStudent = $_COOKIE['Student'];}      $sanityCheckValue = sanityCheck($SRPStudent, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['Student'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Student'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['Student'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSchool = htmlspecialchars($_POST['School']);         setcookie('School', $SRPSchool, time() + 691200);}      else {         $SRPSchool = $_COOKIE['School'];}      $sanityCheckValue = sanityCheck($SRPSchool, 'string', 0, 40, '');      if($sanityCheckValue == -1){         $bgclr['School'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['School'] = errMsgRtn('', $sanityCheckValue, '0','40'); $bgclr['School'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPWork = htmlspecialchars($_POST['Work']);         setcookie('Work', $SRPWork, time() + 691200);}      else {         $SRPWork = $_COOKIE['Work'];}      $sanityCheckValue = sanityCheck($SRPWork, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['Work'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Work'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['Work'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPOccupation = htmlspecialchars($_POST['Occupation']);         setcookie('Occupation', $SRPOccupation, time() + 691200);}      else {         $SRPOccupation = $_COOKIE['Occupation'];}      $sanityCheckValue = sanityCheck($SRPOccupation, 'string', 0, 40, '');      if($sanityCheckValue == -1){         $bgclr['Occupation'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Occupation'] = errMsgRtn('', $sanityCheckValue, '0','40'); $bgclr['Occupation'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPYouthWorker = htmlspecialchars($_POST['YouthWorker']);         setcookie('YouthWorker', $SRPYouthWorker, time() + 691200);}      else {         $SRPYouthWorker = $_COOKIE['YouthWorker'];}      $sanityCheckValue = sanityCheck($SRPYouthWorker, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['YouthWorker'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['YouthWorker'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['YouthWorker'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPCapacity = htmlspecialchars($_POST['Capacity']);         setcookie('Capacity', $SRPCapacity, time() + 691200);}      else {         $SRPCapacity = $_COOKIE['Capacity'];}      $sanityCheckValue = sanityCheck($SRPCapacity, 'string', 0, 40, '');      if($sanityCheckValue == -1){         $bgclr['Capacity'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Capacity'] = errMsgRtn('', $sanityCheckValue, '0','40'); $bgclr['Capacity'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPRelationshipStatus = htmlspecialchars($_POST['RelationshipStatus']);         setcookie('RelationshipStatus', $SRPRelationshipStatus, time() + 691200);}      else {         $SRPRelationshipStatus = $_COOKIE['RelationshipStatus'];}      $sanityCheckValue = sanityCheck($SRPRelationshipStatus, 'string', 0, 10, '');      if($sanityCheckValue == -1){         $bgclr['RelationshipStatus'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['RelationshipStatus'] = errMsgRtn('', $sanityCheckValue, '0','10'); $bgclr['RelationshipStatus'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPRiverReferral = htmlspecialchars($_POST['RiverReferral']);         setcookie('RiverReferral', $SRPRiverReferral, time() + 691200);}      else {         $SRPRiverReferral = $_COOKIE['RiverReferral'];}      $sanityCheckValue = sanityCheck($SRPRiverReferral, 'string', 0, 40, '');      if($sanityCheckValue == -1){         $bgclr['RiverReferral'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['RiverReferral'] = errMsgRtn('', $sanityCheckValue, '0','40'); $bgclr['RiverReferral'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '2' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPChristian = htmlspecialchars($_POST['Christian']);         setcookie('Christian', $SRPChristian, time() + 691200);}      else {         $SRPChristian = $_COOKIE['Christian'];}      $sanityCheckValue = sanityCheck($SRPChristian, 'string', 0, 80, '');      if($sanityCheckValue == -1){         $bgclr['Christian'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Christian'] = errMsgRtn('', $sanityCheckValue, '0','80'); $bgclr['Christian'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPFirstChristian = htmlspecialchars($_POST['FirstChristian']);         setcookie('FirstChristian', $SRPFirstChristian, time() + 691200);}      else {         $SRPFirstChristian = $_COOKIE['FirstChristian'];}      $sanityCheckValue = sanityCheck($SRPFirstChristian, 'string', 0, 80, '');      if($sanityCheckValue == -1){         $bgclr['FirstChristian'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['FirstChristian'] = errMsgRtn('', $sanityCheckValue, '0','80'); $bgclr['FirstChristian'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPPastInvolvement = htmlspecialchars($_POST['PastInvolvement']);         setcookie('PastInvolvement', $SRPPastInvolvement, time() + 691200);}      else {         $SRPPastInvolvement = $_COOKIE['PastInvolvement'];}      $sanityCheckValue = sanityCheck($SRPPastInvolvement, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['PastInvolvement'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['PastInvolvement'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['PastInvolvement'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPHealingPrayer = htmlspecialchars($_POST['HealingPrayer']);         setcookie('HealingPrayer', $SRPHealingPrayer, time() + 691200);}      else {         $SRPHealingPrayer = $_COOKIE['HealingPrayer'];}      $sanityCheckValue = sanityCheck($SRPHealingPrayer, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['HealingPrayer'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['HealingPrayer'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['HealingPrayer'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '3' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPOnGoingFellowship = htmlspecialchars($_POST['OnGoingFellowship']);         setcookie('OnGoingFellowship', $SRPOnGoingFellowship, time() + 691200);}      else {         $SRPOnGoingFellowship = $_COOKIE['OnGoingFellowship'];}      $sanityCheckValue = sanityCheck($SRPOnGoingFellowship, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['OnGoingFellowship'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['OnGoingFellowship'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['OnGoingFellowship'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPHealingIssues = htmlspecialchars($_POST['HealingIssues']);         setcookie('HealingIssues', $SRPHealingIssues, time() + 691200);}      else {         $SRPHealingIssues = $_COOKIE['HealingIssues'];}      $sanityCheckValue = sanityCheck($SRPHealingIssues, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['HealingIssues'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['HealingIssues'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['HealingIssues'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPRelationalDifficulties = htmlspecialchars($_POST['RelationalDifficulties']);         setcookie('RelationalDifficulties', $SRPRelationalDifficulties, time() + 691200);}      else {         $SRPRelationalDifficulties = $_COOKIE['RelationalDifficulties'];}      $sanityCheckValue = sanityCheck($SRPRelationalDifficulties, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['RelationalDifficulties'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['RelationalDifficulties'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['RelationalDifficulties'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '4' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPSexualContactYN = htmlspecialchars($_POST['SexualContactYN']);         setcookie('SexualContactYN', $SRPSexualContactYN, time() + 691200);}      else {         $SRPSexualContactYN = $_COOKIE['SexualContactYN'];}      $sanityCheckValue = sanityCheck($SRPSexualContactYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['SexualContactYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['SexualContactYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['SexualContactYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSexualContact = htmlspecialchars($_POST['SexualContact']);         setcookie('SexualContact', $SRPSexualContact, time() + 691200);}      else {         $SRPSexualContact = $_COOKIE['SexualContact'];}      $sanityCheckValue = sanityCheck($SRPSexualContact, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['SexualContact'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['SexualContact'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['SexualContact'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPTraumaAbuse = htmlspecialchars($_POST['TraumaAbuse']);         setcookie('TraumaAbuse', $SRPTraumaAbuse, time() + 691200);}      else {         $SRPTraumaAbuse = $_COOKIE['TraumaAbuse'];}      $sanityCheckValue = sanityCheck($SRPTraumaAbuse, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['TraumaAbuse'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['TraumaAbuse'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['TraumaAbuse'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '5' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPAddictiveTendenciesYN = htmlspecialchars($_POST['AddictiveTendenciesYN']);         setcookie('AddictiveTendenciesYN', $SRPAddictiveTendenciesYN, time() + 691200);}      else {         $SRPAddictiveTendenciesYN = $_COOKIE['AddictiveTendenciesYN'];}      $sanityCheckValue = sanityCheck($SRPAddictiveTendenciesYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['AddictiveTendenciesYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AddictiveTendenciesYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['AddictiveTendenciesYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAddictiveTendencies = htmlspecialchars($_POST['AddictiveTendencies']);         setcookie('AddictiveTendencies', $SRPAddictiveTendencies, time() + 691200);}      else {         $SRPAddictiveTendencies = $_COOKIE['AddictiveTendencies'];}      $sanityCheckValue = sanityCheck($SRPAddictiveTendencies, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['AddictiveTendencies'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AddictiveTendencies'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['AddictiveTendencies'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPMastPornYN = htmlspecialchars($_POST['MastPornYN']);         setcookie('MastPornYN', $SRPMastPornYN, time() + 691200);}      else {         $SRPMastPornYN = $_COOKIE['MastPornYN'];}      $sanityCheckValue = sanityCheck($SRPMastPornYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['MastPornYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['MastPornYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['MastPornYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPMastPorn = htmlspecialchars($_POST['MastPorn']);         setcookie('MastPorn', $SRPMastPorn, time() + 691200);}      else {         $SRPMastPorn = $_COOKIE['MastPorn'];}      $sanityCheckValue = sanityCheck($SRPMastPorn, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['MastPorn'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['MastPorn'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['MastPorn'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '6' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPCounselingPastYN = htmlspecialchars($_POST['CounselingPastYN']);         setcookie('CounselingPastYN', $SRPCounselingPastYN, time() + 691200);}      else {         $SRPCounselingPastYN = $_COOKIE['CounselingPastYN'];}      $sanityCheckValue = sanityCheck($SRPCounselingPastYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['CounselingPastYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['CounselingPastYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['CounselingPastYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPCounselingPast = htmlspecialchars($_POST['CounselingPast']);         setcookie('CounselingPast', $SRPCounselingPast, time() + 691200);}      else {         $SRPCounselingPast = $_COOKIE['CounselingPast'];}      $sanityCheckValue = sanityCheck($SRPCounselingPast, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['CounselingPast'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['CounselingPast'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['CounselingPast'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSuicideYN = htmlspecialchars($_POST['SuicideYN']);         setcookie('SuicideYN', $SRPSuicideYN, time() + 691200);}      else {         $SRPSuicideYN = $_COOKIE['SuicideYN'];}      $sanityCheckValue = sanityCheck($SRPSuicideYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['SuicideYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['SuicideYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['SuicideYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSuicide = htmlspecialchars($_POST['Suicide']);         setcookie('Suicide', $SRPSuicide, time() + 691200);}      else {         $SRPSuicide = $_COOKIE['Suicide'];}      $sanityCheckValue = sanityCheck($SRPSuicide, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['Suicide'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Suicide'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['Suicide'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '7' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPAlchDrugsYN = htmlspecialchars($_POST['AlchDrugsYN']);         setcookie('AlchDrugsYN', $SRPAlchDrugsYN, time() + 691200);}      else {         $SRPAlchDrugsYN = $_COOKIE['AlchDrugsYN'];}      $sanityCheckValue = sanityCheck($SRPAlchDrugsYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['AlchDrugsYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AlchDrugsYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['AlchDrugsYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAlchDrugs = htmlspecialchars($_POST['AlchDrugs']);         setcookie('AlchDrugs', $SRPAlchDrugs, time() + 691200);}      else {         $SRPAlchDrugs = $_COOKIE['AlchDrugs'];}      $sanityCheckValue = sanityCheck($SRPAlchDrugs, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['AlchDrugs'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AlchDrugs'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['AlchDrugs'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSexOutsideYN = htmlspecialchars($_POST['SexOutsideYN']);         setcookie('SexOutsideYN', $SRPSexOutsideYN, time() + 691200);}      else {         $SRPSexOutsideYN = $_COOKIE['SexOutsideYN'];}      $sanityCheckValue = sanityCheck($SRPSexOutsideYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['SexOutsideYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['SexOutsideYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['SexOutsideYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSexOutside = htmlspecialchars($_POST['SexOutside']);         setcookie('SexOutside', $SRPSexOutside, time() + 691200);}      else {         $SRPSexOutside = $_COOKIE['SexOutside'];}      $sanityCheckValue = sanityCheck($SRPSexOutside, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['SexOutside'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['SexOutside'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['SexOutside'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '8' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPHomosexualStruggle = htmlspecialchars($_POST['HomosexualStruggle']);         setcookie('HomosexualStruggle', $SRPHomosexualStruggle, time() + 691200);}      else {         $SRPHomosexualStruggle = $_COOKIE['HomosexualStruggle'];}      $sanityCheckValue = sanityCheck($SRPHomosexualStruggle, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['HomosexualStruggle'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['HomosexualStruggle'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['HomosexualStruggle'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPSupport = htmlspecialchars($_POST['Support']);         setcookie('Support', $SRPSupport, time() + 691200);}      else {         $SRPSupport = $_COOKIE['Support'];}      $sanityCheckValue = sanityCheck($SRPSupport, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['Support'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Support'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['Support'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPPreviousAttendanceYN = htmlspecialchars($_POST['PreviousAttendanceYN']);         setcookie('PreviousAttendanceYN', $SRPPreviousAttendanceYN, time() + 691200);}      else {         $SRPPreviousAttendanceYN = $_COOKIE['PreviousAttendanceYN'];}      $sanityCheckValue = sanityCheck($SRPPreviousAttendanceYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['PreviousAttendanceYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['PreviousAttendanceYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['PreviousAttendanceYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPPreviousAttendance = htmlspecialchars($_POST['PreviousAttendance']);         setcookie('PreviousAttendance', $SRPPreviousAttendance, time() + 691200);}      else {         $SRPPreviousAttendance = $_COOKIE['PreviousAttendance'];}      $sanityCheckValue = sanityCheck($SRPPreviousAttendance, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['PreviousAttendance'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['PreviousAttendance'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['PreviousAttendance'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '9' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPExpectations = htmlspecialchars($_POST['Expectations']);         setcookie('Expectations', $SRPExpectations, time() + 691200);}      else {         $SRPExpectations = $_COOKIE['Expectations'];}      $sanityCheckValue = sanityCheck($SRPExpectations, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['Expectations'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Expectations'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['Expectations'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAttendanceYN = htmlspecialchars($_POST['AttendanceYN']);         setcookie('AttendanceYN', $SRPAttendanceYN, time() + 691200);}      else {         $SRPAttendanceYN = $_COOKIE['AttendanceYN'];}      $sanityCheckValue = sanityCheck($SRPAttendanceYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['AttendanceYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AttendanceYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['AttendanceYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAttendance = htmlspecialchars($_POST['Attendance']);         setcookie('Attendance', $SRPAttendance, time() + 691200);}      else {         $SRPAttendance = $_COOKIE['Attendance'];}      $sanityCheckValue = sanityCheck($SRPAttendance, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['Attendance'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Attendance'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['Attendance'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if($curPage == '10' || $curPage == 'REVIEW'){      if($btnSubmit != '') {         $SRPAccountabilityYN = htmlspecialchars($_POST['AccountabilityYN']);         setcookie('AccountabilityYN', $SRPAccountabilityYN, time() + 691200);}      else {         $SRPAccountabilityYN = $_COOKIE['AccountabilityYN'];}      $sanityCheckValue = sanityCheck($SRPAccountabilityYN, 'string', 0, 3, '');      if($sanityCheckValue == -1){         $bgclr['AccountabilityYN'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AccountabilityYN'] = errMsgRtn('', $sanityCheckValue, '0','3'); $bgclr['AccountabilityYN'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAccountability = htmlspecialchars($_POST['Accountability']);         setcookie('Accountability', $SRPAccountability, time() + 691200);}      else {         $SRPAccountability = $_COOKIE['Accountability'];}      $sanityCheckValue = sanityCheck($SRPAccountability, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['Accountability'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['Accountability'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['Accountability'] = "bgcolor='#ffcccc'";}         }      if($btnSubmit != '') {         $SRPAdditionalText = htmlspecialchars($_POST['AdditionalText']);         setcookie('AdditionalText', $SRPAdditionalText, time() + 691200);}      else {         $SRPAdditionalText = $_COOKIE['AdditionalText'];}      $sanityCheckValue = sanityCheck($SRPAdditionalText, 'string', 0, 5000, '');      if($sanityCheckValue == -1){         $bgclr['AdditionalText'] = '';}      else {         if ($btnSubmit != '') {            $arrErrors['AdditionalText'] = errMsgRtn('', $sanityCheckValue, '0','5000'); $bgclr['AdditionalText'] = "bgcolor='#ffcccc'";}         }   }?>   <?php if ($arrErrors['FirstName'] == '' && !isset($SRPFirstName)){$SRPFirstName = $_COOKIE['FirstName'];}if ($arrErrors['LastName'] == '' && !isset($SRPLastName)){$SRPLastName = $_COOKIE['LastName'];}if ($arrErrors['Address'] == '' && !isset($SRPAddress)){$SRPAddress = $_COOKIE['Address'];}if ($arrErrors['City'] == '' && !isset($SRPCity)){$SRPCity = $_COOKIE['City'];}if ($arrErrors['State'] == '' && !isset($SRPState)){$SRPState = $_COOKIE['State'];}if ($arrErrors['Zip'] == '' && !isset($SRPZip)){$SRPZip = $_COOKIE['Zip'];}if ($arrErrors['Phone'] == '' && !isset($SRPPhone)){$SRPPhone = $_COOKIE['Phone'];}if ($arrErrors['PhoneType'] == '' && !isset($SRPPhoneType)){$SRPPhoneType = $_COOKIE['PhoneType'];}if ($arrErrors['NoMessages'] == '' && !isset($SRPNoMessages)){$SRPNoMessages = $_COOKIE['NoMessages'];}if ($arrErrors['Email'] == '' && !isset($SRPEmail)){$SRPEmail = $_COOKIE['Email'];}if ($arrErrors['Sex'] == '' && !isset($SRPSex)){$SRPSex = $_COOKIE['Sex'];}if ($arrErrors['Birthday'] == '' && !isset($SRPBirthday)){$SRPBirthday = $_COOKIE['Birthday'];}if ($arrErrors['Student'] == '' && !isset($SRPStudent)){$SRPStudent = $_COOKIE['Student'];}if ($arrErrors['School'] == '' && !isset($SRPSchool)){$SRPSchool = $_COOKIE['School'];}if ($arrErrors['Work'] == '' && !isset($SRPWork)){$SRPWork = $_COOKIE['Work'];}if ($arrErrors['Occupation'] == '' && !isset($SRPOccupation)){$SRPOccupation = $_COOKIE['Occupation'];}if ($arrErrors['YouthWorker'] == '' && !isset($SRPYouthWorker)){$SRPYouthWorker = $_COOKIE['YouthWorker'];}if ($arrErrors['Capacity'] == '' && !isset($SRPCapacity)){$SRPCapacity = $_COOKIE['Capacity'];}if ($arrErrors['RelationshipStatus'] == '' && !isset($SRPRelationshipStatus)){$SRPRelationshipStatus = $_COOKIE['RelationshipStatus'];}if ($arrErrors['RiverReferral'] == '' && !isset($SRPRiverReferral)){$SRPRiverReferral = $_COOKIE['RiverReferral'];}if ($arrErrors['Christian'] == '' && !isset($SRPChristian)){$SRPChristian = $_COOKIE['Christian'];}if ($arrErrors['FirstChristian'] == '' && !isset($SRPFirstChristian)){$SRPFirstChristian = $_COOKIE['FirstChristian'];}if ($arrErrors['PastInvolvement'] == '' && !isset($SRPPastInvolvement)){$SRPPastInvolvement = $_COOKIE['PastInvolvement'];}if ($arrErrors['HealingPrayer'] == '' && !isset($SRPHealingPrayer)){$SRPHealingPrayer = $_COOKIE['HealingPrayer'];}if ($arrErrors['OnGoingFellowship'] == '' && !isset($SRPOnGoingFellowship)){$SRPOnGoingFellowship = $_COOKIE['OnGoingFellowship'];}if ($arrErrors['HealingIssues'] == '' && !isset($SRPHealingIssues)){$SRPHealingIssues = $_COOKIE['HealingIssues'];}if ($arrErrors['RelationalDifficulties'] == '' && !isset($SRPRelationalDifficulties)){$SRPRelationalDifficulties = $_COOKIE['RelationalDifficulties'];}if ($arrErrors['SexualContactYN'] == '' && !isset($SRPSexualContactYN)){$SRPSexualContactYN = $_COOKIE['SexualContactYN'];}if ($arrErrors['SexualContact'] == '' && !isset($SRPSexualContact)){$SRPSexualContact = $_COOKIE['SexualContact'];}if ($arrErrors['TraumaAbuse'] == '' && !isset($SRPTraumaAbuse)){$SRPTraumaAbuse = $_COOKIE['TraumaAbuse'];}if ($arrErrors['AddictiveTendenciesYN'] == '' && !isset($SRPAddictiveTendenciesYN)){$SRPAddictiveTendenciesYN = $_COOKIE['AddictiveTendenciesYN'];}if ($arrErrors['AddictiveTendencies'] == '' && !isset($SRPAddictiveTendencies)){$SRPAddictiveTendencies = $_COOKIE['AddictiveTendencies'];}if ($arrErrors['MastPornYN'] == '' && !isset($SRPMastPornYN)){$SRPMastPornYN = $_COOKIE['MastPornYN'];}if ($arrErrors['MastPorn'] == '' && !isset($SRPMastPorn)){$SRPMastPorn = $_COOKIE['MastPorn'];}if ($arrErrors['CounselingPastYN'] == '' && !isset($SRPCounselingPastYN)){$SRPCounselingPastYN = $_COOKIE['CounselingPastYN'];}if ($arrErrors['CounselingPast'] == '' && !isset($SRPCounselingPast)){$SRPCounselingPast = $_COOKIE['CounselingPast'];}if ($arrErrors['SuicideYN'] == '' && !isset($SRPSuicideYN)){$SRPSuicideYN = $_COOKIE['SuicideYN'];}if ($arrErrors['Suicide'] == '' && !isset($SRPSuicide)){$SRPSuicide = $_COOKIE['Suicide'];}if ($arrErrors['AlchDrugsYN'] == '' && !isset($SRPAlchDrugsYN)){$SRPAlchDrugsYN = $_COOKIE['AlchDrugsYN'];}if ($arrErrors['AlchDrugs'] == '' && !isset($SRPAlchDrugs)){$SRPAlchDrugs = $_COOKIE['AlchDrugs'];}if ($arrErrors['SexOutsideYN'] == '' && !isset($SRPSexOutsideYN)){$SRPSexOutsideYN = $_COOKIE['SexOutsideYN'];}if ($arrErrors['SexOutside'] == '' && !isset($SRPSexOutside)){$SRPSexOutside = $_COOKIE['SexOutside'];}if ($arrErrors['HomosexualStruggle'] == '' && !isset($SRPHomosexualStruggle)){$SRPHomosexualStruggle = $_COOKIE['HomosexualStruggle'];}if ($arrErrors['Support'] == '' && !isset($SRPSupport)){$SRPSupport = $_COOKIE['Support'];}if ($arrErrors['PreviousAttendanceYN'] == '' && !isset($SRPPreviousAttendanceYN)){$SRPPreviousAttendanceYN = $_COOKIE['PreviousAttendanceYN'];}if ($arrErrors['PreviousAttendance'] == '' && !isset($SRPPreviousAttendance)){$SRPPreviousAttendance = $_COOKIE['PreviousAttendance'];}if ($arrErrors['Expectations'] == '' && !isset($SRPExpectations)){$SRPExpectations = $_COOKIE['Expectations'];}if ($arrErrors['AttendanceYN'] == '' && !isset($SRPAttendanceYN)){$SRPAttendanceYN = $_COOKIE['AttendanceYN'];}if ($arrErrors['Attendance'] == '' && !isset($SRPAttendance)){$SRPAttendance = $_COOKIE['Attendance'];}if ($arrErrors['AccountabilityYN'] == '' && !isset($SRPAccountabilityYN)){$SRPAccountabilityYN = $_COOKIE['AccountabilityYN'];}if ($arrErrors['Accountability'] == '' && !isset($SRPAccountability)){$SRPAccountability = $_COOKIE['Accountability'];}if ($arrErrors['AdditionalText'] == '' && !isset($SRPAdditionalText)){$SRPAdditionalText = $_COOKIE['AdditionalText'];}?>
<?php if (($TimeDateClose - $TimeDateNow) / 60 < 60) {$outI .="<div style='border: 1px solid yellow; background-color: #FFFF66; width: auto; padding: 5px 0;'><font face='verdana'><b><center>WARNING: The deadline to submit this application is approaching.  You have ".floor(($TimeDateClose - $TimeDateNow) / 60)." minutes to complete this application. </center></b></font></div><br/><br/>";}?><?php $outI .= '<center><b>Confidential Application for The River</b><br/>Please fill in this application with as much detail as you can. <br/>Your responses will be kept confidential. </center><br/>';$outP .= '<center><b>Confidential Application for The River</b><br/>Please fill in this application with as much detail as you can. <br/>Your responses will be kept confidential. </center><br/>';?><?php if($curPage == '') { $curPage='1';}?><?php if (count($arrErrors) == 0){   $isPageSet = 'FALSE';   if ($curPage == '1' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '2'; $isPageSet = 'TRUE';}   if ($curPage == '2' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '3'; $isPageSet = 'TRUE';}   if ($curPage == '3' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '4'; $isPageSet = 'TRUE';}   if ($curPage == '4' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '5'; $isPageSet = 'TRUE';}   if ($curPage == '5' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '6'; $isPageSet = 'TRUE';}   if ($curPage == '6' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '7'; $isPageSet = 'TRUE';}   if ($curPage == '7' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '8'; $isPageSet = 'TRUE';}   if ($curPage == '8' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '9'; $isPageSet = 'TRUE';}   if ($curPage == '9' && $btnSubmit == 'NEXT' && $isPageSet == 'FALSE'){$curPage = '10'; $isPageSet = 'TRUE';}   if ($curPage == '10' && $btnSubmit == 'REVIEW' && $isPageSet == 'FALSE'){$curPage = 'REVIEW'; $isPageSet = 'TRUE';}   if ($curPage == 'REVIEW' && $btnSubmit == 'SUBMIT' && $isPageSet == 'FALSE'){$curPage = 'SUBMIT'; $isPageSet = 'TRUE';}   if ($curPage == '10' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '9'; $isPageSet = 'TRUE';}   if ($curPage == '9' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '8'; $isPageSet = 'TRUE';}   if ($curPage == '8' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '7'; $isPageSet = 'TRUE';}   if ($curPage == '7' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '6'; $isPageSet = 'TRUE';}   if ($curPage == '6' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '5'; $isPageSet = 'TRUE';}   if ($curPage == '5' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '4'; $isPageSet = 'TRUE';}   if ($curPage == '4' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '3'; $isPageSet = 'TRUE';}   if ($curPage == '3' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '2'; $isPageSet = 'TRUE';}   if ($curPage == '2' && $btnSubmit == 'BACK' && $isPageSet == 'FALSE'){$curPage = '1'; $isPageSet = 'TRUE';}   setcookie('curPage', $curPage, time() +691200);}else {   $outI .= '<div style="border: 1px solid red; background-color : #FFCCCC; width: auto; padding: 5px 0;"><p>In order to complete the the form, please double check the following:</p><ul>';   foreach ($arrErrors as $error) {$outI .= '<li>'.$error.'</li>';} $outI .= '</ul></div><br/>';}?><?php if($curPage == '1'){ $pageNav = "<table width='675'><tr><td><div align='right'><button type='submit' name='submit' value='NEXT'>NEXT >></button></div></td></table>"; }?><?php if($curPage == '2' || $curPage == '3' || $curPage == '4' || $curPage == '5' || $curPage == '6' || $curPage == '7' || $curPage == '8' || $curPage == '9'){ $pageNav = "<table width='675'><tr><td><div align='left'><button type='submit' name='submit' value='BACK'><< BACK</button></div></td><td><div align='right'><button type='submit' name='submit' value='NEXT'>NEXT >></button></div></td></tr></table>"; }?><?php if($curPage == '10'){$pageNav = "<table width='675'><tr><td><div align='left'><button type='submit' name='submit' value='BACK'><< BACK</button></div></td><td><div align='right'><button type='submit' name='submit' value='REVIEW'>REVIEW >></button></div></td></tr></table>"; }?><?php if($curPage == 'REVIEW'){$pageNav = "<table width='675'><tr><td><div align='right'><button type='submit' name='submit' value='SUBMIT'>SUBMIT >></button></div></td></tr></table>"; }?>   <?php if($curPage == '1' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      $outI .= "<center><table><tr ".$bgclr['FirstName']."><td><div align='right'><b>First Name</b></div></td><td>*</td><td><input type='text' name='FirstName' size='40' maxlength='40' ".'value="'.$SRPFirstName.'"'."/></td></tr>";      $outP .= "<center><table><tr ".$bgclr['FirstName']."><td><div align='right'><b>First Name</b></div></td><td>*</td><td>".$SRPFirstName."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['LastName']."><td><div align='right'><b>Last Name</b></div></td><td>*</td><td><input type='text' name='LastName' size='40' maxlength='40' ".'value="'.$SRPLastName.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['LastName']."><td><div align='right'><b>Last Name</b></div></td><td>*</td><td>".$SRPLastName."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Address']."><td><div align='right'><b>Address</b></div></td><td>*</td><td><input type='text' name='Address' size='40' maxlength='40' ".'value="'.$SRPAddress.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Address']."><td><div align='right'><b>Address</b></div></td><td>*</td><td>".$SRPAddress."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['City']."><td><div align='right'><b>City</b></div></td><td>*</td><td><input type='text' name='City' size='40' maxlength='40' ".'value="'.$SRPCity.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['City']."><td><div align='right'><b>City</b></div></td><td>*</td><td>".$SRPCity."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['State']."><td><div align='right'><b>State</b></div></td><td>*</td><td><select name='State'><option value=CA>California</option><option value=AL>Alabama</option><option value=AK>Alaska</option><option value=AS>American Samoa</option><option value=AZ>Arizona</option><option value=AR>Arkansas</option><option value=CO>Colorado</option><option value=CT>Connecticut</option><option value=DE>Delaware</option><option value=DC>District of Columbia</option><option value=FL>Florida</option><option value=GA>Georgia</option><option value=GU>Guam</option><option value=HI>Hawaii</option><option value=ID>Idaho</option><option value=IL>Illinois</option><option value=IN>Indiana</option><option value=IA>Iowa</option><option value=KS>Kansas</option><option value=KY>Kentucky</option><option value=LA>Louisiana</option><option value=ME>Maine</option><option value=MD>Maryland</option><option value=MH>Marshall Islands</option><option value=MA>Massachusetts</option><option value=MI>Michigan</option><option value=FM>Micronesia</option><option value=MN>Minnesota</option><option value=MS>Mississippi</option><option value=MO>Missouri</option><option value=MT>Montana</option><option value=NE>Nebraska</option><option value=NV>Nevada</option><option value=NH>New Hampshire</option><option value=NJ>New Jersey</option><option value=NM>New Mexico</option><option value=NY>New York</option><option value=NC>North Carolina</option><option value=ND>North Dakota</option><option value=MP>Northern Marianas</option><option value=OH>Ohio</option><option value=OK>Oklahoma</option><option value=OR>Oregon</option><option value=PW>Palau</option><option value=PA>Pennsylvania</option><option value=PR>Puerto Rico</option><option value=RI>Rhode Island</option><option value=SC>South Carolina</option><option value=SD>South Dakota</option><option value=TN>Tennessee</option><option value=TX>Texas</option><option value=UT>Utah</option><option value=VT>Vermont</option><option value=VA>Virginia</option><option value=VI>Virgin Islands</option><option value=WA>Washington</option><option value=WV>West Virginia</option><option value=WI>Wisconsin</option><option value=WY>Wyoming</option></select></td></tr>";      $outP .= "<tr ".$bgclr['State']."><td><div align='right'><b>State</b></div></td><td>*</td><td>".$SRPState."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Zip']."><td><div align='right'><b>Zip Code</b></div></td><td>*</td><td><input type='text' name='Zip' size='10' maxlength='10' ".'value="'.$SRPZip.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Zip']."><td><div align='right'><b>Zip Code</b></div></td><td>*</td><td>".$SRPZip."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Phone']."><td><div align='right'><b>Phone</b></div></td><td>*</td><td><input type='text' name='Phone' size='14' maxlength='14' ".'value="'.$SRPPhone.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Phone']."><td><div align='right'><b>Phone</b></div></td><td>*</td><td>".$SRPPhone."</td></tr></td></tr>";      switch ($SRPPhoneType){case 'Mobile': $PhoneTypeoption1="checked='checked'"; break;case 'Home': $PhoneTypeoption2="checked='checked'"; break;case 'Work': $PhoneTypeoption3="checked='checked'"; break;case 'Other': $PhoneTypeoption4="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['PhoneType']."><td><div align='right'><b>Phone Type</b></div></td><td>*</td><td><input type='radio' name='PhoneType' value='Mobile' ".$PhoneTypeoption1." />Mobile<input type='radio' name='PhoneType' value='Home' ".$PhoneTypeoption2." />Home<input type='radio' name='PhoneType' value='Work' ".$PhoneTypeoption3." />Work<input type='radio' name='PhoneType' value='Other' ".$PhoneTypeoption4." />Other</td></tr>";      $outP .= "<tr ".$bgclr['PhoneType']."><td><div align='right'><b>Phone Type</b></div></td><td>*</td><td>".$SRPPhoneType."</td></tr></td></tr>";      switch ($SRPNoMessages){case 'Do NOT leave me a message on my phone.': $NoMessagesoption1="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['NoMessages']."><td><div align='right'><b>Messages</b></div></td><td></td><td><input type='checkbox' name='NoMessages' value='Do NOT leave me a message on my phone.' ".$NoMessagesoption1." />Do NOT leave me a message on my phone.</td></tr>";      $outP .= "<tr ".$bgclr['NoMessages']."><td><div align='right'><b>Messages</b></div></td><td></td><td>".$SRPNoMessages."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Email']."><td><div align='right'><b>Email</b></div></td><td>*</td><td><input type='text' name='Email' size='40' maxlength='40' ".'value="'.$SRPEmail.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Email']."><td><div align='right'><b>Email</b></div></td><td>*</td><td>".$SRPEmail."</td></tr></td></tr>";      switch ($SRPSex){case 'Male': $Sexoption1="checked='checked'"; break;case 'Female': $Sexoption2="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['Sex']."><td><div align='right'><b>Sex</b></div></td><td>*</td><td><input type='radio' name='Sex' value='Male' ".$Sexoption1." />Male<input type='radio' name='Sex' value='Female' ".$Sexoption2." />Female</td></tr>";      $outP .= "<tr ".$bgclr['Sex']."><td><div align='right'><b>Sex</b></div></td><td>*</td><td>".$SRPSex."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Birthday']."><td><div align='right'><b>Birthday</b></div></td><td>*</td><td><input type='text' name='Birthday' size='10' maxlength='10' ".'value="'.$SRPBirthday.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Birthday']."><td><div align='right'><b>Birthday</b></div></td><td>*</td><td>".$SRPBirthday."</td></tr></td></tr>";      switch ($SRPStudent){case 'Yes': $Studentoption1="checked='checked'"; break;case 'No': $Studentoption2="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['Student']."><td><div align='right'><b>Student</b></div></td><td></td><td><input type='radio' name='Student' value='Yes' ".$Studentoption1." />Yes<input type='radio' name='Student' value='No' ".$Studentoption2." />No</td></tr>";      $outP .= "<tr ".$bgclr['Student']."><td><div align='right'><b>Student</b></div></td><td></td><td>".$SRPStudent."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['School']."><td><div align='right'><b>School</b></div></td><td></td><td><input type='text' name='School' size='40' maxlength='40' ".'value="'.$SRPSchool.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['School']."><td><div align='right'><b>School</b></div></td><td></td><td>".$SRPSchool."</td></tr></td></tr>";      switch ($SRPWork){case 'Yes': $Workoption1="checked='checked'"; break;case 'No': $Workoption2="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['Work']."><td><div align='right'><b>Work</b></div></td><td></td><td><input type='radio' name='Work' value='Yes' ".$Workoption1." />Yes<input type='radio' name='Work' value='No' ".$Workoption2." />No</td></tr>";      $outP .= "<tr ".$bgclr['Work']."><td><div align='right'><b>Work</b></div></td><td></td><td>".$SRPWork."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Occupation']."><td><div align='right'><b>Occupation</b></div></td><td></td><td><input type='text' name='Occupation' size='40' maxlength='40' ".'value="'.$SRPOccupation.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Occupation']."><td><div align='right'><b>Occupation</b></div></td><td></td><td>".$SRPOccupation."</td></tr></td></tr>";      switch ($SRPYouthWorker){case 'Yes': $YouthWorkeroption1="checked='checked'"; break;case 'No': $YouthWorkeroption2="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['YouthWorker']."><td><div align='right'><b>Youth Worker</b></div></td><td></td><td><input type='radio' name='YouthWorker' value='Yes' ".$YouthWorkeroption1." />Yes<input type='radio' name='YouthWorker' value='No' ".$YouthWorkeroption2." />No</td></tr>";      $outP .= "<tr ".$bgclr['YouthWorker']."><td><div align='right'><b>Youth Worker</b></div></td><td></td><td>".$SRPYouthWorker."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['Capacity']."><td><div align='right'><b>Capacity</b></div></td><td></td><td><input type='text' name='Capacity' size='40' maxlength='40' ".'value="'.$SRPCapacity.'"'."/></td></tr>";      $outP .= "<tr ".$bgclr['Capacity']."><td><div align='right'><b>Capacity</b></div></td><td></td><td>".$SRPCapacity."</td></tr></td></tr>";      switch ($SRPRelationshipStatus){case 'Single': $RelationshipStatusoption1="checked='checked'"; break;case 'Engaged': $RelationshipStatusoption2="checked='checked'"; break;case 'Married': $RelationshipStatusoption3="checked='checked'"; break;case 'Separated': $RelationshipStatusoption4="checked='checked'"; break;case 'Divorced': $RelationshipStatusoption5="checked='checked'"; break;}      $outI .= "<tr ".$bgclr['RelationshipStatus']."><td><div align='right'><b>Relationship Status</b></div></td><td></td><td><input type='radio' name='RelationshipStatus' value='Single' ".$RelationshipStatusoption1." />Single<input type='radio' name='RelationshipStatus' value='Engaged' ".$RelationshipStatusoption2." />Engaged<input type='radio' name='RelationshipStatus' value='Married' ".$RelationshipStatusoption3." />Married<input type='radio' name='RelationshipStatus' value='Separated' ".$RelationshipStatusoption4." />Separated<input type='radio' name='RelationshipStatus' value='Divorced' ".$RelationshipStatusoption5." />Divorced</td></tr>";      $outP .= "<tr ".$bgclr['RelationshipStatus']."><td><div align='right'><b>Relationship Status</b></div></td><td></td><td>".$SRPRelationshipStatus."</td></tr></td></tr>";      $outI .= "<tr ".$bgclr['RiverReferral']."><td><div align='right'><b>How did you hear about the River?</b></div></td><td></td><td><input type='text' name='RiverReferral' size='40' maxlength='40' ".'value="'.$SRPRiverReferral.'"'."/></td></tr></table></center><br/>";      $outP .= "<tr ".$bgclr['RiverReferral']."><td><div align='right'><b>How did you hear about the River?</b></div></td><td></td><td>".$SRPRiverReferral."</td></tr></td></tr></table></center><br/>";} ?>   <?php if($curPage == '2' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      $outI .= "<table ".$bgclr['Christian']."><tr><td><b>Are you a Christian?</b></td></tr><tr><td><input type='text' name='Christian' size='80' maxlength='80' ".'value="'.$SRPChristian.'"'."/></table></center><br/>";      $outP .= "<table ".$bgclr['Christian']."><tr><td><b>Are you a Christian?</b></td></tr><tr><td>".$SRPChristian."</td></tr></table></center><br/>";      $outI .= "<table ".$bgclr['FirstChristian']."><tr><td><b>At what point in your life did you consider yourself a Christian?</b></td></tr><tr><td><input type='text' name='FirstChristian' size='80' maxlength='80' ".'value="'.$SRPFirstChristian.'"'."/></table></center><br/>";      $outP .= "<table ".$bgclr['FirstChristian']."><tr><td><b>At what point in your life did you consider yourself a Christian?</b></td></tr><tr><td>".$SRPFirstChristian."</td></tr></table></center><br/>";      $outI .= "<table ".$bgclr['PastInvolvement']."><tr><td><b>What are your past church or spiritual affiliations? Please include length of involvement and non-Christian references as well.</b></td></tr><tr><td><textarea name='PastInvolvement' cols='80' rows='6'>".$SRPPastInvolvement."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['PastInvolvement']."><tr><td><b>What are your past church or spiritual affiliations? Please include length of involvement and non-Christian references as well.</b></td></tr><tr><td>".$SRPPastInvolvement."</td></tr><tr><td></table><br/>";      $outI .= "<table ".$bgclr['HealingPrayer']."><tr><td><b>Would you be comfortable with receiving healing prayer, administered through the laying on of hands, and made possible by the outpouring of the Holy Spirit?</b></td></tr><tr><td><textarea name='HealingPrayer' cols='80' rows='6'>".$SRPHealingPrayer."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['HealingPrayer']."><tr><td><b>Would you be comfortable with receiving healing prayer, administered through the laying on of hands, and made possible by the outpouring of the Holy Spirit?</b></td></tr><tr><td>".$SRPHealingPrayer."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '3' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      $outI .= "<table ".$bgclr['OnGoingFellowship']."><tr><td><b>Are you currently participating in ongoing fellowship within your church (i.e., a cell group), as well as attending a regular weekly service? Please describe. </b></td></tr><tr><td><textarea name='OnGoingFellowship' cols='80' rows='6'>".$SRPOnGoingFellowship."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['OnGoingFellowship']."><tr><td><b>Are you currently participating in ongoing fellowship within your church (i.e., a cell group), as well as attending a regular weekly service? Please describe. </b></td></tr><tr><td>".$SRPOnGoingFellowship."</td></tr><tr><td></table><br/>";      $outI .= "<table ".$bgclr['HealingIssues']."><tr><td><b>What issues do you hope to find healing for at The River?</b></td></tr><tr><td><textarea name='HealingIssues' cols='80' rows='6'>".$SRPHealingIssues."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['HealingIssues']."><tr><td><b>What issues do you hope to find healing for at The River?</b></td></tr><tr><td>".$SRPHealingIssues."</td></tr><tr><td></table><br/>";      $outI .= "<table ".$bgclr['RelationalDifficulties']."><tr><td><b>What kind of relational difficulties have you had (with same sex and/or with opposite sex)? And how do these difficulties express themselves? (sexual behaviors, loneliness, inability to trust, fears about relationships, feeling like a doormat, always need to have a boyfriend/girlfriend, etc)</b></td></tr><tr><td><textarea name='RelationalDifficulties' cols='80' rows='6'>".$SRPRelationalDifficulties."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['RelationalDifficulties']."><tr><td><b>What kind of relational difficulties have you had (with same sex and/or with opposite sex)? And how do these difficulties express themselves? (sexual behaviors, loneliness, inability to trust, fears about relationships, feeling like a doormat, always need to have a boyfriend/girlfriend, etc)</b></td></tr><tr><td>".$SRPRelationalDifficulties."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '4' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      switch ($SRPSexualContactYN){case 'Yes': $SexualContactYNoption1="checked='checked'"; break;case 'No': $SexualContactYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['SexualContactYN']."><tr><td><b>Are you currently, or have you been, in a relationship with involves sexual contact? </b></td></tr><tr><td><input type='radio' name='SexualContactYN' value='Yes' ".$SexualContactYNoption1." />Yes<input type='radio' name='SexualContactYN' value='No' ".$SexualContactYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['SexualContactYN']."><tr><td><b>Are you currently, or have you been, in a relationship with involves sexual contact? </b></td></tr><tr><td>".$SRPSexualContactYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['SexualContact']."><tr><td><b>If so, please describe your relationship(s). </b></td></tr><tr><td><textarea name='SexualContact' cols='80' rows='6'>".$SRPSexualContact."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['SexualContact']."><tr><td><b>If so, please describe your relationship(s). </b></td></tr><tr><td>".$SRPSexualContact."</td></tr><tr><td></table><br/>";      $outI .= "<table ".$bgclr['TraumaAbuse']."><tr><td><b>Do you recall any significant, traumatic incidents in your life (verbal, physical, sexual, emotional abuse or exposure to violence)?</b></td></tr><tr><td><textarea name='TraumaAbuse' cols='80' rows='6'>".$SRPTraumaAbuse."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['TraumaAbuse']."><tr><td><b>Do you recall any significant, traumatic incidents in your life (verbal, physical, sexual, emotional abuse or exposure to violence)?</b></td></tr><tr><td>".$SRPTraumaAbuse."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '5' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      switch ($SRPAddictiveTendenciesYN){case 'Yes': $AddictiveTendenciesYNoption1="checked='checked'"; break;case 'No': $AddictiveTendenciesYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['AddictiveTendenciesYN']."><tr><td><b>Do you (or did you) have any addictive tendencies (such as violence, food, alcohol, gambling, drugs, shopping, sex, internet, etc)?</b></td></tr><tr><td><input type='radio' name='AddictiveTendenciesYN' value='Yes' ".$AddictiveTendenciesYNoption1." />Yes<input type='radio' name='AddictiveTendenciesYN' value='No' ".$AddictiveTendenciesYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['AddictiveTendenciesYN']."><tr><td><b>Do you (or did you) have any addictive tendencies (such as violence, food, alcohol, gambling, drugs, shopping, sex, internet, etc)?</b></td></tr><tr><td>".$SRPAddictiveTendenciesYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['AddictiveTendencies']."><tr><td><b>If so, please describe.</b></td></tr><tr><td><textarea name='AddictiveTendencies' cols='80' rows='6'>".$SRPAddictiveTendencies."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['AddictiveTendencies']."><tr><td><b>If so, please describe.</b></td></tr><tr><td>".$SRPAddictiveTendencies."</td></tr><tr><td></table><br/>";      switch ($SRPMastPornYN){case 'Yes': $MastPornYNoption1="checked='checked'"; break;case 'No': $MastPornYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['MastPornYN']."><tr><td><b>Do you (or did you) struggle with masturbation and/or pornography?</b></td></tr><tr><td><input type='radio' name='MastPornYN' value='Yes' ".$MastPornYNoption1." />Yes<input type='radio' name='MastPornYN' value='No' ".$MastPornYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['MastPornYN']."><tr><td><b>Do you (or did you) struggle with masturbation and/or pornography?</b></td></tr><tr><td>".$SRPMastPornYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['MastPorn']."><tr><td><b>If so, please describe.</b></td></tr><tr><td><textarea name='MastPorn' cols='80' rows='6'>".$SRPMastPorn."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['MastPorn']."><tr><td><b>If so, please describe.</b></td></tr><tr><td>".$SRPMastPorn."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '6' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      switch ($SRPCounselingPastYN){case 'Yes': $CounselingPastYNoption1="checked='checked'"; break;case 'No': $CounselingPastYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['CounselingPastYN']."><tr><td><b>Have you been in professional, pastoral, or school counseling? </b></td></tr><tr><td><input type='radio' name='CounselingPastYN' value='Yes' ".$CounselingPastYNoption1." />Yes<input type='radio' name='CounselingPastYN' value='No' ".$CounselingPastYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['CounselingPastYN']."><tr><td><b>Have you been in professional, pastoral, or school counseling? </b></td></tr><tr><td>".$SRPCounselingPastYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['CounselingPast']."><tr><td><b>If so, with whom, when and why?</b></td></tr><tr><td><textarea name='CounselingPast' cols='80' rows='6'>".$SRPCounselingPast."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['CounselingPast']."><tr><td><b>If so, with whom, when and why?</b></td></tr><tr><td>".$SRPCounselingPast."</td></tr><tr><td></table><br/>";      switch ($SRPSuicideYN){case 'Yes': $SuicideYNoption1="checked='checked'"; break;case 'No': $SuicideYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['SuicideYN']."><tr><td><b>Have you ever contemplated suicide? </b></td></tr><tr><td><input type='radio' name='SuicideYN' value='Yes' ".$SuicideYNoption1." />Yes<input type='radio' name='SuicideYN' value='No' ".$SuicideYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['SuicideYN']."><tr><td><b>Have you ever contemplated suicide? </b></td></tr><tr><td>".$SRPSuicideYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['Suicide']."><tr><td><b>If so, please give dates and circumstances.</b></td></tr><tr><td><textarea name='Suicide' cols='80' rows='6'>".$SRPSuicide."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['Suicide']."><tr><td><b>If so, please give dates and circumstances.</b></td></tr><tr><td>".$SRPSuicide."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '7' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      switch ($SRPAlchDrugsYN){case 'Yes': $AlchDrugsYNoption1="checked='checked'"; break;case 'No': $AlchDrugsYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['AlchDrugsYN']."><tr><td><b>Do you (or did you) use alcohol or drugs? </b></td></tr><tr><td><input type='radio' name='AlchDrugsYN' value='Yes' ".$AlchDrugsYNoption1." />Yes<input type='radio' name='AlchDrugsYN' value='No' ".$AlchDrugsYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['AlchDrugsYN']."><tr><td><b>Do you (or did you) use alcohol or drugs? </b></td></tr><tr><td>".$SRPAlchDrugsYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['AlchDrugs']."><tr><td><b>If so, what and how often?</b></td></tr><tr><td><textarea name='AlchDrugs' cols='80' rows='6'>".$SRPAlchDrugs."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['AlchDrugs']."><tr><td><b>If so, what and how often?</b></td></tr><tr><td>".$SRPAlchDrugs."</td></tr><tr><td></table><br/>";      switch ($SRPSexOutsideYN){case 'Yes': $SexOutsideYNoption1="checked='checked'"; break;case 'No': $SexOutsideYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['SexOutsideYN']."><tr><td><b>Do you believe that sex outside of marriage is wrong? </b></td></tr><tr><td><input type='radio' name='SexOutsideYN' value='Yes' ".$SexOutsideYNoption1." />Yes<input type='radio' name='SexOutsideYN' value='No' ".$SexOutsideYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['SexOutsideYN']."><tr><td><b>Do you believe that sex outside of marriage is wrong? </b></td></tr><tr><td>".$SRPSexOutsideYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['SexOutside']."><tr><td><b>Why or why not?</b></td></tr><tr><td><textarea name='SexOutside' cols='80' rows='6'>".$SRPSexOutside."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['SexOutside']."><tr><td><b>Why or why not?</b></td></tr><tr><td>".$SRPSexOutside."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '8' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      $outI .= "<table ".$bgclr['HomosexualStruggle']."><tr><td><b>How would you feel if someone told you about his or her homosexual struggles?</b></td></tr><tr><td><textarea name='HomosexualStruggle' cols='80' rows='6'>".$SRPHomosexualStruggle."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['HomosexualStruggle']."><tr><td><b>How would you feel if someone told you about his or her homosexual struggles?</b></td></tr><tr><td>".$SRPHomosexualStruggle."</td></tr><tr><td></table><br/>";      $outI .= "<table ".$bgclr['Support']."><tr><td><b>Describe the people in your life who know about your struggles and who are supportive of your healing. </b></td></tr><tr><td><textarea name='Support' cols='80' rows='6'>".$SRPSupport."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['Support']."><tr><td><b>Describe the people in your life who know about your struggles and who are supportive of your healing. </b></td></tr><tr><td>".$SRPSupport."</td></tr><tr><td></table><br/>";      switch ($SRPPreviousAttendanceYN){case 'Yes': $PreviousAttendanceYNoption1="checked='checked'"; break;case 'No': $PreviousAttendanceYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['PreviousAttendanceYN']."><tr><td><b>Have you ever attended the River or a Desert Stream program before? </b></td></tr><tr><td><input type='radio' name='PreviousAttendanceYN' value='Yes' ".$PreviousAttendanceYNoption1." />Yes<input type='radio' name='PreviousAttendanceYN' value='No' ".$PreviousAttendanceYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['PreviousAttendanceYN']."><tr><td><b>Have you ever attended the River or a Desert Stream program before? </b></td></tr><tr><td>".$SRPPreviousAttendanceYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['PreviousAttendance']."><tr><td><b>If so, indicate date(s) and location(s).</b></td></tr><tr><td><textarea name='PreviousAttendance' cols='80' rows='6'>".$SRPPreviousAttendance."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['PreviousAttendance']."><tr><td><b>If so, indicate date(s) and location(s).</b></td></tr><tr><td>".$SRPPreviousAttendance."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '9' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      $outI .= "<table ".$bgclr['Expectations']."><tr><td><b>What are your expectations in coming to the River?</b></td></tr><tr><td><textarea name='Expectations' cols='80' rows='6'>".$SRPExpectations."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['Expectations']."><tr><td><b>What are your expectations in coming to the River?</b></td></tr><tr><td>".$SRPExpectations."</td></tr><tr><td></table><br/>";      switch ($SRPAttendanceYN){case 'Yes': $AttendanceYNoption1="checked='checked'"; break;case 'No': $AttendanceYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['AttendanceYN']."><tr><td><b>Attendance at the River is mandatory. Each session builds on the previous meeting, and attendance benefits the small group dynamics as well as your healing process. We will meet every week for the duration of the program. We will also meet on two Saturdays, the specific dates will be announced, (9am-4pm). Can you commit to the scheduled sessions? </b></td></tr><tr><td><input type='radio' name='AttendanceYN' value='Yes' ".$AttendanceYNoption1." />Yes<input type='radio' name='AttendanceYN' value='No' ".$AttendanceYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['AttendanceYN']."><tr><td><b>Attendance at the River is mandatory. Each session builds on the previous meeting, and attendance benefits the small group dynamics as well as your healing process. We will meet every week for the duration of the program. We will also meet on two Saturdays, the specific dates will be announced, (9am-4pm). Can you commit to the scheduled sessions? </b></td></tr><tr><td>".$SRPAttendanceYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['Attendance']."><tr><td><b>If not, please explain and give dates you would be unable to attend.</b></td></tr><tr><td><textarea name='Attendance' cols='80' rows='6'>".$SRPAttendance."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['Attendance']."><tr><td><b>If not, please explain and give dates you would be unable to attend.</b></td></tr><tr><td>".$SRPAttendance."</td></tr><tr><td></table><br/>";} ?>   <?php if($curPage == '10' || $curPage == 'REVIEW'  || $curPage == 'SUBMIT'){   if ($curPage != 'REVIEW' && $curPage != 'SUBMIT') {$outI .= '<center>Page '.$curPage.' of 10</center><br/>';$outP .= '<center>Page '.$curPage.' of 10</center><br/>';}      switch ($SRPAccountabilityYN){case 'Yes': $AccountabilityYNoption1="checked='checked'"; break;case 'No': $AccountabilityYNoption2="checked='checked'"; break;}      $outI .= "<table ".$bgclr['AccountabilityYN']."><tr><td><b>Prayer and accountability are essential to the healing process. We ask each participant to find two people outside of the group who will commit to intercede for you during the 15-week period. We also ask you to meet at least once a week with someone from outside of the group who will support you as an accountability partner. Are you willing to meet these expectations?</b></td></tr><tr><td><input type='radio' name='AccountabilityYN' value='Yes' ".$AccountabilityYNoption1." />Yes<input type='radio' name='AccountabilityYN' value='No' ".$AccountabilityYNoption2." />No</table><br/>";      $outP .= "<table ".$bgclr['AccountabilityYN']."><tr><td><b>Prayer and accountability are essential to the healing process. We ask each participant to find two people outside of the group who will commit to intercede for you during the 15-week period. We also ask you to meet at least once a week with someone from outside of the group who will support you as an accountability partner. Are you willing to meet these expectations?</b></td></tr><tr><td>".$SRPAccountabilityYN."</td></tr></table><br/>";      $outI .= "<table ".$bgclr['Accountability']."><tr><td><b>If not, please explain.</b></td></tr><tr><td><textarea name='Accountability' cols='80' rows='6'>".$SRPAccountability."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['Accountability']."><tr><td><b>If not, please explain.</b></td></tr><tr><td>".$SRPAccountability."</td></tr><tr><td></table><br/>";      $outI .= "<table ".$bgclr['AdditionalText']."><tr><td><b>Optional: As we pray about your application, it helps us to know more about you. Are there other things that you would like us to know? </b></td></tr><tr><td><textarea name='AdditionalText' cols='80' rows='6'>".$SRPAdditionalText."</textarea><br/><br/><tr><td></table><br/>";      $outP .= "<table ".$bgclr['AdditionalText']."><tr><td><b>Optional: As we pray about your application, it helps us to know more about you. Are there other things that you would like us to know? </b></td></tr><tr><td>".$SRPAdditionalText."</td></tr><tr><td></table><br/>";} ?><?php if($curPage != 'SUBMIT') {echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><title>Application Form for The River </title></head><body><font face ='Arial,Veranda,Garamond'>"."<form action='index.php' enctype='multipart/form-data' method='post'>".$outI.$pageNav.'</form></font></body>';}?><?php $errFail = 'FALSE';if($curPage == 'SUBMIT' && count($arrErrors) == 0){   $mysqlLink = @mysql_connect('h50mysql57.secureserver.net', 'SRPRegDB', 'CjWLvbG4dqTm');   if(mysql_errno() != 0){$outP = "<div style='border: 1px solid red; background-color: #FFCCCC; width: auto; padding: 5px 0;'><font face='verdana'><b><center>ERROR IN SUBMITTING DATA</center></b></font></div><br/><br/>"."There was an error in communicating with our computers.  Don't worry.  The information you've filled out is still here.  Please copy the below information into an e-mail and send it to Kevin at <a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a> and include the below error information.  This will help Kevin diagnose and fix the problem. <br/><br/>Error Number: ".mysql_errno()."<br/>Error Message: ".mysql_error().'<br/><br/>'.$outP; $errFail = 'TRUE';}   if($errFail == 'FALSE'){@mysql_select_db('SRPRegDB',$mysqlLink); if(mysql_errno() != 0){$outP = "<div style='border: 1px solid red; background-color: #FFCCCC; width: auto; padding: 5px 0;'><font face='verdana'><b><center>ERROR IN SUBMITTING DATA</center></b></font></div><br/><br/>"."There was an error in communicating with our computers.  Don't worry.  The information you've filled out is still here.  Please copy the below information into an e-mail and send it to Kevin at <a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a> and include the below error information.  This will help Kevin diagnose and fix the problem. <br/><br/>Error Number: ".mysql_errno()."<br/>Error Message: ".mysql_error().'<br/><br/>'.$outP; $errFail = 'TRUE';}}      if($errFail == 'FALSE'){      $SRPFirstName = substr($SRPFirstName, 0, 40); $SRPLastName = substr($SRPLastName, 0, 40); $SRPAddress = substr($SRPAddress, 0, 40); $SRPCity = substr($SRPCity, 0, 40); $SRPState = substr($SRPState, 0, 20); $SRPZip = substr($SRPZip, 0, 10); $SRPPhone = substr($SRPPhone, 0, 14); $SRPPhoneType = substr($SRPPhoneType, 0, 10); $SRPNoMessages = substr($SRPNoMessages, 0, 60); $SRPEmail = substr($SRPEmail, 0, 40); $SRPSex = substr($SRPSex, 0, 6); $SRPBirthday = substr($SRPBirthday, 0, 10); $SRPStudent = substr($SRPStudent, 0, 3); $SRPSchool = substr($SRPSchool, 0, 40); $SRPWork = substr($SRPWork, 0, 3); $SRPOccupation = substr($SRPOccupation, 0, 40); $SRPYouthWorker = substr($SRPYouthWorker, 0, 3); $SRPCapacity = substr($SRPCapacity, 0, 40); $SRPRelationshipStatus = substr($SRPRelationshipStatus, 0, 10); $SRPRiverReferral = substr($SRPRiverReferral, 0, 40); $SRPChristian = substr($SRPChristian, 0, 80); $SRPFirstChristian = substr($SRPFirstChristian, 0, 80); $SRPPastInvolvement = substr($SRPPastInvolvement, 0, 5000); $SRPHealingPrayer = substr($SRPHealingPrayer, 0, 5000); $SRPOnGoingFellowship = substr($SRPOnGoingFellowship, 0, 5000); $SRPHealingIssues = substr($SRPHealingIssues, 0, 5000); $SRPRelationalDifficulties = substr($SRPRelationalDifficulties, 0, 5000); $SRPSexualContactYN = substr($SRPSexualContactYN, 0, 3); $SRPSexualContact = substr($SRPSexualContact, 0, 5000); $SRPTraumaAbuse = substr($SRPTraumaAbuse, 0, 5000); $SRPAddictiveTendenciesYN = substr($SRPAddictiveTendenciesYN, 0, 3); $SRPAddictiveTendencies = substr($SRPAddictiveTendencies, 0, 5000); $SRPMastPornYN = substr($SRPMastPornYN, 0, 3); $SRPMastPorn = substr($SRPMastPorn, 0, 5000); $SRPCounselingPastYN = substr($SRPCounselingPastYN, 0, 3); $SRPCounselingPast = substr($SRPCounselingPast, 0, 5000); $SRPSuicideYN = substr($SRPSuicideYN, 0, 3); $SRPSuicide = substr($SRPSuicide, 0, 5000); $SRPAlchDrugsYN = substr($SRPAlchDrugsYN, 0, 3); $SRPAlchDrugs = substr($SRPAlchDrugs, 0, 5000); $SRPSexOutsideYN = substr($SRPSexOutsideYN, 0, 3); $SRPSexOutside = substr($SRPSexOutside, 0, 5000); $SRPHomosexualStruggle = substr($SRPHomosexualStruggle, 0, 5000); $SRPSupport = substr($SRPSupport, 0, 5000); $SRPPreviousAttendanceYN = substr($SRPPreviousAttendanceYN, 0, 3); $SRPPreviousAttendance = substr($SRPPreviousAttendance, 0, 5000); $SRPExpectations = substr($SRPExpectations, 0, 5000); $SRPAttendanceYN = substr($SRPAttendanceYN, 0, 3); $SRPAttendance = substr($SRPAttendance, 0, 5000); $SRPAccountabilityYN = substr($SRPAccountabilityYN, 0, 3); $SRPAccountability = substr($SRPAccountability, 0, 5000); $SRPAdditionalText = substr($SRPAdditionalText, 0, 5000);      $appDate = date('Y-m-d'); $appTime = date('H:i:s A T');      $sqlCmd = sprintf("INSERT INTO `SRPRegDB`.`river_application_2010_data` (`FirstName`, `LastName`, `Address`, `City`, `State`, `Zip`, `Phone`, `PhoneType`, `NoMessages`, `Email`, `Sex`, `Birthday`, `Student`, `School`, `Work`, `Occupation`, `YouthWorker`, `Capacity`, `RelationshipStatus`, `RiverReferral`, `Christian`, `FirstChristian`, `PastInvolvement`, `HealingPrayer`, `OnGoingFellowship`, `HealingIssues`, `RelationalDifficulties`, `SexualContactYN`, `SexualContact`, `TraumaAbuse`, `AddictiveTendenciesYN`, `AddictiveTendencies`, `MastPornYN`, `MastPorn`, `CounselingPastYN`, `CounselingPast`, `SuicideYN`, `Suicide`, `AlchDrugsYN`, `AlchDrugs`, `SexOutsideYN`, `SexOutside`, `HomosexualStruggle`, `Support`, `PreviousAttendanceYN`, `PreviousAttendance`, `Expectations`, `AttendanceYN`, `Attendance`, `AccountabilityYN`, `Accountability`, `AdditionalText`, `Date`, `Time`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",mysql_real_escape_string($SRPFirstName, $mysqlLink), mysql_real_escape_string($SRPLastName, $mysqlLink), mysql_real_escape_string($SRPAddress, $mysqlLink), mysql_real_escape_string($SRPCity, $mysqlLink), mysql_real_escape_string($SRPState, $mysqlLink), mysql_real_escape_string($SRPZip, $mysqlLink), mysql_real_escape_string($SRPPhone, $mysqlLink), mysql_real_escape_string($SRPPhoneType, $mysqlLink), mysql_real_escape_string($SRPNoMessages, $mysqlLink), mysql_real_escape_string($SRPEmail, $mysqlLink), mysql_real_escape_string($SRPSex, $mysqlLink), mysql_real_escape_string($SRPBirthday, $mysqlLink), mysql_real_escape_string($SRPStudent, $mysqlLink), mysql_real_escape_string($SRPSchool, $mysqlLink), mysql_real_escape_string($SRPWork, $mysqlLink), mysql_real_escape_string($SRPOccupation, $mysqlLink), mysql_real_escape_string($SRPYouthWorker, $mysqlLink), mysql_real_escape_string($SRPCapacity, $mysqlLink), mysql_real_escape_string($SRPRelationshipStatus, $mysqlLink), mysql_real_escape_string($SRPRiverReferral, $mysqlLink), mysql_real_escape_string($SRPChristian, $mysqlLink), mysql_real_escape_string($SRPFirstChristian, $mysqlLink), mysql_real_escape_string($SRPPastInvolvement, $mysqlLink), mysql_real_escape_string($SRPHealingPrayer, $mysqlLink), mysql_real_escape_string($SRPOnGoingFellowship, $mysqlLink), mysql_real_escape_string($SRPHealingIssues, $mysqlLink), mysql_real_escape_string($SRPRelationalDifficulties, $mysqlLink), mysql_real_escape_string($SRPSexualContactYN, $mysqlLink), mysql_real_escape_string($SRPSexualContact, $mysqlLink), mysql_real_escape_string($SRPTraumaAbuse, $mysqlLink), mysql_real_escape_string($SRPAddictiveTendenciesYN, $mysqlLink), mysql_real_escape_string($SRPAddictiveTendencies, $mysqlLink), mysql_real_escape_string($SRPMastPornYN, $mysqlLink), mysql_real_escape_string($SRPMastPorn, $mysqlLink), mysql_real_escape_string($SRPCounselingPastYN, $mysqlLink), mysql_real_escape_string($SRPCounselingPast, $mysqlLink), mysql_real_escape_string($SRPSuicideYN, $mysqlLink), mysql_real_escape_string($SRPSuicide, $mysqlLink), mysql_real_escape_string($SRPAlchDrugsYN, $mysqlLink), mysql_real_escape_string($SRPAlchDrugs, $mysqlLink), mysql_real_escape_string($SRPSexOutsideYN, $mysqlLink), mysql_real_escape_string($SRPSexOutside, $mysqlLink), mysql_real_escape_string($SRPHomosexualStruggle, $mysqlLink), mysql_real_escape_string($SRPSupport, $mysqlLink), mysql_real_escape_string($SRPPreviousAttendanceYN, $mysqlLink), mysql_real_escape_string($SRPPreviousAttendance, $mysqlLink), mysql_real_escape_string($SRPExpectations, $mysqlLink), mysql_real_escape_string($SRPAttendanceYN, $mysqlLink), mysql_real_escape_string($SRPAttendance, $mysqlLink), mysql_real_escape_string($SRPAccountabilityYN, $mysqlLink), mysql_real_escape_string($SRPAccountability, $mysqlLink), mysql_real_escape_string($SRPAdditionalText, $mysqlLink), mysql_real_escape_string($appDate), mysql_real_escape_string($appTime));      $resultMySQL = @mysql_query($sqlCmd, $mysqlLink); $resultID = mysql_insert_id() - 1;      if(mysql_errno() > 0) {$outP = "<div style='border: 1px solid red; background-color: #FFCCCC; width: auto; padding: 5px 0;'><font face='verdana'><b><center>ERROR IN SUBMITTING DATA</center></b></font></div><br/><br/>"."There was an error in saving the data on our computers.  Don't worry.  The information you've filled out is still here.  Please copy the below information into an e-mail and send it to Kevin at Kevin and include the below error information.  This will help Kevin diagnose and fix the problem. <br/><br/>Error Number: ".mysql_errno()."<br/>Error Message: ".mysql_error().'<br/><br/>'.$outP; $errFail = 'TRUE';}   }   if($resultAdmin && $resultConf && $resultMySQL){echo "<div style='border: 1px solid green; background-color: #00DD00; width: auto; padding: 5px 0;'><font face='verdana'><b><center>SUCCESS</center></b></font></div><br/><br/>"."We have received your application for The River on Day 1 to Day 2 at Event Location.  Instructions.  If you have any questions, please contact Leigh at <a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>.  If you do not receive an e-mail confirmation in the next 30 minutes, please contact Kevin at <a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>.  <br/><br/>Blessings,<br/>Kevin<br/>The River Web-guru<br/>";}   else {      if($resultMySQL && $resultAdmin && !$resultConf ){echo "<div style='border: 1px solid yellow; background-color: #FFFF66; width: auto; padding: 5px 0;'><font face='verdana'><b><center>WARNING: SOME INFORMATION SUCCESSFULLY SUBMITTED</center></b></font></div><br/><br/>"."We received your application, however there was a problem sending a confirmation e-mail to you.  If you have any questions, please contact Leigh (<a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>).  Otherwise, there is nothing else you need to do.<br/><br/>".$outP;}      if($resultMySQL && $resultConf && !$resultAdmin ){echo "<div style='border: 1px solid yellow; background-color: #FFFF66; width: auto; padding: 5px 0;'><font face='verdana'><b><center>WARNING: SOME INFORMATION SUCCESSFULLY SUBMITTED</center></b></font></div><br/><br/>"."We received your application and successfully sent you a confirmation e-mail, however there was a problem sending a confirmation to our team.  Please forward your confirmation e-mail to Leigh (<a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>) to make sure we know about your application.";}      if($resultMySQL && !$resultConf && !$resultAdmin ){echo "<div style='border: 1px solid yellow; background-color: #FFFF66; width: auto; padding: 5px 0;'><font face='verdana'><b><center>WARNING: SOME INFORMATION SUCCESSFULLY SUBMITTED</center></b></font></div><br/><br/>"."We received your application, but were not able to send either your or our team an e-mail.  Please send an e-mail to Leigh (<a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>) to make sure we know about your application.<br/><br/>".$outP;}      if(!$resultMySQL){echo "<div style='border: 1px solid red; background-color: #FFCCCC; width: auto; padding: 5px 0;'><font face='verdana'><b><center>ERROR IN SUBMITTING DATA</center></b></font></div><br/><br/>"."We did not received your application.  There was a problem submitting the information to our end.  Don't worry.  Your data has been saved on your computer for another 8 days.  Contact Kevin (<a href='mailto:kevin@soulrestorationproject.org'>kevin@soulrestorationproject.org</a>) to let him know what happened.  He'll try to get the system back up and running as soon as possible.  Please ignore any confirmation e-mails that may or may not have gone out.<br/><br/>".$outP;}   }   if($errFail != 'FALSE'){die($outP);}}?>

Connect With Us

  (714) 262 - 4445
  1801-F Parkcourt Place, Suite 205
      Santa Ana, CA 92701

Counselor Social Media