phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uicustom.inc.php, 1.10 class.uiagr


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.uicustom.inc.php, 1.10 class.uiagreement.inc.php, 1.16 class.bocommon.inc.php, 1.18 class.uientity.inc.php, 1.15 class.excel.inc.php, 1.5 class.uiworkorder.inc.php, 1.16 class.uitts.inc.php, 1.24 class.uis_agreement.inc.php, 1.22 class.uiproject.inc.php, 1.22 class.uilocation.inc.php, 1.16
Date: Wed, 9 Nov 2005 23:49:00 +0100

Update of property/inc

Modified Files:
     Branch: MAIN
            class.uicustom.inc.php lines: +5 -47
            class.uiagreement.inc.php lines: +2 -2
            class.bocommon.inc.php lines: +14 -20
            class.uientity.inc.php lines: +14 -19
            class.excel.inc.php lines: +9 -222
            class.uiworkorder.inc.php lines: +5 -53
            class.uitts.inc.php lines: +1 -3
            class.uis_agreement.inc.php lines: +2 -2
            class.uiproject.inc.php lines: +2 -49
            class.uilocation.inc.php lines: +2 -51

Log Message:
no message

====================================================
Index: property/inc/class.uicustom.inc.php
diff -u property/inc/class.uicustom.inc.php:1.9 
property/inc/class.uicustom.inc.php:1.10
--- property/inc/class.uicustom.inc.php:1.9     Wed Aug 10 19:39:43 2005
+++ property/inc/class.uicustom.inc.php Wed Nov  9 22:49:12 2005
@@ -553,57 +553,15 @@

                function excel()
                {
-                       $GLOBALS['phpgw_info']['flags'][noheader] = True;
-                       $GLOBALS['phpgw_info']['flags'][nofooter] = True;
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = False;
-                       require('PEAR.php');
-                       $xls            = 
CreateObject($this->currentapp.'.excel');
-
                        $custom_id              = 
get_var('custom_id',array('POST','GET'));
-
                        $list= $this->bo->read_custom($custom_id,$allrows=True);
                        $uicols = $this->bo->uicols;
-
-                       $uicols = $this->bo->uicols;
-                       $count_uicols=count($uicols);
-
-                       $j=0;
-                       if (isset($list) AND is_array($list))
+                       foreach($uicols as $col)
                        {
-                               $str=$xls->Begin();
-                               foreach($list as $entry)
-                               {
-                                       $m=0;
-                                       for ($k=0;$k<$count_uicols;$k++)
-                                       {
-                                               $content[$j][$m]        = 
$entry[$uicols[$k]['name']];
-                                               
$str.=$xls->WriteLabel(0,$m,$uicols[$k]['descr']);
-                                               $m++;
-                                       }
-
-                                       $j++;
-                               }
-
-                               foreach($content as $row)
-                               {
-                                       $line++;
-                                       for ($i=0; $i<count($row); $i++)
-                                       {
-                                               
$str.=$xls->WriteLabel($line,$i,$row[$i]);
-                                       }
-                               }
-
-                          $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
-
-                               $str.=$xls->EOF();
-                               $size=strlen($str);
-
-                               $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,'application/vnd.ms-excel',$size);
-
-                               echo $str;
+                               $names[] = $col['name'];
+                               $descr[] = $col['descr'];
                        }
-
+                       $this->bocommon->excel($list,$names,$descr);
                }
        }
 ?>

====================================================
Index: property/inc/class.uiagreement.inc.php
diff -u property/inc/class.uiagreement.inc.php:1.15 
property/inc/class.uiagreement.inc.php:1.16
--- property/inc/class.uiagreement.inc.php:1.15 Tue Nov  8 22:39:10 2005
+++ property/inc/class.uiagreement.inc.php      Wed Nov  9 22:49:12 2005
@@ -1064,7 +1064,7 @@
                        $id     = get_var('id',array('POST','GET'));
                        $list = $this->bo->read_details($id);
                        $uicols         = $this->bo->uicols;
-                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr']);
+                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
                }

                function edit_item()

====================================================
Index: property/inc/class.bocommon.inc.php
diff -u property/inc/class.bocommon.inc.php:1.17 
property/inc/class.bocommon.inc.php:1.18
--- property/inc/class.bocommon.inc.php:1.17    Tue Nov  8 15:19:36 2005
+++ property/inc/class.bocommon.inc.php Wed Nov  9 22:49:12 2005
@@ -98,7 +98,7 @@
                                $this->dateformat               = "Y-m-d";
                                $this->datetimeformat   = "Y-m-d G:i:s";
                        }
-
+

                        if(!$GLOBALS['phpgw_info']['flags']['css'])
                        {
@@ -1287,34 +1287,37 @@
                }


-               function excel($list,$name,$descr)
+               function excel($list,$name,$descr,$input_type='')
                {
                        $GLOBALS['phpgw_info']['flags'][noheader] = True;
                        $GLOBALS['phpgw_info']['flags'][nofooter] = True;
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = False;

-                       require('PEAR.php');
-                       $xls            = 
CreateObject($this->currentapp.'.excel');
+                       $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
+
+                       $workbook       = 
CreateObject($this->currentapp.'.excel',"-");
+                       $browser = CreateObject('phpgwapi.browser');
+                       
$browser->content_header($filename,'application/vnd.ms-excel');

                        $count_uicols_name=count($name);

+                       $worksheet1 =& $workbook->add_worksheet('First One');
+
                        $j=0;
                        if (isset($list) AND is_array($list))
                        {
-                               $str=$xls->Begin();
                                foreach($list as $entry)
                                {
                                        $m=0;
                                        for ($k=0;$k<$count_uicols_name;$k++)
                                        {
-                                               
if($uicols['input_type'][$k]!='hidden')
+                                               if($input_type[$k]!='hidden')
                                                {
                                                        $content[$j][$m]        
= str_replace("\r\n"," ",$entry[$name[$k]]);
-                                                       
$str.=$xls->WriteLabel(0,$m,$descr[$k]);
+                                                       
$worksheet1->write_string(0, $m, $descr[$k]);
                                                        $m++;
                                                }
                                        }
-
                                        $j++;
                                }

@@ -1323,20 +1326,11 @@
                                        $line++;
                                        for ($i=0; $i<count($row); $i++)
                                        {
-                                               
$str.=$xls->WriteLabel($line,$i,$row[$i]);
+                                               
$worksheet1->write($line,$i,$row[$i]);
                                        }
                                }
-
-                          $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
-
-                               $str.=$xls->EOF();
-                               $size=strlen($str);
-
-                               $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,'application/vnd.ms-excel',$size);
-
-                               echo $str;
                        }
+                       $workbook->close();

                }


====================================================
Index: property/inc/class.uientity.inc.php
diff -u property/inc/class.uientity.inc.php:1.14 
property/inc/class.uientity.inc.php:1.15
--- property/inc/class.uientity.inc.php:1.14    Wed Nov  9 13:09:23 2005
+++ property/inc/class.uientity.inc.php Wed Nov  9 22:49:12 2005
@@ -111,33 +111,36 @@
                        $GLOBALS['phpgw_info']['flags'][nofooter] = True;
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = False;

-                       require('PEAR.php');
-                       $xls            = 
CreateObject($this->currentapp.'.excel');
-
                        $start_date     = urldecode($this->start_date);
                        $end_date       = urldecode($this->end_date);

                        $list = 
$this->bo->read(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'allrows'=>true,'start_date'=>$start_date,'end_date'=>$end_date));
                        $uicols = $this->bo->uicols;
+
+                       $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
                        $count_uicols_name=count($uicols['name']);
+
+                       $workbook       = 
CreateObject($this->currentapp.'.excel',"-");
+                       $browser = CreateObject('phpgwapi.browser');
+                       
$browser->content_header($filename,'application/vnd.ms-excel');
+
+                       $worksheet1 =& $workbook->add_worksheet('First One');
+
                        $j=0;
                        if (isset($list) AND is_array($list))
                        {
-                               $str=$xls->Begin();
                                foreach($list as $entry)
                                {
                                        $m=0;
                                        for ($k=0;$k<$count_uicols_name;$k++)
                                        {
-                                               
if($uicols['input_type'][$k]=='text')
+                                               
if($uicols['input_type'][$k]!='hidden')
                                                {
                                                        $content[$j][$m]        
= $entry[$uicols['name'][$k]];
-                                                       
$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
-                                                       
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
+                                                       
$worksheet1->write_string(0, $m, $uicols['descr'][$k]);
                                                        $m++;
                                                }
                                        }
-
                                        $j++;
                                }

@@ -146,19 +149,11 @@
                                        $line++;
                                        for ($i=0; $i<count($row); $i++)
                                        {
-                                               
$str.=$xls->WriteLabel($line,$i,$row[$i]);
+                                               
$worksheet1->write($line,$i,$row[$i]);
                                        }
                                }
-
-                               $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
-                               $str.=$xls->EOF();
-                               $size=strlen($str);
-
-                               $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,'application/vnd.ms-excel',$size);
-
-                               echo $str;
                        }
+                       $workbook->close();
                }



====================================================
Index: property/inc/class.excel.inc.php
diff -u property/inc/class.excel.inc.php:1.4 
property/inc/class.excel.inc.php:1.5
--- property/inc/class.excel.inc.php:1.4        Thu Jan 13 16:52:48 2005
+++ property/inc/class.excel.inc.php    Wed Nov  9 22:49:12 2005
@@ -1,228 +1,15 @@
 <?php
        /**
-       * PHP Class for generating Excel binary data. (PHP 4 >= 4.0b1)
+       * phpGroupWare - property: a Facilities Management System.
        *
-       * Copyright (c) 2001 by KVN
-       *
-       * This source file is subject to version 2.0 of the PHP license,
-       * that is bundled with this package in the file LICENSE, and is
-       * available at through the world-wide-web at
-       * http://www.php.net/license/2_02.txt.
-       * If you did not receive a copy of the PHP license and are unable to
-       * obtain it through the world-wide-web, please send a note to
-       * address@hidden http://address@hidden so we can mail you a copy 
immediately.
-       *
-       * To contact the author write to address@hidden mailto:address@hidden 
Vitaliy N. Kravchenko}
-       * @author Vitaliy N. Kravchenko
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package Excel
-       * @version Thu Jul 11 EEST 2002 version 2.5
-       * $Id$
+       * @version $Id$
        */

-
-
-/*
-Usage Example:
------------------------------------------------------------
-
-    $xls = new Excel(false);   // begin Excel stream, start Excel and dont ask 
"Save"..
-       while($row = $res->fetchRow())
-          {
-      $line++;
-      for ($i=0; $i<count($row); $i++)
-         {
-         $xls->WriteLabel($line,$i,$row[$i]);
-         }
-     }
-    $xls->SendFile("moe.xls"); // close the stream
-
-
-Also present Function to write a Number (double) into Row, Col:
-    $xls->WriteNumber($Row,$Col,$Number);
-
-Example2:
-
-$str = Excel::WriteLabel(1,1,"Hello World!");
-$str .= Excel::WriteNumber(1,2,671);
-header(..);
-echo Excel::Begin();
-echo $str;
-echo Excel::EOF();
-
-
-Examle3:
-
-header(....)
-$xls = new Excel();
-$xls->.... WriteNumber/Label..
-echo $xls->GetData();
-
-*/
-
-
-/**
-* @package    Excel
-* @version    2.5
-* @author    Vitaliy N. Kravchenko <address@hidden>
-* @since    PHP 4.0.4
-*
-*/
-
-class excel extends PEAR {
-    var $xls_data = "";
-    var $error = "";
-    var $download = "true";
-
-   /**
-    * Constructor, writting begin of  Excel file (binary).
-    *
-    * @param $download boolean  true, if ask for "Save/Open", false -
-    *    if open Excel (application/x-exel).
-    */
-
-    function excel($download = "true") {
-        $this->download = $download;
-        $this->Begin();
-    }
-
-   /**
-       * Excel begin of file header
-    * Send the header to client
-    *
-    * @param $filename string - name of file, for save
-    * (actually, if $download = true)
-    */
-
-    function _Header($filename) {
-        header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-        header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
-        header ("Cache-Control: no-cache, must-revalidate");
-        header ("Pragma: no-cache");
-        if ($this->download){
-            header ("Content-type: application/x-msexcel");
-            header ("Content-Disposition: attachment; filename=$filename" );
-        } else {
-            header ("Content-type: application/x-msexcel");
-        }
-            header ("Content-Description: PHP Generated Data" );
-    }
-
-   /**
-       * Begin of Excel File.
-    *
-    * @private
-    */
-
-    function Begin() {
-        $str = pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
-        $this->xls_data = $str;
-        return $str;
-    }
-
-   /**
-    * End of Excel File (binary)
-    *
-    * @private
-    */
-
-    function EOF() {
-        $str = pack("ss", 0x0A, 0x00);
-        $this->xls_data .=  $str;
-        return $str;
-    }
-
-   /**
-    * Function for writting number (double) into row $Row,
-    * and column $Col.
-    *
-    * @param $Row integer - Row
-    * @param $Col integer - Column
-    * @param $Value number - value
-    *
-    */
-
-    function WriteNumber($Row, $Col, $Value) {
-        $str = pack("sssss", 0x203, 14, $Row, $Col, 0x0);
-        $str .= pack("d", $Value);
-        $this->xls_data .= $str;
-        return $str;
-    }
-
-
-   /**
-    * Function for writting label(string) into row $Row,
-    * and column $Col.
-    * @param $Row integer - Row
-    * @param $Col integer - Column
-    * @param $Value number - value
-    *
-    */
-
-    function WriteLabel($Row, $Col, $Value ) {
-        $L = strlen($Value);
-        $str = pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
-        $str .= $Value;
-        $this->xls_data .=  $str;
-        return $str;
-    }
-
-   /**
-    * Function to send file to client(browser)
-    *
-    * @param $filename string -  name of file (actually, if $download = true)
-    *
-    */
-
-    function SendFile($filename = "test.xls") {
-        $this->_Header($filename);
-        echo $this->xls_data;
-        echo $this->EOF();
-    }
-
-   /**
-    * Function to get Excel (binary) data
-    *
-    * @param $eof boolean - id true, returnet data will with the end of Excel 
File (bin)
-    *
-    */
-
-    function GetData($eof = "true") {
-        if ($eof) return $xls_data . $this->EOF();
-        else return $xls_data;
-    }
-
-
-   /**
-    * Function to write Excel-data to $file
-    *
-    * @param $efile string - File name.
-    *
-    */
-       function toFile($file = "test.xls") {
-        $fp = @fopen($file,"w");
-        if (is_resource($fp)) {
-            fwrite($fp, $this->xls_data);
-            fclose($fp);
-            return true;
-        } else {
-            return $this->raiseError("Can't access to '$file' for 
writting!",-1);
-        }
-    }
-
-
-   /**
-    * Destructor
-    * Unset The Excel Object.
-    *
-    * @private
-    *
-    */
-
-    function _Excel()
-    {
-    unset($this->xls_data);
-    unset ($this);
-    }
-} // End of class Excel.
-
-?>
\ No newline at end of file
+       require_once(PHPGW_APP_INC . '/excel/Worksheet.php');
+       require_once(PHPGW_APP_INC . '/excel/Workbook.php');
+?>

====================================================
Index: property/inc/class.uiworkorder.inc.php
diff -u property/inc/class.uiworkorder.inc.php:1.15 
property/inc/class.uiworkorder.inc.php:1.16
--- property/inc/class.uiworkorder.inc.php:1.15 Wed Nov  9 13:09:23 2005
+++ property/inc/class.uiworkorder.inc.php      Wed Nov  9 22:49:12 2005
@@ -92,59 +92,11 @@

                function excel()
                {
-                       $GLOBALS['phpgw_info']['flags'][noheader] = True;
-                       $GLOBALS['phpgw_info']['flags'][nofooter] = True;
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = False;
-
-                       require('PEAR.php');
-                       $xls            = 
CreateObject($this->currentapp.'.excel');
-
                        $start_date     = urldecode($this->start_date);
-                       $end_date       = urldecode($this->end_date);
-                       $list           = 
$this->bo->read($start_date,$end_date,$allrows=True);
-
-                       $uicols = $this->bo->uicols;
-                       $count_uicols_name=count($uicols['name']);
-
-                       $j=0;
-                       if (isset($list) AND is_array($list))
-                       {
-                               $str=$xls->Begin();
-                               foreach($list as $entry)
-                               {
-                                       $m=0;
-                                       for ($k=0;$k<$count_uicols_name;$k++)
-                                       {
-                                               
if($uicols['input_type'][$k]!='hidden')
-                                               {
-                                                       $content[$j][$m]        
= $entry[$uicols['name'][$k]];
-                                                       
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
-                                                       $m++;
-                                               }
-                                       }
-
-                                       $j++;
-                               }
-
-                               foreach($content as $row)
-                               {
-                                       $line++;
-                                       for ($i=0; $i<count($row); $i++)
-                                       {
-                                               
$str.=$xls->WriteLabel($line,$i,$row[$i]);
-                                       }
-                               }
-
-                          $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
-
-                               $str.=$xls->EOF();
-                               $size=strlen($str);
-
-                               $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,'application/vnd.ms-excel',$size);
-
-                               echo $str;
-                       }
+                       $end_date               = urldecode($this->end_date);
+                       $list                   = 
$this->bo->read($start_date,$end_date,$allrows=True);
+                       $uicols                 = $this->bo->uicols;
+                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
                }



====================================================
Index: property/inc/class.uitts.inc.php
diff -u property/inc/class.uitts.inc.php:1.23 
property/inc/class.uitts.inc.php:1.24
--- property/inc/class.uitts.inc.php:1.23       Wed Nov  9 13:09:23 2005
+++ property/inc/class.uitts.inc.php    Wed Nov  9 22:49:12 2005
@@ -146,8 +146,6 @@

 //_debug_array($descr);

-
-
                        $this->bocommon->excel($list,$name,$descr);
                }


====================================================
Index: property/inc/class.uis_agreement.inc.php
diff -u property/inc/class.uis_agreement.inc.php:1.21 
property/inc/class.uis_agreement.inc.php:1.22
--- property/inc/class.uis_agreement.inc.php:1.21       Mon Nov  7 10:17:47 2005
+++ property/inc/class.uis_agreement.inc.php    Wed Nov  9 22:49:12 2005
@@ -886,7 +886,7 @@
                        $id     = get_var('id',array('POST','GET'));
                        $list = $this->bo->read_details($id);
                        $uicols         = $this->bo->uicols;
-                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr']);
+                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
                }

                function edit_item()

====================================================
Index: property/inc/class.uiproject.inc.php
diff -u property/inc/class.uiproject.inc.php:1.21 
property/inc/class.uiproject.inc.php:1.22
--- property/inc/class.uiproject.inc.php:1.21   Wed Nov  9 13:32:47 2005
+++ property/inc/class.uiproject.inc.php        Wed Nov  9 22:49:12 2005
@@ -88,58 +88,11 @@

                function excel()
                {
-                       $GLOBALS['phpgw_info']['flags'][noheader] = True;
-                       $GLOBALS['phpgw_info']['flags'][nofooter] = True;
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = False;
-                       require('PEAR.php');
-                       $xls            = 
CreateObject($this->currentapp.'.excel');
-
                        $start_date = 
urldecode(get_var('start_date',array('POST','GET')));
                        $end_date       = 
urldecode(get_var('end_date',array('POST','GET')));
                        $list           = 
$this->bo->read($start_date,$end_date,$allrows=True);
-
                        $uicols = $this->bo->uicols;
-                       $count_uicols_name=count($uicols['name']);
-
-                       $j=0;
-                       if (isset($list) AND is_array($list))
-                       {
-                               $str=$xls->Begin();
-                               foreach($list as $entry)
-                               {
-                                       $m=0;
-                                       for ($k=0;$k<$count_uicols_name;$k++)
-                                       {
-                                               
if($uicols['input_type'][$k]!='hidden')
-                                               {
-                                                       $content[$j][$m]        
= $entry[$uicols['name'][$k]];
-                                                       
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
-                                                       $m++;
-                                               }
-                                       }
-
-                                       $j++;
-                               }
-
-                               foreach($content as $row)
-                               {
-                                       $line++;
-                                       for ($i=0; $i<count($row); $i++)
-                                       {
-                                               
$str.=$xls->WriteLabel($line,$i,$row[$i]);
-                                       }
-                               }
-
-                          $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
-
-                               $str.=$xls->EOF();
-                               $size=strlen($str);
-
-                               $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,'application/vnd.ms-excel',$size);
-
-                               echo $str;
-                       }
+                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
                }

                function index()

====================================================
Index: property/inc/class.uilocation.inc.php
diff -u property/inc/class.uilocation.inc.php:1.15 
property/inc/class.uilocation.inc.php:1.16
--- property/inc/class.uilocation.inc.php:1.15  Thu Nov  3 14:53:43 2005
+++ property/inc/class.uilocation.inc.php       Wed Nov  9 22:49:12 2005
@@ -93,15 +93,7 @@

                function excel()
                {
-                       $GLOBALS['phpgw_info']['flags'][noheader] = True;
-                       $GLOBALS['phpgw_info']['flags'][nofooter] = True;
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = False;
-
                        $summary                = 
get_var('summary',array('GET'));
-
-                       require('PEAR.php');
-                       $xls            = 
CreateObject($this->currentapp.'.excel');
-
                        $type_id                = 
get_var('type_id',array('GET'));
                        $lookup                 = 
get_var('lookup',array('POST','GET'));
                        $lookup_name    = 
get_var('lookup_name',array('POST','GET'));
@@ -117,48 +109,7 @@
                        }

                        $uicols = $this->bo->uicols;
-                       $count_uicols_name=count($uicols['name']);
-
-                       $j=0;
-                       if (isset($list) AND is_array($list))
-                       {
-                               $str=$xls->Begin();
-                               foreach($list as $location_entry)
-                               {
-                                       $m=0;
-                                       for ($k=0;$k<$count_uicols_name;$k++)
-                                       {
-                                               
if($uicols['input_type'][$k]!='hidden')
-                                               {
-                                                       $content[$j][$m]        
= $location_entry[$uicols['name'][$k]];
-                                                       
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
-                                                       $m++;
-                                               }
-                                       }
-
-                                       $j++;
-                               }
-
-                               foreach($content as $row)
-                               {
-                                       $line++;
-                                       for ($i=0; $i<count($row); $i++)
-                                       {
-                                               
$str.=$xls->WriteLabel($line,$i,$row[$i]);
-                                       }
-                               }
-
-                          $filename= 
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
-
-                               $str.=$xls->EOF();
-                               $size=strlen($str);
-
-                               $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,'application/vnd.ms-excel',$size);
-
-                               echo $str;
-                       }
-
+                       
$this->bocommon->excel($list,$uicols['name'],$uicols['descr'],$uicols['input_type']);
                }








reply via email to

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