stujol Posted February 10, 2009 Share Posted February 10, 2009 http://addons.oscommerce.com/info/4394 News Section I've added this addon to my oscommerce package but not without having to change several things. Im almost their but i have one last problem. my main news.php page which is suppose to show the contents of my news table isnt showing any contents. it only shows dates which are in the incorrect format. here is my code <?php /* $Id: privacy.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWS)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="col_left"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <? tep_draw_heading_top();?> <? new contentBoxHeading_ProdNew($info_box_contents);?> <? tep_draw_heading_top_1();?> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <div align="center"> <? $news_sql = "select * from " . TABLE_NEWS . " ORDER BY newsDate Desc"; $news_query = tep_db_query($news_sql); ?> <table border="0" cellpadding="1" cellspacing="0" width="100%" bgcolor="#baccea"> <tr> <td> <table border="0" cellpadding="3" cellspacing="1" width="100%" bgcolor="#FFFFFF"> <? while($current_news = tep_db_fetch_array($news_query)) { $dateArray = explode("-",$current_news->newsDate); $newDate = date('F jS, Y',mktime(0,0,0,$dateArray['1'],$dateArray['2'],$dateArray[0])); ?> <tr> <td width="50%" valign="top" bgcolor="#6f91c1"><b><font color="white"><?=$newDate?></font></b></td> </tr> <tr> <td width="50%" valign="top" bgcolor="#baccea"><b><?=$current_news->newsTitle?></b></td> </tr> <tr> <td valign="top" width="50%" bgcolor="#eef3fa"><?=nl2br($current_news->newsDescription)?><br></td> </tr> <tr> <td height="20" valign="top" width="50%"></td> </tr> <? } ?> </table> </td> </tr> </table> </div> </td> </tr> </table> </td> <?php tep_draw_heading_bottom_1();?> <?php tep_draw_heading_bottom();?> </td> </tr> </table> </td> <!-- body_text_eof //--> <td class="col_right"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--></body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.