~pieroliste/ocsinventory-ocsreports/trunk

« back to all changes in this revision

Viewing changes to require/function_table_html.php

  • Committer: airoine
  • Date: 2011-11-02 19:38:28 UTC
  • Revision ID: erwan.goalou@gmail.com-20111102193828-cle4ebijatzwe7h9
security fix for snmp communities file
add arch field for softwares

Show diffs side-by-side

added added

removed removed

Lines of Context:
982
982
                $queryDetails.= " order by INET_ATON(".$protectedPost['tri_'.$table_name].") ".$protectedPost['sens_'.$table_name];             
983
983
        }elseif ($tab_options['TRI']['SIGNED'][$protectedPost['tri_'.$table_name]])
984
984
                $queryDetails.= " order by cast(".$protectedPost['tri_'.$table_name]." as signed) ".$protectedPost['sens_'.$table_name];
985
 
        else
 
985
        elseif($tab_options['TRI']['DATE'][$protectedPost['tri_'.$table_name]]){        
 
986
                if(isset($tab_options['ARG_SQL'])){
 
987
                        $queryDetails.=" order by STR_TO_DATE(%s,'%s') %s";
 
988
                        $tab_options['ARG_SQL'][]=$protectedPost['tri_'.$table_name];
 
989
                        $tab_options['ARG_SQL'][]=$tab_options['TRI']['DATE'][$protectedPost['tri_'.$table_name]];
 
990
                        $tab_options['ARG_SQL'][]=$protectedPost['sens_'.$table_name];
 
991
                }else
 
992
                        $queryDetails.= " order by STR_TO_DATE(".$protectedPost['tri_'.$table_name].",'".$tab_options['TRI']['DATE'][$protectedPost['tri_'.$table_name]]."') ".$protectedPost['sens_'.$table_name];     
 
993
                
 
994
        }else
986
995
                $queryDetails.= " order by ".$protectedPost['tri_'.$table_name]." ".$protectedPost['sens_'.$table_name];
987
996
        
988
997
                
1324
1333
                foreach ($sql_data as $i=>$donnees){
1325
1334
 
1326
1335
                        foreach($list_fields as $key=>$value){
 
1336
                                $htmlentities=true;
1327
1337
                                $truelabel=$key;
1328
1338
                        //      p($tab_options);
1329
1339
                                //gestion des as de colonne
1346
1356
                                //si aucune valeur, on affiche un espace
1347
1357
                                if ($donnees[$no_alias_value] == ""){
1348
1358
                                        $value_of_field = "&nbsp";
 
1359
                                        $htmlentities=false;
1349
1360
                                }else //sinon, on affiche la valeur
1350
1361
                                {
1351
1362
                                        $value_of_field=$donnees[$no_alias_value];
1483
1494
                                if (is_array($tab_options) and !$tab_options['SHOW_ONLY'][$key][$value_of_field] and $tab_options['SHOW_ONLY'][$key]){
1484
1495
                                        $key = "NULL";
1485
1496
                                }               
 
1497
                                
 
1498
                                if (isset($tab_options['COLOR'][$key])){
 
1499
                                        $value_of_field="<font color=".$tab_options['COLOR'][$key].">".$value_of_field."</font>";
 
1500
                                        $htmlentities=false;
 
1501
                                }
1486
1502
                                if ($affich == 'OK'){
1487
1503
                                        $lbl_column=array("SUP"=>$l->g(122),
1488
1504
                                                                          "MODIF"=>$l->g(115),
1571
1587
                                                }else{
1572
1588
                                                        $end="";
1573
1589
                                                }
1574
 
                                                
 
1590
                                                if ($htmlentities)
 
1591
                                                        //$value_of_field=htmlentities($value_of_field,ENT_COMPAT,'UTF-8');
 
1592
                                                        $value_of_field=strip_tags($value_of_field,"<p><b><i><font><br>");
 
1593
                                                        
1575
1594
                                                $data[$i][$num_col]=$value_of_field.$end;
1576
1595
                                                
1577
1596
                                        }