2024-06-16 10:51:36 +01:00
< html >< head >
2004-06-17 13:47:34 +01:00
< ? php
global $vars ;
function initVars ()
{
global $vars ;
$vars = array (
" name " => " " ,
" 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 ;
2024-11-08 03:16:37 +00:00
$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 " ]);
2004-06-17 13:47:34 +01:00
}
function errorPage ( $err )
{
echo <<< END
< title > Error </ title >
</ head >
END ;
echo <<< END
< h1 > Sorry </ h1 >
< p >< b > $err </ b >
END ;
}
function securityChecks ()
{
global $vars ;
$error = " " ;
2024-11-08 03:16:37 +00:00
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. " ;
2004-06-17 13:47:34 +01:00
if ( $error != " " ) {
2024-11-08 03:16:37 +00:00
echo " <title>Loser Expo 2025 Application Form Error</title> " ;
2004-06-17 13:47:34 +01:00
echo " </head> " ;
2018-03-01 01:01:34 +00:00
echo " <FORM ACTION= \" http://expo.survex.com/signup/submit.php?action=commit \" METHOD= \" POST \" > " ;
2004-06-17 13:47:34 +01:00
printHidden ();
echo <<< END
2024-11-08 03:16:37 +00:00
< h1 > Expo 2025 Application Form Error </ h1 >
2004-06-17 13:47:34 +01:00
< p >< b > Sorry , but you have made a mistake on your form :</ b >< center >
$error
</ center >
< p > Please click the button below and try again .
< center >< INPUT TYPE = " submit " name = " submit " VALUE = " Modify form. " ></ center >
</ form >
END ;
return false ;
}
return true ;
}
function showForm ()
{
global $vars ;
echo <<< END
2024-11-08 03:16:37 +00:00
< title > Loser Expo 2025 Application Form </ title >
2004-06-17 13:47:34 +01:00
</ head >
END ;
echo <<< END
2024-11-08 03:16:37 +00:00
< h1 > Expo 2025 Signup Form </ h1 >
2004-06-17 13:47:34 +01:00
2024-11-08 03:16:37 +00:00
< p > This is the official signup form for Expo 2024 , which runs from ? until ? .
2004-06-17 13:47:34 +01:00
2024-06-16 10:51:36 +01:00
< p > This form is not secure and by submitting
2004-06-17 13:47:34 +01:00
this form you consent to its contents being used for Expo purposes and
2024-06-16 10:51:36 +01:00
being included in the Bier Book on Expo .</ p >
< p > 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 .</ p >
2004-06-17 13:47:34 +01:00
2024-06-16 10:51:36 +01:00
< hr >
< form ACTION = " http://expo.survex.com/signup/submit.php?action=preview " METHOD = " POST " >
2004-06-17 13:47:34 +01:00
2024-06-16 10:51:36 +01:00
< h2 > Section A : Personal information < h2 >
2004-06-17 13:47:34 +01:00
< h3 > General </ h3 >
< table border = 0 >
< tr >< td colspan = 2 >< b > Your details :</ b ></ td >< td colspan = 2 >
< b > Next of kin :</ b ></ td ></ tr >
< tr >< td align = right >< i > Full </ i > name :</ td >< td >< input name = " name " value = " $vars[name] " tabindex = 1 ></ td >
< td align = right > Name :</ td >< td >< input name = " kinname " value = " $vars[kinname] " tabindex = 4 ></ td ></ tr >
< tr >< td align = right > Address :</ td >< td >
< textarea name = " address " rows = 7 cols = 20 tabindex = 1 > $vars [ address ] </ textarea ></ td >
< td align = right > Address :</ td >< td >
< textarea name = " kinaddress " rows = 7 cols = 20 tabindex = 5 > $vars [ kinaddress ] </ textarea ></ td >
</ tr >
< tr >
< td align = right > Phone :</ td >< td >< input name = " phone " tabindex = 2 value = " $vars[phone] " ></ td >
2024-11-08 03:16:37 +00:00
< td align = right > Phone :</ td >< td >< input name = " kinphone " tabindex = 6 value = " $vars[kinphone2] " ></ td >
2004-06-17 13:47:34 +01:00
</ tr >
< tr >
< td align = right > Email :</ td >< td >< input name = email tabindex = 3 value = " $vars[email] " ></ td >
< td align = right > Email :</ td >< td >< input name = kinemail tabindex = 7 value = " $vars[kinemail] " ></ td >
</ tr >
< tr >
< td colspan = 2 ></ td >
< td align = right > Relation to you :</ td >< td >< input name = relation tabindex = 8 value = " $vars[relation] " ></ td >
</ tr >
</ table >
< table width = 100 %>
< tr >< td >< b > Are you a vegetarian ? </ b ></ td >
< td >< b > Are you a student / unwaged ? </ b ></ td ></ tr >
< tr >< td >< INPUT TYPE = " radio " NAME = " veggie " VALUE = " yes " tabindex = 9
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " veggie " ] == " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> Yes </ td >< td >< INPUT TYPE = " radio " NAME = " student " VALUE = " yes " tabindex = 12
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " student " ] == " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> Yes </ td ></ tr >
< tr >< td >< INPUT TYPE = " radio " NAME = " veggie " VALUE = " mostly " tabindex = 10
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " veggie " ] == " mostly " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> Mostly </ td >< td >< INPUT TYPE = " radio " NAME = " student " VALUE = " no " tabindex = 13
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " student " ] <> " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> No </ td ></ tr >< tr >< td >< INPUT TYPE = " radio " NAME = " veggie " VALUE = " no " tabindex = 11
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " veggie " ] <> " yes " && $vars [ " veggie " ] <> " mostly " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> No </ td >< td ></ td ></ tr ></ table >
< h3 > Transport </ h2 >
2024-06-16 10:51:36 +01:00
< p > Please look now at the < a target = " _blank " href = " http://expo.survex.com/years/2024/travel.html " > transport arrangements page </ a > ( will open in a new window ) . Then select one of the following .
2004-06-17 13:47:34 +01:00
< p >< input type = " radio " name = " transport_ok " value = " yes " tabindex = 38
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " transport_ok " ] == " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> The transport page shows my arrangements correctly .</ input >
< br >< input type = " radio " name = " transport_ok " value = " no " tabindex = 39
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " transport_ok " ] == " no " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> The transport page does not show my arrangements correctly .</ input >
< p > If your arrangements are shown incorrectly , then please state the
corrected version in the box below . This will automatically be
emailed to the transport co - ordinator .
< br >< TEXTAREA NAME = " transport_info " ROWS = 6 COLS = 80 tabindex = 40 > $vars [ transport_info ] </ TEXTAREA ></ p >
< h3 > Tents </ h3 >
2024-11-08 03:16:37 +00:00
< p > There will be two high camps in 2025 :
2004-06-17 13:47:34 +01:00
< ul >< li > the stone bridge bivvy site ;
2024-11-08 03:16:37 +00:00
< li > Garlic Cave .
2004-06-17 13:47:34 +01:00
</ ul >
< p > There is space for three people in a Club tent at Base Camp .
At the stone bridge , a bivvy bag is not essential but useful if
you have one .
2024-06-16 10:51:36 +01:00
< p > Will you be taking any of the following ( please tick / complete as appropriate ) :< BR >
2004-06-17 13:47:34 +01:00
< INPUT TYPE = " checkbox " NAME = " bivvy " VALUE = " yes " tabindex = 53
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " bivvy " ] == " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> A bivvy bag suitable for the stone bridge .< br >
< INPUT TYPE = " checkbox " NAME = " tent " VALUE = " yes " tabindex = 50
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " tent " ] == " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> A < INPUT NAME = " top_tent_cap " SIZE = 1 MAXSIZE = 1 value = " $vars[top_tent_cap] " tabindex = 51 > person
tent for the Top Camp site .< BR >
< INPUT TYPE = " checkbox " NAME = " btent " VALUE = " yes " tabindex = 52
END ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " btent " ] == " yes " ) echo " checked " ;
2004-06-17 13:47:34 +01:00
echo <<< END
> A < INPUT NAME = " base_tent_cap " SIZE = 1 MAXSIZE = 1 value = " $vars[base_tent_cap] " tabindex = 53 > person
tent for Base Camp .< br >
< p > Leave the boxes unchecked if you require Club tent space at a
particular site .
< h3 > Medical </ h3 >
< p > The medical information entered here will appear in the Bier Book .
Extra medical information may be communicated to
< a href = " mailto:mjg54@cam.ac.uk " > Martin Green </ a > ; this will be
placed in sealed envelopes inside the large first aid kits for use in
case of emergency . Please ensure that you communicate such information
in good time .
2024-06-16 10:51:36 +01:00
< p > Please list any allergies which you have :
< TEXTAREA NAME = " allergies " ROWS = 2 COLS = 80 tabindex = 68 > $vars [ allergies ] </ TEXTAREA ></ p >
2004-06-17 13:47:34 +01:00
2024-06-16 10:51:36 +01:00
< p > Please list any medication which you may be taking in Austria :
< TEXTAREA NAME = " medication " ROWS = 2 COLS = 80 tabindex = 69 > $vars [ medication ] </ TEXTAREA ></ p >
2004-06-17 13:47:34 +01:00
2024-06-16 10:51:36 +01:00
< p > Please list any other medical conditions you have that the expedition should be aware of :< BR >
< TEXTAREA NAME = " medic_info " ROWS = 5 COLS = 80 tabindex = 70 > $vars [ medic_info ] </ TEXTAREA ></ p >
2004-06-17 13:47:34 +01:00
< h3 > Other </ h3 >
2024-06-16 10:51:36 +01:00
< p > Any other information , including any skills e . g . first aid , languages , etc . that you have :< BR >
< TEXTAREA NAME = " extra_info " ROWS = 15 COLS = 80 tabindex = 71 > $vars [ extra_info ] </ TEXTAREA ></ p >
2004-06-17 13:47:34 +01:00
< h2 > Section B - Caving / surface work projects </ h2 >
< p > To assist organisation of gear , it would be helpful to know
people ' s possible aims on Expo . Thus if you have a particular project in
mind , please state it below :
< br >
< textarea name = " aims " rows = 15 cols = 80 tabindex = 77 > $vars [ aims ] </ textarea >
</ table >
< hr >
< h2 > All done ? </ h2 >
< p > Click the < b > Preview </ b > button below to review your submission .
< p >< INPUT TYPE = " submit " VALUE = " Preview form submission " >
</ FORM >
< hr >
< p > Please report any problems with this form to the
2024-11-08 03:16:37 +00:00
< a href = " mailto:wookey-expo@wookware.org " > webmaster </ a >.</ p >
2004-06-17 13:47:34 +01:00
END ;
}
function insertSlashes ()
{
}
function printHidden ()
{
global $vars ;
while ( list ( $key , $value ) = each ( $vars ))
echo " <input type=hidden name= $key value= \" $value\ " > " ;
}
function previewForm ()
{
global $vars ;
echo <<< END
2024-11-08 03:16:37 +00:00
< title > Loser Expo 2025 Application Form Preview </ title >
2004-06-17 13:47:34 +01:00
</ head >
END ;
echo <<< END
2024-11-08 03:16:37 +00:00
< h1 > Loser Expo 2025 Application Form Preview </ h1 >
2024-06-16 10:51:36 +01:00
< p >< b > Please check the details below and then select one of the options at the
2004-06-17 13:47:34 +01:00
bottom of the page .</ b >
< hr >
2024-06-16 10:51:36 +01:00
< h2 > Contact details </ h2 >
2004-06-17 13:47:34 +01:00
< h3 > Your details </ h3 >
< p >
2018-03-01 01:01:34 +00:00
< FORM ACTION = " http://expo.survex.com/signup/submit.php?action=commit " METHOD = " POST " >
2004-06-17 13:47:34 +01:00
END ;
printHidden ();
2024-11-08 03:16:37 +00:00
$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 ., " );
2004-06-17 13:47:34 +01:00
echo " <b>Full name: </b> $vars[name] . <br><b>Address: </b> $address1 .<br> " ;
echo " <b>Phone: </b> $vars[phone] .<br><b>Email: </b> " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " email " ] == " " ) echo " none " ; else echo $vars [ " email " ];
2004-06-17 13:47:34 +01:00
echo " <h3>Details for your $vars[relation] </h3><p> " ;
echo " <b>Full name: </b> $vars[kinname] . <br><b>Address: </b> $kinaddress1 .<br> " ;
echo " <b>Phone: </b> $vars[kinphone] .<br><b>Email: </b> " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " kinemail " ] == " " ) echo " none " ; else echo $vars [ " kinemail " ];
2004-06-17 13:47:34 +01:00
echo " <h2>Miscellany</h2> <p><ul><li> " ;
echo " You are " ;
2024-11-08 03:16:37 +00:00
switch ( $vars [ " veggie " ]) {
2004-06-17 13:47:34 +01:00
case " no " : echo " n't " ; break ;
case " mostly " : echo " mostly " ; break ;
default : break ;
}
echo " a vegetarian.<li>You are " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " student " ] == " no " ) echo " n't " ;
2004-06-17 13:47:34 +01:00
echo " a student/unwaged person. " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " bivvy " ] == " yes " )
2004-06-17 13:47:34 +01:00
echo " <li>You're taking a bivvy bag suitable for the stone bridge. " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " tent " ] == " yes " )
2004-06-17 13:47:34 +01:00
echo " <li>You're taking a $vars[top_tent_cap] person tent suitable for Top Camp. " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " btent " ] == " yes " )
2004-06-17 13:47:34 +01:00
echo " <li>You're taking a $vars[base_tent_cap] person tent suitable for Base Camp. " ;
echo " </ul><h2>Medical conditions</h2><ul> " ;
echo " <li>Allergies: " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " allergies " ] == " " )
2004-06-17 13:47:34 +01:00
echo " None. " ;
else
2024-11-08 03:16:37 +00:00
echo nl2br ( $vars [ " allergies " ]);
2004-06-17 13:47:34 +01:00
echo " <li>Medication to be taken in Austria: " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " medication " ] == " " )
2004-06-17 13:47:34 +01:00
echo " None. " ;
else
2024-11-08 03:16:37 +00:00
echo nl2br ( $vars [ " medication " ]);
2004-06-17 13:47:34 +01:00
echo " <li>Other medical conditions: " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " medic_info " ] == " " )
2004-06-17 13:47:34 +01:00
echo " None. " ;
else
2024-11-08 03:16:37 +00:00
echo nl2br ( $vars [ " medic_info " ]);
2004-06-17 13:47:34 +01:00
echo " </ul> " ;
if ( $vars [ aims ] != " " ) {
echo " <h2>Your aims for Expo</h3><p> " ;
2024-11-08 03:16:37 +00:00
echo nl2br ( $vars [ " aims " ]);
2004-06-17 13:47:34 +01:00
}
2024-06-16 10:51:36 +01:00
echo <<< END
2004-06-17 13:47:34 +01:00
if ( $vars [ extra_info ] != " " ) {
echo " <h2>Other information</h2><p> " ;
echo nl2br ( $vars [ extra_info ]);
}
echo " <h2>Transport</h2><ul> " ;
if ( $vars [ transport_ok ] == " yes " )
echo " <li>The transport page shows your arrangements correctly. " ;
else {
echo " <li>The transport page does not show your arrangements correctly.<br> " ;
echo " The corrected version is: " ;
echo nl2br ( $vars [ transport_info ]);
}
echo " </ul> " ;
if ( $vars [ transport_info ] != " " ) {
2024-06-16 10:51:36 +01:00
echo <<< END
2004-06-17 13:47:34 +01:00
echo " <h3>Other transport information</h3><p> " ;
echo nl2br ( $vars [ transport_info ]);
}
echo <<< END
< hr >
< h2 > If the above details are correct ...</ h2 >
< p >< b > Only click once to avoid submitting duplicate forms .</ b >
< center >< INPUT TYPE = " submit " name = " submit " VALUE = " I confirm that all details are correct. " ></ center >
< h2 > If you want to change something ...</ h2 >
< p > If there is an error in the above details , press the button below to change them .
2024-06-16 10:51:36 +01:00
echo <<< END
2004-06-17 13:47:34 +01:00
< center >< INPUT TYPE = " submit " name = " submit " VALUE = " Modify form. " ></ center >
</ form >
END ;
}
function updateDatabase ()
{
global $vars ;
$temp = " " ;
2024-11-08 03:16:37 +00:00
$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 ., " );
2004-06-17 13:47:34 +01:00
$temp = $temp . " Form submission from: \n " ;
$temp = $temp . " $vars[name] \n " ;
$temp = $temp . " $address1\n " ;
$temp = $temp . " Phone: $vars[phone] \n " ;
$temp = $temp . " Email: " ;
if ( $vars [ email ] == " " ) $temp = $temp . " none " ;
else $temp = $temp . " $vars[email] " ;
$temp = $temp . " \n \n " ;
$temp = $temp . " Next of kin: \n " ;
$temp = $temp . " $vars[kinname] \n " ;
$temp = $temp . " $kinaddress1\n " ;
$temp = $temp . " Phone: $vars[kinphone] \n " ;
$temp = $temp . " Email: " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " kinemail " ] == " " ) $temp = $temp . " none " ;
2004-06-17 13:47:34 +01:00
else $temp = $temp . " $vars[kinemail] " ;
$temp = $temp . " \n \n " ;
$temp = $temp . " Vegetarian? $vars[veggie] \n " ;
$temp = $temp . " Student/unwaged? $vars[student] \n \n " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " transport_ok " ] == " yes " ) {
2004-06-17 13:47:34 +01:00
$temp = $temp . " Transport arrangements page is correct for this person. \n " ;
}
else {
$temp = $temp . " Transport arrangements need changing to: \n " ;
$temp = $temp . " $vars[transport_info] \n " ;
$temp = $temp . " (Mark has been emailed and will update the page.) \n " ;
}
$temp = $temp . " \n Taking a bivvy bag? $vars[bivvy] \n " ;
$temp = $temp . " \n Taking a Top Camp tent? $vars[tent] " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " tent " ] == " yes " )
2004-06-17 13:47:34 +01:00
$temp = $temp . " (capacity $vars[top_tent_cap] ) \n " ;
else $temp = $temp . " \n " ;
$temp = $temp . " \n Taking a Base Camp tent? $vars[btent] " ;
2024-11-08 03:16:37 +00:00
if ( $vars [ " btent " ] == " yes " )
2004-06-17 13:47:34 +01:00
$temp = $temp . " (capacity $vars[base_tent_cap] ) \n " ;
else $temp = $temp . " \n " ;
$temp = $temp . " \n Allergies: $vars[allergies] \n " ;
$temp = $temp . " Medication to be taken in Austria: $vars[medication] \n " ;
$temp = $temp . " Other medical conditions: $vars[medic_info] \n \n " ;
$temp = $temp . " Aims for Expo: $vars[aims] \n \n " ;
$temp = $temp . " Other information: $vars[extra_info] \n " ;
2024-11-08 03:16:37 +00:00
mail ( " Wookey <wookey@wookware.org> \n " ,
2004-06-17 13:47:34 +01:00
" Expo form from $vars[name] " , $temp ,
2024-11-08 03:16:37 +00:00
" From: Expo forms <expo@wookware.org> \n " );
2004-06-17 13:47:34 +01:00
2024-11-08 03:16:37 +00:00
if ( $vars [ " transport_ok " ] == " no " ) {
2004-06-17 13:47:34 +01:00
$temp = " Transport page needs updating for $vars[name] : \n \n " ;
$temp = $temp . $vars [ transport_info ] . " \n " ;
2024-11-08 03:16:37 +00:00
mail ( " Test Mail <wookey-expo@wookware.org> " ,
2004-06-17 13:47:34 +01:00
" Transport update from $vars[name] " , $temp ,
2024-11-08 03:16:37 +00:00
" From: Expo forms <expo@wookware.org> \n " );
2004-06-17 13:47:34 +01:00
}
}
function submitForm ()
{
2024-06-16 10:51:36 +01:00
echo <<< END
2004-06-17 13:47:34 +01:00
global $vars ;
updateDatabase ();
echo <<< END
< title > Submission successful !</ title >
</ head >
END ;
echo <<< END
2024-11-08 03:16:37 +00:00
< h1 > Loser Expo 2025 Application </ h1 >
2004-06-17 13:47:34 +01:00
< p >< b > Submission successful !</ b >
< p > Thank you for your application . Please address any questions
2024-11-08 03:16:37 +00:00
to the Expo Leader , < a href = " mailto:harrykettle@gmail.com " > Harry Kettle </ a >.
2004-06-17 13:47:34 +01:00
2018-03-01 01:01:34 +00:00
< p >< a href = " http://expo.survex.com/ " > Return to the main Expo page </ a >.
2004-06-17 13:47:34 +01:00
END ;
}
virtual ( " main.css " );
2024-06-16 10:51:36 +01:00
switch ( $_GET [ " action " ]) {
2004-06-17 13:47:34 +01:00
case " blank " :
initVars ();
showForm ();
break ;
case " edit " :
fillVars ();
showForm ();
break ;
case " preview " :
fillVars ();
if ( securityChecks ()) {
previewForm ();
}
break ;
case " commit " :
2024-11-08 03:16:37 +00:00
switch ( $_POST [ " submit " ]) {
2004-06-17 13:47:34 +01:00
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 ;
}
?>
</ td ></ tr ></ table ></ body ></ html >