[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * ezpages sidebox - used to display links to EZ-Pages content 4 * 5 * @package templateSystem 6 * @copyright Copyright 2003-2005 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.php 2682 2005-12-25 21:10:03Z wilt $ 10 */ 11 12 $zco_notifier->notify('NOTIFY_START_EZPAGES_SIDEBOX'); 13 14 // test if sidebox should display 15 if (EZPAGES_STATUS_SIDEBOX == '1' or (EZPAGES_STATUS_SIDEBOX== '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { 16 if (isset($var_linksList)) { 17 unset($var_linksList); 18 } 19 $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status_sidebox = 1 and sidebox_sort_order > 0 order by sidebox_sort_order, pages_title"); 20 if ($page_query->RecordCount()>0) { 21 $title = BOX_HEADING_EZPAGES; 22 $box_id = 'ezpages'; 23 $rows = 0; 24 while (!$page_query->EOF) { 25 $rows++; 26 $page_query_list_sidebox[$rows]['id'] = $page_query->fields['pages_id']; 27 $page_query_list_sidebox[$rows]['name'] = $page_query->fields['pages_title']; 28 $page_query_list_sidebox[$rows]['altURL'] = ""; 29 switch (true) { 30 // external link new window or same window 31 case ($page_query->fields['alt_url_external'] != ''): 32 $page_query_list_sidebox[$rows]['altURL'] = $page_query->fields['alt_url_external']; 33 break; 34 // internal link new window 35 case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'): 36 $page_query_list_sidebox[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ? 37 $page_query->fields['alt_url'] : 38 ($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)); 39 break; 40 // internal link same window 41 case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'): 42 $page_query_list_sidebox[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ? 43 $page_query->fields['alt_url'] : 44 ($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)); 45 break; 46 } 47 48 // if altURL is specified, use it; otherwise, use EZPage ID to create link 49 $page_query_list_sidebox[$rows]['link'] = ($page_query_list_sidebox[$rows]['altURL'] =='') ? 50 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')) : 51 $page_query_list_sidebox[$rows]['altURL']; 52 $page_query_list_sidebox[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : ''); 53 $page_query->MoveNext(); 54 } 55 56 $title_link = false; 57 58 $var_linksList = $page_query_list_sidebox; 59 60 require($template->get_template_dir('tpl_ezpages.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_ezpages.php'); 61 62 $zco_notifier->notify('NOTIFY_END_EZPAGES_SIDEBOX'); 63 require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); 64 } 65 } // test for display 66 ?>
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 |
![]() |