[geeklog-cvs] geeklog-1.3/public_html index.php,1.41,1.42

dhaun at geeklog.net dhaun at geeklog.net
Sun Mar 9 06:47:24 EST 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory internal.geeklog.net:/tmp/cvs-serv30721/public_html

Modified Files:
	index.php 
Log Message:
Integrated Static Pages 1.3


Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/index.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** index.php	14 Feb 2003 04:36:31 -0000	1.41
--- index.php	9 Mar 2003 11:47:22 -0000	1.42
***************
*** 81,115 ****
      if (DB_getItem ($_TABLES['plugins'], 'pi_enabled', "pi_name = 'staticpages'") == 1) {
  
!         $spsql = "SELECT sp_content,sp_label,sp_format FROM {$_TABLES['staticpage']} WHERE sp_title = 'frontpage'";
!         $spresult = DB_fetchArray (DB_query ($spsql));
  
!         if ($spresult['sp_label'] == 'nonews') { // replace news entirely
!             $shownews = false;
!             switch ($spresult['sp_format']) {
!                 case 'noblocks':
!                     $display .= COM_siteHeader ('none');
!                     break;
!                 case 'allblocks':
!                 case 'leftblocks':
!                     $display .= COM_siteHeader ('menu');
!                     break;
!             }
  
!             $display .= stripslashes ($spresult['sp_content']);
  
!             if ($spresult['sp_format'] == 'allblocks') {
!                 $display .= COM_siteFooter (true);
!             } else if ($spresult['sp_format'] != 'blankpage') {
!                 $display .= COM_siteFooter ();
              }
!         } else { // display static page content before the news
              $display .= COM_siteHeader();
-             if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_label'])) {
-                 $display .= COM_startBlock ($spresult['sp_label']);
-             }
-             $display .= stripslashes ($spresult['sp_content']);
-             if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_label'])) {
-                 $display .= COM_endBlock ();
-             }
          }
      } else {
--- 81,133 ----
      if (DB_getItem ($_TABLES['plugins'], 'pi_enabled', "pi_name = 'staticpages'") == 1) {
  
!         $spsql = "SELECT sp_content,sp_label,sp_format,sp_php FROM {$_TABLES['staticpage']} WHERE sp_title = 'frontpage' AND " . SP_getPerms ();
!         $result = DB_query ($spsql);
  
!         if (DB_numRows ($result) > 0) {
!             $spresult = DB_fetchArray ($result);
  
!             if ($spresult['sp_label'] == 'nonews') { // replace news entirely
!                 $shownews = false;
!                 switch ($spresult['sp_format']) {
!                     case 'noblocks':
!                         $display .= COM_siteHeader ('none');
!                         break;
!                     case 'allblocks':
!                     case 'leftblocks':
!                         $display .= COM_siteHeader ('menu');
!                         break;
!                 }
  
!                 // Check for type (ie html or php)
!                 if ($spresult['sp_php'] == 1) {
!                     $display .= eval (stripslashes ($spresult['sp_content']));
!                 } else {
!                     $display .= stripslashes ($spresult['sp_content']);
!                 }
! 
!                 if ($spresult['sp_format'] == 'allblocks') {
!                     $display .= COM_siteFooter (true);
!                 } else if ($spresult['sp_format'] != 'blankpage') {
!                     $display .= COM_siteFooter ();
!                 }
!             } else { // display static page content before the news
!                 $display .= COM_siteHeader ();
!                 if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_label'])) {
!                     $display .= COM_startBlock ($spresult['sp_label']);
!                 }
! 
!                 // Check for type (ie html or php)
!                 if ($spresult['sp_php'] == 1) {
!                     $display .= eval (stripslashes ($spresult['sp_content']));
!                 } else {
!                     $display .= stripslashes ($spresult['sp_content']);
!                 }
! 
!                 if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_label'])) {
!                     $display .= COM_endBlock ();
!                 }
              }
!         } else {
              $display .= COM_siteHeader();
          }
      } else {
***************
*** 122,126 ****
  // Show any Plugin formatted blocks
  // Requires a plugin to have a function called plugin_centerblock_<plugin_name>
! $display .= PLG_showCenterblock();
  
  if ($shownews) {
--- 140,144 ----
  // Show any Plugin formatted blocks
  // Requires a plugin to have a function called plugin_centerblock_<plugin_name>
! $display .= PLG_showCenterblock ();
  
  if ($shownews) {
***************
*** 282,285 ****
--- 300,305 ----
  $display .= COM_siteFooter(true); // The true value enables right hand blocks.
  
+ } else {
+     $display = COM_showMessage ($HTTP_GET_VARS['msg']) . $display;
  }
  





More information about the geeklog-cvs mailing list