"); } if(!$game[status]){ include("$dir[func]/error.php"); display_error("This Ladder is temporarily closed.
"); } $tablehead=table_head("show","","","left"); $tablefoot=table_foot("show"); $bannerhead=table_head("show","488","80","center"); $bannerfoot=table_foot("show"); // GET LADDERS $getladders=mysql_query("SELECT id,laddername FROM ladders WHERE gameon='$gameid' ORDER by laddername"); while(list($lid,$laddername)=mysql_fetch_row($getladders)){ $thisladder=$thisladder." $out[bulletleft] [View] $laddername "; } if($misc[gernalforumid]){ //GET FORUM DATABASE include("$dir[forums]/admin/config.php"); mysql_connect($servername, $dbusername, $dbpassword); @mysql_select_db("$dbname") or die ("DIE"); if($game[forumid] < 1){ $game[forumid]="$misc[gernalforumid]"; } //GET FORUM NEWS $getladders=mysql_query("SELECT threadid,title,lastpost,forumid,pollid,open,replycount,postusername,postuserid,lastposter,dateline,views,iconid,notes,visible,sticky,votenum,votetotal,attach FROM thread WHERE forumid='$game[forumid]' ORDER by threadid DESC LIMIT 5"); while(list($threadid,$title,$lastpost,$forumid,$pollid,$open,$replycount,$postusername,$postuserid,$lastposter,$dateline,$views,$iconid,$notes,$visible,$sticky,$votenum,$votetotal,$attach)=mysql_fetch_row($getladders)){ $postinfo=mysql_query("SELECT pagetext FROM post WHERE threadid='$threadid' ORDER BY dateline"); $post=mysql_fetch_array($postinfo); $dateline=date("m/d/Y @ g:i a",$dateline); $post[pagetext]=str_replace("\n", "
", $post[pagetext]); $post[pagetext]=str_replace("[b]", "", $post[pagetext]); $post[pagetext]=str_replace("[/b]", "", $post[pagetext]); $post[pagetext]=str_replace("[i]", "", $post[pagetext]); $post[pagetext]=str_replace("[/i]", "", $post[pagetext]); $post[pagetext]=preg_replace("/(\[)(url)(])(\r\n)*([^\"]*)(\[\/url\])/siU", "\\5", $post[pagetext]); $post[pagetext]=preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "", $post[pagetext]); $thisnews=$thisnews." $tablehead    $title Posted by $postusername $dateline
$post[pagetext]

$replycount Replies $views Views Read More
$tablefoot
"; } } $out[body]=$out[body]."
$bannerhead $out[banner] $bannerfoot
$game[gamename]   $game[description]  

"; //LADDERS if($thisladder){ $out[body]=$out[body]." $tablehead    Ladders
$thisladder
$tablefoot
"; } $out[body]=$out[body]." $thisnews

"; include("$dir[curtheme]"); } /// LADDER PANEL function display_ladderpanel($ladderid){ global $dir, $file, $url, $out, $misc, $site; $ladderinfo=mysql_query("SELECT * FROM ladders WHERE id='$ladderid'"); $linfo=mysql_fetch_array($ladderinfo); if(!$linfo[laddername]){ $out[body]=$out[body]."Unknown Ladder ID.
"; include("$dir[curtheme]"); exit; } $gameinfo=mysql_query("SELECT gamename FROM games WHERE id='$linfo[gameon]'"); $game=mysql_fetch_array($gameinfo); if(!$game[gamename]){ $out[body]=$out[body]."Unknown Game ID.
"; include("$dir[curtheme]"); exit; } $tablehead=table_head("show","","","left"); $tablefoot=table_foot("show"); $bannerhead=table_head("show","488","80","center"); $bannerfoot=table_foot("show"); $recentmatches=$recentmatches." $tablehead    Recent Matches
"; $lastmatches=mysql_query("SELECT matchid,winneralias,loseralias FROM matchdb WHERE ladderid='$ladderid' ORDER by confirmdate DESC LIMIT 5"); while(list($matchid,$winneralias,$loseralias)=mysql_fetch_row($lastmatches)){ $recentmatches=$recentmatches."$out[bulletleft] $winneralias vs $loseralias
"; } $recentmatches=$recentmatches." $tablefoot"; $upcomingmatches=$upcomingmatches." $tablehead    Upcoming Matches
"; $challenges=mysql_query("SELECT challid,challenger,challenged FROM challenges WHERE ladderid='$ladderid' AND finalizedby > '0' ORDER by finalizedtime DESC LIMIT 5"); while(list($challid,$challenger,$challenged)=mysql_fetch_row($challenges)){ $challenger=mysql_query("SELECT teamname FROM teams WHERE id='$challenger'"); $cgr=mysql_fetch_array($challenger); $challenged=mysql_query("SELECT teamname FROM teams WHERE id='$challenged'"); $cgd=mysql_fetch_array($challenged); $upcomingmatches=$upcomingmatches."$out[bulletleft] $cgr[teamname] vs $cgd[teamname]
"; } $upcomingmatches=$upcomingmatches." $tablefoot"; $overview=$overview." $tablehead    Ladder Information
"; if($linfo[skillneeded] > 0){ $overview=$overview."$out[bulletleft] This is an advanced ladder.
You must have a skill rating of at least $linfo[skillneeded] to join.
"; } if($linfo[openplay]=="1"){ $overview=$overview."$out[bulletleft] Non-Scheduled Matches are allowed.
"; }else{ $overview=$overview."$out[bulletleft] Non-Scheduled Matches are not allowed.
"; } if($linfo[challenge] > 0){ $overview=$overview."$out[bulletleft] Challenging is allowed.
"; }else{ $overview=$overview."$out[bulletleft] Challenging is not allowed.
"; } $overview=$overview."$out[bulletleft] A team must have at least $linfo[minmembers] members before playing matches.
"; if($linfo[maxmembers]=="1"){ $overview=$overview."$out[bulletleft] Teams can have no more than 1 member.
"; }else{ $overview=$overview."$out[bulletleft] Teams can have up to $linfo[maxmembers] members.
"; } if($linfo[inactivedaysa] * 2 < $linfo[inactivedaysb]){ $overview=$overview."$out[bulletleft] For every $linfo[inactivedaysa] days you do not play a match you will be dropped $linfo[inactivedrop] ranks.
If you continue to stay inactive for $linfo[inactivedaysb] days your team will be deleted.
"; }else if($linfo[inactivedaysa]=="$linfo[inactivedaysb]"){ $overview=$overview."$out[bulletleft] If you do not play a match for $linfo[inactivedaysb] days you will be deleted.
"; }else{ $overview=$overview."$out[bulletleft] If you do not play a match for $linfo[inactivedaysa] days you will be dropped $linfo[inactivedrop] ranks.
If you continue to stay inactive for $linfo[inactivedaysb] days you will be deleted.
"; } $overview=$overview."This is to keep inactive players from clogging the ranks.
$tablefoot"; $challenginginfo=$challenginginfo." $tablehead    Challenge Information
$out[bulletleft] Challenging is allowed.
$out[bulletleft] You can challenge teams up to $linfo[challranks] ranks above your team if they are free for challenging.
$out[bulletleft] A team has $linfo[respondhours] hours to repsond to your challenge.
$out[bulletleft] A challenged team must then respond to your challenge selecting $linfo[timescangive] time/dates and $linfo[mapscangive] courts.
$out[bulletleft] The earliest a match can be scheduled for is 12 hours after the latest finalizing time.
$out[bulletleft] The latest a match can be scheduled for is $linfo[playdays] days after the the latest finalizing time.
"; $timeearliest=date("g a", mktime($linfo[starthour],1,1,1,1,1)); $timelatest=date("g a", mktime($linfo[endhour],1,1,1,1,1)); $challenginginfo=$challenginginfo." $out[bulletleft] Match times can be between $timeearliest and $timelatest $linfo[timezone].
$out[bulletleft] You must then finalize the challenge within $linfo[finalizehours] hours of the challenged team accepting.
You will then need to select $linfo[mapscanaccept] of the courts and one of the times to have the match.
$out[bulletleft] The match must be played at the final selected time by the challenger.
$out[bulletleft] If a team does not show up 10 minutes after the match is to start it is considered a forfeit to the non-showing team.
Make sure to save a record of having the match, as you will be contacted via email by an admin if you are acccused of forfeiting.
If you cannot prove you played the accusing team you they will be awarded the match and you will be givin a forfeit to your record.
$tablefoot"; if($linfo[challenge] > 0){ $lefttoppanel="$upcomingmatches"; $righttoppanel="$recentmatches"; $leftbotpanel="$overview"; $rightbotpanel="$challenginginfo"; }else{ $lefttoppanel="$overview"; $righttoppanel="$recentmatches"; $leftbotpanel=""; $rightbotpanel=""; } $out[body]=$out[body]."
$bannerhead $out[banner] $bannerfoot
$game[gamename] $linfo[laddername]   $linfo[description]  

V I E W - T H I S - L A D D E R

$lefttoppanel   $righttoppanel

$leftbotpanel   $rightbotpanel

"; /* $linfo[id]
$linfo[gameon]
$linfo[laddername]
$linfo[abbreviation]
$linfo[type]
$linfo[description]
$linfo[openplay]
$linfo[minmembers]
$linfo[maxmembers]
$linfo[minmaps]
$linfo[maxmaps]
$linfo[inactivedaysa]
$linfo[inactivedrop]
$linfo[inactivedaysb]
$linfo[challenge]
$linfo[challranks]
$linfo[respondhours]
$linfo[playdays]
$linfo[timescangive]
$linfo[mapscangive]
$linfo[finalizehours]
$linfo[mapscanaccept]
$linfo[skillneeded]
$linfo[createdby]
$linfo[created]
$linfo[lasteditby]
$linfo[lastedit]

LADDER PANEL
Ladder ID: $ladderid

Will display upcoming matches,
Past Matches,
Help/Faq and RUles,
Other cRap. */ include("$dir[curtheme]"); } ?>