[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,NONE,1.1 c
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,NONE,1.1 class.sodocument.inc.php,NONE,1.1 class.uidocument.inc.php,NONE,1.1 class.bocommon.inc.php,1.39,1.40 class.socommon.inc.php,1.17,1.18 class.sostandard_2.inc.php,1.11,1.12 class.uiadmin.inc.php,1.8,1.9 class.uiapartment.inc.php,1.6,1.7class.uibuilding.inc.php,1.14,1.15 class.uidrawing.inc.php,1.11,1.12 class.uientrance.inc.php,1.7,1.8 class.uiequipment.inc.php,1.15,1.16 class.uiinvoice.inc.php,1.19,1.20 class.uilookup.inc.php,1.16,1.17 class.uimeter.inc.php,1.4,1.5 class.uipricebook.inc.php,1.8,1.9 class.uiproject.inc.php,1.14,1.15 class.uiproperty.inc.php,1.18,1.19 class.uirequest.inc.php,1.8,1.9 class.uistandard_2.inc.php,1.8,1.9class.uistandard_3.inc.php,1.7,1.8 class.uistandard_entity.inc.php,1.10,1.11 class.uitemplate.inc.php,1.4,1.5 class.uitts.inc.php,1.20,1.21 class.uiwo_hour.inc.php,1.17,1.18 class.uiworkorder.inc.php,1.15,1.16 class.uiXport.inc.php,1.21,1.22 hook_admin.inc.php,1.26,1.27 |
Date: |
Mon, 28 Apr 2003 06:26:48 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv16338/inc
Modified Files:
class.bocommon.inc.php class.socommon.inc.php
class.sostandard_2.inc.php class.uiadmin.inc.php
class.uiapartment.inc.php class.uibuilding.inc.php
class.uidrawing.inc.php class.uientrance.inc.php
class.uiequipment.inc.php class.uiinvoice.inc.php
class.uilookup.inc.php class.uimeter.inc.php
class.uipricebook.inc.php class.uiproject.inc.php
class.uiproperty.inc.php class.uirequest.inc.php
class.uistandard_2.inc.php class.uistandard_3.inc.php
class.uistandard_entity.inc.php class.uitemplate.inc.php
class.uitts.inc.php class.uiwo_hour.inc.php
class.uiworkorder.inc.php class.uiXport.inc.php
hook_admin.inc.php
Added Files:
class.bodocument.inc.php class.sodocument.inc.php
class.uidocument.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 bodocument
{
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
);
function bodocument($session=False)
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.sodocument');
$this->socommon =
CreateObject($this->currentapp.'.socommon');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->historylog =
CreateObject($this->currentapp.'.historylog','document');
$this->contacts =
CreateObject('phpgwapi.contacts');
$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'));
$status_id =
get_var('status_id',array('POST','GET'));
$equipment_type =
get_var('equipment_type',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($status_id))
{
$this->status_id = $status_id;
}
if(isset($equipment_type))
{
$this->equipment_type = $equipment_type;
}
}
function select_status_list($format='',$selected='')
{
switch($format)
{
case 'select':
$GLOBALS['phpgw']->xslttpl->add_file(array('status_select'));
break;
case 'filter':
$GLOBALS['phpgw']->xslttpl->add_file(array('status_filter'));
break;
}
// $status_entries= $this->so->select_status_list();
while (is_array($status_entries) && list(,$status) =
each($status_entries))
{
$sel_status = '';
if ($status['id']==$selected)
{
$sel_status = 'selected';
}
$status_list[] = array
(
'id' => $status['id'],
'name' => $status['name'],
'selected' => $sel_status
);
}
for ($i=0;$i<count($status_list);$i++)
{
if ($status_list[$i]['selected'] != 'selected')
{
unset($status_list[$i]['selected']);
}
}
return $status_list;
}
function select_branch_list($selected='')
{
$branch_entries= $this->so->select_branch_list();
while (is_array($branch_entries) && list(,$branch) =
each($branch_entries))
{
$sel_branch = '';
if ($branch['id']==$selected)
{
$sel_branch = 'selected';
}
$branch_list[] = array
(
'id' => $branch['id'],
'name' => $branch['name'],
'selected' => $sel_branch
);
}
for ($i=0;$i<count($branch_list);$i++)
{
if ($branch_list[$i]['selected'] != 'selected')
{
unset($branch_list[$i]['selected']);
}
}
return $branch_list;
}
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 select_category_list_location($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[0]['id']='location' ;
$categories[0]['name']=lang('location') ;
$categories[1]['id']='equipment' ;
$categories[1]['name']=lang('equipment') ;
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()
{
$document = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'cat_id' => $this->cat_id,'equipment_type' =>
$this->equipment_type));
$this->total_records = $this->so->total_records;
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
for ($i=0; $i<count($document); $i++)
{
if($document[$i]['equipment_id'])
{
$document[$i]['equipment_type'] =
$this->socommon->get_equipment_type($document[$i]['equipment_id']);
}
$document[$i]['coordinator'] =
$GLOBALS['phpgw']->accounts->id2name($document[$i]['coordinator']);
$document[$i]['document_date'] =
$GLOBALS['phpgw']->common->show_date($document[$i]['start_date'],$dateformat);
$document[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($document[$i]['entry_date'],$dateformat);
}
return $document;
}
function read_at_location($location_code='',$equipment_id='')
{
$document = $this->so->read_at_location(array('start'
=> $this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'cat_id' => $this->cat_id,'location_code' =>
$location_code,'equipment_id' => $equipment_id));
$this->total_records = $this->so->total_records;
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
for ($i=0; $i<count($document); $i++)
{
if($document[$i]['equipment_id'])
{
$document[$i]['equipment_type'] =
$this->socommon->get_equipment_type($document[$i]['equipment_id']);
}
$document[$i]['owner'] =
$GLOBALS['phpgw']->accounts->id2name($document[$i]['owner']);
$document[$i]['document_date'] =
$GLOBALS['phpgw']->common->show_date($document[$i]['start_date'],$dateformat);
$document[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($document[$i]['entry_date'],$dateformat);
}
return $document;
}
function read_single($document_id)
{
$document
= $this->so->read_single($document_id);
$dateformat
= $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$document['document_date'] =
$GLOBALS['phpgw']->common->show_date($document['document_date'],$dateformat);
$vendor
=
$this->contacts->read_single_entry($document['vendor_id'],array('org_name'=>'org_name','email'=>'email'));
$document['vendor_name'] =
$vendor[0]['org_name'];
$document['vendor_email'] =
$vendor[0]['email'];
$location_data=$this->socommon->read_location_data($document['location_code']);
$document=$document + $location_data;
return $document;
}
function read_record_history($id)
{
$history_array =
$this->historylog->return_array(array('O'),array(),'','',$id);
$i=0;
while (is_array($history_array) && list(,$value) =
each($history_array))
{
$record_history[$i]['value_date'] =
$GLOBALS['phpgw']->common->show_date($value['datetime']);
$record_history[$i]['value_user'] =
$value['owner'];
switch ($value['status'])
{
case 'R': $type = lang('Re-opened');
break;
case 'X': $type = lang('Closed');
break;
case 'O': $type = lang('Opened');
break;
case 'A': $type = lang('Re-assigned');
break;
case 'P': $type = lang('Priority
changed'); break;
case 'CO': $type = lang('Initial
Coordinator'); break;
case 'C': $type = lang('Coordinator
changed'); break;
case 'TO': $type = lang('Initial
Category'); break;
case 'T': $type = lang('Category
changed'); break;
case 'SO': $type = lang('Initial
Status'); break;
case 'S': $type = lang('Status
changed'); break;
default: break;
}
if($value['new_value']=='O'){$value['new_value']=lang('Opened');}
if($value['new_value']=='X'){$value['new_value']=lang('Closed');}
$record_history[$i]['value_action'] =
$type?$type:'';
unset($type);
if ($value['status'] == 'A')
{
if (! $value['new_value'])
{
$record_history[$i]['value_new_value'] = lang('None');
}
else
{
$record_history[$i]['value_new_value'] =
$GLOBALS['phpgw']->accounts->id2name($value['new_value']);
}
}
else if ($value['status'] == 'C' ||
$value['status'] == 'CO')
{
$record_history[$i]['value_new_value']
= $GLOBALS['phpgw']->accounts->id2name($value['new_value']);
}
else if ($value['status'] == 'T' ||
$value['status'] == 'TO')
{
$record_history[$i]['value_new_value']
= $this->so->read_single_category($value['new_value']);
}
else if ($value['status'] != 'O' &&
$value['new_value'])
{
$record_history[$i]['value_new_value']
= $value['new_value'];
}
else
{
$record_history[$i]['value_new_value']
= '';
}
$i++;
}
return $record_history;
}
function save($values)
{
$document_date =
$this->bocommon->date_array($values['document_date']);
$values['document_date'] = mktime
(2,0,0,$document_date['month'],$document_date['day'],$document_date['year']);
$values['location_code']=$this->bocommon->location_code($values['property_id'],$values['building_id'],$values['entrance_id'],$values['apartment_id']);
//_debug_array($values);
if ($values['document_id'])
{
if ($values['document_id'] != 0)
{
$receipt = $this->so->edit($values);
}
}
else
{
$receipt = $this->so->add($values);
}
return $receipt;
}
function delete($document_id)
{
$this->so->delete($document_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 sodocument
{
var $grants;
function sodocument()
{
$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'];
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
$this->historylog =
CreateObject($this->currentapp.'.historylog','document');
$this->vfs =
CreateObject('phpgwapi.vfs');
$this->rootdir = $this->vfs->basedir;
$this->fakebase = $this->vfs->fakebase;
if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
{
$this->join = " JOIN ";
}
else
{
$this->join = " LEFT JOIN ";
}
}
function select_category_list()
{
$this->db->query("SELECT id, descr FROM
fm_document_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_single_category($id='')
{
$this->db->query("SELECT descr FROM
fm_document_category where id='$id' ");
$this->db->next_record();
return $this->db->f('descr');
}
function select_status_list()
{
$this->db->query("SELECT id, descr FROM
fm_document_status ORDER BY id ");
$i = 0;
while ($this->db->next_record())
{
$status_entries[$i]['id']
= $this->db->f('id');
$status_entries[$i]['name']
= stripslashes($this->db->f('descr'));
$i++;
}
return $status_entries;
}
function select_branch_list()
{
$this->db->query("SELECT id, descr FROM fm_wo_branch
ORDER BY id ");
$i = 0;
while ($this->db->next_record())
{
$branch_entries[$i]['id']
= $this->db->f('id');
$branch_entries[$i]['name']
= stripslashes($this->db->f('descr'));
$i++;
}
return $branch_entries;
}
function read($data)
{
if(is_array($data))
{
if ($data['start'])
{
$start=$data['start'];
}
else
{
$start=0;
}
$filter =
(isset($data['filter'])?$data['filter']:'');
$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);
$equipment_type =
(isset($data['equipment_type'])?$data['equipment_type']:'');
}
if ($order)
{
$ordermethod = " order by $order $sort";
}
else
{
$ordermethod = ' order by location_code ASC';
}
$filtermethod = ' ( fm_document.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
(fm_document.access='public' OR fm_document.owner IN(" .
implode(',',$public_user_list) . ")))";
}
else
{
$filtermethod .= ' )';
}
if ($cat_id == 'equipment'):
{
$filtermethod .= " AND fm_document.equipment_id
is not NULL ";
}
elseif ($cat_id == 'location'):
{
$filtermethod .= " AND fm_document.equipment_id
is NULL ";
}
else:
{
$filtermethod .= " AND
fm_document.location_code is NULL ";
}
endif;
if ($filter)
{
$filtermethod .= " AND
fm_document.owner='$filter' ";
}
if($query)
{
$query = ereg_replace("'",'',$query);
$query = ereg_replace('"','',$query);
$querymethod = " AND fm_document.address LIKE
'%$query%' or fm_document.location_code LIKE '%$query%'";
}
$groupmethod= " GROUP BY
fm_document.location_code,fm_document.equipment_id ";
if ($equipment_type)
{
$sql = "SELECT fm_document.* FROM fm_document
$this->join fm_equipment on fm_document.equipment_id =
fm_equipment.equipment_id"
. " WHERE $filtermethod $querymethod AND
fm_equipment.equipment_type_id ='$equipment_type' $groupmethod";
}
else
{
$sql = "SELECT * FROM fm_document WHERE
$filtermethod $querymethod $groupmethod";
}
$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('fm_document.owner')];
$document_list[] = array
(
'document_id' =>
$this->db->f('id'),
'equipment_id' =>
$this->db->f('equipment_id'),
'location_code' =>
$this->db->f('location_code'),
'floor' =>
$this->db->f('floor'),
'address' =>
$this->db->f('address'),
'category' =>
$this->db->f('category'),
'title' =>
$this->db->f('title'),
'grants' =>
$ngrants
);
}
//_debug_array($document_list);
return $document_list;
}
function read_at_location($data)
{
if(is_array($data))
{
if ($data['start'])
{
$start=$data['start'];
}
else
{
$start=0;
}
$filter =
(isset($data['filter'])?$data['filter']:'');
$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);
$location_code =
(isset($data['location_code'])?$data['location_code']:'');
$equipment_id =
(isset($data['equipment_id'])?$data['equipment_id']:'');
}
if ($order)
{
$ordermethod = " order by $order $sort";
}
else
{
$ordermethod = ' order by location_code ASC';
}
$filtermethod = "
fm_document.location_code='$location_code'";
if ($equipment_id)
{
$filtermethod .= " AND
fm_document.equipment_id='$equipment_id' ";
}
if ($cat_id > 0)
{
$filtermethod .= " AND
fm_document.category='$cat_id' ";
}
if ($filter)
{
$filtermethod .= " AND
fm_document.owner='$filter' ";
}
if($query)
{
$query = ereg_replace("'",'',$query);
$query = ereg_replace('"','',$query);
$querymethod = " AND fm_document.title LIKE
'%$query%' or fm_document.document_name LIKE '%$query%'";
}
$sql = "SELECT fm_document.*,
fm_document_category.descr as category FROM fm_document $this->join
fm_document_category on fm_document.category = fm_document_category.id 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())
{
$document_list[] = array
(
'document_id' =>
$this->db->f('id'),
'document_name' =>
$this->db->f('document_name'),
'title' =>
$this->db->f('title'),
'category' =>
$this->db->f('category'),
'owner' =>
$this->db->f('owner')
);
}
//_debug_array($document_list);
return $document_list;
}
function read_single($document_id)
{
$sql = "SELECT * from fm_document where
id='$document_id'";
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
{
$document['document_id']
= $this->db->f('id');
$document['title']
= $this->db->f('title');
$document['document_name'] =
$this->db->f('document_name');
$document['equipment_id'] =
$this->db->f('equipment_id');
$document['location_code'] =
$this->db->f('location_code');
$document['branch_id'] =
$this->db->f('branch_id');
$document['version']
= $this->db->f('version');
$document['vendor_id'] =
$this->db->f('vendor_id');
$document['floor_id'] =
$this->db->f('floor_id');
$document['charge_tenant'] =
$this->db->f('charge_tenant');
$document['descr']
= $this->db->f('descr');
$document['status']
= $this->db->f('status');
$document['actual_cost']
= $this->db->f('actual_cost');
$document['tenant_id'] =
$this->db->f('tenant_id');
$document['owner']
= $this->db->f('owner');
$document['coordinator']
= $this->db->f('coordinator');
$document['access']
= $this->db->f('access');
$document['document_date'] =
$this->db->f('document_date');
$document['cat_id']
= $this->db->f('category');
}
//_debug_array($document);
return $document;
}
function add($document)
{
if($document['street_number'])
{
$address= $document['street_name'] . ' ' .
$document['street_number'];
}
else
{
$address= $document['street_name'];
}
$document['descr'] =
$this->db->db_addslashes($document['descr']);
$document['name'] =
$this->db->db_addslashes($document['name']);
$document['title'] =
$this->db->db_addslashes($document['title']);
//_debug_array($document);
$this->db->query("INSERT INTO fm_document
(document_name,title,equipment_id,access,category,entry_date,document_date,version,coordinator,status,"
.
"descr,location_code,floor_id,address,branch_id,vendor_id,owner) "
. "VALUES ('"
. $document['document_name']. "','"
. $document['title']. "','"
. $document['equipment_id']. "','"
. "public','"
. $document['cat_id']. "','"
. time() . "','"
. $document['document_date']. "','"
. $document['version']. "','"
. $document['coordinator']. "','"
. $document['status']. "','"
. $document['descr']. "','"
. $document['location_code']. "','"
. $document['floor_id'] . "','"
. $address . "','"
. $document['branch_id']. "','"
. $document['vendor_id']. "','"
. $this->account. "')",__LINE__,__FILE__);
$receipt['document_id'] =
$this->db->get_last_insert_id('fm_document','id');
$this->historylog->add('SO',$receipt['document_id'],$document['status']);
$this->historylog->add('TO',$receipt['document_id'],$document['cat_id']);
$this->historylog->add('CO',$receipt['document_id'],$document['coordinator']);
$receipt['message'][] = array('msg'=>lang('document %1
has been saved',"'".$document['document_name']."'"));
return $receipt;
}
function edit($document)
{
$this->db->query("SELECT status,category,coordinator
FROM fm_document where id='" .$document['document_id']."'",__LINE__,__FILE__);
$this->db->next_record();
$old_status = $this->db->f('status');
$old_categroy = $this->db->f('category');
$old_coordinator = $this->db->f('coordinator');
if ($old_status != $document['status'])
{
$this->historylog->add('S',$document['document_id'],$document['status']);
}
if ($old_categroy != $document['cat_id'])
{
$this->historylog->add('T',$document['document_id'],$document['cat_id']);
}
if ((int)$old_coordinator !=
(int)$document['coordinator'])
{
$this->historylog->add('C',$document['document_id'],$document['coordinator']);
}
if($document['document_name_orig'] &&
!$document['document_name'] )
{
$document['document_name'] =
$document['document_name_orig'];
}
if($document['street_number'])
{
$address= $document['street_name'] . ' ' .
$document['street_number'];
}
else
{
$address= $document['street_name'];
}
$document['descr'] =
$this->db->db_addslashes($document['descr']);
$document['name'] =
$this->db->db_addslashes($document['name']);
$document['title'] =
$this->db->db_addslashes($document['title']);
//_debug_array($document);
$this->db->query("UPDATE fm_document set
document_name ='" .
$document['document_name'] . "',
title ='" .
$document['title'] . "',
branch_id ='" .
$document['branch_id'] . "',
status ='" .
$document['status'] . "',
category ='" .
$document['cat_id'] . "',
document_date ='" .
$document['document_date'] . "',
coordinator ='" .
$document['coordinator'] . "',
descr ='" .
$document['descr'] . "',
version ='" .
$document['version'] . "',
location_code ='" .
$document['location_code'] . "',
floor_id ='" .
$document['floor_id'] . "',
equipment_id ='" . $document['equipment_id']
. "',
vendor_id ='" .
$document['vendor_id'] . "',
address ='" . $address
. "' WHERE id= '" . $document['document_id']
."'",__LINE__,__FILE__);
$receipt['document_id'] = $document['document_id'];
$receipt['message'][] = array('msg'=>lang('document %1
has been edited',"'".$document['document_name']."'"));
return $receipt;
}
function delete($document_id )
{
$this->db->query("SELECT document_name FROM fm_document
where id='$document_id'",__LINE__,__FILE__);
$this->db->next_record();
$document_name = $this->db->f('document_name');
//echo $this->fakebase. SEP . 'document'. SEP . $document_name;
if($this->vfs->file_exists(array(
'string' => $this->fakebase. SEP .
'document'. SEP . $document_name,
'relatives' => Array(RELATIVE_NONE)
)))
{
$this->vfs->override_acl = 1;
if(!$this->vfs->rm (array(
'string' => $this->fakebase. SEP .
'document'. SEP . $document_name,
'relatives' => array(
RELATIVE_NONE
)
)))
{
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'.
$this->fakebase. SEP . 'document'. SEP . $document_name);
}
else
{
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'.
$this->fakebase. SEP . 'document'. SEP . $document_name);
}
$this->vfs->override_acl = 0;
}
$this->db->query("DELETE FROM fm_document WHERE
id='$document_id'",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_document_history
WHERE history_record_id='$document_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 uidocument
{
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,
'list_doc' => True,
'view' => True,
'view_file' => True,
'edit' => True,
'delete' => True
);
function uidocument()
{
$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.'.bodocument',True);
$this->so =
CreateObject($this->currentapp.'.sodocument',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
$this->vfs =
CreateObject('phpgwapi.vfs');
$this->rootdir =
$this->vfs->basedir;
$this->fakebase =
$this->vfs->fakebase;
$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->status_id =
$this->bo->status_id;
$this->equipment_type =
$this->bo->equipment_type;
$GLOBALS['phpgw']->session->appsession('sub',$this->currentapp,'property');
}
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('document',
'menu',
'nextmatchs',
'search_field'));
$lookup = get_var('lookup',array('POST','GET'));
$links = $this->bocommon->menu();
$document_list = $this->bo->read();
//_debug_array($document_list);
while (is_array($document_list) && list(,$document) =
each($document_list))
{
$location = split("-",
$document['location_code']);
$content[] = array
(
'document_id'
=> $document['document_id'],
'equipment_id'
=> $document['equipment_id'],
'equipment_type'
=> $document['equipment_type'],
'property_id'
=> $location[0],
'building_id'
=> $location[1],
'entrance_id'
=> $location[2],
'floor'
=> $document['floor'],
'address'
=> $document['address'],
'link_view_file'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.view_file&document_id='
. $document['document_id']),
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.list_doc&location_code='
. $document['location_code'] . '&equipment_id=' . $document['equipment_id']),
'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&document_id='
. $document['document_id']),
'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.delete&document_id='
. $document['document_id']),
'lang_view_file_statustext' =>
lang('view the document'),
'lang_view_statustext' =>
lang('view information about the document'),
'lang_edit_statustext' =>
lang('edit information about the document'),
'lang_delete_statustext' =>
lang('delete this document'),
'text_view'
=> lang('view'),
'text_edit'
=> lang('edit'),
'text_delete'
=> lang('delete')
);
}
$table_header[] = array
(
'sort_equipment_id' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
'var' => 'equipment_id',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uidocument.index',
'cat_id'
=>$this->cat_id,
'district_id' =>
$this->district_id,
'filter'
=>$this->filter,
'query'
=>$this->query)
)),
'lang_equipment_id' => lang('equipment_id'),
'lang_equipment_type' => lang('type'),
'sort_property' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
'var' => 'location_code',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uidocument.index',
'cat_id'
=>$this->cat_id,
'district_id' =>
$this->district_id,
'filter'
=>$this->filter,
'query'
=>$this->query)
)),
'lang_property' => lang('Property'),
'lang_building' => lang('Building'),
'lang_entrance' => lang('Entrance'),
'lang_floor' => lang('Floor'),
'sort_address' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
'var' => 'address',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uidocument.index',
'cat_id'
=>$this->cat_id,
'district_id' =>
$this->district_id,
'filter'
=>$this->filter,
'query'
=>$this->query)
)),
'lang_address' => lang('Address'),
'lang_view' => lang('view'),
'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
'lang_select' => lang('Select')
);
$table_add[] = array
(
'lang_add' =>
lang('add'),
'lang_add_statustext' => lang('add a
document'),
'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit')
);
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uidocument.index',
'sort'
=>$this->sort,
'order'
=>$this->order,
'cat_id'
=>$this->cat_id,
'district_id'
=>$this->district_id,
'filter'
=>$this->filter,
'status_id'
=>$this->status_id,
'query'
=>$this->query
);
if($this->cat_id=='equipment')
{
$equipment_type_list =
$this->bocommon->select_category_equipment_list('filter',$this->equipment_type);
}
//_debug_array($equipment_type_list);
$data = array
(
'link_history'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.index&cat_id='
. $this->cat_id),
'lang_history_statustext' =>
lang('searh for history at this location'),
'lang_select'
=> lang('select'),
'lookup_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit'),
'lookup'
=> $lookup,
'links'
=> $links,
'allow_allrows'
=> false,
'start_record'
=> $this->start,
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($document_list),
'all_records'
=> $this->bo->total_records,
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'type'
=> $this->cat_id,
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the document belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'cat_id',
'cat_list'
=> $this->bo->select_category_list_location('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),
'lang_equipment_type_statustext'
=> lang('Select the equipment type the document belongs to. To do not use a
type select NO equipment type'),
'lang_no_equipment_type'
=> lang('No equipment type'),
'equipment_type_list'
=> $equipment_type_list,
'lang_status_statustext' =>
lang('Select the status the document belongs to. To do not use a category
select NO STATUS'),
'status_name'
=> 'status_id',
'lang_no_status'
=> lang('No status'),
'status_list'
=> $this->bo->select_status_list('filter',$this->status_id),
'lang_user_statustext' =>
lang('Select the user the document belongs to. To do not use a category select
NO USER'),
'select_user_name'
=> 'filter',
'lang_no_user'
=> lang('No user'),
'user_list'
=> $this->bocommon->get_user_list('filter',$this->filter),
'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_search'
=> lang('search'),
'table_header'
=> $table_header,
'values'
=> $content,
'table_add'
=> $table_add
);
$appname = lang('document');
$function_msg = lang('list document');
$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 list_doc()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('document',
'menu',
'nextmatchs',
'search_field'));
$location_code =
get_var('location_code',array('POST','GET'));
$equipment_id =
get_var('equipment_id',array('POST','GET'));
$location=$this->bocommon->read_location_data($location_code);
$location_data=$this->bocommon->initiate_ui_location(array(
'location_type' => 'view',
'equipment' =>
$equipment_id,
'entrance' => true,
'address' => true,
'apartment' =>
$location['apartment_id'],
'equipment_id' =>
$equipment_id,
'property_id' =>
$location['property_id'],
'property_name' =>
$location['property_name'],
'building_id' =>
$location['building_id'],
'entrance_id' =>
$location['entrance_id'],
'floor' =>
$location['floor'],
'street_name' =>
$location['street_name'],
'street_number' =>
$location['street_number'],
'apartment_id' =>
$location['apartment_id']));
//_debug_array($location_data);
$links = $this->bocommon->menu();
$document_list =
$this->bo->read_at_location($location_code,$equipment_id);
//_debug_array($document_list);
while (is_array($document_list) && list(,$document) =
each($document_list))
{
$content[] = array
(
'document_id'
=> $document['document_id'],
'document_name'
=> $document['document_name'],
'title'
=> $document['title'],
'owner'
=> $document['owner'],
'category'
=> $document['category'],
'link_view_file'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.view_file&document_id='
. $document['document_id']),
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.list_doc&location_code='
. $document['location_code'] . '&equipment_id=' . $document['equipment_id']),
'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&document_id='
. $document['document_id']),
'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.delete&document_id='
. $document['document_id']),
'lang_view_file_statustext' =>
lang('view the document'),
'lang_view_statustext' =>
lang('view information about the document'),
'lang_edit_statustext' =>
lang('edit information about the document'),
'lang_delete_statustext' =>
lang('delete this document'),
'text_view'
=> lang('view'),
'text_edit'
=> lang('edit'),
'text_delete'
=> lang('delete')
);
}
$table_header[] = array
(
'sort_document_name' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
'var' => 'document_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uidocument.list_doc',
'cat_id'
=>$this->cat_id,
'location_code'
=>$location_code,
'equipment_id'
=>$equipment_id,
'filter'
=>$this->filter,
'query'
=>$this->query)
)),
'lang_document_name' => lang('Document
name'),
'lang_category' =>
lang('Category'),
'lang_owner' =>
lang('owner'),
'lang_title' =>
lang('Title'),
'lang_view' => lang('view'),
'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
);
$table_add[] = array
(
'lang_add' =>
lang('add'),
'lang_add_statustext' => lang('add a
document'),
'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit')
);
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uidocument.list_doc',
'sort'
=>$this->sort,
'order'
=>$this->order,
'cat_id'
=>$this->cat_id,
'location_code'
=>$location_code,
'filter'
=>$this->filter,
'equipment_id' =>$equipment_id,
'query'
=>$this->query
);
if($this->cat_id=='equipment')
{
$equipment_type_list =
$this->bocommon->select_category_equipment_list('filter',$this->equipment_type);
}
//_debug_array($link_data);
$data = array
(
'location_data'
=> $location_data,
'link_history'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.list_doc&cat_id='
. $this->cat_id),
'lang_history_statustext' =>
lang('searh for history at this location'),
'lang_select'
=> lang('select'),
'lookup_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit'),
'lookup'
=> $lookup,
'links'
=> $links,
'allow_allrows'
=> false,
'start_record'
=> $this->start,
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($document_list),
'all_records'
=> $this->bo->total_records,
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'type'
=> $this->cat_id,
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the document 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),
'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),
'lang_equipment_type_statustext'
=> lang('Select the equipment type the document belongs to. To do not use a
type select NO equipment type'),
'lang_no_equipment_type'
=> lang('No equipment type'),
'equipment_type_list'
=> $equipment_type_list,
'lang_status_statustext' =>
lang('Select the status the document belongs to. To do not use a category
select NO STATUS'),
'status_name'
=> 'status_id',
'lang_no_status'
=> lang('No status'),
'status_list'
=> $this->bo->select_status_list('filter',$this->status_id),
'lang_user_statustext' =>
lang('Select the user the document belongs to. To do not use a category select
NO USER'),
'select_user_name'
=> 'filter',
'lang_no_user'
=> lang('No user'),
'user_list'
=> $this->bocommon->get_user_list('filter',$this->filter),
'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_search'
=> lang('search'),
'table_header_document' =>
$table_header,
'values_document'
=> $content,
'table_add'
=> $table_add
);
$appname = lang('document');
$function_msg = lang('list document');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_document' => $data));
$this->save_sessiondata();
}
function create_home_dir()
{
if(!$this->vfs->file_exists(array(
'string' => $this->fakebase. SEP .
'document',
'relatives' => Array(RELATIVE_NONE)
)))
{
$this->vfs->override_acl = 1;
if(!$this->vfs->mkdir (array(
'string' => $this->fakebase. SEP .
'document',
'relatives' => array(
RELATIVE_NONE
)
)))
{
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'.
$this->fakebase. SEP . 'document');
}
else
{
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'.
$this->fakebase. SEP . 'document');
}
$this->vfs->override_acl = 0;
}
}
function view_file($file_array='')
{
// define('PHPGW_FINAL',True);
$GLOBALS['phpgw_info']['flags']['noframework'] = True;
$document_id =
get_var('document_id',array('POST','GET'));
$values = $this->bo->read_single($document_id);
$file = $this->fakebase. SEP . 'document'. SEP .
$values['document_name'];
if($this->vfs->file_exists(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)
)))
{
$filename = current(explode('.',
basename($values['document_name'])));
$filetype = $this->vfs->file_type(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE)));
$size = $this->vfs->get_size(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE),
'checksubdirs' =>
True));
$browser = CreateObject('phpgwapi.browser');
$browser->content_header($filename,$filetype,$size);
$document= $this->vfs->read(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)));
echo $document;
flush();
}
}
function edit()
{
$document_id =
get_var('document_id',array('POST','GET'));
$values =
get_var('values',array('POST'));
$GLOBALS['phpgw']->xslttpl->add_file(array('document'));
$this->create_home_dir();
if($values)
{
$values = $values +
$this->bocommon->get_location();
}
else
{
$location_code =
get_var('location_code',array('POST','GET'));
$values['equipment_id'] =
get_var('equipment_id',array('POST','GET'));
$values['descr'] =
get_var('descr',array('POST','GET'));
if($location_code)
{
$location_data=$this->bocommon->read_location_data($location_code);
$values=$values + $location_data;
}
}
$values['document_date'] =
get_var('document_date',array('POST'));
$values['vendor_id'] =
get_var('vendor_id',array('POST'));
//_debug_array($values);
if ($values['save'])
{
$values['document_name']=$_FILES['document_file']['name'];
if(!$values['cat_id'])
{
$receipt['error'][]=array('msg'=>lang('Please select a category !'));
$error_id=true;
}
if(!$values['status'])
{
$receipt['error'][]=array('msg'=>lang('Please select a status !'));
}
if(!$values['document_name_orig'] &&
$this->vfs->file_exists(array(
'string' => $this->fakebase.
SEP . 'document'. SEP . $values['document_name'],
'relatives' =>
Array(RELATIVE_NONE)
)))
{
$receipt['error'][]=array('msg'=>lang('This file already exists !'));
}
$values['document_id'] = $document_id;
if(!$receipt['error'])
{
$this->vfs->cp (array (
'from' =>
$_FILES['document_file']['tmp_name'],
'to' => $this->fakebase. SEP
. 'document' . SEP . $values['document_name'],
'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)));
$receipt = $this->bo->save($values);
$document_id=$receipt['document_id'];
//_debug_array($receipt);
}
}
if ($document_id)
{
$values = $this->bo->read_single($document_id);
$function_msg = lang('Edit document');
$record_history =
$this->bo->read_record_history($document_id);
}
else
{
$function_msg = lang('Add document');
}
$table_header_history[] = array
(
'lang_date' => lang('Date'),
'lang_user' => lang('User'),
'lang_action' => lang('Action'),
'lang_new_value' => lang('New value')
);
if ($values['cat_id'])
{
$this->cat_id = $values['cat_id'];
}
$location_data=$this->bocommon->initiate_ui_location(array(
'location_type' => 'form',
'equipment' => true,
'entrance' => true,
'address' => true,
'equipment_id' =>
$values['equipment_id'],
'property_id' =>
$values['property_id'],
'property_name' =>
$values['property_name'],
'building_id' =>
$values['building_id'],
'entrance_id' =>
$values['entrance_id'],
'floor' =>
$values['floor'],
'street_name' =>
$values['street_name'],
'street_number' =>
$values['street_number'],
'apartment_id' =>
$values['apartment_id']));
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
'vendor_id' =>
$values['vendor_id'],
'vendor_name' =>
$values['vendor_name']));
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uidocument.edit',
'document_id' => $document_id
);
$dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$sep = '/';
$dlarr[strpos($dateformat,'y')] = 'yyyy';
$dlarr[strpos($dateformat,'m')] = 'MM';
$dlarr[strpos($dateformat,'d')] = 'DD';
ksort($dlarr);
$dateformat= (implode($sep,$dlarr));
$data = array
(
'vendor_data'
=> $vendor_data,
'record_history'
=> $record_history,
'table_header_history' =>
$table_header_history,
'lang_history'
=> lang('History'),
'lang_no_history'
=> lang('No history'),
'calendar_gif'
=> './'.$this->currentapp.'/templates/default/images/calendar.gif',
'calendar_source'
=> './'.$this->currentapp.'/inc/calendar.js',
'dateformat'
=> $dateformat,
'lang_popup_calendar' =>
lang('Popup Calendar'),
'link_calendar_document_date' =>
'setDateField(document.form.document_date);top.newWin=window.open('."'.".'/'.$this->currentapp.'/inc/calendar.html'."'".','."'".'cal'."'".','."'dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes'".')',
'lang_document_date_statustext' => lang('Select
date the document was created'),
'lang_document_date'
=> lang('document date'),
'value_document_date' =>
$values['document_date'],
'vendor_data'
=> $vendor_data,
'location_data'
=> $location_data,
'location_type'
=> 'form',
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.index'),
'lang_year'
=> lang('Year'),
'lang_category'
=> lang('category'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
'lang_update_file'
=> lang('Update file'),
'lang_document_id'
=> lang('document ID'),
'value_document_id'
=> $document_id,
'lang_document_name'
=> lang('document name'),
'value_document_name' =>
$values['document_name'],
'lang_document_name_statustext'
=> lang('Enter document Name'),
'lang_floor_id'
=> lang('Floor ID'),
'value_floor_id'
=> $values['floor_id'],
'lang_floor_statustext' =>
lang('Enter the floor ID'),
'lang_title'
=> lang('title'),
'value_title'
=> $values['title'],
'lang_title_statustext' =>
lang('Enter document title'),
'lang_version'
=> lang('Version'),
'value_version'
=> $values['version'],
'lang_version_statustext' =>
lang('Enter document version'),
'error'
=> $receipt['error'],
'message'
=> $receipt['message'],
'lang_descr_statustext' =>
lang('Enter a description of the document'),
'lang_descr'
=> lang('Description'),
'value_descr'
=> $values['descr'],
'lang_done_statustext' =>
lang('Back to the list'),
'lang_save_statustext' =>
lang('Save the document'),
'lang_no_cat'
=> lang('Select category'),
'lang_cat_statustext' =>
lang('Select the category the document belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'values[cat_id]',
'value_cat_id'
=> $values['cat_id'],
'cat_list'
=> $this->bo->select_category_list('select',$values['cat_id']),
'lang_coordinator'
=> lang('Coordinator'),
'lang_user_statustext' =>
lang('Select the coordinator the document belongs to. To do not use a category
select NO USER'),
'select_user_name'
=> 'values[coordinator]',
'lang_no_user'
=> lang('Select coordinator'),
'user_list'
=> $this->bocommon->get_user_list('select',$values['coordinator']),
'status_list'
=> $this->bo->select_status_list('select',$values['status']),
'select_status_name' =>
'values[status]',
'lang_no_status'
=> lang('Select status'),
'lang_status'
=> lang('Status'),
'lang_status_statustext' =>
lang('What is the current status of this document ?'),
'branch_list'
=> $this->bo->select_branch_list($values['branch_id']),
'lang_no_branch'
=> lang('No branch'),
'lang_branch'
=> lang('branch'),
'lang_branch_statustext' =>
lang('Select the branch for this document')
);
$appname = lang('document');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
}
function delete()
{
$document_id =
get_var('document_id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uidocument.index'
);
if (get_var('confirm',array('POST')))
{
$this->bo->delete($document_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'));
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.delete&document_id='
. $document_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')
);
$appname
= lang('document');
$function_msg =
lang('delete document');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
}
function view()
{
$document_id =
get_var('document_id',array('POST','GET'));
$values =
get_var('values',array('POST'));
$GLOBALS['phpgw']->xslttpl->add_file(array('document'));
$this->create_home_dir();
if($values)
{
$values = $values +
$this->bocommon->get_location();
}
else
{
$location_code =
get_var('location_code',array('POST','GET'));
$values['equipment_id'] =
get_var('equipment_id',array('POST','GET'));
$values['descr'] =
get_var('descr',array('POST','GET'));
if($location_code)
{
$location_data=$this->bocommon->read_location_data($location_code);
$values=$values + $location_data;
}
}
$values['document_date'] =
get_var('document_date',array('POST'));
$values['vendor_id'] =
get_var('vendor_id',array('POST'));
//_debug_array($values);
$values = $this->bo->read_single($document_id);
$function_msg = lang('view document');
$record_history =
$this->bo->read_record_history($document_id);
$table_header_history[] = array
(
'lang_date' => lang('Date'),
'lang_user' => lang('User'),
'lang_action' => lang('Action'),
'lang_new_value' => lang('New value')
);
if ($values['cat_id'])
{
$this->cat_id = $values['cat_id'];
}
$location_data=$this->bocommon->initiate_ui_location(array(
'location_type' => 'view',
'equipment' => true,
'entrance' => true,
'address' => true,
'equipment_id' =>
$values['equipment_id'],
'property_id' =>
$values['property_id'],
'property_name' =>
$values['property_name'],
'building_id' =>
$values['building_id'],
'entrance_id' =>
$values['entrance_id'],
'floor' =>
$values['floor'],
'street_name' =>
$values['street_name'],
'street_number' =>
$values['street_number'],
'apartment_id' =>
$values['apartment_id']));
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
'type' =>
'view',
'vendor_id' =>
$values['vendor_id'],
'vendor_name' =>
$values['vendor_name']));
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uidocument.edit',
'document_id' => $document_id
);
$dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$sep = '/';
$dlarr[strpos($dateformat,'y')] = 'yyyy';
$dlarr[strpos($dateformat,'m')] = 'MM';
$dlarr[strpos($dateformat,'d')] = 'DD';
ksort($dlarr);
$dateformat= (implode($sep,$dlarr));
$data = array
(
'vendor_data'
=> $vendor_data,
'record_history'
=> $record_history,
'table_header_history' =>
$table_header_history,
'lang_history'
=> lang('History'),
'lang_no_history'
=> lang('No history'),
'calendar_gif'
=> './'.$this->currentapp.'/templates/default/images/calendar.gif',
'calendar_source'
=> './'.$this->currentapp.'/inc/calendar.js',
'dateformat'
=> $dateformat,
'lang_popup_calendar' =>
lang('Popup Calendar'),
'link_calendar_document_date' =>
'setDateField(document.form.document_date);top.newWin=window.open('."'.".'/'.$this->currentapp.'/inc/calendar.html'."'".','."'".'cal'."'".','."'dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes'".')',
'lang_document_date_statustext' => lang('Select
date the document was created'),
'lang_document_date'
=> lang('document date'),
'value_document_date' =>
$values['document_date'],
'vendor_data'
=> $vendor_data,
'location_data'
=> $location_data,
'location_type'
=> 'form',
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.index'),
'lang_year'
=> lang('Year'),
'lang_category'
=> lang('category'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
'lang_update_file'
=> lang('Update file'),
'lang_document_id'
=> lang('document ID'),
'value_document_id'
=> $document_id,
'lang_document_name'
=> lang('document name'),
'value_document_name' =>
$values['document_name'],
'lang_document_name_statustext'
=> lang('Enter document Name'),
'lang_floor_id'
=> lang('Floor ID'),
'value_floor_id'
=> $values['floor_id'],
'lang_floor_statustext' =>
lang('Enter the floor ID'),
'lang_title'
=> lang('title'),
'value_title'
=> $values['title'],
'lang_title_statustext' =>
lang('Enter document title'),
'lang_version'
=> lang('Version'),
'value_version'
=> $values['version'],
'lang_version_statustext' =>
lang('Enter document version'),
'error'
=> $receipt['error'],
'message'
=> $receipt['message'],
'lang_descr_statustext' =>
lang('Enter a description of the document'),
'lang_descr'
=> lang('Description'),
'value_descr'
=> $values['descr'],
'lang_done_statustext' =>
lang('Back to the list'),
'lang_save_statustext' =>
lang('Save the document'),
'lang_no_cat'
=> lang('Select category'),
'lang_cat_statustext' =>
lang('Select the category the document belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'values[cat_id]',
'value_cat_id'
=> $values['cat_id'],
'cat_list'
=> $this->bo->select_category_list('select',$values['cat_id']),
'lang_coordinator'
=> lang('Coordinator'),
'lang_user_statustext' =>
lang('Select the coordinator the document belongs to. To do not use a category
select NO USER'),
'select_user_name'
=> 'values[coordinator]',
'lang_no_user'
=> lang('Select coordinator'),
'user_list'
=> $this->bocommon->get_user_list('select',$values['coordinator']),
'status_list'
=> $this->bo->select_status_list('select',$values['status']),
'select_status_name' =>
'values[status]',
'lang_no_status'
=> lang('Select status'),
'lang_status'
=> lang('Status'),
'lang_status_statustext' =>
lang('What is the current status of this document ?'),
'branch_list'
=> $this->bo->select_branch_list($values['branch_id']),
'lang_no_branch'
=> lang('No branch'),
'lang_branch'
=> lang('branch'),
'lang_branch_statustext' =>
lang('Select the branch for this document'),
'edit_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&document_id='
. $document_id),
'lang_edit_statustext'
=> lang('Edit this entry'),
'lang_edit'
=> lang('Edit')
);
$appname = lang('document');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$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.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** class.bocommon.inc.php 26 Apr 2003 08:14:13 -0000 1.39
--- class.bocommon.inc.php 28 Apr 2003 10:26:44 -0000 1.40
***************
*** 267,270 ****
--- 267,276 ----
$location['value_equipment_id']
= $data['equipment_id'];
$location['lang_select_equipment_help']
= lang('Klick this link to select equipment');
+
+ if($data['equipment_id'])
+ {
+ $location['value_equipment_type'] =
$this->socommon->get_equipment_type($data['equipment_id']);
+ }
+
}
else
***************
*** 548,552 ****
'link_pricebook' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uipricebook.index'),
'lang_pricebook' =>
lang('Pricebook'),
! 'link_documentation'=>
$GLOBALS['phpgw']->link('/property/list_documentation.php'),
'lang_documentation'=> lang('Documentation')
);
--- 554,558 ----
'link_pricebook' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uipricebook.index'),
'lang_pricebook' =>
lang('Pricebook'),
! 'link_documentation'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uidocument.index'),
'lang_documentation'=> lang('Documentation')
);
Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** class.socommon.inc.php 25 Apr 2003 09:46:14 -0000 1.17
--- class.socommon.inc.php 28 Apr 2003 10:26:44 -0000 1.18
***************
*** 55,58 ****
--- 55,65 ----
}
+ function get_equipment_type($equipment_id='')
+ {
+ $this->db->query("SELECT fm_equipment_type.name FROM
fm_equipment $this->join fm_equipment_type on
fm_equipment.equipment_type_id=fm_equipment_type.id where
equipment_id='$equipment_id' ");
+ $this->db->next_record();
+ return $this->db->f('name');
+ }
+
function read_location_data($location_code)
{
Index: class.sostandard_2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_2.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.sostandard_2.inc.php 25 Apr 2003 11:36:53 -0000 1.11
--- class.sostandard_2.inc.php 28 Apr 2003 10:26:44 -0000 1.12
***************
*** 155,158 ****
--- 155,161 ----
$table='fm_meter_category';
break;
+ case 'document':
+ $table='fm_document_category';
+ break;
}
Index: class.uiadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uiadmin.inc.php 25 Apr 2003 11:36:53 -0000 1.8
--- class.uiadmin.inc.php 28 Apr 2003 10:26:44 -0000 1.9
***************
*** 69,73 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('admin','nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$values = get_var('values',array('POST'));
--- 69,73 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('admin','nextmatchs',
!
'search_field'));
$values = get_var('values',array('POST'));
Index: class.uiapartment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiapartment.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uiapartment.inc.php 25 Apr 2003 11:36:53 -0000 1.6
--- class.uiapartment.inc.php 28 Apr 2003 10:26:44 -0000 1.7
***************
*** 71,75 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu($sub);
--- 71,75 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu($sub);
Index: class.uibuilding.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uibuilding.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uibuilding.inc.php 25 Apr 2003 11:36:53 -0000 1.14
--- class.uibuilding.inc.php 28 Apr 2003 10:26:44 -0000 1.15
***************
*** 75,79 ****
'nextmatchs',
$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'));
--- 75,79 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
Index: class.uidrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidrawing.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.uidrawing.inc.php 26 Apr 2003 08:14:13 -0000 1.11
--- class.uidrawing.inc.php 28 Apr 2003 10:26:44 -0000 1.12
***************
*** 40,44 ****
$this->so =
CreateObject($this->currentapp.'.sodrawing',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
- $this->config =
CreateObject('phpgwapi.config',$this->currentapp);
$this->vfs =
CreateObject('phpgwapi.vfs');
$this->rootdir =
$this->vfs->basedir;
--- 40,43 ----
***************
*** 76,88 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
- $lookup = get_var('lookup',array('POST','GET'));
$links = $this->bocommon->menu();
- $this->config->read_repository();
-
- $drawing_path=
$this->config->config_data['drawing_path'];
-
$drawing_list = $this->bo->read();
--- 75,82 ----
'menu',
'nextmatchs',
!
'search_field'));
$links = $this->bocommon->menu();
$drawing_list = $this->bo->read();
***************
*** 128,132 ****
'district_id' =>
$this->district_id,
'filter'
=>$this->filter,
-
'lookup'
=>$lookup,
'query'
=>$this->query)
)),
--- 122,125 ----
***************
*** 141,145 ****
'district_id' =>
$this->district_id,
'filter'
=>$this->filter,
-
'lookup'
=>$lookup,
'query'
=>$this->query)
)),
--- 134,137 ----
***************
*** 157,161 ****
'district_id' =>
$this->district_id,
'filter'
=>$this->filter,
-
'lookup'
=>$lookup,
'query'
=>$this->query)
)),
--- 149,152 ----
***************
*** 183,187 ****
'filter'
=>$this->filter,
'status_id'
=>$this->status_id,
- 'lookup'
=>$lookup,
'query'
=>$this->query
);
--- 174,177 ----
***************
*** 189,197 ****
$data = array
(
! 'link_history'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidrawing.index&lookup='
. $lookup),
'lang_history_statustext' =>
lang('searh for history at this location'),
'lang_select'
=> lang('select'),
- 'lookup_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit'),
- 'lookup'
=> $lookup,
'links'
=> $links,
'allow_allrows'
=> false,
--- 179,185 ----
$data = array
(
! 'link_history'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidrawing.index'),
'lang_history_statustext' =>
lang('searh for history at this location'),
'lang_select'
=> lang('select'),
'links'
=> $links,
'allow_allrows'
=> false,
Index: class.uientrance.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uientrance.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uientrance.inc.php 25 Apr 2003 11:36:53 -0000 1.7
--- class.uientrance.inc.php 28 Apr 2003 10:26:44 -0000 1.8
***************
*** 71,75 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu($sub);
--- 71,75 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu($sub);
Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.uiequipment.inc.php 25 Apr 2003 11:36:53 -0000 1.15
--- class.uiequipment.inc.php 28 Apr 2003 10:26:44 -0000 1.16
***************
*** 73,77 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$sub = get_var('sub',array('POST','GET'));
--- 73,77 ----
'menu',
'nextmatchs',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** class.uiinvoice.inc.php 25 Apr 2003 11:36:53 -0000 1.19
--- class.uiinvoice.inc.php 28 Apr 2003 10:26:44 -0000 1.20
***************
*** 89,93 ****
'nextmatchs',
$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'));
--- 89,93 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub =
get_var('sub',array('POST','GET'));
***************
*** 562,566 ****
'nextmatchs',
$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'));
--- 562,566 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub =
get_var('sub',array('POST','GET'));
Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uilookup.inc.php 26 Apr 2003 08:14:13 -0000 1.16
--- class.uilookup.inc.php 28 Apr 2003 10:26:44 -0000 1.17
***************
*** 77,81 ****
'nextmatchs',
$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'));
--- 77,81 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
***************
*** 189,193 ****
'nextmatchs',
$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'));
--- 189,193 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
***************
*** 287,291 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$street_list = $this->bo->read_street();
--- 287,291 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$street_list = $this->bo->read_street();
***************
*** 382,386 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$ns3420_list = $this->bo->read_ns3420();
--- 382,386 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$ns3420_list = $this->bo->read_ns3420();
***************
*** 476,480 ****
'nextmatchs',
$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'));
--- 476,480 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
***************
*** 650,654 ****
'nextmatchs',
$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'));
--- 650,654 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
***************
*** 750,753 ****
--- 750,754 ----
'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',
+ 'lang_select'
=> lang('Select'),
'filter_list'
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' =>
'yes')),
Index: class.uimeter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uimeter.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.uimeter.inc.php 25 Apr 2003 11:36:53 -0000 1.4
--- class.uimeter.inc.php 28 Apr 2003 10:26:44 -0000 1.5
***************
*** 71,75 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 71,75 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
Index: class.uipricebook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uipricebook.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uipricebook.inc.php 25 Apr 2003 11:36:53 -0000 1.8
--- class.uipricebook.inc.php 28 Apr 2003 10:26:44 -0000 1.9
***************
*** 81,85 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 81,85 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
***************
*** 250,254 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 250,254 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
***************
*** 490,494 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 490,494 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
***************
*** 699,703 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 699,703 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
***************
*** 824,828 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 824,828 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uiproject.inc.php 25 Apr 2003 11:36:53 -0000 1.14
--- class.uiproject.inc.php 28 Apr 2003 10:26:44 -0000 1.15
***************
*** 74,78 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
--- 74,78 ----
'menu',
'nextmatchs',
!
'search_field'));
Index: class.uiproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproperty.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.uiproperty.inc.php 25 Apr 2003 11:36:53 -0000 1.18
--- class.uiproperty.inc.php 28 Apr 2003 10:26:44 -0000 1.19
***************
*** 75,79 ****
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 75,79 ----
'nextmatchs',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$links = $this->bocommon->menu();
Index: class.uirequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uirequest.inc.php 26 Apr 2003 08:14:13 -0000 1.8
--- class.uirequest.inc.php 28 Apr 2003 10:26:44 -0000 1.9
***************
*** 74,78 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 74,78 ----
'menu',
'nextmatchs',
!
'search_field'));
$links = $this->bocommon->menu();
Index: class.uistandard_2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uistandard_2.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uistandard_2.inc.php 25 Apr 2003 11:36:53 -0000 1.8
--- class.uistandard_2.inc.php 28 Apr 2003 10:26:44 -0000 1.9
***************
*** 61,65 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('standard_2','nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$standard_list = $this->bo->read($type);
--- 61,65 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('standard_2','nextmatchs',
!
'search_field'));
$standard_list = $this->bo->read($type);
Index: class.uistandard_3.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uistandard_3.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uistandard_3.inc.php 25 Apr 2003 11:36:53 -0000 1.7
--- class.uistandard_3.inc.php 28 Apr 2003 10:26:44 -0000 1.8
***************
*** 60,64 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('standard_3','nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$standard_list = $this->bo->read($type);
--- 60,64 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('standard_3','nextmatchs',
!
'search_field'));
$standard_list = $this->bo->read($type);
Index: class.uistandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uistandard_entity.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uistandard_entity.inc.php 25 Apr 2003 11:36:53 -0000 1.10
--- class.uistandard_entity.inc.php 28 Apr 2003 10:26:44 -0000 1.11
***************
*** 65,69 ****
'nextmatchs',
'menu',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 65,69 ----
'nextmatchs',
'menu',
!
'search_field'));
$links = $this->bocommon->menu();
***************
*** 306,310 ****
'standard_entity',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$attrib_list = $this->bo->read_attrib($type,$type_id);
--- 306,310 ----
'standard_entity',
'nextmatchs',
!
'search_field'));
$attrib_list = $this->bo->read_attrib($type,$type_id);
Index: class.uitemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitemplate.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.uitemplate.inc.php 25 Apr 2003 11:36:53 -0000 1.4
--- class.uitemplate.inc.php 28 Apr 2003 10:26:44 -0000 1.5
***************
*** 76,80 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$workorder_id =
get_var('workorder_id',array('POST','GET'));
--- 76,80 ----
'menu',
'nextmatchs',
!
'search_field'));
$workorder_id =
get_var('workorder_id',array('POST','GET'));
***************
*** 237,241 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$delete = get_var('delete',array('POST','GET'));
--- 237,241 ----
'menu',
'nextmatchs',
!
'search_field'));
$delete = get_var('delete',array('POST','GET'));
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** class.uitts.inc.php 25 Apr 2003 11:36:53 -0000 1.20
--- class.uitts.inc.php 28 Apr 2003 10:26:44 -0000 1.21
***************
*** 74,78 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$links = $this->bocommon->menu();
--- 74,78 ----
'menu',
'nextmatchs',
!
'search_field'));
$links = $this->bocommon->menu();
Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** class.uiwo_hour.inc.php 25 Apr 2003 11:36:53 -0000 1.17
--- class.uiwo_hour.inc.php 28 Apr 2003 10:26:44 -0000 1.18
***************
*** 733,737 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$delete = get_var('delete',array('POST','GET'));
--- 733,737 ----
'menu',
'nextmatchs',
!
'search_field'));
$delete = get_var('delete',array('POST','GET'));
***************
*** 925,929 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$delete = get_var('delete',array('POST','GET'));
--- 925,929 ----
'menu',
'nextmatchs',
!
'search_field'));
$delete = get_var('delete',array('POST','GET'));
Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.uiworkorder.inc.php 25 Apr 2003 11:36:53 -0000 1.15
--- class.uiworkorder.inc.php 28 Apr 2003 10:26:44 -0000 1.16
***************
*** 76,80 ****
'menu',
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$sub = get_var('sub',array('POST','GET'));
--- 76,80 ----
'menu',
'nextmatchs',
!
'search_field'));
$sub = get_var('sub',array('POST','GET'));
***************
*** 601,605 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('workorder',
'menu',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$data = array
--- 601,605 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('workorder',
'menu',
!
'search_field'));
$data = array
Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.uiXport.inc.php 25 Apr 2003 09:46:14 -0000 1.21
--- class.uiXport.inc.php 28 Apr 2003 10:26:44 -0000 1.22
***************
*** 478,482 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$values = get_var('values',array('POST','GET'));
--- 478,482 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$values = get_var('values',array('POST','GET'));
***************
*** 557,561 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
$values = get_var('values',array('POST','GET'));
--- 557,561 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
'search_field'));
$values = get_var('values',array('POST','GET'));
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** hook_admin.inc.php 24 Apr 2003 11:20:40 -0000 1.26
--- hook_admin.inc.php 28 Apr 2003 10:26:44 -0000 1.27
***************
*** 27,30 ****
--- 27,31 ----
'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'),
'Drawing Status'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=drawing_status'),
'Meter Categories'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=meter'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,NONE,1.1 class.sodocument.inc.php,NONE,1.1 class.uidocument.inc.php,NONE,1.1 class.bocommon.inc.php,1.39,1.40 class.socommon.inc.php,1.17,1.18 class.sostandard_2.inc.php,1.11,1.12 class.uiadmin.inc.php,1.8,1.9 class.uiapartment.inc.php,1.6,1.7class.uibuilding.inc.php,1.14,1.15 class.uidrawing.inc.php,1.11,1.12 class.uientrance.inc.php,1.7,1.8 class.uiequipment.inc.php,1.15,1.16 class.uiinvoice.inc.php,1.19,1.20 class.uilookup.inc.php,1.16,1.17 class.uimeter.inc.php,1.4,1.5 class.uipricebook.inc.php,1.8,1.9 class.uiproject.inc.php,1.14,1.15 class.uiproperty.inc.php,1.18,1.19 class.uirequest.inc.php,1.8,1.9 class.uistandard_2.inc.php,1.8,1.9class.uistandard_3.inc.php,1.7,1.8 class.uistandard_entity.inc.php,1.10,1.11 class.uitemplate.inc.php,1.4,1.5 class.uitts.inc.php,1.20,1.21 class.uiwo_hour.inc.php,1.17,1.18 class.uiworkorder.inc.php,1.15,1.16 class.uiXport.inc.php,1.21,1.22 hook_admin.inc.php,1.26,1.27,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup/templates/default config.tpl,1.3,1.3.2.1
- Next by Date:
[Phpgroupware-cvs] CVS: property/templates/default document.xsl,NONE,1.1 search_field.xsl,NONE,1.1 vendor_view.xsl,NONE,1.1 location_view.xsl,1.3,1.4lookup.xsl,1.16,1.17
- Previous by thread:
[Phpgroupware-cvs] CVS: setup/templates/default config.tpl,1.3,1.3.2.1
- Next by thread:
[Phpgroupware-cvs] CVS: property/templates/default document.xsl,NONE,1.1 search_field.xsl,NONE,1.1 vendor_view.xsl,NONE,1.1 location_view.xsl,1.3,1.4lookup.xsl,1.16,1.17
- Index(es):