discourse-legacysite-perl/site/racecalendar/include_edit_confirm.php
2024-06-17 22:42:14 +10:00

310 lines
15 KiB
PHP

<div style="padding-right: 15px;">
<p>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.</p>
<p><font color="red"><? echo $dupmsg; ?></font></p>
<? // build unix timestamp for post back
if($_POST[daypart] == 1) { $_POST[hour] = $_POST[hour] + 12; }
$racedate = mktime($_POST[hour], $_POST[minute], '00', $_POST[month], $_POST[day], $_POST[year]);
?>
<div class="dtable form">
<div class="drow">
<div class="dcell name">Race Name</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($_POST[name]); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Date</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo "$month/$day/$year"; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Race Type</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo $typename; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Bike Surface</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if ($bike_surface == 1) { $bike_surface_name = "Offroad"; }
elseif ($bike_surface == 2) { $bike_surface_name = "Gravel"; }
else { $bike_surface_name = "Road"; }
?>
<? echo $bike_surface_name; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Drafting rules</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? //Determine draft rules
if ($draft_legal == 1) { $draft_legal_name = "Draft-legal"; }
else { $draft_legal_name = "Non-drafting"; }
?>
<? echo $draft_legal_name; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Kid's race?</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? //Determine kids race
if ($kids_race == 1) { $kids_race_name = "This is a kids' race"; }
else { $kids_race_name = "This is NOT a kids' race"; }
?>
<? echo $kids_race_name; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Course</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if($oneunit == 1){ $oneunitword = "mile"; }
if($oneunit == 2){ $oneunitword = "meter"; }
if($oneunit == 3){ $oneunitword = "yard"; }
if($oneunit == 4){ $oneunitword = "kilometers"; }
if($twounit == 1){ $twounitword = "mile"; }
if($twounit == 2){ $twounitword = "meter"; }
if($twounit == 3){ $twounitword = "yard"; }
if($twounit == 4){ $twounitword = "kilometers"; }
if($threeunit == 1){ $threeunitword = "mile"; }
if($threeunit == 2){ $threeunitword = "meter"; }
if($threeunit == 3){ $threeunitword = "yard"; }
if($threeunit == 4){ $threeunitword = "kilometers"; }
if($onetype == 1){ $onetypeword = "swim"; }
if($onetype == 2){ $onetypeword = "bike"; }
if($onetype == 3){ $onetypeword = "run"; }
if($onetype == 4){ $onetypeword = "paddle"; }
if($onetype == 5){ $onetypeword = "ski"; }
if($twotype == 1){ $twotypeword = "swim"; }
if($twotype == 2){ $twotypeword = "bike"; }
if($twotype == 3){ $twotypeword = "run"; }
if($twotype == 4){ $twotypeword = "paddle"; }
if($twotype == 5){ $twotypeword = "paddle"; }
if($threetype == 1){ $threetypeword = "swim"; }
if($threetype == 2){ $threetypeword = "bike"; }
if($threetype == 3){ $threetypeword = "run"; }
if($threetype == 4){ $threetypeword = "paddle"; }
if($threetype == 5){ $threetypeword = "ski"; }
?>
<?
echo "$swim $oneunitword $onetypeword, $bike $twounitword $twotypeword";
if ($run != 0) { echo ", $run $threeunitword $threetypeword"; }
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Start</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo "$hour:$minute"; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Location</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($city); echo ", $state"; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Address</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($address); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Contact</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($phone); echo "<br />"; echo stripslashes($email); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Individual Price</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($indivfee); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Team Price</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($teamfee); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Registration/convenience fees included?</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? //Determine draft rules
if ($registration == 1) { $registration_name = "ALL registration/convenience fees ARE included in price."; }
else { $registration_name = "Not specified whether any/all registration fees are included in price."; }
?>
<? echo $registration_name; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Course Info</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($courseinfo); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">More</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($moreinfo); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Directions</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes($directions); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Register</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo "<a target=\"_blank\" href=\"$register\">Click here</a>"; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Website</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo "<a target=\"_blank\" href=\"$website\">$name</a>"; ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Results</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo "<a target=\"_blank\" href=\"$results\">$results</a>"; ?>
</div>
</div>
<div class="drow actions">
<div class="dcell name"></div>
<div class="dcell divider"></div>
<div class="dcell value">
<form enctype="multipart/form-data" action="wiki_edit.php" method="post">
<input type="hidden" name="name" value="<? echo stripslashes(htmlspecialchars($_POST[name])); ?>">
<input type="hidden" name="month" value="<? echo $_POST[month]; ?>">
<input type="hidden" name="day" value="<? echo $_POST[day]; ?>">
<input type="hidden" name="daypart" value="<? echo $_POST[daypart]; ?>">
<input type="hidden" name="hour" value="<? echo $_POST[hour]; ?>">
<input type="hidden" name="minute" value="<? echo $_POST[minute]; ?>">
<input type="hidden" name="year" value="<? echo $_POST[year]; ?>">
<input type="hidden" name="type" value="<? echo $_POST[type]; ?>">
<input type="hidden" name="bike_surface" value="<? echo $_POST[bike_surface]; ?>">
<input type="hidden" name="draft_legal" value="<? echo $_POST[draft_legal]; ?>">
<input type="hidden" name="kids_race" value="<? echo $_POST[kids_race]; ?>">
<input type="hidden" name="indivfee" value="<? echo stripslashes(htmlspecialchars($_POST[indivfee])); ?>">
<input type="hidden" name="teamfee" value="<? echo stripslashes(htmlspecialchars($_POST[teamfee])); ?>">
<input type="hidden" name="registration" value="<? echo $registration; ?>">
<input type="hidden" name="swim" value="<? echo stripslashes(htmlspecialchars($_POST[swim])); ?>">
<input type="hidden" name="bike" value="<? echo stripslashes(htmlspecialchars($_POST[bike])); ?>">
<input type="hidden" name="run" value="<? echo stripslashes(htmlspecialchars($_POST[run])); ?>">
<input type="hidden" name="oneunit" value="<? echo $_POST[oneunit]; ?>">
<input type="hidden" name="twounit" value="<? echo $_POST[twounit]; ?>">
<input type="hidden" name="threeunit" value="<? echo $_POST[threeunit]; ?>">
<input type="hidden" name="onetype" value="<? echo $_POST[onetype]; ?>">
<input type="hidden" name="twotype" value="<? echo $_POST[twotype]; ?>">
<input type="hidden" name="threetype" value="<? echo $_POST[threetype]; ?>">
<input type="hidden" name="state" value="<? echo $_POST[state]; ?>">
<input type="hidden" name="city" value="<? echo stripslashes(htmlspecialchars($_POST[city])); ?>">
<input type="hidden" name="address" value="<? echo stripslashes(htmlspecialchars($_POST[address])); ?>">
<input type="hidden" name="phone" value="<? echo stripslashes(htmlspecialchars($_POST[phone])); ?>">
<input type="hidden" name="email" value="<? echo stripslashes(htmlspecialchars($_POST[email])); ?>">
<input type="hidden" name="courseinfo" value="<? echo stripslashes(htmlspecialchars($_POST[courseinfo])); ?>">
<input type="hidden" name="moreinfo" value="<? echo stripslashes(htmlspecialchars($_POST[moreinfo])); ?>">
<input type="hidden" name="directions" value="<? echo stripslashes(htmlspecialchars($_POST[directions])); ?>">
<input type="hidden" name="register" value="<? echo $_POST[register]; ?>">
<input type="hidden" name="website" value="<? echo $_POST[website]; ?>">
<input type="hidden" name="racedate" value="<? echo $racedate; ?>">
<input type="hidden" name="edit_race" value="1">
<? // need to temporary set the field as being valid ?>
<input type="hidden" name="valid" value="1">
<input type="hidden" name="confirm_entry" value="1">
<? if(isset($_POST[add_race])){ ?>
This data will be saved as a NEW RACE.
<input type="hidden" name="add_race" value="1" />
<input type="hidden" name="submitted_by" value="<? echo $_POST[edited_by]; ?>" />
<? } else { ?>
This data will be saved as a modification to the EXISTING RACE.
<input type="hidden" name="save_changes" value="1" />
<input type="hidden" name="uid" value="<? echo $_POST[uid]; ?>" />
<input type="hidden" name="edited_by" value="<? echo($_POST[edited_by]); ?>">
<input type="hidden" name="submitted_by" value="<? echo ($_POST[submitted_by]); ?>" />
<? } ?>
<input type="submit" name="submit" value="Confirm" class="btn float-left" style="margin-right: 5px;" />
</form>
<form action="wiki_edit.php" method="post" enctype="multipart/form-data" >
<input type="hidden" name="name" value="<? echo stripslashes(htmlspecialchars($name)); ?>">
<input type="hidden" name="month" value="<? echo $month; ?>">
<input type="hidden" name="day" value="<? echo $day; ?>">
<input type="hidden" name="daypart" value="<? echo $daypart; ?>">
<input type="hidden" name="hour" value="<? echo $hour; ?>">
<input type="hidden" name="minute" value="<? echo $minute; ?>">
<input type="hidden" name="year" value="<? echo $year; ?>">
<input type="hidden" name="racedate" value="<? echo $racedate; ?>">
<input type="hidden" name="type" value="<? echo $type; ?>">
<input type="hidden" name="bike_surface" value="<? echo $bike_surface; ?>">
<input type="hidden" name="draft_legal" value="<? echo $draft_legal; ?>">
<input type="hidden" name="kids_race" value="<? echo $kids_race; ?>">
<input type="hidden" name="indivfee" value="<? echo stripslashes(htmlspecialchars($indivfee)); ?>">
<input type="hidden" name="teamfee" value="<? echo stripslashes(htmlspecialchars($teamfee)); ?>">
<input type="hidden" name="registration" value="<? echo $registration; ?>">
<input type="hidden" name="swim" value="<? echo stripslashes(htmlspecialchars($swim)); ?>">
<input type="hidden" name="bike" value="<? echo stripslashes(htmlspecialchars($bike)); ?>">
<input type="hidden" name="run" value="<? echo stripslashes(htmlspecialchars($run)); ?>">
<input type="hidden" name="oneunit" value="<? echo $oneunit; ?>">
<input type="hidden" name="twounit" value="<? echo $twounit; ?>">
<input type="hidden" name="threeunit" value="<? echo $threeunit; ?>">
<input type="hidden" name="onetype" value="<? echo $onetype; ?>">
<input type="hidden" name="twotype" value="<? echo $twotype; ?>">
<input type="hidden" name="threetype" value="<? echo $threetype; ?>">
<input type="hidden" name="state" value="<? echo $state; ?>">
<input type="hidden" name="city" value="<? echo stripslashes(htmlspecialchars($city)); ?>">
<input type="hidden" name="address" value="<? echo stripslashes(htmlspecialchars($address)); ?>">
<input type="hidden" name="phone" value="<? echo stripslashes(htmlspecialchars($phone)); ?>">
<input type="hidden" name="email" value="<? echo stripslashes(htmlspecialchars($email)); ?>">
<input type="hidden" name="courseinfo" value="<? echo stripslashes(htmlspecialchars($courseinfo)); ?>">
<input type="hidden" name="moreinfo" value="<? echo stripslashes(htmlspecialchars($moreinfo)); ?>">
<input type="hidden" name="directions" value="<? echo stripslashes(htmlspecialchars($directions)); ?>">
<input type="hidden" name="register" value="<? echo $register; ?>">
<input type="hidden" name="website" value="<? echo $website; ?>">
<input type="hidden" name="edit_return" value="1" />
<input type="hidden" name="uid" value="<? echo $uid; ?>" />
<input type="hidden" name="edit_return" value="1">
<? // need to temporary set the field as being valid ?>
<input type="hidden" name="valid" value="1">
<input type="hidden" name="submitted_by" value="<? echo $submitted_by; ?>" />
<input type="submit" name="submit" value="Return To Edit Screen" class="btn float-left" />
</form>
</div>
</div>
</div>
</div>