[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/ -> articles.php (source)

   1  <?php
   2  /*

   3  $Id: articles.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  // Most of this file is changed or moved to BTS - Basic Template System - format.

  14  // For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).

  15  //       catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).

  16  // (Sub 'fallback' with your current template to see if there is a template specific file.)

  17  
  18  
  19    require ('includes/application_top.php');
  20  
  21  // the following tPath references come from application_top.php

  22    $topic_depth = 'top';
  23  
  24    if (isset($tPath) && tep_not_null($tPath)) {
  25      $topics_articles_query = tep_db_query("select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where topics_id = '" . (int)$current_topic_id . "'");
  26      $topics_articles = tep_db_fetch_array($topics_articles_query);
  27      if ($topics_articles['total'] > 0) {
  28        $topic_depth = 'articles'; // display articles

  29      } else {
  30        $topic_parent_query = tep_db_query("select count(*) as total from " . TABLE_TOPICS . " where parent_id = '" . (int)$current_topic_id . "'");
  31        $topic_parent = tep_db_fetch_array($topic_parent_query);
  32        if ($topic_parent['total'] > 0) {
  33          $topic_depth = 'nested'; // navigate through the topics

  34        } else {
  35          $topic_depth = 'articles'; // topic has no articles, but display the 'no articles' message

  36        }
  37      }
  38    }
  39  
  40    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLES);
  41  
  42    if ($topic_depth == 'top' && !isset($HTTP_GET_VARS['authors_id'])) {
  43      $breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
  44    }
  45  
  46  
  47   $content = CONTENT_ARTICLES_MAIN;
  48  
  49    include (bts_select('main', $content_template)); // BTSv1.5

  50  
  51   
  52   require (DIR_WS_INCLUDES . 'application_bottom.php'); 
  53   
  54   ?>


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