Skip to content

Commit

Permalink
[IMPROVEMENT][#264] part of the username generator
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasKovacs committed Oct 25, 2020
1 parent 09f543e commit f08265b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/upload/application/language/english/game/menu_lang.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
$lang = [
'lm_players' => 'Player:',
'lm_overview' => 'Overview',
'lm_galaxy' => 'Galaxy',
'lm_empire' => 'Empire',
Expand Down
1 change: 1 addition & 0 deletions src/upload/application/language/spanish/game/menu_lang.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
$lang = [
'lm_players' => 'Jugadores:',
'lm_overview' => 'Resumen',
'lm_galaxy' => 'Galaxia',
'lm_empire' => 'Imperio',
Expand Down
11 changes: 7 additions & 4 deletions src/upload/application/libraries/TemplateLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use application\core\enumerators\PlanetTypesEnumerator;
use application\core\Language;
use application\core\Template;
use application\helpers\UrlHelper;
use application\libraries\FormatLib;
use application\libraries\FunctionsLib;
use application\libraries\OfficiersLib;
Expand Down Expand Up @@ -574,7 +575,6 @@ private function gameMenu()
$tota_rank = $this->current_user['user_statistic_total_rank'] == '' ?
$this->current_planet['stats_users'] : $this->current_user['user_statistic_total_rank'];
$pages = [
['changelog', SYSTEM_VERSION, '', 'FFF', '', '0', '0'],
['overview', $lang->line('lm_overview'), '', 'FFF', '', '1', '1'],
['empire', $lang->line('lm_empire'), '', 'FFF', '', '1', '2'],
['resources', $lang->line('lm_resources'), '', 'FFF', '', '1', '3'],
Expand Down Expand Up @@ -666,15 +666,18 @@ private function gameMenu()

// PARSE THE MENU AND OTHER DATA
$parse['dpath'] = DPATH;
$parse['version'] = SYSTEM_VERSION;
$parse['servername'] = FunctionsLib::readConfig('game_name');
$parse['year'] = $this->current_year;
$parse['lm_players'] = $lang->line('lm_players');
$parse['user_name'] = UrlHelper::setUrl('game.php?page=preferences', $this->current_user['user_name']);
$parse['menu_block1'] = $menu_block1;
$parse['menu_block2'] = $menu_block2;
$parse['menu_block3'] = $menu_block3;
$parse['admin_link'] = (($this->current_user['user_authlevel'] > 0) ?
"<tr><td><div align=\"center\"><a href=\"admin.php\" target=\"_blank\">
<font color=\"lime\">" . $lang->line('lm_administration') . "</font></a></div></td></tr>" : "");
$parse['servername'] = FunctionsLib::readConfig('game_name');
$parse['changelog'] = UrlHelper::setUrl('game.php?page=changelog', SYSTEM_VERSION);
$parse['version'] = SYSTEM_VERSION;
$parse['year'] = $this->current_year;

return $this->template->set(
'general/left_menu_view',
Expand Down
28 changes: 20 additions & 8 deletions src/upload/application/views/general/left_menu_view.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div id='leftmenu'>
<div id="leftmenu">
<script language="JavaScript">
function f(target_url, win_name) {
var new_win = window.open(target_url, win_name, 'resizable=yes,scrollbars=yes,menubar=no,toolbar=no,width=550,height=280,top=0,left=0');
new_win.focus();
}
</script>
<center>
<div id='menu'>
<div id="menu">
<p style="width:110px;">
<NOBR>
{servername} {changelog}
{lm_players} <strong>{user_name}</strong>
</NOBR>
</p>
<table width="110" cellspacing="0" cellpadding="0">
Expand All @@ -34,15 +34,27 @@ function f(target_url, win_name) {
{admin_link}
<tr>
<td>
<div align="center">
<font color="#FFFFFF">
<a href="#" title="Powered by XG Proyect {version} &copy; 2008 - {year} GNU General Public License">&copy; 2008 - {year}</a>
</font>
<img src="{dpath}menu/info-help.jpg" width="110" height="19">
</td>
</tr>
<tr>
<td>
<div style="text-align:center">
{servername} ({changelog})
</div>
</td>
</tr>
<tr>
<td>
<div style="text-align:center">
<span style="color:#FFFFFF">
<a href="#" title="Powered by XG Proyect {version} &copy; 2008 - {year} GNU General Public License">&copy; 2008 - {year}</a>
</span>
</div>
</td>
</tr>
</table>
</div>
</center>
</div>
<!-- END LEFTMENU -->
<!-- END LEFTMENU -->

0 comments on commit f08265b

Please sign in to comment.