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


PHP session::get_folders_by_perm方法代码示例

本文整理汇总了PHP中session::get_folders_by_perm方法的典型用法代码示例。如果您正苦于以下问题:PHP session::get_folders_by_perm方法的具体用法?PHP session::get_folders_by_perm怎么用?PHP session::get_folders_by_perm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在session的用法示例。


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

示例1: folder_get_available_array_by_forum

function folder_get_available_array_by_forum($forum_fid)
{
    if (!session::logged_in()) {
        if (($folder_list = session::get_folders_by_perm(USER_PERM_GUEST_ACCESS, $forum_fid)) !== false) {
            return array_filter($folder_list, 'is_numeric');
        }
    } else {
        if (($folder_list = session::get_folders_by_perm(USER_PERM_POST_READ, $forum_fid)) !== false) {
            return array_filter($folder_list, 'is_numeric');
        }
    }
    return '0';
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:13,代码来源:folder.inc.php

示例2: cache_disable

require_once BH_INCLUDE_PATH . 'cache.inc.php';
require_once BH_INCLUDE_PATH . 'constants.inc.php';
require_once BH_INCLUDE_PATH . 'format.inc.php';
require_once BH_INCLUDE_PATH . 'header.inc.php';
require_once BH_INCLUDE_PATH . 'html.inc.php';
require_once BH_INCLUDE_PATH . 'lang.inc.php';
require_once BH_INCLUDE_PATH . 'logon.inc.php';
require_once BH_INCLUDE_PATH . 'session.inc.php';
// Don't cache this page
cache_disable();
// Check we're logged in correctly
if (!session::logged_in()) {
    html_guest_error();
}
// Check we have Admin / Moderator access
if (!session::check_perm(USER_PERM_ADMIN_TOOLS, 0) && !session::check_perm(USER_PERM_FORUM_TOOLS, 0, 0) && !session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
    html_draw_error(gettext("You do not have permission to use this section."));
}
// Perform additional admin login.
admin_check_credentials();
// Get the user's saved left frame width.
if (($left_frame_width = session::get_value('LEFT_FRAME_WIDTH')) === false) {
    $left_frame_width = 280;
}
// Output starts here
html_draw_top('frame_set_html', 'pm_popup_disabled');
$frameset = new html_frameset_cols('admin', "{$left_frame_width},*");
if (isset($_GET['page']) && strlen(trim($_GET['page'])) > 0) {
    $requested_page = trim($_GET['page']);
    $available_pages_preg = implode("|^", array_map('preg_quote_callback', get_available_admin_files()));
    if (preg_match("/^{$available_pages_preg}/u", basename($requested_page)) > 0) {
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin.php

示例3: html_draw_top


//.........这里部分代码省略.........
        } else {
            echo "<title>", htmlentities_array($forum_name), "</title>\n";
        }
    }
    $forum_content_rating = html_get_forum_content_rating();
    echo "<meta name=\"generator\" content=\"Beehive Forum ", BEEHIVE_VERSION, "\" />\n";
    echo "<meta name=\"keywords\" content=\"", word_filter_add_ob_tags($meta_keywords, true), "\" />\n";
    echo "<meta name=\"description\" content=\"", word_filter_add_ob_tags($meta_description, true), "\" />\n";
    echo "<meta name=\"rating\" content=\"{$forum_content_rating}\" />\n";
    if (forum_get_setting('allow_search_spidering', 'N')) {
        echo "<meta name=\"robots\" content=\"noindex,nofollow\" />\n";
    } else {
        if (isset($robots)) {
            echo "<meta name=\"robots\" content=\"{$robots}\" />\n";
        }
    }
    if (isset($meta_refresh['url'], $meta_refresh['delay'])) {
        echo "<meta http-equiv=\"refresh\" content=\"{$meta_refresh['delay']}; url={$meta_refresh['url']}\" />\n";
    }
    printf("<meta name=\"application-name\" content=\"%s\" />\n", word_filter_add_ob_tags($forum_name, true));
    printf("<meta name=\"msapplication-tooltip\" content=\"%s\" />\n", word_filter_add_ob_tags($meta_description, true));
    if (forum_check_webtag_available($webtag)) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", _('Messages'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=discussion.php%3Fwebtag%3D{$webtag}")), html_style_image('msie/unread_thread.ico', true, true));
        if (forum_get_setting('show_links', 'Y')) {
            printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", _('Links'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=links.php%3Fwebtag%3D{$webtag}")), html_style_image('msie/link.ico', true, true));
        }
    }
    if (forum_get_setting('show_pms', 'Y')) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", _('Inbox'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=pm.php%3Fwebtag%3D{$webtag}")), html_style_image('msie/pmunread.ico', true, true));
    }
    if (forum_check_webtag_available($webtag)) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", _('My Controls'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=user.php%3Fwebtag%3D{$webtag}")), html_style_image('msie/user_controls.ico', true, true));
    }
    if (session::logged_in() && (session::check_perm(USER_PERM_FORUM_TOOLS, 0) || session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE))) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", _('Admin'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=admin.php%3Fwebtag%3D{$webtag}")), html_style_image('msie/admintool.ico', true, true));
    }
    printf("<meta name=\"msapplication-starturl\" content=\"%s\" />\n", html_get_forum_file_path("index.php?webtag={$webtag}"));
    $rss_feed_path = html_get_forum_file_path("threads_rss.php?webtag={$webtag}");
    printf("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"%s - %s\" href=\"%s\" />\n", htmlentities_array($forum_name), htmlentities_array(_('RSS Feed')), $rss_feed_path);
    if ($folders_array = folder_get_available_details()) {
        foreach ($folders_array as $folder) {
            $rss_feed_path = html_get_forum_file_path("threads_rss.php?webtag={$webtag}&amp;fid={$folder['FID']}");
            printf("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"%s - %s - %s\" href=\"%s\" />\n", htmlentities_array($forum_name), htmlentities_array($folder['TITLE']), htmlentities_array(_('RSS Feed')), $rss_feed_path);
        }
    }
    if ($user_style_path = html_get_user_style_path()) {
        printf("<link rel=\"apple-touch-icon\" href=\"%s\" />\n", html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-57x57.png', $user_style_path)));
        printf("<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"%s\" />\n", html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-72x72.png', $user_style_path)));
        printf("<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"%s\" />\n", html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-114x114.png', $user_style_path)));
        printf("<link rel=\"shortcut icon\" type=\"image/ico\" href=\"%s\" />\n", html_get_forum_file_path(sprintf('styles/%s/images/favicon.ico', $user_style_path)));
    }
    $opensearch_path = html_get_forum_file_path(sprintf('search.php?webtag=%s&amp;opensearch', $webtag));
    printf("<link rel=\"search\" type=\"application/opensearchdescription+xml\" title=\"%s\" href=\"%s\" />\n", $forum_name, $opensearch_path);
    if ($style_sheet = html_get_style_sheet()) {
        html_include_css($style_sheet);
    }
    if ($script_style_sheet = html_get_script_style_sheet()) {
        html_include_css($script_style_sheet);
    }
    if ($emoticon_style_sheet = html_get_emoticon_style_sheet($emoticons)) {
        html_include_css($emoticon_style_sheet, 'print, screen');
    }
    if (isset($stylesheet_array) && is_array($stylesheet_array)) {
        foreach ($stylesheet_array as $stylesheet) {
            if (isset($stylesheet['filename']) && isset($stylesheet['media'])) {
                html_include_css($stylesheet['filename'], $stylesheet['media']);
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:67,代码来源:html.inc.php

示例4: html_draw_top


//.........这里部分代码省略.........
    } else {
        if (isset($title)) {
            echo "<title>", word_filter_add_ob_tags($title, true), " - ", htmlentities_array($forum_name), "</title>\n";
        } else {
            echo "<title>", htmlentities_array($forum_name), "</title>\n";
        }
    }
    $forum_content_rating = html_get_forum_content_rating();
    echo "<meta name=\"generator\" content=\"Beehive Forum ", BEEHIVE_VERSION, "\" />\n";
    echo "<meta name=\"keywords\" content=\"", word_filter_add_ob_tags($meta_keywords, true), "\" />\n";
    echo "<meta name=\"description\" content=\"", word_filter_add_ob_tags($meta_description, true), "\" />\n";
    echo "<meta name=\"rating\" content=\"{$forum_content_rating}\" />\n";
    if (forum_get_setting('allow_search_spidering', 'N') || isset($pid) && $pid > 1) {
        echo "<meta name=\"robots\" content=\"noindex,nofollow\" />\n";
    } else {
        if (isset($robots)) {
            echo "<meta name=\"robots\" content=\"", htmlentities_array($robots), "\" />\n";
        }
    }
    printf("<meta name=\"application-name\" content=\"%s\" />\n", htmlentities_array(word_filter_add_ob_tags($forum_name, true)));
    printf("<meta name=\"msapplication-tooltip\" content=\"%s\" />\n", htmlentities_array(word_filter_add_ob_tags($meta_description, true)));
    if (forum_check_webtag_available($webtag)) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", gettext('Messages'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=discussion.php%3Fwebtag%3D{$webtag}")), html_get_style_file('images/msie/unread_thread.ico', true));
        if (forum_get_setting('show_links', 'Y')) {
            printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", gettext('Links'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=links.php%3Fwebtag%3D{$webtag}")), html_get_style_file('images/msie/link.ico', true));
        }
    }
    if (forum_get_setting('show_pms', 'Y')) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", gettext('Inbox'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=pm.php%3Fwebtag%3D{$webtag}")), html_get_style_file('images/msie/pm_unread.ico', true));
    }
    if (forum_check_webtag_available($webtag)) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", gettext('My Controls'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=user.php%3Fwebtag%3D{$webtag}")), html_get_style_file('images/msie/user_controls.ico', true));
    }
    if (session::logged_in() && (session::check_perm(USER_PERM_FORUM_TOOLS, 0) || session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE))) {
        printf("<meta name=\"msapplication-task\" content=\"name=%s;action-uri=%s;icon-uri=%s\" />\n", gettext('Admin'), htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}&final_uri=admin.php%3Fwebtag%3D{$webtag}")), html_get_style_file('images/msie/admin_tool.ico', true));
    }
    printf("<meta name=\"msapplication-starturl\" content=\"%s\" />\n", htmlentities_array(html_get_forum_file_path("index.php?webtag={$webtag}")));
    $rss_feed_path = html_get_forum_file_path("threads_rss.php?webtag={$webtag}");
    printf("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"%s - %s\" href=\"%s\" />\n", htmlentities_array($forum_name), htmlentities_array(gettext('RSS Feed')), htmlentities_array($rss_feed_path));
    if (($folders_array = folder_get_available_details()) !== false) {
        foreach ($folders_array as $folder) {
            $rss_feed_path = html_get_forum_file_path("threads_rss.php?webtag={$webtag}&amp;fid={$folder['FID']}");
            printf("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"%s - %s - %s\" href=\"%s\" />\n", htmlentities_array($forum_name), htmlentities_array($folder['TITLE']), htmlentities_array(gettext('RSS Feed')), htmlentities_array($rss_feed_path));
        }
    }
    if (($user_style_path = html_get_user_style_path()) !== false) {
        printf("<link rel=\"apple-touch-icon\" href=\"%s\" />\n", htmlentities_array(html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-57x57.png', $user_style_path))));
        printf("<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"%s\" />\n", htmlentities_array(html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-72x72.png', $user_style_path))));
        printf("<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"%s\" />\n", htmlentities_array(html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-114x114.png', $user_style_path))));
        printf("<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"%s\" />\n", htmlentities_array(html_get_forum_file_path(sprintf('styles/%s/images/apple-touch-icon-144x144.png', $user_style_path))));
        printf("<link rel=\"shortcut icon\" type=\"image/ico\" href=\"%s\" />\n", htmlentities_array(html_get_forum_file_path(sprintf('styles/%s/images/favicon.ico', $user_style_path))));
    }
    $opensearch_path = html_get_forum_uri(sprintf('search.php?webtag=%s&opensearch', $webtag));
    printf("<link rel=\"search\" type=\"application/opensearchdescription+xml\" title=\"%s\" href=\"%s\" />\n", htmlentities_array($forum_name), htmlentities_array($opensearch_path));
    if (($style_sheet = html_get_style_file($main_css)) !== false) {
        echo html_include_css($style_sheet);
    }
    if (($emoticon_style_sheet = html_get_emoticon_style_sheet($emoticons)) !== false) {
        echo html_include_css($emoticon_style_sheet, 'print, screen');
    }
    if (($images_style_sheet = html_get_style_file($images_css)) !== false) {
        echo html_include_css($images_style_sheet);
    }
    if (isset($inline_css)) {
        echo "<style type=\"text/css\">\n";
        echo "<!--\n\n", $inline_css, "\n\n//-->\n";
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:67,代码来源:html.inc.php

示例5: html_style_image

         echo "  </tr>\n";
     }
     if (session::get_folders_by_perm(USER_PERM_LINKS_MODERATE)) {
         echo "  <tr>\n";
         echo "    <td align=\"left\" class=\"postbody\">", html_style_image('bullet'), "&nbsp;<a href=\"admin_link_approve.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Link Approval Queue"), "</a></td>\n";
         echo "  </tr>\n";
     }
     echo "  <tr>\n";
     echo "    <td align=\"left\" class=\"postbody\">", html_style_image('bullet'), "&nbsp;<a href=\"admin_visitor_log.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Visitor Log"), "</a></td>\n";
     echo "  </tr>\n";
     echo "  <tr>\n";
     echo "    <td align=\"left\" class=\"postbody\">&nbsp;</td>\n";
     echo "  </tr>\n";
     echo "</table>\n";
 } else {
     if (session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
         echo "<table border=\"0\" width=\"100%\">\n";
         echo "  <tr>\n";
         echo "    <td align=\"left\" class=\"subhead\">", gettext("Admin Tools"), "</td>\n";
         echo "  </tr>\n";
         echo "  <tr>\n";
         echo "    <td align=\"left\" class=\"postbody\">", html_style_image('bullet'), "&nbsp;<a href=\"admin_post_approve.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Post Approval Queue"), "</a></td>\n";
         echo "  </tr>\n";
         echo "  <tr>\n";
         echo "    <td align=\"left\" class=\"postbody\">&nbsp;</td>\n";
         echo "  </tr>\n";
         echo "</table>\n";
     }
 }
 if (session::check_perm(USER_PERM_FORUM_TOOLS, 0)) {
     echo "<table border=\"0\" width=\"100%\">\n";
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:admin_menu.php

示例6: admin_get_post_approval_queue

function admin_get_post_approval_queue($page = 1)
{
    if (!($db = db::get())) {
        return false;
    }
    if (!is_numeric($page) || $page < 1) {
        $page = 1;
    }
    $offset = calculate_page_offset($page, 10);
    if (!($table_prefix = get_table_prefix())) {
        return false;
    }
    if ($folder_list = session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
        $fidlist = implode(',', $folder_list);
    }
    $post_approval_array = array();
    $sql = "SELECT SQL_CALC_FOUND_ROWS FOLDER.TITLE AS FOLDER_TITLE, ";
    $sql .= "TRIM(CONCAT_WS(' ', COALESCE(FOLDER.PREFIX, ''), THREAD.TITLE)) AS TITLE, ";
    $sql .= "USER.UID, USER.LOGON, USER.NICKNAME, UNIX_TIMESTAMP(POST.CREATED) AS CREATED, ";
    $sql .= "CONCAT(POST.TID, '.', POST.PID) AS MSG FROM `{$table_prefix}POST` POST ";
    $sql .= "LEFT JOIN USER USER ON (USER.UID = POST.FROM_UID) ";
    $sql .= "LEFT JOIN `{$table_prefix}THREAD` THREAD ON (THREAD.TID = POST.TID) ";
    $sql .= "LEFT JOIN `{$table_prefix}FOLDER` FOLDER ON (FOLDER.FID = THREAD.FID) ";
    $sql .= "WHERE POST.APPROVED IS NULL AND THREAD.FID IN ({$fidlist}) ";
    $sql .= "LIMIT {$offset}, 10";
    if (!($result = $db->query($sql))) {
        return false;
    }
    // Fetch the number of total results
    $sql = "SELECT FOUND_ROWS() AS ROW_COUNT";
    if (!($result_count = $db->query($sql))) {
        return false;
    }
    list($post_count) = $result_count->fetch_row();
    if ($result->num_rows == 0 && $post_count > 0 && $page > 1) {
        return admin_get_post_approval_queue($page - 1);
    }
    while ($post_array = $result->fetch_assoc()) {
        $post_approval_array[] = $post_array;
    }
    return array('post_count' => $post_count, 'post_array' => $post_approval_array);
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:42,代码来源:admin.inc.php


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