<?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 ("config.php");  
include ("langselect.php");

echo "$lang0003, 
". $_SESSION['last_name'] ." <a href=logout.php> Logout</a> ";





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>$lang0029</p>";
 


} 
 
}

mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase"); 
$query = "SELECT * FROM $connect "; 
$result = mysql_db_query("$dbname", $query); 
if ($result) {
while ($r = mysql_fetch_array($result)) {
$imgpicc = $r["imgpicc"];
$imggra = $r["imggra"];
$quant = $r["quant"];
$oggnom = $r["oggnom"];
$prezog = $r["prezog"];
$periva = $r["periva"];
$descrogg = $r["descrogg"];
  
echo "<form method=post action=regorder.php name=pws_clienti>

<!-- flag di invio del modulo -->

<input type=Hidden name=actionflag value=insert>

<input type=Hidden name=form[Status] value=$lang0149>



<table width=100% height=102 border=1 align=center cellpadding=1 cellspacing=0>

 <input type=hidden name=form[Ragione_Sociale] value=\"$last_name\">

  
  <td width=120 >$oggnom<input type=hidden name=form[Oggetto] value=$oggnom ><a href=\"/#\" onclick=\"window.open('/amministrazione/$imggra','clock','scrollbars=yes,width=300,height=300,left='+(screen.availWidth/2-150)+',top='+(screen.availHeight/2-150)+'');return false;\"><img style=\"width: 150px; height: 112px\" height=112 src=/amministrazione/$imgpicc width=150 border=0 /></a></td>
  <td width=130 >$descrogg</td> 

    <td width=110 ><p>$lang0030 $quant</p></td>

    <td width=56 ><input type=text name=form[Protocollo]  value=1 maxlength=6 size=6>&nbsp;</td>
    <input type=hidden name=form[Tipo_Pagamento] value=nd>
	
    <td width=159 ><input type=hidden name=form[Prezzo] value=$prezog  >
     $prezog $lang0150 </td>
	 
     <input type=hidden name=form[Iva] value=$periva>
	 <input type=hidden name=connect value=$connect>
	 <input type=hidden name=oggnom value=$oggnom>
	 <input type=hidden name=form[Cat_Ogg] value=$connect>
	
		 
  <td width=67 colspan=2 align=right nowrap >
	  

      <!-- BEGIN Button Insert --><input name=Insert type=submit value=\"$lang0031\" ><!-- END Button Insert -->

</td>

</table>

</form>";
} 
 
} 

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