phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.45,1.46 cl


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.45,1.46 class.boowner.inc.php,1.1,1.2 class.soowner.inc.php,1.1,1.2 class.uiowner.inc.php,1.2,1.3
Date: Tue, 20 May 2003 14:43:01 -0400

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

Modified Files:
        class.bocommon.inc.php class.boowner.inc.php 
        class.soowner.inc.php class.uiowner.inc.php 
Log Message:
no message

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** class.bocommon.inc.php      19 May 2003 11:04:36 -0000      1.45
--- class.bocommon.inc.php      20 May 2003 18:42:58 -0000      1.46
***************
*** 117,121 ****
  
  
!               function moneyformat ($amount)
                {
                        if 
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
--- 117,140 ----
  
  
!               function msgbox_data($receipt)
!               {
!                       $msgbox_data_error=array();
!                       while (is_array($receipt['error']) && list(,$errors) = 
each($receipt['error']))
!                       {
!                               $msgbox_data_error += array($errors['msg']=> 
False);
!                       }
! 
!                       $msgbox_data_message=array();
!                       while (is_array($receipt['message']) && 
list(,$messages) = each($receipt['message']))
!                       {
!                               $msgbox_data_message += 
array($messages['msg']=> True);
!                       }
! 
!                       $msgbox_data = $msgbox_data_error + 
$msgbox_data_message;
! 
!                       return $msgbox_data;
!               }
! 
!               function moneyformat($amount)
                {
                        if 
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
***************
*** 128,132 ****
                        }
  
!               return $moneyformat;
                }
  
--- 147,151 ----
                        }
  
!                       return $moneyformat;
                }
  

Index: class.boowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boowner.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.boowner.inc.php       17 May 2003 17:49:03 -0000      1.1
--- class.boowner.inc.php       20 May 2003 18:42:58 -0000      1.2
***************
*** 255,266 ****
                                {
                                        $owner_id = $owner['owner_id'];
!                                       $this->so->edit($owner);
                                }
                        }
                        else
                        {
!                               $owner_id = $this->so->add($owner);
                        }
!                       return $owner_id;
                }
  
--- 255,266 ----
                                {
                                        $owner_id = $owner['owner_id'];
!                                       $receipt=$this->so->edit($owner);
                                }
                        }
                        else
                        {
!                               $receipt = $this->so->add($owner);
                        }
!                       return $receipt;
                }
  

Index: class.soowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soowner.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.soowner.inc.php       17 May 2003 17:49:03 -0000      1.1
--- class.soowner.inc.php       20 May 2003 18:42:58 -0000      1.2
***************
*** 137,141 ****
                                . "VALUES ('" . time() . "','" . $owner['name']
                                . "','" . $owner['cat_id'] . 
"')",__LINE__,__FILE__);
!                       return 
$this->db->get_last_insert_id('fm_owner','owner_id');
                }
  
--- 137,144 ----
                                . "VALUES ('" . time() . "','" . $owner['name']
                                . "','" . $owner['cat_id'] . 
"')",__LINE__,__FILE__);
! 
!                       $receipt['owner_id']= 
$this->db->get_last_insert_id('fm_owner','owner_id');
!                       $receipt['message'][] = array('msg'=>lang('owner %1 has 
been saved',$receipt['owner_id']));
!                       return $receipt;
                }
  
***************
*** 146,149 ****
--- 149,156 ----
                        $this->db->query("UPDATE fm_owner set name='" . 
$owner['name'] . "', entry_date='" . time() . "', category='"
                                                        . $owner['cat_id'] . "' 
WHERE owner_id=" . intval($owner['owner_id']),__LINE__,__FILE__);
+ 
+                       $receipt['owner_id']= $owner['owner_id'];
+                       $receipt['message'][] = array('msg'=>lang('owner %1 has 
been edited',$owner['owner_id']));
+                       return $receipt;
                }
  

Index: class.uiowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiowner.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.uiowner.inc.php       19 May 2003 11:04:36 -0000      1.2
--- class.uiowner.inc.php       20 May 2003 18:42:58 -0000      1.3
***************
*** 66,69 ****
--- 66,70 ----
                        $GLOBALS['phpgw']->xslttpl->add_file(array('owner',
                                                                                
'menu',
+                                                                               
'receipt',
                                                                                
'search_field',
                                                                                
'nextmatchs'));
***************
*** 71,75 ****
                        $links = $this->bocommon->menu();
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('owner') . ': ' . lang('list owner');
  
                        $owners_list = $this->bo->read();
--- 72,77 ----
                        $links = $this->bocommon->menu();
  
!                       $receipt = 
$GLOBALS['phpgw']->session->appsession('session_data','owner_receipt');
!                       
$GLOBALS['phpgw']->session->appsession('session_data','owner_receipt','');
  
                        $owners_list = $this->bo->read();
***************
*** 172,178 ****
--- 174,182 ----
                        }
  
+                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
+                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'links'                                         
        => $links,
                                'allow_allrows'                                 
=> true,
***************
*** 200,203 ****
--- 204,209 ----
                        );
                        $this->save_sessiondata();
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('owner') . ': ' . lang('list owner');
+ 
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
                }
***************
*** 208,235 ****
                        $values         = get_var('values',array('POST'));
  
                        if (is_array($values))
                        {
!                               if ($values['save'])
!                               {
!                                       $values['owner_id']     = $owner_id;
!                                       $owner_id = $this->bo->save($values);
!                                       $this->cat_id = 
($values['cat_id']?$values['cat_id']:$this->cat_id);
!                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
!                               }
!                               elseif($values['cancel'])
                                {
!                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
                                }
                                else
                                {
!                                       $values['owner_id']     = $owner_id;
!                                       $owner_id                       = 
$this->bo->save($values);
!                                       $action                         = 
'apply';
                                }
                        }
  
-                       $GLOBALS['phpgw']->xslttpl->add_file('owner');
- 
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('owner') . ': ' . ($owner_id?lang('edit owner'):lang('add owner'));
  
                        if ($owner_id)
--- 214,254 ----
                        $values         = get_var('values',array('POST'));
  
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('owner','receipt'));
+ 
                        if (is_array($values))
                        {
!                               if ($values['save'] || $values['apply'])
                                {
! 
!                                       if(!$values['cat_id'])
!                                       {
!                                               
$receipt['error'][]=array('msg'=>lang('Please select a category !'));
!                                       }
! 
!                                       if(!$values['name'])
!                                       {
!                                               
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
!                                       }
! 
!                                       if(!$receipt['error'])
!                                       {
!                                               $values['owner_id']     = 
$owner_id;
!                                               $receipt = 
$this->bo->save($values);
!                                               $owner_id = 
$receipt['owner_id'];
!                                               $this->cat_id = 
($values['cat_id']?$values['cat_id']:$this->cat_id);
! 
!                                               if ($values['save'])
!                                               {
!                                                       
$GLOBALS['phpgw']->session->appsession('session_data','owner_receipt',$receipt);
!                                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
!                                               }
!                                       }
                                }
                                else
                                {
!                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiowner.index');
                                }
                        }
  
  
                        if ($owner_id)
***************
*** 244,253 ****
                                'owner_id'              => $owner_id
                        );
  
                        $data = array
                        (
!                               'msgbox_data'                                   
=> (($action=='apply')?$GLOBALS['phpgw']->common->msgbox('owner has been 
saved',True):''),
                                'edit_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'lang_name'                                     
=> lang('name'),
                                'lang_category'                                 
=> lang('category'),
                                'lang_save'                                     
        => lang('save'),
--- 263,277 ----
                                'owner_id'              => $owner_id
                        );
+ //_debug_array($link_data);
+ 
+                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
!                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'edit_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'lang_owner_id'                                 
=> lang('Owner ID'),
!                               'value_owner_id'                                
=> $owner_id,
!                               'lang_name'                                     
        => lang('name'),
                                'lang_category'                                 
=> lang('category'),
                                'lang_save'                                     
        => lang('save'),
***************
*** 265,276 ****
                                'cat_list'                                      
        => $this->bo->select_category_list('select',$this->cat_id)
                        );
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                }
  
                function delete()
                {
                        $owner_id       = 
get_var('owner_id',array('POST','GET'));
                        $delete         = get_var('delete',array('POST'));
!                       $cancel         = get_var('cancel',array('POST'));
  
                        $link_data = array
--- 289,303 ----
                                'cat_list'                                      
        => $this->bo->select_category_list('select',$this->cat_id)
                        );
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('owner') . ': ' . ($owner_id?lang('edit owner'):lang('add owner'));
+ 
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                }
  
+ 
                function delete()
                {
                        $owner_id       = 
get_var('owner_id',array('POST','GET'));
                        $delete         = get_var('delete',array('POST'));
!                       $confirm        = get_var('confirm',array('POST'));
  
                        $link_data = array
***************
*** 279,309 ****
                        );
  
!                       if ($_POST['delete'])
                        {
                                $this->bo->delete($owner_id);
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }
  
!                       if ($_POST['cancel'])
!                       {
!                               
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
!                       }
! 
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_delete'));
! 
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('owner') . ': ' . lang('delete owner');
  
                        $data = array
                        (
!                               'delete_url'                            => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiowner.delete&owner_id='
 . $owner_id),
!                               'lang_delete_msg'                       => 
lang('do you really want to delete this owner ?'),
!                               'lang_delete'                           => 
lang('delete'),
!                               'lang_delete_statustext'        => lang('Delete 
the owner'),
!                               'lang_cancel_statustext'        => lang('Leave 
the owner untouched and return back to the list'),
!                               'lang_cancel'                           => 
lang('cancel')
                        );
  
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
                }
  
                function view()
--- 306,337 ----
                        );
  
!                       if (get_var('confirm',array('POST')))
                        {
                                $this->bo->delete($owner_id);
+ //                            Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }
  
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('app_delete'));
  
                        $data = array
                        (
!                               'done_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'delete_action'                 => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiowner.delete&owner_id='
 . $owner_id),
!                               'lang_confirm_msg'              => lang('do you 
really want to delete this entry'),
!                               'lang_yes'                              => 
lang('yes'),
!                               'lang_yes_statustext'   => lang('Delete the 
entry'),
!                               'lang_no_statustext'    => lang('Back to the 
list'),
!                               'lang_no'                               => 
lang('no')
                        );
  
+                       $appname                                                
= lang('owner');
+                       $function_msg                                   = 
lang('delete owner');
+ 
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
                }
+ 
+ 
  
                function view()





reply via email to

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