<?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)
 *
 */
 
  /*===================================================
    ShowHotSection()
  ===================================================*/

  function ShowHotSection() {

    // vars global configuration
    global $dbConn, $theme_path, $category_separator,
             $theme_name, $hot_limit;

    // vars messages
    global $msg;

    // vars template
    global $category, $link;

    // update hot flag
    $query  = "update idx_link set hot = 0";
    $result = $dbConn->Execute($query);


    // show links

    $links_obj = new clsLink;
    $links_obj->table_name                      = "idx_link";
    $links_obj->max_rows                        = $hot_limit;
    $links_obj->hot_limit                       = $hot_limit;
    $links_obj->template_file                   = $theme_path . "hot_link_rows.html";
    $links_obj->date_format                     = $msg["10041"];
    $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->category_table_name             = "idx_category";
    $links_obj->category_separator              = $category_separator;
    $links_obj->hot_link_category_path_template = '<p><b><%$category_path%></p>';
    $links_obj->hot_link_table_header           = $msg["10043"];
    $links_obj->hot_link_table_footer           = $msg["10044"];
    $link                                       = $links_obj->DisplayHotListing();

    DisplayTemplate($theme_path . "hot.html", "\$link");
  }


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

  include "application.php";

  AddFilter("page_cache");
  RunPreFilter(__FILE__);

  if (!defined('CACHED_PAGE')) {
    ShowHotSection();
  }

  RunPostFilter(__FILE__);

?>