Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Błąd w PHP
Forum PHP.pl > Forum > PHP
Kriss5630
Witam. Moim problemem jest banner główny we flashu. Wyświetla mi się nieprawidłowo. Do tego jeszcze podwójnie. To musi być luka w pliku header.php. Banner ma rozmiar 1024x200. Oto kod pliku header:
Kod:
  1. <?php
  2. /*
  3. $Id: header.php,v 1.42, 2003/06/10 hpdl Exp $
  4.  
  5. osCommerce, Open Source E-Commerce Solutions
  6.  
  7. Copyright Š 2003 osCommerce
  8.  
  9. Released under the GNU General Public License
  10.   */
  11. if ($messageStack->size('header') > 0) {
  12. echo $messageStack->output('header');
  13. }
  14. function showFlashLogo($location) {
  15. echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="50">';
  16. echo '<param name="movie" value="'.$location.'">';
  17. echo '<param name="quality" value="high">';
  18. echo '<embed src="'.$location.'" width="200" height="50" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="32" height="32"></embed>';
  19. echo '</object>';
  20. }
  21. // check if the 'install' directory exists, and warn of its existence
  22. if (WARN_INSTALL_EXISTENCE == 'true') {
  23. if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  24.  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
  25. }
  26. }
  27.  
  28. // check if the configure.php file is writeable
  29. if (WARN_CONFIG_WRITEABLE == 'true') {
  30. if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  31.  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
  32. }
  33. }
  34.  
  35. // check if the session folder is writeable
  36. if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
  37. if (STORE_SESSIONS == '') {
  38. if (!is_dir(tep_session_save_path())) {
  39.  $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  40. } elseif (!is_writeable(tep_session_save_path())) {
  41.  $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  42. }
  43. }
  44. }
  45.  
  46. // check session.auto_start is disabled
  47. if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
  48. if (ini_get('session.auto_start') == '1') {
  49.  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
  50. }
  51. }
  52.  
  53. if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
  54. if (!is_dir(DIR_FS_DOWNLOAD)) {
  55.  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
  56. }
  57. }
  58.  
  59.  if ($messageStack->size('header') > 0) {
  60.  echo $messageStack->output('header');
  61.  }
  62.  
  63. ?>
  64. <?php
  65. // BOF: WebMakers.com Added: Center Shop
  66. // This goes before any other table of the shop
  67. if ( CENTER_SHOP_ON=='1' ) {
  68. // Is a bgroundcolor set for around the shop
  69. if ( CENTER_SHOP_BACKGROUND_ON=='1' ) {
  70. ?>
  71. <table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>">
  72. <tr><td>
  73. <?php
  74.  }
  75. // Center the shop to what size and what bgcolor
  76. ?>
  77. <table CELLSPACING="4" CELLPADDING="0" BORDER="0" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>">
  78. <tr><td BGColor="FFFFFF">
  79. <?php
  80.  }
  81. // The rest of the <td> at the end of the footer
  82. // EOF: WebMakers.com Added: Center Shop
  83. ?>
  84.  
  85.  
  86. <td valign="middle"><?php showFlashLogo(DIR_WS_IMAGES.'logo.swf'); ?></td>
  87.  
  88. <?php
  89. // Defined image and link from center_shop.php
  90. ?>
  91. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  92. <tr>
  93. <td valign="middle"><?php showFlashLogo(DIR_WS_IMAGES.'logo.swf'); ?></td>
  94. </td>
  95.  
  96. </tr>
  97. <tr>
  98. <td><table width="100%" cellpadding="0" cellspacing="0">
  99. <tr class="headerNavigation">
  100. <td class="headerNavigation">&nbsp;&nbsp;<?php echo $breadcrumb->trail(' &raquo; '); ?></td>
  101. <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> &nbsp;|&nbsp; <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> &nbsp;|&nbsp; <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> &nbsp;|&nbsp; <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> &nbsp;&nbsp;</td></tr>
  102. </table></td>
  103.  
  104. </tr>
  105. </table>
  106. <?php
  107.  if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
  108. ?>
  109. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  110. <tr class="headerError">
  111. <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
  112. </tr>
  113. </table>
  114. <?php
  115. }
  116.  
  117.  if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
  118. ?>
  119. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  120. <tr class="headerInfo">
  121.  <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
  122. </tr>
  123. </table>
  124. <?php
  125. }
  126. ?>

Co zmienić w kodzie? Problem występuje na stronie http://www.woblery.sold.pl
Prosze o pomoc

Poradziłem sobie smile.gif Znalazłem luki w kodzie. Pozdrawiam
losv
hmm ... mnie sie wszystko dobrze wyswietla i nic nie dubluje ... pod ff
franki01
Usun linie 87.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.