<?php
/*
 * This file is part of Web Pro Manager.
 * 
 * Web Pro Manager is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Web Pro Manager is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Web Pro Manager.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * @author The Web Pro Miami, Inc. <info@thewebpro.com>
 * @copyright The Web Pro Miami, Inc. <info@thewebpro.com>, http://www.thewebpro.com/
 * @license http://www.gnu.org/licenses/gpl.html GNU GPL
 * @package WebProManager
*/

require("manage/inc/stop_cache.php");
require("inc/install.php");

// security
$nPageID = preg_replace("/[[:^digit:]]/", '',$_GET["id"]);
if(!$nPageID){ exit("Invalid page ID."); }
$nForceMobile = (isset($_GET['m']) ? $_GET['m'] : NULL);
$nForceMobile = preg_replace("/[[:^digit:]]/", '',$nForceMobile);

// connect to mysql
require("inc/dbconnect.php");
require("inc/config.php");
require("inc/secure_page.php");

require("inc/tracker.php");
require("inc/langutil.php");
require("inc/tmplutil.php");
require("inc/resize-class.php");

$nThisPage = "content.php";

//////////// Template
if(nGetIfMobileAgent()){
	echo tmplShow("mobile");
} else {
	echo tmplShow("content");
}

require("inc/db_close.php");
?>