| glossypaperMotard des terrasses :o | Salut voici mon erreur j'arrive pas a trouver le Blemm  
 
 | Code : 
 --------------------------------------------Fatal error: main(): Failed opening required '' (include_path='.:/usr/share/php/PEAR') in /home/.filer3/nde/www/ambostats/admin.php on line 4--------------------------------------------
 | 
 
 Fichier: admin.php
 --------------------------------------------
 
 | Code : 
 <?php$base_folder  = "";require($base_folder."" );require($base_folder."" );require($base_folder."" );$module_name = basename(dirname(__FILE__));$index = 0;$scripturl = $base_folder."admin.php?";// login option 1 : Basic realm
/*
function displayLogin() {
	header("WWW-Authenticate: Basic realm=\"AmboStats Login\"" );
	header("HTTP/1.0 401 Unauthorized" );
	echo "<h2>Authentication Failure</h2>";
	echo "The username and password provided did not work. Please reload this page and try again.<br><br>\n";
}
if (!isset($_SERVER["PHP_AUTH_USER"]) || !isset($_SERVER["PHP_AUTH_PW"])) {
	// If username or password hasn't been set, display the login request.
	displayLogin();
	exit;
}
else {
	if (!(($settings["adminuser"] == $_SERVER["PHP_AUTH_USER"]) && ($settings["adminpass"] == $_SERVER["PHP_AUTH_PW"]))) {
  // If username and or password doesnt match, show the login
  displayLogin();
  exit;
	}
}
*///-----------------------------------------
// login option 2 : cookie login
function displayLogin($error = "" ) {	global $scripturl;	echo "<html>\n";	echo "<head>\n";	echo "<title>Ambostats Admin login</title>\n";	echo "<style type=\"text/css\">\n";	echo "<!--\n";	echo "body, form { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #C0C0C0; }\n";	echo "-->\n";	echo "</style>\n";	echo "</head>\n";	echo "<body bgcolor=\"#000000\">\n";	if ($error <> '') {  echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n";  echo "<tr>\n";  echo "<td><font color=\"red\">$error</font></td>\n";  echo "</tr>\n";  echo "</table>\n";	}	echo "<form action=\"$scripturl\" method=\"post\">\n";	echo "<input type=\"hidden\" name=\"formsubmit\" value=\"1\">\n";	echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\">\n";	echo "<tr>\n";	echo "<td>Username</td>\n";	echo "<td><input type=\"text\" name=\"user\"></td>\n";	echo "</tr>\n";	echo "<tr>\n";	echo "<td>Password</td>\n";	echo "<td><input type=\"password\" name=\"pass\"></td>\n";	echo "</tr>\n";	echo "<tr>\n";	echo "<td colspan=\"2\"> </td>\n";	echo "</tr>\n";	echo "<tr>\n";	echo "<td> </td>\n";	echo "<td><input type=\"submit\" name=\"submit\" value=\"Login !\"></td>\n";	echo "</tr>\n";	echo "</table>\n";	echo "</form>\n";	echo "</body>\n";	echo "</html>\n";}if ($_COOKIE["amboaccess"]) {	$auth_str = $_COOKIE["amboaccess"];}if ($_POST["formsubmit"] == '1') {	if ($_POST["user"] == $settings["adminuser"] && $_POST["pass"] == $settings["adminpass"]) {  $auth_str = md5($_POST["user"]) . "|" . md5($_POST["pass"]);  setcookie("amboaccess", $auth_str, time() + (86400*3), "/" );	}}if (isset($auth_str)) {	$auth_str = explode("|", $auth_str);	if ($auth_str["0"] != md5($settings["adminuser"]) || $auth_str["1"] != md5($settings["adminpass"])) {  displayLogin('Wrong username or password');  exit;	}}else {	displayLogin();	exit;}$link = DBconnect();$result = mysql_query("SELECT InstallDate FROM {$settings["dbprefix"]}Config WHERE ConfID = '1'" );$row = mysql_fetch_array($result);$installdate = $row["InstallDate"];$page = $_GET["page"];if (!$page) $page = "kills";if (file_exists($base_folder."modules/$page.php" )) {	include($base_folder."modules/$page.php" );}else {	$content = "Error: unknown module "$page"";}if (file_exists($base_folder."modules/admin/menu.php" )) {	include($base_folder."modules/admin/menu.php" );}else {	$content.= "Error: unknown module "menu"";}if (file_exists($base_folder."modules/admin/$page.php" )) {	include($base_folder."modules/admin/$page.php" );}else {	$content.= "Error: unknown module "$page"";}DBdisconnect($link);$tpl = new phemplate();$tpl->set_var('date', $installdate);$tpl->set_var('content', $content);$tpl->set_var('scripturl', $scripturl);$tpl->set_var("base", $base_folder);$tpl->set_file('main', $base_folder.'templates/main.htm');echo $tpl->process('', 'main', TPL_LOOP);?>
 | 
   Message édité par glossypaper le 12-11-2005 à 05:46:24
 |