phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4082 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4082 - phpcompta/trunk/include
Date: Sat, 7 May 2011 16:13:59 +0200 (CEST)

Author: danydb
Date: 2011-05-07 16:13:58 +0200 (Sat, 07 May 2011)
New Revision: 4082

Modified:
   phpcompta/trunk/include/class_html_table.php
Log:
add image for asc or desc


Modified: phpcompta/trunk/include/class_html_table.php
===================================================================
--- phpcompta/trunk/include/class_html_table.php        2011-05-06 23:34:59 UTC 
(rev 4081)
+++ phpcompta/trunk/include/class_html_table.php        2011-05-07 14:13:58 UTC 
(rev 4082)
@@ -44,6 +44,10 @@
     for ( $i=0;$i <count($a_col);$i++)
       {
        $content=h($a_col[$i]['name']);
+       if ( isset($a_col[$i]['image']) && $a_col[$i]['image'] != '')
+         {
+           $content=sprintf('<img src="%s" 
border="0"></img>%s',$a_col[$i]['image'],$content);
+         }
        if ( isset($a_col[$i]['link']) )
          {
            $content=sprintf('<a href="%s">%s</a>',
@@ -78,16 +82,18 @@
   static function test_me()
   {
     $cn=new Database(Dossier::id());
-    $order=" order by name ";
+    $order=" order by f_id desc ";
     $url=HtmlInput::get_to_string(array("gDossier","test_select"));
 
     if ( isset($_GET['sb']))
       {
        $order=" order by f_id";
+       $img="image/select1.gif";
       }
     else
       {
        $url=$url."&sb=as";
+       $img="image/select2.gif";
       }
     $sql="select f_id,name,quick_code from vw_client  $order limit 10";
     echo $sql;
@@ -97,7 +103,8 @@
                               array(
                                     array('name'=>'N° de fiche',
                                           'style'=>'text-align:right',
-                                          'link'=>$url),
+                                          'link'=>$url,
+                                          'image'=>$img),
                                     array('name'=>'Nom',
                                           'style'=>'text-align:right'),
                                     array('name'=>'QuickCode')




reply via email to

[Prev in Thread] Current Thread [Next in Thread]