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


PHP generate_admin_menu函数代码示例

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


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

示例1: display

 public function display()
 {
     global $lang_common, $lang_admin_common, $lang_admin_censoring;
     require FEATHER_ROOT . 'include/common_admin.php';
     if ($this->user->g_id != FEATHER_ADMIN) {
         message($lang_common['No permission'], '403');
     }
     define('FEATHER_ADMIN_CONSOLE', 1);
     // Load the admin_options.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/censoring.php';
     // Add a censor word
     if ($this->request->post('add_word')) {
         $this->model->add_word();
     } elseif ($this->request->post('update')) {
         $this->model->update_word();
     } elseif ($this->request->post('remove')) {
         $this->model->remove_word();
     }
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Censoring']);
     $focus_element = array('censoring', 'new_search_for');
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->setFocusElement($focus_element)->display();
     generate_admin_menu('censoring');
     $this->feather->render('admin/censoring.php', array('lang_admin_censoring' => $lang_admin_censoring, 'lang_admin_common' => $lang_admin_common, 'feather_config' => $this->config, 'word_data' => $this->model->get_words()));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:26,代码来源:censoring.php

示例2: display

 public function display()
 {
     global $lang_common, $lang_admin_common, $lang_admin_index;
     require FEATHER_ROOT . 'include/common_admin.php';
     if (!$this->user->is_admmod) {
         message($lang_common['No permission'], '403');
     }
     define('FEATHER_ADMIN_CONSOLE', 1);
     // Load the admin_index.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/index.php';
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Server statistics']);
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->display();
     generate_admin_menu('index');
     $total = $this->model->get_total_size();
     $this->feather->render('admin/statistics.php', array('lang_admin_common' => $lang_admin_common, 'lang_admin_index' => $lang_admin_index, 'feather_config' => $this->config, 'server_load' => $this->model->get_server_load(), 'num_online' => $this->model->get_num_online(), 'total_size' => $total['size'], 'total_records' => $total['records'], 'php_accelerator' => $this->model->get_php_accelerator(), 'feather' => $this->feather));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:18,代码来源:statistics.php

示例3: display

 public function display()
 {
     global $lang_common, $lang_admin_maintenance, $lang_admin_common;
     require FEATHER_ROOT . 'include/common_admin.php';
     if ($this->user->g_id != FEATHER_ADMIN) {
         message($lang_common['No permission'], '403');
     }
     define('FEATHER_ADMIN_CONSOLE', 1);
     // Load the admin_options.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/maintenance.php';
     $action = '';
     if ($this->request->post('action')) {
         $action = $this->request->post('action');
     } elseif ($this->request->get('action')) {
         $action = $this->request->get('action');
     }
     if ($action == 'rebuild') {
         $this->model->rebuild();
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_maintenance['Rebuilding search index']);
         $this->feather->render('admin/maintenance/rebuild.php', array('lang_admin_maintenance' => $lang_admin_maintenance, 'page_title' => $page_title));
         $query_str = $this->model->get_query_str();
         exit('<script type="text/javascript">window.location="' . get_link('admin/maintenance/') . $query_str . '"</script><hr /><p>' . sprintf($lang_admin_maintenance['Javascript redirect failed'], '<a href="' . get_link('admin/maintenance/') . $query_str . '">' . $lang_admin_maintenance['Click here'] . '</a>') . '</p>');
     }
     if ($action == 'prune') {
         $prune_from = feather_trim($this->request->post('prune_from'));
         $prune_sticky = intval($this->request->post('prune_sticky'));
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Prune']);
         define('FEATHER_ACTIVE_PAGE', 'admin');
         $this->header->setTitle($page_title)->display();
         generate_admin_menu('maintenance');
         if ($this->request->post('prune_comply')) {
             $this->model->prune_comply($prune_from, $prune_sticky);
         }
         $this->feather->render('admin/maintenance/prune.php', array('lang_admin_maintenance' => $lang_admin_maintenance, 'lang_admin_common' => $lang_admin_common, 'prune_sticky' => $prune_sticky, 'prune_from' => $prune_from, 'prune' => $this->model->get_info_prune($prune_sticky, $prune_from)));
         $this->footer->display();
     }
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Maintenance']);
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->display();
     generate_admin_menu('maintenance');
     $this->feather->render('admin/maintenance/admin_maintenance.php', array('lang_admin_maintenance' => $lang_admin_maintenance, 'lang_admin_common' => $lang_admin_common, 'first_id' => $this->model->get_first_id(), 'categories' => $this->model->get_categories()));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:43,代码来源:maintenance.php

示例4: display

 public function display()
 {
     global $lang_common, $lang_admin_common;
     require FEATHER_ROOT . 'include/common_admin.php';
     if ($this->user->g_id != FEATHER_ADMIN) {
         message($lang_common['No permission'], '403');
     }
     define('FEATHER_ADMIN_CONSOLE', 1);
     // Load the admin_options.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/options.php';
     if ($this->feather->request->isPost()) {
         $this->model->update_options();
     }
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Options']);
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->display();
     generate_admin_menu('options');
     $this->feather->render('admin/options.php', array('lang_admin_options' => $lang_admin_options, 'feather_config' => $this->config, 'feather_user' => $this->user, 'languages' => forum_list_langs(), 'styles' => $this->model->get_styles(), 'times' => $this->model->get_times(), 'feather' => $this->feather));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:20,代码来源:options.php

示例5: display

 public function display()
 {
     global $lang_common, $lang_admin_common, $lang_admin_permissions;
     require FEATHER_ROOT . 'include/common_admin.php';
     if (!$this->user->is_admmod) {
         message($lang_common['No permission'], '403');
     }
     define('FEATHER_ADMIN_CONSOLE', 1);
     // Load the admin_options.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/permissions.php';
     // Update permissions
     if ($this->feather->request->isPost()) {
         $this->model->update_permissions();
     }
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Permissions']);
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->display();
     generate_admin_menu('permissions');
     $this->feather->render('admin/permissions.php', array('lang_admin_permissions' => $lang_admin_permissions, 'lang_admin_common' => $lang_admin_common, 'feather_config' => $this->config));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:21,代码来源:permissions.php

示例6: display

 public function display($action = null)
 {
     global $lang_common, $lang_admin_common, $lang_admin_index;
     require FEATHER_ROOT . 'include/common_admin.php';
     if (!$this->user->is_admmod) {
         message($lang_common['No permission'], '403');
     }
     // Load the admin_index.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/index.php';
     define('FEATHER_ADMIN_CONSOLE', 1);
     // Check for upgrade
     if ($action == 'check_upgrade') {
         if (!ini_get('allow_url_fopen')) {
             message($lang_admin_index['fopen disabled message']);
         }
         $latest_version = trim(@file_get_contents('http://featherbb.org/latest_version'));
         if (empty($latest_version)) {
             message($lang_admin_index['Upgrade check failed message']);
         }
         if (version_compare($this->config['o_cur_version'], $latest_version, '>=')) {
             message($lang_admin_index['Running latest version message']);
         } else {
             message(sprintf($lang_admin_index['New version available message'], '<a href="http://featherbb.org/">FeatherBB.org</a>'));
         }
     } elseif ($action == 'remove_install_file') {
         $deleted = $this->remove_install_folder(FEATHER_ROOT . 'install');
         if ($deleted) {
             redirect(get_link('admin/'), $lang_admin_index['Deleted install.php redirect']);
         } else {
             message($lang_admin_index['Delete install.php failed']);
         }
     }
     $install_folder_exists = is_dir(FEATHER_ROOT . 'install');
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Index']);
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->display();
     generate_admin_menu('index');
     $this->feather->render('admin/index.php', array('lang_admin_index' => $lang_admin_index, 'install_file_exists' => $install_folder_exists, 'feather_config' => $this->config));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:40,代码来源:index.php

示例7: display

 public function display()
 {
     global $lang_common, $lang_admin_common, $lang_admin_users;
     define('FEATHER_ADMIN_CONSOLE', 1);
     require FEATHER_ROOT . 'include/common_admin.php';
     if (!$this->user->is_admmod) {
         message($lang_common['No permission'], '403');
     }
     // Load the admin_bans.php language file
     require FEATHER_ROOT . 'lang/' . $admin_language . '/users.php';
     // Move multiple users to other user groups
     if ($this->request->post('move_users') || $this->request->post('move_users_comply')) {
         if ($this->user->g_id > FEATHER_ADMIN) {
             message($lang_common['No permission'], '403');
         }
         $move = $this->model->move_users();
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Move users']);
         define('FEATHER_ACTIVE_PAGE', 'moderate');
         $this->header->setTitle($page_title)->display();
         generate_admin_menu('users');
         $this->feather->render('admin/users/move_users.php', array('lang_admin_users' => $lang_admin_users, 'lang_admin_common' => $lang_admin_common, 'move' => $move));
         $this->footer->display();
     }
     // Delete multiple users
     if ($this->request->post('delete_users') || $this->request->post('delete_users_comply')) {
         if ($this->user->g_id > FEATHER_ADMIN) {
             message($lang_common['No permission'], '403');
         }
         $user_ids = $this->model->delete_users();
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Delete users']);
         define('FEATHER_ACTIVE_PAGE', 'moderate');
         $this->header->setTitle($page_title)->display();
         generate_admin_menu('users');
         $this->feather->render('admin/users/delete_users.php', array('lang_admin_users' => $lang_admin_users, 'lang_admin_common' => $lang_admin_common, 'user_ids' => $user_ids));
         $this->footer->display();
     }
     // Ban multiple users
     if ($this->request->post('ban_users') || $this->request->post('ban_users_comply')) {
         if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) {
             message($lang_common['No permission'], '403');
         }
         $user_ids = $this->model->ban_users();
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Bans']);
         $focus_element = array('bans2', 'ban_message');
         define('FEATHER_ACTIVE_PAGE', 'moderate');
         $this->header->setTitle($page_title)->setFocusElement($focus_element)->display();
         generate_admin_menu('users');
         $this->feather->render('admin/users/ban_users.php', array('lang_admin_users' => $lang_admin_users, 'lang_admin_common' => $lang_admin_common, 'user_ids' => $user_ids));
         $this->footer->display();
     }
     // Display bans
     if ($this->request->get('find_user')) {
         // Return conditions and query string for the URL
         $search = $this->model->get_user_search();
         // Fetch user count
         $num_users = $this->model->get_num_users_search($search['conditions']);
         // Determine the user offset (based on $_GET['p'])
         $num_pages = ceil($num_users / 50);
         $p = !$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages ? 1 : intval($this->request->get('p'));
         $start_from = 50 * ($p - 1);
         // Generate paging links
         $paging_links = '<span class="pages-label">' . $lang_common['Pages'] . ' </span>' . paginate_old($num_pages, $p, '?find_user=&amp;' . implode('&amp;', $search['query_str']));
         // Some helper variables for permissions
         $can_delete = $can_move = $this->user->g_id == FEATHER_ADMIN;
         $can_ban = $this->user->g_id == FEATHER_ADMIN || $this->user->g_moderator == '1' && $this->user->g_mod_ban_users == '1';
         $can_action = ($can_delete || $can_ban || $can_move) && $num_users > 0;
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Results head']);
         $page_head = array('js' => '<script type="text/javascript" src="' . get_base_url() . '/js/common.js"></script>');
         define('FEATHER_ACTIVE_PAGE', 'admin');
         $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display();
         $this->feather->render('admin/users/find_users.php', array('lang_admin_users' => $lang_admin_users, 'lang_admin_common' => $lang_admin_common, 'search' => $search, 'start_from' => $start_from, 'can_delete' => $can_delete, 'can_ban' => $can_ban, 'can_action' => $can_action, 'can_move' => $can_move, 'user_data' => $this->model->print_users($search['conditions'], $search['order_by'], $search['direction'], $start_from)));
         $this->footer->display();
     }
     $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users']);
     $focus_element = array('find_user', 'form[username]');
     define('FEATHER_ACTIVE_PAGE', 'admin');
     $this->header->setTitle($page_title)->setFocusElement($focus_element)->display();
     generate_admin_menu('users');
     $this->feather->render('admin/users/admin_users.php', array('lang_admin_users' => $lang_admin_users, 'lang_admin_common' => $lang_admin_common, 'group_list' => $this->model->get_group_list()));
     $this->footer->display();
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:81,代码来源:users.php

示例8: pun_htmlspecialchars

		</div>
	</div>
</div>

<div class="linksb">
	<div class="inbox">
		<div><a href="javascript:history.go(-1)">Go back</a></div>
	</div>
</div>
<?php 
        require PUN_ROOT . 'footer.php';
    } else {
        $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Admin / Users';
        $focus_element = array('find_user', 'username');
        require PUN_ROOT . 'header.php';
        generate_admin_menu('users');
        ?>
	<div class="blockform">
		<h2><span>User search</span></h2>
		<div class="box">
			<form id="find_user" method="post" action="admin_users.php?action=find_user">
				<p class="submittop"><input type="submit" name="find_user" value="Submit search" tabindex="1" /></p>
				<div class="inform">
					<fieldset>
						<legend>Enter search criteria</legend>
						<div class="infldset">
							<p>Search for users in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted.</p>
							<table  class="aligntop">
								<tr>
									<th scope="row">Forum name</th>
									<td><input type="text" name="username" size="25" maxlength="25" tabindex="2" /></td>
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:31,代码来源:admin_users.php

示例9: array

        // Only update values that have changed
        if (array_key_exists('o_' . $key, $pun_config) && $pun_config['o_' . $key] != $input) {
            $params = array(':name' => 'o_' . $key, ':value' => $input != '' || is_int($input) ? $input : 'NULL');
            $query->run($params);
            unset($params);
        }
    }
    unset($query);
    // Regenerate the config cache
    $cache->delete('config');
    redirect('admin_options.php', $lang->t('Options updated redirect'));
}
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang->t('Admin'), $lang->t('Options'));
define('PUN_ACTIVE_PAGE', 'admin');
require PUN_ROOT . 'header.php';
generate_admin_menu('options');
?>
	<div class="blockform">
		<h2><span><?php 
echo $lang->t('Options head');
?>
</span></h2>
		<div class="box">
			<form method="post" action="admin_options.php">
				<p class="submittop"><input type="submit" name="save" value="<?php 
echo $lang->t('Save changes');
?>
" /></p>
				<div class="inform">
					<input type="hidden" name="form_sent" value="1" />
					<fieldset>
开发者ID:rakete,项目名称:affenbande-fluxbb,代码行数:31,代码来源:admin_options.php

示例10: array

			</form>
		</div>
	</div>
	<div class="clearer"></div>
</div>

<?php 
                require PUN_ROOT . 'footer.php';
            }
        }
    }
}
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Forums']);
define('PUN_ACTIVE_PAGE', 'admin');
require PUN_ROOT . 'header.php';
generate_admin_menu('forums');
?>
	<div class="blockform">
		<h2><span><?php 
echo $lang_admin_forums['Add forum head'];
?>
</span></h2>
		<div class="box">
			<form method="post" action="admin_forums.php?action=adddel">
<?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="inform">
					<fieldset>
						<legend><?php 
开发者ID:beyondkeysystem,项目名称:testone,代码行数:31,代码来源:admin_forums.php

示例11: generate_quickjump_cache

            // Regenerate the quickjump cache
            require_once PUN_ROOT . 'include/cache.php';
            generate_quickjump_cache();
            redirect('admin_categories.php', 'Categories updated. Redirecting &hellip;');
        }
    }
}
// Generate an array with all categories
$result = $db->query('SELECT id, cat_name, disp_position FROM ' . $db->prefix . 'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error());
$num_cats = $db->num_rows($result);
for ($i = 0; $i < $num_cats; ++$i) {
    $cat_list[] = $db->fetch_row($result);
}
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Admin / Categories';
require PUN_ROOT . 'header.php';
generate_admin_menu('categories');
?>
	<div class="blockform">
		<h2><span>Add/remove/edit categories</span></h2>
		<div class="box">
		<form method="post" action="admin_categories.php?action=foo">
			<div class="inform">
				<fieldset>
					<legend>Add/delete categories</legend>
					<div class="infldset">
						<table class="aligntop" cellspacing="0">
							<tr>
								<th scope="row">Add a new category<div><input type="submit" name="add_cat" value="Add New" tabindex="2" /></div></th>
								<td>
									<input type="text" name="new_cat_name" size="35" maxlength="80" tabindex="1" />
									<span>The name of the new category you want to add. You can edit the name of the category later (see below).Go to <a href="admin_forums.php">Forums</a> to add forums to your new category.</span>
开发者ID:patrickod,项目名称:City-Blogger,代码行数:31,代码来源:admin_categories.php

示例12: round

        $total_size = round($total_size, 2) . ' KB';
    }
}
// See if MMCache or PHPA is loaded
if (function_exists('mmcache')) {
    $php_accelerator = '<a href="http://turck-mmcache.sourceforge.net/">Turck MMCache</a>';
} else {
    if (isset($_PHPA)) {
        $php_accelerator = '<a href="http://www.php-accelerator.co.uk/">ionCube PHP Accelerator</a>';
    } else {
        $php_accelerator = 'N/A';
    }
}
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Admin';
require PUN_ROOT . 'header.php';
generate_admin_menu('index');
?>
	<div class="block">
		<h2>Forum administration</h2>
		<div id="adintro" class="box">
			<div class="inbox">
				<p>
					Welcome to the PunBB administration control panel. From here you can control vital aspects of the forum. Depending on whether you are an administrator or a moderator you can<br /><br />
					&nbsp;- organize categories and forums.<br />
					&nbsp;- set forum-wide options and preferences.<br />
					&nbsp;- control permissions for users and guests.<br />
					&nbsp;- view IP statistics for users.<br />
					&nbsp;- ban users.<br />
					&nbsp;- censor words.<br />
					&nbsp;- set up user ranks.<br />
					&nbsp;- prune old posts.<br />
开发者ID:BackupTheBerlios,项目名称:vnkb-applet-svn,代码行数:31,代码来源:admin_index.php

示例13: generate_users_info_cache

        // Regenerate the users info cache
        if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
            require PANTHER_ROOT . 'include/cache.php';
        }
        generate_users_info_cache();
        redirect(panther_link($panther_url['admin_maintenance']), $lang_admin_maintenance['User created message']);
    }
}
// Get the first post ID from the db
$ps = $db->select('posts', 'id', array(), '', 'id ASC LIMIT 1');
$first_id = $ps->rowCount() ? $ps->fetchColumn() : 0;
$page_title = array($panther_config['o_board_title'], $lang_admin_common['Admin'], $lang_admin_common['Maintenance']);
define('PANTHER_ACTIVE_PAGE', 'admin');
require PANTHER_ROOT . 'header.php';
$options = array();
$ps = $db->run('SELECT u.id, u.username, g.g_title FROM ' . $db->prefix . 'users AS u INNER JOIN ' . $db->prefix . 'groups AS g ON u.group_id=g.g_id WHERE u.id!=1 ORDER BY u.id ASC');
foreach ($ps as $result) {
    $options[] = array('id' => $result['id'], 'username' => $result['username'], 'group_title' => $result['g_title']);
}
$forums = $catgeories = array();
$ps = $db->run('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM ' . $db->prefix . 'categories AS c INNER JOIN ' . $db->prefix . 'forums AS f ON c.id=f.cat_id WHERE f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position');
foreach ($ps as $cur_forum) {
    if (!isset($categories[$cur_forum['cid']])) {
        $categories[$cur_forum['cid']] = array('id' => $cur_forum['cid'], 'name' => $cur_forum['cat_name']);
    }
    $forums[] = array('category_id' => $cur_forum['cid'], 'name' => $cur_forum['forum_name'], 'id' => $cur_forum['fid']);
}
generate_admin_menu('maintenance');
$tpl = load_template('admin_maintenance.tpl');
echo $tpl->render(array('lang_admin_maintenance' => $lang_admin_maintenance, 'lang_admin_common' => $lang_admin_common, 'lang_common' => $lang_common, 'form_action' => panther_link($panther_url['admin_maintenance']), 'csrf_token' => generate_csrf_token(PANTHER_ADMIN_DIR . '/maintenance.php'), 'options_link' => panther_link($panther_url['admin_options']), 'first_id' => $first_id, 'POST' => $_POST, 'panther_config' => $panther_config, 'errors' => $errors, 'options' => $options, 'forums' => $forums, 'categories' => $categories));
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:maintenance.php

示例14: IN

        for ($i = 0; $i < count($topics['topics']); $i++) {
            $markers[] = '?';
            $data[] = $topics['topics'][$i];
        }
        $db->run('UPDATE ' . $db->prefix . 'topics SET archived=1 WHERE id IN (' . implode(',', $markers) . ')', $data);
        $percentage = round($topics['count'] / $total * 100, 2);
    }
    $update = array('conf_value' => serialize($rules));
    $data = array(':conf_name' => 'o_archive_rules');
    $db->update('config', $update, 'conf_name=:conf_name', $data);
    generate_config_cache();
    $redirect_lang = $panther_config['o_archiving'] == '1' ? sprintf($lang_admin_archive['Archive rules updated'], $topics['count'], $total, $percentage . '%') : $lang_admin_archive['Updated redirect'];
    redirect(panther_link($panther_url['admin_archive']), $redirect_lang);
}
$archive_rules = $panther_config['o_archive_rules'] != '' ? unserialize($panther_config['o_archive_rules']) : array('closed' => 0, 'sticky' => 0, 'time' => 0, 'unit' => 'days', 'forums' => array(0));
$percentage = $ps->rowCount() != 0 ? round($archived / $total * 100, 2) : 0;
$categories = $forums = array();
$ps = $db->run('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM ' . $db->prefix . 'categories AS c INNER JOIN ' . $db->prefix . 'forums AS f ON c.id=f.cat_id WHERE f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position');
foreach ($ps as $cur_forum) {
    if (!isset($categories[$cur_forum['cid']])) {
        $categories[$cur_forum['cid']] = array('name' => $cur_forum['cat_name'], 'id' => $cur_forum['cid']);
    }
    $forums[] = array('id' => $cur_forum['fid'], 'selected' => in_array($cur_forum['fid'], $archive_rules['forums']) ? true : false, 'name' => $cur_forum['forum_name'], 'category_id' => $cur_forum['cid']);
}
$page_title = array($panther_config['o_board_title'], $lang_admin_common['Admin'], $lang_admin_common['Archive']);
define('PANTHER_ACTIVE_PAGE', 'admin');
require PANTHER_ROOT . 'header.php';
generate_admin_menu('archive');
$tpl = load_template('admin_archive.tpl');
echo $tpl->render(array('lang_admin_common' => $lang_admin_common, 'lang_admin_archive' => $lang_admin_archive, 'form_action' => panther_link($panther_url['admin_archive']), 'csrf_token' => generate_csrf_token(PANTHER_ADMIN_DIR . '/archive.php'), 'archive_lang' => $panther_config['o_archiving'] == '1' ? $lang_admin_archive['Archive enabled'] : $lang_admin_archive['Archive disabled'], 'admin_options' => panther_link($panther_url['admin_options']), 'archived' => $archived, 'percentage' => $percentage, 'archive_rules' => $archive_rules, 'lang_common' => $lang_common, 'categories' => $categories, 'forums' => $forums));
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:archive.php

示例15: confirm_referrer

    confirm_referrer('admin_permissions.php');
    $form = array_map('intval', $_POST['form']);
    while (list($key, $input) = @each($form)) {
        // Only update values that have changed
        if (array_key_exists('p_' . $key, $pun_config) && $pun_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
    require_once PUN_ROOT . 'include/cache.php';
    generate_config_cache();
    redirect('admin_permissions.php', 'Permissions updated. Redirecting &hellip;');
}
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Admin / Permissions';
require PUN_ROOT . 'header.php';
generate_admin_menu('permissions');
?>
	<div class="blockform">
		<h2><span>Permissions</span></h2>
		<div class="box">
			<form method="post" action="admin_permissions.php">
				<p class="submittop"><input type="submit" name="save" value="Save changes" /></p>
				<div class="inform">
				<input type="hidden" name="form_sent" value="1" />
					<fieldset>
						<legend>Posting</legend>
						<div class="infldset">
							<table class="aligntop" cellspacing="0">
								<tr>
									<th scope="row">BBCode</th>
									<td>
开发者ID:patrickod,项目名称:City-Blogger,代码行数:31,代码来源:admin_permissions.php


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