Eléphanteau du PHP |
36 Messages
10 août 2006, 11:03
Voici le code :
// cellule d'affichage des derniers résultats
$color=0;
$query1="SELECT cldom.nom as cldom, clext.nom as clext, phpl_matchs.buts_dom, phpl_matchs.buts_ext,
phpl_journees.date_prevue, cldom.id as cliddom,
clext.id as clidext, date_reelle,
dom.id as eqdom, ext.id as eqext,
phpl_matchs.id as id_match, phpl_matchs.lien_article as lien_article2, phpl_journees.id_champ as champ
FROM phpl_equipes as dom, phpl_equipes as ext,
phpl_matchs, phpl_journees,
phpl_clubs as cldom, phpl_clubs as clext
WHERE phpl_matchs.id_equipe_dom=dom.id
AND phpl_matchs.id_equipe_ext=ext.id
AND phpl_journees.id_champ='$champ'
AND phpl_journees.numero='$numero'
AND dom.id_club=cldom.id
AND ext.id_club=clext.id
AND phpl_matchs.id_journee=phpl_journees.id
AND cldom.nom!='exempte'
AND clext.nom!='exempte'
ORDER BY date_reelle asc";
$result=mysql_query($query1) or die (mysql_error());
// on fait une boucle qui va faire un tour pour chaque enregistrement
$donnee = mysql_fetch_assoc($result);
echo "<td align=\"right\" width=\"45%\"><a href=\"#\"
onclick=\"window.open('../../../resultats/divisions/consult/club.php?id_clubs=$row[cliddom]
&champ=$row[champ]','Fichematch','toolbar=0,location=0,directories=0,status=0,
scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=400,height=350');return
false;\">".$DebMarqueur1.$clubs_nom.$FinMarqueur1." </a></td><td
align=\"center\"><a
href=\"../../../../../resultats/divisions/consult/match.php?id_match=$row[id_match]\"
target=\"_parent\">".$domproba." - ".$extproba."</a></td><td
align=\"left\" width=\"35%\"><a href=\"#\"
onclick=\"window.open('../../../resultats/divisions/consult/club.php?id_clubs=$row[clidext]
&champ=$row[champ]','Fichematch','toolbar=0,location=0,directories=0,status=0,
scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=400,height=350');return
false;\">".$DebMarqueur2.$clubs_nom1.$FinMarqueur2." </a></td>";
if($donnee['lien_article2']=="")
echo "<td align=\"right\"><a href=\"../../../actualite/article_handball.php?newsid=$row[lien_article2]\"
target=\"_parent\"><img border='1' src='../../../design/18_news.gif'
></a></center></td>";
else {
echo "<td align=\"right\"><img border='1' src='../../../design/18_blank.gif' width='10' height='10'></center></td>";
}
voilà désolé c'est un peu long
