Click Here for the Tournament List"); exit; } if((!$action)&&($tinfo[tid])){ $action="details"; } switch($action){ case "details": tourney_details($tourney); break; case "signup": tourney_signup(); break; case "tourney_signup_2": tourney_signup_2($signup); break; case "players": tourney_players(); break; case "playerinfo": tourney_playerinfo($player); break; case "brackets": tourney_brackets(); break; default: tourney_list($search); break; } //START FUNCTIONS function tourney_list($search){ global $config,$tinfo; if($search[type]==1){ $searchfield=characters($search[field]); $searchfield="%".$searchfield."%"; $maxresults="25"; $searchinfo=mysql_query("SELECT tid FROM tourneys WHERE name LIKE '$searchfield' LIMIT $maxresults"); while(list($tid)=mysql_fetch_row($searchinfo)) { $searchresult[$tid]="1"; } } echo"$config[header]"; ?>
Tournaments

TID Tournament Details Brackets Signup
Details Brackets Signup

List All Tournaments

Search For In  
","<",">"); $tinfo[details]=str_replace($SearchArray,$ReplaceArray,$tinfo[details]); $UrlSearchArray = array("/([^]_a-z0-9-=\"'\/])((https?|ftp|news):\/\/|www\.)([^ \r\n\(\)\*\^\$!`\"'\|\[\]\{\};<>]*)/si","/^((https?|ftp|news):\/\/|www\.)([^ \r\n\(\)\*\^\$!`\"'\|\[\]\{\};<>]*)/si",); $UrlReplaceArray = array("\\1\\2\\4","\\1\\3"); $tinfo[details]=preg_replace($UrlSearchArray,$UrlReplaceArray,$tinfo[details]); echo"$config[header]"; ?>
Tournament Directors:

Details


Signup

Name
Email Address
 

Signups are currently disabled


You have been added to the player signups!
Entering the tournament does not guarantee you a spot.


Players

# Name

Player Information

Name
Email
border='0'>

$name
\n $winner
"; }else{ $bracket[$bid]="$name"; } $pid=""; } $brackets="$tinfo[size]"; //TEMP FOR TESTING //$brackets="64"; $spots=($brackets * 2 - 1); $temp_rows="$brackets"; while($temp_rows > 1){ $rowcount++; if($rowcount > 1){ $temp_rows=($temp_rows / 2); } $listrows.="-> $temp_rows"; $rows="$rowcount"; } $rowwidths=round(100 / $rows - 0.5); $actualrows=($rows * 2); /* //UNCOMMENT SECTION FOR DEBUGGING echo" [Bracket Stats]
Brackets: $brackets
Spots: $spots
Game Rows: $rows
Actual Rows: $actualrows
Row Widths: $rowwidths
Pattern: $listrows

"; */ //////////////////////////////// echo"$config[header]"; ?>
1){ if($round){ $counter=($counter / 2); } $lastcb="$countbrackets"; $countbrackets=""; $game=""; $round++; $finals=($rows - 1); $winner=($rows); $roundgamesay="Round $round Games"; if($round=="$winner"){ $roundgamesay="Winner!"; } if($round=="$finals"){ $roundgamesay="Finals"; } ?>

Game $actualgamecount"; $alignspacer1="center"; if($spacecenterwordcount==3){ $spacecenterwordcount=""; $spacecenterwordcount++; } } } ?>