Fixed login
Started building page cleanup Modified code pools Backported layout/blocks/templates 3-step view system Reforged Overview page Moved graphics, added topnav template, fixed number render bug Added BCMath optionnal usage Updated BC Math comparison for capped resources Fixed planet resource production updates Various additions Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
3fd8832b45
commit
f2d4b0f7e2
384 changed files with 2727 additions and 1364 deletions
|
|
@ -84,90 +84,3 @@ function message($mes, $title = 'Error', $dest = "", $time = "3", $color = 'oran
|
|||
|
||||
display ($page, $title, false, (($dest != "") ? "<meta http-equiv=\"refresh\" content=\"$time;URL={$dest}\">" : ""), true);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// Routine d'affichage d'une page dans un cadre donn<6E>
|
||||
//
|
||||
// $page -> la page
|
||||
// $title -> le titre de la page
|
||||
// $topnav -> Affichage des ressources ? oui ou non ??
|
||||
// $metatags -> S'il y a quelques actions particulieres a faire ...
|
||||
// $AdminPage -> Si on est dans la section admin ... faut le dire ...
|
||||
function display ($page, $title = '', $topnav = true, $metatags = '', $AdminPage = false) {
|
||||
global $link, $gameConfig, $debug, $user, $planetrow;
|
||||
|
||||
if (!$AdminPage) {
|
||||
$DisplayPage = StdUserHeader ($title, $metatags);
|
||||
} else {
|
||||
$DisplayPage = AdminUserHeader ($title, $metatags);
|
||||
}
|
||||
|
||||
if ($topnav) {
|
||||
$DisplayPage .= ShowTopNavigationBar( $user, $planetrow );
|
||||
}
|
||||
$DisplayPage .= "<center>\n". $page ."\n</center>\n";
|
||||
// Affichage du Debug si necessaire
|
||||
if (isset($user['authlevel']) && in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
|
||||
if ($gameConfig['debug'] == 1) $debug->echo_log();
|
||||
}
|
||||
|
||||
$DisplayPage .= StdFooter();
|
||||
if (isset($link)) {
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
echo $DisplayPage;
|
||||
|
||||
die();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// Entete de page
|
||||
//
|
||||
function StdUserHeader ($title = '', $metatags = '') {
|
||||
global $user, $langInfos;
|
||||
|
||||
$parse = $langInfos;
|
||||
$parse['title'] = $title;
|
||||
if ( defined('LOGIN') ) {
|
||||
$parse['dpath'] = "skins/xnova/";
|
||||
$parse['-style-'] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\">\n";
|
||||
$parse['-style-'] .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/about.css\">\n";
|
||||
} else {
|
||||
$parse['dpath'] = DEFAULT_SKINPATH;
|
||||
$parse['-style-'] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"". DEFAULT_SKINPATH ."/default.css\" />";
|
||||
$parse['-style-'] .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"". DEFAULT_SKINPATH ."/formate.css\" />";
|
||||
}
|
||||
|
||||
$parse['-meta-'] = ($metatags) ? $metatags : "";
|
||||
$parse['-body-'] = "<body>"; // class=\"style\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
|
||||
return parsetemplate(gettemplate('simple_header'), $parse);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// Entete de page administration
|
||||
//
|
||||
function AdminUserHeader ($title = '', $metatags = '') {
|
||||
global $user, $dpath, $langInfos;
|
||||
|
||||
$parse = $langInfos;
|
||||
$parse['dpath'] = $dpath;
|
||||
$parse['title'] = $title;
|
||||
$parse['-meta-'] = ($metatags) ? $metatags : "";
|
||||
$parse['-body-'] = "<body>"; // class=\"style\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
|
||||
return parsetemplate(gettemplate('admin/simple_header'), $parse);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// Pied de page
|
||||
//
|
||||
function StdFooter() {
|
||||
global $gameConfig, $lang;
|
||||
$parse['copyright'] = isset($gameConfig['copyright']) ? $gameConfig['copyright'] : 'XNova Support Team';
|
||||
$parse['TranslationBy'] = isset($lang['TranslationBy']) ? $lang['TranslationBy'] : '';
|
||||
return parsetemplate(gettemplate('overall_footer'), $parse);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue