function ShowLeftMenu($Level) { global $game_config, $dpath, $user, $lang; $parse = $lang; $parse['dpath'] = $dpath; $parse['version'] = VERSION; $parse['servername'] = $game_config['game_name']; $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; $parse['forum_url'] = $game_config['forum_url']; $parse['servername'] = $game_config['game_name']; $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'] = " <br><a href=\"javascript:top.location.href='adm/index.php'\"> <font color=\"#99cc00\">Acceder al CPanel </font></a></div>"; } else { $parse['admin_link'] = ""; } if ($user["new_message"] != 0) { $color = "color=\"red\""; } else { $color = "color=\"white\""; } $parse["new_message"] = ' (<font size="1px" ' . $color . ' > ' . $user["new_message"] . ' </font>)'; return parsetemplate(gettemplate('left_menu'), $parse); }
function ShowPlanetMenu($CurrentUser) { global $dpath; $planets = "SELECT `id`,`name`,`galaxy`,`system`,`planet`,`planet_type`, `image`, `field_current`, `field_max`, `terraformer`, `mondbasis` FROM {{table}} WHERE `id_owner` = '" . $CurrentUser['id'] . "' AND `destruyed` = 0 ORDER BY "; $Order = $CurrentUser['planet_sort_order'] == 1 ? "DESC" : "ASC"; $Sort = $CurrentUser['planet_sort']; if ($Sort == 0) { $planets .= "`id` " . $Order; } elseif ($Sort == 1) { $planets .= "`galaxy`, `system`, `planet`, `planet_type` " . $Order; } elseif ($Sort == 2) { $planets .= "`name` " . $Order; } $planets2 = doquery($planets, 'planets'); while ($p = mysql_fetch_array($planets2)) { if ($p["destruyed"] == 0) { $ct = $p["field_max"] + $p["terraformer"] * FIELDS_BY_TERRAFORMER; if ($p['planet_type'] == 3) { $ct = $p["field_max"]; } $parse['planetmenulist'] .= "<center></br>"; if ($p['planet_type'] == 1 && $p["id"] != $CurrentUser["current_planet"]) { $parse['planetmenulist'] .= "<td><div align=center><a href=game.php?page={$_GET['page']}&gid={$_GET['gid']}&cp=" . $p['id'] . "&mode=" . $_GET['mode'] . "&re=0 title=Campos ocupados: " . $p['field_current'] . "/" . $ct . "><img src=" . $dpath . "planeten/small/s_" . $p['image'] . ".gif border=0 height=35 width=35><br><font color=#2E9AFE>" . $p['name'] . " </font><font color=#58FA58><br>[" . $p['galaxy'] . ":" . $p['system'] . ":" . $p['planet'] . "]</font></a>"; } elseif ($p['planet_type'] == 3 && $p["id"] != $CurrentUser["current_planet"]) { $parse['planetmenulist'] .= ""; } else { $parse['planetmenulist'] .= "<th><div align=center><a href=# title=Campos ocupados: " . $p['field_current'] . "/" . $ct . "><img src=" . $dpath . "planeten/small/s_" . $p['image'] . ".gif border=0 height=35 width=35><br><font color=#FFFF00>" . $p['name'] . " </font><font color=#FE9A2E><br> [" . $p['galaxy'] . ":" . $p['system'] . ":" . $p['planet'] . "] </font></a></div></th>"; } $parse['planetmenulist'] .= "</center></table>"; } $parse['date_time'] = date("D M j H:i:s", time()); } return parsetemplate(gettemplate('planet_menu'), $parse); }
function ShowImperiumPage($CurrentUser) { global $lang, $resource, $reslist, $dpath; $planetsrow = doquery("\r\n\tSELECT `id`,`name`,`galaxy`,`system`,`planet`,`planet_type`,\r\n\t`image`,`field_current`,`field_max`,`metal`,`metal_perhour`,\r\n\t`crystal`,`crystal_perhour`,`deuterium`,`deuterium_perhour`,\r\n\t`energy_used`,`energy_max`,`metal_mine`,`crystal_mine`,`deuterium_sintetizer`,\r\n\t`solar_plant`,`fusion_plant`,`robot_factory`,`nano_factory`,`hangar`,`metal_store`,\r\n\t`crystal_store`,`deuterium_store`,`laboratory`,`terraformer`,`ally_deposit`,`silo`,\r\n\t`small_ship_cargo`,`big_ship_cargo`,`light_hunter`,`heavy_hunter`,`crusher`,`battle_ship`,\r\n\t`colonizer`,`recycler`,`spy_sonde`,`bomber_ship`,`solar_satelit`,`destructor`,`dearth_star`,\r\n\t`battleship`,`supernova`,`misil_launcher`,`small_laser`,`big_laser`,`gauss_canyon`,`ionic_canyon`,\r\n\t`buster_canyon`,`small_protection_shield`,`planet_protector`,`big_protection_shield`,`interceptor_misil`,\r\n\t`interplanetary_misil`, `mondbasis`, `phalanx`, `sprungtor` FROM {{table}} WHERE `id_owner` = '" . $CurrentUser['id'] . "' AND `destruyed` = 0;", 'planets'); $parse = $lang; $planet = array(); while ($p = mysql_fetch_array($planetsrow)) { $planet[] = $p; } $parse['mount'] = count($planet) + 1; foreach ($planet as $p) { $datat = array('<a href="game.php?page=overview&cp=' . $p['id'] . '&re=0"><img src="' . $dpath . 'planeten/small/s_' . $p['image'] . '.jpg" border="0" height="80" width="80"></a>', $p['name'], "[<a href=\"game.php?page=galaxy&mode=3&galaxy={$p['galaxy']}&system={$p['system']}\">{$p['galaxy']}:{$p['system']}:{$p['planet']}</a>]", $p['field_current'] . '/' . $p['field_max'], '<a href="game.php?page=resources&cp=' . $p['id'] . '&re=0&planettype=' . $p['planet_type'] . '">' . pretty_number($p['metal']) . '</a> / ' . pretty_number($p['metal_perhour']), '<a href="game.php?page=resources&cp=' . $p['id'] . '&re=0&planettype=' . $p['planet_type'] . '">' . pretty_number($p['crystal']) . '</a> / ' . pretty_number($p['crystal_perhour']), '<a href="game.php?page=resources&cp=' . $p['id'] . '&re=0&planettype=' . $p['planet_type'] . '">' . pretty_number($p['deuterium']) . '</a> / ' . pretty_number($p['deuterium_perhour']), pretty_number($p['energy_max'] - $p['energy_used']) . ' / ' . pretty_number($p['energy_max'])); $f = array('file_images', 'file_names', 'file_coordinates', 'file_fields', 'file_metal', 'file_crystal', 'file_deuterium', 'file_energy'); for ($k = 0; $k < 8; $k++) { $data['text'] = $datat[$k]; $parse[$f[$k]] .= parsetemplate(gettemplate('empire/empire_row'), $data); } foreach ($resource as $i => $res) { $data['text'] = $p[$resource[$i]] == 0 && $CurrentUser[$resource[$i]] == 0 ? '-' : (in_array($i, $reslist['build']) ? "<a href=\"game.php?page=buildings&cp={$p['id']}&re=0&planettype={$p['planet_type']}\">{$p[$resource[$i]]}</a>" : (in_array($i, $reslist['tech']) ? "<a href=\"game.php?page=buildings&mode=research&cp={$p['id']}&re=0&planettype={$p['planet_type']}\">{$CurrentUser[$resource[$i]]}</a>" : (in_array($i, $reslist['fleet']) ? "<a href=\"game.php?page=buildings&mode=fleet&cp={$p['id']}&re=0&planettype={$p['planet_type']}\">{$p[$resource[$i]]}</a>" : (in_array($i, $reslist['defense']) ? "<a href=\"game.php?page=buildings&mode=defense&cp={$p['id']}&re=0&planettype={$p['planet_type']}\">{$p[$resource[$i]]}</a>" : '-')))); $r[$i] .= parsetemplate(gettemplate('empire/empire_row'), $data); } } $m = array('build', 'tech', 'fleet', 'defense'); $n = array('building_row', 'technology_row', 'fleet_row', 'defense_row'); for ($j = 0; $j < 4; $j++) { foreach ($reslist[$m[$j]] as $a => $i) { $data['text'] = $lang['tech'][$i]; $parse[$n[$j]] .= "<tr>" . parsetemplate(gettemplate('empire/empire_row'), $data) . $r[$i] . "</tr>"; } } return display(parsetemplate(gettemplate('empire/empire_table'), $parse), false); }
function ShowTechTreePage($CurrentUser, $CurrentPlanet) { global $resource, $requeriments, $lang; $parse = $lang; foreach ($lang['tech'] as $Element => $ElementName) { $parse = array(); $parse['tt_name'] = $ElementName; if (!isset($resource[$Element])) { $parse['Requirements'] = $lang['tt_requirements']; $page .= parsetemplate(gettemplate('techtree/techtree_head'), $parse); } else { if (isset($requeriments[$Element])) { $parse['required_list'] = ""; foreach ($requeriments[$Element] as $ResClass => $Level) { if (isset($CurrentUser[$resource[$ResClass]]) && $CurrentUser[$resource[$ResClass]] >= $Level) { $parse['required_list'] .= "<font color=\"#00ff00\">"; } elseif (isset($CurrentPlanet[$resource[$ResClass]]) && $CurrentPlanet[$resource[$ResClass]] >= $Level) { $parse['required_list'] .= "<font color=\"#00ff00\">"; } else { $parse['required_list'] .= "<font color=\"#ff0000\">"; } $parse['required_list'] .= $lang['tech'][$ResClass] . " (" . $lang['tt_lvl'] . $Level . ")"; $parse['required_list'] .= "</font><br>"; } } else { $parse['required_list'] = ""; $parse['tt_detail'] = ""; } $parse['tt_info'] = $Element; $page .= parsetemplate(gettemplate('techtree/techtree_row'), $parse); } } $parse['techtree_list'] = $page; return display(parsetemplate(gettemplate('techtree/techtree_body'), $parse)); }
function echo_buildinglist() { /* Se imprime una lista de naves y defensa en contruccion */ global $lang, $user, $planetrow, $pricelist; //Array del b_hangar_id $b_hangar_id = explode(';', $planetrow['b_hangar_id']); $a = $b = $c = ""; foreach ($b_hangar_id as $n => $array) { if ($array != '') { $array = explode(',', $array); //calculamos el tiempo $time = get_building_time($user, $planetrow, $array[0]); $totaltime += $time * $array[1]; $c .= "{$time},"; $b .= "'{$lang['tech'][$array[0]]}',"; $a .= "{$array[1]},"; } } $parse = $lang; $parse['a'] = $a; $parse['b'] = $b; $parse['c'] = $c; $parse['b_hangar_id_plus'] = $planetrow['b_hangar']; $parse['pretty_time_b_hangar'] = pretty_time($totaltime - $planetrow['b_hangar']); // //$planetrow['last_update'] $text .= parsetemplate(gettemplate('buildings_script'), $parse); return $text; }
/** * adminmenu.php * * @version 1.2 * @copyright 2008 By Chlorel for XNova * @copyright 2009 By MadnessRed for XNova Redesigned */ function ShowLeftMenu($cpage = 'x') { global $lang; $qry = doquery("SELECT COUNT('error_id') as `errors` FROM {{table}}", 'errors', true); $errorscount = $qry['errors']; $qry = doquery("SELECT `id` FROM {{table}} WHERE `status` = 1 || `status` = 2 ;", 'supp'); $ticketcount = mysql_num_rows($qry); $info = @file(XNOVAUKLINK . "info.php"); if ($info[0] != VERSION . "\n") { $newversion = colourRed("(*)"); } $adminpages = array('overview' => 'Overview ' . $newversion, 'config' => 'Configuration', 'edit' => 'Manage Users', 'errors' => 'Errors (' . $errorscount . ')', 'supp' => 'Tickets (' . $ticketcount . ')'); getLang('menu'); $parse = $lang; $parse['links'] = ''; foreach ($adminpages as $get => $title) { $parse['links'] .= ' <li class="menubutton_table"> <span class="menu_icon"> <img src="' . GAME_SKIN . '/img/navigation/navi_ikon_premium_b.gif" height="29" width="38" /> </span> <a class="menubutton" href="./?page=admin&link=' . $get . '" title=\'' . $title . '\' tabindex="1"> <span class="textlabel">' . $title . '</span> </a> </li> '; } $Menu = parsetemplate(gettemplate('redesigned/adminmenu'), $parse); return $Menu; }
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; }
function ElementBuildListQueue($CurrentUser, $CurrentPlanet) { global $lang, $pricelist; $b_building_id = explode(';', $CurrentPlanet['b_building_queue']); $a = $b = $c = ""; foreach ($b_hangar_id as $n => $array) { if ($array != '') { $array = explode(',', $array); // calculamos el tiempo $time = GetBuildingTime($user, $CurrentPlanet, $array[0]); $totaltime += $time * $array[1]; $c .= "{$time},"; $b .= "'{$lang['tech'][$array[0]]}',"; $a .= "{$array[1]},"; } } $parse = $lang; $parse['a'] = $a; $parse['b'] = $b; $parse['c'] = $c; $parse['b_hangar_id_plus'] = $CurrentPlanet['b_hangar']; $parse['pretty_time_b_hangar'] = pretty_time($totaltime - $CurrentPlanet['b_hangar']); $text .= parsetemplate(gettemplate('buildings_script'), $parse); return $text; }
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; }
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; }
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='******';", '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); }
function ShowLeftMenu() { global $xgp_root, $phpEx, $dpath, $game_config, $lang, $planetrow, $user, $lang; $parse = $lang; $parse['dpath'] = $dpath; $parse['avatar'] = $user['avatar']; $parse['version'] = VERSION; $parse['servername'] = $game_config['game_name']; $parse['forum_url'] = $game_config['forum_url']; $parse['user_rank'] = $user['total_rank']; $parse['opt_avata_data'] = $CurrentUser['avatar']; $parse['user_username'] = $user['username']; // Mod cuenta mensajes by shoek $MenSoporte = doquery("SELECT COUNT(*) as total FROM `{{table}}` WHERE `player_id` = '" . intval($CurrentUser['id']) . "' AND `status` = '2';", 'supp', true); if ($MenSoporte['total'] > 0) { $parse['NumSoporte'] = "(<a href=\"game.php?page=support\">" . $MenSoporte['total'] . "</a>)"; } // Fin mod cuenta mensajes if ($_POST && $mode == "change") { // Array ( [db_character] $iduser = $user["id"]; $avatar = $_POST["avatar"]; } if (isset($planetrow['sprungtor']) && $planetrow['sprungtor'] > 0) { $parse['portal_link'] = "<tr><td><div align=\"center\"><a href='game.php?page=infos&gid=43' ><font color=\"green\">" . $lang['tech'][43] . "</font></a></div></td></tr>"; } return parsetemplate(gettemplate('left_menu'), $parse); }
function sendpassemail($emailaddress, $password) { global $game_config, $lang; $email = parsetemplate($lang['reg_mail_text_part1'] . $password . $lang['reg_mail_text_part2'] . GAMEURL, $parse); $status = mymail($emailaddress, $lang['register_at'] . $game_config['game_name'], $email); return $status; }
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); } }
/** * BuildFlyingFleetTable.php * * @version 1 * @copyright 2008 By Chlorel for XNova */ function BuildFlyingFleetTable() { global $lang; $TableTPL = gettemplate('admin/fleet_rows'); $FlyingFleets = doquery("SELECT * FROM {{table}} ORDER BY `fleet_end_time` ASC;", 'fleets'); while ($CurrentFleet = mysql_fetch_assoc($FlyingFleets)) { $FleetOwner = doquery("SELECT `username` FROM {{table}} WHERE `id` = '" . $CurrentFleet['fleet_owner'] . "';", 'users', true); $TargetOwner = doquery("SELECT `username` FROM {{table}} WHERE `id` = '" . $CurrentFleet['fleet_target_owner'] . "';", 'users', true); $Bloc['Id'] = $CurrentFleet['fleet_id']; $Bloc['Mission'] = CreateFleetPopupedMissionLink($CurrentFleet, $lang['type_mission'][$CurrentFleet['fleet_mission']], ''); $Bloc['Mission'] .= "<br>" . ($CurrentFleet['fleet_mess'] == 1 ? "R" : "A"); $Bloc['Fleet'] = CreateFleetPopupedFleetLink($CurrentFleet, $lang['tech'][200], ''); $Bloc['St_Owner'] = "[" . $CurrentFleet['fleet_owner'] . "]<br>" . $FleetOwner['username']; $Bloc['St_Posit'] = "[" . $CurrentFleet['fleet_start_galaxy'] . ":" . $CurrentFleet['fleet_start_system'] . ":" . $CurrentFleet['fleet_start_planet'] . "]<br>" . ($CurrentFleet['fleet_start_type'] == 1 ? "[P]" : ($CurrentFleet['fleet_start_type'] == 2 ? "D" : "L")) . ""; $Bloc['St_Time'] = date('G:i:s d/n/Y', $CurrentFleet['fleet_start_time']); if (is_array($TargetOwner)) { $Bloc['En_Owner'] = "[" . $CurrentFleet['fleet_target_owner'] . "]<br>" . $TargetOwner['username']; } else { $Bloc['En_Owner'] = ""; } $Bloc['En_Posit'] = "[" . $CurrentFleet['fleet_end_galaxy'] . ":" . $CurrentFleet['fleet_end_system'] . ":" . $CurrentFleet['fleet_end_planet'] . "]<br>" . ($CurrentFleet['fleet_end_type'] == 1 ? "[P]" : ($CurrentFleet['fleet_end_type'] == 2 ? "D" : "L")) . ""; if ($CurrentFleet['fleet_mission'] == 15) { $Bloc['Wa_Time'] = date('G:i:s d/n/Y', $CurrentFleet['fleet_stay_time']); } else { $Bloc['Wa_Time'] = ""; } $Bloc['En_Time'] = date('G:i:s d/n/Y', $CurrentFleet['fleet_end_time']); $table .= parsetemplate($TableTPL, $Bloc); } return $table; }
function ElementBuildListBox($CurrentUser, $CurrentPlanet) { global $lang, $pricelist; // Array del b_hangar_id $ElementQueue = explode(';', $CurrentPlanet['b_hangar_id']); $NbrePerType = ""; $NamePerType = ""; $TimePerType = ""; foreach ($ElementQueue as $ElementLine => $Element) { if ($Element != '') { $Element = explode(',', $Element); $ElementTime = GetBuildingTime($CurrentUser, $CurrentPlanet, $Element[0]); $QueueTime += $ElementTime * $Element[1]; $TimePerType .= "" . $ElementTime . ","; $NamePerType .= "'" . html_entity_decode($lang['tech'][$Element[0]]) . "',"; $NbrePerType .= "" . $Element[1] . ","; } } $parse = $lang; $parse['a'] = $NbrePerType; $parse['b'] = $NamePerType; $parse['c'] = $TimePerType; $parse['b_hangar_id_plus'] = $CurrentPlanet['b_hangar']; $parse['pretty_time_b_hangar'] = pretty_time($QueueTime - $CurrentPlanet['b_hangar']); $text .= parsetemplate(gettemplate('buildings_script'), $parse); return $text; }
function sendemail($message, $address, $title) { global $lang; $uni = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; $uni = ereg_replace("[^0-9]", "", $uni); $lang['mail_welcome'] = '<table width="100%" height="100%" bgcolor="Black" border="1">'; $lang['mail_welcome'] .= '<tr valign="top">'; $lang['mail_welcome'] .= '<td valign="top">'; $lang['mail_welcome'] .= '<center>'; $lang['mail_welcome'] .= '<img src="http://darkevo.org/images/header.jpg" alt="Censtudios Gaming Portal" /><br />'; $lang['mail_welcome'] .= '<table width="80%" height="220"><tr><td valign="top">'; $lang['mail_welcome'] .= '<font color="White"><br /><br />'; $lang['mail_welcome'] .= $message; $lang['mail_welcome'] .= '</font>'; $lang['mail_welcome'] .= '</td></tr></table>'; $lang['mail_welcome'] .= '</center>'; $lang['mail_welcome'] .= '</td>'; $lang['mail_welcome'] .= '</tr>'; $lang['mail_welcome'] .= '</table>'; $parse['gameurl'] = GAMEURL; $parse['uni'] = $uni; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($address, $title, $email); return $status; }
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; }
function sendpassemail($emailaddress, $password) { global $lang; $parse['gameurl'] = GAMEURL; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($emailaddress, $lang['mail_title'], $email); return $status; }
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; }
function sendpassemail($emailaddress, $password, $username) { global $lang, $Code; $parse['gameurl'] = GAMEURL; $parse['password'] = $password; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($emailaddress, $lang['mail_title'], $username, $password); return $status; }
function ShowTechTreePage($CurrentUser, $CurrentPlanet) { global $resource, $requeriments, $lang; $parse = $lang; foreach ($lang['tech'] as $Element => $ElementName) { $parse = array(); $parse['tt_name'] = $ElementName; $parse['dpath'] = $dpath . './styles/skins/evolution/gebaeude/'; $parse['ext'] = 'gif'; if (!isset($resource[$Element])) { $parse['level'] = $lang['tt_level']; $parse['Requirements'] = $lang['tt_requirements']; $parse['image'] = $lang['tt_image']; $page .= parsetemplate(gettemplate('techtree/techtree_head'), $parse); } else { if (isset($requeriments[$Element])) { $parse['required_name'] = ""; foreach ($requeriments[$Element] as $ResClass => $Level) { if (isset($CurrentUser[$resource[$ResClass]]) && $CurrentUser[$resource[$ResClass]] >= $Level) { $parse['required_name'] .= "<font color=\"#00ff00\">"; } elseif (isset($CurrentPlanet[$resource[$ResClass]]) && $CurrentPlanet[$resource[$ResClass]] >= $Level) { $parse['required_name'] .= "<font color=\"#00ff00\">"; } else { $parse['required_name'] .= "<font color=\"#ff0000\">"; } $parse['required_name'] .= "" . $lang['tech'][$ResClass] . " - " . $Level . ""; $parse['required_name'] .= "</font><br>"; } } else { $parse['required_name'] = "-"; $parse['tt_detail'] = ""; } if (isset($requeriments[$Element])) { $parse['required_have'] = ""; foreach ($requeriments[$Element] as $ResClass => $Level) { if (isset($CurrentUser[$resource[$ResClass]]) && $CurrentUser[$resource[$ResClass]] >= $Level) { $parse['required_have'] .= "<font color=\"#00ff00\">"; } elseif (isset($CurrentPlanet[$resource[$ResClass]]) && $CurrentPlanet[$resource[$ResClass]] >= $Level) { $parse['required_have'] .= "<font color=\"#00ff00\">"; } else { $parse['required_have'] .= "<font color=\"#ff0000\">"; } $parse['required_have'] .= "" . $CurrentUser[$resource[$ResClass]] . " " . $CurrentPlanet[$resource[$ResClass]] . ""; $parse['required_have'] .= "</font><br>"; } } else { $parse['required_have'] = "-"; $parse['tt_detail'] = ""; } $parse['tt_info'] = $Element; $page .= parsetemplate(gettemplate('techtree/techtree_row'), $parse); } } $parse['techtree_list'] = $page; return display(parsetemplate(gettemplate('techtree/techtree_body'), $parse)); }
function sendpassemail($emailaddress, $password, $UserName) { global $lang, $kod; $parse['gameurl'] = GAMEURL; $parse['password'] = $password; $parse['character'] = $UserName; $parse['kod'] = $kod; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($emailaddress, $lang['mail_title'], $email); return $status; }
function sendpassemail($emailaddress, $password) { global $lang; //Cojemos la variable $lang $parse['gameurl'] = GAMEURL; $parse['password'] = $password; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($emailaddress, $lang['mail_title'], $email); return $status; //Devolvemos status }
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; }
/** * topmenu.php * * @version 1.0 * @copyright 2008 by msmith for XNova Redesigned */ function GetTopLinks() { global $game_config, $lang; die("blah"); getLang('menu'); $parse = $lang[$lang['user']]; //$parse['body'] = $body; $parse['forum_url'] = $game_config['forum_url']; $parse['game_name'] = $game_config['game_name']; print_r($lang); $page = parsetemplate(gettemplate('topmenu'), $parse); return $page; }
function sendpassemail($emailaddress, $password, $username) { global $lang; $uni = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; $uni = ereg_replace("[^0-9]", "", $uni); $parse['gameurl'] = GAMEURL; $parse['password'] = $password; $parse['username'] = $username; $parse['uni'] = $uni; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($emailaddress, $lang['mail_title'], $email); return $status; }
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)); }
function eco_bld_tech($que_type, &$user, &$planet) { global $config, $lang; lng_include('buildings'); lng_include('infos'); if (!mrc_get_level($user, $planet, STRUC_LABORATORY)) { message($lang['no_laboratory'], $lang['tech'][UNIT_TECHNOLOGIES]); } if (eco_unit_busy($user, $planet, UNIT_TECHNOLOGIES)) { message($lang['eco_bld_msg_err_laboratory_upgrading'], $lang['tech'][UNIT_TECHNOLOGIES]); } switch ($action = sys_get_param_escaped('action')) { case 'build': $operation_result = que_build($user, $planet); break; case 'trim': que_delete(QUE_RESEARCH, $user, $planet, false); break; case 'clear': que_delete(QUE_RESEARCH, $user, $planet, true); break; //case 'build':$operation_result = eco_bld_tech_research($user, $planet);break; } $template = gettemplate('buildings_research', true); if (!empty($operation_result)) { $template->assign_block_vars('result', $operation_result); } $fleet_list = flt_get_fleets_to_planet($planet); $ques = que_get($user['id'], QUE_RESEARCH); $que =& $ques['ques'][QUE_RESEARCH][$user['id']][0]; que_tpl_parse($template, QUE_RESEARCH, $user, null, $que); $in_que =& $ques['in_que'][QUE_RESEARCH][$user['id']][0]; foreach (sn_get_groups('tech') as $unit_id) { if (eco_can_build_unit($user, $planet, $unit_id) != BUILD_ALLOWED) { continue; } $level_base = mrc_get_level($user, '', $unit_id, false, true); $level_effective = mrc_get_level($user, '', $unit_id); $level_in_que = $in_que[$unit_id]; $level_bonus = max(0, $level_effective - $level_base); $level_base_and_que = $level_base + $level_in_que; $build_data = eco_get_build_data($user, $planet, $unit_id, $level_base_and_que); $temp[RES_METAL] = floor($planet['metal'] - $build_data[BUILD_CREATE][RES_METAL]); $temp[RES_CRYSTAL] = floor($planet['crystal'] - $build_data[BUILD_CREATE][RES_CRYSTAL]); $temp[RES_DEUTERIUM] = floor($planet['deuterium'] - $build_data[BUILD_CREATE][RES_DEUTERIUM]); $template->assign_block_vars('production', array('ID' => $unit_id, 'NAME' => $lang['tech'][$unit_id], 'DESCRIPTION' => $lang['info'][$unit_id]['description_short'], 'LEVEL_OLD' => $level_base, 'LEVEL_BONUS' => $level_bonus, 'LEVEL_NEXT' => $level_base + $level_in_que + 1, 'LEVEL_QUED' => $level_in_que, 'LEVEL' => $level_base_and_que, 'BUILD_CAN' => $build_data['CAN'][BUILD_CREATE], 'TIME' => pretty_time($build_data[RES_TIME][BUILD_CREATE]), 'METAL' => $build_data[BUILD_CREATE][RES_METAL], 'CRYSTAL' => $build_data[BUILD_CREATE][RES_CRYSTAL], 'DEUTERIUM' => $build_data[BUILD_CREATE][RES_DEUTERIUM], 'METAL_PRINT' => pretty_number($build_data[BUILD_CREATE][RES_METAL], true, $planet['metal']), 'CRYSTAL_PRINT' => pretty_number($build_data[BUILD_CREATE][RES_CRYSTAL], true, $planet['crystal']), 'DEUTERIUM_PRINT' => pretty_number($build_data[BUILD_CREATE][RES_DEUTERIUM], true, $planet['deuterium']), 'METAL_REST' => pretty_number($temp[RES_METAL], true, true), 'CRYSTAL_REST' => pretty_number($temp[RES_CRYSTAL], true, true), 'DEUTERIUM_REST' => pretty_number($temp[RES_DEUTERIUM], true, true), 'METAL_REST_NUM' => $temp[RES_METAL], 'CRYSTAL_REST_NUM' => $temp[RES_CRYSTAL], 'DEUTERIUM_REST_NUM' => $temp[RES_DEUTERIUM], 'METAL_FLEET' => pretty_number($temp[RES_METAL] + $fleet_list['own']['total'][RES_METAL], true, true), 'CRYSTAL_FLEET' => pretty_number($temp[RES_CRYSTAL] + $fleet_list['own']['total'][RES_CRYSTAL], true, true), 'DEUTERIUM_FLEET' => pretty_number($temp[RES_DEUTERIUM] + $fleet_list['own']['total'][RES_DEUTERIUM], true, true), 'BUILD_CAN2' => $build_data['CAN'][BUILD_CREATE])); } // if(count($que['ques'][$que_id][$user['id']][$planet_id]) >= que_get_max_que_length($user, $planet, $que_id, $que_data)) $template->assign_vars(array('QUE_ID' => QUE_RESEARCH, 'FLEET_OWN_COUNT' => $fleet_list['own']['count'], 'ARTIFACT_ID' => ART_HEURISTIC_CHIP, 'ARTIFACT_LEVEL' => mrc_get_level($user, array(), ART_HEURISTIC_CHIP), 'ARTIFACT_NAME' => $lang['tech'][ART_HEURISTIC_CHIP], 'REQUEST_URI' => $_SERVER['REQUEST_URI'], 'PAGE_HEADER' => $page_header = $lang['tech'][UNIT_TECHNOLOGIES] . ($user['user_as_ally'] ? " {$lang['sys_of_ally']} {$user['username']}" : ''), 'CONFIG_RESEARCH_QUE' => $config->server_que_length_research)); display(parsetemplate($template), $page_header); }
function sendpassemail($emailaddress, $password, $username, $code) { global $lang, $game_config; $parse = $lang; $parse['password'] = $password; $parse['username'] = $username; $parse['uni'] = UNIVERSE; $parse['game'] = $game_config['game_name']; $parse['GAMEURL'] = GAMEURL; $parse['ADMIN_NAME'] = ADMIN_NAME; $parse['validate_url'] = GAMEURL . '/login.php?GET_LOGIN=1&username='******'&password='******'&UNI=' . UNIVERSE . '&go=./?page=validate--code=' . $code; $status = mymail($emailaddress, $lang['mail_title'] . $parse['game'], parsetemplate(gettemplate('emails/reg'), $parse)); return $status; }