Exemplo n.º 1
0
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>
	</head>
Exemplo n.º 2
0
    $tar_id = $_GET['tid'];
}
$sid = 0;
if (isset($_GET['sid']) && is_numeric($_GET['sid'])) {
    $sid = $_GET['sid'];
}
$query = sprintf("\r\n\t\tSELECT\r\n\t\t\t`char`.`name`, `char`.`class`, `char`.`base_level`, `char`.`job_level`, `char`.`playtime`, `char`.`max_hp`, `char`.`max_sp`, `char`.`str`, `char`.`int`, `char`.`vit`, `char`.`dex`, `char`.`agi`, `char`.`luk`, `char`.`bg_gold`, `char`.`bg_silver`, `char`.`bg_bronze`,\r\n\t\t\t`login`.`sex`,\r\n\t\t\t`guild`.`name` AS `gname`, `guild`.`guild_id`, `guild`.`emblem_data`,\r\n\t\t\t`char_bg`.*\r\n\t\tFROM\r\n\t\t\t`char` JOIN `char_bg` ON `char_bg`.`char_id` = `char`.`char_id` JOIN `login` ON `login`.`account_id` = `char`.`account_id` LEFT JOIN `guild` ON `guild`.`guild_id` = `char`.`guild_id`\r\n\t\tWHERE\r\n\t\t\t`char_bg`.`char_id` > '0' AND `login`.`level` < '1' AND `login`.`state` = '0' AND `char`.`char_id` = '%d'\r\n\t", $char_id);
$result = $mysql->query($query, $CONFIG['DBMain']);
if (!($data = $mysql->fetcharray($result))) {
    // Profile not found
    header("HTTP/1.1 301 Moved Permanently");
    header("Status: 301 Moved Permanently");
    header("Location: http://members.chronos-ro.com");
    exit(0);
}
$jobs = readjobs();
$skills = readskills();
$Rank = array("Civilian", "Private", "Corporal", "Sergeant", "Master Sergeant", "Sergeant Major", "Knight", "Knight Lieutenant", "Knight Captain", "Knight Champion", "Lieutenant Commander", "Commander", "Marshal", "Field Marshal", "Grand Marshal");
function calc_rank($score)
{
    $result = intval($score / 270);
    if ($result > 14) {
        $result = 14;
    } else {
        if ($result < 0) {
            $result = 0;
        }
    }
    return $result;
}
$post = calc_rank($data['score']);
Exemplo n.º 3
0
include_once 'classes2.php';
include "class.phpmailer.php";
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;