Location: PHPKode > projects > Skrupel User Game Administration > welcome.php
<?php
define("INSTALL_DIR",dirname(__FILE__));
include (INSTALL_DIR."/include/conf.inc.php");
set_template($sugaurl,"",dirname(__FILE__),$serverurl);

$template->assign_vars(array('page_title'=> 'SUGA - Welcome',));

include ($sugapath."/include/header.inc.php");
include ($sugapath."/include/usercheck.inc.php");
include ($sugapath."/include/charts.inc.php");

if ($_GET["fu"] == 1)
{
        set_template($sugaurl,"",dirname(__FILE__),$serverurl);
        
        if ($userlogin == 1){
	    $name = $login_usernick;
	}
	else{
 	    $name = $anrede;
        }
        
        $template->assign_vars(array('page_title'=> 'SUGA - Welcome',
                                     'name' => $name));
 
        //wins "block" -- needs translation
        $wins_who = get_gamecharts("siege",1);
        $wins_amount = get_gamecharts("siege",2);
        if($wins_amount != 1){
                $wins_what = "Siege";
        }
        else{
                $wins_what = "Sieg";
        }
        $template->assign_block_vars('statistic_wins',array('who' => $wins_who,
                                                            'amount' => $wins_amount,
                                                            'what' => $wins_what));
        
        //activity
        $act_who = get_gamecharts("aktiv",1);
        $act_amount = get_gamecharts("aktiv",2);
        if($act_amount != 1){
                $act_what = "Teilnahmen";
        }
        else{
                $act_what = "Teilnahme";
        }
        $act_month = get_gamecharts("aktiv",3);
        if($act_month != 1){
                $act_month_what = "Runden";
        }
        else{
                $act_month_what = "Runde";
        }
        
        $template->assign_block_vars('statistic_activity',array('who' => $act_who,
                                                            'amount' => $act_amount,
                                                            'what' => $act_what,
                                                            'months' => $act_month,
                                                            'months_what' => $act_month_what));
        
        //played games .. obsolete? .. 
        
        //battles
        $bat_who = get_gamecharts("schlachten",1);
        $bat_amount = get_gamecharts("schlachten",2);
        if($bat_amount != 1){
                $bat_what = "Schlachten";
        }
        else{
                $bat_what = "Schlacht";
        }
        $batwon_who = get_gamecharts("schlachten_siege",1);
        $batwon_amount = get_gamecharts("schlachten_siege",2);
        if($batwon_amount != 1){
                $batwon_what = "Schlachten";
        }
        else{
                $batwon_what = "Schlacht";
        }
        
        $template->assign_block_vars('statistic_battles',array('who' => $bat_who,
                                                            'amount' => $bat_amount,
                                                            'what' => $bat_what,
                                                            'won_who' => $batwon_who,
                                                            'won_amount' => $batwon_amount,
                                                            'won_what' => $batwon_what));
        
        //travelling
        $tra_who = get_gamecharts("lichtjahre",1);
        $tra_amount = get_gamecharts("lichtjahre",2);
        if($tra_amount != 1){
                $tra_what = "Lichtjahren";
        }
        else{
                $tra_what = "Lichtjahr";
        }
        $trakol_who = get_gamecharts("kolonien",1);
        $trakol_amount = get_gamecharts("kolonien",2);
        if($trakol_amount != 1){
                $trakol_what = "Kolonien";
        }
        else{
                $trakol_what = "Kolonie";
        }
        
        $template->assign_block_vars('statistic_travel',array('who' => $tra_who,
                                                            'amount' => $tra_amount,
                                                            'what' => $tra_what,
                                                            'kol_who' => $trakol_who,
                                                            'kol_amount' => $trakol_amount,
                                                            'kol_what' => $trakol_what));
        get_players_dates(1);
        
        $header = new EasyTemplate ("$usedpfath/templates/usedheader.tpl");
        $footer = new EasyTemplate ("$usedpfath/templates/usedfooter.tpl");
        $header -> assign("TITLE","Skrupel - UsedComm");
        $header -> assign("URL",$usedurl);
        $header -> easy_print();
}
$template->pparse('xhtmlhead');
$template->pparse('sugawelcome');
?>


Return current item: Skrupel User Game Administration