| Server IP : 89.46.109.6 / Your IP : 216.73.217.116 Web Server : Apache System : Linux hlpi1ws-c284s07.ad.aruba.it 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : ID19067310 ( 19067310) PHP Version : 5.3.29 Disable Function : system,popen,dl,passthru,proc_open,shell_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /web/htdocs/www.edizacco.it/home/pannello/ |
Upload File : |
<?php
ob_start();
@session_start();
require_once('../include/connect_db.php');
$meta_title = TITLE;
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo"$meta_title | Area Riservata"; ?></title>
<link href="css/master.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--[if lte IE 6]><script src="js/ie6/warning.js"></script><script>window.onload=function(){e("js/ie6/")}</script><![endif]-->
<?php
// GESTIONE PAGINA
if ( isset($_REQUEST['action']) ) { $action = $_REQUEST['action']; } else { $action = "login"; }
switch ($action) {
case 'login': login(); break;
case 'accesso': accesso(); break;
case 'logout': logout(); break;
case 'recupera_password': recupera_password(); break;
case 'no_accesso': no_accesso(); break;
default: login(); break;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// LOGIN /////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function login(){
$version = VERSION;
$logo_title = TITLE;
$link = SERVER;
if (isset($_COOKIE["user_ricorda"]) == 1){
if($_COOKIE["user_ricorda"] == 1){ $tag_ricorda = 'checked="checked"'; }else{ $tag_ricorda = ''; }
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<form action="index.php?action=accesso" method="POST" enctype="multipart/form-data" name="login" target="_self" id="login">
<p><label class="label">Username:</label><input type="text" name="username" class="input" value="'.$_COOKIE["ricorda_username"].'"/></p>
<p><label class="label">Password:</label><input type="password" name="password" class="input" value="'.$_COOKIE["ricorda_password"].'"/></p>
<p><span>Ricorda i miei dati d\'accesso:</span><input type="checkbox" name="user_ricorda" value="1" '.$tag_ricorda.' class="checkbox"></p>
<p><input name="submitbutton" type="submit" class="submitbutton" value="ACCEDI" /></p>
<p style="text-align:left; margin-top:20px;">Hai dimenticato la tua password? <a href="index.php?action=recupera_password">Clicca qui</a></p>
</form>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione 1.0</p>
<p> </p>
<p align="center"><a href="'.$link.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
}elseif (isset($_COOKIE["user_ricorda"]) == 0){
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<form action="index.php?action=accesso" method="POST" enctype="multipart/form-data" name="login" target="_self" id="login">
<p><label class="label">Username:</label><input type="text" name="username" class="input"/></p>
<p><label class="label">Password:</label><input type="password" name="password" class="input"/></p>
<p><span>Ricorda i miei dati d\'accesso:</span><input type="checkbox" name="user_ricorda" value="1" class="checkbox"></p>
<p><input name="submitbutton" type="submit" class="submitbutton" value="ACCEDI" /></p>
<p style="text-align:left; margin-top:20px;">Hai dimenticato la tua password? <a href="index.php?action=recupera_password">Clicca qui</a></p>
</form>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$link.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// ACCESSO ///////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function accesso(){
$prefix = PREFIX;
$version = VERSION;
$logo_title = TITLE;
$link = SERVER;
$query = mysql_query("SELECT * FROM ".$prefix."_login ORDER BY id_login DESC");
while ( $row = @mysql_fetch_array($query) ) {
$id_login = $row['id_login'];
$username = $row['username'];
$password = $row['password'];
$nickname = $row['nickname'];
if ( isset($_POST) && !empty($_POST['username']) && !empty($_POST['password']) ) {
$username_ins = addslashes($_POST['username']);
$password_ins= addslashes($_POST['password']);
if ( $username == $username_ins && $password == $password_ins ) {
//session_register('accesso');
$_SESSION['pann_accesso'] = 1;
$_SESSION['pann_id_login'] = "$id_login";
$_SESSION['pann_nickname'] = "$nickname";
//echo '';
if ($_POST['user_ricorda']==1){
setcookie("user_ricorda", $_POST['user_ricorda'], time() + 604800);
setcookie("ricorda_username", $_POST['username'], time() + 604800);
setcookie("ricorda_password", $_POST['password'], time() + 604800);
}else{
setcookie("user_ricorda", "", time()-1800);
setcookie("ricorda_username", "", time()-1800);
setcookie("ricorda_password", "", time()-1800);
}
//header("Refresh:2;Url=admin.php");
header("Location: home.php");
ob_end_flush();
exit;
}
}
}
echo '
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<p style="margin-top:20px;"><img src="images/login_error.png" alt="" class="error" /></p>
<p><b>ATTENZIONE!</b></p>
<p>Login o Password errati</p>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$link.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
header("Refresh:1;Url=index.php");
ob_end_flush();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// LOGOUT ////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function logout(){
session_start();
session_destroy();
header("location: index.php");
ob_end_flush();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// RECUPERA PASSWORD /////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function recupera_password(){
$prefix = PREFIX;
$version = VERSION;
$server = SERVER;
$logo_title = TITLE;
if (empty($_POST)) {
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<form action="#" method="POST" enctype="multipart/form-data" name="login" target="_self" id="login">
<p><label class="label">Email:</label><input type="text" name="email" class="input" style="width:216px;"/></p>
<p>
<label class="label" style="height:40px;">Copia il codice:</label>
<img src="../captcha/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>" alt="" class="img_captcha"/>
<input name="captcha_code" type="text" class="input_captcha" maxlength="6"/>
</p>
<p style="margin-top:20px;"><input name="submitbutton" type="submit" class="submitbutton" value="RECUPERA" /></p>
<p style="text-align:left; margin-top:10px;"><a href="index.php">Torna indietro</a></p>
</form>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$server.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
} else { //form is posted
include("../captcha/securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['captcha_code']);
if($valid == true) {
$email = trim(stripslashes($_POST['email']));
$prefix = PREFIX;
$send_smtp = SENDSMTP;
$send_email = SENDEMAIL;
$send_password = SENDPASSWORD;
$send_ricezione = SENDRICEZIONE;
$query_username = "SELECT email FROM ".$prefix."_login WHERE (email = '$email') LIMIT 1";
$risultato = mysql_query($query_username);
$user = mysql_num_rows ($risultato);
if ($user == '1') {
// UTENTE ESISTENTE
$select_utente = mysql_query("SELECT * FROM ".$prefix."_login WHERE email = '$email'");
while ($row_select_utente = @mysql_fetch_array($select_utente)){
$email = $row_select_utente['email'];
$nickname = stripslashes($row_select_utente['nickname']);
$username = stripslashes($row_select_utente['username']);
$password = stripslashes($row_select_utente['password']);
}
/// INVIO EMAIL ///////////////////////////////////////////////
require "phpmailer/class.phpmailer.php";
$mail = new PHPmailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Mailer = "smtp";
$mail->Host = $send_smtp;
$mail->Port = 25;
$mail->Username = $send_email;
$mail->Password = $send_password;
$mail->SMTPAuth = true;
$mail->From = $send_email;
$mail->FromName = "Scatolificio Sutera";
$mail->AddAddress(''.$email.'');
$mail->AddReplyTo(''.$send_ricezione.'');
$mail->Subject = 'Recupero password area riservata '.$logo_title.'';
//inseriamo i tag HTML e i CSS per formattare il messaggio
$mail->Body = '
<html>
<head>
<style type="text/css">
h1 { font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 7px; padding-left: 0px; color: #FFF; font-size: 16px; text-transform: uppercase; }
p { font-family: Verdana, Geneva, sans-serif; font-size: 12px; color: #000; text-align: justify; margin: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 7px; padding-left: 0px; }
a { font-family: Verdana, Geneva, sans-serif; font-size: 12px; color: #03C; text-decoration: none; }
a:hover { color: #F00; text-decoration: underline; }
</style>
<head>
</head>
<body>
<table width="100%">
<tr>
<td>
<h1>Recupero password area riservata '.$logo_title.'</h1>
<p>Gentile <b>'.$nickname.'</b>,</p>
<p>come da sua richiesta le inviamo le sue credenziali per accedere al suo <a href="'.$server.'/pannello" >account</a>.</p>
<p> </p>
<p><b>Username:</b> '.$username.'<br /><b>Password:</b> '.$password.'</p>
<p> </p>
<p><b>Cordiali Saluti</b><br />Informatica Netizen - Formazione e Servizi</p>
</td>
</tr>
</table>
</body>
</html>
';
//parte relativa all'invio
if(!$mail->Send()){
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<p style="margin-top:20px;"><img src="images/error.png" alt="" class="error" /></p>
<p><b>ATTENZIONE:</b> Errore nell\'invio dell\'e-mail!</p>
<p><a href="indietro.php?action=recupera_password">Torna Indietro</a></p>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$server.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
}else{
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<p style="margin-top:20px;"><img src="images/login_send.png" alt="" class="error" /></p>
<p><b>Operazione effettuata con successo!</b></p>
<p>Controlla la posta in arrivo contenente la password per effettuare il login.</p>
<p><a href="index.php">Torna indietro</a></p>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$server.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
}
$mail->SmtpClose();
unset($mail);
///////////////////////////////////////////////////////////////////////////////
} else {
// UTENTE NON ESISTENTE
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<p style="margin-top:20px;"><img src="images/error.png" alt="" class="error" /></p>
<p><b>L\'indirizzo e-mail</b> che hai inserito non corrisponde a nessun account nel nostro database.</p>
<p><a href="index.php?action=recupera_password">RIPROVA</a> o contatta l\'amministratore.</p>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$server.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
}
} else{
echo '
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<p style="margin-top:20px;"><img src="images/error.png" alt="" class="error" /></p>
<p><b>Attenzione:</b> Il codice inserito non è valido!</p>
<p><a href="index.php?action=recupera_password">Torna indietro per riprovare</a>.</p>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$server.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// NO ACCESSO ////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function no_accesso(){
$version = VERSION;
$logo_title = TITLE;
$link = SERVER;
echo'
<div id="wrapper_login">
<p><img src="images/logo_login.png" alt="'.$logo_title.'" class="logo" /></p>
<p style="margin-top:20px;"><img src="images/error.png" alt="" class="error" /></p>
<p><b>ATTENZIONE!</b></p>
<p>PAGINA PROTETTA NON PUOI ACCEDERE</p>
</div>
<div id="wrapper_credit">
<p>Powered by: <a href="http://www.informaticanetizen.it" title="Powered by Informatica Netizen" target="_blank">Informatica Netizen</a> | Versione '.$version.'</p>
<p> </p>
<p align="center"><a href="'.$link.'" title="'.$logo_title.'" target="_blank">Torna al sito</a></p>
</div>
';
header("Refresh:2;Url=index.php");
ob_end_flush();
}
?>
</body>
</html>