phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.boXport.php, 1.1.1.3


From: nomail
Subject: [Phpgroupware-cvs] property/class.boXport.php, 1.1.1.3
Date: Fri, 21 May 2004 19:15:54 -0000

Update of /property
Modified Files:
        Branch: 
          class.boXport.php

date: 2004/04/23 21:26:33;  author: sigurdne;  state: Exp;  lines: +270 -270

Log Message:
no message
=====================================================================
Index: property/class.boXport.php
diff -u property/class.boXport.php:1.1.1.2 property/class.boXport.php:1.1.1.3
--- property/class.boXport.php:1.1.1.2  Fri Apr 23 20:25:32 2004
+++ property/class.boXport.php  Fri Apr 23 21:26:33 2004
@@ -1,270 +1,270 @@
-<?php
-       
/**************************************************************************\
-       * phpGroupWare - property                                               
   *
-       * http://www.phpgroupware.org                                           
   *
-       *                                                                       
   *
-       * Facilities Management                                                 
   *
-       * Written by Sigurd Nes [sigurdne at online.no]                         
   *
-       * 
------------------------------------------------------------------------ *
-       * Copyright 2000 - 2003 Free Software Foundation, Inc                   
   *
-       * This program is part of the GNU project, see http://www.gnu.org/      
   *
-       * 
------------------------------------------------------------------------ *
-       * This program is free software; you can redistribute it and/or modify 
it  *
-       * under the terms of the GNU General Public License as published by the 
   *
-       * Free Software Foundation; either version 2 of the License, or (at 
your   *
-       * option) any later version.                                            
   *
-       
\**************************************************************************/
-
-  /* $Id$ */
-
-       class property_boXport
-       {
-               var $public_functions = array(
-                       'import' => True,
-                       'export' => True
-               );
-
-               var $start;
-               var $query;
-               var $sort;
-               var $order;
-               var $filter;
-               var $cat_id;
-
-               var $use_session = False;
-
-               function property_boXport ($session=False)
-               {
-                       $this->currentapp       = 'property'; 
//$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->config           = 
CreateObject('phpgwapi_config',$this->currentapp);
-                       $this->fm_session       = 
CreateObject($this->currentapp.'_session');
-
-                       if($session)
-                       {
-                               $this->read_sessiondata();
-                               $this->use_session = True;
-                       }
-
-                       $start  = get_var('start',array('POST','GET'));
-                       $query  = get_var('query',array('POST','GET'));
-                       $sort   = get_var('sort',array('POST','GET'));
-                       $order  = get_var('order',array('POST','GET'));
-                       $filter = get_var('filter',array('POST','GET'));
-                       $cat_id = get_var('cat_id',array('POST','GET'));
-
-                       if($start || $start == 0)  { $this->start = $start; }
-                       if($query)  { $this->query  = $query;  }
-                       if($sort)   { $this->sort   = $sort;   }
-                       if($order)  { $this->order  = $order;  }
-                       if($filter) { $this->filter = $filter; }
-                       $this->cat_id = $cat_id;
-               }
-
-               function save_sessiondata()
-               {
-
-                       if ($this->use_session)
-                       {
-                               $data = array(
-                                       'start'  => $this->start,
-                                       'query'  => $this->query,
-                                       'sort'   => $this->sort,
-                                       'order'  => $this->order,
-                                       'filter' => $this->filter,
-                                       'cat_id' => $this->cat_id
-                               );
-                               if($this->debug) { echo '<br>Save:'; 
html_print_r($data); }
-                               
$this->fm_session->appsession('session_data','export',$data);
-                       }
-               }
-
-               function read_sessiondata()
-               {
-                       $data = 
$this->fm_session->appsession('session_data','export');
-                       if($this->debug) { echo '<br>Read:'; 
html_print_r($data); }
-
-                       $this->start  = $data['start'];
-                       $this->query  = $data['query'];
-                       $this->sort   = $data['sort'];
-                       $this->order  = $data['order'];
-                       $this->filter = $data['filter'];
-                       $this->cat_id = $data['cat_id'];
-               }
-
-               function select_import_conv($selected='')
-               {
-                       $dir_handle = opendir(PHPGW_APP_INC . SEP . 'import');
-                       $i=0; $myfilearray = '';
-                       while ($file = readdir($dir_handle))
-                       {
-                               if ((substr($file, 0, 1) != '.') && 
is_file(PHPGW_APP_INC . SEP . 'import' . SEP . $file) )
-                               {
-                                       $myfilearray[$i] = $file;
-                                       $i++;
-                               }
-                       }
-                       closedir($dir_handle);
-                       sort($myfilearray);
-
-                       for ($i=0;$i<count($myfilearray);$i++)
-                       {
-                               $fname = ereg_replace('_',' ',$myfilearray[$i]);
-                               $sel_file = '';
-                               if ($myfilearray[$i]==$selected)
-                               {
-                                       $sel_file = 'selected';
-                               }
-
-                               $conv_list[] = array
-                               (
-                                       'id'            => $myfilearray[$i],
-                                       'name'          => $fname,
-                                       'selected'      => $sel_file
-                               );
-                       }
-
-                       for ($i=0;$i<count($conv_list);$i++)
-                       {
-                               if ($conv_list[$i]['selected'] != 'selected')
-                               {
-                                       unset($conv_list[$i]['selected']);
-                               }
-                       }
-
-                       return $conv_list;
-
-               }
-
-               function select_export_conv($selected='')
-               {
-                       $dir_handle = opendir(PHPGW_APP_INC . SEP . 'export');
-                       $i=0; $myfilearray = '';
-                       while ($file = readdir($dir_handle))
-                       {
-                               if ((substr($file, 0, 1) != '.') && 
is_file(PHPGW_APP_INC . SEP . 'export' . SEP . $file) )
-                               {
-                                       $myfilearray[$i] = $file;
-                                       $i++;
-                               }
-                       }
-                       closedir($dir_handle);
-                       sort($myfilearray);
-
-                       for ($i=0;$i<count($myfilearray);$i++)
-                       {
-                               $fname = ereg_replace('_',' ',$myfilearray[$i]);
-                               $sel_file = '';
-                               if ($myfilearray[$i]==$selected)
-                               {
-                                       $sel_file = 'selected';
-                               }
-
-                               $conv_list[] = array
-                               (
-                                       'id'            => $myfilearray[$i],
-                                       'name'          => $fname,
-                                       'selected'      => $sel_file
-                               );
-                       }
-
-                       for ($i=0;$i<count($conv_list);$i++)
-                       {
-                               if ($conv_list[$i]['selected'] != 'selected')
-                               {
-                                       unset($conv_list[$i]['selected']);
-                               }
-                       }
-
-                       return $conv_list;
-
-               }
-
-               function select_rollback_file($selected='')
-               {
-                       $this->config->read_repository();
-                       $file_catalog = 
$this->config->config_data['export_path'];
-
-                       $dir_handle = opendir($file_catalog);
-                       $i=0; $myfilearray = '';
-                       while ($file = readdir($dir_handle))
-                       {
-                               if ((substr($file, 0, 1) != '.') && 
is_file($file_catalog . SEP . $file) )
-                               {
-                                       $myfilearray[$i] = $file;
-                                       $i++;
-                               }
-                       }
-                       closedir($dir_handle);
-                       @sort($myfilearray);
-
-                       for ($i=0;$i<count($myfilearray);$i++)
-                       {
-                               $fname = ereg_replace('_',' ',$myfilearray[$i]);
-                               $sel_file = '';
-                               if ($myfilearray[$i]==$selected)
-                               {
-                                       $sel_file = 'selected';
-                               }
-
-                               $rollback_list[] = array
-                               (
-                                       'id'            => $myfilearray[$i],
-                                       'name'          => $fname,
-                                       'selected'      => $sel_file
-                               );
-                       }
-
-                       for ($i=0;$i<count($rollback_list);$i++)
-                       {
-                               if ($rollback_list[$i]['selected'] != 
'selected')
-                               {
-                                       unset($rollback_list[$i]['selected']);
-                               }
-                       }
-
-                       return $rollback_list;
-
-               }
-
-               function import($invoice_common,$download)
-               {
-                       include (PHPGW_APP_INC . '/import/' . 
$invoice_common['conv_type']);
-                       $invoice = new import_conv;
-
-                       $buffer = $invoice->import($invoice_common,$download);
-                       if ($download)
-                       {
-                               $header = $invoice->header;
-                               $import = $invoice->import;
-                               $buffer= array(
-                                               'table'         => $buffer,
-                                               'header'        => $header,
-                                               'import'        => $import
-                                       );
-                       }
-                       return $buffer;
-               }
-
-               function export($conv_type,$download)
-               {
-                       include (PHPGW_APP_INC . '/export/' . $conv_type);
-                       $invoice = new export_conv;
-
-                       $buffer = $invoice->overfor($download);
-
-                       $tsvfilename = 
$GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $tsvfilename;
-
-                       return $buffer;
-               }
-
-               function rollback($conv_type,$role_back_date,$rollback_file)
-               {
-                       include (PHPGW_APP_INC . '/export/' . $conv_type);
-                       $invoice = new export_conv;
-                       $buffer = 
$invoice->RullTilbake($role_back_date,$rollback_file);
-                       return $buffer;
-
-               }
-
-       }
-?>
+<?php
+       
/**************************************************************************\
+       * phpGroupWare - property                                               
   *
+       * http://www.phpgroupware.org                                           
   *
+       *                                                                       
   *
+       * Facilities Management                                                 
   *
+       * Written by Sigurd Nes [sigurdne at online.no]                         
   *
+       * 
------------------------------------------------------------------------ *
+       * Copyright 2000 - 2003 Free Software Foundation, Inc                   
   *
+       * This program is part of the GNU project, see http://www.gnu.org/      
   *
+       * 
------------------------------------------------------------------------ *
+       * This program is free software; you can redistribute it and/or modify 
it  *
+       * under the terms of the GNU General Public License as published by the 
   *
+       * Free Software Foundation; either version 2 of the License, or (at 
your   *
+       * option) any later version.                                            
   *
+       
\**************************************************************************/
+
+  /* $Id$ */
+
+       class property_boXport
+       {
+               var $public_functions = array(
+                       'import' => True,
+                       'export' => True
+               );
+
+               var $start;
+               var $query;
+               var $sort;
+               var $order;
+               var $filter;
+               var $cat_id;
+
+               var $use_session = False;
+
+               function property_boXport ($session=False)
+               {
+                       $this->currentapp       = 'property'; 
//$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       $this->config           = 
CreateObject('phpgwapi_config',$this->currentapp);
+                       $this->fm_session       = 
CreateObject($this->currentapp.'_session');
+
+                       if($session)
+                       {
+                               $this->read_sessiondata();
+                               $this->use_session = True;
+                       }
+
+                       $start  = get_var('start',array('POST','GET'));
+                       $query  = get_var('query',array('POST','GET'));
+                       $sort   = get_var('sort',array('POST','GET'));
+                       $order  = get_var('order',array('POST','GET'));
+                       $filter = get_var('filter',array('POST','GET'));
+                       $cat_id = get_var('cat_id',array('POST','GET'));
+
+                       if($start || $start == 0)  { $this->start = $start; }
+                       if($query)  { $this->query  = $query;  }
+                       if($sort)   { $this->sort   = $sort;   }
+                       if($order)  { $this->order  = $order;  }
+                       if($filter) { $this->filter = $filter; }
+                       $this->cat_id = $cat_id;
+               }
+
+               function save_sessiondata()
+               {
+
+                       if ($this->use_session)
+                       {
+                               $data = array(
+                                       'start'  => $this->start,
+                                       'query'  => $this->query,
+                                       'sort'   => $this->sort,
+                                       'order'  => $this->order,
+                                       'filter' => $this->filter,
+                                       'cat_id' => $this->cat_id
+                               );
+                               if($this->debug) { echo '<br>Save:'; 
html_print_r($data); }
+                               
$this->fm_session->appsession('session_data','export',$data);
+                       }
+               }
+
+               function read_sessiondata()
+               {
+                       $data = 
$this->fm_session->appsession('session_data','export');
+                       if($this->debug) { echo '<br>Read:'; 
html_print_r($data); }
+
+                       $this->start  = $data['start'];
+                       $this->query  = $data['query'];
+                       $this->sort   = $data['sort'];
+                       $this->order  = $data['order'];
+                       $this->filter = $data['filter'];
+                       $this->cat_id = $data['cat_id'];
+               }
+
+               function select_import_conv($selected='')
+               {
+                       $dir_handle = opendir(PHPGW_APP_INC . SEP . 'import');
+                       $i=0; $myfilearray = '';
+                       while ($file = readdir($dir_handle))
+                       {
+                               if ((substr($file, 0, 1) != '.') && 
is_file(PHPGW_APP_INC . SEP . 'import' . SEP . $file) )
+                               {
+                                       $myfilearray[$i] = $file;
+                                       $i++;
+                               }
+                       }
+                       closedir($dir_handle);
+                       sort($myfilearray);
+
+                       for ($i=0;$i<count($myfilearray);$i++)
+                       {
+                               $fname = ereg_replace('_',' ',$myfilearray[$i]);
+                               $sel_file = '';
+                               if ($myfilearray[$i]==$selected)
+                               {
+                                       $sel_file = 'selected';
+                               }
+
+                               $conv_list[] = array
+                               (
+                                       'id'            => $myfilearray[$i],
+                                       'name'          => $fname,
+                                       'selected'      => $sel_file
+                               );
+                       }
+
+                       for ($i=0;$i<count($conv_list);$i++)
+                       {
+                               if ($conv_list[$i]['selected'] != 'selected')
+                               {
+                                       unset($conv_list[$i]['selected']);
+                               }
+                       }
+
+                       return $conv_list;
+
+               }
+
+               function select_export_conv($selected='')
+               {
+                       $dir_handle = opendir(PHPGW_APP_INC . SEP . 'export');
+                       $i=0; $myfilearray = '';
+                       while ($file = readdir($dir_handle))
+                       {
+                               if ((substr($file, 0, 1) != '.') && 
is_file(PHPGW_APP_INC . SEP . 'export' . SEP . $file) )
+                               {
+                                       $myfilearray[$i] = $file;
+                                       $i++;
+                               }
+                       }
+                       closedir($dir_handle);
+                       sort($myfilearray);
+
+                       for ($i=0;$i<count($myfilearray);$i++)
+                       {
+                               $fname = ereg_replace('_',' ',$myfilearray[$i]);
+                               $sel_file = '';
+                               if ($myfilearray[$i]==$selected)
+                               {
+                                       $sel_file = 'selected';
+                               }
+
+                               $conv_list[] = array
+                               (
+                                       'id'            => $myfilearray[$i],
+                                       'name'          => $fname,
+                                       'selected'      => $sel_file
+                               );
+                       }
+
+                       for ($i=0;$i<count($conv_list);$i++)
+                       {
+                               if ($conv_list[$i]['selected'] != 'selected')
+                               {
+                                       unset($conv_list[$i]['selected']);
+                               }
+                       }
+
+                       return $conv_list;
+
+               }
+
+               function select_rollback_file($selected='')
+               {
+                       $this->config->read_repository();
+                       $file_catalog = 
$this->config->config_data['export_path'];
+
+                       $dir_handle = opendir($file_catalog);
+                       $i=0; $myfilearray = '';
+                       while ($file = readdir($dir_handle))
+                       {
+                               if ((substr($file, 0, 1) != '.') && 
is_file($file_catalog . SEP . $file) )
+                               {
+                                       $myfilearray[$i] = $file;
+                                       $i++;
+                               }
+                       }
+                       closedir($dir_handle);
+                       @sort($myfilearray);
+
+                       for ($i=0;$i<count($myfilearray);$i++)
+                       {
+                               $fname = ereg_replace('_',' ',$myfilearray[$i]);
+                               $sel_file = '';
+                               if ($myfilearray[$i]==$selected)
+                               {
+                                       $sel_file = 'selected';
+                               }
+
+                               $rollback_list[] = array
+                               (
+                                       'id'            => $myfilearray[$i],
+                                       'name'          => $fname,
+                                       'selected'      => $sel_file
+                               );
+                       }
+
+                       for ($i=0;$i<count($rollback_list);$i++)
+                       {
+                               if ($rollback_list[$i]['selected'] != 
'selected')
+                               {
+                                       unset($rollback_list[$i]['selected']);
+                               }
+                       }
+
+                       return $rollback_list;
+
+               }
+
+               function import($invoice_common,$download)
+               {
+                       include (PHPGW_APP_INC . '/import/' . 
$invoice_common['conv_type']);
+                       $invoice = new import_conv;
+
+                       $buffer = $invoice->import($invoice_common,$download);
+                       if ($download)
+                       {
+                               $header = $invoice->header;
+                               $import = $invoice->import;
+                               $buffer= array(
+                                               'table'         => $buffer,
+                                               'header'        => $header,
+                                               'import'        => $import
+                                       );
+                       }
+                       return $buffer;
+               }
+
+               function export($conv_type,$download)
+               {
+                       include (PHPGW_APP_INC . '/export/' . $conv_type);
+                       $invoice = new export_conv;
+
+                       $buffer = $invoice->overfor($download);
+
+                       $tsvfilename = 
$GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $tsvfilename;
+
+                       return $buffer;
+               }
+
+               function rollback($conv_type,$role_back_date,$rollback_file)
+               {
+                       include (PHPGW_APP_INC . '/export/' . $conv_type);
+                       $invoice = new export_conv;
+                       $buffer = 
$invoice->RullTilbake($role_back_date,$rollback_file);
+                       return $buffer;
+
+               }
+
+       }
+?>




reply via email to

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