コード例 #1
0
ファイル: funciones.php プロジェクト: NickCis/LigaPes
function tabla_jugador ($jugador,$liga,$divtodo,$tabla,$h3,$ah3,$divin,$ul,$li) {
	global $user_id ;
	if ( requiererango($liga, 1, $jugador) ) {
		$retorno = "<table " . $tabla . "><tr><th>Jugador</th><th>PG</th><th>PE</th><th>PP</th><th>Dif Goles</th></tr>" ;
		$oponentes = miembrosliga($liga) ;
		foreach ($oponentes as $oponente ) {
			if ( $jugador !== $oponente  ) {
				$partg = partidosG($liga, $jugador, $oponente) ;
				$parte = partidosE($liga, $jugador, $oponente) ;
				$partp = partidosP($liga, $jugador, $oponente) ;
				$goles = difgoles($liga, $jugador, $oponente) ;
				$retorno .= "<tr><td>" . xfbml('name',Array('useyou' => 'false', 'uid' => $oponente),NULL) . "</td><td>$partg</td><td>$parte</td><td>$partp</td><td>$goles</td></tr>" ;

			}
		}
		$retorno .= "</table>" ;
		if ( isset($divin)) {
			$retorno = "<div ". $divin . ">" . $retorno . "</div>" ;
		}
		$retorno = "<h3 " . $h3 . "><a " . $ah3 . ">" . xfbml('name',Array('useyou' => 'false', 'uid' => $jugador),NULL) . "</a></h3>" . $retorno ;
		if (isset($divtodo)) {
			$retorno = "<div " . $divtodo . " >" . $retorno . "</div>";
		}
	}
	else {
		$retorno = NULL ;
	}
	return $retorno ;	
}
コード例 #2
0
ファイル: funciones.php プロジェクト: NickCis/LigaPes
function tabla ($id) {
	$tabla = "<table class='tabla'><tr><th><p>Jugador</p></th><th><p>PG</p></th><th><p>PE</p></th><th><p>PP</p></th><th><p>Dif Goles</p></th></tr>" ;
	$numjug = numjugadores() ;
	$nopo = 1 ;
	$opo = jugadoresid() ;
	$nombre = jugadoresnom() ;
	while ( $nopo <= $numjug) {
		if ($nopo == $id) {$nopo = $nopo + 1 ; }
		$datos = mysql_query("select * from jugadores where id= '$opo[$nopo]'");
		$datos = mysql_fetch_array($datos);
		$partg = partidosG($id, $opo[$nopo]) ;
		$parte = partidosE($id, $opo[$nopo]) ;
		$partp = partidosP($id, $opo[$nopo]) ;
		$goles = difgoles($id, $opo[$nopo]) ;
		$tabla = $tabla . "<tr><td>$nombre[$nopo]</td><td>$partg</td><td>$parte</td><td>$partp</td><td>$goles</td></tr>" ;
		$nopo = $nopo + 1 ;
		if ($nopo == $id) {$nopo = $nopo + 1 ; }
	}
	$tabla = $tabla . "</table>" ;
	return $tabla ;
}