<?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: #000000;

}
.style5 {
	color: #ff0000;
	font-size: 24px;
}
</style>
<p class=style2>Salve, 
". $_SESSION['laname'] ."  <a href=logout.php> Logout</a></p><p align=center class=style5>Lista Clienti Fornitori</p>"; 
		include ("config.php");
mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase");  
$query = "delete from users where userid='$userid'"; 

$result = mysql_db_query("$dbname", $query); 
$query = "SELECT * FROM users "; 
$result = mysql_db_query("$dbname", $query); 

if ($result) { 
  
echo "<table width=95% align=center border=1 cellspacing=0 cellpadding=0.3 ><tr>
<td align=center bgcolor=#ffffff>Id</td> 
<td align=center bgcolor=#ffffff>CLI/FOR</td> 
<td align=center bgcolor=#ffffff>Azienda</td> 
<td align=center bgcolor=#ffffff>Email</td>
<td align=center bgcolor=#ffffff>Login</td> 
<td align=center bgcolor=#ffffff>Password</td> 
</tr>"; 

while ($r = mysql_fetch_array($result)) { 
$userid = $r["userid"];
$first_name = $r["first_name"]; 
$last_name = $r["last_name"]; 
$email_address = $r["email_address"]; 
$username = $r["username"];
$decrypted_password = $r["decrypted_password"];
 

echo "<tr> 
<td align=center><a href=\"dele.php?userid=$userid&first_name=$first_name\">CN</a> $userid</td>
<td align=center><a href=\"modfdati.php?userid=$userid&last_name=$last_name\">mod</a> $first_name</td>
<td align=center><a href=\"/#\" onclick=\"window.open('dati.php?userid=$userid&last_name=$last_name','dati','scrollbars=yes,width=350,height=300,left='+(screen.availWidth/2-150)+',top='+(screen.availHeight/2-150)+'');return false;\">$last_name</a></td>
<td align=center><a href=mailto:$email_address>$email_address</a></td>
<td align=center>$username</td>
<td align=center>$decrypted_password</td> 
</tr>"; 
} 
echo "</table>"; 

} else { 

echo "No data."; 

} 

mysql_free_result($result); 

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

?>