<?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";

  RunPreFilter(__FILE__);
  
  $bad_templates = array('\.\.', 'http://', 'https://', 'file://', 'php://');
  if (!ereg(implode('|', $bad_templates), $id) && file_exists($theme_path . $id . '.html')) {
    DisplayTemplate($theme_path . $id . '.html');
  }
  else {
    header("HTTP/1.0 404 Not Found");
    $requested_url = $_SERVER["REQUEST_URI"];
    DisplayTemplate($theme_path . "404.html", "\$requested_url");
  }

  RunPostFilter(__FILE__);

?>