FORUM Tom's Hardware » Programmation » PHP & MySQL & ASP » Problème avec Top50 sites
 

Problème avec Top50 sites

84 utilisateurs inconnus
Ajouter une réponse



 Mot :   Pseudo :  
 
Bas de page
Auteur
 Sujet : Problème avec Top50 sites
 
www.sebaserveur.fr
Plus d'informations

Donc voilà, j'ai un petit problème avec le script PHP top50 :
 
Il me met tout le temps ça, et je ne vois où est le problème pourtant  :??: :
 
Donc voici l'erreur :
 
Notice: Use of undefined constant pseudo - assumed 'pseudo' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Notice: Use of undefined constant email - assumed 'email' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Notice: Use of undefined constant mdp - assumed 'mdp' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Notice: Use of undefined constant nom_site - assumed 'nom_site' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Notice: Use of undefined constant url_site - assumed 'url_site' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Notice: Use of undefined constant url_ban - assumed 'url_ban' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Notice: Use of undefined constant description - assumed 'description' in e:\web\www\teamcity\top50\nv_site.php on line 7
 
Et ici le fichier :
 

Code :
  1. <?PHP
  2. if(!file_exists("./includes/config.inc.php" )) {
  3.   exit("ZeTop50 n'est pas encore installer. <a href=\"./install/\">Cliquer ici</a>" );
  4. }
  5. include ('top.php');
  6. require_once("includes/fonction.sys.php" );
  7. require 'fonctions.php';
  8. $select = "select * FROM toptest where top='oui' AND valide='1'";
  9. $result = mysql_query($select)  or die ('Erreur : '.mysql_error() );
  10. $row = mysql_fetch_array($result);
  11. if($row['id']!="" ){
  12. print "
  13.   <center>Le Gagnant de la semaine <br>
  14.   <a href=\"".htmlspecialchars($row['url_site'], ENT_QUOTES)."\" target=\"_blank\">
  15.     <img src=\"".htmlspecialchars($row['url_ban'], ENT_QUOTES)."\" width=\"360\" height =\"50\" alt=\"".htmlspecialchars($row['nom_site'], ENT_QUOTES)."\" border=\"0\">
  16.   </a>
  17.   </center>
  18.   <br><br>";
  19. }else{
  20.   echo '
  21.     <br>
  22.     <center>Lors de la prochain remise &agrave; zero du top50, le gagnant de la semaine sera afficher ici !</center>
  23.     <br><br>
  24.   ';
  25. }
  26. $select = 'SELECT count(id) FROM toptest';
  27. $result = mysql_query($select) or die ('Erreur : '.mysql_error() );
  28. $row = mysql_fetch_row($result);
  29. $total = $row[0]; 
  30. $nombre = $kes__A;
  31. $limite=htmlspecialchars($_GET['limite'], ENT_QUOTES);
  32. if (!$limite) $limite = 0;
  33. $page = 'index.php';
  34. $verifLimite= verifLimite($limite,$total,$nombre);
  35. if(!$verifLimite) {
  36. $limite = 0;
  37. }
  38. ?>
  39.             <table width="100%" height="20">
  40.             <tr><td>
  41.             <?PHP
  42.             print "Nombres de bannieres : ".$total;
  43.             if($total > $nombre)
  44.             {
  45.         echo ' (';
  46.         affichePages($nombre,$page,$total);
  47.         echo ' )';
  48.             }
  49.             ?>
  50.             </td></tr></table>
  51.             <table width="100%">
  52.                 <tr>
  53.                     <td bgcolor="<?PHP print $foncer__B; ?>" width="80%">
  54.                         <div align="center">
  55.                             Bannieres - Descriptions</div>
  56.                     </td>
  57.                     <td width="10%" bgcolor="<?PHP print $foncer__B; ?>">
  58.                         <div align="center">
  59.                             Entrer</div>
  60.                     </td>
  61.                     <td width="10%" bgcolor="<?PHP print $foncer__B; ?>">
  62.                         <div align="center">
  63.                             Sortit</div>
  64.                     </td>
  65.                 </tr>
  66. <?php
  67. $select = "select * FROM toptest WHERE valide='1' ORDER BY count_in DESC limit $limite,$nombre";
  68. $result = mysql_query($select)  or die ('Erreur : '.mysql_error() );
  69. if($total>0 ) {
  70. require_once("includes/fonction.sys.php" );
  71. while($row = mysql_fetch_array($result)) {
  72. $coutin = $row['count_in'];
  73. $coutof = $row['count_out'];
  74.   print "<tr>
  75.   <td bgcolor=\"".$claire__A."\" width=\"80%\" height=\"100\" valign=\"center\"><div align=\"center\">
  76.     <a href=\"out.php?id=$row[id]&url=".htmlspecialchars($row['url_site'], ENT_QUOTES)."\" target=\"_blank\">
  77.       <img src=\"".htmlspecialchars($row['url_ban'], ENT_QUOTES)."\" width=\"460\" height =\"60\" alt=\"".htmlspecialchars($row['nom_site'], ENT_QUOTES)."\" border=\"0\">
  78.     </a>
  79.     <br>".htmlspecialchars($row['description'], ENT_QUOTES)."
  80.   </div></td>";
  81. if ($coutin != "" ){
  82.     print "<td bgcolor=\"".$claire__A."\" width=\"10%\"><div align=\"center\">$row[count_in]</div></td>";
  83.     }else{
  84.     print "<td bgcolor=\"".$claire__A."\" width=\"10%\"><div align=\"center\">0</div></td>";
  85. }
  86. if ($coutof != "" ){
  87.     print "<td bgcolor=\"".$claire__A."\" width=\"10%\"><div align=\"center\">$row[count_out]</div></td>";
  88.     }else{
  89.     print "<td bgcolor=\"".$claire__A."\" width=\"10%\"><div align=\"center\">0</div></td>";
  90. }
  91. print "</tr>";
  92. }
  93.  
  94. }else{
  95.   echo '<tr><td colspan="3">Pas encore de banniere inscrit...</td></tr>';
  96. }
  97. mysql_free_result($result);
  98. ?>
  99. </table>
  100. <?PHP
  101. include ('bot.php');
  102. ?>


 
Merci beaucoup d'avance  :jap:

Profil : Pointeur
Plus d'informations

faut pas utiliser

Code :
  1. $tableau[pseudo]


mais

Code :
  1. $tableau['pseudo']


 
dans le premier cas, tu tentes d'acceder a l'indice pseudo qui est une constante. le problème est que tu n'as pas déclarer cette constante.
 
le second cas, va a l'indice 'pseudo' qui lui est une chaine de caractère...


Aller à :
Ajouter une réponse
  FORUM Tom's Hardware » Programmation » PHP & MySQL & ASP » Problème avec Top50 sites
 

Annonces Google
Publicité