function ryzom_auth_user($ask_login = true, $welcome_message = '') { global $user, $_USER; $result = ryzom_app_authenticate($user, $ask_login, $welcome_message, true); $_USER = new RyUser($user); return $result; }
<?php $microstart = explode(' ', microtime()); $start_time = $microstart[0] + $microstart[1]; error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", "1"); define('APP_NAME', 'app_achievements_admin'); require_once '../config.php'; include_once '../lang.php'; include_once 'lang.php'; require_once 'conf.php'; // Ask to authenticate user (using ingame or session method) and fill $user with all information ryzom_app_authenticate($user, true); #echo var_export($user,true); /*$user = array(); $user['id'] = 1; $user['lang'] = 'en'; $user['name'] = 'Talvela'; $user['race'] = "r_matis"; $user['civilization'] = "c_neutral"; $user['cult'] = "c_neutral"; $user['admin'] = true;*/ require_once $_CONF['app_achievements_path'] . "class/RyzomUser_class.php"; require_once "class/RyzomAdmin_class.php"; $_ADMIN = new RyzomAdmin($user); if ($_ADMIN->isIG()) { die("IG disabled for admin tool!"); } require_once "class/mySQL_class.php"; require_once $_CONF['app_achievements_path'] . "include/ach_render_common.php"; require_once $_CONF['app_achievements_path'] . "class/DLL_class.php";
<?php include_once 'config.php'; include_once 'lang.php'; // List of apps $apps = array('app_test'); $c = ''; // Ask to authenticate user (using ingame or session method) and fill $user with all information $logged = ryzom_app_authenticate($user, false); if ($logged) { $c .= '<h1>' . _t('welcome', $user['char_name']) . '</h1>'; } else { if (!$user['ig']) { if ($user['message']) { $c .= '<div style="text-align: center"><strong style="color: #FF5555">' . _t($user['message']) . '</strong></div><br />'; } $c .= ryzom_render_login_form(ryzom_get_param('name')); } } foreach ($apps as $app) { $c .= '<a href="' . RYAPP_URL . '/' . $app . '/index.php"><img src="' . RYAPP_URL . '/' . $app . '/favicon.png" />' . _t($app) . '</a><br />'; } if ($logged && !$user['ig']) { $c .= '<br /><a href="' . RYAPP_URL . '/index.php?action=logout">' . _t('logout') . '</a>'; } // Print GET values on debug view p($_GET); echo ryzom_app_render('Ryzom', $c, $user['ig']);