Witam,
Mam tfs 0.3.6 i gesior aac v 0.3.8. Gdy chce podejrzeć jakąś postać to wyskakuje mi taki błąd:
Nie ma znaczenia czy chce ze strony głownej, highscores czy search character. Jakieś pomysły? Inne strony działają bez problemów.
Dodam, że jak instaluje gesior aac v1 to takiego bledu nie ma jednak wolalbym miec ta wersje.
Prosze mi nie pisac zebym zmienil na xamppa xxx bo to nic nie da, mam uniformserver i jest dobrze.
Może się przyda:
index.php
charinfo.php
characters.php
Mam tfs 0.3.6 i gesior aac v 0.3.8. Gdy chce podejrzeć jakąś postać to wyskakuje mi taki błąd:
Nie ma znaczenia czy chce ze strony głownej, highscores czy search character. Jakieś pomysły? Inne strony działają bez problemów.
Dodam, że jak instaluje gesior aac v1 to takiego bledu nie ma jednak wolalbym miec ta wersje.
Prosze mi nie pisac zebym zmienil na xamppa xxx bo to nic nie da, mam uniformserver i jest dobrze.
Może się przyda:
index.php
PHP:
<?PHP
//start :)
//phpinfo();
//exit;
session_start();
ob_start("ob_gzhandler");
//require('./exaBD.php');
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
//##### CONFIG #####
include('config-and-functions.php');
$action = $_REQUEST['action'];
//##### LOGOUT #####
if($action == "logout") {
unset($_SESSION['account']);
unset($_SESSION['password']);
}
//##### LOGIN #####
//check is player logged
$logged = FALSE;
if(isset($_SESSION['account'])) {
$account_logged = $ots->createObject('Account');
$account_logged->load($_SESSION['account']);
if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) {
$logged = TRUE;
$group_id_of_acc_logged = $account_logged->getPageAccess();
}
else
{
$logged = FALSE;
unset($_SESSION['account']);
unset($account_logged);
}
}
//login with data from form
$login_account = strtoupper($_POST['account_login']);
$login_password = trim($_POST['password_login']);
if(!$logged && !empty($login_account) && !empty($login_password))
{
$login_password = password_ency($login_password);
$account_logged = $ots->createObject('Account');
$account_logged->find($login_account);
if($account_logged->isLoaded())
{
if($login_password == $account_logged->getPassword())
{
$_SESSION['account'] = $account_logged->getId();
$_SESSION['password'] = $login_password;
$logged = TRUE;
$account_logged->setCustomField("page_lastday", time());
$group_id_of_acc_logged = $account_logged->getPageAccess();
} else
$logged = FALSE;
}
}
//#### LOAD PAGE ##########
//load subtopic page
if(empty($_REQUEST['subtopic'])) {
$_REQUEST['subtopic'] = "latestnews";
$subtopic = "latestnews";
}
switch($_REQUEST['subtopic']) {
case "info":
$topic = "Informacje";
$subtopic = "info";
include("info.php");
break;
case "latestnews":
$topic = "Latest News";
$subtopic = "latestnews";
include("latestnews.php");
break;
case "creatures";
$topic = "Creatures";
$subtopic = "creatures";
include("creatures.php");
break;
case "auction";
$topic = "Auction";
$subtopic = "auction";
include("auctionsystem.php");
break;
case "bans";
$topic = "Bans";
$subtopic = "bans";
include("bans.php");
break;
case "wars";
$topic = "Wars";
$subtopic = "wars";
include("wars.php");
break;
case "changelog";
$topic = "Changelogs";
$subtopic = "changelog";
include("changelog.php");
break;
case "onlinetime";
$topic = "Onlinetime";
$subtopic = "onlinetime";
include("onlinetime.php");
break;
case "spells";
$topic = "Spells";
$subtopic = "spells";
include("spells.php");
break;
case "experiencetable";
$topic = "Experience Table";
$subtopic = "experiencetable";
include("experiencetable.php");
break;
case "characters";
$topic = "Characters";
$subtopic = "characters";
include("characters.php");
break;
case "whoisonline";
$topic = "Who is online?";
$subtopic = "whoisonline";
include("whoisonline.php");
break;
case "highscores";
$topic = "Highscores";
$subtopic = "highscores";
include("highscores.php");
break;
case "killstatistics";
$topic = "Last Kills";
$subtopic = "killstatistics";
include("killstatistics.php");
break;
case "houses";
$topic = "Houses";
$subtopic = "houses";
include("houses.php");
break;
case "guilds";
$topic = "Guilds";
$subtopic = "guilds";
include("guilds.php");
break;
case "accountmanagement";
$topic = "Account Management";
$subtopic = "accountmanagement";
include("accountmanagement.php");
break;
case "createaccount";
$topic = "Create Account";
$subtopic = "createaccount";
include("createaccount.php");
break;
case "lostaccount";
$topic = "Lost Account Interface";
$subtopic = "lostaccount";
include("lostaccount.php");
break;
case "tibiarules";
$topic = "Server Rules";
$subtopic = "tibiarules";
include("tibiarules.php");
break;
case "adminpanel":
$topic = "Admin Panel";
$subtopic = "adminpanel";
include("adminpanel.php");
break;
case "forum":
$topic = "Forum";
$subtopic = "forum";
include("forum.php");
break;
case "team";
$subtopic = "team";
$topic = "Gamemasters List";
include("team.php");
break;
case "bounty-hunters";
$subtopic = "bounty-hunters";
$topic = "Bounty Hunters";
include("bounty-hunters.php");
break;
case "exphist";
$subtopic = "exphist";
$topic = "Powergamers";
include("exphist.php");
break;
case "downloads";
$subtopic = "downloads";
$topic = "Downloads";
include("downloads.php");
break;
case "serverinfo";
$subtopic = "serverinfo";
$topic = "Server Info";
include("serverinfo.php");
break;
case "shopsystem";
$subtopic = "shopsystem";
$topic = "Shop System";
include("shopsystem.php");
break;
case "buypoints";
$subtopic = "buypoints";
$topic = "Buy Points";
include("buypoints.php");
break;
case "gallery";
$subtopic = "gallery";
$topic = "Gallery";
include("gallery.php");
break;
case "namelock";
$subtopic = "namelock";
$topic = "Namelock Manager";
include("namelocks.php");
break;
case "archive";
$subtopic = "archive";
$topic = "News Archives";
include("archive.php");
break;
case "mail";
$subtopic = "mail";
$topic = "Mass emails sender";
include("mail.php");
break;
case "shopadmin";
$subtopic = "shopadmin";
$topic = "Shop Admin";
include("shopadmin.php");
break;
case "records";
$subtopic = "records";
$topic = "Players Online Records";
include("records.php");
break;
case "paypal";
$subtopic = "paypal";
$topic = "PayPal";
include("paypal.php");
break;
}
//generate title of page
if(empty($topic)) {
$title = $GLOBALS['config']['server']["serverName"]." - OTS";
$main_content .= 'Invalid subtopic. Can\'t load page.';
}
else
{
$title = $GLOBALS['config']['server']["serverName"]." - ".$topic;
}
//#####LAYOUT#####
$layout_header = '<script type=\'text/javascript\'>
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
function MouseOverBigButton(source)
{
source.firstChild.style.visibility = "visible";
}
function MouseOutBigButton(source)
{
source.firstChild.style.visibility = "hidden";
}
function BigButtonAction(path)
{
window.location = path;
}
var';
if($logged) { $layout_header .= "loginStatus=1; loginStatus='true';"; } else { $layout_header .= "loginStatus=0; loginStatus='false';"; };
$layout_header .= "var activeSubmenuItem='".$subtopic."'; var IMAGES=0; IMAGES='".$config['server']['url']."/".$layout_name."/images'; var LINK_ACCOUNT=0; LINK_ACCOUNT='".$config['server']['url']."';</script>";
include($layout_name."/layout.php");
ob_end_flush();
?>
charinfo.php
PHP:
<?php
//include charts.php to access the SendChartData function
include("config-and-functions.php");
include("charts.php");
if($_REQUEST['type'] == "exp")
{
$chart[ 'axis_category' ] = array ( 'size'=>11, 'color'=>"#FFFFFF", 'alpha'=>100, 'font'=>"arial", 'bold'=>true, 'skip'=>1 ,'orientation'=>"diagonal_up" );
$chart[ 'axis_ticks' ] = array ( 'value_ticks'=>true, 'category_ticks'=>true );
$chart[ 'axis_value' ] = array ( 'alpha'=>90, 'orientation'=>"horizontal" );
$chart[ 'chart_border' ] = array ( 'top_thickness'=>0, 'bottom_thickness'=>3, 'left_thickness'=>3, 'right_thickness'=>0 );
$chart[ 'chart_grid_h' ] = array ( 'thickness'=>2, 'color'=>"#FFFFFF", 'alpha'=>60 );
$chart[ 'chart_grid_v' ] = array ( 'thickness'=>2, 'color'=>"#FFFFFF", 'alpha'=>60 );
$chart[ 'chart_rect' ] = array ( 'x'=>65, 'y'=>5, 'width'=>450, 'height'=>200, 'positive_alpha'=>20 );
$chart[ 'chart_pref' ] = array ( 'rotation_x'=>10, 'rotation_y'=>15 );
$chart[ 'chart_type' ] = "parallel 3d column" ;
$chart[ 'chart_value' ] = array ( 'color'=>"FFFF00", 'alpha'=>100, 'size'=>14, 'position'=>"cursor" );
$chart[ 'legend_label' ] = array ( 'layout'=>"horizontal", 'font'=>"arial", 'bold'=>true, 'size'=>12, 'color'=>"#FFFFFF", 'alpha'=>90 );
$chart[ 'legend_rect' ] = array ( 'x'=>25, 'y'=>250, 'width'=>350, 'height'=>50, 'margin'=>20, 'fill_color'=>"#FFFFFF", 'fill_alpha'=>7, 'line_color'=>"#FFFFFF", 'line_alpha'=>0, 'line_thickness'=>0 );
$chart[ 'series_color' ] = array ("00FF00" );
$chart[ 'series_gap' ] = array ( 'bar_gap'=>50, 'set_gap'=>50) ;
$player = new OTS_Player();
$player->load($_REQUEST['guid']);
if($player->isLoaded())
{
$player_exp[0] = (int) $player->getExperience();
$player_exp[1] = (int) $player->getCustomField("exphist_lastexp");
$player_exp[2] = (int) $player_exp[1] - $player->getCustomField("exphist1");
$player_exp[3] = (int) $player_exp[2] - $player->getCustomField("exphist2");
$player_exp[4] = (int) $player_exp[3] - $player->getCustomField("exphist3");
$player_exp[5] = (int) $player_exp[4] - $player->getCustomField("exphist4");
$player_exp[6] = (int) $player_exp[5] - $player->getCustomField("exphist5");
$player_exp[7] = (int) $player_exp[6] - $player->getCustomField("exphist6");
$chart [ 'chart_data' ] = array ( array ( "", "7 dni temu", "","6 dni temu", "", "5 dni temu", "", "4 dni temu", "", "3 dni temu", "", "2 dni temu", "", "1 dni temu", "", "Dzisiaj"),
array ( "Experience danego dnia", $player_exp[7],"",$player_exp[6], "",$player_exp[5], "",$player_exp[4], "",$player_exp[3], "", $player_exp[2], "", $player_exp[1], "", $player_exp[0]));
}
}
elseif($_REQUEST['type'] == "online")
{
$chart[ 'axis_category' ] = array ( 'size'=>11, 'color'=>"b1b0b0", 'alpha'=>100, 'font'=>"arial", 'bold'=>true, 'skip'=>1 ,'orientation'=>"diagonal_up" );
$chart[ 'axis_ticks' ] = array ( 'value_ticks'=>true, 'category_ticks'=>true );
$chart[ 'axis_value' ] = array ( 'alpha'=>90, 'orientation'=>"horizontal" );
$chart[ 'chart_border' ] = array ( 'top_thickness'=>0, 'bottom_thickness'=>3, 'left_thickness'=>3, 'right_thickness'=>0 );
$chart[ 'chart_grid_h' ] = array ( 'thickness'=>2, 'color'=>"0c1c32", 'alpha'=>100 );
$chart[ 'chart_grid_v' ] = array ( 'thickness'=>2, 'color'=>"0c1c32", 'alpha'=>100 );
$chart[ 'chart_rect' ] = array ( 'x'=>65, 'y'=>5, 'width'=>445, 'height'=>200, 'positive_alpha'=>20 );
$chart[ 'chart_pref' ] = array ( 'rotation_x'=>10, 'rotation_y'=>15 );
$chart[ 'chart_type' ] = "parallel 3d column" ;
$chart[ 'chart_value' ] = array ( 'color'=>"b1b0b0", 'alpha'=>100, 'size'=>14, 'position'=>"cursor" );
$chart[ 'legend_label' ] = array ( 'layout'=>"horizontal", 'font'=>"arial", 'bold'=>true, 'size'=>12, 'color'=>"FFFFFF", 'alpha'=>90 );
$chart[ 'legend_rect' ] = array ( 'x'=>0, 'y'=>250, 'width'=>250, 'height'=>30, 'margin'=>0, 'fill_color'=>"0c1c32", 'fill_alpha'=>90, 'line_color'=>"6ecb00", 'line_alpha'=>0, 'line_thickness'=>0 );
$chart[ 'series_color' ] = array ("258db3" );
$chart[ 'series_gap' ] = array ( 'bar_gap'=>50, 'set_gap'=>50) ;
$player = new OTS_Player();
$player->load($_REQUEST['guid']);
if($player->isLoaded())
{
$player_exp[0] = bcdiv($player->getCustomField("onlinetimetoday"), 3600, 2);
$player_exp[1] = bcdiv($player->getCustomField("onlinetime1"), 3600, 2);
$player_exp[2] = bcdiv($player->getCustomField("onlinetime2"), 3600, 2);
$player_exp[3] = bcdiv($player->getCustomField("onlinetime3"), 3600, 2);
$player_exp[4] = bcdiv($player->getCustomField("onlinetime4"), 3600, 2);
$player_exp[5] = bcdiv($player->getCustomField("onlinetime5"), 3600, 2);
$player_exp[6] = bcdiv($player->getCustomField("onlinetime6"), 3600, 2);
$player_exp[7] = bcdiv($player->getCustomField("onlinetime7"), 3600, 2);
$chart [ 'chart_data' ] = array ( array ( "", "7 dni temu", "","6 dni temu", "", "5 dni temu", "", "4 dni temu", "", "3 dni temu", "", "2 dni temu", "", "Wczoraj", "", "Dzisiaj"),
array ( "Godzin Online danego dnia", $player_exp[7],"",$player_exp[6], "",$player_exp[5], "",$player_exp[4], "",$player_exp[3], "", $player_exp[2], "", $player_exp[1], "", $player_exp[0]));
}
}
elseif($_REQUEST['type'] == "expgain")
{
$chart[ 'axis_category' ] = array ( 'size'=>11, 'color'=>"b1b0b0", 'alpha'=>100, 'font'=>"arial", 'bold'=>true, 'skip'=>1 ,'orientation'=>"diagonal_up" );
$chart[ 'axis_ticks' ] = array ( 'value_ticks'=>true, 'category_ticks'=>true );
$chart[ 'axis_value' ] = array ( 'alpha'=>90, 'orientation'=>"horizontal" );
$chart[ 'chart_border' ] = array ( 'top_thickness'=>0, 'bottom_thickness'=>3, 'left_thickness'=>3, 'right_thickness'=>0 );
$chart[ 'chart_grid_h' ] = array ( 'thickness'=>2, 'color'=>"0c1c32", 'alpha'=>100 );
$chart[ 'chart_grid_v' ] = array ( 'thickness'=>2, 'color'=>"0c1c32", 'alpha'=>100 );
$chart[ 'chart_rect' ] = array ( 'x'=>65, 'y'=>5, 'width'=>445, 'height'=>200, 'positive_alpha'=>20 );
$chart[ 'chart_pref' ] = array ( 'rotation_x'=>10, 'rotation_y'=>15 );
$chart[ 'chart_type' ] = "parallel 3d column" ;
$chart[ 'chart_value' ] = array ( 'color'=>"00FF00", 'alpha'=>100, 'size'=>14, 'position'=>"cursor" );
$chart[ 'legend_label' ] = array ( 'layout'=>"horizontal", 'font'=>"arial", 'bold'=>true, 'size'=>12, 'color'=>"FFFFFF", 'alpha'=>90 );
$chart[ 'legend_rect' ] = array ( 'x'=>0, 'y'=>250, 'width'=>250, 'height'=>30, 'margin'=>0, 'fill_color'=>"0c1c32", 'fill_alpha'=>90, 'line_color'=>"6ecb00", 'line_alpha'=>0, 'line_thickness'=>0 );
$chart[ 'series_color' ] = array ("7cbab8" );
$chart[ 'series_gap' ] = array ( 'bar_gap'=>50, 'set_gap'=>50) ;
$player = new OTS_Player();
$player->load($_REQUEST['guid']);
{
$player_exp[0] = (int) $player->getExperience() - $player->getCustomField("exphist_lastexp");
$player_exp[1] = (int) $player->getCustomField("exphist1");
$player_exp[2] = (int) $player->getCustomField("exphist2");
$player_exp[3] = (int) $player->getCustomField("exphist3");
$player_exp[4] = (int) $player->getCustomField("exphist4");
$player_exp[5] = (int) $player->getCustomField("exphist5");
$player_exp[6] = (int) $player->getCustomField("exphist6");
$player_exp[7] = (int) $player->getCustomField("exphist7");
$chart [ 'chart_data' ] = array ( array ( "", "7 dni temu", "","6 dni temu", "", "5 dni temu", "", "4 dni temu", "", "3 dni temu", "", "2 dni temu", "", "Wczoraj", "", "Dzisiaj"),
array ( "Doswiadczenie zdobyte danego dnia", $player_exp[7],"",$player_exp[6], "",$player_exp[5], "",$player_exp[4], "",$player_exp[3], "", $player_exp[2], "", $player_exp[1], "", $player_exp[0]));
}
}
SendChartData ($chart);
?>
characters.php