mythz Posted May 11, 2010 Share Posted May 11, 2010 Hello everybodies, im trying to insert column right box on the header.php on my template with macromedia, but im having some problem... Here is my header.php, someone can tell me how, and where put it? :blush: Thanks a lot! <?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'); } ?> <!-- ----------------------------------------- <? // ---- MANUFACTURERS $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { echo ' <table cellspacing=0 cellpadding=0 width=187 align=center bgcolor=#ffffff> '. tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') .'<tr><td height=16 bgcolor=#628AB3 class=ch colspan=2> <font color=#ffffff>Select manufacturer</font></td></tr> <tr><td height=8 colspan=2></td></tr> <tr><td align=center> '; $manufacturers_array = array(); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers_name); } echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=go') . tep_hide_session_id(); echo ' </td><td> <input type=image src=images/m16.gif width=27 height=18></td></tr> <tr><td height=10 colspan=2></td></tr> <tr><td height=10 bgcolor=#E9E9E9 colspan=2></td></tr> </form> </table> '; } ?> -------------------------------------- --> <table cellspacing=0 cellpadding=0 width=700 align=center> <tr><td> <table cellspacing=0 cellpadding=0> <tr><td height=34 colspan=3></td></tr> <tr><td><a href=<?=tep_href_link('index.php?cPath=21')?>><img src=images/m01.gif width=200 height=90 border=0></a></td> <td width=3></td> <td width=497> <table cellspacing=0 cellpadding=0> <tr> <td width=157> <div align="justify"></div> <table align="center" cellpadding=0 cellspacing=0> <tr> <td class=ch3>Cerca per marca:</td> </tr> <tr> <td height=2></td> </tr> <tr> <td> <?php require(DIR_WS_BOXES . 'manufacturers.php'); ?> </td> </tr> <tr> <td height=9></td> </tr> <tr> <td height=6></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"></td> </tr> </table> <br> </p></td> <td><img src=images/m06.gif width=1 height=90></td> <td width=152> <table cellspacing=0 cellpadding=0 width=142 align=center> <tr><td width="127" height=10></td></tr> <tr> <td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('create_account.php')?> class=ml>Registrati</a><br></td></tr> <tr> <td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('contact_us.php')?> class=ml>Contattaci</a><br></td></tr> <tr> <td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('condizioni.php')?> class=ml>Condizioni di vendita</a><br></td></tr> <tr> <td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('raggiungici.php')?> class=ml>Raggiungici</a><br></td></tr> </table> </td> <td><img src=images/m06.gif width=1 height=90></td> <td width=185> <table cellspacing=0 cellpadding=0 width=137 align=center> <tr><td height=20 colspan=2></td></tr> <tr><td><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m08.gif width=40 height=40 border=0></a></td> <td class=sc >Carrello</td> </tr> <tr><td height=3 colspan=2></td></tr> <tr> <td colspan=2>Oggetti nel <a href=<?=tep_href_link('shopping_cart.php')?> class=ml1> carrello</a> <a href=<?=tep_href_link('shopping_cart.php')?> class=ml1><?=$cart->count_contents()?> </a></td> </tr> <tr><td height=15 colspan=2></td></tr> </table> </td></tr> </table> </td></tr> <tr><td height=3 colspan=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td style="background-repeat:no-repeat" background=images/m15.gif width=200 height=71> <? // SEARCH ?> <table cellspacing=0 cellpadding=0 width=160 align=center> <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?> <tr><td height=13 colspan=2></td></tr> <tr> <td class=ml colspan=2><font color=#ffffff>Cerca nel sito:</a></td> </tr> <tr><td width=135><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" class=go') . tep_hide_session_id()?></td><td width=25 align=right><input type=image src=images/m09.gif width=20 height=20></td></tr> <tr> <td width=135 align=right> <a href=<?=tep_href_link('advanced_search.php')?> class=ml2>Ricerca Avanzata</a></td> <td width=25></td></tr> <tr><td height=9 colspan=2></td></tr> </form> </table> <? // END SEARCH ?> </td> <td width=3></td> <td><a href=<?=tep_href_link('index.php?cPath=21')?>><img src=images/m10.gif width=102 height=71 border=0></a><a href=<?=tep_href_link('products_new.php')?>><img src=images/m11.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('account.php')?>><img src=images/m12.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m13.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('logoff.php')?>><img src=images/m14.gif width=98 height=71 border=0></a></td> </tr> <tr><td height=3 colspan=3></td></tr> <tr><td height=3 width=700 bgcolor=#9B9B9B colspan=3></td></tr> <tr><td height=3 colspan=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td width=200 valign=top> <table cellspacing=0 cellpadding=0> <?php /* $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ { include(DIR_WS_BOXES . 'specials.php'); } ?> <tr><td><p><img src=images/m16.gif width=200 height=43></p></td> </tr> <tr><td class=bg> <table cellspacing=0 cellpadding=0 width=154 align=center> <tr><td height=10></td></tr> </tr><tr><td height=3></td></tr> <? // ---- CATEGORIES function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; if(!$tree[$counter]['level']){ $categories_string .= $categories_string ? '<tr><td><img src=images/m19.gif width=154 height=1></td></tr><tr><td height=3></td></tr>' : ''; $categories_string .= '<tr><td><img src=images/m18.gif width=3 height=5 align=absmiddle> <a class=ml3 href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display categry name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></td></tr><tr><td height=3></td></tr>'; }else{ // SUBCATEGORY $categories_string .= '<tr><td> '; for($i=0;$i<$tree[$counter]['le vel'];$i++) $categories_string .= ' '; $categories_string .= ' - <a class=ml3 style="font-weight:normal;" href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display category name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></td></tr><tr><td height=3></td></tr>'; } if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } define(TABLE_CATEGORIES, "categories"); define(TABLE_CATEGORIES_DESCRIPTION, "categories_description"); $categories_string = ''; $tree = array(); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } $categories_string .= ''; tep_show_category($first_element); $categories_string .= ''; echo $categories_string; ?> <tr><td height=6></td></tr> </table> </td></tr> <tr><td><img src=images/m20.gif width=200 height=15></td></tr> <tr><td height=3></td></tr> </table> <table width="200" cellpadding=0 cellspacing=0> <tr><td width="200"> <p align="center"> <p align="center"><form method="get" action="http://www.google.com/search"> <p align="center"> <input type="text" name="q" size="28" maxlength="255" value="" /> </p> <p align="center"> <input type="submit" value="Google Search" /> </p> </form></td> </tr> <tr><td height=3></td></tr> <tr><td><div align="center"> <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="180"> <param name="movie" value="/images/toshiba.swf"> <param name="quality" value="high"> <embed src="/images/toshiba.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="180"></embed> </object> </div></td> </tr> <tr><td height=3></td></tr> <tr><td> </td> </tr> </table> </td> <td width=10></td> <td width=490 valign=top> Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2010 Share Posted May 12, 2010 Are you certain that you want to add "column_right" to your header or just add another cell to the table? Link to comment Share on other sites More sharing options...
mythz Posted May 21, 2010 Author Share Posted May 21, 2010 Are you certain that you want to add "column_right" to your header or just add another cell to the table? Hello, yes i want add column right in my header, to show other boxes on the righ of my page! Link to comment Share on other sites More sharing options...
Collines Posted May 21, 2010 Share Posted May 21, 2010 You cannot add the column_right to the header as you will end up with two versions of column_right. One in the header and one on the main content. What you have to do is in index.php, move the link to the header downwards in the table structure so that the link to the header is not above the right column but on the side of it.i.e. the header needs to be inside the flow of the body. You will need to rearrange the tables a bit. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.