<?php
/***********************************************************
* This file was created by Jйrфme Poulin under the phpmytourney
* project.
* You can modify and redistribute this file as long as this
* copyright notice stays in the file.
*
* If you want to do major upgrades on my script, please contact
* me and we could work together.
*
* Jйrфme Poulin
* Student University of Sherbrooke
* [email protected] <== dont use for support !!!
* http:/phpmytourney.sourceforge.net/ <== use sourceforce forum for support
*
* phpMyTourney <C> 2001-2002
************************************************************/
if(!isset($tourney_id)) print_error("ERROR : page not properly called");
else{
include('config.inc');
include($header_file);
$status = get_status($tourney_id);
if($status != 2 && $status != 4) print_error("Can't check in now");
else{
if (!isset($action)){
?>
<p>
</p>
<?php
print_checkin_form();
}
else
$action();
}
do_not_remove_please();
include($footer_file);
}
//This prints the sign up form
function print_checkin_form(){
global $tourney_id;
print_top_form("Check In Tourney");
print_textbox("Nickname","name");
print_password("Password","passwd");
echo("<input type=\"HIDDEN\" name=\"tourney_id\" value=\"" . $tourney_id . "\">");
echo("<input type=\"HIDDEN\" name=\"action\" value=\"checkin\">");
print_submit("Check In");
}
function checkin(){
global $name,$passwd;
global $tourney_id;
$tou_type = get_tourney_type($tourney_id);
if ($pid = login_name($name,$passwd)){
if(get_ordre($pid))
checkin_sql($pid);
else{
print_error("You aren't signed up.");
if($tou_type == "team") print_error("Only team creator can check-in...");
}
}
else
print_checkin_form();
}
?>