phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bocategory.inc.php,NONE,1.1 c


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bocategory.inc.php,NONE,1.1 class.socategory.inc.php,NONE,1.1 class.uicategory.inc.php,NONE,1.1 class.botts.inc.php,1.9,1.10 class.sostandard_2.inc.php,1.13,1.14 class.sotts.inc.php,1.12,1.13 class.uidrawing.inc.php,1.13,1.14 class.uitts.inc.php,1.22,1.23 hook_admin.inc.php,1.28,1.29
Date: Thu, 08 May 2003 05:53:20 -0400

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

Modified Files:
        class.botts.inc.php class.sostandard_2.inc.php 
        class.sotts.inc.php class.uidrawing.inc.php 
        class.uitts.inc.php hook_admin.inc.php 
Added Files:
        class.bocategory.inc.php class.socategory.inc.php 
        class.uicategory.inc.php 
Log Message:
no message

--- NEW FILE ---
<?php
        
/***************************************************************************\
        * 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 bocategory
        {
                var $start;
                var $query;
                var $filter;
                var $sort;
                var $order;
                var $cat_id;

                var $public_functions = array
                (
                        'read'                          => True,
                        'read_single'           => True,
                        'save'                          => True,
                        'delete'                        => True,
                        'check_perms'           => True
                );

                var $soap_functions = array(
                        'list' => array(
                                'in'  => 
array('int','int','struct','string','int'),
                                'out' => array('array')
                        ),
                        'read' => array(
                                'in'  => array('int','struct'),
                                'out' => array('array')
                        ),
                        'save' => array(
                                'in'  => array('int','struct'),
                                'out' => array()
                        ),
                        'delete' => array(
                                'in'  => array('int','struct'),
                                'out' => array()
                        )
                );

                function bocategory($session=False)
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->so               = 
CreateObject($this->currentapp.'.socategory');
                        $this->socommon = 
CreateObject($this->currentapp.'.socommon');

                        $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'));
                        $allrows= get_var('allrows',array('POST','GET'));

                        if ($start)
                        {
                                $this->start=$start;
                        }
                        else
                        {
                                $this->start=0;
                        }

                        if(isset($query))
                        {
                                $this->query = $query;
                        }
                        if(!empty($filter))
                        {
                                $this->filter = $filter;
                        }
                        if(isset($sort))
                        {
                                $this->sort = $sort;
                        }
                        if(isset($order))
                        {
                                $this->order = $order;
                        }
                        if(isset($cat_id))
                        {
                                $this->cat_id = $cat_id;
                        }
                        if(isset($allrows))
                        {
                                $this->allrows = $allrows;
                        }
                }


                function read($type='')
                {
                        $standard = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'type' => $type,'allrows'=>$this->allrows));

                        $this->total_records = $this->so->total_records;

                        return $standard;
                }

                function read_single($id,$type)
                {
                        return $this->so->read_single($id,$type);
                }

                function select_part_of_town($part_of_town_id)
                {
                        return 
$this->socommon->select_part_of_town($part_of_town_id);
                }

                function save($standard,$action='',$type ='')
                {
                        if ($action=='edit')
                        {
                                if ($standard['id'] != '')
                                {

                                        $message = 
$this->so->edit($standard,$type);
                                }
                        }
                        else
                        {
                                $message = $this->so->add($standard,$type);
                        }
                        return $message;

                }

                function delete($id,$type)
                {
                        $this->so->delete($id,$type);
                }
        }
?>

--- NEW FILE ---
<?php
        
/***************************************************************************\
        * 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 socategory
        {
                var $grants;

                function socategory()
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
                        $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];

                        if 
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
                        {
                                $this->join = " JOIN ";
                        }
                        else
                        {
                                $this->join = " LEFT JOIN ";
                        }


                }

                function read($data)
                {
                        if(is_array($data))
                        {
                                if ($data['start'])
                                {
                                        $start=$data['start'];
                                }
                                else
                                {
                                        $start=0;
                                }
                                $query          = 
(isset($data['query'])?$data['query']:'');
                                $sort           = 
(isset($data['sort'])?$data['sort']:'DESC');
                                $order          = 
(isset($data['order'])?$data['order']:'');
                                $type           = 
(isset($data['type'])?$data['type']:0);
                                $allrows        = 
(isset($data['allrows'])?$data['allrows']:'');
                        }

                        if ($order)
                        {
                                $ordermethod = " order by $order $sort";

                        }
                        else
                        {
                                $ordermethod = ' order by id asc';
                        }

                        $table = $this->select_table($type);

                        if($query)
                        {
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);

                                $querymethod = " where id LIKE '%$query%' or 
descr LIKE '%$query%'";
                        }

                        $sql = "SELECT * FROM $table $querymethod";

                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();

                        if(!$allrows)
                        {
                                $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
                                $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
                        }

                        while ($this->db->next_record())
                        {
                                $standard[] = array
                                (
                                        'id'    => $this->db->f('id'),
                                        'descr'                 => 
$this->db->f('descr')
                                );
                        }
                        return $standard;
                }


                function select_table($type)
                {

                        switch($type)
                        {
                                case 'accounting':
                                        $table='fm_wo_accounts';
                                        break;
                                case 'dim_d':
                                        $table='fm_wo_dim_d';
                                        break;
                                case 'tender_chapter':
                                        $table='fm_wo_chapter';
                                        break;
                                case 'ticket':
                                        $table='fm_ticket_category';
                                        break;
                                case 'request':
                                        $table='fm_wo_request_category';
                                        break;
                                case 'wo':
                                        $table='fm_wo_workorder_category';
                                        break;
                                case 'property':
                                        $table='fm_property_category';
                                        break;
                                case 'building':
                                        $table='fm_building_category';
                                        break;
                                case 'entrance':
                                        $table='fm_entrance_category';
                                        break;
                                case 'apartment':
                                        $table='fm_apartment_category';
                                        break;
                                case 'drawing':
                                        $table='fm_drawing_category';
                                        break;
                                case 'meter':
                                        $table='fm_meter_category';
                                        break;
                                case 'document':
                                        $table='fm_document_category';
                                        break;
                        }

                        return $table;
                }


                function read_single($id,$type)
                {

                        $table = $this->select_table($type);

                        $sql = "SELECT * FROM $table  where id='$id'";

                        $this->db->query($sql,__LINE__,__FILE__);

                        if ($this->db->next_record())
                        {
                                $standard['id']                 = 
$this->db->f('id');
                                $standard['descr']                              
= $this->db->f('descr');

                                return $standard;
                        }
                }

                function add($standard,$type)
                {
                        $table = $this->select_table($type);

                        $standard['descr'] = 
$this->db->db_addslashes($standard['descr']);

                        $this->db->query("INSERT INTO $table (id, descr) "
                                . "VALUES ('" . $standard['id'] . "','" . 
$standard['descr']. "')",__LINE__,__FILE__);

                        $message = lang('standard has been saved');
                        return $message;
                }

                function edit($standard,$type)
                {

                        $table = $this->select_table($type);

                        $standard['descr'] = 
$this->db->db_addslashes($standard['descr']);

                        $this->db->query("UPDATE $table set descr='" . 
$standard['descr']
                                                        . "' WHERE id='" . 
$standard['id']. "'",__LINE__,__FILE__);

                        $message = lang('standard has been edited');
                        return $message;
                }

                function delete($id,$type)
                {
                        $table = $this->select_table($type);

                        $this->db->query("DELETE FROM $table WHERE id='" . $id 
. "'",__LINE__,__FILE__);
                }
        }
?>

--- NEW FILE ---
<?php
        
/***************************************************************************\
        * -------------------------------------------------                     
    *
        * 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 uicategory
        {
                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 uicategory()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
                        $this->currentapp                       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];

                        $this->grants                           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->grants[$this->account] = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
                        $this->bo                                       = 
CreateObject($this->currentapp.'.bocategory');
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon',True);

                        $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,
                        );
                        $this->bocommon->save_sessiondata($data);
                }

                function index()
                {
                        $type   = get_var('type',array('POST','GET'));

                        
$GLOBALS['phpgw']->xslttpl->add_file(array('category','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'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.edit&id='
 . $standard['id'].'&type='.$type),
                                        'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.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')
                                );
                        }

//_debug_array($content);

                        $table_header[] = array
                        (

                                'lang_descr'            => lang('Descr'),
                                'lang_edit'                     => lang('edit'),
                                'lang_delete'           => lang('delete'),
                                'sort_id'       => 
$this->nextmatchs->show_sort_order(array
                                                                                
(
                                                                                
        'sort'  => $this->sort,
                                                                                
        'var'   =>      'id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uicategory.index',
                                                                                
                                                        'type'  =>$type)
                                                                                
)),
                                'lang_id'       => lang('standard id'),
                        );

                        $table_add[] = array
                        (
                                'lang_add'                              => 
lang('add'),
                                'lang_add_standardtext' => lang('add a 
standard'),
                                'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.edit&type='.$type),
                                'lang_done'                             => 
lang('done'),
                                'lang_done_standardtext'        => lang('back 
to admin'),
                                'done_action'                   => 
$GLOBALS['phpgw']->link('/admin/index.php')
                        );

                        if(!$this->allrows)
                        {
                                $record_limit   = 
$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'                                      
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.index&type='.$type),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
                                '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;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
                        $this->save_sessiondata();
                }

                function edit()
                {
                        $type   = get_var('type',array('POST','GET'));
                        $id     = get_var('id',array('POST','GET'));
                        $values                 = 
get_var('values',array('POST'));

                        $GLOBALS['phpgw']->xslttpl->add_file(array('category'));

                        if ($values['save'])
                        {
                                if($id)
                                {
                                        $values['id']=$id;
                                        $action='edit';
                                }
                                else
                                {
                                        $id =   $values['id'];
                                }


                                $message = 
$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
                        (
                                'menuaction'    => 
$this->currentapp.'.uicategory.edit',
                                'id'    => $id,
                                'type' => $type
                        );
//_debug_array($link_data);
                        $data = array
                        (
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.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'],
                                'message'                                       
        => $message,
                                '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;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',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
                        (
                                'menuaction' => 
$this->currentapp.'.uicategory.index',
                                'type' => $type
                        );

                        if (get_var('confirm',array('POST')))
                        {
                                $this->bo->delete($id,$type);
                                Header('Location: ' . 
$GLOBALS['phpgw']->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.'.uicategory.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;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
                }

        }
?>

Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.botts.inc.php 3 May 2003 06:02:17 -0000       1.9
--- class.botts.inc.php 8 May 2003 09:53:16 -0000       1.10
***************
*** 217,220 ****
--- 217,262 ----
                }
  
+               function select_category_list($format='',$selected='')
+               {
+                       switch($format)
+                       {
+                               case 'select':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
+                                       break;
+                               case 'filter':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
+                                       break;
+                       }
+ 
+                       $categories= $this->so->select_category_list();
+ 
+                       while (is_array($categories) && list(,$category) = 
each($categories))
+                       {
+                               $sel_category = '';
+                               if ($category['id']==$selected)
+                               {
+                                       $sel_category = 'selected';
+                               }
+ 
+                               $category_list[] = array
+                               (
+                                       'cat_id'        => $category['id'],
+                                       'name'          => $category['name'],
+                                       'selected'      => $sel_category
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($category_list);$i++)
+                       {
+                               if ($category_list[$i]['selected'] != 
'selected')
+                               {
+                                       unset($category_list[$i]['selected']);
+                               }
+                       }
+ 
+                       return $category_list;
+               }
+ 
+ 
                function read()
                {

Index: class.sostandard_2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_2.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.sostandard_2.inc.php  29 Apr 2003 12:41:31 -0000      1.13
--- class.sostandard_2.inc.php  8 May 2003 09:53:16 -0000       1.14
***************
*** 113,149 ****
                                        $table='fm_wo_agreement_status';
                                        break;
-                               case 'accounting':
-                                       $table='fm_wo_accounts';
-                                       break;
-                               case 'dim_d':
-                                       $table='fm_wo_dim_d';
-                                       break;
-                               case 'request_type':
-                                       $table='fm_request_type';
-                                       break;
-                               case 'tender_chapter':
-                                       $table='fm_wo_chapter';
-                                       break;
                                case 'building_part':
                                        $table='fm_building_part';
                                        break;
-                               case 'wo':
-                                       $table='fm_wo_workorder_category';
-                                       break;
-                               case 'property':
-                                       $table='fm_property_category';
-                                       break;
-                               case 'building':
-                                       $table='fm_building_category';
-                                       break;
-                               case 'entrance':
-                                       $table='fm_entrance_category';
-                                       break;
-                               case 'apartment':
-                                       $table='fm_apartment_category';
-                                       break;
-                               case 'drawing':
-                                       $table='fm_drawing_category';
-                                       break;
                                case 'drawing_status':
                                        $table='fm_drawing_status';
--- 113,119 ----
***************
*** 155,165 ****
                                        $table='fm_standard_unit';
                                        break;
-                               case 'meter':
-                                       $table='fm_meter_category';
-                                       break;
-                               case 'document':
-                                       $table='fm_document_category';
-                                       break;
- 
                        }
  
--- 125,128 ----

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.sotts.inc.php 10 Apr 2003 10:14:27 -0000      1.12
--- class.sotts.inc.php 8 May 2003 09:53:16 -0000       1.13
***************
*** 32,35 ****
--- 32,50 ----
                }
  
+               function select_category_list()
+               {
+                       $this->db->query("SELECT id, descr FROM 
fm_ticket_category  ORDER BY descr ");
+ 
+                       $i = 0;
+                       while ($this->db->next_record())
+                       {
+                               $categories[$i]['id']                           
= $this->db->f('id');
+                               $categories[$i]['name']                         
= stripslashes($this->db->f('descr'));
+                               $i++;
+                       }
+                       return $categories;
+               }
+ 
+ 
                function read($data)
                {

Index: class.uidrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidrawing.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.uidrawing.inc.php     29 Apr 2003 12:41:31 -0000      1.13
--- class.uidrawing.inc.php     8 May 2003 09:53:16 -0000       1.14
***************
*** 194,201 ****
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category_list('filter',$this->cat_id),
!                               'district_list'                                 
=> $this->bocommon->select_district_list('filter',$this->district_id),
!                               'lang_no_district'                              
=> lang('no district'),
!                               'lang_district_statustext'              => 
lang('Select the district the selection belongs to. To do not use a district 
select NO DISTRICT'),
!                               'select_district_name'                  => 
'district_id',
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
  
--- 194,201 ----
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category_list('filter',$this->cat_id),
!       //                      'district_list'                                 
=> $this->bocommon->select_district_list('filter',$this->district_id),
!       //                      'lang_no_district'                              
=> lang('no district'),
!       //                      'lang_district_statustext'              => 
lang('Select the district the selection belongs to. To do not use a district 
select NO DISTRICT'),
!       //                      'select_district_name'                  => 
'district_id',
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
  

Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** class.uitts.inc.php 29 Apr 2003 12:41:31 -0000      1.22
--- class.uitts.inc.php 8 May 2003 09:53:16 -0000       1.23
***************
*** 215,219 ****
                                'lang_cat_statustext'                   => 
lang('Select the category the ticket belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('selected' => 
$this->cat_id,'globals' => True)),
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'filter_name'                                   
=> 'filter',
--- 215,219 ----
                                'lang_cat_statustext'                   => 
lang('Select the category the ticket belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => $this->bo->select_category_list('filter',$this->cat_id),
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'filter_name'                                   
=> 'filter',
***************
*** 352,356 ****
                                'lang_part_of_town'                             
=> lang('Part of town'),
                                'lang_no_part_of_town'                  => 
lang('No part of town'),
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('format' => 
'select','selected' => $values['cat_id'],'globals' => True))
                        );
  
--- 352,356 ----
                                'lang_part_of_town'                             
=> lang('Part of town'),
                                'lang_no_part_of_town'                  => 
lang('No part of town'),
!                               'cat_list'                                      
        => $this->bo->select_category_list('select',$this->cat_id)
                        );
  
***************
*** 521,525 ****
                                'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'values[cat_id]',
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('format' => 
'select','selected' => $ticket['cat_id'],'globals' => True)),
                                'lang_category'                                 
=> lang('category'),
                                'value_category_name'                   => 
$ticket['category_name'],
--- 521,525 ----
                                'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'values[cat_id]',
!                               'cat_list'                                      
        => $this->bo->select_category_list('select',$this->cat_id),
                                'lang_category'                                 
=> lang('category'),
                                'value_category_name'                   => 
$ticket['category_name'],

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** hook_admin.inc.php  29 Apr 2003 12:41:31 -0000      1.28
--- hook_admin.inc.php  8 May 2003 09:53:16 -0000       1.29
***************
*** 14,31 ****
                        $file = array
                        (
-       //                      'Global Categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname),
-                               'Workorder Categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=wo'),
-                               'Ticket Categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=p_ticket'),
-                               'Documentation Categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=p_documentation'),
                                'Configuration' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' 
. $appname),
                                'Equipment type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=equipment'),
                                'Location type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=location'),
                                'Update the not active category for 
locations'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiproperty.update_cat'),
!                               'Property Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=property'),
!                               'Building Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=building'),
!                               'Entrance Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=entrance'),
!                               'Apartment Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=apartment'),
!                               'Drawing Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=drawing'),
!                               'Document Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=document'),
                                'Document Status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=document_status'),
                                'Drawing Status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=drawing_status'),
--- 14,30 ----
                        $file = array
                        (
                                'Configuration' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' 
. $appname),
                                'Equipment type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=equipment'),
                                'Location type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=location'),
                                'Update the not active category for 
locations'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiproperty.update_cat'),
!                               'Request Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=request'),
!                               'Workorder Categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=wo'),
!                               'Ticket Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=ticket'),
!                               'Property Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=property'),
!                               'Building Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=building'),
!                               'Entrance Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=entrance'),
!                               'Apartment Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=apartment'),
!                               'Drawing Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=drawing'),
!                               'Document Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=document'),
                                'Document Status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=document_status'),
                                'Drawing Status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=drawing_status'),
***************
*** 34,38 ****
                                'Building Part'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=building_part'),
                                'Workorder template'=> 
$GLOBALS['phpgw']->link('/property/list_wo_template.php'),
!                               'Tender chapter'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=tender_chapter'),
                                'ID Controle'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.edit_id'),
                                'Permissions'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.list_acl2'),
--- 33,37 ----
                                'Building Part'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=building_part'),
                                'Workorder template'=> 
$GLOBALS['phpgw']->link('/property/list_wo_template.php'),
!                               'Tender chapter'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=tender_chapter'),
                                'ID Controle'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.edit_id'),
                                'Permissions'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.list_acl2'),
***************
*** 42,53 ****
                                'Unit'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=unit'),
                                'Request status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=request_status'),
-                               'Request type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=request_type'),
                                'Key location'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_3.index&type=key_location'),
                                'Branch'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_3.index&type=branch'),
!                               'Accounting'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=accounting'),
!                               'Accounting extra'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=dim_d'),
!                               'Invoice Import'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiXport.import&sub=p_invoice'),
!                               'Invoice export'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiXport.export&sub=p_invoice'),
!       //                      'Import workorder from FacilityCenter'=> 
$GLOBALS['phpgw']->link('/property/import_fc_workorder.php')
                        );
                        
$GLOBALS['phpgw']->common->display_mainscreen($appname,$file);
--- 41,50 ----
                                'Unit'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=unit'),
                                'Request status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=request_status'),
                                'Key location'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_3.index&type=key_location'),
                                'Branch'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_3.index&type=branch'),
!                               'Accounting'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=accounting'),
!                               'Accounting extra'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=dim_d'),
!                               'Import'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiXport.import'),
!                               'Export'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiXport.export')
                        );
                        
$GLOBALS['phpgw']->common->display_mainscreen($appname,$file);





reply via email to

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