"Alabama", 'AK'=>"Alaska", 'AZ'=>"Arizona", 'AR'=>"Arkansas", 'CA'=>"California", 'CO'=>"Colorado", 'CT'=>"Connecticut", 'DE'=>"Delaware", 'DC'=>"District of Columbia", 'FL'=>"Florida", 'GA'=>"Georgia", 'HI'=>"Hawaii", 'ID'=>"Idaho", 'IL'=>"Illinois", 'IN'=>"Indiana", 'IA'=>"Iowa", 'KS'=>"Kansas", 'KY'=>"Kentucky", 'LA'=>"Louisiana", 'ME'=>"Maine", 'MD'=>"Maryland", 'MA'=>"Massachusetts", 'MI'=>"Michigan", 'MN'=>"Minnesota", 'MS'=>"Mississippi", 'MO'=>"Missouri", 'MT'=>"Montana", 'NE'=>"Nebraska", 'NV'=>"Nevada", 'NH'=>"New Hampshire", 'NJ'=>"New Jersey", 'NM'=>"New Mexico", 'NY'=>"New York", 'NC'=>"North Carolina", 'ND'=>"North Dakota", 'OH'=>"Ohio", 'OK'=>"Oklahoma", 'OR'=>"Oregon", 'PA'=>"Pennsylvania", 'RI'=>"Rhode Island", 'SC'=>"South Carolina", 'SD'=>"South Dakota", 'TN'=>"Tennessee", 'TX'=>"Texas", 'UT'=>"Utah", 'VT'=>"Vermont", 'VA'=>"Virginia", 'WA'=>"Washington", 'WV'=>"West Virginia", 'WI'=>"Wisconsin", 'WY'=>"Wyoming"); /** THIS SECTION DISPLAYS THE DATA FOR CONFIRMATION **/ // Need to interlace this with the edit / upload / copy screen from above. /**if($deletepics == 1){ //delete pictures uploaded $file1 = $picname1; $file2 = $picname2; $file3 = $picname3; $file1 = stripslashes(str_replace("\"", "", $file1)); $file2 = stripslashes(str_replace("\"", "", $file2)); $file3 = stripslashes(str_replace("\"", "", $file3)); $file1 = "/srv/www/htdocs/trifind/racepics/$file1.img"; $file2 = "/srv/www/htdocs/trifind/racepics/$file2.img"; $file3 = "/srv/www/htdocs/trifind/racepics/$file3.img"; if(file_exists($file1)){ unlink($file1); } if(file_exists($file2)){ unlink($file2); } if(file_exists($file3)){ unlink($file3); } }**/ $errmsg = NULL; //Check for blank fields if ((!$_POST[name])) $errmsg = $errmsg.'Race name, '; if ($_POST[month]==0) $errmsg = $errmsg.'Race month, '; if ($_POST[day]==0) $errmsg = $errmsg.'Race day, '; if ($_POST[type]==0) $errmsg = $errmsg.'Race type, '; if (!$_POST[indivfee]) $errmsg = $errmsg.'Individual entry fee, '; if (!$_POST[swim]) $errmsg = $errmsg.'1st event distance, '; if (!$_POST[bike]) $errmsg = $errmsg.'2nd event distance, '; //if (!$_POST[run]) $errmsg = $errmsg.'3rd event distance, '; if (!$_POST[state]) $errmsg = $errmsg.'State, '; if (!$_POST[city]) $errmsg = $errmsg.'City, '; if (!$_POST[address]) $errmsg = $errmsg.'Address, '; if (!$_POST[phone]) $errmsg = $errmsg.'Phone, '; if (!$_POST[email]) $errmsg = $errmsg.'Email, '; if (strlen($_POST[courseinfo]) < 4) $errmsg = $errmsg.'Course info, '; if (strlen($_POST[moreinfo]) < 4) $errmsg = $errmsg.'More info, '; if (strlen($_POST[directions]) < 4) $errmsg = $errmsg.'Directions, '; if (!$_POST[website]) $errmsg = $errmsg.'Website, '; if (isset($errmsg)) { $errmsg = 'The following fields cannot be left blank: '.$errmsg; $errmsg = rtrim($errmsg, ', '); } if( preg_match('/[^a-zA-Z0-9\. ]/', $_POST[name]) ) { // Contains invalid characters. $errmsg = "Please use only letters and numbers in the name"; } $name = trim($_POST[name]); $nametag = strtolower(str_replace(" ","", $name)); if(strlen($nametag) > 12){ //Shorten it $nametag = substr($nametag, 0, 12); } $hour = $_POST[hour]; if($_POST[daypart] == 1){ $hour = $hour + 12; } $state = $_POST[state]; $statetag = strtolower(str_replace(" ","", $state)); $type = $_POST[type]; $indivfee = trim($_POST[indivfee]); $teamfee = trim($_POST[teamfee]); $swim = $_POST[swim]; $oneunit = $_POST[oneunit]; $twounit = $_POST[twounit]; $threeunit = $_POST[threeunit]; $onetype = $_POST[onetype]; $twotype = $_POST[twotype]; $threetype = $_POST[threetype]; $bike = $_POST[bike]; $run = $_POST[run]; $city = trim($_POST[city]); $address = trim($_POST[address]); $phone = trim($_POST[phone]); $email = trim($_POST[email]); $courseinfo = nl2br(substr(trim($_POST[courseinfo]), 0, 4096)); $moreinfo = nl2br(substr(trim($_POST[moreinfo]), 0, 4096)); $directions = nl2br(substr(trim($_POST[directions]), 0, 4096)); $register = trim($_POST[register]); $website = trim($_POST[website]); $results = trim($_POST[results]); $sixresults = trim($_POST[sixresults]); $minute = $_POST[minute]; $year = $_POST[year]; $month = $_POST[month]; $day = $_POST[day]; $date = "$year-$month-$day $hour:$minute:00"; $uid = $_POST[uid]; if($type == 1){ $typename = 'Triathlon'; } if($type == 2){ $typename = 'Duathlon'; } if($type == 3){ $typename = 'Other'; } ?>

Edit a Race

Please confirm your race information. If everything is correct, click the submit button. Otherwise, you may click the edit button to change your race information before submitting.

Date:
Race Type:
Course:
Start:
Location:
Address:
Contact: "; echo stripslashes($email); ?>
Individual Price:
Team Price:
Course Info:
More:
Directions:
Register: Click here"; ?>
Website: $name"; ?>

This data will be saved as a NEW RACE. This data will be saved as a modification to the EXISTING RACE.