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

  /*===================================================
    UpdateNumberOfLink()
  ===================================================*/

  function UpdateNumberOfLink() {

    // vars global configuration
    global $admin_template_path;

    // vars messages
    global $msg;

    // vars template
    global $message;

    // calculate nuimber of links in all categories
    
    $category_obj = new clsCategory;

    $category_obj->table_name = "idx_category";
    $category_obj->link_table_name = "idx_link";
    $category_obj->UpdateNumberOfLinksInAllCategories();

    $message = $msg['20501'];
    
    DisplayTemplate($admin_template_path . "message.html", "\$message");
  }


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

  include "../application.php";
  ini_set("max_execution_time", "3600");
  
  RunPreFilter(__FILE__);

  DisplayTemplate($admin_template_path . "header.html");
  UpdateNumberOfLink();
  DisplayTemplate($admin_template_path . "footer.html");
  
  RunPostFilter(__FILE__);

?>