<?php
session_start();
if ($finame>=1){
echo "Prego effettuare il login <a href=\"/admin/index.php\"> Qui<br>
&copy;Bloghosteria.com<br>
</a>";
}
 elseif  ( empty( $finame ) ) {
?> Prego effettuare il login <a href="/admin/index.php"> Qui<br>
&copy;Bloghosteria.com<br>
</a>
<?php
} elseif ($finame==$_SESSION['finame']) {
include ("headnavadmin.php");
echo "
<style type=\"text/css\">

a:link, a:visited {
	color: #009933; text-decoration: none;
	font-weight: bold;
}

a:hover {
	color: #ff6600;	text-decoration: none;
	font-weight: bold;	
}
.style2 {
color: #009933;
font-weight: bold;
}
.style3 {
color: #FF0000;
font-weight: bold;

}
</style>
<p class=style2>Salve, 
". $_SESSION['laname'] ."  <a href=logout.php> Logout</a></p>";
if($password=="$passver"){
echo"$password";
$db_password = md5($password);
include("config.php");
mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase"); 
$query = "SELECT * FROM amministratore  WHERE laname = '$laname'";
$result = mysql_db_query("$dbname", $query);
$query = "update amministratore  set 
password='$db_password',decrypted_password='$password' where 
laname='$laname'";
$result = mysql_db_query("$dbname", $query);
echo"<p align=center>Nuova password memorizzata :</p>
<p align=center>login : gestore</p>
<p align=center>password : $password</p>";

	$subject = "Nuova password amministrazione";
	$message = "Salve $laname,
	

	

	Queste le tue info:
	Username: gestore
	Password: $password
	




	Email automatica non rispondere Grazie!";

	mail($adminemail, $subject, $message, "From: $sitename <$adminemail>\nX-Mailer: PHP/" . phpversion());
	
	
} else {

echo"la password di verifica non coincide Riprova !";
include ("riprova.php");
}

} else {
echo "Prego effettuare il login <a href=\"/admin/index.php\"> Qui<br>
&copy;Bloghosteria.com<br>
</a>";
}
?>
