phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.soXport.inc.php, 1.30, 1.31 c


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.soXport.inc.php, 1.30, 1.31 class.uiXport.inc.php, 1.30, 1.31 class.boXport.inc.php, 1.9, 1.10
Date: Wed, 06 Aug 2003 13:08:00 -0400

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv22170/inc

Modified Files:
        class.soXport.inc.php class.uiXport.inc.php 
        class.boXport.inc.php 
Log Message:
no message

Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** class.soXport.inc.php       2 Jul 2003 22:26:28 -0000       1.30
--- class.soXport.inc.php       6 Aug 2003 17:07:58 -0000       1.31
***************
*** 93,97 ****
                }
  
!               function add($owner,$fields,$access='',$cat_id='',$tid='n')
                {
  
--- 93,97 ----
                }
  
!               function add($fields)
                {
  

Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** class.uiXport.inc.php       30 Jun 2003 10:49:14 -0000      1.30
--- class.uiXport.inc.php       6 Aug 2003 17:07:58 -0000       1.31
***************
*** 4,8 ****
        class uiXport
        {
-               var $template;
                var $public_functions = array(
                        'import'        => True,
--- 4,7 ----
***************
*** 10,15 ****
                        'rollback'      => True
                );
-               var $bo;
-               var $cat;
  
                var $start;
--- 9,12 ----
***************
*** 31,34 ****
--- 28,39 ----
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
  
+                       $this->acl2                             = 
CreateObject($this->currentapp.'.acl2');
+                       $this->acl2_location            = '.invoice';
+                       $this->acl_read                         = 
$this->acl2->check('.invoice',1);
+                       $this->acl_add                          = 
$this->acl2->check('.invoice',2);
+                       $this->acl_edit                         = 
$this->acl2->check('.invoice',4);
+                       $this->acl_delete                       = 
$this->acl2->check('.invoice',8);
+                       $this->acl_manage                       = 
$this->acl2->check('.invoice',16);
+ 
                        $this->start    = $this->bo->start;
                        $this->limit    = $this->bo->limit;
***************
*** 43,46 ****
--- 48,55 ----
                function import()
                {
+                       if(!$this->acl_add)
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=2&acl_location='
 . $this->acl2_location);
+                       }
  
                        $receipt = 
$GLOBALS['phpgw']->session->appsession('session_data','import_receipt');
***************
*** 397,401 ****
                        }
  
- 
                        for ($i=1; $i<count($table)+1; $i++)
                        {
--- 406,409 ----
***************
*** 495,498 ****
--- 503,511 ----
                function export()
                {
+                       if(!$this->acl_manage)
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=16&acl_location='
 . $this->acl2_location);
+                       }
+ 
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
                                                                                
'search_field'));
***************
*** 575,578 ****
--- 588,596 ----
                function rollback()
                {
+                       if(!$this->acl_manage)
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=16&acl_location='
 . $this->acl2_location);
+                       }
+ 
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
                                                                                
'search_field'));

Index: class.boXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boXport.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.boXport.inc.php       21 May 2003 12:46:39 -0000      1.9
--- class.boXport.inc.php       6 Aug 2003 17:07:58 -0000       1.10
***************
*** 174,178 ****
                        $this->config->read_repository();
                        $file_catalog = 
$this->config->config_data['export_path'];
- //    echo 'file_catalog: '.$file_catalog .'<br>';
  
                        $dir_handle = opendir($file_catalog);
--- 174,177 ----
***************
*** 214,223 ****
                        }
  
- //_debug_array($rollback_list);
                        return $rollback_list;
  
                }
  
- 
                function import($invoice_common,$download)
                {
--- 213,220 ----
***************
*** 239,301 ****
                }
  
-               /*!
-               @function table_output
-               @abstract This is used for reporting table_output in a nice 
format.
-               @param buffer - import data
-               */
-               function table_output($buffer,$header,$import)
-               {
-                       if (! is_array($buffer))
-                       {
-                               return False;
-                       }
- //print_r($buffer);
- 
-                       $sum=0;
-                       $html_buffer = '<table border="1" cellpadding="0" 
cellspacing="0" style="border-collapse: collapse" bordercolor="#211111" 
width="80%"><tr>';
- 
-                       $html_buffer .= '<td>Bilagsnr:</td><td><b>' . 
$buffer[1]['bilagsnr'] . '</b></td></tr><tr>';
-                       $html_buffer .= '<td>Leverandør:</td><td><b>' . 
$buffer[1]['spvend_code'] . '</b></td></tr><tr>';
-                       $html_buffer .= '<td>Oppsynsmann:</td><td><b>' . 
$buffer[1]['oppsynsmannid'] . '</b></td></tr><tr>';
-                       $html_buffer .= '<td>Faktura dato:</td><td><b>' . 
$buffer[1]['fakturadato'] . '</b></td></tr><tr>';
-                       $html_buffer .= '<td>Forf. dato:</td><td><b>' . 
$buffer[1]['forfallsdato'] . '</b></td></tr><tr>';
-                       $html_buffer .= '<td>Saksbehandler:</td><td><b>' . 
$buffer[1]['saksbehandlerid'] . '</b></td></tr><tr>';
-                       $html_buffer .= '<td>Budjett ansv:</td><td><b>' . 
$buffer[1]['budsjettansvarligid'] . '</b></td></tr><tr>';
- 
-                       for ($j=0; $j<count($header); $j++)
-                       {
-                               $html_buffer .= '<td><b>' . $header[$j] . 
'</b></td>';
-                       }
-                       $html_buffer .= '</tr>';
- 
-                       for ($i=1; $i<count($buffer)+1; $i++)
-                       {
-                               $html_buffer .= '<tr>';
- 
-                               for ($k=0; $k<count($header); $k++)
-                               {
-                                       $html_buffer .= '<td>' . 
str_replace('.',',',$buffer[$i][$import[$header[$k]]]) . '</td>';
-                                       if ($import[$header[$k]]=='belop')
-                                       {
-                                               
$sum=$sum+$buffer[$i][$import[$header[$k]]];
-                                       }
-                               }
-                               $html_buffer .= '</tr><tr><td>';
-                       }
-                       for ($m=1; $m<count($header); $m++)
-                               {
-                                       $html_buffer .= '</td><td>';
-                               }
- 
-                       return $html_buffer .'<b>'. 
str_replace('.',',',$sum).'</b></td></tr></table>';
-               }
- 
- 
                function export($conv_type,$download)
                {
- //echo 'download ' . $download.'<br>';
- 
                        include (PHPGW_APP_INC . '/export/' . $conv_type);
- //                    $buffer=array();
                        $invoice = new export_conv;
  
--- 236,242 ----





reply via email to

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