本文整理汇总了PHP中pageAccess函数的典型用法代码示例。如果您正苦于以下问题:PHP pageAccess函数的具体用法?PHP pageAccess怎么用?PHP pageAccess使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pageAccess函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewTagsAdmin
/**
* Admin interface
*/
public function viewTagsAdmin()
{
global $aidlink;
pageAccess('F');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=ft', 'title' => self::$locale['forum_tag_0100']));
echo "<div class='well'>" . self::$locale['forum_tag_0101'] . "</div>\n";
$tab['title'][] = self::$locale['forum_tag_0102'];
$tab['id'][] = "tag_list";
$tab['icon'][] = "";
$tab['title'][] = isset($_GET['tag_id']) && isnum($_GET['tag_id']) ? self::$locale['forum_tag_0104'] : self::$locale['forum_tag_0103'];
$tab['id'][] = "tag_form";
$tab['icon'][] = "";
$_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "tag_list";
echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref");
switch ($_GET['ref']) {
case "tag_form":
echo $this->displayTagForm();
break;
case "tag_list":
echo $this->displayTagList();
}
echo closetab();
}
示例2: viewRanksAdmin
public function viewRanksAdmin()
{
global $aidlink;
pageAccess('FR');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => self::$locale['404']));
$forum_settings = $this->get_forum_settings();
echo "<div class='well'>" . self::$locale['forum_rank_0100'] . "</div>\n";
if ($forum_settings['forum_ranks']) {
$tab['title'][] = self::$locale['402'];
$tab['id'][] = "rank_list";
$tab['icon'][] = "";
$tab['title'][] = isset($_GET['rank_id']) && isnum($_GET['rank_id']) ? self::$locale['401'] : self::$locale['400'];
$tab['id'][] = "rank_form";
$tab['icon'][] = "";
$_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "rank_list";
echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref");
switch ($_GET['ref']) {
case "rank_form":
// @todo: improvise rank from ui
echo $this->displayRanksForm();
break;
case "rank_list":
echo $this->displayRankList();
}
echo closetab();
} else {
opentable(self::$locale['403']);
?>
<div class="well text-center">
<?php
echo sprintf(self::$locale['450'], "<a href='" . FUSION_SELF . $aidlink . "§ion=fs'>" . self::$locale['451'] . "</a>");
?>
</div>
<?php
closetable();
}
}
示例3: viewMoodAdmin
public function viewMoodAdmin()
{
global $aidlink;
pageAccess('FR');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fmd', 'title' => self::$locale['forum_admin_004']));
echo "<div class='well'>" . self::$locale['forum_090'] . "</div>\n";
$tab['title'][] = self::$locale['forum_093'];
$tab['id'][] = "mood_list";
$tab['icon'][] = "";
$tab['title'][] = isset($_GET['mood_id']) && isnum($_GET['mood_id']) ? self::$locale['forum_092'] : self::$locale['forum_091'];
$tab['id'][] = "mood_form";
$tab['icon'][] = "";
$_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "mood_list";
echo opentab($tab, $_GET['ref'], "mood_admin", TRUE, "m-t-10", "ref");
switch ($_GET['ref']) {
case "mood_form":
$this->displayMoodForm();
break;
case "mood_list":
$this->displayMoodList();
break;
}
echo closetab();
}
示例4: pageAccess
<?php
require_once "inx/global.inc.php";
// only accesible to SuperAdmin and Administrator
pageAccess($_SESSION["auth"]["roles"], array('SuperAdmin', 'Administrator'));
$page = new HTML_Page2($page_defaults);
$sql = "SELECT use_id,use_fname,use_sname FROM user";
$q = $db->query($sql);
if (DB::isError($q)) {
die("db error: " . $q->getMessage());
}
while ($row = $q->fetchRow()) {
$users[$row["use_id"]] = $row["use_fname"] . ' ' . $row["use_sname"];
}
$formData1 = array('use_id' => array('type' => 'select', 'label' => 'User', 'value' => $use_id, 'options' => $users, 'attributes' => array('class' => 'addr'), 'required' => 2), 'use_password' => array('type' => 'text', 'label' => 'Password', 'value' => $use_password, 'attributes' => array('class' => 'addr'), 'required' => 2, 'tooltip' => 'Passwords must be at least 8 characters, and contain at least one number and one UPPER CASE letter'));
if (!$_GET["action"]) {
$form = new Form();
$form->addForm("", "get", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "action", "", "reset");
/////////////////////////////////////////////////////////////////////////////////
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Reset Password</div>');
$form->addData($formData1, $_GET);
$form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
$form->addHtml("</fieldset>\n");
$form->addHtml('<pre>');
for ($i = 1; $i <= 5; ++$i) {
$form->addHtml(random_string(16, 'safe') . "\n");
}
$form->addHtml('</pre>');
示例5: display_forum_admin
public function display_forum_admin()
{
global $aidlink;
opentable(self::$locale['forum_000c']);
$tab_title['title'][] = self::$locale['forum_admin_000'];
$tab_title['id'][] = 'fm';
$tab_title['icon'][] = '';
$tab_title['title'][] = self::$locale['forum_admin_001'];
$tab_title['id'][] = 'fr';
$tab_title['icon'][] = '';
$tab_title['title'][] = self::$locale['forum_admin_002'];
$tab_title['id'][] = 'ft';
$tab_title['icon'][] = '';
$tab_title['title'][] = self::$locale['forum_admin_004'];
$tab_title['id'][] = 'fmd';
$tab_title['icon'][] = '';
$tab_title['title'][] = self::$locale['forum_admin_003'];
$tab_title['id'][] = 'fs';
$tab_title['icon'][] = '';
echo opentab($tab_title, isset($_GET['section']) ? $_GET['section'] : 'fm', 'forum-admin-tabs', TRUE);
if (isset($_GET['section'])) {
switch ($_GET['section']) {
case 'fr':
$this->viewRank()->viewRanksAdmin();
break;
case 'ft':
$this->viewTags()->viewTagsAdmin();
break;
case 'fmd':
$this->viewMood()->viewMoodAdmin();
break;
case 'fs':
$this->viewSettings()->viewSettingsAdmin();
break;
default:
redirect(INFUSIONS . 'forum/admin/forums.php' . $aidlink);
}
} else {
pageAccess('F');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink, 'title' => self::$locale['forum_admin_000']));
$this->display_forum_index();
}
echo closetab();
closetable();
}
示例6: tab_active
$tab_title['icon'][] = '';
$tab_active = tab_active($tab_title, isset($_GET['section']) ? $_GET['section'] : 'fm', true);
echo opentab($tab_title, $tab_active, 'fmm', true);
if (isset($_GET['section'])) {
switch ($_GET['section']) {
case 'fr':
pageAccess('FR');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => $locale['404']));
echo opentabbody($tab_title['title'][1], $tab_title['id'][1], $tab_active, true, 'section');
include INFUSIONS . 'forum/admin/forum_ranks.php';
echo closetabbody();
break;
case 'fs':
pageAccess('F');
echo opentabbody($tab_title['title'][2], $tab_title['id'][2], $tab_active, true, 'section');
include INFUSIONS . 'forum/admin/settings_forum.php';
echo closetabbody();
break;
default:
redirect(INFUSIONS . 'forum/admin/forums.php' . $aidlink);
}
} else {
pageAccess('F');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink, 'title' => $locale['forum_admin_000']));
echo opentabbody($tab_title['title'][0], $tab_title['id'][0], $tab_active, true, 'section');
$forum_admin->display_forum_admin();
echo closetabbody();
}
echo closetab();
closetable();
require_once THEMES . "templates/footer.php";
示例7: Copyright
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_log.php
| Author: gh0st2k
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('UL');
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/user_log.php";
add_breadcrumb(array('link' => ADMIN . 'administrators.php' . $aidlink, 'title' => $locale['100']));
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
$_GET['rowstart'] = 0;
}
// Set default values
$dbOrder = "ORDER BY userlog_timestamp DESC";
$dbWhere = "";
$dbWhereCount = "";
$getString = $aidlink;
$orderby = "userlog_timestamp";
$expr = "DESC";
$user = "";
$userField = "";
示例8: Copyright
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: admin/blog_settings.php
| Author: Frederick MC Chan (Chan)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
pageAccess("S8");
if (isset($_POST['savesettings'])) {
$error = 0;
$inputArray = array("article_pagination" => form_sanitizer($_POST['article_pagination'], 0, "article_pagination"), "article_allow_submission" => form_sanitizer($_POST['article_allow_submission'], 0, "article_allow_submission"), "article_extended_required" => isset($_POST['article_extended_required']) ? 1 : 0);
if (defender::safe()) {
foreach ($inputArray as $settings_name => $settings_value) {
$inputSettings = array("settings_name" => $settings_name, "settings_value" => $settings_value, "settings_inf" => "article");
dbquery_insert(DB_SETTINGS_INF, $inputSettings, "update", array("primary_key" => "settings_name"));
}
addNotice("success", $locale['900']);
redirect(FUSION_REQUEST);
} else {
addNotice('danger', $locale['901']);
}
}
echo "<div class='well'>" . $locale['articles_0031'] . "</div>";
示例9: Copyright
| Copyright (C) 2002 - 2011 Nick Jones
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: permalinks.php
| Author: Ankur Thakur
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('PL');
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/settings.php";
include LOCALE . LOCALESET . "admin/permalinks.php";
$settings = fusion_get_settings();
add_breadcrumb(array('link' => ADMIN . 'permalink.php' . $aidlink, 'title' => $locale['428']));
// Check if mod_rewrite is enabled
$mod_rewrite = FALSE;
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) {
$mod_rewrite = TRUE;
} elseif (isset($_SERVER['IIS_UrlRewriteModule'])) {
$mod_rewrite = TRUE;
} elseif (isset($_SERVER['MOD_REWRITE'])) {
$mod_rewrite = TRUE;
}
define('MOD_REWRITE', $mod_rewrite);
示例10: Copyright
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: settings_misc.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('S6');
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/settings.php";
add_breadcrumb(array('link' => ADMIN . "settings_misc.php" . $aidlink, 'title' => $locale['misc_settings']));
if (isset($_POST['savesettings'])) {
$inputData = array("tinymce_enabled" => form_sanitizer($_POST['tinymce_enabled'], 0, "tinymce_enabled"), "smtp_host" => form_sanitizer($_POST['smtp_host'], "", "smtp_host"), "smtp_port" => form_sanitizer($_POST['smtp_port'], "", "smtp_port"), "smtp_auth" => isset($_POST['smtp_auth']) && !empty($_POST['smtp_username']) && !empty($_POST['smtp_password']) ? TRUE : FALSE, "smtp_username" => form_sanitizer($_POST['smtp_username'], "", "smtp_username"), "login_method" => form_sanitizer($_POST['login_method'], 0, "login_method"), "thumb_compression" => form_sanitizer($_POST['thumb_compression'], 0, "thumb_compression"), "mime_check" => form_sanitizer($_POST['mime_check'], 0, "mime_check"), "guestposts" => form_sanitizer($_POST['guestposts'], 0, "guestposts"), "comments_enabled" => form_sanitizer($_POST['comments_enabled'], 0, "comments_enabled"), "comments_per_page" => form_sanitizer($_POST['comments_per_page'], 10, "comments_per_page"), "ratings_enabled" => form_sanitizer($_POST['ratings_enabled'], 0, "ratings_enabled"), "visitorcounter_enabled" => form_sanitizer($_POST['visitorcounter_enabled'], 0, "visitorcounter_enabled"), "rendertime_enabled" => form_sanitizer($_POST['rendertime_enabled'], 0, "rendertime_enabled"), "comments_sorting" => form_sanitizer($_POST['comments_sorting'], "DESC", "comments_sorting"), "index_url_bbcode" => form_sanitizer($_POST['index_url_bbcode'], 0, "index_url_bbcode"), "index_url_userweb" => form_sanitizer($_POST['index_url_userweb'], 0, "index_url_userweb"));
if (defender::safe()) {
foreach ($inputData as $settings_name => $settings_value) {
$data = array("settings_name" => $settings_name, "settings_value" => $settings_value);
dbquery_insert(DB_SETTINGS, $data, "update", array("primary_key" => "settings_name"));
}
addNotice('success', $locale['900']);
redirect(FUSION_SELF . $aidlink);
} else {
addNotice('danger', $locale['901']);
}
示例11: Copyright
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: images.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('IM');
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/image_uploads.php";
if (isset($_GET['action']) && ($_GET['action'] = "update")) {
include INCLUDES . "buildlist.php";
}
$folders = array("images" => IMAGES, "imagesa" => IMAGES_A, "imagesn" => IMAGES_N, "imagesnc" => IMAGES_NC, "imagesb" => IMAGES_B, "imagesbc" => IMAGES_BC);
if (isset($_GET['ifolder']) && ctype_alnum($_GET['ifolder']) == 1 && isset($folders[$_GET['ifolder']])) {
$_GET['ifolder'] = stripinput($_GET['ifolder']);
$afolder = $folders[$_GET['ifolder']];
} else {
$_GET['ifolder'] = "images";
$afolder = IMAGES;
}
$image_list = makefilelist($afolder, ".|..", TRUE, "files", "php|js|ico|DS_Store|SVN");
if ($image_list) {
示例12: Copyright
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: polls.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../maincore.php";
pageAccess('PO');
require_once THEMES . "templates/admin_header.php";
if (file_exists(INFUSIONS . "member_poll_panel/locale/" . LOCALESET . "member_poll_panel_admin.php")) {
include INFUSIONS . "member_poll_panel/locale/" . LOCALESET . "member_poll_panel_admin.php";
} else {
include INFUSIONS . "member_poll_panel/locale/English/member_poll_panel_admin.php";
}
add_breadcrumb(array('link' => ADMIN . 'polls.php' . $aidlink, 'title' => $locale['439c']));
if (isset($_GET['poll_id']) && !isnum($_GET['poll_id'])) {
redirect(FUSION_SELF);
}
$poll_option = array();
if (isset($_POST['save'])) {
$poll_title = form_sanitizer($_POST['poll_title'], '', 'poll_title');
$poll_language = form_sanitizer($_POST['poll_language'], "", "poll_language");
foreach ($_POST['poll_option'] as $key => $value) {
示例13: Copyright
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: settings_languages.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess("LANG");
require_once THEMES . "templates/admin_header.php";
$locale = fusion_get_locale('', LOCALE . LOCALESET . 'admin/settings.php');
$locale += fusion_get_locale('', LOCALE . LOCALESET . 'setup.php');
// Just follow the display of the current admin language.
$settings = fusion_get_settings();
if (!empty($locale['setup_3007'])) {
dbquery("UPDATE " . DB_LANGUAGE_TABLES . " SET mlt_title='" . $locale['setup_3007'] . "' WHERE mlt_rights='CP'");
}
if (!empty($locale['setup_3210'])) {
dbquery("UPDATE " . DB_LANGUAGE_TABLES . " SET mlt_title='" . $locale['setup_3210'] . "' WHERE mlt_rights='SL'");
}
if (!empty($locale['setup_3208'])) {
dbquery("UPDATE " . DB_LANGUAGE_TABLES . " SET mlt_title='" . $locale['setup_3208'] . "' WHERE mlt_rights='ET'");
}
if (!empty($locale['setup_3211'])) {
示例14: Copyright
| Copyright (C) 2002 - 2011 Nick Jones
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: db_backup.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('DB');
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/db-backup.php";
add_breadcrumb(array('link' => ADMIN . 'db_backup.php' . $aidlink, 'title' => $locale['450']));
function stripsiteinput($text)
{
$search = array("&", """, "'", "\", """, "'", "<", ">", " ");
$replace = array("", "", "", "", "", "", "", "", "");
$text = str_replace($search, $replace, $text);
return $text;
}
if (isset($_POST['btn_create_backup'])) {
$backup_file_name = form_sanitizer($_POST['backup_filename'], '', 'backup_filename');
if (!check_admin_pass(isset($_POST['user_admin_password']) ? form_sanitizer($_POST['user_admin_password'], '', 'user_admin_password') : "")) {
$defender->stop();
}
示例15: Gaudyn
| Filename: panels.php
| Author: PHP-Fusion Development Team
| Author: Robert Gaudyn (Wooya)
| Author: Joakim Falk (Domi)
| Author: Frederick MC Chan (Hien)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('P');
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/panels.php";
/**
* Class fusion_panels
*/
class fusion_panels
{
/**
* @var array|bool
*/
private $data = array('panel_id' => 0, 'panel_name' => '', 'panel_filename' => '', 'panel_content' => '', 'panel_type' => 'php', 'panel_side' => 1, 'panel_order' => 0, 'panel_access' => 0, 'panel_display' => 0, 'panel_status' => 0, 'panel_url_list' => '', 'panel_restriction' => 3, 'panel_languages' => '');
/**
* @var string
*/
private $formaction = '';