[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ 4 5 osCommerce, Open Source E-Commerce Solutions 6 http://www.oscommerce.com 7 8 Copyright (c) 2003 osCommerce 9 10 Released under the GNU General Public License 11 */ 12 13 // check if the 'install' directory exists, and warn of its existence 14 if (WARN_INSTALL_EXISTENCE == 'true') { 15 if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { 16 $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); 17 } 18 } 19 20 // check if the configure.php file is writeable 21 if (WARN_CONFIG_WRITEABLE == 'true') { 22 if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { 23 $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); 24 } 25 } 26 27 // check if the session folder is writeable 28 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { 29 if (STORE_SESSIONS == '') { 30 if (!is_dir(tep_session_save_path())) { 31 $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); 32 } elseif (!is_writeable(tep_session_save_path())) { 33 $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); 34 } 35 } 36 } 37 38 // check session.auto_start is disabled 39 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { 40 if (ini_get('session.auto_start') == '1') { 41 $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); 42 } 43 } 44 45 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { 46 if (!is_dir(DIR_FS_DOWNLOAD)) { 47 $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); 48 } 49 } 50 51 if ($messageStack->size('header') > 0) { 52 echo $messageStack->output('header'); 53 } 54 ?> 55 <table border="0" width="100%" cellspacing="0" cellpadding="0"> 56 <tr class="header"> 57 <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td> 58 <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> 59 </tr> 60 </table> 61 <table border="0" width="100%" cellspacing="0" cellpadding="1"> 62 <tr class="headerNavigation"> 63 <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> 64 <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> 65 </tr> 66 </table> 67 <?php 68 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { 69 ?> 70 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 71 <tr class="headerError"> 72 <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td> 73 </tr> 74 </table> 75 <?php 76 } 77 78 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { 79 ?> 80 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 81 <tr class="headerInfo"> 82 <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td> 83 </tr> 84 </table> 85 <?php 86 } 87 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 19:48:25 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |