[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
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-2006 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 3422 2006-04-12 06:31:55Z drbyte $ 10 */ 11 if (!defined('IS_ADMIN_FLAG')) { 12 die('Illegal Access'); 13 } 14 $zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR'); 15 16 // test if bar should display: 17 if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { 18 // $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"); 19 if (isset($var_linksList)) { 20 unset($var_linksList); 21 } 22 $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status_footer = 1 and footer_sort_order > 0 order by footer_sort_order, pages_title"); 23 if ($page_query->RecordCount()>0) { 24 $rows = 0; 25 while (!$page_query->EOF) { 26 $rows++; 27 $page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id']; 28 $page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title']; 29 $page_query_list_footer[$rows]['altURL'] = ''; 30 31 // if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link 32 switch (true) { 33 // external link new window or same window 34 case ($page_query->fields['alt_url_external'] != ''): 35 $page_query_list_footer[$rows]['altURL'] = $page_query->fields['alt_url_external']; 36 break; 37 // internal link new window 38 case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'): 39 $page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ? 40 $page_query->fields['alt_url'] : 41 ($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], 'target="_blank', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true)); 42 break; 43 // internal link same window 44 case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'): 45 $page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ? 46 $page_query->fields['alt_url'] : 47 ($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)); 48 break; 49 } 50 51 // if altURL is specified, use it; otherwise, use EZPage ID to create link 52 $page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ? 53 zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . '&chapter=' . $page_query->fields['toc_chapter'], ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) : 54 $page_query_list_footer[$rows]['altURL']; 55 $page_query_list_footer[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : ''); 56 $page_query->MoveNext(); 57 } 58 59 $var_linksList = $page_query_list_footer; 60 } 61 } // test for display 62 63 $zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR'); 64 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |