[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boadmin_location.inc.php,1.1
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boadmin_location.inc.php,1.1,1.2 class.soadmin_location.inc.php,1.1,1.2 class.sogab.inc.php,1.5,1.6 class.uiadmin_location.inc.php,1.1,1.2 |
Date: |
Fri, 30 May 2003 06:43:05 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv25364/inc
Modified Files:
class.boadmin_location.inc.php class.soadmin_location.inc.php
class.sogab.inc.php class.uiadmin_location.inc.php
Log Message:
no message
Index: class.boadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin_location.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.boadmin_location.inc.php 29 May 2003 07:42:52 -0000 1.1
--- class.boadmin_location.inc.php 30 May 2003 10:43:03 -0000 1.2
***************
*** 137,140 ****
--- 137,145 ----
}
+ function read_config_single($column_name)
+ {
+ return $this->so->read_config_single($column_name);
+ }
+
function read_single($id)
{
***************
*** 202,211 ****
}
! function select_entity_type($selected='')
{
! $entity_types= $this->so->select_entity_type();
! while (is_array($entity_types) && list(,$type) =
each($entity_types))
{
$sel_type = '';
--- 207,220 ----
}
+ function save_config($values='',$column_name='')
+ {
+ return
$this->so->save_config($values,$column_name);
+ }
! function select_location_type($selected='')
{
! $location_types= $this->so->select_location_type();
! while (is_array($location_types) && list(,$type) =
each($location_types))
{
$sel_type = '';
***************
*** 215,219 ****
}
! $entity_type_list[] = array
(
'id' => $type['id'],
--- 224,228 ----
}
! $location_type_list[] = array
(
'id' => $type['id'],
***************
*** 223,235 ****
}
! for ($i=0;$i<count($entity_type_list);$i++)
{
! if ($entity_type_list[$i]['selected'] !=
'selected')
{
!
unset($entity_type_list[$i]['selected']);
}
}
! return $entity_type_list;
}
--- 232,245 ----
}
! for ($i=0;$i<count($location_type_list);$i++)
{
! if ($location_type_list[$i]['selected'] !=
'selected')
{
!
unset($location_type_list[$i]['selected']);
}
}
! //_debug_array($location_type_list);
! return $location_type_list;
}
Index: class.soadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.soadmin_location.inc.php 29 May 2003 07:42:52 -0000 1.1
--- class.soadmin_location.inc.php 30 May 2003 10:43:03 -0000 1.2
***************
*** 141,144 ****
--- 141,152 ----
}
+ function read_config_single($column_name='')
+ {
+ $this->db->query("SELECT location_type FROM
fm_location_config where column_name='$column_name'",__LINE__,__FILE__);
+ $this->db->next_record();
+ return $this->db->f('location_type');
+ }
+
+
function read_single($id)
{
***************
*** 214,218 ****
$fd['entry_date'] = array('type' => 'int', 'precision'
=> 4, 'nullable' => True);
$fd['category'] = array('type' => 'int', 'precision' =>
4, 'nullable' => True);
! $fd['user'] = array('type' => 'int', 'precision' => 4,
'nullable' => True);
$fd['remark'] = array('type' => 'text', 'nullable' =>
True);
--- 222,226 ----
$fd['entry_date'] = array('type' => 'int', 'precision'
=> 4, 'nullable' => True);
$fd['category'] = array('type' => 'int', 'precision' =>
4, 'nullable' => True);
! $fd['user_id'] = array('type' => 'int', 'precision' =>
4, 'nullable' => True);
$fd['remark'] = array('type' => 'text', 'nullable' =>
True);
***************
*** 452,455 ****
--- 460,476 ----
+ function save_config($values='',$column_name='')
+ {
+
+ $this->db->query("UPDATE fm_location_config set
+ location_type = '".
$values[$column_name] . "' WHERE column_name='" . $column_name.
"'",__LINE__,__FILE__);
+
+ $receipt['message'][] = array('msg' =>
lang('location config has been edited for') . ' ' . $column_name);
+
+ return $receipt;
+
+ }
+
+
function edit_attrib($attrib)
{
***************
*** 490,508 ****
! function select_entity_type()
{
! $this->db->query("SELECT * FROM fm_location_type ORDER
BY name ");
$i = 0;
while ($this->db->next_record())
{
! $entity_type[$i]['id'] =
$this->db->f('id');
! $entity_type[$i]['name'] =
stripslashes($this->db->f('name'));
! $entity_type[$i]['descr'] =
stripslashes($this->db->f('descr'));
$i++;
}
! //_debug_array($entity_type);
! return $entity_type;
}
--- 511,529 ----
! function select_location_type()
{
! $this->db->query("SELECT * FROM fm_location_type ORDER
BY id ");
$i = 0;
while ($this->db->next_record())
{
! $location_type[$i]['id'] =
$this->db->f('id');
! $location_type[$i]['name'] =
stripslashes($this->db->f('name'));
! $location_type[$i]['descr'] =
stripslashes($this->db->f('descr'));
$i++;
}
! //_debug_array($location_type);
! return $location_type;
}
Index: class.sogab.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sogab.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.sogab.inc.php 22 May 2003 20:04:15 -0000 1.5
--- class.sogab.inc.php 30 May 2003 10:43:03 -0000 1.6
***************
*** 288,292 ****
for ($i=0;$i<count($gab_insert);$i++)
{
! $this->db->query("INSERT INTO fm_gab_location
(location_code,gab_id,remark,entry_date,user) "
. "VALUES ('"
. $gab_insert[$i]['location_code'].
"','"
--- 288,292 ----
for ($i=0;$i<count($gab_insert);$i++)
{
! $this->db->query("INSERT INTO fm_gab_location
(location_code,gab_id,remark,entry_date,user_id) "
. "VALUES ('"
. $gab_insert[$i]['location_code'].
"','"
***************
*** 312,316 ****
remark ='" .
$gab_insert[$i]['remark'] . "',
entry_date ='" .
time() . "',
! user ='" .
$this->account
. "' WHERE location_code = '" .
$gab_insert[$i]['location_code'] ."'",__LINE__,__FILE__);
--- 312,316 ----
remark ='" .
$gab_insert[$i]['remark'] . "',
entry_date ='" .
time() . "',
! user_id ='" .
$this->account
. "' WHERE location_code = '" .
$gab_insert[$i]['location_code'] ."'",__LINE__,__FILE__);
***************
*** 328,332 ****
remark ='" . $gab['remark'] .
"',
entry_date ='" . time() . "',
! user ='" . $this->account
. "' WHERE location_code= '" .
$gab['location_code'] ."' and gab_id= '" . $gab['gab_id']
."'",__LINE__,__FILE__);
--- 328,332 ----
remark ='" . $gab['remark'] .
"',
entry_date ='" . time() . "',
! user_id ='" . $this->account
. "' WHERE location_code= '" .
$gab['location_code'] ."' and gab_id= '" . $gab['gab_id']
."'",__LINE__,__FILE__);
Index: class.uiadmin_location.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin_location.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.uiadmin_location.inc.php 29 May 2003 07:42:52 -0000 1.1
--- class.uiadmin_location.inc.php 30 May 2003 10:43:03 -0000 1.2
***************
*** 21,24 ****
--- 21,25 ----
'index' => True,
'config' => True,
+ 'edit_config' => True,
'view' => True,
'edit' => True,
***************
*** 502,507 ****
'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.list_attribute&type_id='.$type_id),
'lang_id'
=> lang('Attribute ID'),
! 'lang_entity_type' =>
lang('Type'),
! 'lang_no_entity_type' => lang('No
entity type'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
--- 503,508 ----
'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.list_attribute&type_id='.$type_id),
'lang_id'
=> lang('Attribute ID'),
! 'lang_location_type' =>
lang('Type'),
! 'lang_no_location_type' => lang('No
entity type'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
***************
*** 526,531 ****
'lang_save_attribtext' => lang('Save
the attribute'),
'type_id'
=> $values['type_id'],
! 'entity_list' =>
$this->bo->select_entity_type($type_id),
! 'select_entity_type' =>
'values[type_id]',
'lang_datatype' =>
lang('Datatype'),
'lang_datatype_statustext' => lang('Select
a datatype'),
--- 527,532 ----
'lang_save_attribtext' => lang('Save
the attribute'),
'type_id'
=> $values['type_id'],
! 'entity_list' =>
$this->bo->select_location_type($type_id),
! 'select_location_type' =>
'values[type_id]',
'lang_datatype' =>
lang('Datatype'),
'lang_datatype_statustext' => lang('Select
a datatype'),
***************
*** 640,648 ****
$appname
= lang('location');
! $function_msg =
lang('list location standard');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_config' => $data));
$this->save_sessiondata();
}
--- 641,708 ----
$appname
= lang('location');
! $function_msg =
lang('list config');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_config' => $data));
$this->save_sessiondata();
+ }
+
+ function edit_config()
+ {
+ $column_name =
get_var('column_name',array('POST','GET'));
+ $values =
get_var('values',array('POST'));
+
+
$GLOBALS['phpgw']->xslttpl->add_file(array('admin_location'));
+
+ if ($values['save'])
+ {
+
+ if (!$receipt['error'])
+ {
+
+ $receipt =
$this->bo->save_config($values,$column_name);
+ }
+
+ }
+
+ $type_id =
$this->bo->read_config_single($column_name);
+
+ $function_msg = lang('edit location config for') . ' '
.$column_name;
+
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uiadmin_location.edit_config',
+ 'column_name' => $column_name
+ );
+
+ $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+ $data = array
+ (
+ 'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
+
+ 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.config'),
+
+ 'lang_column_name'
=> lang('Column name'),
+ 'lang_save'
=> lang('save'),
+ 'lang_done'
=> lang('done'),
+ 'column_name'
=> $column_name,
+ 'value_name'
=> $values['name'],
+
+ 'location_list'
=> $this->bo->select_location_type($type_id),
+
+ 'lang_config_statustext' =>
lang('Select the level for this information'),
+ 'lang_done_standardtext' =>
lang('Back to the list'),
+ 'lang_save_standardtext' =>
lang('Save the standard'),
+ 'type_id'
=> $values['type_id'],
+ 'value_descr'
=> $values['descr']
+ );
+
+ $appname
= lang('location');
+
+ //_debug_array($data);
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_config' => $data));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boadmin_location.inc.php,1.1,1.2 class.soadmin_location.inc.php,1.1,1.2 class.sogab.inc.php,1.5,1.6 class.uiadmin_location.inc.php,1.1,1.2,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/setup setup.inc.php,1.51,1.52 tables_current.inc.php,1.85,1.86
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.55.2.12,1.66.2.55.2.13
- Previous by thread:
[Phpgroupware-cvs] CVS: property/setup setup.inc.php,1.51,1.52 tables_current.inc.php,1.85,1.86
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.55.2.12,1.66.2.55.2.13
- Index(es):