<?php
session_start();
if ($first_name>=1){
echo "Prego effettuare il login <a href=\"/contenuti.php\"> Qui<br>
&copy;Bloghosteria.com<br>
</a>";
}
 elseif  ( empty( $first_name ) ) {
?> Prego effettuare il login <a href="/contenuti.php"> Qui<br>
&copy;Bloghosteria.com<br>
</a>
<?php
} elseif ($first_name==$_SESSION['first_name']) {   
include ("langselect.php");
echo "$lang0003, 
". $_SESSION['last_name'] ." <a href= logout.php>Logout</a>";
include ("config.php");


mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase"); 
$query = "SELECT * FROM users WHERE last_name = '$last_name'  "; 
$result = mysql_db_query("$dbname", $query); 
if ($result) { 

 

while ($r = mysql_fetch_array($result)) { 
$cogn = $r["cogn"];
$last_name = $r["last_name"];
$agggr = $r["agggr"];
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;	
}
</style>
<p><a href=\"/sample.php?last_name=$last_name\">$lang0004</a> | 
<a href=\"clgestord.php?Ragione_Sociale=$last_name\">$lang0005</a> |
<a href=mailto:$emailwebm>$lang0006</a> | 
<a href=\"gestpag.php?Ragione_Sociale=$last_name\">$lang0007</a></p>
<p>$lang0145</p>";
 

echo "<table width=560 height=262  border=1 cellpadding=1 cellspacing=0>
  <tr>
    <td width=347 align=center valign=top><p>$lang0146</p><p>$agggr</p></td>
    <td width=213 align=center>";
} 
 
}

mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase"); 
$query = "SELECT * FROM sd_cataloghi "; 
$result = mysql_db_query("$dbname", $query); 
if ($result) {
while ($r = mysql_fetch_array($result)) {
$Idcat = $r["Idcat"];
$agggr = $r["agggr"];

  
echo "<table width=200  border=1 cellspacing=0 cellpadding=1><form method=\"post\" action=\"artshow.php\">
<input type=\"hidden\" name=\"connect\" value=\"$agggr\">

<tr><td align= center bgcolor=#D9DAE7><input name=\"submit\" type=\"submit\" value=\"$agggr\"></td></tr>

</form></table>";
} 
 
} 
echo"</td>
  </tr>
</table>";
} else {
echo "Prego effettuare il login <a href=\"contenuti.php\"> Qui<br>
&copy;Bloghosteria.com<br>
</a>";
}
 
?>
