phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: nomail
Subject: [Phpgroupware-cvs] property/class.boadmin_location.php, 1.1.1.3
Date: Fri, 21 May 2004 15:29:32 -0000

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

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

Log Message:
no message
=====================================================================
Index: property/class.boadmin_location.php
diff -u property/class.boadmin_location.php:1.1.1.2 
property/class.boadmin_location.php:1.1.1.3
--- property/class.boadmin_location.php:1.1.1.2 Fri Apr 23 20:25:07 2004
+++ property/class.boadmin_location.php Fri Apr 23 21:26:33 2004
@@ -1,306 +1,306 @@
-<?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_boadmin_location
-       {
-               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 property_boadmin_location($session=False)
-               {
-                       $this->currentapp       = 'property'; 
//$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->so               = 
CreateObject($this->currentapp.'_soadmin_location');
-                       $this->bocommon = 
CreateObject($this->currentapp.'_bocommon');
-                       $this->fm_session       = 
CreateObject($this->currentapp.'_session');
-
-                       if ($session)
-                       {
-                               $this->read_sessiondata();
-                               $this->use_session = True;
-                       }
-
-                       $start  = get_var('start',array('POST','GET'));
-                       $query  = get_var('query',array('POST','GET'));
-                       $sort   = get_var('sort',array('POST','GET'));
-                       $order  = get_var('order',array('POST','GET'));
-                       $filter = get_var('filter',array('POST','GET'));
-                       $cat_id = get_var('cat_id',array('POST','GET'));
-                       $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 save_sessiondata($data)
-               {
-                       if ($this->use_session)
-                       {
-                               
$this->fm_session->appsession('session_data','standard_e',$data);
-                       }
-               }
-
-               function read_sessiondata()
-               {
-                       $data = 
$this->fm_session->appsession('session_data','standard_e');
-
-
-                       $this->start    = $data['start'];
-                       $this->query    = $data['query'];
-                       $this->filter   = $data['filter'];
-                       $this->sort             = $data['sort'];
-                       $this->order    = $data['order'];
-                       $this->cat_id   = $data['cat_id'];
-               }
-
-               function reset_fm_cache()
-               {
-                       $this->so->reset_fm_cache();
-               }
-
-
-               function read()
-               {
-                       $standard = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order));
-
-                       $this->total_records = $this->so->total_records;
-
-
-                       return $standard;
-               }
-
-               function read_config()
-               {
-                       $standard = $this->so->read_config(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order));
-
-                       $this->total_records = $this->so->total_records;
-
-
-                       return $standard;
-               }
-
-               function read_config_single($column_name)
-               {
-                       return $this->so->read_config_single($column_name);
-               }
-
-               function read_single($id)
-               {
-                       return $this->so->read_single($id);
-               }
-
-               function save($standard,$action='')
-               {
-                       if ($action=='edit')
-                       {
-                               if ($standard['id'] != '')
-                               {
-
-                                       $receipt = $this->so->edit($standard);
-                               }
-                       }
-                       else
-                       {
-                               $receipt = $this->so->add($standard);
-                       }
-                       return $receipt;
-
-               }
-
-               function delete($id,$attrib)
-               {
-                       $this->so->delete($id,$attrib);
-               }
-
-               function read_attrib($type_id='')
-               {
-                       $attrib = $this->so->read_attrib(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                                                                               
        'type_id' => $type_id,'allrows'=>$this->allrows));
-
-                       for ($i=0; $i<count($attrib); $i++)
-                       {
-                               $attrib[$i]['datatype'] = 
$this->bocommon->translate_datatype($attrib[$i]['datatype']);
-                       }
-
-                       $this->total_records = $this->so->total_records;
-
-                       return $attrib;
-               }
-
-               function read_single_attrib($type_id,$id)
-               {
-                       return $this->so->read_single_attrib($type_id,$id);
-               }
-
-               function resort_attrib($data)
-               {
-                       $this->so->resort_attrib($data);
-               }
-
-               function save_attrib($attrib,$action='')
-               {
-                       if ($action=='edit')
-                       {
-                               if ($attrib['id'] != '')
-                               {
-
-                                       $receipt = 
$this->so->edit_attrib($attrib);
-                               }
-                       }
-                       else
-                       {
-                               $receipt = $this->so->add_attrib($attrib);
-                       }
-                       return $receipt;
-               }
-
-               function save_config($values='',$column_name='')
-               {
-                               return 
$this->so->save_config($values,$column_name);
-               }
-
-               function select_location_type($selected='')
-               {
-                       $location_types= $this->so->select_location_type();
-
-                       while (is_array($location_types) && list(,$type) = 
each($location_types))
-                       {
-                               $sel_type = '';
-                               if ($type['id']==$selected)
-                               {
-                                       $sel_type = 'selected';
-                               }
-
-                               $location_type_list[] = array
-                               (
-                                       'id'    => $type['id'],
-                                       'name'          => $type['name'],
-                                       'selected'      => $sel_type
-                               );
-                       }
-
-                       for ($i=0;$i<count($location_type_list);$i++)
-                       {
-                               if ($location_type_list[$i]['selected'] != 
'selected')
-                               {
-                                       
unset($location_type_list[$i]['selected']);
-                               }
-                       }
-
-//html_print_r($location_type_list);
-                       return $location_type_list;
-               }
-
-               function select_nullable($selected='')
-               {
-                       $nullable[0]['id']= 'True';
-                       $nullable[0]['name']= lang('True');
-                       $nullable[1]['id']= 'False';
-                       $nullable[1]['name']= lang('False');
-
-                       while (is_array($nullable) && list(,$type) = 
each($nullable))
-                       {
-                               $sel_type = '';
-                               if ($type['id']==$selected)
-                               {
-                                       $sel_type = 'selected';
-                               }
-
-                               $nullable_list[] = array
-                               (
-                                       'id'    => $type['id'],
-                                       'name'          => $type['name'],
-                                       'selected'      => $sel_type
-                               );
-                       }
-
-                       for ($i=0;$i<count($nullable_list);$i++)
-                       {
-                               if ($nullable_list[$i]['selected'] != 
'selected')
-                               {
-                                       unset($nullable_list[$i]['selected']);
-                               }
-                       }
-                       return $nullable_list;
-               }
-
-
-       }
-?>
+<?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_boadmin_location
+       {
+               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 property_boadmin_location($session=False)
+               {
+                       $this->currentapp       = 'property'; 
//$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       $this->so               = 
CreateObject($this->currentapp.'_soadmin_location');
+                       $this->bocommon = 
CreateObject($this->currentapp.'_bocommon');
+                       $this->fm_session       = 
CreateObject($this->currentapp.'_session');
+
+                       if ($session)
+                       {
+                               $this->read_sessiondata();
+                               $this->use_session = True;
+                       }
+
+                       $start  = get_var('start',array('POST','GET'));
+                       $query  = get_var('query',array('POST','GET'));
+                       $sort   = get_var('sort',array('POST','GET'));
+                       $order  = get_var('order',array('POST','GET'));
+                       $filter = get_var('filter',array('POST','GET'));
+                       $cat_id = get_var('cat_id',array('POST','GET'));
+                       $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 save_sessiondata($data)
+               {
+                       if ($this->use_session)
+                       {
+                               
$this->fm_session->appsession('session_data','standard_e',$data);
+                       }
+               }
+
+               function read_sessiondata()
+               {
+                       $data = 
$this->fm_session->appsession('session_data','standard_e');
+
+
+                       $this->start    = $data['start'];
+                       $this->query    = $data['query'];
+                       $this->filter   = $data['filter'];
+                       $this->sort             = $data['sort'];
+                       $this->order    = $data['order'];
+                       $this->cat_id   = $data['cat_id'];
+               }
+
+               function reset_fm_cache()
+               {
+                       $this->so->reset_fm_cache();
+               }
+
+
+               function read()
+               {
+                       $standard = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order));
+
+                       $this->total_records = $this->so->total_records;
+
+
+                       return $standard;
+               }
+
+               function read_config()
+               {
+                       $standard = $this->so->read_config(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order));
+
+                       $this->total_records = $this->so->total_records;
+
+
+                       return $standard;
+               }
+
+               function read_config_single($column_name)
+               {
+                       return $this->so->read_config_single($column_name);
+               }
+
+               function read_single($id)
+               {
+                       return $this->so->read_single($id);
+               }
+
+               function save($standard,$action='')
+               {
+                       if ($action=='edit')
+                       {
+                               if ($standard['id'] != '')
+                               {
+
+                                       $receipt = $this->so->edit($standard);
+                               }
+                       }
+                       else
+                       {
+                               $receipt = $this->so->add($standard);
+                       }
+                       return $receipt;
+
+               }
+
+               function delete($id,$attrib)
+               {
+                       $this->so->delete($id,$attrib);
+               }
+
+               function read_attrib($type_id='')
+               {
+                       $attrib = $this->so->read_attrib(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
+                                                                               
        'type_id' => $type_id,'allrows'=>$this->allrows));
+
+                       for ($i=0; $i<count($attrib); $i++)
+                       {
+                               $attrib[$i]['datatype'] = 
$this->bocommon->translate_datatype($attrib[$i]['datatype']);
+                       }
+
+                       $this->total_records = $this->so->total_records;
+
+                       return $attrib;
+               }
+
+               function read_single_attrib($type_id,$id)
+               {
+                       return $this->so->read_single_attrib($type_id,$id);
+               }
+
+               function resort_attrib($data)
+               {
+                       $this->so->resort_attrib($data);
+               }
+
+               function save_attrib($attrib,$action='')
+               {
+                       if ($action=='edit')
+                       {
+                               if ($attrib['id'] != '')
+                               {
+
+                                       $receipt = 
$this->so->edit_attrib($attrib);
+                               }
+                       }
+                       else
+                       {
+                               $receipt = $this->so->add_attrib($attrib);
+                       }
+                       return $receipt;
+               }
+
+               function save_config($values='',$column_name='')
+               {
+                               return 
$this->so->save_config($values,$column_name);
+               }
+
+               function select_location_type($selected='')
+               {
+                       $location_types= $this->so->select_location_type();
+
+                       while (is_array($location_types) && list(,$type) = 
each($location_types))
+                       {
+                               $sel_type = '';
+                               if ($type['id']==$selected)
+                               {
+                                       $sel_type = 'selected';
+                               }
+
+                               $location_type_list[] = array
+                               (
+                                       'id'    => $type['id'],
+                                       'name'          => $type['name'],
+                                       'selected'      => $sel_type
+                               );
+                       }
+
+                       for ($i=0;$i<count($location_type_list);$i++)
+                       {
+                               if ($location_type_list[$i]['selected'] != 
'selected')
+                               {
+                                       
unset($location_type_list[$i]['selected']);
+                               }
+                       }
+
+//html_print_r($location_type_list);
+                       return $location_type_list;
+               }
+
+               function select_nullable($selected='')
+               {
+                       $nullable[0]['id']= 'True';
+                       $nullable[0]['name']= lang('True');
+                       $nullable[1]['id']= 'False';
+                       $nullable[1]['name']= lang('False');
+
+                       while (is_array($nullable) && list(,$type) = 
each($nullable))
+                       {
+                               $sel_type = '';
+                               if ($type['id']==$selected)
+                               {
+                                       $sel_type = 'selected';
+                               }
+
+                               $nullable_list[] = array
+                               (
+                                       'id'    => $type['id'],
+                                       'name'          => $type['name'],
+                                       'selected'      => $sel_type
+                               );
+                       }
+
+                       for ($i=0;$i<count($nullable_list);$i++)
+                       {
+                               if ($nullable_list[$i]['selected'] != 
'selected')
+                               {
+                                       unset($nullable_list[$i]['selected']);
+                               }
+                       }
+                       return $nullable_list;
+               }
+
+
+       }
+?>




reply via email to

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