<?php
//buildin int a table or not?
//need header library and css
function selectClientiDb($result,$field='Ragione_Sociale')
{
//header
echo "<tr>";
$headers_clienti = array(
"Ragione Sociale" => "",
"Partita Iva" => "",
"Telefono" => "",
"Mail" => ""
);
$headerFatture = new linkHeaders($headers_clienti);
$headerFatture -> output();
echo "</tr>";
//da usare all'interno di una tabella preesistente
$i=0;
while ($a_row = dbms_fetch_array($result))
{
echo "\n<tr>";
echo "\n<td class='FacetDataTD'><input type='radio' name='".$field."' id='refcgn_".$i."' value=\"".addslashes($a_row["Ragione_Sociale"])."\"><label for='refcgn_".$i."'>".$a_row["Ragione_Sociale"]."</label>";
echo "</td>";
echo "\n<td class='FacetDataTD'>".$a_row["PI"]."</td>";
echo "\n<td class='FacetDataTD'>".$a_row["Telefono"]."</td>";
echo "\n<td class='FacetDataTD'>".$a_row["E_mail"]."</td>";
echo "\n</tr>";
$i++;
}
echo "<!-- footer submit -->\n";
echo "<tr>\n";
//Attenzione al numero di colonne
echo "<td colspan=\"4\" align=\"right\" nowrap class=\"FacetFooterTD\">\n";
echo "<!-- BEGIN Button Insert --><input name=\"confirm_client\" type=\"submit\" value=\"Seleziona\" class=\"FacetButton\"><!-- END Button Insert -->\n";
echo "</td></tr>\n";
}
function savePost($field,$Val)
{
echo "<input type=\"hidden\" name=\"".$field."\" value=\"".$Val."\" >\n";
}
?>