diff --git a/signup/submit.php b/signup/submit.php index 2c185ebe3..35c972a40 100644 --- a/signup/submit.php +++ b/signup/submit.php @@ -54,32 +54,32 @@ function fillVars () initVars (); global $vars; - $vars[name] = stripslashes($_POST[name]); - $vars[address] = stripslashes($_POST[address]); - $vars[phone] = stripslashes($_POST[phone]); - $vars[kinname] = stripslashes($_POST[kinname]); - $vars[kinaddress] = stripslashes($_POST[kinaddress]); - $vars[phone] = stripslashes($_POST[phone]); - $vars[kinphone] = stripslashes($_POST[kinphone]); - $vars[email] = stripslashes($_POST[email]); - $vars[kinemail] = stripslashes($_POST[kinemail]); - $vars[relation] = stripslashes($_POST[relation]); - $vars[veggie] = stripslashes($_POST[veggie]); - $vars[student] = stripslashes($_POST[student]); - $vars[transport_ok] = stripslashes($_POST[transport_ok]); - $vars[from_uk] = stripslashes($_POST[from_uk]); - $vars[returning_uk] = stripslashes($_POST[returning_uk]); - $vars[tent] = stripslashes($_POST[tent]); - $vars[top_tent_cap] = stripslashes($_POST[top_tent_cap]); - $vars[btent] = stripslashes($_POST[btent]); - $vars[base_tent_cap] = stripslashes($_POST[base_tent_cap]); - $vars[medic_info] = stripslashes($_POST[medic_info]); - $vars[extra_info] = stripslashes($_POST[extra_info]); - $vars[aims] = stripslashes($_POST[aims]); - $vars[transport_info] = stripslashes($_POST[transport_info]); - $vars[medication] = stripslashes($_POST[medication]); - $vars[allergies] = stripslashes($_POST[allergies]); - $vars[bivvy] = stripslashes($_POST[bivvy]); + $vars["name"] = stripslashes($_POST["name"]); + $vars["address"] = stripslashes($_POST["address"]); + $vars["phone"] = stripslashes($_POST["phone"]); + $vars["kinname"] = stripslashes($_POST["kinname"]); + $vars["kinaddress"] = stripslashes($_POST["kinaddress"]); + $vars["phone"] = stripslashes($_POST["phone"]); + $vars["kinphone"] = stripslashes($_POST["kinphone"]); + $vars["email"] = stripslashes($_POST["email"]); + $vars["kinemail"] = stripslashes($_POST["kinemail"]); + $vars["relation"] = stripslashes($_POST["relation"]); + $vars["veggie"] = stripslashes($_POST["veggie"]); + $vars["student"] = stripslashes($_POST["student"]); + $vars["transport_ok"] = stripslashes($_POST["transport_ok"]); + $vars["from_uk"] = stripslashes($_POST["from_uk"]); + $vars["returning_uk"] = stripslashes($_POST["returning_uk"]); + $vars["tent"] = stripslashes($_POST["tent"]); + $vars["top_tent_cap"] = stripslashes($_POST["top_tent_cap"]); + $vars["btent"] = stripslashes($_POST["btent"]); + $vars["base_tent_cap"] = stripslashes($_POST["base_tent_cap"]); + $vars["medic_info"] = stripslashes($_POST["medic_info"]); + $vars["extra_info"] = stripslashes($_POST["extra_info"]); + $vars["aims"] = stripslashes($_POST["aims"]); + $vars["transport_info"] = stripslashes($_POST["transport_info"]); + $vars["medication"] = stripslashes($_POST["medication"]); + $vars["allergies"] = stripslashes($_POST["allergies"]); + $vars["bivvy"] = stripslashes($_POST["bivvy"]); } function errorPage ($err) @@ -100,31 +100,31 @@ function securityChecks () $error = ""; - if ($vars[name] == "") $error = "You must specify your full name."; - elseif ($vars[address] == "") $error = "You must specify your address."; - elseif ($vars[kinname] == "") $error = "You must specify the name of your next-of-kin."; - elseif ($vars[kinaddress] == "") $error = "You must specify your next-of-kin's address."; - elseif ($vars[kinphone] == "") $error = "You must specify your next-of-kin's phone number."; - elseif ($vars[email] != "" && !ereg( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $vars[email])) $error = "Invalid email address (leave blank if you don't have one)."; - elseif ($vars[kinemail] != "" && !ereg( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $vars[kinemail])) $error = "Invalid next-of-kin email address (leave blank if they don't have one)."; - elseif ($vars[veggie] != "yes" && $vars[veggie] != "no" && $vars[veggie] != "mostly") $error = "Invalid veggie specification."; - elseif ($vars[student] != "yes" && $vars[student] != "no") $error = "Invalid student specification."; - elseif ($vars[transport_ok] != "yes" && $vars[transport_ok] != "no") $error = "Invalid transport specification given."; - elseif ($vars[bivvy] != "" && $vars[bivvy] != "yes") $error = "Invalid bivvy specification."; - elseif ($vars[tent] != "" && $vars[tent] != "yes") $error = "Invalid Top Camp tent specification."; - elseif ($vars[btent] != "" && $vars[btent] != "yes") $error = "Invalid Base Camp tent specification."; - elseif ($vars[tent] == "yes" && ($vars[top_tent_cap] < 1 || $vars[top_tent_cap] > 9)) $error = "Invalid Top Camp tent capacity given."; - elseif ($vars[btent] == "yes" && ($vars[base_tent_cap] < 1 || $vars[base_tent_cap] > 9)) $error = "Invalid Base Camp tent capacity given."; + if ($vars["name"] == "") $error = "You must specify your full name."; + elseif ($vars["address"] == "") $error = "You must specify your address."; + elseif ($vars["kinname"] == "") $error = "You must specify the name of your next-of-kin."; + elseif ($vars["kinaddress"] == "") $error = "You must specify your next-of-kin's address."; + elseif ($vars["kinphone"] == "") $error = "You must specify your next-of-kin's phone number."; + elseif ($vars["email"] != "" && !ereg( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $vars["email"])) $error = "Invalid email address (leave blank if you don't have one)."; + elseif ($vars["kinemail"] != "" && !ereg( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $vars[kinemail])) $error = "Invalid next-of-kin email address (leave blank if they don't have one)."; + elseif ($vars["veggie"] != "yes" && $vars["veggie"] != "no" && $vars["veggie"] != "mostly") $error = "Invalid veggie specification."; + elseif ($vars["student"] != "yes" && $vars["student"] != "no") $error = "Invalid student specification."; + elseif ($vars["transport_ok"] != "yes" && $vars["transport_ok"] != "no") $error = "Invalid transport specification given."; + elseif ($vars["bivvy"] != "" && $vars["bivvy"] != "yes") $error = "Invalid bivvy specification."; + elseif ($vars["tent"] != "" && $vars["tent"] != "yes") $error = "Invalid Top Camp tent specification."; + elseif ($vars["btent"] != "" && $vars["btent"] != "yes") $error = "Invalid Base Camp tent specification."; + elseif ($vars["tent"] == "yes" && ($vars["top_tent_cap"] < 1 || $vars["top_tent_cap"] > 9)) $error = "Invalid Top Camp tent capacity given."; + elseif ($vars["btent"] == "yes" && ($vars["base_tent_cap"] < 1 || $vars["base_tent_cap"] > 9)) $error = "Invalid Base Camp tent capacity given."; if ($error != "") { - echo "Expo 2024 Application Form Error -- Cambridge University Caving Club"; + echo "Loser Expo 2025 Application Form Error"; echo ""; echo "
"; printHidden (); echo <<Expo 2004 Application Form Error +

Expo 2025 Application Form Error

Sorry, but you have made a mistake on your form:

$error
@@ -144,14 +144,14 @@ function showForm () global $vars; echo <<Expo 2024 Application Form -- Cambridge University Caving Club + Loser Expo 2025 Application Form END; echo <<Expo 2024 Signup Form +

Expo 2025 Signup Form

-

This is the official signup form for Expo 2024, which runs from 6th July until 17th August. +

This is the official signup form for Expo 2024, which runs from ? until ?.

This form is not secure and by submitting this form you consent to its contents being used for Expo purposes and @@ -182,7 +182,7 @@ END; Phone: - Phone: + Phone: @@ -202,24 +202,24 @@ END; Are you a student/unwaged? YesYes Mostly "yes") echo " checked"; + if ($vars["student"] <> "yes") echo " checked"; echo <<No "yes" && $vars[veggie] <> "mostly") echo " checked"; + if ($vars["veggie"] <> "yes" && $vars["veggie"] <> "mostly") echo " checked"; echo <<No @@ -229,13 +229,13 @@ END;

The transport page shows my arrangements correctly.
The transport page does not show my arrangements correctly. @@ -247,32 +247,30 @@ END;

Tents

-

There will be two high camps in 2024: +

There will be two high camps in 2025:

  • the stone bridge bivvy site; -
  • the old Top Camp site, to be used for exploration of - Eislüfthöhle. +
  • Garlic Cave.

There is space for three people in a Club tent at Base Camp. - There is space for five or six people in a Club tent at Top Camp. At the stone bridge, a bivvy bag is not essential but useful if you have one.

Will you be taking any of the following (please tick/complete as appropriate):
A bivvy bag suitable for the stone bridge.
A person tent for the Top Camp site.
A person tent for Base Camp.
@@ -327,7 +325,7 @@ END;


Please report any problems with this form to the - webmaster.

+ webmaster.

END; } @@ -347,11 +345,11 @@ function previewForm () global $vars; echo <<Expo 2024 Application Form Preview -- Cambridge University Caving Club + Loser Expo 2025 Application Form Preview END; echo <<Expo 2024 Application Form Preview +

Loser Expo 2025 Application Form Preview

Please check the details below and then select one of the options at the bottom of the page.


@@ -363,63 +361,63 @@ END; printHidden (); - $address1 = rtrim(ereg_replace(",,", ",", ereg_replace("(\r\n|\n|\r)", ", ", $vars[address])), " \t\n\r\0\x0b.,"); - $kinaddress1 = rtrim(ereg_replace(",,", ",", ereg_replace("(\r\n|\n|\r)", ", ", $vars[kinaddress])), " \t\n\r\0\x0b.,"); + $address1 = rtrim(ereg_replace(",,", ",", ereg_replace("(\r\n|\n|\r)", ", ", $vars["address"])), " \t\n\r\0\x0b.,"); + $kinaddress1 = rtrim(ereg_replace(",,", ",", ereg_replace("(\r\n|\n|\r)", ", ", $vars["kinaddress"])), " \t\n\r\0\x0b.,"); echo "Full name: $vars[name].
Address: $address1.
"; echo "Phone: $vars[phone].
Email: "; - if ($vars[email] == "") echo "none"; else echo $vars[email]; + if ($vars["email"] == "") echo "none"; else echo $vars["email"]; echo "

Details for your $vars[relation]

"; echo "Full name: $vars[kinname].
Address: $kinaddress1.
"; echo "Phone: $vars[kinphone].
Email: "; - if ($vars[kinemail] == "") echo "none"; else echo $vars[kinemail]; + if ($vars["kinemail"] == "") echo "none"; else echo $vars["kinemail"]; echo "

Miscellany

  • "; echo "You are"; - switch ($vars[veggie]) { + switch ($vars["veggie"]) { case "no": echo "n't"; break; case "mostly": echo " mostly"; break; default: break; } echo " a vegetarian.
  • You are"; - if ($vars[student] == "no") echo "n't"; + if ($vars["student"] == "no") echo "n't"; echo " a student/unwaged person."; - if ($vars[bivvy] == "yes") + if ($vars["bivvy"] == "yes") echo "
  • You're taking a bivvy bag suitable for the stone bridge."; - if ($vars[tent] == "yes") + if ($vars["tent"] == "yes") echo "
  • You're taking a $vars[top_tent_cap] person tent suitable for Top Camp."; - if ($vars[btent] == "yes") + if ($vars["btent"] == "yes") echo "
  • You're taking a $vars[base_tent_cap] person tent suitable for Base Camp."; echo "

Medical conditions

    "; echo "
  • Allergies: "; - if ($vars[allergies] == "") + if ($vars["allergies"] == "") echo "None."; else - echo nl2br($vars[allergies]); + echo nl2br($vars["allergies"]); echo "
  • Medication to be taken in Austria: "; - if ($vars[medication] == "") + if ($vars["medication"] == "") echo "None."; else - echo nl2br($vars[medication]); + echo nl2br($vars["medication"]); echo "
  • Other medical conditions: "; - if ($vars[medic_info] == "") + if ($vars["medic_info"] == "") echo "None."; else - echo nl2br($vars[medic_info]); + echo nl2br($vars["medic_info"]); echo "
"; if ($vars[aims] != "") { echo "

Your aims for Expo

"; - echo nl2br($vars[aims]); + echo nl2br($vars["aims"]); } echo <<\n", + mail ("Wookey \n", "Expo form from $vars[name]", $temp, - "From: Expo forms \n"); + "From: Expo forms \n"); - if ($vars[transport_ok] == "no") { + if ($vars["transport_ok"] == "no") { $temp = "Transport page needs updating for $vars[name]:\n\n"; $temp = $temp . $vars[transport_info] . "\n"; - mail ("Mark Shinwell ", + mail ("Test Mail ", "Transport update from $vars[name]", $temp, - "From: Expo forms \n"); + "From: Expo forms \n"); } } @@ -546,12 +544,12 @@ echo << END; echo <<Expo 2024 Application +

Loser Expo 2025 Application

Submission successful!

Thank you for your application. Please address any questions - to the Expo Leader, Jono Lester. + to the Expo Leader, Harry Kettle.

Return to the main Expo page. END; @@ -579,7 +577,7 @@ switch ($_GET["action"]) { break; case "commit": - switch ($_POST[submit]) { + switch ($_POST["submit"]) { case "I confirm that all details are correct.": fillVars (); if (securityChecks ()) {