phpDocumentor VFront
[ class tree: VFront ] [ index: VFront ] [ all elements ]

Source for file sottomaschera.php

Documentation is available at sottomaschera.php

  1. <?php
  2. /**
  3. * File che genera le sottomaschere.
  4. * Vengono lette le opzioni dai registri di regole e viene generato l'html e il javascript necessario
  5. @package VFront
  6. @author Mario Marcello Verona <marcelloverona@gmail.com>
  7. @copyright 2007 Mario Marcello Verona
  8. @version 0.90
  9. @license http://www.gnu.org/licenses/gpl.html GNU Public License
  10. */
  11.  
  12. require_once("./inc/conn.php");
  13. require_once("./inc/layouts.php");
  14. require_once("./inc/func.comuni.php");
  15. require_once("./inc/func.frontend.php");
  16. require_once("./inc/func.campi_submask.php");
  17. require_once("./inc/func.hash_iframe.php");
  18.  
  19.  
  20.  
  21.  
  22. if(!isset($_VARIABILI)){
  23.     
  24.     include("./inc/func.var_frontend.php");
  25.     var_frontend();
  26. }
  27.  
  28.  
  29. ###############################################################
  30. #
  31. #    INFO GENERALI SOTTOMASCHERA
  32. #
  33.  
  34. $sql_info_sub="SELECT * 
  35.                 FROM ".$db1['frontend'].".registro_submask 
  36.                 WHERE id_submask=".intval($_GET['id_submask']);
  37.  
  38. $q_info_sub=vmsql_query($sql_info_sub,$link);
  39.  
  40. $info_sub vmsql_fetch_assoc($q_info_sub);
  41.  
  42.  $SM_INSERT ($info_sub['sub_insert']=='1'true:false;
  43.  $SM_UPDATE ($info_sub['sub_update']=='1'true:false;
  44.  $SM_DELETE ($info_sub['sub_delete']=='1'true:false;
  45.  $MAX_RECORD_SUB ($info_sub['max_records']>0$info_sub['max_records']:5;
  46.  $SM_TIPO_VISTA $info_sub['tipo_vista'];
  47.  
  48.  
  49.  
  50.  
  51.  
  52.     
  53.  
  54.  
  55.  
  56.  
  57.  
  58. ###############################################################
  59. #
  60. #    INFO COLONNE SOTTOMASCHERA
  61. #
  62. #
  63.  
  64. $sql_info_campi_sub "SELECT * 
  65.                         FROM ".$db1['frontend'].".registro_submask_col 
  66.                         WHERE id_submask=".intval($_GET['id_submask'])."
  67.                         ORDER BY ordinal_position
  68.                         ";
  69.  
  70.  
  71. $q_info_campi_sub vmsql_query($sql_info_campi_sub,$link)
  72.  
  73. $info_campi_sub vmsql_fetch_assoc_all($q_info_campi_sub);
  74.  
  75.  
  76. $CAMPI_TENDINE=array();
  77.  
  78.  
  79. // CERCA LE TENDINE:
  80. for($i=0;$i<count($info_campi_sub);$i++){
  81.     
  82.     if($info_campi_sub[$i]['in_tipo']=='select_from'){
  83.         
  84.         $CAMPI_TENDINE[]=     $info_campi_sub[$i]['column_name'];
  85.     }
  86. }
  87.  
  88.  
  89. // NOME della sottomaschera
  90. $nome_sub (trim($info_sub['nome_frontend'])!=""$info_sub['nome_frontend'$info_sub['nome_tabella'];
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99. ###############################################################
  100. #
  101. #    CHIAVI PRIMARIE SOTTOMASCHERA
  102. #     si assume che ci siano due chiavi primarie, 
  103. #    una riferita al valore della tabella esterna qui considerato come indipendente, 
  104. #    l'altra (chiave) riferita al valore della tabella esterna dipendente
  105. #    Serve per preservare in caso di modifica il riferimento al record.
  106.  
  107.     /*$PKS = prendi_all_PK_submask_oid(intval($_GET['id_submask']));
  108.     $array_PK_dipendente = $PKS;
  109. */
  110.     /*// cerca la chiave riferita alla tabella indipendente
  111.     $K_PK_tab_indipendente = array_search($info_sub['campo_pk_parent'],$array_PK_dipendente);
  112.     
  113.     $PK_tab_indipendente=$array_PK_dipendente[$K_PK_tab_indipendente];*/
  114.     
  115.     // Cerca in tutti i campi quello definito come "parent_ref"
  116.     
  117.     
  118.     $CAMPO_PARENT_REF='';
  119.     for($k=0;$k<count($info_campi_sub);$k++){
  120.         
  121.         if($info_campi_sub[$k]['in_tipo']=='parent_ref'){
  122.             $CAMPO_PARENT_REF=$info_campi_sub[$k]['column_name'];
  123.         }
  124.         
  125.     }
  126.     
  127.     if($CAMPO_PARENT_REF==''){
  128.         openErrorGenerico('Errore nelle impostazioni della sottomaschera',false,'Non sembra essere definito il riferimento alla chiave esterna. Verificare le impostazioni.');
  129.     }
  130.     else{
  131.         $PK_tab_indipendente=$CAMPO_PARENT_REF;
  132.     }
  133.  
  134.     
  135.     /*
  136.     // togli la variabile indipendente
  137.     unset($array_PK_dipendente[$K_PK_tab_indipendente]);
  138.     
  139.     // resta (su 2 assunte) la PK dipendente
  140.     list($PK_tab_dipendente)=array_values($array_PK_dipendente);*/
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158. // Campi da prendere
  159.  
  160. for($i=0;$i<count($info_campi_sub);$i++){
  161.     
  162.     if($info_campi_sub[$i]['in_visibile']=='1' && $info_campi_sub[$i]['column_name']!=$info_sub['campo_fk_sub']){
  163.  
  164.         
  165.         $campi[$info_campi_sub[$i]['column_name'];
  166.         $info_campo_mostrare[$info_campi_sub[$i];
  167.     
  168.     }
  169.     elseif($info_campi_sub[$i]['in_tipo']=='parent_ref'){
  170.         
  171.         $CAMPO_REF_PARENT $info_campi_sub[$i]['in_default'];
  172.         
  173.         
  174.     }
  175. }
  176.  
  177.  
  178.  
  179. ###############################################################
  180. #
  181. #    ETICHETTA RECORD
  182. #
  183. #
  184.  
  185. $ETICHETTA "";
  186.  
  187. if(isset($CAMPO_REF_PARENT)){
  188.  
  189. $sql_ETICHETTA "SELECT parent.$CAMPO_REF_PARENT 
  190.           FROM ".$info_sub['nome_tabella']." AS child
  191.           RIGHT JOIN ".oid2name($info_sub['id_table'])." AS parent ON parent.".$info_sub['campo_pk_parent']."=child.".$info_sub['campo_fk_sub'].
  192.           WHERE parent.".$info_sub['campo_pk_parent']."='".addslashes(stripslashes($_GET['pk']))."'
  193.           LIMIT 1";
  194.  
  195.     rpc_debug($sql_ETICHETTA);
  196.  
  197.     $q_ETICHETTA vmsql_query($sql_ETICHETTA,$link);
  198.     
  199.     if(vmsql_num_rows($q_ETICHETTA)==1){
  200.         
  201.         list($ETICHETTAvmsql_fetch_row($q_ETICHETTA);
  202.     }
  203.     else $ETICHETTA "<em>Dato non disponiblile</em>";
  204.     
  205.     
  206.  
  207. }
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. ###############################################################
  227. #
  228. #    SQL PER PRENDERE I DATI
  229. #
  230. #
  231.  
  232. $n_campi count($campi);
  233.  
  234. if($n_campi==0){
  235.     
  236.     openErrorGenerico("Errore nell'impostazione della sottomaschera",false);
  237.     exit;
  238. }
  239.  
  240.  $sql_dati "SELECT ".implode(",",$campi)." FROM ".$info_sub['nome_tabella']."
  241.           WHERE ".$info_sub['campo_fk_sub']."='".addslashes(stripslashes($_GET['pk']))."'
  242.           ORDER BY ".$info_sub['orderby_sub']." ".$info_sub['orderby_sub_sort'];
  243. /*
  244.  $sql_chiavi = "SELECT ".$PK_tab_dipendente." FROM ".$info_sub['nome_tabella']."
  245.           WHERE ".$info_sub['campo_fk_sub']."='".intval($_GET['pk'])."'
  246.           ORDER BY ".$info_sub['orderby_sub']." ".$info_sub['orderby_sub_sort'];*/
  247. rpc_debug($sql_dati);
  248.  
  249.  
  250. if(vmsql_try($sql_dati,$link)){
  251.     
  252.     // PRENDO I DATI
  253.     
  254.     $q_dati vmsql_query($sql_dati,$link);
  255.     
  256.     $n_dati vmsql_num_rows($q_dati);
  257.     
  258.     if($n_dati>0){
  259.         
  260.         $dati_sub vmsql_fetch_row_all($q_dati);    
  261.     }
  262.     
  263. }
  264. else{
  265.     
  266.     openErrorGenerico("Errore nella impostazione della sottomaschera",false);
  267.     exit;
  268. }    
  269.  
  270. /*
  271. if(vmsql_try($sql_chiavi,$link)){
  272.     
  273.     // PRENDO I VALORI DELLE CHIAVI primaerie dipendenti
  274.     
  275.     $q_chiavi = vmsql_query($sql_chiavi,$link);
  276.     
  277.     $n_chiavi = vmsql_num_rows($q_chiavi);
  278.     
  279.     if($n_dati>0){
  280.         
  281.         list($dati_chiavi_sub) = vmsql_fetch_row_all($q_chiavi,true);    
  282.     }
  283.     
  284. }*/
  285.  
  286.  
  287.  
  288. // SPERIMENTALE.
  289.  
  290. // PRENDO TUTTI i dati per tutti i record per metterli in un campo nascosto, magari serializzati?
  291.  
  292.  
  293. $sql_all_data ="SELECT * FROM ".$info_sub['nome_tabella']."
  294.           WHERE ".$info_sub['campo_fk_sub']."='".intval($_GET['pk'])."'
  295.           ORDER BY ".$info_sub['orderby_sub']." ".$info_sub['orderby_sub_sort'];
  296.  
  297.  
  298. // PRENDO TUTTI I DATI
  299.     
  300.     $q_all_dati vmsql_query($sql_all_data,$link);
  301.     
  302.     $n_all_dati vmsql_num_rows($q_all_dati);
  303.     
  304.     if($n_all_dati>0){
  305.         
  306.         $dati_all_sub vmsql_fetch_assoc_all($q_all_dati);    
  307.     }
  308.     
  309. /*else{
  310.     
  311.     openErrorGenerico("Errore nella impostazione della sottomaschera: Numero di campi attesi per la chiave primaria incongruente (attesi 2 campi)",false);
  312.     exit;
  313. }*/
  314.  
  315.  
  316.  
  317.  
  318.  
  319. #############################################################################################################
  320. #
  321. #    INIZIO A SCRIVERE
  322. #
  323. #
  324.  
  325. $files=array("js/scriptaculous/lib/prototype.js",'js/sottomaschera.js');
  326.  
  327. $carica_calendario=true;
  328.  
  329.     // SE ci sono campi data , datetime o timestamp, prendi il calendario
  330.     if($carica_calendario){
  331.         $files[]="js/jscalendar/calendar.js";
  332.         $files[]="js/jscalendar/lang/calendar-it.js";
  333.         $files[]="js/jscalendar/calendar-setup.js";
  334.         $files[]="sty/jscalendar/calendar-win2k-cold-1.css";
  335.     }
  336.  
  337. $INIZIO_LAYOUT openLayout1("Sottomaschera ".$nome_sub,$files,'sottomaschera');
  338.  
  339. echo str_replace("<body>","<body onload=\"self.focus();\">",$INIZIO_LAYOUT);   unset($INIZIO_LAYOUT);
  340.  
  341.  $js_manuale "
  342.     <script type=\"text/javascript\">
  343.  
  344.         var n_righe=$n_dati;
  345.         var max_righe=$MAX_RECORD_SUB;
  346.         var modifiche_attive=false;
  347.         var eliminazione_attiva=false;
  348.         var oid_parent={$_GET['oid_parent']};
  349.         var id_submask={$_GET['id_submask']};
  350.         var pk_parent='{$_GET['pk']}';
  351.         var campo_pk_indipendente = '$PK_tab_indipendente';
  352.         ".//var campo_pk_dipendente = '$PK_tab_dipendente';
  353.         "var nome_tabella='".$info_sub['nome_tabella']."';
  354.         var righe_modnew Array();
  355.         var tipo_vista= '$SM_TIPO_VISTA';
  356.         var campi_iframenew Array('".implode("','",$CAMPI_TENDINE)."');
  357.         
  358.         
  359.         ";
  360.  
  361.  $sotto_array_js="";
  362.  
  363.  for($i=0;$i<$MAX_RECORD_SUB;$i++){
  364.      
  365.      $js_manuale.="var a$i = new Array(); ";
  366.      
  367.      $sotto_array_js.= "a$i,";
  368.      
  369. }
  370.  
  371. $sotto_array_js=substr($sotto_array_js,0,-1);
  372.  
  373. $js_manuale.="
  374.  
  375.     var campi_mod= new Array();
  376.     var valori_del = new Array();
  377.     
  378.     
  379.     
  380.     </script>\n";
  381.  
  382. echo $js_manuale;
  383.  
  384. echo "<h1><span class=\"var\">".ucfirst($nome_sub)."</span> - sottomaschera di <span class=\"var\">".oid2name($info_sub['id_table'])."</span></h1>";
  385.  
  386.  
  387. // Spazio per i feedback
  388. echo "
  389.     <div id=\"feedback\">
  390.         <span id=\"risposta\"></span>
  391.     </div>
  392. ";
  393.  
  394.     if($SM_INSERT || $SM_UPDATE){
  395.         
  396.         echo "<div id=\"pulsanti-azioni\">\n";
  397.     }
  398.  
  399. // SE NON CI SONO DATI:
  400.  
  401.     if($SM_INSERT)
  402.         echo "<input title=\"Nuovo record\" type=\"button\" id=\"p_insert\" name=\"insert\" value=\" Nuovo record \" onclick=\"nuovo_record();\" accesskey=\"n\" />\n";
  403.     }
  404.     else echo "<input type=\"hidden\" id=\"p_insert\" />\n"
  405.         
  406.     if($SM_INSERT || $SM_UPDATE)
  407.          echo "<input disabled=\"disabled\" title=\"Annulla\" type=\"button\" id=\"p_annulla\" name=\"annulla\" value=\" Annulla \" onclick=\"annulla();\" accesskey=\"a\" />\n";
  408.     
  409.     else echo "<input type=\"hidden\" id=\"p_annulla\" />\n";
  410.         
  411.     if($SM_INSERT || $SM_UPDATE)
  412.         echo "<input disabled=\"disabled\"  title=\"Salva i record\" type=\"button\" id=\"p_save\" name=\"save\" value=\" Salva \" onclick=\"salva(nome_tabella);\" accesskey=\"s\" />\n";
  413.     
  414.     else echo "<input type=\"hidden\" id=\"p_save\" />\n";
  415.     
  416.     
  417.     //echo " <input type=\"button\" title=\"DEBUG Var\" name=\"DEBUG Var\" value=\" DEBUG Var \" onclick=\"debug_var();\" />\n";
  418.     
  419.     echo " <input type=\"button\" title=\"Chiudi la finestra\" name=\"Chiudi\" value=\" Chiudi \" onclick=\"if(modifiche_attive || eliminazione_attiva){if(confirm('Ci sono operazioni in sospeso, si vuole comunque chiudere la finestra senza salvare le modifiche?')){self.close();}}else{self.close();}\" />\n";
  420.     
  421.  
  422.     if($SM_INSERT || $SM_UPDATE){
  423.         
  424.         echo "</div>\n";
  425.     }
  426.         
  427.  
  428.     
  429.     
  430.     
  431.     echo "<div class=\"etichetta-record\">".utf8_encode($ETICHETTA)." <span style=\"color:#000\">(<span id=\"numero_record\">$n_dati</spanrecord)</span></div>\n";
  432.     
  433.     
  434.  
  435.     
  436.     
  437.  
  438.  
  439.  
  440.     ######################################################################################################################
  441.     #
  442.     #
  443.     #    OPZIONE VISTA TABELLA
  444.     #
  445.     #
  446.  
  447.     if($SM_TIPO_VISTA=='tabella'){
  448.  
  449.         // crea le celle di tabella
  450.  
  451.         $RIGA="";
  452.  
  453.         $TR_TH "\t\t<tr>\n";
  454.  
  455.  
  456.         $TRIGGER_ASSEGNAZIONE="";
  457.  
  458.  
  459.  
  460.  
  461.  
  462.         if($n_dati>0){
  463.  
  464.  
  465.             //    for($i=0;$i<$MAX_RECORD_SUB;$i++){
  466.             for($i=0;$i<$n_dati;$i++){
  467.  
  468.  
  469.                 $RIGA.="<tr id=\"riga_$i\" style=\"display:none;\">";
  470.  
  471.                 for($j=0;$j<$n_campi;$j++){
  472.  
  473.                     if($i==0{
  474.                         if($SM_UPDATE && $SM_DELETE &&  $j==0$TR_TH.="<th class=\"nocolor-r\">&nbsp;</th>";
  475.                         elseif($SM_UPDATE && $j==0$TR_TH.="<th class=\"nocolor\">&nbsp;</th>";
  476.                         if($SM_DELETE && $j==0$TR_TH.="<th class=\"nocolor\">&nbsp;</th>";
  477.  
  478.                         $TR_TH.="<th>".$campi[$j]."</th>";
  479.                     }
  480.  
  481.                     //                $chiave_record = (isset($dati_chiavi_sub[$i])) ? $dati_chiavi_sub[$i] : "n".$i;
  482.                     $chiave_record ($n_all_dati>=$i$i "n".$i;
  483.  
  484.                     if($SM_UPDATE && $j==0)    $RIGA.="<th class=\"sm-update\"> <a href=\"javascript:;\" onclick=\"modifica($i);\">modifica</a> </th>";
  485.  
  486.                     if($SM_DELETE && $j==0)    $RIGA.="<th class=\"sm-delete\"> <a href=\"javascript:;\" onclick=\"elimina($i);\">elimina</a> </th>";
  487.  
  488.                     $dato_ins (isset($dati_sub[$i][$j])) $dati_sub[$i][$j"";
  489.  
  490.                     $RIGA.=tipo_campo_submask($chiave_record,$dato_ins,$info_campo_mostrare[$j]);
  491.  
  492.  
  493.                     // TRIGGER ASSEGNAZIONE VALORI
  494.  
  495.                 }
  496.  
  497.                 $dati_serializzati (isset($dati_all_sub[$i])) base64_encode(serialize($dati_all_sub[$i])) "";
  498.  
  499.                 $RIGA.="<td style=\"display:none;\"><div id=\"value_riga_$i\">".$dati_serializzati."</div></td>";
  500.  
  501.  
  502.                 $RIGA.="</tr>";
  503.  
  504.             }
  505.         }
  506.         else{
  507.  
  508.  
  509.             $RIGA.="\t\t<tr id=\"riga_x\" style=\"display:none;\">\n";
  510.  
  511.             for($j=0;$j<$n_campi;$j++){
  512.  
  513.                 $TR_TH.="\t\t\t<th>".$campi[$j]."</th>\n";
  514.  
  515.                 $chiave_record "x";
  516.  
  517.                 $dato_ins (isset($dati_sub[$i][$j])) $dati_sub[$i][$j"";
  518.  
  519.                 $RIGA.=tipo_campo_submask($chiave_record,$dato_ins,$info_campo_mostrare[$j]);
  520.  
  521.  
  522.             }
  523.  
  524.             $RIGA.="</tr>\n";
  525.  
  526.         }
  527.  
  528.         $TR_TH .= "\t\t</tr>\n";
  529.  
  530.  
  531.         $TABLE "<table id=\"table-submask\" border=\"0\" summary=\"dati sottomaschera\">\n<tbody>\n";
  532.  
  533.         $TABLE.= $TR_TH;
  534.  
  535.         $TABLE.= $RIGA;
  536.  
  537.         $TABLE.="</tbody></table>\n\n";
  538.  
  539.  
  540.  
  541.     }    
  542.     
  543.     ######################################################################################################################
  544.     #
  545.     #
  546.     #    OPZIONE VISTA SCHEDE
  547.     #
  548.     #
  549.     else{
  550.         
  551.         
  552.         $DIVR="";
  553.         
  554.         if($n_dati>0){
  555.  
  556.  
  557.             //    for($i=0;$i<$MAX_RECORD_SUB;$i++){
  558.             for($i=0;$i<$n_dati;$i++){
  559.  
  560.  
  561.                 $DIVR.="<div id=\"riga_$i\" style=\"display:none;\" class=\"entry-record\">";
  562.                 
  563.                 $chiave_record ($n_all_dati>=$i$i "n".$i;
  564.  
  565.                 $controlli="";
  566.                 
  567.                     if($SM_UPDATE)    $controlli.="<a href=\"javascript:;\" onclick=\"modifica($i);\">modifica</a>";
  568.                     if($SM_UPDATE && $SM_DELETE$controlli.=" - ";
  569.                     if($SM_DELETE)    $controlli.="<a href=\"javascript:;\" onclick=\"elimina($i);\">elimina</a>";
  570.  
  571.                     if($SM_UPDATE || $SM_DELETE$DIVR.="<span class=\"controlli\">$controlli</span>\n";
  572.                 
  573.                 $DIVR.="<table summary=\"tabella di formattazione record\" border=\"0\" class=\"tab-format\">";
  574.  
  575.                 for($j=0;$j<$n_campi;$j++){
  576.  
  577.                     /*if($i==0) {
  578.                         if($SM_UPDATE && $SM_DELETE &&  $j==0) $TR_TH.="<th class=\"nocolor-r\">&nbsp;</th>";
  579.                         elseif($SM_UPDATE && $j==0) $TR_TH.="<th class=\"nocolor\">&nbsp;</th>";
  580.                         if($SM_DELETE && $j==0) $TR_TH.="<th class=\"nocolor\">&nbsp;</th>";
  581.  
  582.                         $TR_TH.="<th>".$campi[$j]."</th>";
  583.                     }*/
  584.  
  585.                     
  586.                     $dato_ins (isset($dati_sub[$i][$j])) $dati_sub[$i][$j"";
  587.  
  588.                     
  589.                     
  590.                     
  591.                     $DIVR.="<tr>";
  592.                     $DIVR.= ($j==0"<td class=\"numerone\" rowspan=\"$n_campi\">"($i+1."</td>" "";
  593.                     
  594.                     
  595.                     $DIVR.= ($info_campo_mostrare[$j]['in_tipo']=='hidden'"" "<td class=\"label\">".$campi[$j]."</td>";
  596.                     
  597.                     $DIVR.= tipo_campo_submask($chiave_record,$dato_ins,$info_campo_mostrare[$j]);
  598.                     
  599.                     
  600.                     
  601.                     $DIVR.="</tr>";
  602.  
  603.                     // TRIGGER ASSEGNAZIONE VALORI
  604.  
  605.                 }
  606.  
  607.                 $dati_serializzati (isset($dati_all_sub[$i])) base64_encode(serialize($dati_all_sub[$i])) "";
  608.  
  609.                 $DIVR.="<div id=\"value_riga_$i\" style=\"display:none;\">".$dati_serializzati."</div>";
  610.  
  611.             
  612.                 $DIVR.="</table>";
  613.                 $DIVR.="</div>";
  614.  
  615.             }
  616.         }
  617.         else{
  618.  
  619.  
  620.             $DIVR.="\t\t<div id=\"riga_x\" style=\"display:none;\" class=\"entry-record\">\n";
  621.             $DIVR.="<table summary=\"tabella di formattazione record\" border=\"0\">";
  622.  
  623.             for($j=0;$j<$n_campi;$j++){
  624.  
  625. //                $TR_TH.="\t\t\t<th>".$campi[$j]."</th>\n";
  626.  
  627.                 $chiave_record "x";
  628.  
  629.                 $dato_ins (isset($dati_sub[$i][$j])) $dati_sub[$i][$j"";
  630.  
  631.                 $DIVR.="<tr>";
  632.                 $DIVR.= ($j==0"<td class=\"numerone\" rowspan=\"$n_campi\">0</td>"";                
  633.                 $DIVR.="<td class=\"label\">".$campi[$j]."</td>".tipo_campo_submask($chiave_record,$dato_ins,$info_campo_mostrare[$j]);
  634.                 $DIVR.="</tr>";
  635.  
  636.             }
  637.  
  638.             $DIVR.="</table>\n";
  639.             $DIVR.="</div>\n";
  640.  
  641.         }
  642.         
  643.         
  644.         
  645.         
  646.     }
  647.  
  648.  
  649.  
  650.     echo "<script type=\"text/javascript\">
  651.         function trigger_assegnazione(){
  652.         
  653.         try{
  654.             $TRIGGER_ASSEGNAZIONE
  655.         }
  656.         catch(e){        }
  657.         }
  658.         
  659.         
  660.         
  661.         
  662.         </script>\n";
  663.     
  664.  
  665.  
  666. echo ($SM_TIPO_VISTA=='tabella'$TABLE:$DIVR;
  667.  
  668.  
  669. echo "<script type=\"text/javascript\">
  670.  
  671.         for(j=0;j<$MAX_RECORD_SUB;j++){
  672.         
  673.             if(j<n_righe){
  674.                 id_riga_considerata = 'riga_'+j;
  675.                 document.getElementById(id_riga_considerata).style.display='';
  676.             }
  677.         }
  678. </script>\n";
  679.  
  680. echo closeLayout1();
  681.  
  682. ?>

Documentation generated on Sat, 22 Sep 2007 11:51:20 +0200 by phpDocumentor 1.4.0a2