Просмотр файла phpmytourney/champions.php

Размер файла: 2.12Kb
<?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
************************************************************/
	include('config.inc');
	include($header_file);
	//this script will generate the Current Tourneys Menu
	$sql = "SELECT tname,id,tdatetime,status from  " . $GLOBALS['dbtable_header'] . "info where status = 9  order by tdatetime DESC";
	$tourney = get_mysql_rows($sql,"no");
	
	if($tourney){	
		$header[0][] = "Tourney Name";
		$header[0][] = "Teams/Singles";
		$header[0][] = "DateTime";
		$header[0][] = "Champion !";
		$header[0][] = "Details link";
		$header[0][] = "Grid link";
		
		$nb_tourney = count($tourney);
		for($i=0;$i<$nb_tourney;$i++){
			$tourney_id = $tourney[$i][1];
			$tou_type = get_tourney_type($tourney_id);
			$translate_fct = "translate_to_" . $tou_type . "_page_link";
			if($tou_type == "team") 
				$tourney[$i][1] = $tou_type;
			else 
				$tourney[$i][1] = "Singles";
			$tourney[$i][3] = get_champion_name($tourney_id);
			$tourney[$i][4] = translate_details_lk($tourney_id);
			$tourney[$i][5] = translate_grid_lk($tourney_id);
		}
		$table = array_merge($header,$tourney);
		print_table($table,"Champions");
	}
	else 
		echo("<br>No<br>Champions<br>Yet!<nr>");

	do_not_remove_please();

	include($footer_file);
	
	
/*******************
* FONCTIONS...
*******************/
function translate_details_lk($tourney_id){
	return "<a href=\"details.php?tourney_id=" . $tourney_id . "\" target=\"detail\">Details</a>";
}
function translate_grid_lk($tourney_id){
	return "<a href=\"grid.php?tourney_id=" . $tourney_id . "\" target=\"grid\">Grid</a>";
}

?>