[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 //==================================================================================== 3 // OCS INVENTORY REPORTS 4 // Copyleft Pierre LEMMET 2005 5 // Web: http://ocsinventory.sourceforge.net 6 // 7 // This code is open source and may be copied and modified as long as the source 8 // code is always made freely available. 9 // Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt 10 //==================================================================================== 11 //Modified on 11/29/2005 12 13 include ('req.class.php'); 14 //GEND 15 $user=$_SESSION["loggeduser"]; 16 $mesMachines="a.".TAG_NAME." IN (SELECT DISTINCT(cm.code) FROM ocsweb.codeunite cm WHERE cm.login='$user')"; 17 18 if($_SESSION["lvluser"]==SADMIN||$_SESSION["lvluser"]==LADMIN) 19 { 20 $mesMachines=""; 21 } 22 //FGEND 23 /**********************************************/ 24 $lbl=$l->g(2); //Nom de la requete 25 $sql = $mesMachines; 26 $whereId = "h.id"; 27 $linkId = "h.id"; 28 $select = array_merge( array("h.id"=>"h.id" ,"deviceid"=>"deviceid"), $_SESSION["currentFieldList"] ); 29 $selectPrelim = array( "h.id"=>"h.id" ); 30 $from = "hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id LEFT JOIN bios b ON b.hardware_id=h.id"; 31 $fromPrelim = ""; 32 $group = ""; 33 $order = ""; 34 $countId = "h.id"; 35 $pics = array("ttmachines.png", "ttmachines_a.png"); 36 $req=new Req($lbl,$whereId,$linkId,$sql,$select,$selectPrelim,$from,$fromPrelim,$group,$order,$countId,$pics,true); // Instanciation du nouvel objet de type "Req" 37 $requetes[]=$req; // On l'ajoute au tableau $requetes contenant toutes les requêtes de l'application' 38 /**********************************************/ 39 40 /**********************************************/ 41 $lbl=$l->g(182); //Nom de la requete 42 43 // Commande SQL de la requete 44 $lblChmp[0]=TAG_LBL; // Nom du parametre 1 45 $sqlChmp[0]="SELECT a.".TAG_NAME." FROM hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id GROUP BY a.".TAG_NAME.""; 46 $typChmp[0]="FREE"; 47 48 $sql = "a.".TAG_NAME." = 'option0'"; 49 if( $mesMachines != "" ) $sql .= " AND "; 50 $sql .= $mesMachines; 51 $whereId = "h.id"; 52 $linkId = "h.id"; 53 $select = array_merge( array("h.id"=>"h.id"), $_SESSION["currentFieldList"] ); 54 $selectPrelim = array( "h.id"=>"h.id" ); 55 $from = "hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id LEFT JOIN bios b ON b.hardware_id=h.id"; 56 $fromPrelim = ""; 57 $group = ""; 58 $order = ""; 59 $countId = "h.id"; 60 $pics = array("rien.png", "rien.png"); 61 $req=new Req($lbl,$whereId,$linkId,$sql,$select,$selectPrelim,$from,$fromPrelim,$group,$order,$countId,$pics,true,$lblChmp,$sqlChmp,$typChmp); // Instanciation du nouvel objet de type "Req" 62 $requetes[]=$req; // On l'ajoute au tableau $requetes contenant toutes les requêtes de l'application' 63 /**********************************************/ 64 65 /**********************************************/ 66 $lbl=$l->g(178); 67 68 $sql = $mesMachines; 69 $whereId = "a.".TAG_NAME; 70 $linkId = TAG_LBL; 71 $select = array ( "a.".TAG_NAME=>TAG_LBL, "COUNT(h.id)"=>$l->g(28) ); 72 $selectPrelim = array( "a.".TAG_NAME=>TAG_LBL,"COUNT(h.id)"=>$l->g(28) ); 73 $from = "hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id"; 74 $fromPrelim = ""; 75 $group = "a.".TAG_NAME; 76 $order = "\"".$l->g(28)."\" DESC"; 77 $countId = "a.".TAG_NAME; 78 $pics = array("repartition.png", "repartition_a.png"); 79 $req=new Req($lbl,$whereId,$linkId,$sql,$select,$selectPrelim, $from,$fromPrelim,$group,$order,$countId,$pics); 80 $requetes[]=$req; 81 /**********************************************/ 82 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |