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

Source for file rpc.subcount.php

Documentation is available at rpc.subcount.php

  1. <?php
  2. /**
  3. * File di conteggio dei record nelle sottomaschere.
  4. * Questo file è richiamato dal file {@link scheda.php}.
  5. * Il numero di record presenti nelle sottomaschere viene dinamicamente caricato nel nome delle sottomaschere, tra parentesi.
  6. @package VFront
  7. @subpackage RPC
  8. @author Mario Marcello Verona <marcelloverona@gmail.com>
  9. @copyright 2007 Mario Marcello Verona
  10. @version 0.90
  11. @license http://www.gnu.org/licenses/gpl.html GNU Public License
  12. */
  13.  
  14.  
  15. require("./inc/conn.php");
  16. require("./inc/func.comuni.php");
  17. require("./inc/func.frontend.php");
  18.  
  19.  
  20.  
  21. $sottomaschere explode("|",$_GET['subs']);
  22.  
  23. $id_table=name2oid($_GET['action'],$_SESSION['gid']);
  24. $_K prendi_K_relazione_sub($id_table);
  25.  
  26. for($i=0;$i<count($sottomaschere);$i++){
  27.     
  28.     if(is_tabella($sottomaschere[$i])){
  29.         
  30.         $PK=prendi_PK($_GET['action']);
  31.         
  32.         
  33.         /*$sql="SELECT count(*) FROM ".$sottomaschere[$i]." sub, ".$_GET['action']." t
  34.             WHERE t.$PK = sub.$PK
  35.             AND t.$PK=".addslashes(stripslashes($_GET['id']));*/
  36.         
  37.         
  38.         
  39.         //print_r($_K);
  40.         
  41.         $sql="SELECT count(*) FROM ".$sottomaschere[$i]." sub, ".$_GET['action']." t
  42.             WHERE t.{$_K[$i][0]} = sub.{$_K[$i][1]}
  43.             AND t.$PK=".addslashes(stripslashes($_GET['id']));
  44.         
  45.         $q=vmsql_query($sql,$link);
  46.         list($out)vmsql_fetch_row($q);
  47.         $out_num.= (int) $out.",";
  48.     }
  49.     
  50.     
  51. }
  52.  
  53. echo substr($out_num,0,-1);
  54.  
  55.  
  56. ?>

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