[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/modules/ -> affiliate_news.php (source)

   1  <?php
   2  /*

   3    $Id: affiliate_news.php,v 2.1 2003/10/12

   4  

   5    OSC-Affiliate

   6  

   7    Contribution based on:

   8  

   9    osCommerce, Open Source E-Commerce Solutions

  10    http://www.oscommerce.com

  11  

  12    Copyright (c) 2002 - 2003 osCommerce

  13  

  14    Released under the GNU General Public License

  15  */
  16  ?>
  17  <!-- affiliate_news //-->
  18  <?php
  19  
  20  // npe catalog begin add multi lingual news #change

  21  //  $affiliate_news_query = tep_db_query('SELECT * from ' . TABLE_AFFILIATE_NEWS . ' WHERE status = 1 ORDER BY date_added DESC LIMIT ' . MAX_DISPLAY_AFFILIATE_NEWS);

  22  
  23      $affiliate_news_query = tep_db_query('select affiliate_news_headlines as headline, affiliate_news_contents as content,date_added, news_status from ' . TABLE_AFFILIATE_NEWS . ', ' . TABLE_AFFILIATE_NEWS_CONTENTS . " where news_id = affiliate_news_id and affiliate_news_languages_id = '" . $languages_id . "' and news_status = 1 order by date_added desc");
  24  
  25    if (!tep_db_num_rows($affiliate_news_query)) { // there is no news
  26      echo '<!-- ' . TEXT_NO_AFFILIATE_NEWS . ' -->';
  27    } else {
  28  
  29      $info_box_contents = array();
  30      $row = 0;
  31      while ($affiliate_news = tep_db_fetch_array($affiliate_news_query)) {
  32        $info_box_contents[$row] = array('align' => 'left',
  33                                         'params' => 'class="smallText" valign="top"',
  34                                         'text' => '<b>' . $affiliate_news['headline'] . '</b> - <i>' . tep_date_long($affiliate_news['date_added']) . '</i><br>' . nl2br($affiliate_news['content']) . '<br>');
  35        $row++;
  36      }
  37      new contentBox($info_box_contents);
  38    }
  39  ?>
  40  <!-- affiliate_news_eof //-->


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7