[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

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

   1  <?php
   2  /*

   3  $Id: article_listing.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13  $listing_split = new splitPageResults($listing_sql, MAX_ARTICLES_PER_PAGE);
  14    if (($listing_split->number_of_rows > 0) && ((ARTICLE_PREV_NEXT_BAR_LOCATION == 'top') || (ARTICLE_PREV_NEXT_BAR_LOCATION == 'both'))) {
  15  ?>
  16        <tr>
  17          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  18            <tr>
  19              <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_ARTICLES); ?></td>
  20              <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
  21            </tr>
  22          </table></td>
  23        </tr>
  24        <tr>
  25          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  26        </tr>
  27  <?php
  28    }
  29  ?>
  30        <tr>
  31          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  32  <?php
  33    if ($listing_split->number_of_rows > 0) {
  34      $articles_listing_query = tep_db_query($listing_split->sql_query);
  35  ?>
  36        <tr>
  37          <td class="main"><?php echo TEXT_ARTICLES; ?></td>
  38        </tr>
  39        <tr>
  40          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  41        </tr>
  42  <?php
  43      while ($articles_listing = tep_db_fetch_array($articles_listing_query)) {
  44  ?>
  45            <tr>
  46              <td valign="top" class="main" width="75%">
  47  <?php  // osc-help.net: added class=main to the link.
  48    echo '<a class="main" href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_listing['articles_id']) . '"><b>' . $articles_listing['articles_name'] . '</b></a> ';
  49    if (DISPLAY_AUTHOR_ARTICLE_LISTING == 'true' && tep_not_null($articles_listing['authors_name'])) {
  50     echo TEXT_BY . ' ' . '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';
  51    }
  52  ?>
  53              </td>
  54  <?php
  55        if (DISPLAY_TOPIC_ARTICLE_LISTING == 'true' && tep_not_null($articles_listing['topics_name'])) {
  56  ?>
  57              <td valign="top" class="main" width="25%" nowrap><?php echo TEXT_TOPIC . '&nbsp;<a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $articles_listing['topics_id']) . '">' . $articles_listing['topics_name'] . '</a>'; ?></td>
  58  <?php
  59        }
  60  ?>
  61            </tr>
  62  <?php
  63        if (DISPLAY_ABSTRACT_ARTICLE_LISTING == 'true') {
  64  ?>
  65            <tr>
  66              <td class="main" style="padding-left:15px"><?php echo clean_html_comments(substr($articles_listing['articles_head_desc_tag'],0, MAX_ARTICLE_ABSTRACT_LENGTH)) . ((strlen($articles_listing['articles_head_desc_tag']) >= MAX_ARTICLE_ABSTRACT_LENGTH) ? '...' : ''); ?></td>
  67            </tr>
  68  <?php
  69        }
  70        if (DISPLAY_DATE_ADDED_ARTICLE_LISTING == 'true') {
  71  ?>
  72            <tr>
  73              <td class="smalltext" style="padding-left:15px"><?php echo TEXT_DATE_ADDED . ' ' . tep_date_long($articles_listing['articles_date_added']); ?></td>
  74            </tr>
  75  <?php
  76        }
  77        if (DISPLAY_ABSTRACT_ARTICLE_LISTING == 'true' || DISPLAY_DATE_ADDED_ARTICLE_LISTING) {
  78  ?>
  79            <tr>
  80              <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  81            </tr>
  82  <?php
  83   }
  84      } // End of listing loop

  85    } else {
  86  ?>
  87            <tr>
  88              <td class="main"><?php if ($listing_no_article<>'') {
  89                                       echo $listing_no_article;
  90                                     } elseif ($topic_depth == 'articles') {
  91                                       echo TEXT_NO_ARTICLES;
  92                                     } elseif (isset($HTTP_GET_VARS['authors_id'])) {
  93                                      echo  TEXT_NO_ARTICLES2;
  94                                     } ?></td>
  95            </tr>
  96            <tr>
  97              <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  98            </tr>
  99  <?php
 100    }
 101  ?>
 102            <tr>
 103              <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 104            </tr>
 105          </table></td>
 106        </tr>
 107  <?php
 108    if (($listing_split->number_of_rows > 0) && ((ARTICLE_PREV_NEXT_BAR_LOCATION == 'bottom') || (ARTICLE_PREV_NEXT_BAR_LOCATION == 'both'))) {
 109  ?>
 110        <tr>
 111          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 112            <tr>
 113              <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_ARTICLES); ?></td>
 114              <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 115            </tr>
 116          </table></td>
 117        </tr>
 118  <?php
 119    }
 120  ?>


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