erreur sql

erreur sql - PHP - Programmation

Marsh Posté le 12-11-2005 à 04:05:31    

Salut voici mon erreur j'arrive pas a trouver le Blemm  
 

Code :
  1. --------------------------------------------
  2. Fatal error: main(): Failed opening required '' (include_path='.:/usr/share/php/PEAR') in /home/.filer3/nde/www/ambostats/admin.php on line 4
  3. --------------------------------------------


 
Fichier: admin.php
--------------------------------------------

Code :
  1. <?php
  2. $base_folder  = "";
  3. require($base_folder."" );
  4. require($base_folder."" );
  5. require($base_folder."" );
  6. $module_name = basename(dirname(__FILE__));
  7. $index = 0;
  8. $scripturl = $base_folder."admin.php?";
  9. // login option 1 : Basic realm
  10. /*
  11. function displayLogin() {
  12. header("WWW-Authenticate: Basic realm=\"AmboStats Login\"" );
  13. header("HTTP/1.0 401 Unauthorized" );
  14. echo "<h2>Authentication Failure</h2>";
  15. echo "The username and password provided did not work. Please reload this page and try again.<br><br>\n";
  16. }
  17. if (!isset($_SERVER["PHP_AUTH_USER"]) || !isset($_SERVER["PHP_AUTH_PW"])) {
  18. // If username or password hasn't been set, display the login request.
  19. displayLogin();
  20. exit;
  21. }
  22. else {
  23. if (!(($settings["adminuser"] == $_SERVER["PHP_AUTH_USER"]) && ($settings["adminpass"] == $_SERVER["PHP_AUTH_PW"]))) {
  24.  // If username and or password doesnt match, show the login
  25.  displayLogin();
  26.  exit;
  27. }
  28. }
  29. */
  30. //-----------------------------------------
  31. // login option 2 : cookie login
  32. function displayLogin($error = "" ) {
  33. global $scripturl;
  34. echo "<html>\n";
  35. echo "<head>\n";
  36. echo "<title>Ambostats Admin login</title>\n";
  37. echo "<style type=\"text/css\">\n";
  38. echo "<!--\n";
  39. echo "body, form { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #C0C0C0; }\n";
  40. echo "-->\n";
  41. echo "</style>\n";
  42. echo "</head>\n";
  43. echo "<body bgcolor=\"#000000\">\n";
  44. if ($error <> '') {
  45.  echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n";
  46.  echo "<tr>\n";
  47.  echo "<td><font color=\"red\">$error</font></td>\n";
  48.  echo "</tr>\n";
  49.  echo "</table>\n";
  50. }
  51. echo "<form action=\"$scripturl\" method=\"post\">\n";
  52. echo "<input type=\"hidden\" name=\"formsubmit\" value=\"1\">\n";
  53. echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\">\n";
  54. echo "<tr>\n";
  55. echo "<td>Username</td>\n";
  56. echo "<td><input type=\"text\" name=\"user\"></td>\n";
  57. echo "</tr>\n";
  58. echo "<tr>\n";
  59. echo "<td>Password</td>\n";
  60. echo "<td><input type=\"password\" name=\"pass\"></td>\n";
  61. echo "</tr>\n";
  62. echo "<tr>\n";
  63. echo "<td colspan=\"2\">&nbsp;</td>\n";
  64. echo "</tr>\n";
  65. echo "<tr>\n";
  66. echo "<td>&nbsp;</td>\n";
  67. echo "<td><input type=\"submit\" name=\"submit\" value=\"Login !\"></td>\n";
  68. echo "</tr>\n";
  69. echo "</table>\n";
  70. echo "</form>\n";
  71. echo "</body>\n";
  72. echo "</html>\n";
  73. }
  74. if ($_COOKIE["amboaccess"]) {
  75. $auth_str = $_COOKIE["amboaccess"];
  76. }
  77. if ($_POST["formsubmit"] == '1') {
  78. if ($_POST["user"] == $settings["adminuser"] && $_POST["pass"] == $settings["adminpass"]) {
  79.  $auth_str = md5($_POST["user"]) . "|" . md5($_POST["pass"]);
  80.  setcookie("amboaccess", $auth_str, time() + (86400*3), "/" );
  81. }
  82. }
  83. if (isset($auth_str)) {
  84. $auth_str = explode("|", $auth_str);
  85. if ($auth_str["0"] != md5($settings["adminuser"]) || $auth_str["1"] != md5($settings["adminpass"])) {
  86.  displayLogin('Wrong username or password');
  87.  exit;
  88. }
  89. }
  90. else {
  91. displayLogin();
  92. exit;
  93. }
  94. $link = DBconnect();
  95. $result = mysql_query("SELECT InstallDate FROM {$settings["dbprefix"]}Config WHERE ConfID = '1'" );
  96. $row = mysql_fetch_array($result);
  97. $installdate = $row["InstallDate"];
  98. $page = $_GET["page"];
  99. if (!$page) $page = "kills";
  100. if (file_exists($base_folder."modules/$page.php" )) {
  101. include($base_folder."modules/$page.php" );
  102. }
  103. else {
  104. $content = "Error: unknown module &quot;$page&quot;";
  105. }
  106. if (file_exists($base_folder."modules/admin/menu.php" )) {
  107. include($base_folder."modules/admin/menu.php" );
  108. }
  109. else {
  110. $content.= "Error: unknown module &quot;menu&quot;";
  111. }
  112. if (file_exists($base_folder."modules/admin/$page.php" )) {
  113. include($base_folder."modules/admin/$page.php" );
  114. }
  115. else {
  116. $content.= "Error: unknown module &quot;$page&quot;";
  117. }
  118. DBdisconnect($link);
  119. $tpl = new phemplate();
  120. $tpl->set_var('date', $installdate);
  121. $tpl->set_var('content', $content);
  122. $tpl->set_var('scripturl', $scripturl);
  123. $tpl->set_var("base", $base_folder);
  124. $tpl->set_file('main', $base_folder.'templates/main.htm');
  125. echo $tpl->process('', 'main', TPL_LOOP);
  126. ?>


Message édité par glossypaper le 12-11-2005 à 05:46:24
Reply

Marsh Posté le 12-11-2005 à 04:05:31   

Reply

Marsh Posté le 12-11-2005 à 04:15:05    

et la balise code, c'est pour les pingouins ?
 
==> http://forum-images.hardware.fr/icones/message/c.gif

Reply

Marsh Posté le 12-11-2005 à 05:46:47    

tet2neu a écrit :

et la balise code, c'est pour les pingouins ?
 
==> http://forum-images.hardware.fr/icones/message/c.gif


 
Pardon :)

Reply

Marsh Posté le 12-11-2005 à 08:42:10    

tet2neu a écrit :

et la balise code, c'est pour les pingouins cons ?
 
==> http://forum-images.hardware.fr/icones/message/c.gif


 
 [:jar jar]


---------------
http://www.alsacreations.com, http://www.openweb.eu.org. Mon CV : http://cv.roane-irkana.net. A ne surtout pas prendre en exemple : http://www.worldinternet.be
Reply

Marsh Posté le 12-11-2005 à 08:57:21    

Code :
  1. $base_folder  = "";
  2. require($base_folder."" );


 
Donc là tu essaies d'inclure le fichier ""."" ? Intéressant...


---------------
StarCraft Professional Gaming Database | [Ze Topic] Starcraft/BroodWar
Reply

Marsh Posté le 12-11-2005 à 10:07:26    

bah il suffit de lire le message d'erreur. Il est très clair [:jkley]

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed