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


PHP load_admin_nav函数代码示例

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


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

示例1: IN

        $db->query('UPDATE ' . $db->prefix . 'comments SET commenter_id=1 WHERE commenter_id IN (' . implode(',', $user_ids) . ')') or error('Unable to mark comments as guest comments', __FILE__, __LINE__, $db->error());
    }
    // Regenerate the users info cache
    generate_users_info_cache();
    $users_pruned = count($user_ids);
    message_backstage(__('Pruning complete, all users that matched the requirements have been pruned.', 'luna'));
}
// Get the first comment ID from the db
$result = $db->query('SELECT id FROM ' . $db->prefix . 'comments ORDER BY id ASC LIMIT 1') or error('Unable to fetch thread info', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result)) {
    $first_id = $db->result($result);
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Maintenance', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('maintenance', 'prune');
?>

<form class="form-horizontal" id="notiprune" method="post" action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Prune notifications', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" name="notiprune" tabindex="8"><span class="fa fa-fw fa-recycle"></span> <?php 
_e('Prune', 'luna');
?>
</button></span></h3>
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:prune.php

示例2: generate_update_cache

    generate_update_cache();
    require FORUM_CACHE_DIR . 'cache_update.php';
}
$result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM ' . $db->prefix . 'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
list($stats['total_topics'], $stats['total_posts']) = array_map('intval', $db->fetch_row($result));
if ($stats['total_posts'] == 0) {
    $stats['total_posts'] == '0';
}
if ($stats['total_topics'] == 0) {
    $stats['total_topics'] == '0';
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Index', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'index');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
if (substr(sprintf('%o', fileperms(FORUM_ROOT . 'config.php')), -4) > '644') {
    ?>
<div class="alert alert-warning"><?php 
    _e('The config file is writeable at this moment, you might want to set the CHMOD to 640 or 644.', 'luna');
    ?>
</div>
<?php 
}
if ($install_file_exists) {
    ?>
<div class="alert alert-warning">
	<p><?php 
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:index.php

示例3: confirm_referrer

    confirm_referrer('backstage/theme.php');
    $default_style = htmlspecialchars($_GET["default_style"]);
    $db->query('UPDATE ' . $db->prefix . 'users SET style=\'' . $default_style . '\' WHERE id > 0') or error('Unable to set style settings', __FILE__, __LINE__, $db->error());
    $db->query('UPDATE ' . $db->prefix . 'config SET conf_value = \'' . $default_style . '\' WHERE conf_name = \'o_default_style\'') or error('Unable to update default style', __FILE__, __LINE__, $db->error());
    // Regenerate the config cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/theme.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Style', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'theme');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<div class="row">
	<div class="col-md-3">
		<div class="panel panel-default panel-current">
			<div class="panel-heading">
				<h3 class="panel-title"><?php 
_e('Current theme', 'luna');
?>
</h3>
			</div>
<?php 
$current_theme = $luna_config['o_default_style'];
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:theme.php

示例4: message_backstage

function message_backstage($message, $no_back_link = false, $http_status = null)
{
    global $luna_config;
    // Did we receive a custom header?
    if (!is_null($http_status)) {
        header('HTTP/1.1 ' . $http_status);
    }
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Info', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('info', 'info');
    ?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><?php 
    _e('Info', 'luna');
    ?>
</h3>
	</div>
	<div class="panel-body">
		<p><?php 
    echo $message;
    ?>
</p>
	</div>
</div>
<?php 
    exit;
}
开发者ID:KristopherGBaker,项目名称:Luna,代码行数:29,代码来源:functions.php

示例5: header

    header("Location: update.php");
}
if (file_exists(LUNA_CACHE_DIR . 'cache_update.php')) {
    include LUNA_CACHE_DIR . 'cache_update.php';
}
if (!defined('LUNA_UPDATE_LOADED') || $last_check_time > time() + 60 * 60 * 24) {
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_update_cache();
    require LUNA_CACHE_DIR . 'cache_update.php';
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Update', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'update');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<div class="row">
	<div class="col-sm-4 col-md-3">
		<form method="post" action="update.php">
			<input type="hidden" name="form_sent" value="1" />
			<fieldset>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title"><?php 
_e('Update ring', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:update.php

示例6: error

            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/settings.php?saved=true');
}
$timestamp = time();
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Global settings', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'settings');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<form class="form-horizontal" method="post" action="settings.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Essentials', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:settings.php

示例7: redirect

    redirect('backstage/ranks.php');
} elseif (isset($_POST['remove'])) {
    $id = intval(key($_POST['remove']));
    $db->query('DELETE FROM ' . $db->prefix . 'ranks WHERE id=' . $id) or error('Unable to delete rank', __FILE__, __LINE__, $db->error());
    // Regenerate the ranks cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_ranks_cache();
    redirect('backstage/ranks.php');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Ranks', 'luna'));
$focus_element = array('ranks', 'new_rank');
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('users', 'ranks');
if ($luna_config['o_ranks'] == 0) {
    ?>
<div class="alert alert-danger">
	<?php 
    echo sprintf(__('<strong>User ranks is disabled in %s.</strong>', 'luna'), '<a href="features.php">' . __('Features', 'luna') . '</a>');
    ?>
</div>
<?php 
}
?>
<div class="row">
	<form id="ranks" method="post" action="ranks.php">
		<div class="col-sm-4">
			<div class="panel panel-default">
				<div class="panel-heading">
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:ranks.php

示例8: str_replace

        $mail_message = str_replace('<password>', $password, $mail_message);
        $mail_message = str_replace('<login_url>', $luna_config['o_base_url'] . '/login.php', $mail_message);
        $mail_message = str_replace('<board_mailer>', $luna_config['o_board_title'], $mail_message);
        luna_mail($email1, $mail_subject, $mail_message);
    }
    // Regenerate the users info cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_users_info_cache();
    redirect('backstage/users.php?user_created=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Users', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('users', 'tools');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
if (isset($_GET['user_created'])) {
    echo '<div class="alert alert-success">' . __('User created', 'luna') . '</div>';
}
if (isset($_GET['user_failed'])) {
    echo '<div class="alert alert-danger">' . __('Failed to create user, no password was given.', 'luna') . '</div>';
}
?>
<form class="form-horizontal" method="post" action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
">
	<div class="panel panel-default">
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:tools.php

示例9: message_backstage

        }
        if ($cur_item['name'] == '') {
            message_backstage(__('You must give your menu item a title.', 'luna'));
        } elseif ($cur_item['url'] == '') {
            message_backstage(__('You must give your menu item an URL.', 'luna'));
        } elseif ($cur_item['order'] == '' || preg_match('%[^0-9]%', $cur_item['order'])) {
            message_backstage(__('Position must be a positive integer value.', 'luna'));
        } else {
            $db->query('UPDATE ' . $db->prefix . 'menu SET url=\'' . $db->escape($cur_item['url']) . '\', name=\'' . $db->escape($cur_item['name']) . '\', disp_position=' . $cur_item['order'] . ', visible=\'' . $cur_item['visible'] . '\' WHERE id=' . intval($item_id)) or error('Unable to update menu', __FILE__, __LINE__, $db->error());
        }
    }
    redirect('backstage/menu.php');
}
$result = $db->query('SELECT * FROM ' . $db->prefix . 'menu ORDER BY disp_position') or error('Unable to fetch menu items', __FILE__, __LINE__, $db->error());
require 'header.php';
load_admin_nav('settings', 'menu');
?>
<div class="row">
	<div class="col-sm-4 col-md-3">
		<form method="post" action="menu.php?action=add_item">
			<fieldset>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title"><?php 
_e('New menu item', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="add_item"><span class="fa fa-fw fa-plus"></span> <?php 
_e('Add', 'luna');
?>
</button></span></h3>
					</div>
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:menu.php

示例10: ceil

            $sort_by = 'subject ASC';
            break;
        default:
            $sort_by = 'last_post DESC';
            break;
    }
    // Determine the thread offset (based on $_GET['p'])
    $num_pages = ceil($cur_forum['num_topics'] / $luna_user['disp_topics']);
    $p = !isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages ? 1 : intval($_GET['p']);
    $start_from = $luna_user['disp_topics'] * ($p - 1);
    // Generate paging links
    $paging_links = paginate($num_pages, $p, 'moderate.php?fid=' . $fid);
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Moderate', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('content', 'moderate');
    ?>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
    _e('Moderate content', 'luna');
    ?>
</h3>
		</div>
		<div class="jumbotron jumbotron-moderate-forum">
			<h2 class="inline-block"><?php 
    printf(__('Moderating "%s"', 'luna'), luna_htmlspecialchars($cur_forum['forum_name']));
    ?>
</h2><span class="pull-right moderate-pagination"><?php 
    echo $paging_links;
    ?>
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:moderate.php

示例11: luna_trim

            $cur_cat['name'] = luna_trim($cur_cat['name']);
            $cur_cat['order'] = luna_trim($cur_cat['order']);
            if ($cur_cat['name'] == '') {
                message_backstage(__('You must enter a name', 'luna'));
            }
            if ($cur_cat['order'] == '' || preg_match('%[^0-9]%', $cur_cat['order'])) {
                message_backstage(__('Position must be a positive integer value.', 'luna'));
            }
            $db->query('UPDATE ' . $db->prefix . 'categories SET cat_name=\'' . $db->escape($cur_cat['name']) . '\', disp_position=' . $cur_cat['order'] . ' WHERE id=' . intval($cat_id)) or error('Unable to update category', __FILE__, __LINE__, $db->error());
        }
        redirect('backstage/board.php?saved=true');
    }
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Board', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('content', 'board');
    if (isset($_GET['saved'])) {
        echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
    }
    ?>
<div class="row">
	<div class="col-lg-4">
		<form method="post" action="board.php?action=add_forum">
<?php 
    $result = $db->query('SELECT id, cat_name FROM ' . $db->prefix . 'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result) > 0) {
        ?>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title"><?php 
        _e('Add forum', 'luna');
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:board.php

示例12: error

            }
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/features.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Features', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'features');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="features.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('General', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:features.php

示例13: error

        $result = $db->query('SELECT comment_id FROM ' . $db->prefix . 'reports WHERE id=' . $zap_id) or error('Unable to fetch report info', __FILE__, __LINE__, $db->error());
        $comment_id = $db->result($result);
        $db->query('UPDATE ' . $db->prefix . 'comments SET marked = 0 WHERE id=' . $comment_id) or error('Unable to zap report', __FILE__, __LINE__, $db->error());
    }
    // Delete old reports (which cannot be viewed anyway)
    $result = $db->query('SELECT zapped FROM ' . $db->prefix . 'reports WHERE zapped IS NOT NULL ORDER BY zapped DESC LIMIT 10,1') or error('Unable to fetch read reports to delete', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result) > 0) {
        $zapped_threshold = $db->result($result);
        $db->query('DELETE FROM ' . $db->prefix . 'reports WHERE zapped <= ' . $zapped_threshold) or error('Unable to delete old read reports', __FILE__, __LINE__, $db->error());
    }
    redirect('backstage/reports.php');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Reports', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('content', 'reports');
?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><?php 
_e('New reports', 'luna');
?>
</h3>
	</div>
	<form method="post" action="reports.php?action=zap">
		<fieldset>
			<table class="table">
				<thead>
					<tr>
						<th class="col-xs-2"><?php 
_e('Reported by', 'luna');
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:reports.php

示例14: message_backstage

    }
    $tablecount = $counter;
    // Optimize All
    for ($i = 1; $i <= $tablecount; $i++) {
        $sql = 'OPTIMIZE TABLE ' . $tables[$i];
        if (!($result = $db->query($sql))) {
            message_backstage(__('SQL error, optimize failed.', 'luna'));
        }
    }
    message_backstage('All tables optimized');
} else {
    $action = isset($_GET['action']) ? $_GET['action'] : null;
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Database', 'luna'));
    define('LUNA_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('maintenance', 'database');
    ?>
<form class="form-horizontal" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
    _e('Backup', 'luna');
    ?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="backupstart"><span class="fa fa-fw fa-floppy-o"></span> <?php 
    _e('Start backup', 'luna');
    ?>
</button></span></h3>
		</div>
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:database.php

示例15: error

        // Only update values that have changed
        if (array_key_exists('p_' . $key, $luna_config) && $luna_config['p_' . $key] != $input) {
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $input . ' WHERE conf_name=\'p_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    redirect('backstage/permissions.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Permissions', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('users', 'permissions');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="permissions.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Posting', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:permissions.php


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