本文整理汇总了PHP中template_out函数的典型用法代码示例。如果您正苦于以下问题:PHP template_out函数的具体用法?PHP template_out怎么用?PHP template_out使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了template_out函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: login_error
function login_error($error_msg)
{
global $tpl;
$modul_name = "acp_login";
$tpl->assign('if_disable_menu', 1);
$tpl->assign('LITO_ERROR_MSG', $error_msg);
$tpl->assign('if_login_error', 1);
template_out('login.html', $modul_name);
}
示例2: show_error
function show_error($error_msg, $from_modul, $load_from_lang = 1)
{
global $tpl, $db, $n, $userdata, $lang_suffix;
if ($load_from_lang == 1) {
$lang_file = LITO_LANG_PATH . $from_modul . '/lang_' . $lang_suffix . '.php';
$tpl->config_load($lang_file);
$tpl->assign('LITO_ERROR_MSG', $tpl->get_config_vars($error_msg));
} else {
$tpl->assign('LITO_ERROR_MSG', $error_msg);
}
$tpl->assign('if_login_error', 1);
template_out('error.html', 'core');
exit;
}
示例3: template_out
}
if ($action == "main") {
template_out('main.html', $modul_name);
}
if ($action == "listmod") {
$mods_q = $db->query("SELECT `modul_admin_id`, `modul_name`, `modul_description`, `acp_modul`, `perm_lvl` FROM `cc" . $n . "_modul_admin` WHERE `acp_modul` = '1'");
$mods = array();
$i = 0;
while ($mod = $db->fetch_array($mods_q)) {
$mods[$i]['id'] = $mod['modul_admin_id'];
$mods[$i]['name'] = $mod['modul_name'];
$mods[$i]['description'] = $mod['modul_description'];
$mods[$i]['perm'] = $mod['perm_lvl'];
$i++;
}
$tpl->assign('mods', $mods);
template_out('listmod.html', $modul_name);
}
if ($action == "listgroup") {
$groups_q = $db->query("SELECT `id`, `name`, `perm_lvl` FROM `cc" . $n . "_user_groups`");
$groups = array();
$i = 0;
while ($group = $db->fetch_array($groups_q)) {
$groups[$i]['id'] = $group['id'];
$groups[$i]['name'] = $group['name'];
$groups[$i]['perm'] = $group['perm_lvl'];
$i++;
}
$tpl->assign('groups', $groups);
template_out('listgroup.html', $modul_name);
}
示例4: header
exit;
}
$_GET['id'] = $_GET['id'] * 1;
$db->query("UPDATE `cc" . $n . "_users` SET `design_id` = '" . $_GET['id'] . "' WHERE `userid` = '" . $_SESSION['userid'] . "'");
header("Location:" . LITO_ROOT_PATH_URL);
}
if ($action == "main") {
$themes_q = $db->query("SELECT `design_id`, `design_name`, `design_author`, `design_copyright`, `design_author_mail`, `design_author_web`, `design_description`, `aktive`, `alternate_permit` FROM `cc" . $n . "_desigs`");
$themes = array();
$i = 0;
while ($theme = $db->fetch_array($themes_q)) {
$themes[$i]['id'] = $theme['design_id'];
$themes[$i]['name'] = $theme['design_name'];
$themes[$i]['author'] = $theme['design_author'];
$themes[$i]['copy'] = $theme['design_copyright'];
$themes[$i]['mail'] = $theme['design_author_mail'];
if (!preg_match('!^http://!', $theme['design_author_web'])) {
$theme['design_author_web'] = 'http://' . $theme['design_author_web'];
}
$themes[$i]['web'] = $theme['design_author_web'];
$themes[$i]['description'] = $theme['design_description'];
$themes[$i]['aktive'] = $theme['aktive'];
$themes[$i]['alt'] = $theme['alternate_permit'];
$i++;
}
$tpl->assign('themes', $themes);
template_out('main.html', $modul_name);
}
?>
示例5: str_replace
$text = str_replace($order, $replace, $text);
$text = nl2br($text);
$sql = "INSERT into cc" . $n . "_news (user_id,heading,date,text) VALUES('{$_SESSION['userid']}','{$heading}','{$date}','" . $text . "')";
$update = $db->query($sql);
}
header("LOCATION: " . LITO_MODUL_PATH_URL . "acp_news/news.php");
exit;
}
if ($action == "edit") {
$news_id = intval($_GET['id']);
$result_news = $db->query("SELECT * FROM cc" . $n . "_news where news_id ='{$news_id}'");
$row = $db->fetch_array($result_news);
$tpl->assign('NEWS_OVER', $row['heading']);
$tpl->assign('ACTION_SAVE', 'update&id=' . $news_id);
$tpl->assign('NEWS_TEXT_LANG', $row['text']);
template_out('news_new.html', $modul_name);
}
if ($action == "update") {
$news_id = intval($_GET['id']);
if (empty($_POST['new_news']) || empty($_POST['new_news'])) {
error_msg($l_emptyfield_error);
} else {
$text = mysql_real_escape_string(trim($_POST['new_news']));
$heading = mysql_real_escape_string(trim($_POST['heading']));
if ($heading == "") {
$heading = "no input";
}
$date = date("d.m.Y, H:i");
$sql = "update cc" . $n . "_news set user_id='{$_SESSION['userid']}' ,heading= '{$heading}' ,date='{$date}',text='" . nl2br($text) . "' where news_id ='{$news_id}'";
$update = $db->query($sql);
}
示例6: Copyright
Litotex Browsergame - Engine
http://www.Litotex.de
http://www.freebg.de
Copyright (c) 2008 FreeBG Team
************************************************************
Hinweis:
Diese Software ist urheberrechtlich gesch�tzt.
F�r jegliche Fehler oder Sch�den, die durch diese Software
auftreten k�nnten, �bernimmt der Autor keine Haftung.
Alle Copyright - Hinweise innerhalb dieser Datei
d�rfen WEDER entfernt, NOCH ver�ndert werden.
************************************************************
Released under the GNU General Public License
************************************************************
*/
$modul_name = "index";
require "./../../includes/global.php";
if (is_modul_name_aktive($modul_name) == 0) {
show_error('MODUL_LOAD_ERROR', 'core');
exit;
}
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
} else {
$action = "main";
}
if ($action == "main") {
$tpl->assign('if_disable_menu', 1);
template_out('index.html', $modul_name);
exit;
}
示例7: template_out
$tpl->assign('ras', $ras);
$tpl->assign('load_name', $load_name);
$tpl->assign('load_ress_1', $load_ress_1);
$tpl->assign('load_ress_2', $load_ress_2);
$tpl->assign('load_ress_3', $load_ress_3);
$tpl->assign('load_ress_4', $load_ress_4);
$tpl->assign('buildtime', $load_buildtime);
$tpl->assign('load_points', $load_points);
$tpl->assign('load_required', $load_required);
$tpl->assign('load_b_pic', $load_b_pic);
$tpl->assign('description', $description);
$tpl->assign('make_aktion', $make_aktion);
$tpl->assign('error_buildings', $error_buildings);
$tpl->assign('build_option', $build_option);
$tpl->assign('positions', $positions);
template_out('edit_explore.html', $modul_name);
exit;
}
if ($action == "update") {
$name = trim($_POST['explorename']);
$explorepic = trim($_POST['buildpic']);
$gold = intval($_POST['kost1']);
$stone = intval($_POST['kost2']);
$oil = intval($_POST['kost3']);
$exp = intval($_POST['kost4']);
$race = intval($_POST['rasse']);
$buildtime = intval($_POST['buildtime']);
$points = intval($_POST['points']);
$required = intval($_POST['required']);
$explore_id = intval($_GET['id']);
$b_option = trim($_POST['build_option']);
示例8: make_timebanner
}
$endtime = $row['endtime'] - ($requesttime - $time_for_one);
$backurl = "build_units.php";
$time_one = make_timebanner($starttime, $endtime, $y, $backurl);
} else {
$time_one = $buildunits10;
}
$message = "<br><a href=\"{$cancelURL}\">{$buildunits11}</a>";
$new_found_inhalt_loop = array($z, $name, $numOfMans, $time_one, $time_ready, $message);
array_push($new_found_loop, $new_found_inhalt_loop);
}
}
if ($z != 0) {
$tpl->assign('loop', $new_found_loop);
}
template_out('build_units.html', $modul_name);
exit;
}
if ($action == "create") {
$num = intval($_POST['num']);
$soid = intval($_GET['soid']);
if ($num == 0 || $soid == 0 || $num < 0) {
show_error('BUILD_UNITS_14', $modul_name);
exit;
}
$result = $db->query("SELECT * FROM cc" . $n . "_soldiers WHERE sid='{$soid}'");
$row = $db->fetch_array($result);
$row['res1'] = $row['res1'] * $num;
$row['res2'] = $row['res2'] * $num;
$row['res3'] = $row['res3'] * $num;
$row['res4'] = $row['res4'] * $num;
示例9: template_out
$tpl->assign('load_ress_2', $load_ress_2);
$tpl->assign('load_ress_3', $load_ress_3);
$tpl->assign('load_ress_4', $load_ress_4);
$tpl->assign('load_size', $load_size);
$tpl->assign('load_points', $load_points);
$tpl->assign('load_buildtime', $load_buildtime);
$tpl->assign('load_ap', $load_ap);
$tpl->assign('load_vp', $load_vp);
$tpl->assign('load_req_level', $load_req_level);
$tpl->assign('load_b_pic', $load_b_pic);
$tpl->assign('description', $description);
$tpl->assign('make_aktion', $make_aktion);
$tpl->assign('required', $required);
$tpl->assign('error_buildings', $error_buildings);
$tpl->assign('positions', $positions);
template_out('edit_units.html', $modul_name);
exit;
}
if ($action == "update") {
$name = trim($_POST['buildingname']);
$rasse = intval($_POST['rasse']);
$gold = intval($_POST['kost1']);
$stone = intval($_POST['kost2']);
$oil = intval($_POST['kost3']);
$exp = intval($_POST['kost4']);
//$bauzeit=intval($_POST['bauzeit']);
$reisezeit = intval($_POST['traveltime']);
$einmheiten_id = intval($_GET['id']);
$ap = intval($_POST['value_ap']);
$vp = intval($_POST['value_vp']);
$point = intval($_POST['points']);
示例10: Copyright
************************************************************
Litotex Browsergame - Engine
http://www.Litotex.de
http://www.freebg.de
Copyright (c) 2008 FreeBG Team
************************************************************
Hinweis:
Diese Software ist urheberrechtlich gesch�tzt.
F�r jegliche Fehler oder Sch�den, die durch diese Software
auftreten k�nnten, �bernimmt der Autor keine Haftung.
Alle Copyright - Hinweise innerhalb dieser Datei
d�rfen WEDER entfernt, NOCH ver�ndert werden.
************************************************************
Released under the GNU General Public License
************************************************************
*/
$modul_name = "screenshot";
require "./../../includes/global.php";
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
} else {
$action = "main";
}
if (is_modul_name_aktive($modul_name) == 0) {
show_error('MODUL_LOAD_ERROR', 'core');
exit;
}
if ($action == "main") {
template_out('screenshot.html', $modul_name);
exit;
}
示例11: make_timebanner
$cancelURL = "exploring.php?eid={$userdata['eid']}&action=del";
$message = make_timebanner($userdata['startexploretime'], $userdata['endexploretime'], $row_explores['eid'], "") . "<br><a href=\"{$cancelURL}\">" . $exploreabort . "</a>";
} else {
$es_wird_gebaut = 1;
$message = 'Es wird bereits geforscht! ';
}
} else {
$message = "<a href=\"exploring.php?action=explore&eid={$row_explores['eid']}\">{$explore}</a>";
}
$image = "\"" . $row_explores['explorePic'] . "\"";
$new_found_inhalt = array($image, $row_explores['name'], $size, $row_explores['description'], $anzeige_res1, $anzeige_res2, $anzeige_res3, $anzeige_res4, $buildtime, $message);
array_push($new_found, $new_found_inhalt);
}
}
$tpl->assign('daten', $new_found);
template_out('exploring.html', $modul_name);
exit;
}
if ($action == "explore") {
$eid = intval($_GET['eid']);
if (!$eid) {
show_error('EXPLORING_ERROR_1', $modul_name);
exit;
}
$result = $db->query("SELECT * FROM cc" . $n . "_explore WHERE eid='{$eid}'");
$row = $db->fetch_array($result);
if ($row['required'] > $userdata['build_explore']) {
show_error('EXPLORING_ERROR_2', $modul_name);
exit;
}
$res1 = $row['res1'] * ($userdata[$row['tabless']] + 1);
示例12: get_name_from_explore
$inhalt[$i]['req1'] = get_name_from_explore($req1, $race_id) . " ( " . $req_lv . ")";
$inhalt[$i]['req2'] = $userdata[$req1];
$i++;
}
} else {
if ($techtree_type == "2") {
/* Build the Tabless Names */
$Tabless = array();
$i = 0;
$result = $db->query("SELECT * FROM `cc" . $n . "_explore` WHERE race= '" . $race_id . "'");
while ($row = $db->fetch_array($result)) {
$single = $row['tabless'];
$name = $row['name'];
$image = $row['explorePic'];
$req = $row['required'];
$req_lv = $userdata[$single];
$b_name = get_buildings_name('build_explore', $userdata['race']);
$inhalt[$i]['name'] = $name . " (" . $userdata[$single] . ")";
$inhalt[$i]['image'] = $image;
$inhalt[$i]['req1'] = $b_name . " " . $req;
$inhalt[$i]['req2'] = $userdata['build_explore'];
$inhalt[$i]['description'] = $row['description'];
$i++;
}
}
}
}
$tpl->assign('daten', $inhalt);
template_out('techtree.html', $modul_name);
exit;
}
示例13: while
$angreifer_name = $row_angreifer['username'];
$count++;
$battle_def[$battle_def_count]['angreifer_name'] = $angreifer_name;
$battle_def[$battle_def_count]['angreifer_land'] = $angreifer_land;
$battle_def[$battle_def_count]['group_name'] = $group_name;
$battle_def[$battle_def_count]['request_counter'] = $request_counter;
$battle_def[$battle_def_count]['request_battle_counter'] = $request_battle_counter;
$battle_def_count++;
}
$tpl->assign('daten_battle_def', $battle_def);
$result = $db->query("SELECT * FROM cc" . $n . "_groups WHERE islandid = '{$userdata['activeid']}' AND group_status = 0");
while ($row = $db->fetch_array($result)) {
$groups .= "<option value=\"" . $row['groupid'] . "\">" . $row['name'] . "</option>";
}
$tpl->assign('groups', $groups);
template_out('battle.html', $modul_name);
exit;
}
if ($action == "send") {
$endx = intval($_POST['endx']);
$endy = intval($_POST['endy']);
$groupid = intval($_POST['groupid']);
if (!$endx || $endx < 0 || !$endy || $endy < 0) {
show_error('LM_system_e', $modul_name);
exit;
}
$result = $db->query("SELECT * FROM cc" . $n . "_countries WHERE x='{$endx}' AND y='{$endy}'");
$row = $db->fetch_array($result);
$target_user_id = $row['userid'];
$result2 = $db->query("SELECT * FROM cc" . $n . "_users WHERE userid='" . $row['userid'] . "'");
$row2 = $db->fetch_array($result2);
示例14: trim
}
$result = $db->query("SELECT * FROM cc" . $n . "_allianz WHERE aid='{$id}'");
$row = $db->fetch_array($result);
$banner = trim($row['imageurl']);
if ($banner == "") {
$banner = LITO_IMG_PATH_URL . $modul_name . "/no_ali_banner.png";
}
$description = bb2html($row['text_long']);
$ibit = "";
$result = $db->query("SELECT userid,username,is_ali_admin,status FROM cc" . $n . "_users WHERE allianzid='{$id}' ORDER BY is_ali_admin DESC");
while ($i = $db->fetch_array($result)) {
$ibit .= generate_messagelink_smal($i[username]) . " " . generate_userlink($i[userid], $i[username]);
if ($i['is_ali_admin'] == 1) {
$ibit .= " (Leiter)";
}
$ibit .= " {$img}<br>";
}
$is_in_ali = 0;
if (intval($userdata['allianzid']) > 0) {
$is_in_ali = 1;
}
$tpl->assign('is_in_ali', $is_in_ali);
$tpl->assign('banner', $banner);
$tpl->assign('name', $row['name']);
$tpl->assign('text', $row['text']);
$tpl->assign('points', intval($row['points']));
$tpl->assign('ibit', $ibit);
$tpl->assign('description', $description);
$tpl->assign('ali_id', $row['aid']);
template_out('alliance.html', $modul_name);
}
示例15: strftime
}
$alli = $row['allianzid'];
$chpt = $row['points'] - $row['lastpoints'];
$lastlog = strftime("%d.%m. %H:%M", $row['lastlogin']);
if ($row['allianzid'] == 0) {
$allianzname = "";
} else {
$allianzname = allianz($row['allianzid']);
}
$userpic = "";
if ($row['userpic'] == "") {
$userpic = LITO_IMG_PATH_URL . "members/no_user_pic.jpg";
} else {
$userpic = $row['userpic'];
}
$daten[$i]['profile_link'] = generate_userlink($row['userid'], $row['username']);
$daten[$i]['name'] = $username;
$daten[$i]['u_points'] = $userpoints;
$daten[$i]['image'] = $userpic;
$daten[$i]['u_online'] = $online;
$daten[$i]['lastlogin'] = $lastlog;
$daten[$i]['alianz'] = $allianzname;
$daten[$i]['message'] = generate_messagelink_smal($username);
$i++;
}
if ($i > 0) {
$tpl->assign('daten', $daten);
}
template_out('search.html', $modul_name);
exit;
}