cioè, il tuo file control_log.php è così?
e split di conseguenzacodice:<?php session_start(); $userid = $_POST['userid']; $password_user = $_POST['password_user']; $sql = "SELECT * FROM tabella where userid = '$userid' AND password_user = '$password_user' and autorizza = 'Y'"; $result = mysql_db_query($database,$sql,$db) or die("Errore ".mysql_error()); $num_rows = mysql_num_rows($result); if ( $num_rows != 0 ) { // trovato $row = mysql_fetch_array($result); $_SESSION['loggato'] = true; $_SESSION['id_ute'] = $row['id_ute']; $_SESSION['userid'] = $row['userid']; $_SESSION['nome'] = $row['nome']; $_SESSION['password_user'] = $row['password_user']; $_SESSION['livello'] = $row['livello']; $_SESSION['email'] = $row['email']; $_SESSION['accessi'] = $row['acessi']; header ("Location: office/split.php"); } else { // non trovato header ("Location: index.php?go=errore"); } ?>
codice:<?php session_start(); ?> <html> <head> </head> <title>AREA RISERVATA </title> <?php if (( $_SESSION['loggato'] == true ) and ( $_SESSION['livello'] == "webmaster")) { echo("<frameset cols=280,* frameborder=no border=0 framespacing=0>"); echo("<frame src=admin_office/menu.php name=menu scrolling=auto noresize>"); echo("<frameset rows=100,* frameborder=no border=0 framespacing=0>"); echo("<frame src=admin_office/testa.php name=testa scrolling=auto noresize>"); echo("<frame src=admin_office/corpo.php name=corpo scrolling=auto noresize>"); echo("</frameset>"); echo("<noframes></noframes></frameset>"); } if (( $_SESSION['loggato'] == true ) and ( $_SESSION['livello'] == "amministratore")) { echo("<frameset cols=280,* frameborder=no border=0 framespacing=0>"); echo("<frame src=admin_office/menu.php name=menu scrolling=auto noresize>"); //correzione qui echo("<frameset rows=100,* frameborder=no border=0 framespacing=0>"); echo("<frame src=admin_office/testa.php name=testa scrolling=auto noresize>"); echo("<frame src=admin_office/corpo.php name=corpo scrolling=auto noresize>"); echo("</frameset>"); echo("<noframes></noframes></frameset>"); } if (( $_SESSION['loggato'] == true ) and ( $_SESSION['livello'] == "utente")) { echo("<frameset cols=280,* frameborder=no border=0 framespacing=0>"); echo("<frame src=user/menu.php name=menu scrolling=auto noresize>"); echo("<frame src=user/corpo.php name=corpo scrolling=auto noresize>"); echo("</frameset><noframes></noframes>"); echo("</frameset>"); } if (( $_SESSION['loggato'] == true ) and ( $_SESSION['livello'] == "segretaria")) { echo("<frameset cols=280,* frameborder=no border=0 framespacing=0>"); echo("<frame src=admin_office/menu_segre.php name=menu_segra scrolling=auto noresize>"); echo("<frame src=admin_office/corpo_segre.php name=corpo_segre scrolling=auto noresize>"); echo("</frameset><noframes></noframes>"); echo("</frameset>"); } else { echo (" "); echo ("<div align=center>"); echo (" "); echo ("<font face=Arial style=font-size:18px color=#F90606>"); echo ("Per accedere al pannello devi loggarti"); echo ("</font>"); echo ("</div>"); } ?> </html>

Rispondi quotando