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

  include "application.php";

  RemoveFilter("gzip_compression");
  RemoveFilter("runtime");
  RemoveFilter("start_session");
  RunPreFilter(__FILE__);

	ignore_user_abort(true);
  
  if (strpos($id, 'link_') !== false) {
    $id = str_replace('link_', '', $id);
    if (!@in_array($id, $_SESSION['indexu_session_links'])) {
      $_SESSION['indexu_session_links'][] = $id;
      $dbConn->Execute("update idx_link set hits = hits + 1 where link_id = '$id'");
      RunPostFilter(__FILE__);
    }
  }

  if (strpos($id, 'cat_') !== false) {
    $id = str_replace('cat_', '', $id);
    if (!@in_array($id, $_SESSION['indexu_session_cats'])) {
      $_SESSION['indexu_session_cats'][] = $id;
      $dbConn->Execute("update idx_category set hits = hits + 1 where category_id = '$id'");
      RunPostFilter(__FILE__);
    }
  }

  RunPostFilter(__FILE__);

?>