本文整理汇总了PHP中print_page函数的典型用法代码示例。如果您正苦于以下问题:PHP print_page函数的具体用法?PHP print_page怎么用?PHP print_page使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildpg_main
function buildpg_main()
{
global $x7s;
$page = '';
if (!$x7s->sheet_ok) {
$body = buildpg();
} else {
header("Location: index.php");
}
print_page($body);
}
示例2: management_addlogentry
/**
* Add an entry to the modlog
*
* @param string $entry Entry text
* @param integer $category Category to file under. 0 - No category, 1 - Login, 2 - Cleanup/rebuild boards and html files, 3 - Board adding/deleting, 4 - Board updates, 5 - Locking/stickying, 6 - Staff changes, 7 - Thread deletion/post deletion, 8 - Bans, 9 - News, 10 - Global changes, 11 - Wordfilter
* @param string $forceusername Username to force as the entry username
*/
function management_addlogentry($entry, $category = 0, $forceusername = '')
{
global $tc_db;
$username = $forceusername == '' ? $_SESSION['manageusername'] : $forceusername;
if ($entry != '') {
$tc_db->Execute("INSERT INTO `" . KU_DBPREFIX . "modlog` ( `entry` , `user` , `category` , `timestamp` ) VALUES ( " . $tc_db->qstr($entry) . " , '" . $username . "' , " . $tc_db->qstr($category) . " , '" . time() . "' )");
}
if (KU_RSS) {
require_once KU_ROOTDIR . 'inc/classes/rss.class.php';
$rss_class = new RSS();
print_page(KU_BOARDSDIR . 'modlogrss.xml', $rss_class->GenerateModLogRSS($entry), '');
}
}
示例3: roomdescr_main
function roomdescr_main()
{
global $x7s;
$page = '';
$body = '<script type="text/javascript" language="javascript">
function apri_negozio() {
hndl = window.open("index.php?act=shop","shop",
"width=800,height=720, toolbar=no, status=no, location=no, menubar=no, resizable=no, scrollbars=no");
hndl.focus();
}
</script>
';
$body .= roomdescr();
print_page($body);
}
示例4: resurgo_main
function resurgo_main()
{
global $x7s;
$body = '';
if ($x7s->status == "Morto") {
$body = '<table><tr><td id="inner_resurgo">Risorgerai tra:<br><span class="CountDownPanel" id="CountDownPanel" time_format="%h:%m:%s"></span></td></tr></table>
<script type="text/javascript" src="sources/AdvancedCountDown.js"> </script>
<script type="text/javascript">
ActivateCountDown("CountDownPanel", ' . $x7s->resurgo . ', null);
</script>';
}
print_page($body);
}
示例5: print_page
<?php
require_once "user.inc.php";
if ($user['login_id'] != 1 && (OWNER_ID != 0 && $user['login_id'] != OWNER_ID)) {
print_page("Admin", $st[142]);
exit;
}
//db_connect();
//create a 'query', which can be used to determine info.
db("select * from {$db_name}_users limit 1");
//max number of players that can be shown on a graph.
$players_selected = 11;
if ($graph_db < 0) {
if ($graph_db == -1) {
$element = "page_views";
} elseif ($graph_db == -2) {
$element = "login_count";
} else {
$element = "num_games_joined";
}
$db = "user_accounts";
} elseif (isset($graph_db) && mysql_field_type($query, $graph_db) == "int") {
$db = $db_name . "_users";
$element = mysql_field_name($query, $graph_db);
} elseif (!isset($graph_db)) {
$graph_db = "";
}
if (!isset($element)) {
$element = "";
}
//type of graph.
示例6: ship_status_checker
function ship_status_checker($allow_access = 0)
{
global $user, $db_name, $rs, $GAME_VARS, $user_ship, $cw, $st;
//check to see if the ship is engaged in battle.
if ($user_ship['ship_engaged'] > time()) {
print_page($cw['ship_occupied'], $st[194]);
}
//skip for the admins.
if ($user['login_id'] == 1 || $user['login_id'] == OWNER_ID) {
return true;
}
//count the number of ships the user has.
db("select count(ship_id) as ships from {$db_name}_ships where login_id = '{$user['login_id']}'");
$numships = dbr(1);
if ($numships['ships'] > 0) {
//player is alive.
return true;
}
//game is in SD
if ($GAME_VARS['sudden_death'] == 1) {
//find out message info.
db("select count(message_id) from {$db_name}_messages where login_id = '{$user['login_id']}'");
$counted = dbr();
if ($counted[0] == 0) {
$rs = "<p />" . $cw['no_messages'];
} else {
$rs = "<p /><a href='mpage.php'>You have <b>{$counted['0']}</b> " . $cw['messages'] . "</a>";
}
$rs .= "<br /><a href='forum.php'>" . $cw['forum'] . "</a>";
print_page($cw['sudden_death'], $st[195]);
//player is allowed access to this page, even though is dead.
} elseif ($allow_access == 1) {
return false;
//access to this page is denied without a ship
} else {
print_page($cw['sudden_death'], $st[196]);
}
}
示例7: load_admin_vars
$out .= "<a href='{$_SERVER['PHP_SELF']}?ban=1'>Ban Player</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?update_scores=1'>Update Scores</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?more_money=1'>Give Money</a><p />";
$out .= "General:<br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?admin_name=1'>Change Admin Name</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?email=1'>Change Admin E-mail</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?descr=1'>Change Game Description</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?messag=1'>Change Intro Message</a><br />";
$out .= "<a href='{$directories['includes']}/other_admin.php?admin_readme=1'>Admin Readme!</a><br />";
$out .= "<form action='{$_SERVER['PHP_SELF']}' name='get_var_form' method='post'>";
$out .= "<input type='hidden' name='save_vars' value='1' />";
$out .= "<input type='submit' value='Submit Vars' />";
$out .= "<p />Note: Only variables that are within range will be saved.";
//load the vars that are in the DB for this. File vars may be outdated.
load_admin_vars();
db2("select name, min, max, description from se_db_vars order by name");
$out .= list_options(1, $GAME_VARS);
$db_var = dbr(1);
while ($db_var) {
if ($db_var['value'] < $db_var['min'] || $db_var['value'] > $db_var['max']) {
//error checking
$db_var['value'] = $db_var['default_value'];
}
$out .= "<p /><table border=2 cellspacing=1 width=350><tr bgcolor='#333333' width='350'><td width='250'><b><font color='#AAAAEE'>{$db_var['name']}</font></b> ( {$db_var['min']} .. {$db_var['max']} )</td><td align='right' width='100'><input type='text' name='{$db_var['name']}' value='{$db_var['value']}' size='8' /></td></tr><tr bgcolor='#555555' width='350'><td colspan='2' width='350'><blockquote>{$db_var['descript']} <p />Server Default: <b>{$db_var['default_value']}</b></blockquote></td></tr></table><br />";
$db_var = dbr(1);
}
$out .= "<p /><input type='submit' value='Submit Vars' />";
$out .= "<br /></form>";
$rs = "<p /><a href='location.php'>Back to Star System</a>";
print_page("Admin", $out);
示例8: array
}
// No group members
if ($group_info['group_type'] == GROUP_HIDDEN && !$is_group_member && !$is_moderator) {
$template->assign_block_vars('switch_hidden_group', array());
}
// Pending
if ($is_moderator) {
$modgroup_pending_list = DB()->fetch_rowset("\n\t\t\t\t\tSELECT u.username, u.avatar_ext_id, u.user_rank, u.user_id, u.user_opt, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email\n\t\t\t\t\tFROM " . BB_USER_GROUP . " ug, " . BB_USERS . " u\n\t\t\t\t\tWHERE ug.group_id = {$group_id}\n\t\t\t\t\t\tAND ug.user_pending = 1\n\t\t\t\t\t\tAND u.user_id = ug.user_id\n\t\t\t\t\tORDER BY u.username\n\t\t\t\t\tLIMIT 200\n\t\t\t\t");
$modgroup_pending_count = count($modgroup_pending_list);
}
if ($is_moderator && $modgroup_pending_list) {
foreach ($modgroup_pending_list as $i => $member) {
$user_id = $member['user_id'];
generate_user_info($member, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar);
$row_class = !($i % 2) ? 'row1' : 'row2';
$user_select = '<input type="checkbox" name="member[]" value="' . $user_id . '">';
$template->assign_block_vars('pending', array('ROW_CLASS' => $row_class, 'AVATAR_IMG' => $avatar, 'USER' => profile_url($member), 'FROM' => $from, 'JOINED' => $joined, 'POSTS' => $posts, 'USER_ID' => $user_id, 'PM' => $pm, 'EMAIL' => $email));
}
$template->assign_vars(array('PENDING_USERS' => true));
}
$template->assign_vars(array('MEMBERS' => true));
}
if ($is_moderator) {
$template->assign_block_vars('switch_mod_option', array());
$template->assign_block_vars('switch_add_member', array());
}
}
}
}
print_page('group.tpl');
示例9: q_row
$output_str .= $st[578];
}
$ship_stuff = "";
if ($user_ship['empty_bays'] != $user_ship['cargo_bays']) {
$ship_stuff .= q_row("<a href='location.php?jettison=1'>" . $cw['jettison_cargo'] . "</a>", "l_col");
}
if (config_check("er", $user_ship)) {
$ship_stuff .= q_row("<a href='location.php?emergency_return=1'>" . $cw['emergency_return'] . "!</a>", "l_col");
}
if ($user['genesis'] > 0) {
$ship_stuff .= q_row("<a href='planet_build.php?location={$user['location']}'>" . $cw['use_genesis_device'] . "</a> (<b>{$user['genesis']}</b>)", "l_col");
}
if ($user['gdt'] > 0) {
$ship_stuff .= q_row("<a href='location.php?tempo=1'>" . $cw['deployer_bulle_tempo'] . "</a> (<b>" . $user['gdt'] . "</b>)", "l_col");
}
if ($user['alpha'] > 0) {
$ship_stuff .= q_row("<a href='bombs.php?alpha=1'>" . $cw['deploy_alpha_bomb'] . "</a> (<b>{$user['alpha']}</b>)", "l_col");
}
if ($user['gamma'] > 0) {
$ship_stuff .= q_row("<a href='bombs.php?bomb_type=1'>" . $cw['detonate_gamma_bomb'] . "</a> (<b>{$user['gamma']}</b>)", "l_col");
}
if ($user['delta'] > 0) {
$ship_stuff .= q_row("<a href='bombs.php?bomb_type=2'>" . $cw['delta_bomb_purge'] . "</a>!", "l_col");
}
//only make the table if it will have content
if (!empty($ship_stuff)) {
$output_str .= "<p />" . make_table2(array($cw['ship_equipement_functions']), "s_funcs");
$output_str .= $ship_stuff . "</table>";
}
print_page($cw['fleet_command'], $output_str);
示例10: make_table
$out .= " Vaisseaux <b class='b1'>{$type}</b>" . make_table(array($cw['ship_name'], $cw['abbrv'], $cw['cost']));
}
$out .= $content . "</table><p />";
}
$out .= "<p /><a href='help.php?ship_info=-1' target='_blank'>" . $st[1891] . "</a>";
//load the default earth page
} else {
if ($user_options['show_pics']) {
//$out .= " <img src='$directories[images]/places/earth.jpg' alt='A Picture of Earth' /><br />";
}
//$out .= "<b>EARTH</b> - <b class='b1'>E</b>normous <b class='b1'>A</b>nd <b class='b1'>R</b>ound <b class='b1'>T</b>erran <b class='b1'>H</b>omeworld<p />";
$out .= "<div><div style='float:left;padding:6px;'><a href='{$_SERVER['PHP_SELF']}?ship_shop=1'><img src='images/interface/ship_shop.jpg' border=0></a><br>";
$out .= "<a href='{$_SERVER['PHP_SELF']}?ship_shop=1'>" . $cw['seatogu'] . "</a>";
if ($user['ship_id'] != 1) {
$out .= " - <a href='ship_build.php?duplicate=1'>" . $cw['ship_duplicator'] . "</a>";
}
$out .= "</div>";
//$out .= "- <a href='new_ship.php?templates=1'>Templates</a><br />";
#user is only able to access bilkos, seatogus & bobs if user has no ship (admin excempt)
if ($user['ship_id'] != 1 || $user['login_id'] == 1) {
$out .= "<div style='padding:6px;'><a href='equip_shop.php'><img src='images/interface/equipment_shop.jpg' border=0></a><br><a href='equip_shop.php'>" . $cw['wally'] . "</a></div></div>";
$out .= "<div><div style='float:left;padding:6px;'><a href='upgrade.php'><img src='images/interface/upgrade_store.jpg' border=0></a><br><a href='upgrade.php'>" . $cw['vladimir'] . "</a></div>";
}
$out .= "<div style='padding:6px;'><a href='bilkos.php'><img src='images/interface/bilko.jpg' border=0></a><br><a href='bilkos.php'>" . $st[788] . "</a></div></div>";
if (($user['ship_id'] != 1 || $user['login_id'] == 1) && avail_check(4001)) {
$out .= "<div style='padding:6px;'><a href='earth.php?colonist=1'><img src='images/interface/ville.jpg' border=0></a><br><a href='earth.php?colonist=1'>" . $cw['colonist_recruitment'] . "</a> - <a href='earth.php?all_colon=1'>" . $cw['fill_fleet'] . "</a></div>";
}
$rs = "<p /><a href='location.php'>" . $cw['takeoff'] . "</a><br />";
}
print_page($cw['welcome_earth'], $out);
示例11: dbn
$user_options['color_scheme'] = $_GET['keep'];
dbn("update {$db_name}_user_options set color_scheme = '" . (int) $_GET['keep'] . "' where login_id = '{$user['login_id']}'");
$error_str .= $st[974] . " <b>{$_GET['keep']}</b>.";
$error_str .= "<br />" . $st[975];
$rs .= "<br /><a href='options.php'>" . $cw['back_to_options'] . "</a>";
print_page($st[976], $error_str);
#keep new style sheet. for server
} elseif (isset($_GET['keep_server'])) {
dbn("update user_accounts set default_color_scheme = '" . (int) $_GET['keep_server'] . "' where login_id = '{$user['login_id']}'");
$error_str .= $st[977] . " <b>{$_GET['keep_server']}</b>.";
$error_str .= "<br />" . $st[978];
$rs .= "<br /><a href='options.php'>" . $cw['back_to_options'] . "</a>";
print_page($st[976], $error_str);
}
#print main page
$error_str .= "<p />" . $st[979];
$error_str .= "<p /><a href='options.php?changepass=change'>" . $st[980] . "</a>";
//$error_str .= "<br /><a href='options.php?scheme=1'>Change your Colour Scheme</a>";
$error_str .= "<br /><a href='options.php?player_op=1'>" . $st[981];
if ($user['login_id'] != 1) {
$error_str .= "<p /><a href='options.php?retire=1'>" . $st[982] . "</a>";
}
#list other options
$error_str .= "<p />" . $st[983] . ".<form method='POST' name='get_var_form' action='options.php'>";
$error_str .= "<br /><input type='submit' value=\"" . $cw['submit_vars'] . "\" />";
#select and output all the user options
db2("select * from option_list order by name asc");
$error_str .= list_options(1, $user_options);
$error_str .= "<br /><input type='hidden' name='save_vars' value='1' /><input type='submit' value=\"" . $cw['submit_vars'] . "\" /></form>";
print_page($st[984], $error_str);
示例12: array
$pgsettings = array("title" => "You Do Not Have Permission", "pageselection" => false, "nav" => true, "banner" => 1, "use_google_analytics" => 1);
require_once "includes/begin_html.php";
?>
<p>(You don't have permission to view this page.)</p><?php
}
} else {
$pgsettings = array("title" => "Unpublished", "pageselection" => false, "nav" => true, "banner" => 1, "use_google_analytics" => 1);
require_once "includes/begin_html.php";
?>
<p>(You cannot view this page, it isn't published.)</p><?php
}
}
} else {
if (mysqli_num_rows($result_homepage) != 0) {
$homepage = mysqli_fetch_array($result_homepage);
print_page($homepage);
} else {
print_page($firstpage);
}
}
} else {
$pgsettings = array("title" => "No pages!", "pageselection" => false, "nav" => true, "banner" => 1, "use_google_analytics" => 1);
require_once "includes/begin_html.php";
?>
<p>(This website has no pages to display! Admin user must go add pages in the <a href="administrator/">Control Panel</a> to add content.)</p>
<?php
}
?>
<?php
require_once "includes/end_html.php";
示例13: run_jobs
if ($cron_action == 'run' && $jobs) {
run_jobs($jobs);
} else {
if ($cron_action == 'delete' && $jobs) {
delete_jobs($jobs);
} else {
if (($cron_action == 'disable' || $cron_action == 'enable') && $jobs) {
toggle_active($jobs, $cron_action);
}
}
}
redirect('admin/' . basename(__FILE__) . '?mode=list');
} else {
if (validate_cron_post($_POST) == 1) {
if ($_POST['mode'] == 'edit') {
update_cron_job($_POST);
} else {
if ($_POST['mode'] == 'add') {
insert_cron_job($_POST);
} else {
bb_die('Mode error');
}
}
redirect('admin/' . basename(__FILE__) . '?mode=list');
} else {
bb_die(validate_cron_post($_POST));
}
}
}
print_page('admin_cron.tpl', 'admin');
示例14: ship_status_checker
<?php
require_once "user.inc.php";
$filename = "black_market.php";
$status_bar_help = "?topic=Blackmarkets";
ship_status_checker();
$error_str = "";
db("select * from {$db_name}_bmrkt where location = '{$user['location']}' order by bmrkt_type asc");
$bmrkt = dbr(1);
if (empty($bmrkt)) {
print_page($cw['port'], $st[68]);
} elseif ($GAME_VARS['uv_num_bmrkt'] == 0 && $user['login_id'] != 1) {
print_page($cw['error'], $st[69]);
}
$error_str .= sprintf($st[70], $bmrkt[bm_name]);
$error_str .= $st[71];
$error_str .= "<br /><a href='bm_ships.php?from_0=1'>" . $st[72] . "</a>";
$error_str .= "<br /><a href='bm_upgrades.php?from_0=1'>" . $st[73] . "</a>";
$rs = "<p /><a href='location.php'>" . $cw['close_contact'] . "</a><br />";
print_page($cw['blackmarket'], $error_str);
示例15: sprintf
if ($page < $num_pages) {
$pagination .= $pagination == '' ? '<a href="' . $base_url . '&sort=' . $sort . '&order=' . $order . '&page=' . ($page + 1) . '">' . $lang['NEXT'] . '</a>' : ' | <a href="' . $base_url . '&sort=' . $sort . '&order=' . $order . '&page=' . ($page + 1) . '">' . $lang['NEXT'] . '</a>';
}
if ($num_pages > 2) {
$pagination .= ' <input type="text" name="page" maxlength="5" size="2" class="post" /> <input type="submit" name="submit" value="' . $lang['GO'] . '" class="post" />';
}
$template->assign_vars(array('TPL_ADMIN_USER_SEARCH_RESULTS' => true, 'PAGE_NUMBER' => sprintf($lang['PAGE_OF'], $page, $num_pages), 'PAGINATION' => $pagination, 'NEW_SEARCH' => sprintf($lang['SEARCH_USERS_NEW'], $text, $total_pages['total'], 'admin_user_search.php'), 'U_USERNAME' => $sort == 'username' ? "{$base_url}&sort={$sort}&order={$o_order}" : "{$base_url}&sort=username&order={$order}", 'U_EMAIL' => $sort == 'user_email' ? "{$base_url}&sort={$sort}&order={$o_order}" : "{$base_url}&sort=user_email&order={$order}", 'U_POSTS' => $sort == 'posts' ? "{$base_url}&sort={$sort}&order={$o_order}" : "{$base_url}&sort=posts&order={$order}", 'U_JOINDATE' => $sort == 'regdate' ? "{$base_url}&sort={$sort}&order={$o_order}" : "{$base_url}&sort=regdate&order={$order}", 'U_LASTVISIT' => $sort == 'lastvisit' ? "{$base_url}&sort={$sort}&order={$o_order}" : "{$base_url}&sort=lastvisit&order={$order}", 'S_POST_ACTION' => "{$base_url}&sort={$sort}&order={$order}"));
if (!($result = DB()->sql_query($select_sql))) {
bb_die('Could not select user data');
}
$rowset = DB()->sql_fetchrowset($result);
$users_sql = '';
foreach ($rowset as $array) {
$users_sql .= $users_sql == '' ? $array['user_id'] : ', ' . $array['user_id'];
}
$sql = "SELECT ban_userid AS user_id FROM " . BB_BANLIST . " WHERE ban_userid IN ({$users_sql})";
if (!($result = DB()->sql_query($sql))) {
bb_die('Could not select banned data');
}
unset($banned);
$banned = array();
while ($row = DB()->sql_fetchrow($result)) {
$banned[$row['user_id']] = true;
}
for ($i = 0; $i < count($rowset); $i++) {
$row_class = !($i % 2) ? 'row1' : 'row2';
$template->assign_block_vars('userrow', array('ROW_CLASS' => $row_class, 'USER' => profile_url($rowset[$i]), 'EMAIL' => $rowset[$i]['user_email'], 'JOINDATE' => bb_date($rowset[$i]['user_regdate']), 'LASTVISIT' => bb_date($rowset[$i]['user_lastvisit']), 'POSTS' => $rowset[$i]['user_posts'], 'BAN' => !isset($banned[$rowset[$i]['user_id']]) ? $lang['NOT_BANNED'] : $lang['BANNED'], 'ABLED' => $rowset[$i]['user_active'] ? $lang['ENABLED'] : $lang['DISABLED'], 'U_VIEWPOSTS' => "../search.php?search_author=1&uid={$rowset[$i]['user_id']}", 'U_MANAGE' => '../profile.php?mode=editprofile&' . POST_USERS_URL . '=' . $rowset[$i]['user_id'] . '&admin=1', 'U_PERMISSIONS' => 'admin_ug_auth.php?mode=user&' . POST_USERS_URL . '=' . $rowset[$i]['user_id']));
}
}
print_page('admin_user_search.tpl', 'admin');