Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

whats wrong with this code?


ang2006

Recommended Posts

Posted

hi all,

 

im trying to create a scrolling manufacturers infobox.

 

i have created a code which i have no idea if its correct.

 

can someone check and tell me if its worth presuing?

 

thanks for your help in advance.

 

Darren......

 

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

Copyright © 2007 osCommerce

 

Released under the GNU General Punblic License

 

*/

 

$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

 

if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

 

?>

<!-- manufacturers //-->

<tr>

<td>

<?php

 

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

$manufacturers .= '<a href="' . tep_href_link(FILENAME_INDEX, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . tep_image (DIR_WS_IMAGES . $manufacturers ['manufacturers_image'], $manufacturers ['manufacturers_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><a href="' . tep_href_link(FILENAME_INDEX, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '</a><span style="color:#0000FF;">' . $manufacturers['manufacturers_name'];

$manufacturers .= "</SPAN>";

}

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "left" height= "120" scrollamount= "4" scrolldelay= "20" loop = "true" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$manufacturers.'</span></MARQUEE>');

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- manufacturers_eof //-->

<?php

}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...