$group, 'option' => $_POST[option], 'type' => $type, 'cost' => $cost, 'duration' => $duration, 'adtype' => $addtype); showform(); break; ///////////////////////////////////////////////////// case preview: $ipisme = ''; $ipisme = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ?$HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) )? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); $_SESSION['ipisme'] = "$ipisme"; $error='0'; if(empty($_POST[name])){ $NE = '1'; $error++;} if(empty($_POST[email])){ $EE = '1'; $error++;} if(empty($_POST[phone])){ $PE = '1'; $error++;} if(empty($_POST[ckemail])){ if(empty($_POST[ckphone])){ $CONE ='1'; $error++;} } if($_POST[category]==''){ $CATE = '1'; $error++;} if($_POST[location]==''){ $LOCE = '1'; $error++;} if(empty($_POST[city])){ $CE = '1'; $error++;} if(empty($_POST[zipcode])){ $ZE = '1'; $error++;} if(empty($_POST[price])){ $PRE = '1'; $error++;} if(empty($_POST[subject])){ $SUBE = '1'; $error++;} if(empty($_POST[caption])){ $CAPE = '1'; $error++;} if(empty($_POST[describe])){ $DESE = '1'; $error++;} if($error > 0){echo '
There were problems with your form submission.' .'
each item marked in red below must be filled out
'; if(!$add){ getcat($category);} $_POST[email] = stripteaseme($_POST[email]); $_POST[name] = htmlentities($_POST[name]); $_POST[phone] = htmlentities($_POST[phone]); $_SESSION[add] = array('name' => $_POST[name], 'email' => $_POST[email], 'phone' => $_POST[phone], 'NE' => $NE, 'EE' => $EE, 'PE' => $PE, 'CONE' => $CONE, 'CATE' => $CATE, 'LOCE' => $LOCE, 'CE' => $CE, 'ZE' => $ZE, 'PRE' => $PRE, 'SUBE' => $SUBE, 'CAPE' => $CAPE, 'DESE' => $DESE, 'category' => $_SESSION[category], 'subcategory' => $_SESSION[subcategory], 'cost' => $_SESSION[cost], 'location' => $_POST[location], 'city' => $_POST[city], 'zipcode' => $_POST[zipcode], 'price' => $_POST[price], 'subject' => $_POST[subject], 'caption' => $_POST[caption], 'describe' => $_POST[describe], 'url' => $_POST[url], 'error' => $error); showform($_SESSION[add]);} else{ showpreview(); } break; ///////////////////////////////////////////////////// case submit: bookit($_SESSION[add]); break; //////////////////////////////////////////////////////// case changes: if($_SESSION[add]){showform($_SESSION[add]);} break; /////////////////////////////////////////////////////// } include ('subparts/footer.txt'); ?>