[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php,1.3,1.4 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php,1.3,1.4 class.soadmin_location.inc.php,1.6,1.7class.uilocation.inc.php,1.4,1.5 |
Date: |
Fri, 06 Jun 2003 06:23:05 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv20389/inc
Modified Files:
class.bolocation.inc.php class.soadmin_location.inc.php
class.uilocation.inc.php
Log Message:
no message
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.bolocation.inc.php 5 Jun 2003 07:28:14 -0000 1.3
--- class.bolocation.inc.php 6 Jun 2003 10:23:03 -0000 1.4
***************
*** 46,53 ****
function bolocation($session=False)
{
! $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
! $this->so =
CreateObject($this->currentapp.'.solocation');
! $this->socommon =
CreateObject($this->currentapp.'.socommon');
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
if ($session)
--- 46,54 ----
function bolocation($session=False)
{
! $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
! $this->so =
CreateObject($this->currentapp.'.solocation');
! $this->socommon =
CreateObject($this->currentapp.'.socommon');
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
! $this->soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
if ($session)
***************
*** 124,133 ****
{
case 'form':
!
$GLOBALS['phpgw']->xslttpl->add_file(array('location_form'));
break;
case 'view':
!
$GLOBALS['phpgw']->xslttpl->add_file(array('location_view'));
break;
}
if($data['equipment'])
--- 125,223 ----
{
case 'form':
!
$GLOBALS['phpgw']->xslttpl->add_file(array('location_form_2'));
break;
case 'view':
!
$GLOBALS['phpgw']->xslttpl->add_file(array('location_view_2'));
break;
}
+
+ $location_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&lookup=1');
+
+ $config = $this->soadmin_location->read_config('');
+ _debug_array($config);
+ $location_types =
$this->soadmin_location->select_location_type();
+ //_debug_array($location_types);
+ $fm_location_colst =
$this->soadmin_location->read_attrib(array('type_id'=>4));
+ //_debug_array($fm_location_colst);
+
+
+ for ($i=0;$i<$data['type_id'];$i++)
+ {
+ $location['location'][$i]['input_type']
= 'text';
+ $location['location'][$i]['input_name']
= 'loc' . ($i+1);
+
$location['location'][$i]['lookup_function_call'] = 'lookup_loc' . ($i+1)
. '()';
+ $location['location'][$i]['lookup_link']
= True;
+ $location['location'][$i]['name']
= $location_types[($i)]['name'];
+ $location['location'][$i]['value']
= $data['location']['value'][$i];
+ $location['location'][$i]['statustext']
= lang('Klick this link to select') .
$location_types[($i)]['name'];
+
+ if($i==0)
+ {
+
$location['location'][$i]['extra'][0]['input_name'] = 'loc' .
($i+1).'_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) . '()';
+
$location['location'][$i]['extra'][0]['value'] =
$data['location']['loc1_name'];
+
+ }
+ $location['lookup_functions'] .= 'function
lookup_loc' . ($i+1) . '()' ."\r\n";
+ $location['lookup_functions'] .= '{'."\r\n";
+ $location['lookup_functions'] .=
'Window1=window.open('."'" . $location_link .'&type_id=' . ($i+1) . "'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");'."\r\n";
+ $location['lookup_functions'] .= '}'."\r\n";
+
+ }
+
+
+ for ($j=0;$j<count($fm_location_colst);$j++)
+ {
+ if($fm_location_colst[$j]['location_form'])
+ {
+ $location['location'][$i]['input_type']
= 'text';
+ $location['location'][$i]['input_name']
= $fm_location_colst[$j]['name'];
+
$location['location'][$i]['lookup_function_call'] = 'lookup_loc' .
$fm_location_colst[$j]['location_type'] . '()';
+
$location['location'][$i]['lookup_link'] = True;
+ $location['location'][$i]['name']
= $fm_location_colst[$j]['descr'];
+ $location['location'][$i]['value']
=
$data['location']['value'][$fm_location_colst[$j]['name']];
+ $location['location'][$i]['statustext']
= lang('Klick this link to select') .
$location_types[($fm_location_colst[$j]['location_type']-1)]['name'];
+ $i++;
+ }
+ }
+
+ for ($j=0;$j<count($config);$j++)
+ {
+ if($config[$j]['location_type'] <=
$data['type_id'] && $config[$j]['location_form'] )
+ {
+ $location['location'][$i]['input_name']
= $config[$j]['column_name'];
+ $location['location'][$i]['value']
=
$data['location']['value'][$config[$j]['column_name']];
+
$location['location'][$i]['lookup_function_call'] = 'lookup_loc' .
$fm_location_colst[$j]['location_type'] . '()';
+
$location['location'][$i]['lookup_link'] = True;
+ $location['location'][$i]['name']
= $config[$j]['descr'];
+ $location['location'][$i]['value']
=
$data['location']['value'][$config[$j]['name']];
+ $location['location'][$i]['statustext']
= lang('Klick this link to select') .
$location_types[($fm_location_colst[$j]['location_type']-1)]['name'];
+ $location['location'][$i]['input_type']
= 'text';
+
+
+
if($config[$j]['column_name']=='street_id')
+ {
+
$location['location'][$i]['name'] =
lang('address');
+
$location['location'][$i]['input_type'] = 'hidden';
+
+
$location['location'][$i]['extra'][0]['input_type']
= 'text';
+
$location['location'][$i]['extra'][0]['input_name']
= 'street_name';
+
$location['location'][$i]['extra'][0]['size']
= 30;
+
$location['location'][$i]['extra'][0]['lookup_function_call'] = 'lookup_loc'
. ($i+1) . '()';
+
$location['location'][$i]['extra'][0]['value']
= $data['location']['value']['street_name'];
+
+
$location['location'][$i]['extra'][1]['input_type']
= 'text';
+
$location['location'][$i]['extra'][1]['input_name']
= 'street_number';
+
$location['location'][$i]['extra'][1]['size']
= 6;
+
$location['location'][$i]['extra'][1]['lookup_function_call'] = 'lookup_loc'
. ($i+1) . '()';
+
$location['location'][$i]['extra'][1]['value']
= $data['location']['value']['street_number'];
+ $i++;
+ }
+ }
+ }
+
+ //_debug_array($location['location']);
if($data['equipment'])
Index: class.soadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.soadmin_location.inc.php 4 Jun 2003 12:24:40 -0000 1.6
--- class.soadmin_location.inc.php 6 Jun 2003 10:23:03 -0000 1.7
***************
*** 133,136 ****
--- 133,137 ----
'input_name' =>
$this->db->f('input_name'),
'f_key' =>
$this->db->f('f_key'),
+ 'location_form' =>
$this->db->f('location_form'),
'ref_to_category' =>
$this->db->f('ref_to_category'),
'query_value' =>
$this->db->f('query_value'),
***************
*** 363,367 ****
}
! $sql = "SELECT $table.id,$table.list
,$table.column_name ,$table.input_name, $table.datatype ,$type_table.name as
type FROM $type_table $this->join $table on $table.type_id = $type_table.id
where $table.type_id= '$type_id' $querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
--- 364,368 ----
}
! $sql = "SELECT
$table.id,$table.list,$table.location_form ,$table.column_name
,$table.input_name, $table.datatype ,$type_table.name as type FROM $type_table
$this->join $table on $table.type_id = $type_table.id where $table.type_id=
'$type_id' $querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
***************
*** 373,382 ****
$attrib[] = array
(
! 'id' => $this->db->f('id'),
! 'list' => $this->db->f('list'),
! 'name' => $this->db->f('column_name'),
! 'descr' => $this->db->f('input_name'),
! 'type_name' => $this->db->f('type'),
! 'datatype' =>
$this->db->f('datatype')
);
}
--- 374,385 ----
$attrib[] = array
(
! 'id' =>
$this->db->f('id'),
! 'location_type' => $type_id,
! 'list' =>
$this->db->f('list'),
! 'location_form' =>
$this->db->f('location_form'),
! 'name' =>
$this->db->f('column_name'),
! 'descr' =>
$this->db->f('input_name'),
! 'type_name' =>
$this->db->f('type'),
! 'datatype' =>
$this->db->f('datatype')
);
}
Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.uilocation.inc.php 5 Jun 2003 07:28:14 -0000 1.4
--- class.uilocation.inc.php 6 Jun 2003 10:23:03 -0000 1.5
***************
*** 384,387 ****
--- 384,388 ----
*/
$location_data=$this->bo->initiate_ui_location(array(
+ 'type_id' =>
$type_id,
'location_type' =>
$location_type,
'entrance' => True,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php,1.3,1.4 class.soadmin_location.inc.php,1.6,1.7class.uilocation.inc.php,1.4,1.5,
Sigurd Nes <address@hidden> <=