ciao..scusate..ma non riesco davvero a capire perchè non mi fa entrare nella parte amministrativa!!
questo è il codice che dovrebbe permettere il login:
Codice PHP:
<?
if($page == "") {
?>
<form name="form1" method="post" action="?page=menu">
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<th width="34%" class="testo" scope="row"><div align="right">username</div></th>
<td width="50%"><input name="username" type="text" class="poster"></td>
</tr>
<tr>
<th class="testo" scope="row"><div align="right">password</div></th>
<td><input name="password" type="password" class="poster"></td>
</tr>
<tr>
<th colspan="2" class="testo" scope="row"><input name="Submit" type="submit" class="poster" value="Invia">
<? include("../config.php"); ?></th>
</tr>
</table>
</form>
<?
}
elseif($page == "$page=menu")
{
include("../config.php");
unset($page);
define("CONNESSIONE",true);
define("ADMINISTRATION", true);
define("USER_READ", true);
$row = mysql_num_rows($iea);
if($row)
{
$risultato = mysql_fetch_array($iea);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="2" class="poster" scope="row">Benvenuto: <? echo $risultato["username"]; ?></th>
</tr>
<tr class="testo"><? $username = $risultato["username"]; $password = $risultato["password"]; ?>
<th scope="row">[url="?page=newsadd&username=<? echo $username; ?>&password=<? echo $password; ?>"]Aggiungi una news[/url]</th>
<th scope="row">[url="?page=newsedit&username=<? echo $username; ?>&password=<? echo $password; ?>"]Modifica Una News[/url]</th>
</tr>
<tr class="testo">
<th scope="row">[url="?page=newsedit&username=<? echo $username; ?>&password=<? echo $password; ?>"]Elimina una news[/url]</th>
<th scope="row">-</th>
</tr>
<?
if($risultato["livello"] == "0")
{
?>
<tr class="testo">
<th scope="row">-</th>
<th scope="row">-</th>
</tr>
<tr class="testo">
<th scope="row">-</th>
<th scope="row">-</th>
</tr>
<tr class="testo">
<th scope="row">[url="?page=adduser&username=<? echo $username; ?>&password=<? echo $password; ?>"]Aggiungi un'user[/url]</th>
<th scope="row">[url="?page=edituser&username=<? echo $username; ?>&password=<? echo $password; ?>"]Modifica un'user[/url]</th>
</tr>
<tr class="testo">
<th scope="row">[url="?page=edituser&username=<? echo $username; ?>&password=<? echo $password; ?>"]Cancella un'user[/url]</th>
<th scope="row"></th>
</tr>
<?
}
?>
</table>
<?
}
}
una volta passati come dati: id e pass (ho controllato nel db e sono registrati ed il livello di privilegio è impostato a 0) nel login mi passa alla pagina http://..admin/?page=menu, ma non visualizza le varie opzioni (gestione user e gestioni news).
PLS sapreste darmi un consiglio??