salve a tutti... ho un problema
ho fatto una pagina protetta da login... il login funziona in tutte le pagine in php e da anche l'accesso eseguito.. ma nella pagina protetta mi da errore pero se non metto il login in quella pagina funziona tutto perfettamente.. vi posto il codice
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Lupin the 3rd - ルパン三世 - Rupan Sansei - Lupin III</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="icon" href="preferiti.ico" type="image/gif" />
<link rel="shortcut icon" href="preferiti.ico" type="image/gif" />
<meta http-equiv="title" content="Lupin the 3rd - ルパン三世 - Rupan Sansei - Lupin III" />
<meta name="description" content="Il miglior sito su Lupin The 3rd, tante info su personaggi, autoree, immagini, multimedia, episodi completi, mangascans e tanto altro" />
<meta name="keywords" content="Lupin the 3rd, ルパン三世. Rupan Sansei, Lupin III , the 3rd" />
<meta name="revisit-after" content="1 day" />
<meta name="rating" content="General" />
<meta name="copyright" content="Lupin the 3rd" />
<meta name="creation_date" content="30/01/2009" />
<meta name="distribution" content="Global" />
<meta http-equiv="Pragma" content="cache" />
<meta http-equiv="imagetoolbar" content="no" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function cambia(ImageName,ImageFile){
ImageName.src = ImageFile;
}
// -->
</script>
</head>
<body onLoad="MM_preloadImages('http://lupin3rd.altervista.org/images/logo/logo2_02.png','images/f_chat_on.jpg','images/f_gallery_on.jpg'), snow()">
<script type="text/javascript">
<!--
function PopupCentrata() {
var w = 470;
var h = 350;
var l = Math.floor((screen.width-w)/2);
var t = Math.floor((screen.height-h)/2);
window.open("http://lupin3rd.altervista.org/Mp3_PLayer/Player.html","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}
//-->
</script>
<table class="tab_layout" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
[img]http://lupin3rd.altervista.org/images/logo/logo_01.png[/img][url="http://lupin3rd.altervista.org/"][img]http://lupin3rd.altervista.org/images/logo/logo_02.png[/img][/url][url="http://lupinthe3rd.forumcommunity.net/"][img]http://lupin3rd.altervista.org/images/logo/logo_03.png[/img][/url][url="http://lupin3rd.altervista.org/Gallery.php"][img]http://lupin3rd.altervista.org/images/logo/logo_04.png[/img][/url][url="javascript:PopupCentrata()"][img]http://lupin3rd.altervista.org/images/logo/logo_05.png[/img][/url][img]http://lupin3rd.altervista.org/images/logo/logo_06.png[/img]
[img]http://lupin3rd.altervista.org/images/logo/logo_07.png[/img]
<center><script language="JavaScript" type="text/javascript">
images = new Array(3);
images[0] = "[img]http://lupin3rd.altervista.org/images/barsx01.gif[/img]";
images[1] = "[img]http://lupin3rd.altervista.org/images/barsx02.gif[/img]";
images[2] = "[img]http://lupin3rd.altervista.org/images/barsx03.gif[/img]";
images[3] = "[img]http://lupin3rd.altervista.org/images/barsx04.gif[/img]";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>[img]http://lupin3rd.altervista.org/images/bardx.gif[/img]<MAP NAME="bardx">[url="http://lupin3rd.altervista.org/Area_Download.php"][/url][url="http://lupin3rd.altervista.org/Manga_Scan.php"][/url]
<MAP NAME="barsx01">[url="http://lupin3rd.altervista.org/Musiche.php"][/url]
<MAP NAME="barsx02">[url="http://lupin3rd.altervista.org/Gallery.php"][/url]
<MAP NAME="barsx03">[url="http://lupin3rd.altervista.org/Test.php"][/url]
<MAP NAME="barsx04">[url="http://lupin3rd.altervista.org/Area_Download.php"][/url]
</center>
</td>
</tr>
<table class="tab_layout" align="center" cellpadding="0" cellspacing="0"><tr><td class="mleft_top"></td><td><table class="mback" width="100%" cellpadding="0" cellspacing="0"><tr><td class="mback_left"></td><td class="mback_center">
<td class="tab_menu" colspan="4" rowspan="4" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tab_menu">[img]http://lupin3rd.altervista.org/images/Accediv2.png[/img]</td></tr>
<td><tr><?PHP require("/membri/lupin3rd/users.php"); ?></td></tr>
<tr><td class="tab_menu">[img]http://lupin3rd.altervista.org/images/menuv2.png[/img]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/"]• News[/url]</td></tr>
<tr><td>[img]http://lupin3rd.altervista.org/images/animev2.png[/img]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Monkey_Punch.php"]• Monkey Punch[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Lupin_The_3rd.php"]• Lupin The 3rd[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Goemon_Ishikawa.php"]• Goemon Ishikawa[/url]</td></tr>
<tr><td>[img]http://lupin3rd.altervista.org/images/mangav2.png[/img]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Orion.php"]• Orion[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Millennium.php"]• Millenium[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Mitico.php"]• Mitico[/url]</td></tr>
<td>[img]http://lupin3rd.altervista.org/images/multimediav2.png[/img]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Area_Download.php"]• Area Download[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Video.php"]• Video[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Gallery.php"]• Gallery[/url]</td></tr>
<tr><td>[url="http://lupin3rd.altervista.org/Wallpaper.php"]• Wallpaper[/url]</td></tr>
<tr><td><a href="http://lupin3rd.altervista.org/Cover_Dvd.php">&
</table>
</td>
<td class="aa" width="100%" valign="top">
<div align="center">
<script type="text/javascript">
//<![CDATA[
google_color_border = "252525";
google_color_bg = "252525";
google_color_link = "6d0002";
google_color_url = "6d0002";
google_color_text = "6d0002";
document.write('<s'+'cript type="text/javascript" src="http://ad.altervista.org/js.ad/size=468X60/r='+new Date().getTime()+'"><\/s'+'cript>');
//]]>
</script>
</div>
<center>[b]Pagina Protetta[/b]</center>
<table width="90%">
<?PHP
include ("functions.php");
if (is_logged_in($user)) {
$cookie_read = explode("|", base64_decode($user));
$username = $cookie_read[1];
echo "Pagina protetta";
//if the user is not logged in, then tell him to login.
}else{
//header("Location: users.php"); die();
echo "<center>Benvenuto visitatore, per accedere alla pagina devi effettuare il Login oppure
<a href=\"http://lupin3rd.altervista.org/Registrazione.php\"><font color=\"white\">[b]Registrati[/b]</font></a> </center>";
//this code will load all registered users
$sql = mysql_query("SELECT * FROM ".$prefix."_users ORDER BY userid DESC");
$num = mysql_num_rows($sql);
echo "
<hr size=1><center>Total registered users ($num)</center>";
while($row = mysql_fetch_array($sql)){
$userid = $row['userid'];
$username = $row['username'];
$password = $row['password'];
$ipaddress = $row['ipaddress'];
#comment this line if you don't want to print user names.
}
}
?>
</table>
<div align="center">
<script type="text/javascript">
//<![CDATA[
google_color_border = "252525";
google_color_bg = "252525";
google_color_link = "6d0002";
google_color_url = "6d0002";
google_color_text = "6d0002";
document.write('<s'+'cript type="text/javascript" src="http://ad.altervista.org/js.ad/size=468X60/r='+new Date().getTime()+'"><\/s'+'cript>');
//]]>
</script>
</div>
</td>
</tr>
</table></td><td class="mright"></td></tr><tr><td class="mleft_bottom"></td><td><table class="msub" width="100%" cellpadding="0" cellspacing="0"><tr><td class="msub_left"></td><td class="msub_center"></td><td class="msub_right"></td></tr></table></td><td class="mright_bottom"></td></tr></table>
<tr><td class="tab_footer" colspan="12"><center>[img]http://lupin3rd.altervista.org/images/fondo.png[/img]</center></td></tr>
</table>
</body>
</html>
mi dice Fatal error: Cannot redeclare class sql_db in /membri/lupin3rd/mysql.class.php on line 9
ripeto mi da solo errore quando inserisco il login <?PHP require("/membri/lupin3rd/users.php"); ?> e solo nella pagina protetta che dovrebbe essere accessibile dopo il login... in tutte le altra pagine normali funziona benissimo