<?PHP
//....................

session_start();
$hour = date("G:i"); $day = date("d"); $month = date("m"); $year = date("Y");

//....................
include "$_SERVER[DOCUMENT_ROOT]/webifycore/db/mysql.php";

if (!$con)
        die("<h1 style=\"text-align: center; margin-top: 100px;\">The Webify Core has not yet been installed. <hr><a href=/webifycore/install>Install Now</a>.</h1>");
        
include "$_SERVER[DOCUMENT_ROOT]/webifycore/inc/protect.php";
include "../inc/global.php";
include "$_SERVER[DOCUMENT_ROOT]/webifycore/lang/lang.php";
include "$_SERVER[DOCUMENT_ROOT]/webifycore/lang/googletranslate.php";
include "../db/sql.php";
include "$_SERVER[DOCUMENT_ROOT]/webifycore/inc/functions.php";
$table = ADMINS;
include "$_SERVER[DOCUMENT_ROOT]/webifycore/inc/authorize.php";

//....................

if ($_GET[queryjump] == 1) {
        include "query.php";
        die();
}

if (empty($_GET[page]) || $_GET[page] == home) {
        $_GET[page] = home;
}

//....................
?>

<HTML lang="<?php echo $rowxxx[LANG]; ?>">

<head>

<meta charset="utf-8">

<title><?php echo "$script_title $version"; ?> - <?PHP /* (LANGUAGE) */ $t = "Control Panel"; $f = "title"; $altpage = home; include "langinc.php"; /* (LANGUAGE) */ ?></title>

<?php
//....................
if ($_GET[settheme] == 1)
        $rowxxx[THEME] = $_GET[theme];
//....................
?>

<link href="http://<?php echo "$_SERVER[HTTP_HOST]/webifycore"; ?>/style/admin.css" rel="stylesheet">

<script type="text/javascript" src="http://<?php echo $_SERVER[HTTP_HOST]; ?>/webifycore/jquery/nicedit/nicEdit.js"></script>

<script src="http://<?php echo $_SERVER[HTTP_HOST]; ?>/webifycore/jquery/extra.js" language="javascript"></script>

</head>

<body>

<?PHP
//....................

if (empty($_SESSION[adminusername])) {
        $loginpage = "home";
        include "login.php";
}

if (!empty($_SESSION[adminusername])) {

//....................
?>

<table width="950" border="0" cellspacing="0" cellpadding="0" align="center">

<td width="100%"></td>

<td nowrap valign="top"><?PHP include "$_SERVER[DOCUMENT_ROOT]/webifycore/admin/topnav.php"; ?></td>

</table>

<table width="950" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-top:5px;">

<td nowrap width="100%">

<a href="index.php"><img style="float: left; margin-right: 10px; margin-bottom: 10px;" src="http://<?php echo "$_SERVER[HTTP_HOST]/webifycore"; ?>/images/<?php echo $script_title; ?>.png" border="0"></a>

<h1><?php echo "$script_title $version"; ?></h1>

<?php include "mainnav.php"; ?>

</td>

<td align="right" valign="top" nowrap><?php include "apps.php"; ?></td>

</table>

<?PHP
include "langedit.php";
$altpage = "";
?>

<div class="boxadmin" style="margin-bottom: 50px; margin-top:10px"> 

<?php
//....................
if (empty($_GET[page])) 
        $_GET[page] = home;
include "$_GET[page].php"; 
//....................
?>

</div>

<?PHP } ?>

</body>

</html>
