[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 ezpages_bar_footer.php

Zen Cart 源代码 ezpages_bar_footer.php




下载文件

文件名: ezpages_bar_footer.php
文件类型: PHP文件
文件大小: 4 KiB
MD5: ce6ef2f7a36fe696884cd449b22789a0

ezpages_bar_footer.php - 关闭高亮
  1. <?php
  2. /**
  3.  * ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
  4.  *
  5.  * @package templateSystem
  6.  * @copyright Copyright 2003-2007 Zen Cart Development Team
  7.  * @copyright Portions Copyright 2003 osCommerce
  8.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  9.  * @version $Id: ezpages_bar_footer.php 2006-05-16 bunyip $
  10.  * @modified from standard file to provide multi-language support
  11.  */
  12. if (!defined('IS_ADMIN_FLAG')) {
  13.   die('Illegal Access');
  14. }
  15. $zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
  16.  
  17. // test if bar should display:
  18. if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
  19.   //  $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status = 1 and languages_id=" . (int)$_SESSION['languages_id'] . " and horizontal_sort_order > 0 order by horizontal_sort_order, pages_title");
  20.   if (isset($var_linksList)) {
  21.     unset($var_linksList);
  22.   }
  23.   // query modified for multi-language support
  24.   $page_query = $db->Execute("select e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.toc_chapter, et.pages_title
  25.                              from  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et  
  26.                              where e.pages_id = et.pages_id
  27.                              and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
  28.                              and status_footer = 1 and footer_sort_order > 0 order by footer_sort_order, pages_title");
  29.   // end of modification               
  30.              
  31.   if ($page_query->RecordCount()>0) {
  32.     $rows = 0;
  33.     while (!$page_query->EOF) {
  34.       $rows++;
  35.       $page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
  36.       $page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title'];
  37.       $page_query_list_footer[$rows]['altURL'] = '';
  38.  
  39.       // if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link
  40.       switch (true) {
  41.         // external link new window or same window
  42.         case ($page_query->fields['alt_url_external'] != ''):
  43.         $page_query_list_footer[$rows]['altURL']  = $page_query->fields['alt_url_external'];
  44.         break;
  45.         // internal link new window
  46.         case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'):
  47.         $page_query_list_footer[$rows]['altURL']  = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
  48.         $page_query->fields['alt_url'] :
  49.         ($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
  50.         break;
  51.         // internal link same window
  52.         case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'):
  53.         $page_query_list_footer[$rows]['altURL']  = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
  54.         $page_query->fields['alt_url'] :
  55.         ($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
  56.         break;
  57.       }
  58.  
  59.       // if altURL is specified, use it; otherwise, use EZPage ID to create link
  60.       $page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ?
  61.       zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
  62.       $page_query_list_footer[$rows]['altURL'];
  63.       $page_query_list_footer[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : '');
  64.       $page_query->MoveNext();
  65.     }
  66.  
  67.     $var_linksList = $page_query_list_footer;
  68.   }
  69. } // test for display
  70.  
  71. $zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
  72. ?>