phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: nomail
Subject: [Phpgroupware-cvs] property/class.uistandard_2.php, 1.1.1.3
Date: Sun, 23 May 2004 09:20:42 -0000

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

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

Log Message:
no message
=====================================================================
Index: property/class.uistandard_2.php
diff -u property/class.uistandard_2.php:1.1.1.2 
property/class.uistandard_2.php:1.1.1.3
--- property/class.uistandard_2.php:1.1.1.2     Fri Apr 23 20:26:54 2004
+++ property/class.uistandard_2.php     Fri Apr 23 21:26:42 2004
@@ -1,272 +1,272 @@
-<?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.                                            
   *
-       
\**************************************************************************/
-
-       class property_uistandard_2
-       {
-               var $grants;
-               var $start;
-               var $query;
-               var $sort;
-               var $order;
-               var $sub;
-               var $currentapp;
-
-               var $public_functions = array
-               (
-                       'index'  => True,
-                       'view'   => True,
-                       'edit'   => True,
-                       'delete' => True
-               );
-
-               function property_uistandard_2()
-               {
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       $this->currentapp                       = 'property'; 
//$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->account                          = 
$GLOBALS['phpgw_data']['user']['id'];
-                       $this->bo                                       = 
CreateObject($this->currentapp.'_bostandard_2',True);
-                       $this->bocommon                         = 
CreateObject($this->currentapp.'_bocommon');
-
-                       $this->start                            = 
$this->bo->start;
-                       $this->query                            = 
$this->bo->query;
-                       $this->sort                                     = 
$this->bo->sort;
-                       $this->order                            = 
$this->bo->order;
-                       $this->allrows                          = 
$this->bo->allrows;
-               }
-
-               function save_sessiondata()
-               {
-                       $data = array
-                       (
-                               'start'         => $this->start,
-                               'query'         => $this->query,
-                               'sort'          => $this->sort,
-                               'order'         => $this->order,
-                               'allrows'       => $this->allrows,
-                       );
-                       $this->bo->save_sessiondata($data);
-               }
-
-               function index()
-               {
-                       $type   = get_var('type',array('POST','GET'));
-
-                       
$this->bocommon->xsl_add_file(array('standard_2','nextmatchs',
-                                                                               
'search_field'));
-
-                       $standard_list = $this->bo->read($type);
-
-                       while (is_array($standard_list) && list(,$standard) = 
each($standard_list))
-                       {
-                               $words = split(' ',$standard['descr']);
-                               $first = "$words[0] $words[1] $words[2] 
$words[3]";
-
-                               $content[] = array
-                               (
-                                       'id'                                    
=> $standard['id'],
-                                       'first'                                 
        => $first,
-                                       'link_edit'                             
        => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.edit&id='
 . $standard['id'].'&type='.$type),
-                                       'link_delete'                           
=> 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.delete&id='
 . $standard['id'].'&type='.$type),
-                                       'lang_view_standardtext'        => 
lang('view the standard'),
-                                       'lang_edit_standardtext'        => 
lang('edit the standard'),
-                                       'lang_delete_standardtext'      => 
lang('delete the standard'),
-                                       'text_view'                             
        => lang('view'),
-                                       'text_edit'                             
        => lang('edit'),
-                                       'text_delete'                           
=> lang('delete')
-                               );
-                       }
-
-//html_print_r($content);
-
-                       $table_header[] = array
-                       (
-
-                               'lang_descr'            => lang('Descr'),
-                               'lang_edit'                     => lang('edit'),
-                               'lang_delete'           => lang('delete'),
-                               'sort_id'       => 
$this->bocommon->show_sort_order(array
-                                                                               
(
-                                                                               
        'sort'  => $this->sort,
-                                                                               
        'var'   =>      'id',
-                                                                               
        'order' =>      $this->order,
-                                                                               
        'extra'         => array('sid=cookie&op'        => 
$this->currentapp.'.uistandard_2.index',
-                                                                               
                                                        'type'  =>$type)
-                                                                               
)),
-                               'lang_id'       => lang('standard id'),
-                       );
-
-                       $table_add[] = array
-                       (
-                               'lang_add'                              => 
lang('add'),
-                               'lang_add_standardtext' => lang('add a 
standard'),
-                               'add_action'                    => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.edit&type='.$type),
-                               'lang_done'                             => 
lang('done'),
-                               'lang_done_standardtext'        => lang('back 
to admin'),
-                               'done_action'                   => 
$this->bocommon->link('/admin/index.php')
-                       );
-
-                       if(!$this->allrows)
-                       {
-                               $record_limit   = 15; 
//$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-                       }
-                       else
-                       {
-                               $record_limit   = $this->bo->total_records;
-                       }
-
-
-                       $data = array
-                       (
-                               'allow_allrows'                                 
=> True,
-                               'allrows'                                       
        => $this->allrows,
-                               'start_record'                                  
=> $this->start,
-                               'record_limit'                                  
=> $record_limit,
-                               'num_records'                                   
=> count($standard_list),
-                               'all_records'                                   
=> $this->bo->total_records,
-                               'link_url'                                      
        => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.index&type='.$type),
-                               'img_path'                                      
        => 
dirname($GLOBALS['HTTP_SERVER_VARS']['PHP_SELF']).'/api/skins/default/images',
-                               'lang_searchfield_standardtext' => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
-                               'lang_searchbutton_standardtext'        => 
lang('Submit the search string'),
-                               'query'                                         
        => $this->query,
-                               'lang_search'                                   
=> lang('search'),
-                               'table_header'                                  
=> $table_header,
-                               'values'                                        
        => $content,
-                               'table_add'                                     
        => $table_add
-                       );
-
-                       $appname                                                
= lang($type);
-                       $function_msg                                   = 
lang('list '.$type.' standard');
-
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-                       //$this->save_sessiondata();
-                       return array('list' => $data);
-               }
-
-               function edit()
-               {
-                       $type   = get_var('type',array('POST','GET'));
-                       $id     = get_var('id',array('POST','GET'));
-                       $values                 = 
get_var('values',array('POST'));
-
-                       $this->bocommon->xsl_add_file(array('standard_2'));
-
-                       if ($values['save'])
-                       {
-                               if($id)
-                               {
-                                       $values['id']=$id;
-                                       $action='edit';
-                               }
-                               else
-                               {
-                                       $id =   $values['id'];
-                               }
-
-
-                               $receipt = 
$this->bo->save($values,$action,$type);
-                       }
-
-                       if ($id)
-                       {
-                               $standard = $this->bo->read_single($id,$type);
-                               $function_msg = lang('edit standard');
-                               $action='edit';
-                       }
-                       else
-                       {
-                               $function_msg = lang('add standard');
-                               $action='add';
-                       }
-
-                       $link_data = array
-                       (
-                               'sid=cookie&op' => 
$this->currentapp.'.uistandard_2.edit',
-                               'id'    => $id,
-                               'type' => $type
-                       );
-//html_print_r($link_data);
-                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
-                       $data = array
-                       (
-                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
-                               'form_action'                                   
        => $this->bocommon->link('/index.php',$link_data),
-                               'done_action'                                   
        => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.index&type='.$type),
-                               'lang_id'                                       
                => lang('standard ID'),
-                               'lang_name'                                     
                => lang('name'),
-                               'lang_descr'                                    
        => lang('Descr'),
-                               'lang_save'                                     
                => lang('save'),
-                               'lang_done'                                     
                => lang('done'),
-                               'value_id'                                      
                => $id,
-                               'value_name'                                    
        => $standard['name'],
-                               'value_generaladdress'                          
=> $standard['general_address'],
-                               'lang_id_standardtext'                          
=> lang('Enter the standard ID'),
-                               'lang_descr_standardtext'                       
=> lang('Enter a description the standard'),
-                               'lang_generaladdress_standardtext'      => 
lang('Enter the general address'),
-                               'lang_done_standardtext'                        
=> lang('Back to the list'),
-                               'lang_save_standardtext'                        
=> lang('Save the standard'),
-                               'type_id'                                       
                => $standard['type_id'],
-                               'location_code'                                 
        => $standard['location_code'],
-                               'value_descr'                                   
        => $standard['descr']
-                       );
-
-                       $appname                                                
= lang($type);
-
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-                       return array('edit' => $data);
-               }
-
-               function delete()
-               {
-                       $type   = get_var('type',array('POST','GET'));
-                       $id             = get_var('id',array('POST','GET'));
-                       $confirm                = 
get_var('confirm',array('POST'));
-
-                       $link_data = array
-                       (
-                               'sid=cookie&op' => 
$this->currentapp.'.uistandard_2.index',
-                               'type' => $type
-                       );
-
-                       if (get_var('confirm',array('POST')))
-                       {
-                               $this->bo->delete($id,$type);
-                               Header('Location: ' . 
$this->bocommon->link('/index.php',$link_data));
-                       }
-
-                       $this->bocommon->xsl_add_file(array('app_delete'));
-
-                       $data = array
-                       (
-                               'done_action'                   => 
$this->bocommon->link('/index.php',$link_data),
-                               'delete_action'                 => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.delete&id='
 . $id.'&type='.$type),
-                               'lang_confirm_msg'              => lang('do you 
really want to delete this entry'),
-                               'lang_yes'                              => 
lang('yes'),
-                               'lang_yes_standardtext' => lang('Delete the 
entry'),
-                               'lang_no_standardtext'  => lang('Back to the 
list'),
-                               'lang_no'                               => 
lang('no')
-                       );
-
-                       $appname                                                
= lang($type);
-                       $function_msg                                   = 
lang('delete '.$type.' standard');
-
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-                       return array('delete' => $data);
-               }
-
-       }
-?>
+<?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.                                            
   *
+       
\**************************************************************************/
+
+       class property_uistandard_2
+       {
+               var $grants;
+               var $start;
+               var $query;
+               var $sort;
+               var $order;
+               var $sub;
+               var $currentapp;
+
+               var $public_functions = array
+               (
+                       'index'  => True,
+                       'view'   => True,
+                       'edit'   => True,
+                       'delete' => True
+               );
+
+               function property_uistandard_2()
+               {
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
+                       $this->currentapp                       = 'property'; 
//$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       $this->account                          = 
$GLOBALS['phpgw_data']['user']['id'];
+                       $this->bo                                       = 
CreateObject($this->currentapp.'_bostandard_2',True);
+                       $this->bocommon                         = 
CreateObject($this->currentapp.'_bocommon');
+
+                       $this->start                            = 
$this->bo->start;
+                       $this->query                            = 
$this->bo->query;
+                       $this->sort                                     = 
$this->bo->sort;
+                       $this->order                            = 
$this->bo->order;
+                       $this->allrows                          = 
$this->bo->allrows;
+               }
+
+               function save_sessiondata()
+               {
+                       $data = array
+                       (
+                               'start'         => $this->start,
+                               'query'         => $this->query,
+                               'sort'          => $this->sort,
+                               'order'         => $this->order,
+                               'allrows'       => $this->allrows,
+                       );
+                       $this->bo->save_sessiondata($data);
+               }
+
+               function index()
+               {
+                       $type   = get_var('type',array('POST','GET'));
+
+                       
$this->bocommon->xsl_add_file(array('standard_2','nextmatchs',
+                                                                               
'search_field'));
+
+                       $standard_list = $this->bo->read($type);
+
+                       while (is_array($standard_list) && list(,$standard) = 
each($standard_list))
+                       {
+                               $words = split(' ',$standard['descr']);
+                               $first = "$words[0] $words[1] $words[2] 
$words[3]";
+
+                               $content[] = array
+                               (
+                                       'id'                                    
=> $standard['id'],
+                                       'first'                                 
        => $first,
+                                       'link_edit'                             
        => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.edit&id='
 . $standard['id'].'&type='.$type),
+                                       'link_delete'                           
=> 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.delete&id='
 . $standard['id'].'&type='.$type),
+                                       'lang_view_standardtext'        => 
lang('view the standard'),
+                                       'lang_edit_standardtext'        => 
lang('edit the standard'),
+                                       'lang_delete_standardtext'      => 
lang('delete the standard'),
+                                       'text_view'                             
        => lang('view'),
+                                       'text_edit'                             
        => lang('edit'),
+                                       'text_delete'                           
=> lang('delete')
+                               );
+                       }
+
+//html_print_r($content);
+
+                       $table_header[] = array
+                       (
+
+                               'lang_descr'            => lang('Descr'),
+                               'lang_edit'                     => lang('edit'),
+                               'lang_delete'           => lang('delete'),
+                               'sort_id'       => 
$this->bocommon->show_sort_order(array
+                                                                               
(
+                                                                               
        'sort'  => $this->sort,
+                                                                               
        'var'   =>      'id',
+                                                                               
        'order' =>      $this->order,
+                                                                               
        'extra'         => array('sid=cookie&op'        => 
$this->currentapp.'.uistandard_2.index',
+                                                                               
                                                        'type'  =>$type)
+                                                                               
)),
+                               'lang_id'       => lang('standard id'),
+                       );
+
+                       $table_add[] = array
+                       (
+                               'lang_add'                              => 
lang('add'),
+                               'lang_add_standardtext' => lang('add a 
standard'),
+                               'add_action'                    => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.edit&type='.$type),
+                               'lang_done'                             => 
lang('done'),
+                               'lang_done_standardtext'        => lang('back 
to admin'),
+                               'done_action'                   => 
$this->bocommon->link('/admin/index.php')
+                       );
+
+                       if(!$this->allrows)
+                       {
+                               $record_limit   = 15; 
//$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $record_limit   = $this->bo->total_records;
+                       }
+
+
+                       $data = array
+                       (
+                               'allow_allrows'                                 
=> True,
+                               'allrows'                                       
        => $this->allrows,
+                               'start_record'                                  
=> $this->start,
+                               'record_limit'                                  
=> $record_limit,
+                               'num_records'                                   
=> count($standard_list),
+                               'all_records'                                   
=> $this->bo->total_records,
+                               'link_url'                                      
        => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.index&type='.$type),
+                               'img_path'                                      
        => 
dirname($GLOBALS['HTTP_SERVER_VARS']['PHP_SELF']).'/api/skins/default/images',
+                               'lang_searchfield_standardtext' => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
+                               'lang_searchbutton_standardtext'        => 
lang('Submit the search string'),
+                               'query'                                         
        => $this->query,
+                               'lang_search'                                   
=> lang('search'),
+                               'table_header'                                  
=> $table_header,
+                               'values'                                        
        => $content,
+                               'table_add'                                     
        => $table_add
+                       );
+
+                       $appname                                                
= lang($type);
+                       $function_msg                                   = 
lang('list '.$type.' standard');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+                       //$this->save_sessiondata();
+                       return array('list' => $data);
+               }
+
+               function edit()
+               {
+                       $type   = get_var('type',array('POST','GET'));
+                       $id     = get_var('id',array('POST','GET'));
+                       $values                 = 
get_var('values',array('POST'));
+
+                       $this->bocommon->xsl_add_file(array('standard_2'));
+
+                       if ($values['save'])
+                       {
+                               if($id)
+                               {
+                                       $values['id']=$id;
+                                       $action='edit';
+                               }
+                               else
+                               {
+                                       $id =   $values['id'];
+                               }
+
+
+                               $receipt = 
$this->bo->save($values,$action,$type);
+                       }
+
+                       if ($id)
+                       {
+                               $standard = $this->bo->read_single($id,$type);
+                               $function_msg = lang('edit standard');
+                               $action='edit';
+                       }
+                       else
+                       {
+                               $function_msg = lang('add standard');
+                               $action='add';
+                       }
+
+                       $link_data = array
+                       (
+                               'sid=cookie&op' => 
$this->currentapp.'.uistandard_2.edit',
+                               'id'    => $id,
+                               'type' => $type
+                       );
+//html_print_r($link_data);
+                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+                       $data = array
+                       (
+                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'form_action'                                   
        => $this->bocommon->link('/index.php',$link_data),
+                               'done_action'                                   
        => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.index&type='.$type),
+                               'lang_id'                                       
                => lang('standard ID'),
+                               'lang_name'                                     
                => lang('name'),
+                               'lang_descr'                                    
        => lang('Descr'),
+                               'lang_save'                                     
                => lang('save'),
+                               'lang_done'                                     
                => lang('done'),
+                               'value_id'                                      
                => $id,
+                               'value_name'                                    
        => $standard['name'],
+                               'value_generaladdress'                          
=> $standard['general_address'],
+                               'lang_id_standardtext'                          
=> lang('Enter the standard ID'),
+                               'lang_descr_standardtext'                       
=> lang('Enter a description the standard'),
+                               'lang_generaladdress_standardtext'      => 
lang('Enter the general address'),
+                               'lang_done_standardtext'                        
=> lang('Back to the list'),
+                               'lang_save_standardtext'                        
=> lang('Save the standard'),
+                               'type_id'                                       
                => $standard['type_id'],
+                               'location_code'                                 
        => $standard['location_code'],
+                               'value_descr'                                   
        => $standard['descr']
+                       );
+
+                       $appname                                                
= lang($type);
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+                       return array('edit' => $data);
+               }
+
+               function delete()
+               {
+                       $type   = get_var('type',array('POST','GET'));
+                       $id             = get_var('id',array('POST','GET'));
+                       $confirm                = 
get_var('confirm',array('POST'));
+
+                       $link_data = array
+                       (
+                               'sid=cookie&op' => 
$this->currentapp.'.uistandard_2.index',
+                               'type' => $type
+                       );
+
+                       if (get_var('confirm',array('POST')))
+                       {
+                               $this->bo->delete($id,$type);
+                               Header('Location: ' . 
$this->bocommon->link('/index.php',$link_data));
+                       }
+
+                       $this->bocommon->xsl_add_file(array('app_delete'));
+
+                       $data = array
+                       (
+                               'done_action'                   => 
$this->bocommon->link('/index.php',$link_data),
+                               'delete_action'                 => 
$this->bocommon->link('/index.php','sid=cookie&op='.$this->currentapp.'.uistandard_2.delete&id='
 . $id.'&type='.$type),
+                               'lang_confirm_msg'              => lang('do you 
really want to delete this entry'),
+                               'lang_yes'                              => 
lang('yes'),
+                               'lang_yes_standardtext' => lang('Delete the 
entry'),
+                               'lang_no_standardtext'  => lang('Back to the 
list'),
+                               'lang_no'                               => 
lang('no')
+                       );
+
+                       $appname                                                
= lang($type);
+                       $function_msg                                   = 
lang('delete '.$type.' standard');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+                       return array('delete' => $data);
+               }
+
+       }
+?>




reply via email to

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