[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.51,1.52 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.51,1.52 class.socommon.inc.php,1.22,1.23 class.uilocation.inc.php,1.7,1.8 |
Date: |
Fri, 13 Jun 2003 09:15:49 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv8510/inc
Modified Files:
class.bocommon.inc.php class.socommon.inc.php
class.uilocation.inc.php
Log Message:
no message
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** class.bocommon.inc.php 13 Jun 2003 11:05:29 -0000 1.51
--- class.bocommon.inc.php 13 Jun 2003 13:15:46 -0000 1.52
***************
*** 775,779 ****
}
!
function select_part_of_town($format='',$selected='')
--- 775,782 ----
}
! function check_location($location_code='',$type_id='')
! {
! return
$this->socommon->check_location($location_code,$type_id);
! }
function select_part_of_town($format='',$selected='')
Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** class.socommon.inc.php 13 Jun 2003 11:05:30 -0000 1.22
--- class.socommon.inc.php 13 Jun 2003 13:15:47 -0000 1.23
***************
*** 373,379 ****
}
! function check_location_code($location_code='')
{
! $this->db->query("SELECT count(*) FROM fm_location
where location_code='$location_code'");
$this->db->next_record();
--- 373,379 ----
}
! function check_location($location_code='',$type_id='')
{
! $this->db->query("SELECT count(*) FROM
fm_location$type_id where location_code='$location_code'");
$this->db->next_record();
Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uilocation.inc.php 13 Jun 2003 11:05:30 -0000 1.7
--- class.uilocation.inc.php 13 Jun 2003 13:15:47 -0000 1.8
***************
*** 275,279 ****
_debug_array($_POST);
! while (is_array($_POST) && list($input_name,$value) =
each($_POST))
{
$values[] = array(
--- 275,279 ----
_debug_array($_POST);
! /* while (is_array($_POST) && list($input_name,$value) =
each($_POST))
{
$values[] = array(
***************
*** 283,286 ****
--- 283,291 ----
}
+ */
+ if(count($_POST)>0)
+ {
+ $values = $_POST;
+ }
_debug_array($values);
***************
*** 294,332 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('location'));
! if ($values['save'])
{
- if(!$values['property_id'] && !$property_id)
- {
-
$receipt['error'][]=array('msg'=>lang('Please select a Property ID !'));
- $error_property_id=true;
- $error_id=true;
- }
! if(!$values['building_id'] && !$building_id)
{
!
$receipt['error'][]=array('msg'=>lang('Please select a Building ID !'));
! $error_building_id=true;
! $error_id=true;
! }
! if(!$values['entrance_id'] && !$entrance_id)
! {
!
$receipt['error'][]=array('msg'=>lang('Please select a Entrance ID !'));
! $error_entrance_id=true;
! $error_id=true;
! }
! if(!$values['apartment_id'] && !$apartment_id)
! {
!
$receipt['error'][]=array('msg'=>lang('Please enter a Apartment ID !'));
! $error_apartment_id=true;
! $error_id=true;
}
! if($values['property_id'] &&
$values['building_id'] && $values['entrance_id'] && $values['apartment_id'])
{
!
if($this->socommon->check_location($values['property_id'],$values['building_id'],$values['entrance_id'],$values['apartment_id']))
{
!
$receipt['error'][]=array('msg'=>lang('This location is already registered!') .
'[
'.$values['property_id'].'-'.$values['building_id'].'-'.$values['entrance_id'].'-'.$values['apartment_id'].'
]');
$error_location_id=true;
$error_id=true;
--- 299,325 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('location'));
! if (is_array($values))
{
! for ($i=1; $i<($type_id+1); $i++)
{
! if((!$values['loc' . $i] &&
!$location[($i-1)]) || !$values['loc' . $i])
! {
!
$receipt['error'][]=array('msg'=>lang('Please select a location %1 ID !',$i));
! $error_id=true;
! }
! $values['location_code'][]=
$values['loc' . $i];
}
! $values['location_code']=implode("-",
$values['location_code']);
!
! _debug_array($values);
! if($values['location_code'])
{
!
if($this->bocommon->check_location($values['location_code'],$type_id))
{
!
$receipt['error'][]=array('msg'=>lang('This location is already registered!') .
'[ '.$values['location_code'].' ]');
$error_location_id=true;
$error_id=true;
***************
*** 334,350 ****
}
! if($location_id)
{
- $values['property_id']=$property_id;
- $values['building_id']=$building_id;
- $values['entrance_id']=$entrance_id;
- $values['apartment_id']=$apartment_id;
- $values['location_code']=$location_code;
$action='edit';
}
else
{
-
- $values['location_code'] =
$this->bocommon->location_code($values['property_id'],$values['building_id'],$values['entrance_id'],$values['apartment_id']);
$location_code=$values['location_code'];
}
--- 327,336 ----
}
! if($location_code)
{
$action='edit';
}
else
{
$location_code=$values['location_code'];
}
***************
*** 353,361 ****
{
$receipt =
$this->bo->save($values,$action);
-
- if($values_attribute)
- {
-
$this->bocommon->save_attributes($values_attribute,'location');
- }
}
}
--- 339,342 ----
***************
*** 371,383 ****
}
- if($error_property_id)
- {
- unset($values['property_id']);
- }
- if($error_location_id)
- {
- unset($values['location_id']);
- }
-
$link_data = array
(
--- 352,355 ----
***************
*** 389,400 ****
if($values['location_id'])
{
- $attributes_values =
$this->bocommon->read_attibutes(array('form'=>true,'type'=>location,'type_id'=>4,'id'=>$property_id
. '-' . $building_id . '-' . $entrance_id . '-' . $apartment_id));
- $attributes_header[] = array
- (
- 'lang_name' => lang('Name'),
- 'lang_descr' => lang('Description'),
- 'lang_datatype' => lang('Datatype'),
- 'lang_value' => lang('Value')
- );
$location_type='view';
}
--- 361,364 ----
***************
*** 405,409 ****
$location_data=$this->bo->initiate_ui_location(array(
! 'values' =>
$_POST,
'type_id' =>
($type_id-1),
'no_link' =>
($type_id), // disable lookup links for location type less than type_id
--- 369,373 ----
$location_data=$this->bo->initiate_ui_location(array(
! 'values' =>
$values,
'type_id' =>
($type_id-1),
'no_link' =>
($type_id), // disable lookup links for location type less than type_id
***************
*** 524,533 ****
$msgbox_data = $this->bocommon->msgbox_data($receipt);
-
-
- $lang_owner
= lang('Owner');
- $owner_list
= $this->bo->get_owner_list($property['owner_id']);
- $lang_select_owner
= lang('Select owner');
- $lang_owner_statustext
= lang('Select the owner');
$data = array
--- 488,491 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.51,1.52 class.socommon.inc.php,1.22,1.23 class.uilocation.inc.php,1.7,1.8,
Sigurd Nes <address@hidden> <=