Exemple #1
0
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

To contact any of the authors about special permissions send
an e-mail to cerescp@gmail.com
*/
extension_loaded('mysqli') or die("Mysqli extension not loaded. Please verify your PHP configuration.");
is_file("./config.php") or die("<a href=\"./install/install.php\">Run Installation Script</a>");
session_start();
include_once 'config.php';
// loads config variables
include_once 'query.php';
// imports queries
include_once 'functions.php';
$_SESSION[$CONFIG_name . 'castles'] = readcastles();
$_SESSION[$CONFIG_name . 'jobs'] = readjobs();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<title>
			<?php 
echo htmlformat($CONFIG_name);
?>
 - Ceres Control Panel (SVN)
		</title>
		<link rel="stylesheet" type="text/css" href="./ceres.css">

		<script type="text/javascript" language="javascript" src="ceres.js"></script>
Exemple #2
0
include "class.smtp.php";
// Session Checking ...
if (isset($_SESSION[$CONFIG['Name'] . 'SERVER'])) {
    if (strcmp($_SESSION[$CONFIG['Name'] . 'SERVER'], $CONFIG['Name'])) {
        session_destroy();
        die;
    }
} else {
    $_SESSION[$CONFIG['Name'] . 'SERVER'] = $CONFIG['Name'];
}
$mysql = new sql($CONFIG['DBHost'], $CONFIG['DBUser'], $CONFIG['DBPass']);
if (!isset($_SESSION[$CONFIG['Name'] . 'jobs'])) {
    $_SESSION[$CONFIG['Name'] . 'jobs'] = readjobs();
}
if (!isset($_SESSION[$CONFIG['Name'] . 'castles'])) {
    $_SESSION[$CONFIG['Name'] . 'castles'] = readcastles();
}
if (!isset($_SESSION[$CONFIG['Name'] . 'itemdb'])) {
    $_SESSION[$CONFIG['Name'] . 'itemdb'] = readitems();
}
if (!isset($_SESSION[$CONFIG['Name'] . 'cardpre'])) {
    $_SESSION[$CONFIG['Name'] . 'cardpre'] = readcarpref();
}
// Play Time Functions ************************************************************************
function playtime($time)
{
    $days = intval($time / 86400);
    $time -= $days * 86400;
    $hour = intval($time / 3600);
    $time -= $hour * 3600;
    $minute = intval($time / 60);