コード例 #1
0
        header_redirect("admin_folders.php?webtag={$webtag}&page={$page}");
        exit;
    }
}
if (isset($_POST['move_down']) && is_array($_POST['move_down'])) {
    list($fid) = array_keys($_POST['move_down']);
    if (folder_move_down($fid)) {
        header_redirect("admin_folders.php?webtag={$webtag}&page={$page}");
        exit;
    }
}
if (isset($_POST['move_up_disabled']) || isset($_POST['move_down_disabled'])) {
    header_redirect("admin_folders.php?webtag={$webtag}&page={$page}");
    exit;
}
html_draw_top(array('title' => gettext('Admin - Manage Folders'), 'class' => 'window_title', 'main_css' => 'admin.css'));
$folder_array = folder_get_all_by_page($page);
echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage Folders"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '86%', 'center');
} else {
    if (isset($_GET['added'])) {
        html_display_success_msg(gettext("Successfully added new folder"), '86%', 'center');
    } else {
        if (isset($_GET['edited'])) {
            html_display_success_msg(gettext("Successfully edited folder"), '86%', 'center');
        } else {
            if (isset($_GET['deleted'])) {
                html_display_success_msg(gettext("Successfully removed selected folders"), '86%', 'center');
            } else {
                if (sizeof($folder_array['folder_array']) < 1) {
コード例 #2
0
ファイル: forum.inc.php プロジェクト: richstokoe/BeehiveForum
function forum_check_password($forum_fid)
{
    if (!is_numeric($forum_fid)) {
        return false;
    }
    $webtag = get_webtag();
    if (!($forum_passhash = forum_get_password($forum_fid))) {
        return true;
    }
    $forum_passhash_check = session::get_value("{$webtag}_PASSWORD");
    if (isset($_POST['forum_password']) && strlen($_POST['forum_password']) > 0) {
        $forum_passhash_check = md5($_POST['forum_password']);
    }
    if ($forum_passhash == $forum_passhash_check) {
        session::set_value("{$webtag}_PASSWORD", $forum_passhash_check);
        return true;
    }
    html_draw_top(sprintf("title=%s", gettext("Password Protected Forum")));
    echo "<h1>", gettext("Password Protected Forum"), "</h1>\n";
    if (session::get_value("{$webtag}_PASSWORD")) {
        html_display_error_msg(gettext("The username or password you supplied is not valid."), '550', 'center');
    }
    if ($password_protected_message = forum_get_setting('password_protected_message')) {
        echo fix_html($password_protected_message);
    } else {
        html_display_warning_msg(gettext("This forum is password protected. To gain access enter the password below."), '400', 'center');
    }
    echo "<br />\n";
    echo "<div align=\"center\">\n";
    echo "  <form accept-charset=\"utf-8\" method=\"post\" action=\"", get_request_uri(), "\" target=\"_self\" autocomplete=\"off\">\n";
    if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) {
        echo form_input_hidden_array($_POST);
    }
    echo "    ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
    echo "    <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
    echo "      <tr>\n";
    echo "        <td align=\"left\">\n";
    echo "          <table class=\"box\" width=\"400\">\n";
    echo "            <tr>\n";
    echo "              <td class=\"posthead\" align=\"center\">\n";
    echo "                <table class=\"posthead\" width=\"100%\">\n";
    echo "                  <tr>\n";
    echo "                    <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Enter Password"), "</td>\n";
    echo "                  </tr>\n";
    echo "                </table>\n";
    echo "                <table class=\"posthead\" width=\"90%\">\n";
    echo "                  <tr>\n";
    echo "                    <td align=\"left\">", gettext("Password"), ":</td>\n";
    echo "                    <td align=\"left\">", form_input_password('forum_password', '', 40, false, ''), "</td>\n";
    echo "                  </tr>\n";
    echo "                  <tr>\n";
    echo "                    <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
    echo "                  </tr>\n";
    echo "                </table>\n";
    echo "              </td>\n";
    echo "            </tr>\n";
    echo "          </table>\n";
    echo "        </td>\n";
    echo "      </tr>\n";
    echo "      <tr>\n";
    echo "        <td align=\"left\">&nbsp;</td>\n";
    echo "      </tr>\n";
    echo "      <tr>\n";
    echo "        <td align=\"center\">", form_submit("logon", gettext("Logon")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
    echo "      </tr>\n";
    echo "    </table>\n";
    if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::check_perm(USER_PERM_FORUM_TOOLS, 0)) {
        html_display_warning_msg(gettext("If you want to change some settings on your forum click the Admin link in the navigation bar above."), '400', 'center');
    }
    echo "  </form>\n";
    echo "</div>\n";
    html_draw_bottom();
    exit;
}
コード例 #3
0
}
if (isset($_GET['delete_comment']) && is_numeric($_GET['delete_comment'])) {
    $comment_id = $_GET['delete_comment'];
    $comment_uid = links_get_comment_uid($comment_id);
    if ($user_perm_links_moderate || $comment_uid == $_SESSION['UID']) {
        if (links_delete_comment($comment_id)) {
            $success_msg = gettext("Comment was deleted.");
        } else {
            $error_msg_array[] = gettext("Comment could not be deleted.");
            $valid = false;
        }
    }
}
$folders = links_folders_get(!$user_perm_links_moderate);
$page_title = links_get_folder_page_title($link['FID'], $folders, $link['TITLE']);
html_draw_top(array('title' => $page_title, 'class' => 'window_title'));
echo "<h1>", links_get_folder_path_links($link['FID'], $folders, true, true), html_style_image('separator'), "<a href=\"links.php?webtag={$webtag}&amp;lid={$lid}&amp;action=go\" target=\"_blank\">", word_filter_add_ob_tags($link['TITLE'], true), "</a></h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'center');
} else {
    if (isset($success_msg) && strlen($success_msg) > 0) {
        html_display_success_msg($success_msg, '600', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
echo "  <tr>\n";
echo "    <td align=\"left\">\n";
echo "      <table class=\"box\" width=\"100%\">\n";
echo "        <tr>\n";
コード例 #4
0
            }
        }
        if (forum_save_global_settings($new_forum_settings)) {
            if (isset($_POST['confirm_unread_cutoff'])) {
                forum_update_unread_data($unread_cutoff_stamp);
            }
            header_redirect("admin_default_forum_settings.php?webtag={$webtag}&updated=true", gettext("Forum settings successfully updated"));
        } else {
            $valid = false;
            $error_msg_array[] = gettext("Failed to update forum settings. Please try again later.");
        }
    }
    $forum_global_settings = array_merge($forum_global_settings, $new_forum_settings);
}
// Start Output Here
html_draw_top(sprintf('title=%s', gettext("Admin - Global Forum Settings")), 'class=window_title', "admin.js", "emoticons.js");
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Global Forum Settings"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'center');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Preferences were successfully updated."), '600', 'center');
    } else {
        html_display_warning_msg(gettext("<b>Note:</b> These settings affect all forums. Where the setting is duplicated on the individual Forum's settings page that will take precedence over the settings you change here."), '600', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"prefsform\" action=\"admin_default_forum_settings.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
コード例 #5
0
ファイル: mods_list.php プロジェクト: richstokoe/BeehiveForum
require_once BH_INCLUDE_PATH . 'word_filter.inc.php';
// Check we're logged in correctly
if (!session::logged_in()) {
    html_guest_error();
}
if (isset($_GET['fid']) && is_numeric($_GET['fid'])) {
    $fid = $_GET['fid'];
} else {
    if (isset($_POST['fid']) && is_numeric($_POST['fid'])) {
        $fid = $_POST['fid'];
    } else {
        html_draw_error(gettext("Cannot display folder moderators"));
    }
}
$folder_title = folder_get_title($fid);
html_draw_top(sprintf('title=%s', sprintf(gettext("Moderator list - %s"), $folder_title)), 'pm_popup_disabled', 'class=window_title');
echo "<div align=\"center\">\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"550\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td align=\"left\" class=\"subhead\" colspan=\"1\">", gettext("Moderator list"), " - ", $folder_title, "</td>\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"center\">\n";
echo "                    <table width=\"90%\" class=\"posthead\">\n";
echo "                      <tr>\n";
コード例 #6
0
ファイル: user_menu.php プロジェクト: richstokoe/BeehiveForum
// Bootstrap
require_once 'boot.php';
// Includes required by this page.
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 . 'perm.inc.php';
require_once BH_INCLUDE_PATH . 'session.inc.php';
// Check we're logged in correctly
if (!session::logged_in()) {
    html_guest_error();
}
html_draw_top();
echo "<table border=\"0\" width=\"100%\">\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"subhead\">", gettext("Menu"), "</td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_prefs.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("User Details"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_profile.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Edit Profile"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_password.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Change Password"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><hr /></td>\n";
コード例 #7
0
                    exit;
                } else {
                    header_redirect("edit_profile.php?webtag={$webtag}&uid={$uid}&profile_updated=true", gettext("Profile updated."));
                    exit;
                }
            }
        }
    }
}
if (is_array($profile_items_array) && sizeof($profile_items_array) > 0) {
    if ($admin_edit === true) {
        $user = user_get($uid);
        html_draw_top(sprintf('title=%s', sprintf(gettext("Admin - Edit Profile - %s"), format_user_name($user['LOGON'], $user['NICKNAME']))), 'class=window_title');
        echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Edit Profile"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", format_user_name($user['LOGON'], $user['NICKNAME']), "</h1>\n";
    } else {
        html_draw_top(sprintf('title=%s', gettext("My Controls - Edit Profile")), 'class=window_title');
        echo "<h1>", gettext("Edit Profile"), "</h1>\n";
    }
    if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
        html_display_error_array($error_msg_array, '600', $admin_edit ? 'center' : 'left');
    } else {
        if (isset($_GET['profile_updated'])) {
            html_display_success_msg(gettext("Profile updated."), '600', $admin_edit ? 'center' : 'left');
        }
    }
    if ($admin_edit === true) {
        echo "<div align=\"center\">\n";
    }
    echo "<br />\n";
    echo "<form accept-charset=\"utf-8\" name=\"f_profile\" action=\"edit_profile.php\" method=\"post\" target=\"_self\">\n";
    echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
コード例 #8
0
    } else {
        $search_keyword = '';
    }
}
if (isset($_POST['clear'])) {
    $search_keyword = '';
}
$uid = session::get_value('UID');
$header_text_array = array(FOLDER_IGNORED => gettext("Ignored Folders"), FOLDER_SUBSCRIBED => gettext("Subscribed Folders"));
$interest_level_array = array(FOLDER_IGNORED => gettext("Ignored"), FOLDER_SUBSCRIBED => gettext("Subscribed"));
if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
    $folder_subscriptions = folders_search_user_subscriptions($search_keyword, $view, $page);
} else {
    $folder_subscriptions = folders_get_user_subscriptions($view, $page);
}
html_draw_top(sprintf('title=%s', sprintf(gettext("My Controls - Folder Subscriptions - %s"), $header_text_array[$view]), 'edit_subscriptions.js', 'class=window_title'));
echo "<h1>", gettext("Folder Subscriptions"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />{$header_text_array[$view]}</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'left');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Folder interests updated successfully"), '600', 'left');
    } else {
        if (sizeof($folder_subscriptions['folder_array']) < 1) {
            if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
                html_display_warning_msg(gettext("Search Returned No Results"), '600', 'left');
            } else {
                if ($view == FOLDER_IGNORED) {
                    html_display_warning_msg(gettext("You are not ignoring any folders."), '600', 'left');
                } else {
                    html_display_warning_msg(gettext("You are not subscribed to any folders."), '600', 'left');
コード例 #9
0
        $user_prefs['PM_EXPORT_WORDFILTER'] = "Y";
    } else {
        $user_prefs['PM_EXPORT_WORDFILTER'] = "N";
    }
    // Update USER_PREFS
    if (user_update_prefs($uid, $user_prefs)) {
        // Redirect back to the page so we correctly reload the user's preferences.
        header_redirect("pm_options.php?webtag={$webtag}&updated=true", gettext("Preferences were successfully updated."));
        exit;
    } else {
        $error_msg_array[] = gettext("Some or all of your user account details could not be updated. Please try again later.");
        $valid = false;
    }
}
// Start output here
html_draw_top(sprintf("title=%s", gettext("Private Message Options")), "emoticons.js", 'class=window_title');
echo "<h1>", gettext("Private Message Options"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'left');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Preferences were successfully updated."), '600', 'left');
    }
}
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"prefs\" action=\"pm_options.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
コード例 #10
0
if (isset($_POST['endpoll'])) {
    if (poll_close($tid)) {
        post_add_edit_text($tid, 1);
        if (session::check_perm(USER_PERM_FOLDER_MODERATE, $t_fid) && $preview_message['FROM_UID'] != session::get_value('UID')) {
            admin_add_log_entry(EDIT_POST, array($t_fid, $tid, $pid));
        }
    }
    if ($thread_data['LENGTH'] > 1) {
        header_redirect("discussion.php?webtag={$webtag}&msg={$msg}&edit_success={$msg}");
        exit;
    } else {
        header_redirect("discussion.php?webtag={$webtag}&edit_success={$msg}");
        exit;
    }
}
html_draw_top(sprintf("title=%s", gettext("Close Poll")), "post.js", "resize_width=720", "basetarget=_blank", 'class=window_title');
echo "<h1>", gettext("Close Poll"), " {$tid}.{$pid}</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '720', 'left');
}
if ($preview_message['TO_UID'] == 0) {
    $preview_message['TLOGON'] = gettext("ALL");
    $preview_message['TNICK'] = gettext("ALL");
} else {
    $preview_tuser = user_get($preview_message['TO_UID']);
    $preview_message['TLOGON'] = $preview_tuser['LOGON'];
    $preview_message['TNICK'] = $preview_tuser['NICKNAME'];
}
$preview_tuser = user_get($preview_message['FROM_UID']);
$preview_message['FLOGON'] = $preview_tuser['LOGON'];
$preview_message['FNICK'] = $preview_tuser['NICKNAME'];
コード例 #11
0
        $page = 1;
    }
}
if (isset($_POST['user_search']) && strlen(trim($_POST['user_search'])) > 0) {
    $user_search = trim($_POST['user_search']);
} else {
    if (isset($_GET['user_search']) && strlen(trim($_GET['user_search'])) > 0) {
        $user_search = trim($_GET['user_search']);
    } else {
        $user_search = "";
    }
}
if (isset($_POST['clear_search'])) {
    $user_search = "";
}
html_draw_top(array('title' => gettext("Visitor Log"), 'class' => 'window_title'));
echo "<h1>", gettext("Visitor Log"), "</h1>\n";
$user_profile_array = visitor_log_browse_items($user_search, $profile_items_selected_array, $page, $sort_by, $sort_dir, $hide_empty == 'Y', $hide_guests == 'Y');
if (sizeof($user_profile_array['user_array']) < 1) {
    html_display_error_msg(gettext("Your search did not return any matches. Try simplifying your search parameters and try again."), '85%', 'center');
} else {
    if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
        html_display_error_array($error_msg_array, '85%', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"f_visitor_log\" action=\"visitor_log.php\" method=\"post\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('page', htmlentities_array($page)), "\n";
コード例 #12
0
                    exit;
                } else {
                    header_redirect("edit_profile.php?webtag={$webtag}&uid={$profile_uid}&profile_updated=true");
                    exit;
                }
            }
        }
    }
}
if (is_array($profile_items_array) && sizeof($profile_items_array) > 0) {
    if ($admin_edit === true) {
        $user = user_get($profile_uid);
        html_draw_top(array('title' => sprintf(gettext('Admin - Edit Profile - %s'), format_user_name($user['LOGON'], $user['NICKNAME'])), 'class' => 'window_title', 'js' => array('js/prefs.js')));
        echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage User"), html_style_image('separator'), format_user_name($user['LOGON'], $user['NICKNAME']), "</h1>\n";
    } else {
        html_draw_top(array('title' => gettext("My Controls - Edit Profile"), 'class' => 'window_title'));
        echo "<h1>", gettext("Edit Profile"), "</h1>\n";
    }
    if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
        html_display_error_array($error_msg_array, '700', $admin_edit ? 'center' : 'left');
    } else {
        if (isset($_GET['profile_updated'])) {
            html_display_success_msg(gettext("Profile updated."), '700', $admin_edit ? 'center' : 'left');
        }
    }
    if ($admin_edit === true) {
        echo "<div align=\"center\">\n";
    }
    echo "<br />\n";
    echo "<form accept-charset=\"utf-8\" name=\"f_profile\" action=\"edit_profile.php\" method=\"post\" target=\"_self\">\n";
    echo "  ", form_csrf_token_field(), "\n";
コード例 #13
0
                    $dictionary->correct_all_word_matches($t_change_to);
                }
                $dictionary->find_next_word();
            } else {
                if (isset($_POST['suggest'])) {
                    // Get more suggestions for the current word
                    $dictionary->get_more_suggestions();
                } else {
                    // We're moving to the next word;
                    $dictionary->find_next_word();
                }
            }
        }
    }
}
html_draw_top(sprintf('title=%s', gettext("Dictionary")), 'dictionary.js', 'pm_popup_disabled', 'class=window_title');
echo "<h1>", gettext("Dictionary"), "</h1>\n";
if ($dictionary->is_check_complete()) {
    html_display_success_msg(gettext("Spell check is complete. To restart spell check click restart button below."), '500', 'center');
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "  <form accept-charset=\"utf-8\" name=\"dictionary\" action=\"dictionary.php\" method=\"post\" target=\"_self\">\n";
echo "    ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "    ", form_input_hidden('obj_id', htmlentities_array($dictionary->get_obj_id())), "\n";
if ($ignored_words_array = $dictionary->get_ignored_words()) {
    foreach ($ignored_words_array as $ignored_word) {
        echo "    ", form_input_hidden('ignored_words[]', htmlentities_array($ignored_word)), "\n";
    }
}
echo "    ", form_input_hidden('content', htmlentities_array($dictionary->get_content())), "\n";
コード例 #14
0
            }
        }
        if (isset($tid) && $tid > 0) {
            $uri = "discussion.php?webtag={$webtag}&msg={$tid}.1";
        } else {
            $uri = "discussion.php?webtag={$webtag}";
        }
        header_redirect($uri);
    } else {
        $error_msg_array[] = sprintf(gettext("You can only post once every %s seconds. Please try again later."), forum_get_setting('minimum_post_frequency', 'is_numeric', 0));
    }
}
if (!($folder_dropdown = folder_draw_dropdown($fid, "fid", "", FOLDER_ALLOW_POLL_THREAD, USER_PERM_THREAD_CREATE, "", "post_folder_dropdown"))) {
    html_draw_error(gettext("You cannot create new threads."));
}
html_draw_top(array('title' => gettext('Create Poll'), 'base_target' => '_blank', 'js' => array('js/post.js', 'js/poll.js', 'js/attachments.js', 'js/emoticons.js', 'ckeditor/ckeditor.js', 'js/fineuploader.min.js'), 'class' => 'window_title max_width'));
echo "<h1>", gettext("Create Poll"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '960', 'left');
}
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"f_poll\" action=\"create_poll.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('dedupe', htmlentities_array($dedupe)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"960\" class=\"max_width\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
コード例 #15
0
        $user_search = "";
    }
}
if (isset($_GET['reset']) || isset($_POST['reset'])) {
    $user_search = "";
}
if (isset($_GET['filter']) && is_numeric($_GET['filter'])) {
    $filter = $_GET['filter'];
} else {
    if (isset($_POST['filter']) && is_numeric($_POST['filter'])) {
        $filter = $_POST['filter'];
    } else {
        $filter = ADMIN_USER_FILTER_NONE;
    }
}
html_draw_top(sprintf('title=%s', gettext("Admin - Manage Users")), 'class=window_title');
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Manage Users"), "</h1>\n";
if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0)) {
    if (isset($_POST['select_action'])) {
        if (isset($_POST['action']) && is_numeric($_POST['action'])) {
            if ($_POST['action'] == ADMIN_USER_OPTION_END_SESSION) {
                $valid = true;
                if (isset($_POST['user_update']) && is_array($_POST['user_update'])) {
                    $kick_users = array_filter(array_keys($_POST['user_update']), 'is_numeric');
                    $kick_user_success_array = array();
                    foreach ($kick_users as $user_uid) {
                        if ($valid && ($user_logon = user_get_logon($user_uid))) {
                            if (!admin_session_end($user_uid)) {
                                $error_msg_array[] = sprintf(gettext("Failed to end session for user %s"), $user_logon);
                                $valid = false;
                            }
コード例 #16
0
ファイル: register.php プロジェクト: richstokoe/BeehiveForum
                    html_draw_bottom();
                    exit;
                }
            } else {
                html_draw_top(sprintf("title=%s", gettext("User Registration")));
                html_display_msg(gettext("Successfully created user account"), gettext("Your user account has been created successfully! Click the continue button below to login"), 'index.php', 'get', array('continue' => gettext("Continue")), array('final_uri' => $final_uri), '_top', 'center');
                html_draw_bottom();
                exit;
            }
        } else {
            $error_msg_array[] = gettext("Error creating user record");
            $valid = false;
        }
    }
}
html_draw_top(sprintf('title=%s', gettext("User Registration")), 'emoticons.js', 'register.js', "basetarget={$frame_top_target}", 'class=window_title');
echo "<h1>", gettext("User Registration"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'center');
}
if (isset($user_agree_rules) && $user_agree_rules == 'Y') {
    html_display_warning_msg(gettext("More Profile and Preference options are available once you register"), '600', 'center');
    echo "<div align=\"center\">\n";
    echo "<form accept-charset=\"utf-8\" name=\"form_register\" action=\"register.php\" method=\"post\" target=\"_self\">\n";
    echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
    echo "  ", form_input_hidden('user_agree_rules', htmlentities_array($user_agree_rules)), "\n";
    echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
    echo "    <tr>\n";
    echo "      <td align=\"left\">\n";
    echo "        <table class=\"box\" width=\"100%\">\n";
    echo "          <tr>\n";
コード例 #17
0
ファイル: post.php プロジェクト: richstokoe/BeehiveForum
            $error_msg_array[] = gettext("Error creating post! Please try again in a few minutes.");
        }
    } else {
        $error_msg_array[] = sprintf(gettext("You can only post once every %s seconds. Please try again later."), forum_get_setting('minimum_post_frequency', null, 0));
    }
}
if (!isset($t_fid)) {
    $t_fid = 1;
}
if ($new_thread && !($folder_dropdown = folder_draw_dropdown($t_fid, "t_fid", "", FOLDER_ALLOW_NORMAL_THREAD, USER_PERM_THREAD_CREATE, "", "post_folder_dropdown"))) {
    html_draw_error(gettext("You cannot create new threads."));
}
if (isset($thread_data['CLOSED']) && $thread_data['CLOSED'] > 0 && !session::check_perm(USER_PERM_FOLDER_MODERATE, $t_fid)) {
    html_draw_error(gettext("This thread is closed, you cannot post in it!"));
}
html_draw_top(sprintf("title=%s", gettext("Post message")), "resize_width=785", "basetarget=_blank", "post.js", "attachments.js", "emoticons.js", "dictionary.js", 'search.js', 'search_popup.js', 'class=window_title');
echo "<h1>", gettext("Post message"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '785', 'left');
}
if (!$new_thread && isset($thread_data['CLOSED']) && $thread_data['CLOSED'] > 0 && session::check_perm(USER_PERM_FOLDER_MODERATE, $t_fid)) {
    html_display_warning_msg(gettext("Warning: this thread is closed for posting to normal users."), '785', 'left');
}
echo "<br /><form accept-charset=\"utf-8\" name=\"f_post\" action=\"post.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('t_dedupe', htmlentities_array($t_dedupe)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"785\" class=\"max_width\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
コード例 #18
0
if (isset($_POST['remove'])) {
    if (isset($_POST['remove_user']) && is_array($_POST['remove_user'])) {
        foreach ($_POST['remove_user'] as $uid) {
            if (perm_user_in_group($uid, $gid)) {
                perm_remove_user_from_group($uid, $gid);
                if (($user_logon = user_get_logon($uid)) && ($group_name = perm_get_group_name($gid))) {
                    admin_add_log_entry(REMOVE_USER_FROM_GROUP, array($user_logon, $group_name));
                }
            }
        }
    }
}
if (!($group = perm_get_group($gid))) {
    html_draw_error(gettext("Supplied GID is not a user group"), 'admin_user_groups.php', 'get', array('back' => gettext("Back")));
}
html_draw_top(array('title' => sprintf(gettext('Admin - Manage User Groups - %s - Add/Remove Users'), $group['GROUP_NAME']), 'class' => 'window_title', 'main_css' => 'admin.css'));
$group_users_array = perm_group_get_users($gid, $start_main);
echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage User Groups"), html_style_image('separator'), "{$group['GROUP_NAME']}", html_style_image('separator'), "", gettext("Add/Remove Users"), "</h1>\n";
if (isset($_GET['added'])) {
    html_display_success_msg(gettext("Successfully added group. Add users to this group by searching for them below."), '800', 'center');
} else {
    if (sizeof($group_users_array['user_array']) < 1) {
        html_display_warning_msg(gettext("There are no users in this group. Add users to this group by searching for them below."), '800', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"f_folders\" action=\"admin_user_groups_edit_users.php\" method=\"post\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('gid', htmlentities_array($gid)), "\n";
コード例 #19
0
ファイル: start.php プロジェクト: richstokoe/BeehiveForum
======================================================================*/
// Bootstrap
require_once 'boot.php';
// Includes required by this page.
require_once BH_INCLUDE_PATH . 'cache.inc.php';
require_once BH_INCLUDE_PATH . 'constants.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 - fixes problems with Opera.
cache_disable();
// Get the user's saved left frame width.
if (($left_frame_width = session::get_value('LEFT_FRAME_WIDTH')) === false) {
    $left_frame_width = 280;
}
html_draw_top('frame_set_html', 'pm_popup_disabled');
$frameset = new html_frameset_cols('start', "{$left_frame_width},*");
if (isset($_GET['left']) && $_GET['left'] == "threadlist") {
    $frameset->html_frame("thread_list.php?webtag={$webtag}", html_get_frame_name('left'));
} else {
    $frameset->html_frame("start_left.php?webtag={$webtag}", html_get_frame_name('left'));
}
if (isset($_GET['show']) && $_GET['show'] == "visitors") {
    $frameset->html_frame("visitor_log.php?webtag={$webtag}", html_get_frame_name('right'));
} else {
    $frameset->html_frame("start_main.php?webtag={$webtag}", html_get_frame_name('right'));
}
$frameset->output_html();
html_draw_bottom(true);
コード例 #20
0
                    } else {
                        $error_msg_array[] = sprintf(gettext("Failed to remove permissions from user '%s'"), $user_logon);
                        $valid = false;
                    }
                }
            }
            if ($valid) {
                $ret = rawurlencode($ret);
                $user_search = rawurlencode($user_search);
                header_redirect("admin_forum_access.php?webtag={$webtag}&user_search={$user_search}&ret={$ret}&removed=true");
                exit;
            }
        }
    }
}
html_draw_top(sprintf('title=%s', gettext("Admin - Manage Forum Permissions")), 'class=window_title');
$user_permissions_array = forum_get_permissions($forum_fid, $main_page);
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Manage Forum Permissions"), "</h1>\n";
if (isset($_GET['added'])) {
    html_display_success_msg(gettext("Successfully added permissions for selected users"), '500', 'center');
} else {
    if (isset($_GET['removed'])) {
        html_display_success_msg(gettext("Successfully removed permissions from selected users"), '500', 'center');
    } else {
        if (sizeof($user_permissions_array['user_array']) < 1) {
            html_display_warning_msg(gettext("No existing users permissions found. To grant permission to users search for them below."), '500', 'center');
        }
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
コード例 #21
0
            }
        }
        if (isset($tid) && $tid > 0) {
            $uri = "discussion.php?webtag={$webtag}&msg={$tid}.1";
        } else {
            $uri = "discussion.php?webtag={$webtag}";
        }
        header_redirect($uri);
    } else {
        $error_msg_array[] = sprintf(gettext("You can only post once every %s seconds. Please try again later."), forum_get_setting('minimum_post_frequency', null, 0));
    }
}
if (!($folder_dropdown = folder_draw_dropdown($fid, "fid", "", FOLDER_ALLOW_POLL_THREAD, USER_PERM_THREAD_CREATE, "", "post_folder_dropdown"))) {
    html_draw_error(gettext("You cannot create new threads."));
}
html_draw_top(sprintf("title=%s", gettext("Create Poll")), "basetarget=_blank", "resize_width=785", "post.js", "poll.js", "attachments.js", "dictionary.js", "emoticons.js", 'class=window_title');
echo "<h1>", gettext("Create Poll"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '785', 'left');
}
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"f_poll\" action=\"create_poll.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('dedupe', htmlentities_array($dedupe)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"785\" class=\"max_width\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
if ($valid && (isset($_POST['preview_poll']) || isset($_POST['preview_form']))) {
コード例 #22
0
                            echo "    <tr>\n";
                            echo "      <td align=\"center\">", form_submit("post_count_submit", gettext("Confirm")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
                            echo "    </tr>\n";
                            echo "  </table>\n";
                            echo "</form>\n";
                            echo "</div>\n";
                            html_draw_bottom();
                            exit;
                        }
                    }
                }
            }
        }
    }
}
html_draw_top("title={$page_title}", 'class=window_title');
echo "<h1>{$page_title}</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'center');
} else {
    if (isset($success_html) && strlen(trim($success_html)) > 0) {
        html_display_success_msg($success_html, '600', 'center');
    } else {
        if (isset($_GET['profile_updated'])) {
            html_display_success_msg(gettext("Profile updated."), '600', 'center');
        } else {
            if (isset($_GET['signature_updated'])) {
                html_display_success_msg(gettext("Signature Updated"), '600', 'center');
            } else {
                if (isset($_GET['approved'])) {
                    html_display_success_msg(gettext("Successfully approved user"), '600', 'center');
コード例 #23
0
        $search_keyword = trim($_GET['search_keyword']);
    } else {
        $search_keyword = '';
    }
}
if (isset($_POST['clear'])) {
    $search_keyword = '';
}
$header_text_array = array(FOLDER_IGNORED => gettext("Ignored Folders"), FOLDER_SUBSCRIBED => gettext("Subscribed Folders"));
$interest_level_array = array(FOLDER_IGNORED => gettext("Ignored"), FOLDER_SUBSCRIBED => gettext("Subscribed"));
if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
    $folder_subscriptions = folders_search_user_subscriptions($search_keyword, $view, $page);
} else {
    $folder_subscriptions = folders_get_user_subscriptions($view, $page);
}
html_draw_top(array('title' => sprintf(gettext('My Controls - Folder Subscriptions - %s'), $header_text_array[$view]), 'js' => array('js/edit_subscriptions.js', 'js/prefs.js'), 'class' => 'window_title'));
echo "<h1>", gettext("Folder Subscriptions"), html_style_image('separator'), "{$header_text_array[$view]}</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '700', 'left');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Folder interests updated successfully"), '700', 'left');
    } else {
        if (sizeof($folder_subscriptions['folder_array']) < 1) {
            if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
                html_display_warning_msg(gettext("Search Returned No Results"), '700', 'left');
            } else {
                if ($view == FOLDER_IGNORED) {
                    html_display_warning_msg(gettext("You are not ignoring any folders."), '700', 'left');
                } else {
                    html_display_warning_msg(gettext("You are not subscribed to any folders."), '700', 'left');
コード例 #24
0
     echo "          </tr>\n";
     echo "        </table>\n";
     echo "      </td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"left\">&nbsp;</td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"center\">", form_submit("updatefeedsubmit", gettext("Save")), "&nbsp;", form_submit("delete", gettext("Delete")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
     echo "    </tr>\n";
     echo "  </table>\n";
     echo "  </form>\n";
     echo "</div>\n";
     html_draw_bottom();
 } else {
     html_draw_top(sprintf('title=%s', gettext("Admin - RSS Feeds")), 'search.js', 'class=window_title');
     $rss_feeds = rss_feed_get_feeds($page);
     echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("RSS Feeds"), "</h1>\n";
     if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
         html_display_error_array($error_msg_array, '70%', 'center');
     } else {
         if (isset($_GET['added'])) {
             html_display_success_msg(gettext("Successfully added new feed"), '70%', 'center');
         } else {
             if (isset($_GET['edited'])) {
                 html_display_success_msg(gettext("Successfully edited feed"), '70%', 'center');
             } else {
                 if (isset($_GET['deleted'])) {
                     html_display_success_msg(gettext("Successfully removed selected feeds"), '70%', 'center');
                 } else {
                     if (sizeof($rss_feeds['rss_feed_array']) < 1) {
コード例 #25
0
ファイル: edit_email.php プロジェクト: DeannaG65/BeehiveForum
        $user_prefs['DOB_DISPLAY'] = trim($_POST['dob_display']);
    } else {
        $user_prefs['DOB_DISPLAY'] = 0;
    }
    // Update USER_PREFS
    if (user_update_prefs($_SESSION['UID'], $user_prefs, $user_prefs_global)) {
        header_redirect("edit_email.php?webtag={$webtag}&updated=true");
        exit;
    } else {
        $error_msg_array[] = gettext("Some or all of your user account details could not be updated. Please try again later.");
        $valid = false;
    }
}
// Check to see if we should show the set for all forums checkboxes
$show_set_all = forums_get_available_count() > 1 ? true : false;
html_draw_top(array('title' => gettext('My Controls - Email & Privacy'), 'class' => 'window_title', 'js' => array('js/prefs.js')));
echo "<h1>", htmlentities_array(gettext("Email & Privacy")), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '700', 'left');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Preferences were successfully updated."), '700', 'left');
    }
}
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"prefs\" action=\"edit_email.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
コード例 #26
0
    if (isset($_POST['remove_days']) && is_numeric($_POST['remove_days'])) {
        $remove_days = $_POST['remove_days'];
    } else {
        $remove_days = 0;
    }
    if ($valid) {
        if (admin_prune_log($remove_type, $remove_days)) {
            header_redirect("admin_viewlog.php?webtag={$webtag}&sort_dir={$sort_dir}&sort_by={$sort_by}&group_by={$group_by}&pruned=true");
            exit;
        } else {
            $error_msg_array[] = gettext("Failed To Prune Admin Log");
            $valid = false;
        }
    }
}
html_draw_top(array('title' => gettext('Admin - Admin Access Log'), 'class' => 'window_title', 'main_css' => 'admin.css'));
$admin_log_array = admin_get_log_entries($page, $group_by, $sort_by, $sort_dir);
echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Admin Access Log"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '86%', 'center');
} else {
    if (isset($_GET['pruned'])) {
        html_display_success_msg(gettext("Successfully Pruned Admin Log"), '86%', 'center');
    } else {
        if (sizeof($admin_log_array['admin_log_array']) < 1) {
            html_display_warning_msg(gettext("Admin Log is empty"), '86%', 'center');
        } else {
            html_display_warning_msg(gettext("This list shows the last actions sanctioned by users with Admin privileges."), '86%', 'center');
        }
    }
}
コード例 #27
0
ファイル: forgot_pw.php プロジェクト: richstokoe/BeehiveForum
if (isset($_POST['request'])) {
    if (isset($_POST['logon'])) {
        $logon = mb_strtoupper($_POST['logon']);
        if (email_send_pw_reminder($logon)) {
            html_draw_top(sprintf('title=%s', gettext("Password reset e-mail sent")), 'class=window_title');
            html_display_msg(gettext("Password reset e-mail sent"), gettext("You should shortly receive an e-mail containing instructions for resetting your password."), 'logon.php', 'get', array('back' => gettext("Back")), false, '_self', 'center');
            html_draw_bottom();
            exit;
        } else {
            $error_msg_array[] = gettext("Could not send password reminder. Please contact the forum owner.");
        }
    } else {
        $error_msg_array[] = gettext("A valid username is required");
    }
}
html_draw_top(sprintf('title=%s', gettext("Forgot password")), 'class=window_title');
echo "<h1>", gettext("Forgot password"), "</h1>";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '450', 'center');
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "  <form accept-charset=\"utf-8\" name=\"forgot_pw\" action=\"forgot_pw.php\" method=\"post\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"450\">\n";
echo "      <tr>\n";
echo "        <td align=\"center\">\n";
echo "          <table class=\"box\" width=\"450\">\n";
echo "            <tr>\n";
echo "              <td align=\"left\" class=\"posthead\">\n";
echo "                <table class=\"posthead\" width=\"100%\">\n";
コード例 #28
0
     echo "          </tr>\n";
     echo "        </table>\n";
     echo "      </td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"left\">&nbsp;</td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td colspan=\"2\" align=\"center\">", form_submit("editfilter_submit", gettext("Save")), "&nbsp;", form_submit("delete", gettext("Delete")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
     echo "    </tr>\n";
     echo "  </table>\n";
     html_display_warning_msg(sprintf('%s<p>%s</p>%s', gettext("<b>All</b> matches against the whole text so filtering mom to mum will also change moment to mument."), gettext("<b>Whole Word</b> matches against whole words only so filtering mom to mum will NOT change moment to mument."), gettext("<b>PREG</b> allows you to use Perl Regular Expressions to match text.")), '600', 'left');
     echo "</form>\n";
     html_draw_bottom();
 } else {
     html_draw_top(sprintf('title=%s', gettext("My Controls - Edit Word Filter")), 'class=window_title');
     $word_filter_array = user_get_word_filter_list($page);
     echo "<h1>", gettext("Edit Word Filter"), "</h1>\n";
     if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
         html_display_error_array($error_msg_array, '600', 'left');
     } else {
         if (isset($_GET['updated'])) {
             html_display_success_msg(gettext("Word Filter updated"), '600', 'left');
         } else {
             if (sizeof($word_filter_array['word_filter_array']) < 1) {
                 html_display_warning_msg(gettext("No existing word filter entries found. To add a filter click the 'Add New' button below."), '600', 'left');
             }
         }
     }
     echo "<br />\n";
     echo "<form accept-charset=\"utf-8\" method=\"post\" action=\"edit_wordfilter.php\">\n";
コード例 #29
0
            $user_stats_array = stats_get_post_tallys($stats_start, $stats_end);
        }
    }
} else {
    $from_day = 1;
    $from_month = date('n');
    $from_year = date('Y');
    $to_day = date('t');
    $to_month = date('n');
    $to_year = date('Y');
    $stats_start = mktime(0, 0, 0, date('n'), 1, date('Y'));
    $stats_end = mktime(23, 59, 59, date('n'), date('t'), date('Y'));
    $num_days = ($stats_end - $stats_start) / 60 / 60 / 24;
    $user_stats_array = stats_get_post_tallys($stats_start, $stats_end);
}
html_draw_top(sprintf('title=%s', sprintf(gettext("Admin - Posting Stats For Period %s to %s"), format_date($stats_start), format_date($stats_end))), 'class=window_title');
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", sprintf(gettext("Posting Stats For Period %s to %s"), format_date($stats_start), format_date($stats_end)), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '700', 'center');
} else {
    if (sizeof($user_stats_array['user_stats']) < 1) {
        html_display_warning_msg(gettext("No post data recorded for this period."), '700', 'center');
    }
}
echo "  <br />\n";
echo "  <div align=\"center\">\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
コード例 #30
0
     echo "          </tr>\n";
     echo "        </table>\n";
     echo "      </td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"left\">&nbsp;</td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"center\">", form_submit("editfeedsubmit", gettext("Save")), "&nbsp;", form_submit("viewitems[{$psid}]", gettext("View items")), "&nbsp;", form_submit("cancel", gettext("Back")), "</td>\n";
     echo "    </tr>\n";
     echo "  </table>\n";
     echo "  </form>\n";
     echo "</div>\n";
     html_draw_bottom();
 } else {
     html_draw_top(array('title' => gettext('Admin - Manage Profile Sections'), 'class' => 'window_title', 'main_css' => 'admin.css'));
     $profile_sections = profile_sections_get_by_page($page);
     echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage Profile Sections"), "</h1>\n";
     if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
         html_display_error_array($error_msg_array, '86%', 'center');
     } else {
         if (isset($_GET['added'])) {
             html_display_success_msg(gettext("Successfully added profile section"), '86%', 'center');
         } else {
             if (isset($_GET['edited'])) {
                 html_display_success_msg(gettext("Successfully edited profile section"), '86%', 'center');
             } else {
                 if (isset($_GET['deleted'])) {
                     html_display_success_msg(gettext("Successfully removed selected profile sections"), '86%', 'center');
                 } else {
                     if (sizeof($profile_sections['profile_sections_array']) < 1) {