Guest Posted May 14, 2008 Share Posted May 14, 2008 HI I tried but I had no success. You can see my store at: http://74.52.74.98/~jbessa/loja/index.php?currency=eu I just need to change my big JPG header for one I made with flash (http://74.52.74.98/~jbessa/loja/banner_jbessa.swf) Please help to write the correct code in the header file: <?php/* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License*/// check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } }// check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } }// check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } }// check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); }?><!-- start --><table cellpadding="0" cellspacing="0" border="0" style="width:731px" align="center"> <tr> <td> <table cellpadding="0" cellspacing="0" border="0" style="height:356px"> <tr> <td> <br style="line-height:21px"> <table cellpadding="0" cellspacing="0" border="0" style="height:77px; background:url(images/top.gif); " class="header"> <tr> <td><?php echo tep_image(DIR_WS_IMAGES.'z7.gif')?></td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:135px"> <tr> <td> <strong><?php echo BOX_HEADING_LANGUAGES?>:</strong><br> </td> </tr> </table> </td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:106px"> <tr> <td><?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } $languages_string = ''; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { $languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> '; } echo $languages_string;?></td> </tr> </table> </td> <td><?php echo tep_image(DIR_WS_IMAGES.'z.gif')?></td> <td><?php echo tep_draw_separator('spacer.gif', '25', '1'); ?></td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:72px"> <tr> <td> <b><?php echo BOX_HEADING_CURRENCIES?>:</b><br> </td> </tr> </table> </td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:129px"> <tr> <td><?php echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" class="jamp"') . $hidden_get_variables . tep_hide_session_id(); echo '</form>';?></td> </tr> </table> </td> <td><?php echo tep_image(DIR_WS_IMAGES.'z.gif')?></td> <td><?php echo tep_draw_separator('spacer.gif', '18', '1'); ?></td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:51px"> <tr> <td><?php echo tep_image(DIR_WS_IMAGES.'z1.gif')?><br></td> </tr> </table> </td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:147px"> <tr> <td><b><?php echo BOX_HEADING_SHOPPING_CART?> </b><br><a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a></td> </tr> </table> </td> <td><?php echo tep_image(DIR_WS_IMAGES.'z8.gif')?></td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" style="height:63px"> <tr> <td><a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image_button('m1.gif')?></a><a href="<?php echo tep_href_link('products_new.php')?>"><?php echo tep_image_button('m2.gif')?></a><a href="<?php echo tep_href_link('specials.php')?>"><?php echo tep_image_button('m3.gif')?></a><a href="<?php echo tep_href_link('account.php')?>"><?php echo tep_image_button('m4.gif')?></a><a href="<?php echo tep_href_link('contact_us.php')?>"><?php echo tep_image_button('m5.gif')?></a><br> <a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image(DIR_WS_IMAGES.'p1.jpg')?></a></td> </tr> </table> </td> </tr> </table><!-- end --><?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {?><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td> </tr></table><?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {?><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td> </tr></table><?php }?><!-- start --> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" border="0" style=" background:url(images/bg.gif) "> <tr> <td><?php echo tep_draw_separator('spacer.gif', '4', '1'); ?></td> <td style="width:100%;"><!-- end --><?php define(MAX_DESCR_1,'110');define(MAX_DESCR_NAME,'35');define(MAX_DESCR_NAME_SHOPPCART,'35');define(MAX_DESCR_BESTS,'19');define(MAX_DESCR_REVIEWS,'50');define(MAX_DESCR_NAME_BOX,'15');?> Thanks Link to comment Share on other sites More sharing options...
catalepticstate Posted July 2, 2008 Share Posted July 2, 2008 Hi, I'm trying to add a flash banner to header.php But I have added the banner through DW CS3 and when I load the page its all blank. Any help, would be great. Thank you HI I tried but I had no success. You can see my store at: http://74.52.74.98/~jbessa/loja/index.php?currency=eu I just need to change my big JPG header for one I made with flash (http://74.52.74.98/~jbessa/loja/banner_jbessa.swf) Please help to write the correct code in the header file: <?php/* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License*/// check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } }// check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } }// check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } }// check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); }?><!-- start --><table cellpadding="0" cellspacing="0" border="0" style="width:731px" align="center"> <tr> <td> <table cellpadding="0" cellspacing="0" border="0" style="height:356px"> <tr> <td> <br style="line-height:21px"> <table cellpadding="0" cellspacing="0" border="0" style="height:77px; background:url(images/top.gif); " class="header"> <tr> <td><?php echo tep_image(DIR_WS_IMAGES.'z7.gif')?></td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:135px"> <tr> <td> <strong><?php echo BOX_HEADING_LANGUAGES?>:</strong><br> </td> </tr> </table> </td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:106px"> <tr> <td><?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } $languages_string = ''; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { $languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> '; } echo $languages_string;?></td> </tr> </table> </td> <td><?php echo tep_image(DIR_WS_IMAGES.'z.gif')?></td> <td><?php echo tep_draw_separator('spacer.gif', '25', '1'); ?></td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:72px"> <tr> <td> <b><?php echo BOX_HEADING_CURRENCIES?>:</b><br> </td> </tr> </table> </td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:129px"> <tr> <td><?php echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" class="jamp"') . $hidden_get_variables . tep_hide_session_id(); echo '</form>';?></td> </tr> </table> </td> <td><?php echo tep_image(DIR_WS_IMAGES.'z.gif')?></td> <td><?php echo tep_draw_separator('spacer.gif', '18', '1'); ?></td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:51px"> <tr> <td><?php echo tep_image(DIR_WS_IMAGES.'z1.gif')?><br></td> </tr> </table> </td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:147px"> <tr> <td><b><?php echo BOX_HEADING_SHOPPING_CART?> </b><br><a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a></td> </tr> </table> </td> <td><?php echo tep_image(DIR_WS_IMAGES.'z8.gif')?></td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" style="height:63px"> <tr> <td><a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image_button('m1.gif')?></a><a href="<?php echo tep_href_link('products_new.php')?>"><?php echo tep_image_button('m2.gif')?></a><a href="<?php echo tep_href_link('specials.php')?>"><?php echo tep_image_button('m3.gif')?></a><a href="<?php echo tep_href_link('account.php')?>"><?php echo tep_image_button('m4.gif')?></a><a href="<?php echo tep_href_link('contact_us.php')?>"><?php echo tep_image_button('m5.gif')?></a><br> <a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image(DIR_WS_IMAGES.'p1.jpg')?></a></td> </tr> </table> </td> </tr> </table><!-- end --><?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {?><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td> </tr></table><?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {?><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td> </tr></table><?php }?><!-- start --> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" border="0" style=" background:url(images/bg.gif) "> <tr> <td><?php echo tep_draw_separator('spacer.gif', '4', '1'); ?></td> <td style="width:100%;"><!-- end --><?php define(MAX_DESCR_1,'110');define(MAX_DESCR_NAME,'35');define(MAX_DESCR_NAME_SHOPPCART,'35');define(MAX_DESCR_BESTS,'19');define(MAX_DESCR_REVIEWS,'50');define(MAX_DESCR_NAME_BOX,'15');?> Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.