[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: wcm/inc class.soelement.inc.php,1.5,1.6 class.ui
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: wcm/inc class.soelement.inc.php,1.5,1.6 class.uielement.inc.php,1.2,1.3 |
Date: |
Fri, 08 Feb 2002 22:13:51 -0500 |
Update of /cvsroot/phpgroupware/wcm/inc
In directory subversions:/tmp/cvs-serv20806/inc
Modified Files:
class.soelement.inc.php class.uielement.inc.php
Log Message:
Add element is_header/footer/normal field and logic for elements
Index: class.soelement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.soelement.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.soelement.inc.php 8 Feb 2002 05:45:11 -0000 1.5
--- class.soelement.inc.php 9 Feb 2002 03:13:48 -0000 1.6
***************
*** 70,73 ****
--- 70,74 ----
$this->element['element_type'] =
$GLOBALS['phpgw']->db->f('element_type');
$this->element['element_source'] =
$GLOBALS['phpgw']->db->f('element_source');
+ $this->element['element_hf'] =
$GLOBALS['phpgw']->db->f('element_hf');
$this->element['element_version'] =
$GLOBALS['phpgw']->db->f('element_version');
}
***************
*** 88,91 ****
--- 89,93 ----
. "element_type='" .
$this->element['element_type'] . "',"
. "element_source='" .
$this->element['element_source'] . "',"
+ . "element_hf='" .
$this->element['element_hf'] . "',"
. "element_version='" .
$this->element['element_version'] . "' "
. "WHERE element_id=" .
intval($elementid);
***************
*** 103,110 ****
}
$sql = "INSERT INTO $this->table
(element_name,element_title,"
! . "element_type,element_source,element_version)
VALUES('"
. $element_info['element_name'] . "','" .
$element_info['element_title'] . "','"
. $element_info['element_type'] . "','"
! . $element_info['element_source'] . "','" .
$element_info['element_version'] . "')";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
--- 105,113 ----
}
$sql = "INSERT INTO $this->table
(element_name,element_title,"
! .
"element_type,element_source,element_version,element_hf) VALUES('"
. $element_info['element_name'] . "','" .
$element_info['element_title'] . "','"
. $element_info['element_type'] . "','"
! . $element_info['element_source'] . "','" .
$element_info['element_version'] . "','"
! . $element_info['element_hf'] . "')";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
***************
*** 167,176 ****
else
{
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_id'] =
$GLOBALS['phpgw']->db->f('element_id');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_name'] =
$GLOBALS['phpgw']->db->f('element_name');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_title'] =
$GLOBALS['phpgw']->db->f('element_title');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_type'] =
$GLOBALS['phpgw']->db->f('element_type');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_source'] =
$GLOBALS['phpgw']->db->f('element_source');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_version'] =
$GLOBALS['phpgw']->db->f('element_version');
}
}
--- 170,180 ----
else
{
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_id'] =
$GLOBALS['phpgw']->db->f('element_id');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_name'] =
$GLOBALS['phpgw']->db->f('element_name');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_title'] =
$GLOBALS['phpgw']->db->f('element_title');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_type'] =
$GLOBALS['phpgw']->db->f('element_type');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_source'] =
$GLOBALS['phpgw']->db->f('element_source');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_hf'] =
$GLOBALS['phpgw']->db->f('element_hf');
!
$this->elements[$GLOBALS['phpgw']->db->f('element_name')]['element_version'] =
$GLOBALS['phpgw']->db->f('element_version');
}
}
Index: class.uielement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.uielement.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.uielement.inc.php 4 Feb 2002 01:42:41 -0000 1.2
--- class.uielement.inc.php 9 Feb 2002 03:13:48 -0000 1.3
***************
*** 209,217 ****
{
$element_info = array(
! 'element_name' =>
addslashes($GLOBALS['HTTP_POST_VARS']['element_name']),
! 'element_title' =>
addslashes($GLOBALS['HTTP_POST_VARS']['element_title']),
! 'element_type' =>
$GLOBALS['HTTP_POST_VARS']['element_type'],
! 'element_source' =>
addslashes($GLOBALS['HTTP_POST_VARS']['element_source']),
! 'element_version' =>
$element['element_version']
);
if($GLOBALS['HTTP_GET_VARS']['element_id'])
--- 209,218 ----
{
$element_info = array(
! 'element_name' =>
addslashes($GLOBALS['HTTP_POST_VARS']['element_name']),
! 'element_title' =>
addslashes($GLOBALS['HTTP_POST_VARS']['element_title']),
! 'element_type' =>
$GLOBALS['HTTP_POST_VARS']['element_type'],
! 'element_source' =>
addslashes($GLOBALS['HTTP_POST_VARS']['element_source']),
! 'element_hf' =>
$GLOBALS['HTTP_POST_VARS']['element_hf'],
! 'element_version' =>
$element['element_version']
);
if($GLOBALS['HTTP_GET_VARS']['element_id'])
***************
*** 267,270 ****
--- 268,292 ----
$GLOBALS['phpgw']->template->set_var('element_title',$element['element_title']);
$GLOBALS['phpgw']->template->set_var('element_type',$this->formatted_list('element_type',$this->bo->element_types,$id=$element['element_type'],'',True));
+
+ switch ($element['element_hf'])
+ {
+ case 'header':
+
$GLOBALS['phpgw']->template->set_var('selected_isnormal','');
+
$GLOBALS['phpgw']->template->set_var('selected_isheader',' checked');
+
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
+ break;
+ case 'footer':
+
$GLOBALS['phpgw']->template->set_var('selected_isnormal','');
+
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
+
$GLOBALS['phpgw']->template->set_var('selected_isfooter',' checked');
+ break;
+ default:
+
$GLOBALS['phpgw']->template->set_var('selected_isnormal',' checked');
+
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
+
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
+ }
+
$GLOBALS['phpgw']->template->set_var('lang_is_normal',lang('Is a normal
element'));
+
$GLOBALS['phpgw']->template->set_var('lang_is_header',lang('Is a header'));
+
$GLOBALS['phpgw']->template->set_var('lang_is_footer',lang('Is a footer'));
switch($element['element_type'])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: wcm/inc class.soelement.inc.php,1.5,1.6 class.uielement.inc.php,1.2,1.3,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup manageheader.php,1.31,1.31.2.1 config.php,1.72,1.72.2.1
- Next by Date:
[Phpgroupware-cvs] CVS: wcm/setup setup.inc.php,1.2,1.3 tables_current.inc.php,1.1.1.1,1.2
- Previous by thread:
[Phpgroupware-cvs] CVS: setup manageheader.php,1.31,1.31.2.1 config.php,1.72,1.72.2.1
- Next by thread:
[Phpgroupware-cvs] CVS: wcm/setup setup.inc.php,1.2,1.3 tables_current.inc.php,1.1.1.1,1.2
- Index(es):