Esempio n. 1
0
    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);
    $time -= $minute * 60;
    $second = $time;
    $days = $days > 0 ? $days : 0;
Esempio n. 2
0
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
*/
session_start();
include_once 'config.php';
// loads config variables
include_once 'query.php';
// imports queries
include_once 'adminquery.php';
include_once 'functions.php';
if (!isset($_SESSION[$CONFIG_name . 'level']) || $_SESSION[$CONFIG_name . 'level'] < $CONFIG['cp_admin']) {
    die("Not Authorized");
}
$items = readitems();
echo "\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html>\r\n\t<head>\r\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n\t\t<title>\r\n\t\t\tCeres Control Panel - Charactere Details\r\n\t\t</title>\r\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"./ceres.css\">\r\n\t</head>\r\n\r\n<BODY>\r\n";
opentable("Char Detail");
if (isset($GET_id) && !notnumber($GET_id)) {
    $jobs = $_SESSION[$CONFIG_name . 'jobs'];
    $query = sprintf(CHARINFO_CHAR, trim($GET_id));
    $answere = execute_query($query, 'admincharinfo.php');
    echo "\r\n\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" width=\"400\">\r\n\t";
    if ($result = $answere->fetch_row()) {
        $acc_id = $result[1];
        $class = $result[4];
        echo "\r\n\t\t\t<tr>\r\n\t\t\t\t<td align=\"right\" class=\"head\">Name:&nbsp;</td><td align=\"left\">{$result['3']}</td>\r\n\t\t\t\t<td align=\"right\" class=\"head\">Job:&nbsp;</td><td align=\"left\">\r\n\t\t\t";
        if (isset($jobs[$result[4]])) {
            echo $jobs[$result[4]];
        } else {
            echo "unknown";