//if(isset($HTTP_POST_VARS)) foreach($HTTP_POST_VARS as $k=>$elem) echo ++$n.": $k => $elem ";
// No Caching...
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
// sent data compressed ...!!!
//ob_start("ob_gzhandler");
import_request_variables("gp");
//// Configure....
// total number of teams
$nteams = 48;
// HT season
$Season="23";
// date for deadline countdown
$day = 3; // Day of the countdown
$month = 8; // Month of the countdown
$year = 2004; // Year of the countdown
$hour = 0; // Hour of the countdown
$minute = 0; // Minute of the countdown
$second = 0; // Second of the countdown
// start of HO-Cup
$CupDate="August 10th, 2004";
$CupDatum="10. August 2004";
// end of group stage
$KODate="9-Sep";
$KODatum="9. September";
// final date
$Final="5/6-oct-04";
$Finale="5. oder 6. Oktober 04";
//forum address and registration topic
//$Forum=http://mitglied.lycos.de/qzchen/phpBB2/";
//$Forum="http://www2.100mb4free.de/qzmann/phpBB2/";
//$Forum="http://SorryForumWillSoonBeAvailableAgain/";
$Forum="http://www.wow-auctions.net/ho/phpBB2/";
$Topic=1440;
// default file names
if(!isset($inputfile)) $inputfile="hocup.dat";
if(!isset($outputfile)) $outputfile="hocup.dat";
//// End of Configure!
// language
if(isset($lang)) setlocale("LC_TIME",$lang);
// sometimes this is NOT set??? Browser dependent...?
$maxdata = $_POST['maxdata'];
if(!isset($maxdata)) $maxdata=0;
// remember logged in HT server
session_start();
if(!isset($Server) && isset($_SESSION["Server"])) $Server=$_SESSION["Server"];
if(isset($Server)) $_SESSION["Server"]=$Server;
if(!isset($maxServer)) $maxServer=20;
// password check?
$md5pwd= "833037040d08c7741b68d89c552be47b";
$write = FALSE;
$action = $_SERVER['PHP_SELF'];
if(isset($Passwort)) {
if(md5($Passwort) === $md5pwd) {
echo "*** Passwort korrekt. SCHREIBMODUS AKTIV...***";
$write = TRUE;
$action = $_SERVER['PHP_SELF']."?Passwort=".$Passwort;
}
else echo "*** FALSCHES Passwort!!! $Passwort ***";
}
// write to team list
if($write && isset($Name) && $Name != "") {
if ( file_exists($outputfile) ) {
if ( $datei=fopen($outputfile,"a") ) {
flock($datei,2);
$maxdata=$maxdata+1;
$teaminfo=array($maxdata,$Name,$Manager,$ID,$League,$Country,$Comment,"\n");
$output=implode("|",$teaminfo);
fwrite($datei,$output);
fclose($datei);
}
else
echo " Could not open File $outputfile!";
}
else
echo " File $outputfile not found!";
}
?>
// deadline countdown
// mktime is the marked time, and time() is the current time.
$target = mktime($hour,$minute,$second,$month,$day,$year);
$diff = $target - time();
$days = ($diff - ($diff % 86400)) / 86400;
$diff = $diff - ($days * 86400);
$hours = ($diff - ($diff % 3600)) / 3600;
$diff = $diff - ($hours * 3600);
$minutes = ($diff - ($diff % 60)) / 60;
$diff = $diff - ($minutes * 60);
$seconds = ($diff - ($diff % 1)) / 1;
// Browser Detection
$userBrowser = $_SERVER['HTTP_USER_AGENT'];
// echo $userBrowser;
$MSIE = (stristr($userBrowser, "MSIE") || stristr($userBrowser, "Internet Explorer"));
/* The first argument of the function stristr is the string, where the sub-string should be found. The second argument is the searched sub-string. */
$Opera = (stristr($userBrowser, "Opera") && 1);
$Moz4 = (stristr($userBrowser, "Mozilla/4") && 1);
$Gecko = (stristr($userBrowser, "Gecko") && 1);
$NN4 = ($Moz4 && !$MSIE && !$Gecko && !$Opera);
function float_val( $strValue )
{
$floatValue = preg_replace( "/[^0-9\.]*/", "", $strValue );
if (false == is_numeric($floatValue)) $floatValue = 0;
return $floatValue;
}
$Moz4All = ((float_val(substr(stristr($userBrowser, "Mozilla"),8, 3)) > 4.0) && (float_val(substr(stristr($userBrowser, "Mozilla"),8, 3)) < 5.0));
/* The first value of the substr() function determines after how characters the sub-string starts and latter defines the length of the sub-string. If in the end of the searched string would be empty space or character they are not harmful because that possibility has been taken account. It is not necessary to check tha value by using the ctype_digit() function. */
//echo " Internet-Browser: $userBrowser ==> MSIE=$MSIE Opera=$Opera Moz4=$Moz4 Gecko=$Gecko NN4=$NN4 Moz4all=$Moz4All ";
if($seconds<0)
echo "
Sorry, too late. The DEADLINE has been expired already!
";
else {
// Das get immer, da reines php!
if($NN4 || $Moz4all || ($Moz4 && !$MSIE))
echo "
Es waren grade eben noch $days Tage, $hours Stunden, $minutes Minuten und $seconds Sekunden bis zur DEADLINE!!!
";
//... Aber Live-Counter ist cooler... (JS&PHP, aber: Nicht mit Netscape <5!)
else
echo "