phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.bolookup.inc.php, 1.2


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.bolookup.inc.php, 1.2
Date: Wed, 2 Jun 2004 20:54:27 +0200

Update of /property/inc
Added Files:
        Branch: 
          class.bolookup.inc.php

date: 2004/06/02 18:54:27;  author: sigurdne;  state: Exp;  lines: +189 -0

Log Message:
no message
=====================================================================
<?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 bolookup
        {
                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 bolookup($session=False)
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->so               = 
CreateObject($this->currentapp.'.solookup');
                        $this->solocation = 
CreateObject($this->currentapp.'.solocation');


                        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'));
                        $district_id    = 
get_var('district_id',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($district_id))
                        {
                                $this->district_id = $district_id;
                        }
                }

                function save_sessiondata($data)
                {
                        if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data','lookup',$data);
                        }
                }

                function read_sessiondata()
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data','lookup');

                        //_debug_array($data);

                        $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'];
                        $this->district_id      = $data['district_id'];
                }


                function read_addressbook()
                {
                        $contact = $this->so->read_addressbook(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        return $contact;
                }

                function read_vendor()
                {
                        $vendor = $this->so->read_vendor(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        return $vendor;
                }

                function read_b_account()
                {
                        $b_account = $this->so->read_b_account(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        return $b_account;
                }

                function read_street()
                {
                        $street = $this->so->read_street(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        return $street;
                }

                function read_tenant()
                {
                        $tenant = $this->so->read_tenant(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        return $tenant;
                }

                function read_ns3420()
                {
                        $ns3420 = $this->so->read_ns3420(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        return $ns3420;
                }
        }
?>




reply via email to

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