2012-05-14 18:24:58 +00:00
|
|
|
<?php
|
|
|
|
|
2012-05-27 19:08:28 +00:00
|
|
|
error_reporting(E_ALL ^ E_NOTICE);
|
|
|
|
ini_set("display_errors","1");
|
|
|
|
|
2012-05-14 18:24:58 +00:00
|
|
|
define('APP_NAME', 'app_achievements');
|
|
|
|
|
2012-06-21 18:55:52 +00:00
|
|
|
require_once('../webig/config.php');
|
|
|
|
include_once('../webig/lang.php');
|
2012-05-14 18:24:58 +00:00
|
|
|
include_once('lang.php');
|
2012-05-25 09:48:56 +00:00
|
|
|
require_once('conf.php');
|
2012-05-14 18:24:58 +00:00
|
|
|
|
|
|
|
// Ask to authenticate user (using ingame or session method) and fill $user with all information
|
2012-05-27 19:08:28 +00:00
|
|
|
ryzom_app_authenticate($user, false);
|
2012-05-14 18:24:58 +00:00
|
|
|
|
2012-06-03 13:04:04 +00:00
|
|
|
$user = array();
|
|
|
|
$user['id'] = 1;
|
|
|
|
$user['lang'] = 'en';
|
|
|
|
$user['name'] = 'Talvela';
|
|
|
|
$user['race'] = "r_matis";
|
|
|
|
$user['civilization'] = "c_neutral";
|
|
|
|
$user['cult'] = "c_neutral";
|
2012-06-21 18:55:52 +00:00
|
|
|
$user['ig'] = ($_REQUEST['ig']==1);
|
2012-07-01 18:04:01 +00:00
|
|
|
#$user['ig'] = true;
|
2012-06-03 13:04:04 +00:00
|
|
|
|
2012-05-31 13:15:36 +00:00
|
|
|
require_once("class/RyzomUser_class.php");
|
|
|
|
$_USER = new RyzomUser($user);
|
|
|
|
|
|
|
|
if($_USER->isIG()) {
|
2012-05-25 09:48:56 +00:00
|
|
|
require_once("include/ach_render_ig.php");
|
2012-05-14 18:24:58 +00:00
|
|
|
}
|
|
|
|
else {
|
2012-05-25 09:48:56 +00:00
|
|
|
require_once("include/ach_render_web.php");
|
2012-05-14 18:24:58 +00:00
|
|
|
}
|
2012-05-25 09:48:56 +00:00
|
|
|
require_once("include/ach_render_common.php");
|
|
|
|
|
2012-07-08 16:11:25 +00:00
|
|
|
require_once("class/DLL_class.php");
|
|
|
|
require_once("class/InDev_trait.php");
|
|
|
|
require_once("class/Node_abstract.php");
|
2012-07-01 18:04:01 +00:00
|
|
|
require_once("class/AVLTree_class.php");
|
2012-06-24 10:44:24 +00:00
|
|
|
require_once("class/Parentum_abstract.php");
|
2012-05-31 13:15:36 +00:00
|
|
|
require_once("class/AchList_abstract.php");
|
2012-06-03 21:03:33 +00:00
|
|
|
require_once("class/Tieable_inter.php");
|
2012-06-25 13:03:14 +00:00
|
|
|
require_once("class/NodeIterator_class.php");
|
2012-07-08 16:11:25 +00:00
|
|
|
|
2012-05-27 19:08:28 +00:00
|
|
|
|
2012-05-31 13:15:36 +00:00
|
|
|
require_once("class/AchMenu_class.php");
|
2012-06-24 10:44:24 +00:00
|
|
|
require_once("class/AchMenuNode_class.php");
|
2012-05-31 13:15:36 +00:00
|
|
|
require_once("class/AchSummary_class.php");
|
|
|
|
require_once("class/AchCategory_class.php");
|
|
|
|
require_once("class/AchAchievement_class.php");
|
|
|
|
require_once("class/AchPerk_class.php");
|
|
|
|
require_once("class/AchObjective_class.php");
|
2012-05-27 19:08:28 +00:00
|
|
|
|
2012-05-14 18:24:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Update user acces on Db
|
2012-07-01 18:04:01 +00:00
|
|
|
$DBc = ryDB::getInstance(APP_NAME);
|
|
|
|
#$DBc = ryDB::getInstance("ahufler");
|
2012-05-14 18:24:58 +00:00
|
|
|
|
2012-05-25 09:48:56 +00:00
|
|
|
|
2012-06-21 20:03:36 +00:00
|
|
|
if(!$_USER->isIG && $_CONF['enable_webig'] == false) {
|
|
|
|
$c = ach_render_forbidden(false);
|
|
|
|
}
|
|
|
|
elseif($_USER->isIG && $_CONF['enable_offgame'] == false) {
|
|
|
|
$c = ach_render_forbidden(true);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$c = ach_render();
|
|
|
|
}
|
2012-05-25 09:48:56 +00:00
|
|
|
|
2012-05-14 18:24:58 +00:00
|
|
|
|
2012-06-21 20:03:36 +00:00
|
|
|
echo ryzom_app_render("achievements", $c, $_USER->isIG());
|
2012-05-14 18:24:58 +00:00
|
|
|
|
|
|
|
?>
|