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


  if (!defined('INDEXU')) {
    exit;
  }

  if (!isset($_SERVER['REQUEST_URI']) || !$_SERVER['REQUEST_URI']) {
    if (!($_SERVER['REQUEST_URI'] = @$_SERVER['PHP_SELF'])) {
      $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
    }
    if (isset($_SERVER['QUERY_STRING'])) {
      $_SERVER['REQUEST_URI'] .= '?' . $_SERVER[ 'QUERY_STRING' ];
    }
  }

  $dbConn = new DB_Connection($dbHostname, $dbUsername, $dbPassword, $dbName);
  $active_filters = array();

  AddFilter('gzip_compression');
  //AddFilter('runtime');
  AddFilter('start_session');

  if (strpos($_SERVER['REQUEST_URI'], '/admin/') !== FALSE) {
    AddFilter('validate_admin');
    include $admin_template_path . "msg.php";
  }
  elseif (strpos($_SERVER['REQUEST_URI'], '/cp/') !== FALSE) {
    AddFilter('validate_user');
    $theme_name   = $active_theme;
    $theme_path   = $theme_path . $theme_name . "/";
    include $theme_path . "msg.php";
  }
  elseif (strpos($_SERVER['REQUEST_URI'], '/payment/') !== FALSE) {
    // none
  }
  elseif (strpos($_SERVER['REQUEST_URI'], '/blocks/') !== FALSE) {
    // none
  }
  else {
    $theme_name   = $active_theme;
    $theme_path   = $theme_path . $theme_name . "/";
    include $theme_path . "msg.php";
  }

?>