phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.nextmatchs.inc.php,1.50,1.51


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.nextmatchs.inc.php,1.50,1.51
Date: Wed, 25 Sep 2002 23:57:31 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv22237

Modified Files:
        class.nextmatchs.inc.php 
Log Message:
added xsl function

Index: class.nextmatchs.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.nextmatchs.inc.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** class.nextmatchs.inc.php    30 Apr 2002 03:35:52 -0000      1.50
--- class.nextmatchs.inc.php    26 Sep 2002 03:57:29 -0000      1.51
***************
*** 598,601 ****
--- 598,650 ----
                } /* filter() */
  
+ 
+               function xslt_filter($data=0)
+               {
+                       if(is_array($data))
+                       {
+                               $filter = 
(isset($data['filter'])?$data['filter']:'');
+                               $yours  = 
(isset($data['yours'])?$data['yours']:'');
+                       }
+                       else
+                       {
+                               $filter = get_var('filter',Array('GET','POST'));
+                       }
+ 
+                       $filter_obj = array
+                       (
+                               array
+                               (
+                                       'key' => 'none',
+                                       'lang' => lang('show all')
+                               ),
+                               array
+                               (
+                                       'key'   => 'yours',
+                                       'lang'  => lang('only yours')
+                               ),
+                               array
+                               (
+                                       'key'   => 'private',
+                                       'lang'  => lang('private')
+                               )
+                       );
+ 
+                       if(is_array($filter_obj))
+                       {
+                               for($i=0;$i<count($filter_obj);$i++)
+                               {
+                                       if($filter_obj[$i]['key'] == $filter)
+                                       {
+                                               $filter_obj[$i]['selected'] = 
'yes';
+                                       }
+                                       if (!$yours && $filter_obj[$i]['key'] 
== 'yours')
+                                       {
+                                               unset($filter_obj[$i]);
+                                       }
+                               }
+                       }
+                       return $filter_obj;
+               }
+ 
                /*!
                @function alternate_row_color





reply via email to

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