当前位置: 首页>>代码示例>>PHP>>正文


PHP parsetemplate函数代码示例

本文整理汇总了PHP中parsetemplate函数的典型用法代码示例。如果您正苦于以下问题:PHP parsetemplate函数的具体用法?PHP parsetemplate怎么用?PHP parsetemplate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了parsetemplate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ShowLeftMenu

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'] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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);
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:28,代码来源:ShowLeftMenu.php

示例2: ShowPlanetMenu

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&nbsp;ocupados:&nbsp;" . $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'] . "&nbsp;</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&nbsp;ocupados:&nbsp;" . $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'] . "&nbsp;</font><font color=#FE9A2E><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[" . $p['galaxy'] . ":" . $p['system'] . ":" . $p['planet'] . "]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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);
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:34,代码来源:ShowPlanetMenu.php

示例3: ShowImperiumPage

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'] . '&amp;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'] . '&amp;re=0&amp;planettype=' . $p['planet_type'] . '">' . pretty_number($p['metal']) . '</a> / ' . pretty_number($p['metal_perhour']), '<a href="game.php?page=resources&cp=' . $p['id'] . '&amp;re=0&amp;planettype=' . $p['planet_type'] . '">' . pretty_number($p['crystal']) . '</a> / ' . pretty_number($p['crystal_perhour']), '<a href="game.php?page=resources&cp=' . $p['id'] . '&amp;re=0&amp;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']}&amp;re=0&amp;planettype={$p['planet_type']}\">{$p[$resource[$i]]}</a>" : (in_array($i, $reslist['tech']) ? "<a href=\"game.php?page=buildings&mode=research&cp={$p['id']}&amp;re=0&amp;planettype={$p['planet_type']}\">{$CurrentUser[$resource[$i]]}</a>" : (in_array($i, $reslist['fleet']) ? "<a href=\"game.php?page=buildings&mode=fleet&cp={$p['id']}&amp;re=0&amp;planettype={$p['planet_type']}\">{$p[$resource[$i]]}</a>" : (in_array($i, $reslist['defense']) ? "<a href=\"game.php?page=buildings&mode=defense&cp={$p['id']}&amp;re=0&amp;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);
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:32,代码来源:ShowImperiumPage.php

示例4: ShowTechTreePage

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));
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:35,代码来源:ShowTechTreePage.php

示例5: echo_buildinglist

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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:30,代码来源:buildings.php

示例6: ShowLeftMenu

/**
 * 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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:37,代码来源:adminmenu.php

示例7: 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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:28,代码来源:leftmenu.php

示例8: ElementBuildListQueue

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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:25,代码来源:ElementBuildListQueue.php

示例9: 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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:29,代码来源:leftmenu.php

示例10: 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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:25,代码来源:einstellung_az.php

示例11: 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);
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:33,代码来源:ShowTopKB.php

示例12: ShowLeftMenu

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);
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:28,代码来源:ShowLeftMenu.php

示例13: sendpassemail

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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:7,代码来源:reg.php

示例14: 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);
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:27,代码来源:ShowGouv.php

示例15: BuildFlyingFleetTable

/**
 * 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;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:37,代码来源:BuildFlyingFleetTable.php


注:本文中的parsetemplate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。