[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * Common Template - tpl_header_test_info.php 4 * 5 * This file is used as an alternate "header" which can be used to display debug information while doing system testing 6 * NOT usable for a live site 7 * 8 * @package templateSystem 9 * @copyright Copyright 2003-2005 Zen Cart Development Team 10 * @copyright Portions Copyright 2003 osCommerce 11 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 12 * @version $Id: tpl_header_test_info.php 2656 2005-12-23 05:14:55Z drbyte $ 13 */ 14 ?> 15 <table class="centershop" border="0" cellspacing="0" cellpadding="0"> 16 <tr><td> 17 <?php 18 if (!$flag_disable_header) { 19 ?> 20 <table border="0" cellspacing="0" cellpadding="0" class="headerNavigation" align="center"> 21 <tr class="headerNavigation"> 22 <td align="left" valign="top" width="33%" class="headerNavigation"> 23 <a href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a> | 24 <?php if ($_SESSION['customer_id']) { ?> 25 <a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> | 26 <a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> 27 <?php } else { ?> 28 <a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a> 29 <?php } ?> 30 </td > 31 <td align="center" width="25%"><?php require(DIR_WS_MODULES . 'sideboxes/' . 'search_header.php'); ?> 32 </td> 33 <td class="headerNavigation" align="right" valign="top" width="33%"> 34 <?php if ($_SESSION['cart']->count_contents() != 0) { ?> 35 <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?>»</a> 36 <?php }?></td> 37 </tr> 38 </table> 39 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="header"> 40 <tr><!-- All HEADER_ definitions in the columns below are defined in includes/languages/english.php //--> 41 <td align="center" valign="middle" height="<?php echo HEADER_LOGO_HEIGHT; ?>" width="<?php echo HEADER_LOGO_WIDTH; ?>"> 42 <?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?> 43 </td> 44 <td align="center" valign="middle"><?php echo HEADER_SALES_TEXT; ?></td> 45 </tr> 46 </table> 47 <?php 48 if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) { 49 ?> 50 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 51 <tr class="headerError"> 52 <td class="headerError"><?php echo htmlspecialchars(urldecode($_GET['error_message'])); ?></td> 53 </tr> 54 </table> 55 <?php 56 } 57 if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) { 58 ?> 59 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 60 <tr class="headerInfo"> 61 <td class="headerInfo"><?php echo htmlspecialchars($_GET['info_message']); ?></td> 62 </tr> 63 </table> 64 <?php 65 } 66 ?> 67 68 <?php 69 if (isset($_SESSION['SSL_SESSION_ID'])) { 70 $show_session_expire = $db->Execute("select * from " . TABLE_SESSIONS . " where sesskey= '" . $_SESSION['SSL_SESSION_ID'] . "'"); 71 } 72 echo '<br /><strong>TESTING INFO:</strong> Time page: <strong>' . $_GET['main_page'] . '</strong> was loaded is: <strong>' . date('H:i:s', time()) . '</strong><br /><br />'; 73 echo 'Session ID: ' . zen_session_id() . '<br / >'; 74 echo 'REGISTERED GLOBALS is: <strong>' . (ini_get('register_globals')=='1' ? 'ON' : 'OFF') . '</strong>' . ' Session Timeout: <strong>' . ini_get('session.gc_maxlifetime') . 's</strong><br /><br />'; 75 echo "GLOBALS[$main_page] and HTTP_GET_VARS['main_page'] and _GET['main_page'] = " . $GLOBALS['main_page'] . ' - ' . $HTTP_GET_VARS['main_page'] . ' - ' . $_GET['main_page'] . '<br /><br />'; 76 echo "_SERVER['PHP_SELF'] and _GET['PHP_SELF'] and PHP_SELF and _SESSION['PHP_SELF'] = " . $_SERVER['PHP_SELF'] . ' - ' . $_GET['PHP_SELF'] . ' - ' . $PHP_SELF . ' - ' . $_SESSION['PHP_SELF'] . '<br /><br />'; 77 echo "getenv('REQUEST_URI') = " . getenv('REQUEST_URI') . '<br /><br />'; 78 echo 'SERVER_NAME = ' . $_SERVER['SERVER_NAME'] . '<br /><br />'; 79 echo 'SCRIPT_FILENAME = ' . $_SERVER['SCRIPT_FILENAME'] . '<br /><br />'; 80 echo 'HTTP_REFERER = ' . $_SERVER['HTTP_REFERER'] . '<br /><br />'; 81 echo 'template_dir = ' . $template_dir . '<br /><br />'; 82 echo '$cPath='.$cPath . '<br /><br />'; 83 84 echo '<strong>TEST LANGUAGE ' . TEST_LANGUAGE . '</strong><br /><br />'; 85 if (strstr($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME'])) { 86 echo 'SERVER_NAME within HTTP_REFERER - Yes' . '<br />'; 87 } else { 88 echo 'SERVER_NAME within HTTP_REFERER - No' . '<br />'; 89 } 90 91 // set up some variables in place of getenv 92 echo '<br /><br /><strong>getenv replacements:</strong>' . '<br />'; 93 echo '<strong>$_SERVER[HTTPS]</strong> ' . $_SERVER['HTTPS'] . '<br />'; 94 echo '<strong>$_SERVER[HTTP_USER_AGENT]</strong> ' . $_SERVER['HTTP_USER_AGENT'] . '<br />'; 95 echo '<strong>$_SERVER[REQUEST_URI]</strong> ' . $_SERVER['REQUEST_URI'] . '<br />'; 96 echo '<strong>$_SERVER[SSL_SESSION_ID]</strong> ' . $_SERVER['SSL_SESSION_ID'] . '<br />'; 97 echo '<strong>$_SERVER[HTTP_ACCEPT_LANGUAGE]</strong> ' . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '<br />'; 98 99 /* 100 echo '<strong>AIN\'T THIS COOL TO KNOW:</strong> ' . '<br /><br />'; 101 if (isset($_GET['width']) AND isset($_GET['height'])) { 102 // output the geometry variables 103 echo "Screen width is: ". $_GET['width'] ."<br />\n"; 104 echo "Screen height is: ". $_GET['height'] ."<br />\n"; 105 } else { 106 // pass the geometry variables 107 // (preserve the original query string 108 // -- post variables will need to handled differently) 109 110 echo "<script language='javascript'>\n"; 111 echo " location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}" 112 . "&width=\" + screen.width + \"&height=\" + screen.height;\n"; 113 echo "</script>\n"; 114 exit(); 115 } 116 */ 117 echo '<br /><br />' 118 ?> 119 <?php 120 $offset = 0; 121 while ($offset < 12) { 122 $back = sizeof($_SESSION['navigation']->path)-$offset; 123 if (isset($_SESSION['navigation']->path[$back]['page'])) { 124 $test_link= zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']); 125 ?> 126 <table> 127 <tr> 128 <td class="main"><?php echo '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">' . zen_image_button('button_back.gif', 'TEST BACK NONE') . '</a>-' . $offset . '<br />Go to: ' . $test_link; ?></td> 129 </tr> 130 </table> 131 <?php 132 } 133 $offset++; 134 } 135 ?> 136 <?php 137 } 138 ?> 139 <?php 140 echo "<br /><br /><strong>GET variables:</strong><br />"; 141 foreach($_GET as $key=>$value) { echo "$key => $value<br />"; } 142 143 echo "<br /><strong>POST variables:</strong><br />"; 144 foreach($_POST as $key=>$value) { echo "$key => $value<br />"; } 145 146 echo "<br /><strong>COOKIE variables:</strong><br />"; 147 foreach($_COOKIE as $key=>$value) { echo "$key => $value<br />"; } 148 149 echo "<br /><strong>SESSION variables:</strong><br />"; 150 foreach($_SESSION as $key=>$value) { 151 echo "$key => $value<br />"; 152 } 153 // now break it out into objects and arrays, if relevant 154 foreach($_SESSION as $key=>$value) { 155 echo "<strong>$key</strong> => <em>$value</em><br />"; 156 if (is_array($value) || is_object($value)) { 157 foreach($value as $key2=>$value2) { 158 echo " <strong>$key2</strong> => <em>$value2</em><br />"; 159 if (is_array($value2) || is_object($value2)) { 160 foreach($value2 as $key3=>$value3) { 161 echo " <strong>$key3</strong> => <em>$value3</em><br />"; 162 if (is_array($value3) || is_object($value3)) { 163 foreach($value3 as $key4=>$value4) { 164 echo " <strong>$key4</strong> => <em>$value4</em><br />"; 165 if (is_array($value4) || is_object($value4)) { 166 foreach($value4 as $key5=>$value5) { 167 echo " <strong>$key5</strong> => <em>$value5</em><br />"; 168 if (is_array($value5) || is_object($value5)) echo '<font color=red>More Info not shown...</font>'; 169 } 170 } 171 } 172 } 173 } 174 } 175 } 176 } 177 } 178 179 echo "<br /><strong>FILES variables:</strong>(if any)<br />"; 180 foreach($_FILES as $key=>$value) { 181 echo $key .'[name]=> '.$_FILES[$key]['name'].'<br />'; 182 echo $key .'[type]=> '.$_FILES[$key]['type'].'<br />'; 183 echo $key .'[size]=> '.$_FILES[$key]['size'].'<br />'; 184 echo $key .'[tmp_name]=> '.$_FILES[$key]['tmp_name'].'<br />'; 185 } 186 echo "<br /><br />"; 187 188 ?>
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 |
![]() |