<?php

/**
 *
 * INDEXU
 * Copyright(C), Nicecoder, 2000-2006, All Rights Reserved.
 *
 * INDEXU(tm) is protected by Indonesia and International copyright laws.
 * Unauthorized use or distribution of INDEXU(tm) is strictly prohibited,
 * violators will be prosecuted. To obtain a license for using INDEXU(tm),
 * please register at Nicecoder home page at http://www.nicecoder.com
 *
 * Author:
 *    Dody Rachmat Wicaksono (dody@nicecoder.com)
 *    M. Zuber (zubby@nicecoder.com)
 *
 */
 
  /*===================================================
    ShowNewSection()
  ===================================================*/

  function ShowNewSection() {

    // vars global configuration
    global $theme_path, $category_separator, $theme_name,
             $new_limit, $updated_limit;

    // vars url & form
    global $pg_which, $st, $dt, $cat, $rev, $id;

    // vars messages
    global $msg;

    // vars template
    global $new_listing, $path, $total;

    // show links

    $links_obj = new clsLink;
    $links_obj->table_name                      = "idx_link";
    $links_obj->max_rows                        = 100000;
    $links_obj->template_file                   = $theme_path . "new_link_rows.html";
    $links_obj->date_format                     = $msg["10032"];
    $links_obj->rating_image_path               = "themes/" . $theme_name . "/images/rating/";
    $links_obj->rev_rating_image_path           = "themes/" . $theme_name . "/images/review/";
    $links_obj->paging                          = false;
    $links_obj->href                            = "new.php";
    $links_obj->show_new_link_by_category       = true;
    $links_obj->category_table_name             = "idx_category";
    $links_obj->category_separator              = $category_separator;
    $links_obj->new_link_category_path_template = '<p><b><%$category_path%></b></p>';
    $links_obj->new_limit                       = $new_limit;
    $links_obj->updated_limit                   = $updated_limit;

    if (!empty($st))
      //$path = $msg["10033"] . $links_obj->GetNewListingPath($st, $dt, $id, $rev);

    $total       = $links_obj->GetTotalNewListing($st, $dt, $id, $rev);
    $new_listing = $links_obj->DisplayNewListing($st, $dt, $id, $rev);

    DisplayTemplate($theme_path . "new.html", "\$total,\$new_listing,\$path");
  }


  /*===================================================
    main
  ===================================================*/

  include "application.php";

  AddFilter("page_cache");
  RunPreFilter(__FILE__);
  
  if (!defined('CACHED_PAGE')) {
    ShowNewSection();
  }

  RunPostFilter(__FILE__);

?>