include ("../common/public.php") ;
$query = "
select
*
from
agenti A
where
A.Attivo = 1 or
(A.Attivo = 0 and Year(A.DataDisattivazione) > '$anno')
order by
A.nome
" ;
list($n, $d) = $db->RecuperaDati($query) ;
$str = "" ;
for ($i=0; $i<$n; $i++)
{
if ($d['TipoMandato'][$i] == 0)
$tipoMandato = "Mono" ;
else
$tipoMandato = "Pluri" ;
$id_agente = $d['IdAgenti'][$i] ;
$str .= "" ;
$str .= "| " . htmlspecialchars($d['Nome'][$i]) . " | " ;
$str .= "" . $d['PIva'][$i] . " | " ;
$str .= "" . $d['Indirizzo'][$i] . " | " ;
$str .= "" . $d['Cap'][$i] . " | " ;
$str .= "" . $d['Citta'][$i] . " | " ;
$str .= "" . $d['Provincia'][$i] . " | " ;
$str .= "" . $d['Telefono'][$i] . " | " ;
$str .= "" . $d['Cellulare'][$i] . " | " ;
$str .= "" . $d['Fax'][$i] . " | " ;
if ($profilo == 1)
$str .= "" . $d['Percentuale'][$i] . "% | " ;
$str .= "" . $tipoMandato . " | " ;
$str .= "" . $d['Email'][$i] . " | " ;
$str .= "" . $d['Note'][$i] . " | " ;
$str .= "
" ;
}
if ($profilo == 1)
{
$str .= "" ;
$header = "NOME,PARTITA IVA,INDIRIZZO,CAP,CITTA',PROV,TELEFONO,CELLULARE,FAX,PROVV,MANDATO,E-MAIL,NOTE" ;
$strSort = "str,str,str,str,str,str,int,str,int,int,str" ;
$iniWP = "10,11,13,5,5,4,8,8,8,5,6,15,25" ;
$setColType = "ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro" ;
$setColAlign = "left,left,left,center,left,center,center,center,center,center,center,left,left" ;
}
else
{
$str .= "" ;
$header = "NOME,PARTITA IVA,INDIRIZZO,CAP,CITTA',PROV,TELEFONO,CELLULARE,FAX,MANDATO,E-MAIL,NOTE" ;
$strSort = "str,str,str,str,str,str,int,str,int,str" ;
$iniWP = "10,11,13,5,5,4,8,8,8,6,15,25" ;
$setColType = "ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro" ;
$setColAlign = "left,left,left,center,left,center,center,center,center,center,left,left" ;
}
?>
echo TITLE ?>
if ($profilo < 3) : ?>
endif ?>
Numero Agenti: echo $n ?>
(per selezionare un agente clicca sulla riga corrispondente)