"",
"address" => "",
"kinname" => "",
"kinaddress" => "",
"phone" => "",
"kinphone" => "",
"email" => "",
"kinemail" => "",
"relation" => "",
"veggie" => "no",
"student" => "yes",
"insurance" => "BCRA",
"bcranum" => "",
"leave_uk" => "",
"length_of_stay" => "",
"transport_ok" => "yes",
"transport_out" => "need",
"transport_back" => "need",
"from_uk" => "",
"returning_uk" => "",
"tent" => "no",
"top_tent_cap" => "",
"btent" => "no",
"base_tent_cap" => "",
"tent_share" => "yes",
"share_condition" => "",
"medic_info" => "",
"extra_info" => "",
"aims" => "",
"lifts_out" => "yes",
"lifts_back" => "yes",
"no_out" => "2",
"no_back" => "2",
"take_out" => "",
"take_back" => "",
"transport_info" => "",
"medication" => "",
"allergies" => "",
"bivvy" => ""
);
}
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]);
}
function errorPage ($err)
{
echo << $err
END;
}
function securityChecks ()
{
global $vars;
$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 ($error != "") {
echo " This is the official signup form for Expo 2024, which runs from 6th July until 17th August.
This form is not secure and by submitting
this form you consent to its contents being used for Expo purposes and
being included in the Bier Book on Expo. You also give permission for any information you collect on expo (survey data, photos, trip writeups, etc) to be used in perpetuity for expo-related purposes. Please report any problems with this form to the
webmaster. Please check the details below and then select one of the options at the
bottom of the page.
Submission successful!
Thank you for your application. Please address any questions
to the Expo Leader, Jono Lester.
Return to the main Expo page.
END;
}
virtual("main.css");
switch ($_GET["action"]) {
case "blank":
initVars ();
showForm ();
break;
case "edit":
fillVars ();
showForm ();
break;
case "preview":
fillVars ();
if (securityChecks ()) {
previewForm ();
}
break;
case "commit":
switch ($_POST[submit]) {
case "I confirm that all details are correct.":
fillVars ();
if (securityChecks ()) {
insertSlashes ();
submitForm ();
}
break;
case "Modify form.";
fillVars ();
showForm ();
break;
default:
errorPage ("Invalid script action.");
}
break;
default:
errorPage ("Invalid script action.");
break;
}
?>
Contact details
Your details