phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: wcm/website main.php,1.3,1.4


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: wcm/website main.php,1.3,1.4
Date: Sun, 10 Feb 2002 13:21:13 -0500

Update of /cvsroot/phpgroupware/wcm/website
In directory subversions:/tmp/cvs-serv7987/website

Modified Files:
        main.php 
Log Message:
Fixup for display in website/main.php; add selection of header/footer based on 
element
type and availability



Index: main.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/website/main.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** main.php    8 Feb 2002 15:23:11 -0000       1.3
--- main.php    10 Feb 2002 18:21:11 -0000      1.4
***************
*** 23,27 ****
  
        $wcm = CreateObject('wcm.bowcm','phpgw');
!       _debug_array($wcm->site);
  
        define('SITE_ROOT', PHPGW_SERVER_ROOT . SEP . 'wcm' . SEP . 'website' . 
SEP . 'templates');
--- 23,29 ----
  
        $wcm = CreateObject('wcm.bowcm','phpgw');
!       $elements = CreateObject('wcm.boelement');
! 
!       //_debug_array($wcm->site['site_pages'][0]);
  
        define('SITE_ROOT', PHPGW_SERVER_ROOT . SEP . 'wcm' . SEP . 'website' . 
SEP . 'templates');
***************
*** 40,56 ****
        /* check expiration of each page and element */
  
!       $GLOBALS['phpgw']->template->set_var('left_content','LEFT');
!       $GLOBALS['phpgw']->template->set_var('mid_content','MIDDLE');
!       $GLOBALS['phpgw']->template->set_var('right_content','RIGHT');
! 
!       echo '
! <html>
! <head>
! </head>
! ';
  
        $GLOBALS['phpgw']->template->pfp('out','frame');
- 
-       echo '
- </html>'
  ?>
--- 42,70 ----
        /* check expiration of each page and element */
  
!       $header_data = 
$elements->read($wcm->site['site_pages'][0]['page_header']);
!       $header = $header_data['element_source'];
!       $GLOBALS['phpgw']->template->set_var('header',$header ? $header : 
'<html><head>HEADER</head><body>');
! 
!       $footer_data = 
$elements->read($wcm->site['site_pages'][0]['page_footer']);
!       $footer = $footer_data['element_source'];
!       $GLOBALS['phpgw']->template->set_var('footer',$footer ? $footer : 
'FOOTER</body></html>');
! 
!       $left = $mid = $right = '';
!       while(list($key,$val) = 
@each($wcm->site['site_pages'][0]['page_elements']['left']))
!       {
!               $left .= $val['element_source'];
!       }
!       while(list($key,$val) = 
@each($wcm->site['site_pages'][0]['page_elements']['mid']))
!       {
!               $mid .= $val['element_source'];
!       }
!       while(list($key,$val) = 
@each($wcm->site['site_pages'][0]['page_elements']['right']))
!       {
!               $right .= $val['element_source'];
!       }
!       $GLOBALS['phpgw']->template->set_var('left_content',$left ? $left : 
'LEFT');
!       $GLOBALS['phpgw']->template->set_var('mid_content',$mid ? $mid : 
'MIDDLE');
!       $GLOBALS['phpgw']->template->set_var('right_content',$right ? $right : 
'RIGHT');
  
        $GLOBALS['phpgw']->template->pfp('out','frame');
  ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]