session_start(); include "config.php"; include "cms_functions.php"; /* // File: index.php // Author: Andrei Tatartchenko */ time_publish(); $loc=redirect($_SERVER['REQUEST_URI']); if($loc) { header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$loc); exit(0); } $role_id=5; $out=""; $host=getenv("HTTP_HOST"); if(strpos($host,".p")===false && strpos($host,"dev.")===false && strpos($host,".ezd3")===false) { if(substr($host,0,4)!="www." ) { header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.".getenv("HTTP_HOST").getenv("REQUEST_URI")); exit(0); } } $path=getPath($_SERVER['REQUEST_URI']); $app_path=is_application($path); if($path=="/sitemap.xml") //google sitemap { print_sitemap(1); exit(); } if($path=="/urllist.txt") //yahoo sitemap { print_sitemap(2); exit(); } $application=false; if($app_path) { $application=true; $sql="select * from app where uri = '".mysql_real_escape_string($app_path)."'"; $res=@mysql_query($sql); if(mysql_num_rows($res)>0) { $app=mysql_fetch_object($res); if($app->activation_date) { $include_path=INSTALL_PATH."apps/".$app->uri."/index.php"; include $include_path; exit(); } else { exit("
As an Administrator, you have the following options: