[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boequipment.inc.php,NONE,1.1
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boequipment.inc.php,NONE,1.1 class.soequipment.inc.php,NONE,1.1 class.uiequipment.inc.php,NONE,1.1 class.bocommon.inc.php,1.12,1.13 class.bostandard_entity.inc.php,1.3,1.4 class.sostandard_entity.inc.php,1.4,1.5 class.uitts.inc.php,1.8,1.9 hook_admin.inc.php,1.14,1.15 |
Date: |
Tue, 11 Feb 2003 15:41:21 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv30294/inc
Modified Files:
class.bocommon.inc.php class.bostandard_entity.inc.php
class.sostandard_entity.inc.php class.uitts.inc.php
hook_admin.inc.php
Added Files:
class.boequipment.inc.php class.soequipment.inc.php
class.uiequipment.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 boequipment
{
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 boequipment($session=False)
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.soequipment');
$this->socommon =
CreateObject($this->currentapp.'.socommon');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$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'));
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;
}
}
function read()
{
$equipment = $this->so->read(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;
for ($i=0; $i<count($equipment); $i++)
{
$equipment[$i]['date'] =
$GLOBALS['phpgw']->common->show_date($equipment[$i]['date']);
$equipment[$i]['owner'] =
$GLOBALS['phpgw']->accounts->id2name($equipment[$i]['owner']);
}
return $equipment;
}
function read_single($property_id,$equipment_id)
{
return
$this->so->read_single($property_id,$equipment_id);
}
function select_part_of_town($part_of_town_id)
{
return
$this->socommon->select_part_of_town($part_of_town_id);
}
function save($equipment,$action='',$err='')
{
if ($equipment['access'])
{
$equipment['access'] = 'private';
}
else
{
$equipment['access'] = 'public';
}
if ($action=='edit' && !$err)
{
if ($equipment['equipment_id'] != 0 )
{
if
($this->socommon->check_equipment($equipment['property_id'],$equipment['equipment_id']))
{
$receipt =
$this->so->edit($equipment);
}
else
{
$receipt['error'][]=array('msg'=>lang('This equipment_id ID does not exist!'));
}
}
}
else
{
if(!$this->socommon->check_property($equipment['property_id']))
{
$receipt['error'][]=array('msg'=>lang('This property ID does not exist!'));
}
if($this->socommon->check_equipment($equipment['property_id'],$equipment['equipment_id']))
{
$receipt['error'][]=array('msg'=>lang('This equipment is already registered!'));
}
if(!$receipt['error'])
{
$equipment['location_code']=$this->bocommon->location_code($equipment['property_id'],$equipment['equipment_id']);
$receipt = $this->so->add($equipment);
}
}
return $receipt;
}
function delete($property_id,$equipment_id)
{
$this->so->delete($property_id,$equipment_id);
}
}
?>
--- 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 soequipment
{
var $grants;
function soequipment()
{
$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;
}
$filter =
(isset($data['filter'])?$data['filter']:'none');
$query =
(isset($data['query'])?$data['query']:'');
$sort =
(isset($data['sort'])?$data['sort']:'DESC');
$order =
(isset($data['order'])?$data['order']:'');
$cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
}
if ($order)
{
$ordermethod = " order by $order $sort";
}
else
{
$ordermethod = ' order by objekt_id DESC';
}
if ($filter == 'none')
{
$filtermethod = ' ( owner=' . $this->account;
if (is_array($this->grants))
{
$grants = $this->grants;
while (list($user) = each($grants))
{
$public_user_list[] = $user;
}
reset($public_user_list);
$filtermethod .= " OR (access='public'
OR owner IN(" . implode(',',$public_user_list) . ")))";
}
else
{
$filtermethod .= ' )';
}
}
elseif ($filter == 'yours')
{
$filtermethod = " owner='" . $this->account .
"'";
}
else
{
$filtermethod = " owner='" . $this->account .
"' AND access='private'";
}
if ($cat_id > 0)
{
$filtermethod .= " AND cat_id='$cat_id' ";
}
if($query)
{
$query = ereg_replace("'",'',$query);
$query = ereg_replace('"','',$query);
$querymethod = " AND objekt_id LIKE '%$query%'
or byggnavn LIKE '%$query%'";
}
$sql = "SELECT * FROM boei_bygg WHERE $filtermethod
$querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
while ($this->db->next_record())
{
$ngrants =
(int)$this->grants[$this->db->f('equipment_owner')];
$equipment[] = array
(
'property_id' =>
$this->db->f('objekt_id'),
'equipment_id' =>
$this->db->f('bygg_id'),
'owner' =>
$this->db->f('owner'),
'owner_id' =>
(int)$this->db->f('owner'),
'access' =>
$this->db->f('access'),
'date' =>
$this->db->f('entry_date'),
'cat_id' =>
(int)$this->db->f('cat_id'),
'name' =>
stripslashes($this->db->f('byggnavn')),
'grants' => $ngrants
);
}
return $equipment;
}
function read_single($property_id,$equipment_id)
{
$sql = "SELECT * FROM boei_bygg where
objekt_id='$property_id' and bygg_id='$equipment_id'";
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
{
$equipment['property_id'] =
(int)$this->db->f('objekt_id');
$equipment['equipment_id'] =
(int)$this->db->f('bygg_id');
$equipment['owner']
= $this->db->f('owner');
$equipment['name']
= stripslashes($this->db->f('byggnavn'));
$equipment['generaladdress'] =
stripslashes($this->db->f('generelladresse'));
$equipment['access']
= $this->db->f('access');
$equipment['date']
= $this->db->f('entry_date');
$equipment['cat_id']
= (int)$this->db->f('cat_id');
$equipment['omraade_id']
= $this->db->f('omraade_id');
$equipment['part_of_town'] =
$this->db->f('bydel');
$equipment['equipment_type_id'] =
$this->db->f('equipment_type_id');
$equipment['location_code'] =
$this->db->f('location_code');
return $equipment;
}
}
function add($equipment)
{
$this->db->query("INSERT INTO boei_bygg (location_code,
objekt_id,bygg_id,owner,access,entry_date,byggnavn,generelladresse,cat_id) "
. "VALUES ('" . $equipment['location_code'].
"','" . $equipment['property_id'] . "','" . $equipment['equipment_id'] . "','"
. $this->account . "','" . $equipment['access'] . "','" . time() . "','" .
$equipment['name']
. "','" . $equipment['generaladdress'] ."','" .
$equipment['cat_id']. "')",__LINE__,__FILE__);
$ids['equipment_id'] = $equipment['equipment_id'];
$ids['property_id'] = $equipment['property_id'];
$receipt['message'][] = array('msg'=>lang('equipment
has been saved'));
return $receipt;
}
function edit($equipment)
{
$equipment['content'] =
$this->db->db_addslashes($equipment['content']);
$this->db->query("UPDATE boei_bygg set byggnavn='" .
$equipment['name'] . "', entry_date='" . time()
. "', cat_id='" .
$equipment['cat_id'] . "', generelladresse='" . $equipment['generaladdress'] .
"', access='" . $equipment['access']
. "' WHERE objekt_id= '" .
$equipment['property_id']
. "' AND bygg_id=" .
$equipment['equipment_id'],__LINE__,__FILE__);
$receipt['message'][] = array('msg'=>lang('equipment
has been edited'));
return $receipt;
}
function delete($property_id,$equipment_id )
{
$this->db->query('DELETE FROM boei_bygg WHERE
objekt_id=' . $property_id . ' and bygg_id=' . $equipment_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 uiequipment
{
var $grants;
var $cat_id;
var $start;
var $query;
var $sort;
var $order;
var $filter;
var $part_of_town_id;
var $sub;
var $currentapp;
var $public_functions = array
(
'index' => True,
'view' => True,
'edit' => True,
'delete' => True
);
function uiequipment()
{
$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.'.boequipment',True);
$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->filter =
$this->bo->filter;
$this->cat_id =
$this->bo->cat_id;
$this->part_of_town_id =
$this->bocommon->part_of_town_id;
$GLOBALS['phpgw']->session->appsession('sub',$this->currentapp,'equipment');
}
function save_sessiondata()
{
$data = array
(
'start' => $this->start,
'query' => $this->query,
'sort' => $this->sort,
'order' => $this->order,
'filter' => $this->filter,
'cat_id' => $this->cat_id
);
$this->bocommon->save_sessiondata($data);
}
function index()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',
'menu',
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$sub = get_var('sub',array('POST','GET'));
$links = $this->bocommon->menu($sub);
$equipment_list = $this->bo->read();
while (is_array($equipment_list) && list(,$equipment) =
each($equipment_list))
{
$words = split(' ',$equipment['name']);
$first = "$words[0] $words[1] $words[2]
$words[3] .....";
$content[] = array
(
'property_id'
=> $equipment['property_id'],
'equipment_id'
=> $equipment['equipment_id'],
'first'
=> $first,
'date'
=> $equipment['date'],
'owner'
=> $equipment['owner'],
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.view&property_id='
. $equipment['property_id'].'&equipment_id=' . $equipment['equipment_id']),
'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.edit&property_id='
. $equipment['property_id'].'&equipment_id=' . $equipment['equipment_id']),
'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.delete&property_id='
. $equipment['property_id'].'&equipment_id=' . $equipment['equipment_id']),
'lang_view_statustext' =>
lang('view the equipment'),
'lang_edit_statustext' =>
lang('edit the equipment'),
'lang_delete_statustext' =>
lang('delete the equipment'),
'text_view'
=> lang('view'),
'text_edit'
=> lang('edit'),
'text_delete'
=> lang('delete')
);
}
$table_header[] = array
(
'lang_name' => lang('name'),
'lang_time_created' => lang('time created'),
'lang_view' => lang('view'),
'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
'lang_property_id' =>
lang('property id'),
'lang_equipment_id' =>
lang('equipment id'),
'lang_owner' => lang('owner')
);
$table_add[] = array
(
'lang_add' =>
lang('add'),
'lang_add_statustext' => lang('add a
equipment'),
'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.edit')
);
$data = array
(
'links'
=> $links,
'allow_allrows' =>
false,
'start_record'
=> $this->start,
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($equipment_list),
'all_records'
=> $this->bo->total_records,
'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
'function_msg'
=> lang('list equipment'),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the equipment belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'cat_id',
'cat_list'
=>
$this->bocommon->select_category_building_list('filter',$this->cat_id),
'select_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
'filter_list'
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' =>
'yes')),
'lang_filter_statustext' =>
lang('Select the filter. To show all entries select SHOW ALL'),
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_statustext' => lang('Submit
the search string'),
'query'
=> $this->query,
'lang_submit'
=> lang('submit'),
'table_header'
=> $table_header,
'values'
=> $content,
'table_add'
=> $table_add
);
//print_r($data).'<br>';
//print_($menu);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
$this->save_sessiondata();
}
function edit()
{
$property_id = get_var('property_id',array('GET'));
$equipment_id =
get_var('equipment_id',array('POST','GET'));
$err = get_var('err',array('POST','GET'));
$values = get_var('values',array('POST','GET'));
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
if ($values['save'])
{
if($equipment_id)
{
if(!$err)
{
$values['property_id']=$property_id;
}
$values['equipment_id']=$equipment_id;
$action='edit';
}
else
{
$property_id = $values['property_id'];
$equipment_id = $values['equipment_id'];
}
//_debug_array($values);
$receipt =
$this->bo->save($values,$action,$err);
}
else
{
$values['property_id']= $property_id;
$values['equipment_id']= $equipment_id;
}
if ($equipment_id && !$err)
{
$equipment =
$this->bo->read_single($property_id,$equipment_id);
$function_msg = lang('edit equipment');
}
else
{
$function_msg = lang('add equipment');
}
if ($equipment['cat_id'] > 0)
{
$this->cat_id = $equipment['cat_id'];
}
if ($equipment['part_of_town_id'] > 0)
{
$this->part_of_town_id =
$equipment['part_of_town_id'];
}
if($receipt['error'] && !$action=='edit')
{
$err=true;
}
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiequipment.edit',
'property_id' => $property_id,
'equipment_id' => $equipment_id,
'err' => $err
);
//_debug_array($link_data);
$data = array
(
'appname'
=> lang('equipment'),
'function_msg'
=> $function_msg,
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
'lang_property_id'
=> lang('Property ID'),
'lang_equipment_id'
=> lang('equipment ID'),
'lang_name'
=> lang('name'),
'lang_generaladdress' =>
lang('General Address'),
'lang_generellinfo'
=> lang('General Info'),
'lang_category'
=> lang('category'),
'lang_access'
=> lang('private'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
'value_property_id'
=> $values['property_id'],
'value_equipment_id'
=> $values['equipment_id'],
'value_name'
=> $equipment['name'],
'value_generaladdress' =>
$equipment['generaladdress'],
'value_access'
=> $equipment['access'],
'value_cat'
=> $equipment['cat'],
'error'
=> $receipt['error'],
'message'
=> $receipt['message'],
'lang_name_statustext' =>
lang('Enter the name of the equipment'),
'lang_property_id_statustext' => lang('Enter
Property ID'),
'lang_equipment_id_statustext' => lang('Enter
equipment ID'),
'lang_generaladdress_statustext'=> lang('Enter
the general address'),
'lang_done_statustext' =>
lang('Back to the list'),
'lang_save_statustext' =>
lang('Save the equipment'),
'lang_access_off_statustext' => lang('The
equipment is public. If the equipment should be private, check this box'),
'lang_access_on_statustext' =>
lang('The equipment is private. If the equipment should be public, uncheck this
box'),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the equipment belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'values[cat_id]',
'lang_town_statustext' =>
lang('Select the part of town the equipment belongs to. To do not use a part of
town - select NO PART OF TOWN'),
'lang_part_of_town'
=> lang('Part of town'),
'lang_no_part_of_town' =>
lang('No part of town'),
'cat_list'
=>
$this->bocommon->select_category_building_list('select',$this->cat_id),
'part_of_town_list'
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
'select_name_part_of_town' =>
'values[part_of_town_id]',
'omraade_id'
=> $equipment['omraade_id'],
'part_of_town'
=> $equipment['part_of_town'],
'equipment_type_id'
=> $equipment['equipment_type_id'],
'location_code'
=> $equipment['location_code'],
'value_generellinfo' =>
$equipment['generellinfo']
);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
}
function delete()
{
$property_id = get_var('property_id',array('GET'));
$equipment_id =
get_var('equipment_id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiequipment.index'
);
if (get_var('confirm',array('POST')))
{
$this->bo->delete($property_id,$equipment_id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_delete',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
$data = array
(
'appname' =>
lang('equipment'),
'function_msg' => lang('delete
equipment'),
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.delete&property_id='
. $property_id.'&equipment_id=' . $equipment_id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
'lang_yes_statustext' => lang('Delete the
entry'),
'lang_no_statustext' => lang('Back to the
list'),
'lang_no' =>
lang('no')
);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
}
function view()
{
$property_id = get_var('property_id',array('GET'));
$equipment_id = get_var('equipment_id',array('GET'));
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
$equipment =
$this->bo->read_single($property_id,$equipment_id);
$data = array
(
'appname' =>
lang('equipment'),
'function_msg' => lang('view
equipment'),
'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
'lang_name' => lang('name'),
'lang_category' => lang('category'),
'lang_access' => lang('access'),
'lang_time_created' => lang('time created'),
'lang_done' => lang('done'),
'value_name' => $equipment['name'],
'value_access' =>
lang(ucfirst($equipment['access'])),
'value_cat' =>
'',//$this->cats->id2name($equipment['cat']),
'value_date' =>
$GLOBALS['phpgw']->common->show_date($equipment['date'])
);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
}
}
?>
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.bocommon.inc.php 11 Feb 2003 14:19:54 -0000 1.12
--- class.bocommon.inc.php 11 Feb 2003 20:41:19 -0000 1.13
***************
*** 364,368 ****
'link_property' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiproperty.index&sub=property'),
'lang_property' =>
lang('Property'),
! 'link_equipment' =>
$GLOBALS['phpgw']->link('/property/list_equipment.php','sub=equipment'),
'lang_equipment' =>
lang('Equipment'),
'link_requirement' =>
$GLOBALS['phpgw']->link('/property/list_requirement.php'),
--- 364,368 ----
'link_property' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiproperty.index&sub=property'),
'lang_property' =>
lang('Property'),
! 'link_equipment' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiequipment.index'),
'lang_equipment' =>
lang('Equipment'),
'link_requirement' =>
$GLOBALS['phpgw']->link('/property/list_requirement.php'),
***************
*** 388,396 ****
if ($sub == equipment)
{
!
$menu['sublink_equipment']=$GLOBALS['phpgw']->link('/property/list_equipment.php','sub=equipment');
$menu['sublang_equipment']=lang('Equipment');
! if ($admin_equipment)
{
!
$menu['sublink_equipment_type']=$GLOBALS['phpgw']->link('/property/list_equipment_type.php','sub=equipment');
$menu['sublang_equipment_type']=lang('Equipment type');
}
--- 388,396 ----
if ($sub == equipment)
{
!
$menu['sublink_equipment']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiequipment.index');
$menu['sublang_equipment']=lang('Equipment');
! if ($this->admin_equipment)
{
!
$menu['sublink_equipment_type']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uistandard_entity.index&type=equipment');
$menu['sublang_equipment_type']=lang('Equipment type');
}
Index: class.bostandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bostandard_entity.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.bostandard_entity.inc.php 14 Dec 2002 19:02:18 -0000 1.3
--- class.bostandard_entity.inc.php 11 Feb 2003 20:41:19 -0000 1.4
***************
*** 195,203 ****
{
$datatypes[0]['id']= 'C';
! $datatypes[0]['num']= 'Character';
$datatypes[1]['id']= 'I';
! $datatypes[1]['num']= 'Integer';
$datatypes[2]['id']= 'N';
! $datatypes[2]['num']= 'Decimal';
while (is_array($datatypes) && list(,$type) =
each($datatypes))
--- 195,205 ----
{
$datatypes[0]['id']= 'C';
! $datatypes[0]['num']= lang('Character');
$datatypes[1]['id']= 'I';
! $datatypes[1]['num']= lang('Integer');
$datatypes[2]['id']= 'N';
! $datatypes[2]['num']= lang('Decimal');
! $datatypes[3]['id']= 'T';
! $datatypes[3]['num']= lang('Datetime');
while (is_array($datatypes) && list(,$type) =
each($datatypes))
Index: class.sostandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_entity.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.sostandard_entity.inc.php 10 Feb 2003 16:46:15 -0000 1.4
--- class.sostandard_entity.inc.php 11 Feb 2003 20:41:19 -0000 1.5
***************
*** 97,111 ****
$table='fm_equipment_type';
break;
! case 'property':
! $table='fm_property_type';
! break;
! case 'building':
! $table='fm_building_type';
! break;
! case 'entrance':
! $table='fm_entrance_type';
! break;
! case 'apartment':
! $table='boei_formaal';
break;
}
--- 97,102 ----
$table='fm_equipment_type';
break;
! case 'location':
! $table='fm_location_type';
break;
}
***************
*** 122,136 ****
$table='fm_equipment_type_attrib';
break;
! case 'property':
! $table='fm_property_type_attrib';
! break;
! case 'building':
! $table='fm_building_type_attrib';
! break;
! case 'entrance':
! $table='fm_entrance_type_attrib';
! break;
! case 'apartment':
! $table='fm_apartment_type_attrib';
break;
}
--- 113,118 ----
$table='fm_equipment_type_attrib';
break;
! case 'location':
! $table='fm_location_type_attrib';
break;
}
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uitts.inc.php 11 Feb 2003 14:19:54 -0000 1.8
--- class.uitts.inc.php 11 Feb 2003 20:41:19 -0000 1.9
***************
*** 263,268 ****
$values['tenant_phone'] =
get_var('tenant_phone',array('POST'));
!
$location_data=$this->bocommon->initiate_ui_location(array('equipment'
=> False,
!
'tenant'
=> True,
'property_id'
=> $values['property_id'],
'property_name'
=> $values['property_name'],
--- 263,268 ----
$values['tenant_phone'] =
get_var('tenant_phone',array('POST'));
!
$location_data=$this->bocommon->initiate_ui_location(array('equipment'
=> false,
!
'tenant'
=> true,
'property_id'
=> $values['property_id'],
'property_name'
=> $values['property_name'],
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** hook_admin.inc.php 10 Feb 2003 22:33:01 -0000 1.14
--- hook_admin.inc.php 11 Feb 2003 20:41:19 -0000 1.15
***************
*** 24,27 ****
--- 24,28 ----
'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'),
'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'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boequipment.inc.php,NONE,1.1 class.soequipment.inc.php,NONE,1.1 class.uiequipment.inc.php,NONE,1.1 class.bocommon.inc.php,1.12,1.13 class.bostandard_entity.inc.php,1.3,1.4 class.sostandard_entity.inc.php,1.4,1.5 class.uitts.inc.php,1.8,1.9 hook_admin.inc.php,1.14,1.15,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/templates/default equipment.xsl,NONE,1.1 admin.xsl,1.1,1.2 location.xsl,1.3,1.4 lookup.xsl,1.9,1.10
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.31,1.32
- Previous by thread:
[Phpgroupware-cvs] CVS: property/templates/default equipment.xsl,NONE,1.1 admin.xsl,1.1,1.2 location.xsl,1.3,1.4 lookup.xsl,1.9,1.10
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.31,1.32
- Index(es):