Merge branch 'fixes' into main/rendor-staging
[ryzomcore.git] / web / public_php / app / index.php
blob86223a42fc16772334788ef9c101ce7c71c483f7
1 <?php
3 include_once('config.php');
4 include_once('lang.php');
6 // List of apps
7 $apps = array(
8 'app_test',
9 );
11 $c = '';
13 // Ask to authenticate user (using ingame or session method) and fill $user with all information
14 $logged = ryzom_app_authenticate($user, false);
15 if ($logged) {
16 $c .= '<h1>'._t('welcome', $user['char_name']).'</h1>';
17 } else {
18 if (!$user['ig']) {
19 if ($user['message'])
20 $c .= '<div style="text-align: center"><strong style="color: #FF5555">'._t($user['message']).'</strong></div><br />';
21 $c .= ryzom_render_login_form(ryzom_get_param('name'));
25 foreach ($apps as $app) {
26 $c .= '<a href="'.RYAPP_URL.'/'.$app.'/index.php"><img src="'.RYAPP_URL.'/'.$app.'/favicon.png" />'._t($app).'</a><br />';
29 if ($logged && !$user['ig'])
30 $c .= '<br /><a href="'.RYAPP_URL.'/index.php?action=logout">'._t('logout').'</a>';
32 // Print GET values on debug view
33 p($_GET);
34 echo ryzom_app_render('Ryzom', $c, $user['ig']);