2012-05-14 18:24:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
define('APP_NAME', 'app_achievements');
|
|
|
|
|
2012-05-25 09:48:56 +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
|
|
|
|
ryzom_app_authenticate($user, true);
|
|
|
|
|
|
|
|
if($user['ig']) {
|
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");
|
|
|
|
|
|
|
|
require_once("include/AchMenu_class.php");
|
|
|
|
require_once("include/AchSummary_class.php");
|
|
|
|
require_once("include/AchCategory_class.php");
|
|
|
|
require_once("include/AchCommon_class.php");
|
2012-05-14 18:24:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Update user acces on Db
|
2012-05-25 09:48:56 +00:00
|
|
|
$db = ryDB::getInstance(APP_NAME);
|
|
|
|
/*$db->setDbDefs('test', array('id' => SQL_DEF_INT, 'num_access' => SQL_DEF_INT));
|
2012-05-14 18:24:58 +00:00
|
|
|
|
|
|
|
$num_access = $db->querySingleAssoc('test', array('id' => $user['id']));
|
|
|
|
if ($num_access)
|
|
|
|
$db->update('test', array('num_access' => ++$num_access['num_access']), array('id' => $user['id']));
|
|
|
|
else
|
|
|
|
$db->insert('test', array('num_access' => $num_access['num_access']=1, 'id' => $user['id']));
|
|
|
|
|
|
|
|
// Content
|
|
|
|
$c = _t('access', $num_access['num_access']).'<br/>';*/
|
|
|
|
|
2012-05-25 09:48:56 +00:00
|
|
|
$c = var_export($user,true);
|
|
|
|
|
|
|
|
$c .= "<center><table>
|
2012-05-14 18:24:58 +00:00
|
|
|
<tr>
|
2012-05-25 09:48:56 +00:00
|
|
|
<td valign='top'>";
|
|
|
|
|
|
|
|
$menu = new AchMenu($_REQUEST['mid'],$user['lang']);
|
|
|
|
|
|
|
|
$c .= ach_render_menu($menu);
|
|
|
|
|
|
|
|
$c .= "</td>
|
2012-05-14 18:24:58 +00:00
|
|
|
<td width='645px'>";
|
|
|
|
|
2012-05-25 09:48:56 +00:00
|
|
|
/*for($i=0;$i<15;$i++) {
|
2012-05-14 18:24:58 +00:00
|
|
|
$c .= ach_render_box_done("Bejeweled");
|
2012-05-25 09:48:56 +00:00
|
|
|
}*/
|
|
|
|
|
|
|
|
if($menu->isSelected()) {
|
|
|
|
$cat = new AchCategory($menu->getCat(),$user['lang']);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$cat = new AchSummary(12,$user['lang']);
|
2012-05-14 18:24:58 +00:00
|
|
|
}
|
|
|
|
|
2012-05-25 09:48:56 +00:00
|
|
|
$c .= ach_render_category($cat);
|
|
|
|
|
2012-05-14 18:24:58 +00:00
|
|
|
$c .= "</td>
|
|
|
|
</tr>
|
|
|
|
</table></center>";
|
|
|
|
|
|
|
|
echo ryzom_app_render("achievements", $c, $user['ig']);
|
|
|
|
|
|
|
|
?>
|