[quote="moad"]Bonjour, j'ai télécharger un scripte php nommé "tlAds est un script de gestion de bannières et bandeaux publicitaires" et je l'ai installé facilement mais lorsque et j'ai fais quelques coorrections en ce qui concerne les variables.
Mais mon probléme, que j'ai pas pu résoudre, c'est au moment de l'identification un message d'erreur se génére le voilà "[b]Notice: Undefined index: tlAds_login in d:\tp\test\tlads\index.php on line 147[/b]" .
Et merci d'avance de me répondre. :P
voici le code ds l'index.php l'ereur il est marqué en rouge:
<?php
include('./config.php');
$debut = getmicrotime();
$version = "1";
$copy = "2006-2007";
$page = "index";
$req = "0";
if(isset($_GET['p']) AND $_GET['p'] == 1)
{
$sql = mysql_query("SELECT pass FROM ".$prefix_table."admin WHERE login = '".myaddslashes($_POST['login'])."'") or die("Erreur SQL : ".mysql_error());
$val = mysql_fetch_array($sql);
$req++;
mysql_close();
if(md5($_POST['pass']) == $val['pass']) {
$expire = 2*3600;
setcookie($prefix_table."login", $_POST['login'], time()+$expire);
header("Location: ./");
}
else {
header("Location: ./");
}
}
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN'
'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fr'>
<head>
<title>N.satelcom v<?php echo $version; ?></title>
<meta http-equiv='Content-Type' content='application/xml.xhtml; charset=iso-8859-1' />
<meta name='description' content="Gestionnaire de base de données par MOAD KALLIDA" />
<meta name='language' content='fr-FR' />
<meta name='format' content='application/xhtml+xml' />
<meta name='creator' content='MOAD KALLIDA' />
<meta name='rights' content='Tous droits réservés' />
<meta name='robots' content='index, follow' />
<style type="text/css">
body
{
text-align: center;
background-color: #d3d0cb;
color: #000000;
font-family: Arial;
font-size: 12px;
}
#site
{
background-color: #f4f3f1;
width: 85%;
margin: auto;
border-color: black;
border-style: solid;
border-width: thin;
}
img
{
border: 0px;
}
a
{
text-decoration: none;
color: #993333;
}
a:hover
{
color: #CC6600;
text-decoration: overline underline;
}
p:hover
{
color: #6B0010;
}
.bold
{
font-weight: bold;
}
.redb
{
font-weight: bold;
color: red;
}
.header
{
text-align: center;
background-color: #7aa0c7;
background-repeat: no-repeat;
height: 80px;
}
.title
{
float: left;
color: #5d42b8;
font-size: 32px;
padding: 20px 20px 20px 20px;
text-decoration: underline;
}
.menuh
{
padding-right: 10px;
padding-left: 10px;
padding-bottom: 5px;
padding-top: 5px;
border-top: solid thin black;
border-bottom: solid thin black;
}
.middle
{
text-align: center;
margin: auto;
width: 80%;
padding: 10px 10px 10px 10px;
}
.property
{
margin: auto;
margin-top: 10px;
margin-bottom: 10px;
border: dotted 1px black;
width: 50%;
color: #B90000;
}
.propertitle
{
font-weight: bold;
font-size: 13px;
text-decoration: underline;
color: black;
}
.middletitle
{
text-align: center;
font-size: 16px;
font-weight: bold;
text-decoration: underline;
color: #7aa0c7;
}
</style>
</head>
<body>
<div id='site'>
<div class='header'><div class='title'><strong>N.satelcom</strong> v<?php echo $version; ?></div>
</div>
<?php
[b]$result = mysql_query("SELECT login,statut FROM ".$prefix_table."admin WHERE login = '".myaddslashes($_COOKIE[$prefix_table.'login'])." '") or die("Erreur SQL : ".mysql_error());[/b] $val = mysql_fetch_array($result);
$req++;
if($val == '0')
{
?>
<div class='menuh'>
<div class="middletitle">/!\ Phase d'identification /!\</div>
</div>
<div class='middle' align="center">
<form method="post" action="./index.php?p=1">
<!--Login : <input name="login" type="text" size="10" maxlength="100" /><br />
Password : <input name="pass" type="password" size="10" maxlength="100" /><br />
<input type="submit" name="Submit" value="Envoyer" />-->
<table width="50%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="25%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Login:</strong></font></td>
<td width="75%"><input bgcolor="#AAAAAA" name="login" type="text" size="20" maxlength="100"></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Password:</strong></font></td>
<td>
<input name="pass" type="password" size="20" maxlength="100">
</td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Log In !"></td>
<td> </td>
</tr>
</table>
</form>
[/php]
il y a la suite bienûr :
