本文整理汇总了PHP中includeLang函数的典型用法代码示例。如果您正苦于以下问题:PHP includeLang函数的具体用法?PHP includeLang怎么用?PHP includeLang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了includeLang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowTopKB
function ShowTopKB()
{
global $lang;
//anzeige der Top 100 Liste
includeLang('INGAME');
$parse = $lang;
$RowsTPL = gettemplate('topkb/topkb_rows');
$top = doquery("SELECT * FROM {{table}} ORDER BY gesamtunits DESC LIMIT 100;", 'topkb');
$a = 0;
while ($data = mysql_fetch_array($top)) {
$a++;
$timedeut = date("D d M H:i:s", $data['time']);
$user1 = doquery("SELECT * FROM {{table}} WHERE username='" . $data[2] . "';", 'users', true);
if ($data['fleetresult'] == "a" and $user1['hof'] == 1) {
$bloc['top_fighters'] = "<a href=\"javascript:f('topkbuser.php?mode=" . $data['rid'] . "', '');\"><font color=\"green\">" . $data['angreifer'] . "</font><b> VS </b><font color=\"red\">" . $data['defender'] . "</font></a>";
} else {
if ($data['fleetresult'] == "r" and $user1['hof'] == 1) {
$bloc['top_fighters'] = "<a href=\"javascript:f('topkbuser.php?page=showtopkb&mode=" . $data['rid'] . "', '');\"><font color=\"red\">" . $data['angreifer'] . "</font><b> VS </b><font color=\"green\">" . $data['defender'] . "</font></a>";
} else {
if ($data['fleetresult'] == "w" and $user1['hof'] == 1) {
$bloc['top_fighters'] = "<a href=\"javascript:f('topkbuser.php?mode=" . $data['rid'] . "', '');\">" . $data['angreifer'] . "<b> VS </b>" . $data['defender'] . "</a>";
}
}
}
$bloc['top_rank'] = $a;
$bloc['top_time'] = $timedeut;
$bloc['top_units'] = pretty_number($data['gesamtunits']);
$bloc['underrow'] = $lang['grata'] . "test";
// date("r", $data['time']);
$parse['top_list'] .= parsetemplate($RowsTPL, $bloc);
}
display(parsetemplate(gettemplate('topkb/topkb'), $parse), false);
}
示例2: ShowGouv
function ShowGouv($user)
{
global $dpath, $lang;
includeLang('INGAME');
$mode = $_GET['mode'];
if ($_POST && $mode == "change") {
$iduser = $user["id"];
$SetSort = intval($_POST['settings_sort']);
if ($user['staatsform'] < 1) {
doquery("UPDATE {{table}} SET `staatsform` = '.{$SetSort}.' WHERE `id` = '.{$iduser}.' LIMIT 1", 'users');
message($lang['erfolgreichestaatsformwahl'], $lang['Staatsform']);
dispay(gettemplate('staatsform_confirm'), 'Confirmation', false);
} else {
message($lang['badstaatsformwahl'], $lang['Staatsform']);
}
} else {
$parse = $lang;
$parse['dpath'] = $dpath;
$parse['staatsformeins'] = "<option value =\"1\"" . ($user['staatsform'] == 1 ? " selected" : "") . ">" . $lang['barbarisch'] . "</option>";
$parse['staatsformeins'] .= "<option value =\"2\"" . ($user['staatsform'] == 2 ? " selected" : "") . ">" . $lang['demokratie'] . "</option>";
$parse['staatsformeins'] .= "<option value =\"3\"" . ($user['staatsform'] == 3 ? " selected" : "") . ">" . $lang['monarchie'] . "</option>";
$parse['staatsformeins'] .= "<option value =\"4\"" . ($user['staatsform'] == 4 ? " selected" : "") . ">" . $lang['diktatur'] . "</option>";
$parse['staatsformeins'] .= "<option value =\"5\"" . ($user['staatsform'] == 5 ? " selected" : "") . ">" . $lang['imperialisme'] . "</option>";
$parse['staatsformeins'] .= "<option value =\"6\"" . ($user['staatsform'] == 6 ? " selected" : "") . ">" . $lang['aristocratie'] . "</option>";
display(parsetemplate(gettemplate('staatsform_body'), $parse), 'Gouvernement', false);
}
}
示例3: ShowAdminMenu
function ShowAdminMenu($Level)
{
global $lang, $dpath;
includeLang('leftmenu');
if ($Level == "1") {
$parse = $lang;
$parse['dpath'] = $dpath;
$parse['XNovaRelease'] = VERSION;
$parse['servername'] = XNova;
$Page = parsetemplate(gettemplate('admin/left_menu_go'), $parse);
} elseif ($Level == "2") {
$parse = $lang;
$parse['mf'] = "Hauptframe";
$parse['dpath'] = $dpath;
$parse['XNovaRelease'] = VERSION;
$parse['servername'] = XNova;
$Page = parsetemplate(gettemplate('admin/left_menu_sgo'), $parse);
} elseif ($Level >= "3") {
$parse = $lang;
$parse['mf'] = "Hauptframe";
$parse['dpath'] = $dpath;
$parse['XNovaRelease'] = VERSION;
$parse['servername'] = XNova;
$Page = parsetemplate(gettemplate('admin/left_menu_admin'), $parse);
} else {
header('Location: indexGame.php');
}
return $Page;
}
示例4: ShowChangelogPage
function ShowChangelogPage()
{
if ($_POST) {
global $lang, $displays, $db;
includeLang('CHANGELOG');
//$displays->assignContent('changelog');
$displays->TemplatePower($svn_root . TEMPLATE_DIR . "changelog" . $displays->tpl);
$displays->prepare();
foreach ($lang['changelog'] as $a => $b) {
$displays->newBlock("version");
if ($a == $db->game_config["VERSION"]) {
$parse['version_number'] = "<span style=\"color:red\">" . $a . "</span>";
} else {
$parse['version_number'] = $a;
}
$parse['description'] = nl2br($b);
foreach ($parse as $name => $trans) {
$displays->assign($name, $trans);
}
}
$displays->getOutputContent();
$displays->printToScreen();
//$displays->display('Changelog');
} else {
header("location: ?page=overview");
}
}
示例5: ShowLeftMenu
function ShowLeftMenu($Level, $Template = 'left_menu')
{
global $lang, $dpath, $game_config;
includeLang('leftmenu');
$MenuTPL = gettemplate($Template);
$InfoTPL = gettemplate('serv_infos');
$parse = $lang;
$parse['lm_tx_serv'] = $game_config['resource_multiplier'];
$parse['lm_tx_game'] = $game_config['game_speed'] / 2500;
$parse['lm_tx_fleet'] = $game_config['fleet_speed'] / 2500;
$parse['lm_tx_queue'] = MAX_FLEET_OR_DEFS_PER_ROW;
$SubFrame = parsetemplate($InfoTPL, $parse);
$parse['server_info'] = $SubFrame;
$parse['XNovaRelease'] = VERSION;
$parse['dpath'] = $dpath;
$parse['forum_url'] = $game_config['forum_url'];
$parse['mf'] = "Hauptframe";
$rank = doquery("SELECT `total_rank` FROM {{table}} WHERE `stat_code` = '1' AND `stat_type` = '1' AND `id_owner` = '" . $user['id'] . "';", 'statpoints', true);
$parse['user_rank'] = $rank['total_rank'];
if ($Level > 0) {
$parse['ADMIN_LINK'] = "\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\"><div><a href=\"admin/leftmenu.php\"><font color=\"lime\">" . $lang['user_level'][$Level] . "</font></a></div></td>\r\n\t\t</tr>";
} else {
$parse['ADMIN_LINK'] = "";
}
$parse['servername'] = $game_config['game_name'];
$Menu = parsetemplate($MenuTPL, $parse);
return $Menu;
}
示例6: DisplayGameSettingsPage
function DisplayGameSettingsPage($CurrentUser)
{
global $lang, $game_config, $_POST, $Adminerlaubt, $user;
includeLang('admin/einstellung/einstellung_az');
if ($user['authlevel'] >= 1 and in_array($user['id'], $Adminerlaubt)) {
if ($_POST['opt_save'] == "1") {
if (isset($_POST['angriffszone']) && $_POST['angriffszone'] == 'on') {
$game_config['angriffszone'] = "1";
} else {
$game_config['angriffszone'] = "0";
}
doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['angriffszone'] . "' WHERE `config_name` = 'angriffszone';", 'config');
AdminMessage($lang['speichern'][100], $lang['speichern'][101], '?');
} else {
$parse = $lang;
$parse['angriffszone'] = $game_config['angriffszone'] == 1 ? " checked = 'checked' " : "";
$PageTPL = gettemplate('admin/einstellung/einstellung_az');
$Page .= parsetemplate($PageTPL, $parse);
display($Page, $lang['adm_opt_title'], false, '', true);
}
} else {
AdminMessage($lang['system'][9000], $lang['system'][9001]);
}
return $Page;
}
示例7: CheckCookies
function CheckCookies($IsUserChecked)
{
global $lang, $game_config, $xnova_root_path, $phpEx;
includeLang('cookies');
$UserRow = array();
include $xnova_root_path . 'config.' . $phpEx;
if (isset($_COOKIE[$game_config['COOKIE_NAME']])) {
$TheCookie = explode("/%/", $_COOKIE[$game_config['COOKIE_NAME']]);
$UserResult = doquery("SELECT * FROM {{table}} WHERE `username` = '" . $TheCookie[1] . "';", 'users');
// On verifie s'il y a qu'un seul enregistrement pour ce nom
if (mysql_num_rows($UserResult) != 1) {
message($lang['cookies']['Error1']);
}
$UserRow = mysql_fetch_array($UserResult);
// On teste si on a bien le bon UserID
if ($UserRow["id"] != $TheCookie[0]) {
message($lang['cookies']['Error2']);
}
// On teste si le mot de passe est correct !
if (md5($UserRow["password"] . "--" . $dbsettings["secretword"]) !== $TheCookie[2]) {
message($lang['cookies']['Error3']);
}
$NextCookie = implode("/%/", $TheCookie);
// Au cas ou dans l'ancien cookie il etait question de se souvenir de moi
// 3600 = 1 Heure // 86400 = 1 Jour // 31536000 = 365 Jours
// on ajoute au compteur!
if ($TheCookie[3] == 1) {
$ExpireTime = time() + 31536000;
} else {
$ExpireTime = 0;
}
if ($IsUserChecked == false) {
setcookie($game_config['COOKIE_NAME'], $NextCookie, $ExpireTime, "/", "", 0);
$QryUpdateUser = "UPDATE {{table}} SET ";
$QryUpdateUser .= "`onlinetime` = '" . time() . "', ";
$QryUpdateUser .= "`current_page` = '" . addslashes($_SERVER['REQUEST_URI']) . "', ";
$QryUpdateUser .= "`user_lastip` = '" . $_SERVER['REMOTE_ADDR'] . "', ";
$QryUpdateUser .= "`user_agent` = '" . addslashes($_SERVER['HTTP_USER_AGENT']) . "' ";
$QryUpdateUser .= "WHERE ";
$QryUpdateUser .= "`id` = '" . $TheCookie[0] . "' LIMIT 1;";
doquery($QryUpdateUser, 'users');
$IsUserChecked = true;
} else {
$QryUpdateUser = "UPDATE {{table}} SET ";
$QryUpdateUser .= "`onlinetime` = '" . time() . "', ";
$QryUpdateUser .= "`current_page` = '" . $_SERVER['REQUEST_URI'] . "', ";
$QryUpdateUser .= "`user_lastip` = '" . $_SERVER['REMOTE_ADDR'] . "', ";
$QryUpdateUser .= "`user_agent` = '" . $_SERVER['HTTP_USER_AGENT'] . "' ";
$QryUpdateUser .= "WHERE ";
$QryUpdateUser .= "`id` = '" . $TheCookie[0] . "' LIMIT 1;";
doquery($QryUpdateUser, 'users');
$IsUserChecked = true;
}
}
unset($dbsettings);
$Return['state'] = $IsUserChecked;
$Return['record'] = $UserRow;
return $Return;
}
示例8: ShowLeftMenu
function ShowLeftMenu($Level, $Template = 'left_menu')
{
global $lang, $dpath, $game_config, $adsense_config;
includeLang('leftmenu');
$MenuTPL = gettemplate($Template);
$InfoTPL = gettemplate('serv_infos');
$parse = $lang;
$parse['lm_tx_serv'] = $game_config['resource_multiplier'];
$parse['lm_tx_game'] = $game_config['game_speed'] / 2500;
$parse['lm_tx_fleet'] = $game_config['fleet_speed'] / 2500;
$parse['lm_tx_queue'] = MAX_FLEET_OR_DEFS_PER_ROW;
$SubFrame = parsetemplate($InfoTPL, $parse);
$parse['server_info'] = $SubFrame;
$parse['XNovaRelease'] = VERSION;
$parse['dpath'] = $dpath;
$parse['forum_url'] = $game_config['forum_url'];
$parse['mf'] = "Hauptframe";
$rank = doquery("SELECT `total_rank` FROM {{table}} WHERE `stat_code` = '1' AND `stat_type` = '1' AND `id_owner` = '" . $user['id'] . "';", 'statpoints', true);
$parse['user_rank'] = $rank['total_rank'];
// Show Administrator Link
if ($Level > 0) {
$parse['ADMIN_LINK'] = "\r\r\n\t\t\r\r\n\t\t\t<div><a href=\"admin/leftmenu.php\"><font color=\"lime\">" . $lang['user_level'][$Level] . "</font></a></div>\r\r\n\t\t";
} else {
$parse['ADMIN_LINK'] = "";
}
// Show Forum Link
$parse['forum_link'] = "\r\r\n\t\t<br><div><a href=\"" . $game_config['forum_url'] . "\" target=\"_blank\">Forum</a></div>";
// Show Custom Link
if ($game_config['link_enable'] == 1) {
$parse['added_link'] = "\r\r\n\t\t\r\r\n\t\t\t<div align=\"center\"><a href=\"" . $game_config['link_url'] . "\" target=\"_blank\">" . stripslashes($game_config['link_name']) . "</a></div>\r\r\n\t\t";
} else {
$parse['added_link'] = "";
}
// Show Source Code Link
if ($game_config['enable_source'] == 1 && $game_config['enable_donate'] != 1) {
$parse['source_link'] = "\r\r\n\t\t<tr>\r\r\n\t\t\t<td colspan=\"2\"><div align=\"center\"><a href=\"source.php\" target=\"Hauptframe\">Source Code</a></div></td>\r\r\n\t\t</tr>";
} elseif ($game_config['enable_source'] == 1 && $game_config['enable_donate'] == 1) {
$parse['source_link'] = "\r\r\n\t\t<tr>\r\r\n\t\t\t<th width=\"51%\"><a href=\"source.php\" target=\"Hauptframe\">Source Code</a></th>";
} else {
$parse['source_link'] = "";
}
// Show Donations Link
if ($game_config['enable_donate'] == 1 && $game_config['enable_source'] != 1) {
$parse['donate_link'] = "\r\r\n\t\t<tr>\r\r\n\t\t\t<td colspan=\"2\"><div align=\"center\"><a href=\"donate.php\" target=\"Hauptframe\">Donate</a></div></td>\r\r\n\t\t</tr>";
} elseif ($game_config['enable_donate'] == 1 && $game_config['enable_source'] == 1) {
$parse['donate_link'] = "\r\r\n\t\t\t<th width=\"49%\"><a href=\"donate.php\" target=\"Hauptframe\">Donate</a></th>\r\r\n\t\t</tr>";
} else {
$parse['donate_link'] = "";
}
// Show Adsense Ad
if ($adsense_config['leftmenu_on'] == 1) {
$parse['leftmenu_script'] = "<div>" . $adsense_config['leftmenu_script'] . "</div>";
} else {
$parse['leftmenu_script'] = "";
}
$parse['servername'] = $game_config['game_name'];
$Menu = parsetemplate($MenuTPL, $parse);
return $Menu;
}
示例9: __construct
public function __construct()
{
global $lang;
if (empty($lang)) {
includeLang('INGAME');
}
$this->lang = $lang;
}
示例10: ShowLeftMenu
function ShowLeftMenu($Level, $Template = 'redesign_menu')
{
global $lang, $dpath, $game_config;
includeLang('leftmenu');
includeLang('changelog');
//includeLang('sides');
$MenuTPL = gettemplate($Template);
$InfoTPL = gettemplate('serv_infos');
$parse = $lang;
$use_alliances = 1;
$parse['lm_tx_serv'] = $game_config['resource_multiplier'];
$parse['lm_tx_game'] = $game_config['game_speed'] / 2500;
$parse['lm_tx_fleet'] = $game_config['fleet_speed'] / 2500;
$parse['lm_tx_queue'] = MAX_FLEET_OR_DEFS_PER_ROW;
$SubFrame = parsetemplate($InfoTPL, $parse);
$parse['server_info'] = $SubFrame;
$parse['XNovaRelease'] = VERSION;
$parse['dpath'] = $dpath;
$parse['forum_url'] = $game_config['forum_url'];
$parse['mf'] = "_self";
$rank['total_rank'] = 1;
//$rank = doquery("SELECT `total_rank` FROM {{table}} WHERE `stat_code` = '1' AND `stat_type` = '1' AND `id_owner` = '". $user['id'] ."';",'statpoints',true);
$parse['user_rank'] = $rank['total_rank'];
$parse['option1'] = "<tr height=\"22\">\n\r\n\t<td colspan=\"2\" align=\"center\" style=\"border-top: 0px; color: #FFFFFF; font-size: 10px;\" background=\"../graphics/menu_optbg.png\">\n\r\n\t\t<div>\n\t\t\t";
$parse['option2'] = "\n\t\t</div>\n\r\n\t</td>\n\r\n</tr>\n\n\n\n";
if ($Level > 0) {
$parse['ADMIN_LINK'] = "<a href=\"admin/overview.php\"><font color=\"lime\">" . $lang['user_level'][$Level] . "</font></a>";
} else {
$parse['ADMIN_LINK'] = "";
}
//Lien suppl�mentaire d�termin� dans le panel admin
if ($game_config['link_enable'] == 1) {
$parse['added_link'] = "<a href=\"" . $game_config['link_url'] . "\" target=\"_blank\">" . stripslashes($game_config['link_name']) . "</a></div></td>\r\n\t\t</tr>";
} else {
$parse['added_link'] = "";
}
//Maintenant on v�rifie si les annonces sont activ�es ou non
if ($game_config['enable_marchand'] == 1) {
$parse['marchand_link'] = "<a href=\"marchand.php\" target=\"" . $parse['mf'] . "\">" . $lang['Marchand'] . "</a>";
} else {
$parse['marchand_link'] = "";
}
//Maintenant on v�rifie si les annonces sont activ�es ou non
if ($game_config['enable_announces'] == 1) {
$parse['announce_link'] = "<a href=\"annonce.php\" target=\"" . $parse['mf'] . "\">" . $lang['Annonces'] . "</a>";
} else {
$parse['announce_link'] = "";
}
//Maintenant les notes
if ($game_config['enable_notes'] == 1) {
$parse['notes_link'] = "<a href=\"#\" onClick=\"f('notes.php', 'Notes');\" accesskey=\"n\">Notes</a>";
} else {
$parse['notes_link'] = "";
}
$parse['servername'] = $game_config['game_name'];
$Menu = parsetemplate($MenuTPL, $parse);
return $Menu;
}
示例11: ShowLeftMenu
function ShowLeftMenu($Level, $Template = 'left_menu2')
{
global $lang, $dpath, $game_config;
includeLang('leftmenu');
$MenuTPL = gettemplate($Template);
$InfoTPL = gettemplate('serv_infos');
$parse = $lang;
$parse['lm_tx_serv'] = $game_config['resource_multiplier'];
$parse['lm_tx_game'] = $game_config['game_speed'] / 2500;
$parse['lm_tx_fleet'] = $game_config['fleet_speed'] / 2500;
$parse['lm_tx_queue'] = MAX_FLEET_OR_DEFS_PER_ROW;
$SubFrame = parsetemplate($InfoTPL, $parse);
$parse['server_info'] = $SubFrame;
$parse['XNovaRelease'] = VERSION;
$parse['dpath'] = $dpath;
$parse['forum_url'] = $game_config['forum_url'];
$parse['mf'] = "Hauptframe";
$rank = doquery("SELECT `total_rank` FROM {{table}} WHERE `stat_code` = '1' AND `stat_type` = '1' AND `id_owner` = '" . $user['id'] . "';", 'statpoints', true);
$parse['user_rank'] = $rank['total_rank'];
if ($Level > 0) {
$parse['ADMIN_LINK'] = "\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\"><div><a href=\"admin/leftmenu.php\"><font color=\"lime\">" . $lang['user_level'][$Level] . "</font></a></div></td>\r\n\t\t</tr>";
} else {
$parse['ADMIN_LINK'] = "";
}
//Lien supplémentaire déterminé dans le panel admin
if ($game_config['link_enable'] == 1) {
$parse['added_link'] = "\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\"><div><a href=\"" . $game_config['link_url'] . "\" target=\"_blank\">" . stripslashes($game_config['link_name']) . "</a></div></td>\r\n\t\t</tr>";
} else {
$parse['added_link'] = "";
}
//Maintenant on vérifie si les annonces sont activées ou non
if ($game_config['enable_announces'] == 1) {
$parse['announce_link'] = "\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\"><div><a href=\"annonces.php\" target=\"Hauptframe\">Annonces</a></div></td>\r\n\t\t</tr>";
} else {
$parse['announce_link'] = "";
}
//Maintenant le marchand
if ($game_config['enable_marchand'] == 1) {
$parse['marchand_link'] = "\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\"><div><a href=\"marchand.php\" target=\"Hauptframe\">Marchand</a></div></td>\r\n\t\t</tr>";
} else {
$parse['marchand_link'] = "";
}
//Maintenant les notes
if ($game_config['enable_notes'] == 1) {
$parse['notes_link'] = "\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\"><div><a href=\"#\" onClick=\"f(\\'notes.php\\', \\'Report\\');\" accesskey=\"n\">Notes</a></div></td>\r\n\t\t</tr>";
} else {
$parse['notes_link'] = "";
}
$parse['servername'] = $game_config['game_name'];
$Menu = parsetemplate($MenuTPL, $parse);
return $Menu;
}
示例12: ShowChangelogPage
function ShowChangelogPage()
{
global $lang;
includeLang('CHANGELOG');
foreach ($lang['changelog'] as $a => $b) {
$parse['version_number'] = $a;
$parse['description'] = nl2br($b);
$body .= parsetemplate(gettemplate('changelog_table'), $parse);
}
$parse = $lang;
$parse['body'] = $body;
return display(parsetemplate(gettemplate('changelog_body'), $parse));
}
示例13: checkcookies
function checkcookies()
{
global $lang, $game_config, $ugamela_root_path, $phpEx, $user;
//mas adelante esta variable formara parte de la $game_config
includeLang('cookies');
include $ugamela_root_path . 'config.' . $phpEx;
$row = false;
if (isset($_COOKIE[$game_config['COOKIE_NAME']])) {
// Formato de la cookie:
// {ID} {USERNAME} {PASSWORDHASH} {REMEMBERME}
$theuser = explode(" ", $_COOKIE[$game_config['COOKIE_NAME']]);
$query = doquery("SELECT * FROM {{table}} LEFT JOIN ugml_stat ON id = userID WHERE id='" . WCF::getUser()->userID . "'", "users");
//$sql = "SELECT activityPoints FROM wcf".WCF_N."_user WHERE userID = '".WCF::getUser()->userID."'";
//$boardQry = WCF::getDB()->getFirstRow($sql);
if (mysql_num_rows($query) != 1) {
message($lang['cookies']['Error1']);
}
$row = mysql_fetch_array($query);
/*if ($row["id"] != $theuser[0])
{
message($lang['cookies']['Error2']);
}
if (md5($row["password"]."--".$dbsettings["secretword"]) !== $theuser[1])
{
message($lang['cookies']['Error3']);
}*/
// Si llegamos hasta aca... quiere decir que la cookie es valida,
// entonces escribimos una nueva.
$newcookie = implode(" ", $theuser);
if ($theuser[2] == 1) {
$expiretime = time() + 31536000;
} else {
$expiretime = 0;
}
setcookie($game_config['COOKIE_NAME'], $newcookie, $expiretime, "/", "", 0);
//doquery("UPDATE {{table}} SET onlinetime=".time().", user_lastip='{$_SERVER['REMOTE_ADDR']}' WHERE id='{$theuser[0]}' LIMIT 1", "users");
}
unset($dbsettings);
if (!$row) {
$row = $user;
}
// correct rank & points
$row['rank'] = $row['rankPoints'];
$row['points_points'] = $row['points'] * 1000;
$row['dilizium'] += WCF::getUser()->additionalDilizium;
$row['dilizium'] -= $row['lostDilizium'];
return $row;
}
示例14: ShowTopKB
function ShowTopKB()
{
global $USER, $PLANET, $LNG, $db;
$mode = request_var('mode', '');
$template = new template();
switch ($mode) {
case "showkb":
$template->page_header();
$template->page_footer();
includeLang('FLEET');
$ReportID = request_var('rid', '');
if (file_exists(ROOT_PATH . 'raports/topkb_' . $ReportID . '.php')) {
require_once ROOT_PATH . 'raports/topkb_' . $ReportID . '.php';
$RaportRAW = $db->uniquequery("SELECT `angreifer`, `defender` FROM " . TOPKB . " WHERE `rid` = '" . $db->sql_escape($ReportID) . "';");
} else {
$RaportRAW = $db->uniquequery("SELECT * FROM " . TOPKB . " WHERE `rid` = '" . $db->sql_escape($ReportID) . "';");
$raport = stripslashes($RaportRAW['raport']);
foreach ($LNG['tech_rc'] as $id => $s_name) {
$str_replace1 = array("[ship[" . $id . "]]");
$str_replace2 = array($s_name);
$raport = str_replace($str_replace1, $str_replace2, $raport);
}
}
foreach ($LNG['tech_rc'] as $id => $s_name) {
$ship[] = "[ship[" . $id . "]]";
$shipname[] = $s_name;
}
$template->assign_vars(array('attacker' => $RaportRAW['angreifer'], 'defender' => $RaportRAW['defender'], 'report' => $raport));
$template->show("topkb_report.tpl");
break;
default:
$PlanetRess = new ResourceUpdate();
$PlanetRess->CalcResource();
$PlanetRess->SavePlanetToDB();
$template->page_header();
$template->page_topnav();
$template->page_leftmenu();
$template->page_planetmenu();
$template->page_footer();
$top = $db->query("SELECT * FROM " . TOPKB . " ORDER BY gesamtunits DESC LIMIT 100;");
while ($data = $db->fetch_array($top)) {
$TopKBList[] = array('result' => $data['fleetresult'], 'time' => date("D d M H:i:s", $data['time']), 'units' => pretty_number($data['gesamtunits']), 'rid' => $data['rid'], 'attacker' => $data['angreifer'], 'defender' => $data['defender'], 'result' => $data['fleetresult']);
}
$db->free_result($top);
$template->assign_vars(array('tkb_units' => $LNG['tkb_units'], 'tkb_datum' => $LNG['tkb_datum'], 'tkb_owners' => $LNG['tkb_owners'], 'tkb_platz' => $LNG['tkb_platz'], 'tkb_top' => $LNG['tkb_top'], 'tkb_gratz' => $LNG['tkb_gratz'], 'tkb_legende' => $LNG['tkb_legende'], 'tkb_gewinner' => $LNG['tkb_gewinner'], 'tkb_verlierer' => $LNG['tkb_verlierer'], 'TopKBList' => $TopKBList));
$template->show("topkb_overview.tpl");
break;
}
}
示例15: ShowFAQPage
function ShowFAQPage()
{
global $USER, $PLANET, $LNG;
$PlanetRess = new ResourceUpdate();
$PlanetRess->CalcResource();
$PlanetRess->SavePlanetToDB();
$template = new template();
$template->page_header();
$template->page_topnav();
$template->page_leftmenu();
$template->page_planetmenu();
$template->page_footer();
includeLang('FAQ');
$template->assign_vars(array('FAQList' => $LNG['faq'], 'faq_overview' => $LNG['faq_overview']));
$template->show("faq_overview.tpl");
}