[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php,1.25,1.26
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php,1.25,1.26 class.uiwo_hour.inc.php,1.28,1.29 class.uitts.inc.php,1.29,1.30 class.uiproject.inc.php,1.32,1.33 class.uimeter.inc.php,1.11,1.12 class.uilookup.inc.php,1.24,1.25 class.uilocation.inc.php,1.16,1.17 class.uiequipment.inc.php,1.28,1.29 class.sotts.inc.php,1.20,1.21 class.soproject.inc.php,1.21,1.22 class.someter.inc.php,1.2,1.3 class.soequipment.inc.php,1.18,1.19class.soadmin_location.inc.php,1.9,1.10 class.bometer.inc.php,1.2,1.3 class.bolocation.inc.php,1.17,1.18 class.boequipment.inc.php,1.14,1.15class.bocommon.inc.php,1.59,1.60 |
Date: |
Tue, 24 Jun 2003 06:26:42 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv28393/inc
Modified Files:
class.uiworkorder.inc.php class.uiwo_hour.inc.php
class.uitts.inc.php class.uiproject.inc.php
class.uimeter.inc.php class.uilookup.inc.php
class.uilocation.inc.php class.uiequipment.inc.php
class.sotts.inc.php class.soproject.inc.php
class.someter.inc.php class.soequipment.inc.php
class.soadmin_location.inc.php class.bometer.inc.php
class.bolocation.inc.php class.boequipment.inc.php
class.bocommon.inc.php
Log Message:
no message
Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** class.uiworkorder.inc.php 22 Jun 2003 11:10:44 -0000 1.25
--- class.uiworkorder.inc.php 24 Jun 2003 10:26:40 -0000 1.26
***************
*** 208,212 ****
));
}
! /* if($uicols['name'][$i]=='street_name')
{
$table_header[$i]['sort_link']
=true;
--- 208,212 ----
));
}
! if($uicols['name'][$i]=='address')
{
$table_header[$i]['sort_link']
=true;
***************
*** 224,228 ****
));
}
! */
}
}
--- 224,228 ----
));
}
!
}
}
***************
*** 788,808 ****
!
$location_data=$this->bocommon->initiate_ui_location(array(
! 'location_type' => 'view',
! 'equipment' => true,
! 'tenant' => true,
! 'address' => true,
! 'equipment_id' =>
$project['equipment_id'],
! 'property_id' =>
$project['property_id'],
! 'property_name' =>
$project['property_name'],
! 'building_id' =>
$project['building_id'],
! 'entrance_id' =>
$project['entrance_id'],
! 'floor' =>
$project['floor'],
! 'street_name' =>
$project['street_name'],
! 'street_number' =>
$project['street_number'],
! 'tenant_id' =>
$project['tenant_id'],
! 'tenant_name' =>
$project['tenant_name'],
! 'contact_phone' =>
$project['contact_phone'],
! 'apartment_id' =>
$project['apartment_id']));
$data = array
--- 788,799 ----
!
$location_data=$this->bolocation->initiate_ui_location(array(
! 'values' =>
$project['location_data'],
! 'type_id' =>
count(explode('-',$project['location_data']['location_code'])),
! 'no_link' =>
False, // disable lookup links for location type less than type_id
! 'tenant' =>
$project['location_data']['tenant_id'],
! 'equipment' =>
$project['location_data']['equipment_id'],
! 'lookup_type' => 'view'
! ));
$data = array
Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** class.uiwo_hour.inc.php 22 Jun 2003 11:10:44 -0000 1.28
--- class.uiwo_hour.inc.php 24 Jun 2003 10:26:40 -0000 1.29
***************
*** 471,477 ****
'to_name'
=> $workorder['vendor_name'],
- 'lang_contact_phone' =>
lang('Contact Phone'),
- 'contact_phone'
=> $project['contact_phone'],
-
'lang_title'
=> lang('Title'),
'title'
=> $workorder['title'],
--- 471,474 ----
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.uitts.inc.php 22 Jun 2003 11:10:44 -0000 1.29
--- class.uitts.inc.php 24 Jun 2003 10:26:40 -0000 1.30
***************
*** 268,271 ****
--- 268,274 ----
}
+ $values['street_name'] =
$_POST['street_name'];
+ $values['street_number'] =
$_POST['street_number'];
+ $values['location_name'] = $_POST['loc'
. (count($values['location'])).'_name']; // if not address - get the parent
name as address
if(!$values['subject'])
***************
*** 489,492 ****
--- 492,496 ----
);
+ //_debug_array($ticket['location_data']);
$location_data=$this->bolocation->initiate_ui_location(array(
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** class.uiproject.inc.php 23 Jun 2003 12:26:43 -0000 1.32
--- class.uiproject.inc.php 24 Jun 2003 10:26:40 -0000 1.33
***************
*** 163,167 ****
(
'sort' => $this->sort,
!
'var' => 'loc1',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiproject.index',
--- 163,167 ----
(
'sort' => $this->sort,
!
'var' => 'location_code',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiproject.index',
***************
*** 189,193 ****
));
}
! if($uicols['name'][$i]=='street_name')
{
$table_header[$i]['sort_link']
=true;
--- 189,193 ----
));
}
! if($uicols['name'][$i]=='address')
{
$table_header[$i]['sort_link']
=true;
***************
*** 195,199 ****
(
'sort' => $this->sort,
!
'var' => 'street_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiproject.index',
--- 195,199 ----
(
'sort' => $this->sort,
!
'var' => 'address',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiproject.index',
***************
*** 354,357 ****
--- 354,361 ----
}
+ $values['street_name'] =
$_POST['street_name'];
+ $values['street_number'] =
$_POST['street_number'];
+ $values['location_name'] = $_POST['loc'
. (count($values['location'])).'_name']; // if not address - get the parent
name as address
+
}
else
***************
*** 384,388 ****
if ($values['save'])
{
! if(!$values['location_data'])
{
$receipt['error'][]=array('msg'=>lang('Please select a location !'));
--- 388,392 ----
if ($values['save'])
{
! if(!$values['location'])
{
$receipt['error'][]=array('msg'=>lang('Please select a location !'));
Index: class.uimeter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uimeter.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.uimeter.inc.php 19 Jun 2003 20:03:09 -0000 1.11
--- class.uimeter.inc.php 24 Jun 2003 10:26:40 -0000 1.12
***************
*** 35,42 ****
$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.'.bometer');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->start =
$this->bo->start;
--- 35,47 ----
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bo =
CreateObject($this->currentapp.'.bometer');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->bolocation =
CreateObject($this->currentapp.'.bolocation');
+
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl_read =
$this->acl2->check('.equipment',1);
+ $this->acl_add =
$this->acl2->check('.equipment',2);
+ $this->acl_edit =
$this->acl2->check('.equipment',4);
+ $this->acl_delete =
$this->acl2->check('.equipment',8);
$this->start =
$this->bo->start;
***************
*** 67,71 ****
{
! $GLOBALS['phpgw']->xslttpl->add_file(array('meter',
'menu',
'nextmatchs',
--- 72,76 ----
{
!
$GLOBALS['phpgw']->xslttpl->add_file(array('meter','values','table_header',
'menu',
'nextmatchs',
***************
*** 76,80 ****
$meter_list = $this->bo->read();
! while (is_array($meter_list) && list(,$meter) =
each($meter_list))
{
--- 81,243 ----
$meter_list = $this->bo->read();
! $uicols = $this->bo->uicols;
! //_debug_array($uicols);
!
! $j=0;
! while (is_array($meter_list) && list(,$meter_entry) =
each($meter_list))
! {
! for ($k=0;$k<count($uicols['name']);$k++)
! {
! if($uicols['input_type'][$k]!='hidden')
! {
!
!
if($meter_entry['query_location'][$uicols['name'][$k]])
! {
!
$content[$j]['row'][$k]['statustext'] = lang('search');
!
$content[$j]['row'][$k]['text'] =
$meter_entry[$uicols['name'][$k]];
!
$content[$j]['row'][$k]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.index&query='
. $meter_entry['query_location'][$uicols['name'][$k]] . '&lookup=' . $lookup);
! }
! else
! {
!
$content[$j]['row'][$k]['value'] =
$meter_entry[$uicols['name'][$k]];
!
$content[$j]['row'][$k]['name'] = $uicols['name'][$k];
! }
!
! }
! }
!
! if(!$lookup)
! {
! if($this->acl_read)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('view the
meter');
! $content[$j]['row'][$k]['text']
= lang('view');
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.view&id='
. $meter_entry['meter_id']);
! $k++;
! }
!
! if($this->acl_edit)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('edit the
meter');
! $content[$j]['row'][$k]['text']
= lang('edit');
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit&id='
. $meter_entry['meter_id']);
! $k++;
! }
!
! if($this->acl_delete)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('delete the
meter');
! $content[$j]['row'][$k]['text']
= lang('delete');
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.delete&id='
. $meter_entry['meter_id']);
! $k++;
! }
! }
!
! $j++;
! }
!
! for ($i=0;$i<count($uicols['descr']);$i++)
! {
! if($uicols['input_type'][$i]!='hidden')
! {
! $table_header[$i]['header'] =
$uicols['descr'][$i];
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! if($uicols['name'][$i]=='loc1')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'location_code',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uimeter.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
!
'lookup'
=>$lookup,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! if($uicols['name'][$i]=='meter_id')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'meter_id',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uimeter.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
!
'lookup'
=>$lookup,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! if($uicols['name'][$i]=='address')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'address',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uimeter.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
!
'lookup'
=>$lookup,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! }
! }
!
! if(!$lookup)
! {
! if($this->acl_read)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('view');
! $i++;
! }
! if($this->acl_edit)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('edit');
! $i++;
! }
! if($this->acl_delete)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('delete');
! $i++;
! }
! }
! else
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header'] =
lang('select');
! }
!
! //_debug_array($content);
! if($this->acl_add)
! {
! $table_add[] = array
! (
! 'lang_add'
=> lang('add'),
! 'lang_add_statustext' => lang('add a
meter'),
! 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit')
!
! );
! }
!
!
! /* while (is_array($meter_list) && list(,$meter) =
each($meter_list))
{
***************
*** 140,144 ****
'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit')
);
!
$link_data = array
(
--- 303,307 ----
'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit')
);
! */
$link_data = array
(
***************
*** 189,192 ****
--- 352,360 ----
function edit()
{
+ if(!$this->acl_add && !$this->acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uimeter.index');
+ }
+
$meter_id =
get_var('meter_id',array('POST','GET'));
$values =
get_var('values',array('POST'));
***************
*** 317,321 ****
function delete()
{
! $meter_id =
get_var('meter_id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
--- 485,494 ----
function delete()
{
! if(!$this->acl_delete)
! {
!
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uimeter.index');
! }
!
! $id = get_var('id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
***************
*** 327,331 ****
if (get_var('confirm',array('POST')))
{
! $this->bo->delete($meter_id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
--- 500,504 ----
if (get_var('confirm',array('POST')))
{
! $this->bo->delete($id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
***************
*** 336,340 ****
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
! 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.delete&meter_id='
. $meter_id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
--- 509,513 ----
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
! 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.delete&id='
. $id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
***************
*** 353,356 ****
--- 526,534 ----
function view()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uimeter.index');
+ }
+
$meter_id =
get_var('meter_id',array('POST','GET'));
Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** class.uilookup.inc.php 21 Jun 2003 22:32:31 -0000 1.24
--- class.uilookup.inc.php 24 Jun 2003 10:26:40 -0000 1.25
***************
*** 760,764 ****
'search_field'));
! $equipment_list = $this->boequipment->read();
$input_name =
$GLOBALS['phpgw']->session->appsession('lookup_fields',$this->currentapp);
--- 760,764 ----
'search_field'));
! $equipment_list =
$this->boequipment->read(array('lookup'=>True));
$input_name =
$GLOBALS['phpgw']->session->appsession('lookup_fields',$this->currentapp);
Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uilocation.inc.php 22 Jun 2003 09:23:03 -0000 1.16
--- class.uilocation.inc.php 24 Jun 2003 10:26:40 -0000 1.17
***************
*** 249,252 ****
--- 249,259 ----
);
+ $input_name =
$GLOBALS['phpgw']->session->appsession('input_name',$this->currentapp);
+
+ for ($k=0;$k<count($input_name);$k++)
+ {
+ $function_exchange_values .=
"opener.document.form." . $input_name[$k] . ".value = '';" ."\r\n";
+ }
+
for ($i=0;$i<count($uicols['name']);$i++)
{
Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** class.uiequipment.inc.php 20 Jun 2003 10:31:50 -0000 1.28
--- class.uiequipment.inc.php 24 Jun 2003 10:26:40 -0000 1.29
***************
*** 180,184 ****
));
}
! if($uicols['name'][$i]=='street_name')
{
$table_header[$i]['sort_link']
=true;
--- 180,184 ----
));
}
! if($uicols['name'][$i]=='address')
{
$table_header[$i]['sort_link']
=true;
***************
*** 186,190 ****
(
'sort' => $this->sort,
!
'var' => 'street_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiequipment.index',
--- 186,190 ----
(
'sort' => $this->sort,
!
'var' => 'address',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiequipment.index',
***************
*** 309,313 ****
for ($i=0;
$i<count($insert_record['location']); $i++)
{
!
$values['location'][$insert_record['location'][$i]]=
$_POST[$insert_record['location'][$i]];
}
--- 309,316 ----
for ($i=0;
$i<count($insert_record['location']); $i++)
{
!
if($_POST[$insert_record['location'][$i]])
! {
!
$values['location'][$insert_record['location'][$i]]=
$_POST[$insert_record['location'][$i]];
! }
}
***************
*** 320,323 ****
--- 323,330 ----
}
+ $values['street_name'] =
$_POST['street_name'];
+ $values['street_number'] =
$_POST['street_number'];
+ $values['location_name'] = $_POST['loc'
. (count($values['location'])).'_name']; // if not address - get the parent
name as address
+
if(!$values['generate_id'] &&
!$values['equipment_id'] && !$id)
{
***************
*** 544,548 ****
}
! $equipment_id =
get_var('equipment_id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
--- 551,555 ----
}
! $id = get_var('id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
***************
*** 554,558 ****
if (get_var('confirm',array('POST')))
{
! $this->bo->delete($equipment_id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
--- 561,565 ----
if (get_var('confirm',array('POST')))
{
! $this->bo->delete($id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
***************
*** 563,567 ****
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
! 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.delete&equipment_id='
. $equipment_id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
--- 570,574 ----
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
! 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.delete&id='
. $id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** class.sotts.inc.php 23 Jun 2003 12:26:43 -0000 1.20
--- class.sotts.inc.php 24 Jun 2003 10:26:40 -0000 1.21
***************
*** 229,232 ****
--- 229,247 ----
{
+ while (is_array($ticket['extra']) &&
list($input_name,$value) = each($ticket['extra']))
+ {
+ if($value)
+ {
+ $cols[] = $input_name;
+ $vals[] = $value;
+ }
+ }
+
+ if($cols)
+ {
+ $cols = "," . implode(",", $cols);
+ $vals = ",'" . implode("','", $vals) . "'";
+ }
+
if($ticket['street_name'])
{
***************
*** 243,247 ****
$this->db->query("insert into fm_tts_tickets
(priority,owner,"
.
"assignedto,subject,cat_id,status,details,location_code,"
! . "equipment_id,address,tenant_id) values ('"
. $ticket['priority'] . "','"
. $GLOBALS['phpgw_info']['user']['account_id']
. "','"
--- 258,262 ----
$this->db->query("insert into fm_tts_tickets
(priority,owner,"
.
"assignedto,subject,cat_id,status,details,location_code,"
! . "address $cols) values ('"
. $ticket['priority'] . "','"
. $GLOBALS['phpgw_info']['user']['account_id']
. "','"
***************
*** 251,257 ****
. $this->db->db_addslashes($ticket['details'])
. "','"
. $ticket['location_code'] . "','"
! . $ticket['extra']['equipment_id'] . "','"
! . $address . "','"
! . $ticket['tenant_id'] .
"')",__LINE__,__FILE__);
$id =
$this->db->get_last_insert_id('fm_tts_tickets','id');
--- 266,270 ----
. $this->db->db_addslashes($ticket['details'])
. "','"
. $ticket['location_code'] . "','"
! . $address . "' $vals )",__LINE__,__FILE__);
$id =
$this->db->get_last_insert_id('fm_tts_tickets','id');
Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.soproject.inc.php 23 Jun 2003 12:26:43 -0000 1.21
--- class.soproject.inc.php 24 Jun 2003 10:26:40 -0000 1.22
***************
*** 193,197 ****
$query = ereg_replace('"','',$query);
! $querymethod = " AND (fm_project.name LIKE
'%$query%' or fm_project.descr LIKE '%$query%' or fm_project.location_code LIKE
'%$query%')";
}
--- 193,197 ----
$query = ereg_replace('"','',$query);
! $querymethod = " AND (fm_project.name LIKE
'%$query%' or fm_project.address LIKE '%$query%' or fm_project.location_code
LIKE '%$query%')";
}
***************
*** 515,523 ****
function edit($project)
{
! /* while (is_array($project['location']) &&
list($input_name,$value) = each($project['location']))
{
$vals[] = "$input_name = '$value'";
}
! */
while (is_array($project['extra']) &&
list($input_name,$value) = each($project['extra']))
{
--- 515,524 ----
function edit($project)
{
! _debug_array($project);
! while (is_array($project['location']) &&
list($input_name,$value) = each($project['location']))
{
$vals[] = "$input_name = '$value'";
}
!
while (is_array($project['extra']) &&
list($input_name,$value) = each($project['extra']))
{
Index: class.someter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.someter.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.someter.inc.php 21 Jun 2003 19:27:35 -0000 1.2
--- class.someter.inc.php 24 Jun 2003 10:26:40 -0000 1.3
***************
*** 16,21 ****
$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->socommon =
CreateObject($this->currentapp.'.socommon');
--- 16,21 ----
$this->db = $GLOBALS['phpgw']->db;
$this->db2 = $this->db;
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
+ $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->socommon =
CreateObject($this->currentapp.'.socommon');
***************
*** 71,74 ****
--- 71,112 ----
}
+
+ $entity_table = 'fm_meter';
+
+
+
+ $cols .= $entity_table . '.location_code';
+ $cols_return[] = 'location_code';
+
+ $cols .= ",$entity_table.id as meter_id";
+ $cols_return[] = 'meter_id';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'meter_id';
+ $uicols['descr'][] = lang('Meter
ID');
+ $uicols['statustext'][] = lang('Meter ID');
+
+ $cols .= ",$entity_table.name ";
+ $cols_return[] = 'name';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'name';
+ $uicols['descr'][] = lang('Name');
+ $uicols['statustext'][] = lang('Name');
+
+ $cols .= ",fm_meter_category.descr as meter_type";
+ $cols_return[] = 'meter_type';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'meter_type';
+ $uicols['descr'][] = lang('Meter
Type');
+ $uicols['statustext'][] = lang('Meter Type');
+
+
+ $joinmethod .= " $this->join fm_meter_category ON
($entity_table.type = fm_meter_category.id))";
+ $paranthesis .='(';
+
+
+ $sql =
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
+
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query));
+
+
if ($order)
{
***************
*** 77,81 ****
else
{
! $ordermethod = ' order by property_id asc';
}
--- 115,119 ----
else
{
! $ordermethod = ' order by location_code asc';
}
***************
*** 93,101 ****
$query = ereg_replace('"','',$query);
! $querymethod = " $where (fm_meter.name LIKE
'%$query%' or fm_meter.id LIKE '%$query%')";
}
! $sql = "SELECT fm_meter.* , fm_location.type as
location_type FROM fm_meter $this->join fm_location on fm_meter.location_code =
fm_location.location_code "
! . " $filtermethod $querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
--- 131,143 ----
$query = ereg_replace('"','',$query);
! $querymethod = " $where (fm_meter.name LIKE
'%$query%' OR fm_meter.id LIKE '%$query%' OR fm_meter.location_code LIKE
'%$query%')";
}
! $sql .= " $filtermethod $querymethod";
! //echo $sql;
! $this->uicols = $this->bocommon->uicols;
! $cols_return = $this->bocommon->cols_return;
! $type_id =
$this->bocommon->type_id;
! $this->cols_extra = $this->bocommon->cols_extra;
$this->db2->query($sql,__LINE__,__FILE__);
***************
*** 103,121 ****
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
while ($this->db->next_record())
{
! $ngrants =
(int)$this->grants[$this->db->f('user_id')];
! $meter[] = array
! (
! 'meter_id' =>
$this->db->f('id'),
! 'owner' =>
$this->db->f('owner'),
! 'name' =>
$this->db->f('name'),
! 'entry_date' =>
$this->db->f('entry_date'),
! 'type' =>
$this->db->f('type'),
! 'address' =>
$this->db->f('address'),
! 'location_type' =>
$this->db->f('location_type'),
! 'grants' =>
$ngrants
! );
}
return $meter;
}
--- 145,168 ----
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+
+ $j=0;
while ($this->db->next_record())
{
! for ($i=0;$i<count($cols_return);$i++)
! {
! $meter[$j][$cols_return[$i]] =
$this->db->f($cols_return[$i]);
! }
!
! $location_code= $this->db->f('location_code');
! $location = split('-',$location_code);
! for ($m=0;$m<count($location);$m++)
! {
! $meter[$j]['loc' . ($m+1)] =
$location[$m];
! $meter[$j]['query_location']['loc' .
($m+1)]=implode("-", array_slice($location, 0, ($m+1)));
! }
!
! $j++;
}
+
return $meter;
}
Index: class.soequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soequipment.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.soequipment.inc.php 23 Jun 2003 12:26:43 -0000 1.18
--- class.soequipment.inc.php 24 Jun 2003 10:26:40 -0000 1.19
***************
*** 81,84 ****
--- 81,85 ----
$cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
$district_id =
(isset($data['district_id'])?$data['district_id']:0);
+ $lookup =
(isset($data['lookup'])?$data['lookup']:'');
}
***************
*** 122,126 ****
$sql =
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols_return'=>$cols_return,'cols'=>$cols,
!
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query));
--- 123,127 ----
$sql =
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols_return'=>$cols_return,'cols'=>$cols,
!
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query,'lookup'=>$lookup));
***************
*** 157,161 ****
$query = ereg_replace('"','',$query);
! $querymethod = " $where ( fm_equipment.descr
LIKE '%$query%' OR fm_equipment.location_code LIKE '%$query%' OR equipment_id
LIKE '%$query%' OR loc1_name LIKE '%$query%')";
$where = 'AND';
}
--- 158,162 ----
$query = ereg_replace('"','',$query);
! $querymethod = " $where ( fm_equipment.descr
LIKE '%$query%' OR fm_equipment.location_code LIKE '%$query%' OR equipment_id
LIKE '%$query%' OR loc1_name LIKE '%$query%' OR address LIKE '%$query%')";
$where = 'AND';
}
***************
*** 164,172 ****
//echo $sql;
! $uicols =
$this->bocommon->uicols;
! $cols_return = $this->bocommon->cols_return;
! // $max_location_join =
$this->bocommon->max_location_join;
! $type_id =
$this->bocommon->type_id;
! $this->cols_extra = $this->bocommon->cols_extra;
if($filter)
--- 165,174 ----
//echo $sql;
! $uicols =
$this->bocommon->uicols;
! $cols_return =
$this->bocommon->cols_return;
! $this->cols_return_lookup =
$this->bocommon->cols_return_lookup;
! $type_id =
$this->bocommon->type_id;
! $this->cols_extra =
$this->bocommon->cols_extra;
!
if($filter)
Index: class.soadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.soadmin_location.inc.php 16 Jun 2003 08:53:22 -0000 1.9
--- class.soadmin_location.inc.php 24 Jun 2003 10:26:40 -0000 1.10
***************
*** 229,233 ****
$fd['remark'] = array('type' => 'text', 'nullable' =>
True);
!
$add_columns_in_tables=array('fm_report','fm_equipment','fm_project','fm_tts_tickets','fm_request',fm_document);
if($this->oProc->CreateTable('fm_location'.
$standard['id'],array('fd' => $fd,'pk' => $pk,'fk' => $fk,'ix' =>
array('location_code'),'uc' => array())))
--- 229,233 ----
$fd['remark'] = array('type' => 'text', 'nullable' =>
True);
!
$add_columns_in_tables=array('fm_report','fm_equipment','fm_meter','fm_project','fm_tts_tickets','fm_request',fm_document);
if($this->oProc->CreateTable('fm_location'.
$standard['id'],array('fd' => $fd,'pk' => $pk,'fk' => $fk,'ix' =>
array('location_code'),'uc' => array())))
Index: class.bometer.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bometer.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bometer.inc.php 23 May 2003 08:40:19 -0000 1.2
--- class.bometer.inc.php 24 Jun 2003 10:26:40 -0000 1.3
***************
*** 48,51 ****
--- 48,52 ----
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.someter');
+ $this->solocation =
CreateObject($this->currentapp.'.solocation');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->socommon =
CreateObject($this->currentapp.'.socommon');
***************
*** 162,170 ****
$this->total_records = $this->so->total_records;
for ($i=0; $i<count($meter); $i++)
{
! $meter[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($meter[$i]['entry_date']);
! $meter[$i]['owner'] =
$GLOBALS['phpgw']->accounts->id2name($meter[$i]['owner']);
}
return $meter;
}
--- 163,183 ----
$this->total_records = $this->so->total_records;
+ $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
+ $this->uicols = $this->so->uicols;
+ $cols_extra = $this->so->cols_extra;
+
for ($i=0; $i<count($meter); $i++)
{
! $meter[$i]['user'] =
$GLOBALS['phpgw']->accounts->id2name($meter[$i]['user_id']);
! $meter[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($meter[$i]['entry_date'],$dateformat);
!
$location_data=$this->solocation->read_single($meter[$i]['location_code']);
!
! for ($j=0;$j<count($cols_extra);$j++)
! {
! $meter[$i][$cols_extra[$j]] =
$location_data[$cols_extra[$j]];
! }
}
+
return $meter;
}
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** class.bolocation.inc.php 23 Jun 2003 12:26:43 -0000 1.17
--- class.bolocation.inc.php 24 Jun 2003 10:26:40 -0000 1.18
***************
*** 273,277 ****
$location['location'][$i]['extra'][0]['input_name'] = 'loc' .
($i+1).'_name';
$input_name[]
=
$location['location'][$i]['extra'][0]['input_name'];
!
$location['location'][$i]['extra'][0]['input_type']
= 'text';
$location['location'][$i]['extra'][0]['size'] = 30;
$location['location'][$i]['extra'][0]['lookup_function_call'] = 'lookup_loc'
. ($i+1) . '()';
--- 273,277 ----
$location['location'][$i]['extra'][0]['input_name'] = 'loc' .
($i+1).'_name';
$input_name[]
=
$location['location'][$i]['extra'][0]['input_name'];
!
$location['location'][$i]['extra'][0]['input_type']
= 'hidden';
$location['location'][$i]['extra'][0]['size'] = 30;
$location['location'][$i]['extra'][0]['lookup_function_call'] = 'lookup_loc'
. ($i+1) . '()';
***************
*** 380,385 ****
$location['location'][$i]['extra'][1]['value']
= $data['values']['first_name'];
$location['location'][$i]['extra'][1]['statustext']
= lang('first name');
!
! $i++;
$location['location'][$i]['input_type'] = 'text';
$location['location'][$i]['name'] =
lang('Contact phone');
--- 380,384 ----
$location['location'][$i]['extra'][1]['value']
= $data['values']['first_name'];
$location['location'][$i]['extra'][1]['statustext']
= lang('first name');
! $i++;
$location['location'][$i]['input_type'] = 'text';
$location['location'][$i]['name'] =
lang('Contact phone');
***************
*** 443,446 ****
--- 442,446 ----
$GLOBALS['phpgw']->session->appsession('lookup_fields',$this->currentapp,$input_name);
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp,$insert_record);
+
$GLOBALS['phpgw']->session->appsession('input_name',$this->currentapp,$input_name);
for ($i=0;$i<count($location['location']);$i++)
***************
*** 456,464 ****
$location['lookup_functions'] .= 'function ' .
$lookup_functions[$j]['name'] ."\r\n";
$location['lookup_functions'] .= '{'."\r\n";
-
- for ($k=0;$k<count($input_name);$k++)
- {
- $location['lookup_functions'] .=
"document.form." . $input_name[$k] . ".value = '';" ."\r\n";
- }
$location['lookup_functions'] .=
$lookup_functions[$j]['action'] ."\r\n";
$location['lookup_functions'] .= '}'."\r\n";
--- 456,459 ----
Index: class.boequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boequipment.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.boequipment.inc.php 19 Jun 2003 20:03:10 -0000 1.14
--- class.boequipment.inc.php 24 Jun 2003 10:26:40 -0000 1.15
***************
*** 201,224 ****
}
! 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,'district_id' =>
$this->district_id));
$this->total_records = $this->so->total_records;
$this->uicols = $this->so->uicols;
$cols_extra = $this->so->cols_extra;
! //_debug_array($cols_extra);
for ($i=0;$i<count($equipment);$i++)
{
$location_data=$this->solocation->read_single($equipment[$i]['location_code']);
!
for ($j=0;$j<count($cols_extra);$j++)
{
$equipment[$i][$cols_extra[$j]] =
$location_data[$cols_extra[$j]];
}
}
return $equipment;
}
--- 201,230 ----
}
! function read($data='')
{
$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,'district_id' =>
$this->district_id,'lookup'=>$data['lookup']));
$this->total_records = $this->so->total_records;
$this->uicols = $this->so->uicols;
$cols_extra = $this->so->cols_extra;
+ $cols_return_lookup =
$this->so->cols_return_lookup;
! //_debug_array($this->uicols);
for ($i=0;$i<count($equipment);$i++)
{
$location_data=$this->solocation->read_single($equipment[$i]['location_code']);
! //_debug_array($location_data);
for ($j=0;$j<count($cols_extra);$j++)
{
$equipment[$i][$cols_extra[$j]] =
$location_data[$cols_extra[$j]];
}
+ for ($j=0;$j<count($cols_extra);$j++)
+ {
+ $equipment[$i][$cols_return_lookup[$j]]
= $location_data[$cols_return_lookup[$j]];
+ }
}
+
return $equipment;
}
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -r1.59 -r1.60
*** class.bocommon.inc.php 23 Jun 2003 12:26:43 -0000 1.59
--- class.bocommon.inc.php 24 Jun 2003 10:26:40 -0000 1.60
***************
*** 795,798 ****
--- 795,799 ----
$joinmethod =
(isset($data['joinmethod'])?$data['joinmethod']:'');
$paranthesis =
(isset($data['paranthesis'])?$data['paranthesis']:'');
+ $lookup =
(isset($data['lookup'])?$data['lookup']:'');
$this->join = $this->socommon->join;
***************
*** 852,855 ****
--- 853,868 ----
$uicols['statustext'][] = lang('Property Name');
+ if($lookup)
+ {
+ for ($i=2;$i<($type_id+1);$i++)
+ {
+ $cols_return_lookup[] = 'loc'
. $i . '_name';
+ $uicols['input_type'][] =
'hidden';
+ $uicols['name'][]
= 'loc' . $i . '_name';
+ $uicols['descr'][]
= '';
+ $uicols['statustext'][] = '';
+ }
+ }
+
$cols.= ",$entity_table.address";
$cols_return[] = 'address';
***************
*** 905,909 ****
$this->cols_return = $cols_return;
$this->cols_extra = $cols_extra;
! //_debug_array($uicols);
$from .= " FROM $paranthesis $entity_table ";
--- 918,923 ----
$this->cols_return = $cols_return;
$this->cols_extra = $cols_extra;
! $this->cols_return_lookup = $cols_return_lookup;
!
$from .= " FROM $paranthesis $entity_table ";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php,1.25,1.26 class.uiwo_hour.inc.php,1.28,1.29 class.uitts.inc.php,1.29,1.30 class.uiproject.inc.php,1.32,1.33 class.uimeter.inc.php,1.11,1.12 class.uilookup.inc.php,1.24,1.25 class.uilocation.inc.php,1.16,1.17 class.uiequipment.inc.php,1.28,1.29 class.sotts.inc.php,1.20,1.21 class.soproject.inc.php,1.21,1.22 class.someter.inc.php,1.2,1.3 class.soequipment.inc.php,1.18,1.19class.soadmin_location.inc.php,1.9,1.10 class.bometer.inc.php,1.2,1.3 class.bolocation.inc.php,1.17,1.18 class.boequipment.inc.php,1.14,1.15class.bocommon.inc.php,1.59,1.60,
Sigurd Nes <address@hidden> <=