"; for($i=1;$i<=9;$i++) { //echo "sg"; $gras = "gras_$i"; $$gras=""; } if ($action=="equipes" and $champ=="$row[0]"){$gras_1="";} elseif ($action=="dates" and $champ==$row[0]){$gras_2="";} elseif ($action=="matchs" and $champ==$row[0]){$gras_3="";} elseif ($action=="parametres" and $champ==$row[0]){$gras_4="";} elseif ($action=="resultats" and $champ==$row[0]){$gras_5="";} elseif ($action=="generer" and $champ==$row[0]){$gras_7="";} if ($champ=="$row[0]") {$class="phppl7";} elseif (($i%2)==0) {$class="phppl3";} else {$class="phppl4";} echo ""; echo "$row[0]"; echo "$row[1]"; echo "$row[2]/$saison"; echo ""; // echo " $gras_1[".EQUIPE."]$gras_fin"; //echo " $gras_2[".DATE."]$gras_fin"; // echo " $gras_3[".MATCH."]$gras_fin"; echo " $gras_4[".PARAMETRE."]$gras_fin"; echo " $gras_5[".RESULT."]$gras_fin"; echo " $gras_7[".GENERER."]$gras_fin"; echo ""; $i++; } } function affich_gr_championnats ($gr_champ, $action) { $requete="SELECT DISTINCT id, nom FROM phppl_gr_championnats ORDER by id desc"; $resultats=mysql_query($requete) or die (mysql_error()); $i=0; while ($row = mysql_fetch_array($resultats)) { $gras_fin=""; for($i=1;$i<=8;$i++) { $gras = "gras_$i"; $$gras=""; } if ($action=="editer" and $gr_champ=="$row[0]"){$gras_1="";} if ($gr_champ=="$row[0]") {$class="phppl7";} elseif (($i%2)==0) {$class="phppl3";} else {$class="phppl4";} echo ""; echo "$row[0]"; echo "$row[1]"; echo ""; echo " $gras_1[".EDITER."]$gras_fin"; echo " $gras_2[".ADMIN_GR_CHAMP_GENERER."]$gras_fin"; echo " $gras_8[".ADMIN_RENS_8."]$gras_fin"; echo ""; $i++; } } function affich_champ ($champ) { $requete="SELECT phppl_divisions.nom, phppl_saisons.annee FROM phppl_championnats, phppl_divisions, phppl_saisons WHERE phppl_championnats.id_division=phppl_divisions.id AND phppl_championnats.id_saison=phppl_saisons.id AND phppl_championnats.id='$champ' ORDER by annee desc"; $resultats=mysql_query($requete) or die (mysql_error()); while ($row = mysql_fetch_array($resultats)) { $saison=$row[1]+1; echo "$row[0] $row[1]/$saison"; } } function affich_gr_champ ($gr_champ) { $requete="SELECT nom FROM phppl_gr_championnats WHERE id='$gr_champ'"; $resultats=mysql_query($requete) or die (mysql_error()); $row = mysql_fetch_array($resultats); echo "$row[0]"; } function divisions_menu () { $requete ="SELECT phppl_divisions.id, phppl_divisions.nom FROM phppl_divisions ORDER by nom"; $result = mysql_query($requete); echo ""; } function saisons_menu() { $requete ="SELECT phppl_saisons.id, phppl_saisons.annee FROM phppl_saisons ORDER by annee"; $result = mysql_query($requete); echo ""; } function clubs_menu() { $requete ="SELECT phppl_clubs.id, phppl_clubs.nom FROM phppl_clubs ORDER by nom"; $result = mysql_query($requete); echo ""; } function champ_menu() { $requete = "SELECT phppl_championnats.id, phppl_divisions.nom, phppl_saisons.annee, (phppl_saisons.annee)+1 FROM phppl_championnats, phppl_divisions, phppl_saisons WHERE phppl_divisions.id=phppl_championnats.id_division AND phppl_saisons.id=phppl_championnats.id_saison ORDER by annee desc, phppl_divisions.nom"; $result = mysql_query($requete); echo ""; } function equipes_menu($champ) { $requete ="SELECT phppl_equipes.id, phppl_clubs.nom FROM phppl_clubs, phppl_equipes WHERE id_champ='$champ' AND phppl_clubs.id=phppl_equipes.id_club ORDER by nom"; $result = mysql_query($requete); echo ""; } function champ_gr_menu($gr_champ) { echo ""; } function journees ($champ, $numero, $action) { $requete="SELECT numero, id FROM phppl_journees WHERE id_champ='$champ' ORDER BY numero"; $resultats=mysql_query($requete); while ($row=mysql_fetch_array($resultats)) { if ($numero==$row[0]) {echo "$row[0] ";} else {echo "$row[0] ";} } } function format_date_fr($date){ list($annee,$mois,$jour) = explode("-",substr($date,0,10)); list($heure,$minute,$seconde) = explode(":",substr($date,11,7)); return $jour."/".$mois."/".$annee." ".$heure.":".$minute; } function resultats ($champ, $numero) { $requete="SELECT phppl_clubs.nom, CLEXT.nom, phppl_matchs.buts_dom, phppl_matchs.buts_ext, phppl_matchs.id, phppl_matchs.date_reelle FROM phppl_clubs, phppl_clubs as CLEXT, phppl_matchs, phppl_journees, phppl_equipes, phppl_equipes as EXT WHERE phppl_clubs.id=phppl_equipes.id_club AND CLEXT.id=EXT.id_club AND phppl_equipes.id=phppl_matchs.id_equipe_dom AND EXT.id=phppl_matchs.id_equipe_ext AND phppl_matchs.id_journee=phppl_journees.id AND phppl_journees.numero='$numero' AND phppl_journees.id_champ='$champ' AND CLEXT.nom!='exempte' AND phppl_clubs.nom!='exempte' ORDER BY date_reelle asc"; $resultats=mysql_query($requete) or die (mysql_error()); $i=0; while ($row=mysql_fetch_array($resultats)) { $row[0] = stripslashes($row[0]); $row[1] = stripslashes($row[1]); if (($i%2)==0) {$class="phppl3";} else {$class="phppl4";} $date_fr=format_date_fr($row[5]); echo "$row[0]"; echo ""; echo ""; echo ""; echo "$row[1]"; echo ""; $matchs_id[]=$row[4]; $i++; } $requete3="SELECT phppl_clubs.nom, CLEXT.nom, phppl_matchs.buts_dom, phppl_matchs.buts_ext, phppl_matchs.id, phppl_matchs.date_reelle FROM phppl_clubs, phppl_clubs as CLEXT, phppl_matchs, phppl_journees, phppl_equipes, phppl_equipes as EXT WHERE phppl_clubs.id=phppl_equipes.id_club AND CLEXT.id=EXT.id_club AND phppl_equipes.id=phppl_matchs.id_equipe_dom AND EXT.id=phppl_matchs.id_equipe_ext AND phppl_matchs.id_journee=phppl_journees.id AND phppl_journees.numero='$numero' AND phppl_journees.id_champ='$champ' AND (CLEXT.nom='exempte' or phppl_clubs.nom='exempte')"; $resultats3=mysql_query($requete3) or die (mysql_error()); while ($row3=mysql_fetch_array($resultats3)) { $row3[0] = stripslashes($row3[0]); $row3[1] = stripslashes($row3[1]); if (($i%2)==0) {$class="phppl3";} else {$class="phppl4";} if ($row3[0]=='exempte') {echo "".ADMIN_RESULTS_1." : $row3[1]";} if ($row3[1]=='exempte') {echo "".ADMIN_RESULTS_1." : $row3[0]";} } echo ""; echo ""; $numero=$numero+1; echo ""; echo ""; echo ""; $button=ENVOI; echo ""; echo ""; } function nb_equipes($id_champ) { $query="SELECT id FROM phppl_equipes WHERE id_champ='$id_champ'"; $result=mysql_query($query); //if (!$result) die mysql_error(); $nb_equipes=mysql_num_rows( $result ); return("$nb_equipes"); } function format_date_us($date){ list($jour,$mois,$annee) = explode("/",substr($date,0,10)); list($heure,$minute) = explode(":",substr($date,10,22)); $seconde="00"; return $annee."-".$mois."-".$jour." ".$heure.":".$minute.":".$seconde; } function date_us_vers_fr($dateUS) // $dateUS=AAAA-MM-JJ { //$elementsdate=chunk_split($dateUS , 2 , "-"); $elementsdate=explode("-",$dateUS); $jour=$elementsdate[2]; $mois= $elementsdate[1]; $annee=$elementsdate[0]; return $dateFR=$jour.$mois.$annee; } function date_fr_vers_us($dateFR) { if ($dateFR) { $elementsdate=chunk_split($dateFR , 2 , "-"); $elementsdate=explode("-",$elementsdate); $annee=$elementsdate[2].$elementsdate[3]; $mois=$elementsdate[1]; $jour=$elementsdate[0]; $dateUS=$annee."-".$mois."-".$jour; return $dateUS; } else return "00000000"; } function nom_club($id_equipe) { $query="SELECT nom FROM phppl_clubs, phppl_equipes WHERE phppl_clubs.id=phppl_equipes.id_club and phppl_equipes.id='$id_equipe'"; $result=mysql_query($query) or die(mysql_error()); $row=mysql_fetch_array( $result ); $nom_club=stripslashes($row[0]); return("$nom_club"); } function nb_journees($id_champ) { $query="SELECT id FROM phppl_equipes WHERE id_champ='$id_champ'"; $result=mysql_query($query); $nb_equipes=mysql_num_rows( $result ); $nb_journees=((($nb_equipes)*2)-2) ; return("$nb_journees"); } function nb_matchs ($numero, $champ) { $query="select * from phppl_matchs, phppl_journees where phppl_matchs.id_journee=phppl_journees.id and phppl_journees.numero=$numero and phppl_journees.id_champ=$champ"; $result=mysql_query($query); $nb_matchs=mysql_num_rows( $result ); return("$nb_matchs"); } // *** REMPLI LA TABLE CLMNT function db_clmnt($champ, $debut, $fin, $cache) { $nb_requete=0; if($cache=="1"){ mysql_query("DELETE FROM phppl_clmnt_cache WHERE ID_CHAMP='$champ'") or die (mysql_error());} else{ mysql_query("DELETE FROM phppl_clmnt") or die (mysql_error());} $nb_requete++; if (!$fin){$fin=(nb_equipes($champ)*2)-2;} if (!$debut){$debut=1;} // SELECTION DES PARAMETRES $query="SELECT pts_victoire, pts_nul, pts_defaite FROM phppl_parametres WHERE id_champ='$champ'"; $nb_requete++; $result=(mysql_query($query)) or die (mysql_error()) ; while ($row=mysql_fetch_array($result) ) { $pts_victoire=$row['pts_victoire']; $pts_nul=$row['pts_nul']; $pts_defaite=$row['pts_defaite']; } // victoires domicile $query="SELECT dom.id, count(dom.id), phppl_clubs.nom, sum(buts_dom), sum(buts_ext) FROM phppl_equipes as dom, phppl_clubs, phppl_matchs, phppl_journees, phppl_championnats WHERE dom.id_champ='$champ' AND dom.id_club=phppl_clubs.id AND dom.id=phppl_matchs.id_equipe_dom AND buts_dom > buts_ext AND phppl_championnats.id=phppl_journees.id_champ AND phppl_journees.id=phppl_matchs.id_journee AND phppl_journees.numero>='$debut' AND phppl_journees.numero<='$fin' GROUP by phppl_clubs.nom "; $nb_requete++; $dom = mysql_query($query) or die (mysql_error()); while($row= mysql_fetch_array($dom)) { $clmnt[$row[2]]['GDOM']=$row[1]; if (!isset($clmnt[$row[2]]['BUTSDOMPOUR'])) {$clmnt[$row[2]]['BUTSDOMPOUR']=$row[3];} else{$clmnt[$row[2]]['BUTSDOMPOUR']+=$row[3];} if (!isset($clmnt[$row[2]]['BUTSDOMCONTRE'])) {$clmnt[$row[2]]['BUTSDOMCONTRE']=$row[4];} else{$clmnt[$row[2]]['BUTSDOMCONTRE']+=$row[4];} } // Defaites domicile $query="SELECT dom.id, count(dom.id), phppl_clubs.nom, sum(buts_dom), sum(buts_ext) FROM phppl_equipes as dom, phppl_clubs, phppl_matchs, phppl_journees, phppl_championnats WHERE dom.id_champ='$champ' AND dom.id_club=phppl_clubs.id AND dom.id=phppl_matchs.id_equipe_dom AND buts_dom < buts_ext AND phppl_championnats.id=phppl_journees.id_champ AND phppl_journees.id=phppl_matchs.id_journee AND phppl_journees.numero>='$debut' AND phppl_journees.numero<='$fin' GROUP by phppl_clubs.nom "; $dom = mysql_query($query) or die (mysql_error()); while($row= mysql_fetch_array($dom)) { $clmnt[$row[2]]['PDOM']=$row[1]; if (!isset($clmnt[$row[2]]['BUTSDOMPOUR'])) {$clmnt[$row[2]]['BUTSDOMPOUR']=$row[3];} else{$clmnt[$row[2]]['BUTSDOMPOUR']+=$row[3];} if (!isset($clmnt[$row[2]]['BUTSDOMCONTRE'])) {$clmnt[$row[2]]['BUTSDOMCONTRE']=$row[4];} else{$clmnt[$row[2]]['BUTSDOMCONTRE']+=$row[4];} } // Nuls domicile $query="SELECT dom.id, count(dom.id), phppl_clubs.nom, sum(buts_dom), sum(buts_ext) FROM phppl_equipes as dom, phppl_clubs, phppl_matchs, phppl_journees, phppl_championnats WHERE dom.id_champ='$champ' AND dom.id_club=phppl_clubs.id AND dom.id=phppl_matchs.id_equipe_dom AND buts_dom = buts_ext AND buts_dom is not null AND buts_ext is not null AND phppl_championnats.id=phppl_journees.id_champ AND phppl_journees.id=phppl_matchs.id_journee AND phppl_journees.numero>='$debut' AND phppl_journees.numero<='$fin' GROUP by phppl_clubs.nom "; $dom = mysql_query($query) or die (mysql_error()); while($row= mysql_fetch_array($dom)) { $clmnt[$row[2]]['NDOM']=$row[1]; if (!isset($clmnt[$row[2]]['BUTSDOMPOUR'])) {$clmnt[$row[2]]['BUTSDOMPOUR']=$row[3];} else{$clmnt[$row[2]]['BUTSDOMPOUR']+=$row[3];} if (!isset($clmnt[$row[2]]['BUTSDOMCONTRE'])) {$clmnt[$row[2]]['BUTSDOMCONTRE']=$row[4];} else{$clmnt[$row[2]]['BUTSDOMCONTRE']+=$row[4];} } // Resultats à domicile $query="SELECT phppl_clubs.nom FROM phppl_clubs, phppl_equipes, phppl_championnats WHERE phppl_equipes.id_champ=phppl_championnats.id AND phppl_championnats.id='$champ' AND phppl_equipes.id_club=phppl_clubs.id"; $result=mysql_query($query) or die (mysql_error()); // RESULTATS EXTERIEURS : // victoires exterieur $query="SELECT ext.id, count(ext.id), phppl_clubs.nom, sum(buts_ext), sum(buts_dom) FROM phppl_equipes as ext, phppl_clubs, phppl_matchs, phppl_journees, phppl_championnats WHERE ext.id_champ='$champ' AND ext.id_club=phppl_clubs.id AND ext.id=phppl_matchs.id_equipe_ext AND buts_ext > buts_dom AND phppl_championnats.id=phppl_journees.id_champ AND phppl_journees.id=phppl_matchs.id_journee AND phppl_journees.numero>='$debut' AND phppl_journees.numero<='$fin' GROUP by phppl_clubs.nom "; $dom = mysql_query($query) or die (mysql_error());; while($row= mysql_fetch_array($dom)) { $clmnt[$row[2]]['GEXT']=$row[1]; if (!isset($clmnt[$row[2]]['BUTSEXTPOUR'])) {$clmnt[$row[2]]['BUTSEXTPOUR']=$row[3];} else{$clmnt[$row[2]]['BUTSEXTPOUR']+=$row[3];} if (!isset($clmnt[$row[2]]['BUTSEXTCONTRE'])) {$clmnt[$row[2]]['BUTSEXTCONTRE']=$row[4];} else{$clmnt[$row[2]]['BUTSEXTCONTRE']+=$row[4];} } // Defaites exterieur $query="SELECT ext.id, count(ext.id), phppl_clubs.nom, sum(buts_ext), sum(buts_dom) FROM phppl_equipes as ext, phppl_clubs, phppl_matchs, phppl_journees, phppl_championnats WHERE ext.id_champ='$champ' AND ext.id_club=phppl_clubs.id AND ext.id=phppl_matchs.id_equipe_ext AND buts_ext < buts_dom AND phppl_championnats.id=phppl_journees.id_champ AND phppl_journees.id=phppl_matchs.id_journee AND phppl_journees.numero>='$debut' AND phppl_journees.numero<='$fin' GROUP by phppl_clubs.nom "; $dom=mysql_query($query) or die (mysql_error()); While($row= mysql_fetch_array($dom)) { $clmnt[$row[2]]['PEXT']=$row[1]; if (!isset($clmnt[$row[2]]['BUTSEXTPOUR'])) {$clmnt[$row[2]]['BUTSEXTPOUR']=$row[3];} else{$clmnt[$row[2]]['BUTSEXTPOUR']+=$row[3];} if (!isset($clmnt[$row[2]]['BUTSEXTCONTRE'])) {$clmnt[$row[2]]['BUTSEXTCONTRE']=$row[4];} else{$clmnt[$row[2]]['BUTSEXTCONTRE']+=$row[4];} } // Nuls exterieur $query="SELECT ext.id, count(ext.id), phppl_clubs.nom, sum(buts_ext), sum(buts_dom) FROM phppl_equipes as ext, phppl_clubs, phppl_matchs, phppl_journees, phppl_championnats WHERE ext.id_champ='$champ' AND ext.id_club=phppl_clubs.id AND ext.id=phppl_matchs.id_equipe_ext AND buts_ext = buts_dom AND buts_dom is not null AND buts_ext is not null AND phppl_championnats.id=phppl_journees.id_champ AND phppl_journees.id=phppl_matchs.id_journee AND phppl_journees.numero>='$debut' AND phppl_journees.numero<='$fin' GROUP by phppl_clubs.nom "; $dom=mysql_query($query) or die (mysql_error());; while($row= mysql_fetch_array($dom)) { $clmnt[$row[2]]['NEXT']=$row[1]; if (!isset($clmnt[$row[2]]['BUTSEXTPOUR'])) {$clmnt[$row[2]]['BUTSEXTPOUR']=$row[3];} else{$clmnt[$row[2]]['BUTSEXTPOUR']+=$row[3];} if (!isset($clmnt[$row[2]]['BUTSEXTCONTRE'])) {$clmnt[$row[2]]['BUTSEXTCONTRE']=$row[4];} else{$clmnt[$row[2]]['BUTSEXTCONTRE']+=$row[4];} } // TABLEAU DE CLASSEMENT $query="SELECT phppl_clubs.nom, phppl_equipes.penalite, phppl_equipes.id FROM phppl_clubs, phppl_equipes, phppl_championnats WHERE phppl_equipes.id_champ=phppl_championnats.id AND phppl_championnats.id='$champ' AND phppl_equipes.id_club=phppl_clubs.id"; $result=mysql_query($query) or die (mysql_error()); //mysql_query("LOCK TABLE phppl_clmnt WRITE, phppl_equipes WRITE, phppl_clubs WRITE") or die (mysql_error()); if (mysql_num_rows($result)==0) { $query="SELECT phppl_clubs.nom, phppl_equipes.id FROM phppl_clubs, phppl_equipes, phppl_championnats WHERE phppl_equipes.id_champ=phppl_championnats.id AND phppl_championnats.id='$champ' AND phppl_equipes.id_club=phppl_clubs.id"; $result=mysql_query($query) or die (mysql_error()); } while($row = mysql_fetch_array($result)) { $NOM=$row['nom']; $DOMJOUES=$clmnt[$NOM]['GDOM']+$clmnt[$NOM]['NDOM'] + $clmnt[$NOM]['PDOM']; $EXTJOUES=$clmnt[$NOM]['GEXT']+$clmnt[$NOM]['NEXT'] + $clmnt[$NOM]['PEXT']; $JOUES=$EXTJOUES + $DOMJOUES; $DOMPOINTS=(($clmnt[$NOM]['GDOM'])*$pts_victoire) + (($clmnt[$NOM]['NDOM'])*$pts_nul) + (($clmnt[$NOM]['PDOM'])*$pts_defaite); $EXTPOINTS=(($clmnt[$NOM]['GEXT'])*$pts_victoire) + (($clmnt[$NOM]['NEXT'])*$pts_nul) + (($clmnt[$NOM]['PEXT'])*$pts_defaite); $POINTS= $DOMPOINTS+ $EXTPOINTS + $row['penalite']; $G=($clmnt[$NOM]['GEXT'])+($clmnt[$NOM]['GDOM']); $N=($clmnt[$NOM]['NEXT'])+($clmnt[$NOM]['NDOM']); $P=$clmnt[$NOM]['PEXT'] + $clmnt[$NOM]['PDOM']; $DOMG=($clmnt[$NOM]['GDOM']); $DOMN=($clmnt[$NOM]['NDOM']); $DOMP=$clmnt[$NOM]['PDOM']; $EXTG=($clmnt[$NOM]['GEXT']); $EXTN=($clmnt[$NOM]['NEXT']); $EXTP=$clmnt[$NOM]['PEXT']; $BUTSPOUR=$clmnt[$NOM]['BUTSEXTPOUR'] + $clmnt[$NOM]['BUTSDOMPOUR']; $DOMBUTSPOUR=$clmnt[$NOM]['BUTSDOMPOUR']; $EXTBUTSPOUR=$clmnt[$NOM]['BUTSEXTPOUR']; $BUTSCONTRE=$clmnt[$NOM]['BUTSEXTCONTRE'] + $clmnt[$NOM]['BUTSDOMCONTRE']; $DOMBUTSCONTRE= $clmnt[$NOM]['BUTSDOMCONTRE']; $EXTBUTSCONTRE=$clmnt[$NOM]['BUTSEXTCONTRE'] ; $DIFF=$BUTSPOUR - $BUTSCONTRE; $DOMDIFF=$DOMBUTSPOUR-$DOMBUTSCONTRE; $EXTDIFF=$EXTBUTSPOUR - $EXTBUTSCONTRE; $PEN = $row['penalite']; $NOM=addslashes($row['nom']); $question="INSERT INTO "; if($cache=="1"){$question.="phppl_clmnt_cache ";} else{$question.="phppl_clmnt ";} $question.="SET NOM='$NOM', ID_EQUIPE='$row[id]', ID_CHAMP='$champ', POINTS='$POINTS', DOMPOINTS='$DOMPOINTS', EXTPOINTS='$EXTPOINTS', JOUES= '$JOUES', DOMJOUES= '$DOMJOUES', EXTJOUES= '$EXTJOUES', G='$G', DOMG='$DOMG', EXTG='$EXTG', N='$N', DOMN='$DOMN', EXTN='$EXTN', P='$P', DOMP='$DOMP', EXTP='$EXTP', BUTSPOUR='$BUTSPOUR', DOMBUTSPOUR='$DOMBUTSPOUR', EXTBUTSPOUR='$EXTBUTSPOUR', BUTSCONTRE='$BUTSCONTRE', DOMBUTSCONTRE='$DOMBUTSCONTRE', EXTBUTSCONTRE='$EXTBUTSCONTRE', DIFF='$DIFF', DOMDIFF='$DOMDIFF', EXTDIFF='$EXTDIFF', PEN='$PEN'"; $result2=mysql_query($question) or die(mysql_error()); } if($cache=="1"){$requete="DELETE FROM phppl_clmnt_cache WHERE nom='exempte'" or die (mysql_error());} else{$requete="DELETE FROM phppl_clmnt WHERE nom='exempte'" or die (mysql_error());} $resultat=mysql_query($requete) or die (mysql_error()); //mysql_query("UNLOCK TABLES") or die (mysql_error()); } // Nombres de renseignement dans cette classe à partir de l'id_classe (utilisé dans phppl_classe.php) function nb_classe($data) { $query="SELECT id FROM phppl_rens WHERE id_classe='$data'"; $result=mysql_query($query); //if (!$result) die mysql_error(); $nb_classe=mysql_num_rows( $result ); return("$nb_classe"); } // Nombres de classes enregistrées (ulilisé dans phppl_classe.php) function nb_classe2() { $query="SELECT * FROM phppl_classe"; $result=mysql_query($query); //if (!$result) die mysql_error(); $nb_classe2=mysql_num_rows( $result ); return("$nb_classe2"); } // Nombres de renseignements classés (utilisé dans admin/rens.php) function nb_rens() { $query="SELECT id FROM phppl_rens where id_classe>'0'"; $result=mysql_query($query); $nb_rens=mysql_num_rows( $result ); return("$nb_rens"); } // Nombres de renseignements enregistrés (utilisé dans rens.php) function nb_rens2() { $query="SELECT * FROM phppl_rens"; $result=mysql_query($query); $nb_rens2=mysql_num_rows( $result ); return("$nb_rens2"); } // id du renseignement à partir du nom du rens (utilisé dans rens.php) function rens2($rens) { $query="select id, nom from phppl_rens where nom='$rens'"; $result=mysql_query($query); //if (!$result) die mysql_error(); $row=mysql_fetch_array($result); $rens2=$row[0]; return("$rens2"); } // Affichage des renseignements (utilisé dans gestequipes.php function aff_rens ($id_classe, $id_clubs) { $query="SELECT phppl_donnee.id, phppl_donnee.nom, id_rens, id_clubs, phppl_rens.id, phppl_rens.nom, phppl_rens.id_classe, phppl_clubs.id, etat, phppl_donnee.url, phppl_rens.url FROM phppl_donnee, phppl_rens, phppl_clubs WHERE id_clubs='$id_clubs' AND id_clubs=phppl_clubs.id AND id_rens=phppl_rens.id AND id_classe='$id_classe' AND etat='1' order by rang"; $result = mysql_query ($query) or die(mysql_error()); $nb_rens=mysql_num_rows($result); if ($nb_rens=="0"){echo "
".ADMIN_EQUIPE_8."
";} while($row = mysql_fetch_array($result)) { $donnee_nom=stripslashes($row[1]); $rens_nom=stripslashes($row[5]); if (empty ($row[9]) and empty ($row[10])){echo "$rens_nom : $donnee_nom
";} elseif (empty ($row[9])){echo "$rens_nom : $donnee_nom
";} elseif (empty ($row[10])){echo "$rens_nom : $donnee_nom
";} else {echo "$rens_nom : $donnee_nom
";} } } function VerifSession ($user_pseudo,$user_mdp) { if ($user_pseudo and $user_mdp) { $requete= "SELECT mot_de_passe, id_prono FROM phppl_membres WHERE pseudo='$user_pseudo' and admin='1'"; $result = mysql_query($requete); $row = mysql_fetch_array($result); if ($row["mot_de_passe"] == $user_mdp){;$a=1;} else {$a=0;} //session_start(); } else {$a=0;} return ("$a"); }
Comité Pays de Loire- Administration
Championnats

Logout

Fatal error: Call to undefined function VerifSession() in /home/httpd/o/n/e/onepip-france/francefinalesrugby.franceserv.com/Phpleague/phppl/admin/index.php on line 76