예제 #1
0
        $smileydata = $PHORUM["mod_smileys"]["smileys"][$smiley_id];
        $search = $smileydata["search"];
        $smiley = $smileydata["smiley"];
        $alt = $smileydata["alt"];
        $uses = $smileydata["uses"];
    }
}
$frm = new PhorumInputForm("", "post", $submit);
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "smileys");
$frm->hidden("smiley_id", $smiley_id);
$frm->hidden("action", "edit_smiley");
$frm->addbreak($title);
$frm->addrow("Smiley string to match", $frm->text_box("search", $search, 20));
$row = $frm->addrow("Image to replace the string with", $frm->select_tag("smiley", array_merge(array('' => 'Select smiley ...'), $available_smileys), $smiley, "onChange=\"change_image(this.options[this.selectedIndex].value);\"") . "&nbsp;&nbsp;<div style=\"display:none;margin-top:5px\" id=\"preview_div\"><strong>Preview: </strong><img src=\"images/trans.gif\" id=\"preview_image\" /></div>");
$frm->addhelp($row, "Smiley replacement image", "The drop down list shows all images that were found in your\n     smiley prefix path. If you want to add your own smileys, simply place\n     them in \"" . htmlspecialchars($PHORUM["mod_smileys"]["prefix"]) . "\"\n     and reload this page.");
$frm->addrow("ALT attribute for the image", $frm->text_box("alt", $alt, 40));
$frm->addrow("Used for", $frm->select_tag("uses", $PHORUM_MOD_SMILEY_USES, $uses));
$frm->show();
// Make the preview image visible in case a $smiley is set.
if (!empty($smiley)) {
    ?>
    <script type="text/javascript">
    change_image('<?php 
    print addslashes($smiley);
    ?>
');
    </script><?php 
}
// Show the configured list of smileys.
if ($smiley_id == "NEW") {
예제 #2
0
파일: settings.php 프로젝트: mgs2/kw-forum
    $PHORUM["mod_announcements"]["disable_autodisplay"] = isset($_POST["disable_autodisplay"]) ? 1 : 0;
    $PHORUM["mod_announcements"]["only_show_unread"] = isset($_POST["only_show_unread"]) ? 1 : 0;
    $PHORUM["mod_announcements"]["number_to_show"] = (int) $_POST["number_to_show"];
    $PHORUM["mod_announcements"]["days_to_show"] = (int) $_POST["days_to_show"];
    phorum_db_update_settings(array("mod_announcements" => $PHORUM["mod_announcements"]));
    phorum_admin_okmsg("Announcement settings updated");
}
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "announcements");
$frm->addbreak("Announcement Settings");
$page_list = $frm->checkbox("pages[home]", 1, "Home page, root level forum list (index.php)", $PHORUM["mod_announcements"]["pages"]["home"]) . "<br/>" . $frm->checkbox("pages[index]", 1, "Any forum List (index.php)", $PHORUM["mod_announcements"]["pages"]["index"]) . "<br/>" . $frm->checkbox("pages[list]", 1, "Message List (list.php)", $PHORUM["mod_announcements"]["pages"]["list"]) . "<br/>" . $frm->checkbox("pages[read]", 1, "Read Message (read.php)", $PHORUM["mod_announcements"]["pages"]["read"]);
$frm->addrow("Announcements Appear On", $page_list);
$row = $frm->addrow("Disable automatic displaying of announcements?", $frm->checkbox("disable_autodisplay", 1, "Disable automatic displaying", $PHORUM["mod_announcements"]["disable_autodisplay"]));
$frm->addhelp($row, "Disable automatic displaying", "By default, the announcements will be displayed after the page header automatically. If you need more control over the exact placement, then enable this option. Then you can specify where you want the announcements to appear yourself by placing the code {MOD_ANNOUNCEMENTS} in your templates.");
$frm->addrow("Show only unread messages to the user?", $frm->checkbox("only_show_unread", 1, "Show only unread", $PHORUM["mod_announcements"]["only_show_unread"]));
$frm->addrow("Number To Show", $frm->text_box("number_to_show", $PHORUM["mod_announcements"]["number_to_show"], 10));
$frm->addrow("Maximum Days To Show", $frm->text_box("days_to_show", $PHORUM["mod_announcements"]["days_to_show"], 10) . " (0 = forever)");
$forum_list_global = phorum_get_forum_info(1, 0);
$frm->addrow("Announcement Forum", $frm->select_tag("forum_id", $forum_list_global, $PHORUM["mod_announcements"]["forum_id"]));
//$vroot_folders = phorum_db_get_forums(0, NULL, '\'forum_id\'');
$vroot_folders = phorum_get_forum_info(3, -1);
if (count($vroot_folders)) {
    $frm->addbreak("Announcement Forums for Virtual Root Folders");
    foreach ($vroot_folders as $vroot_folder_id => $vroot_path) {
        $forum_list_vroot = phorum_get_forum_info(1, $vroot_folder_id);
        $forum_list_vroot[0] = 'No Announcements for this Virtual Root';
        asort($forum_list_vroot);
        $frm->addrow('VROOT "' . $vroot_path . '"', $frm->select_tag("vroot_forum_id[{$vroot_folder_id}]", $forum_list_vroot, isset($PHORUM["mod_announcements"]["vroot"][$vroot_folder_id]) ? $PHORUM["mod_announcements"]["vroot"][$vroot_folder_id] : 0));
    }
예제 #3
0
파일: badwords.php 프로젝트: mgs2/kw-forum
        <?php 
} else {
    // load bad-words-list
    $banlists = phorum_db_get_banlists();
    $bad_words = $banlists[PHORUM_BAD_WORDS];
    include_once "./include/admin/PhorumInputForm.php";
    $frm = new PhorumInputForm("", "post", $submit);
    $frm->hidden("module", "badwords");
    $frm->hidden("curr", "{$curr}");
    $row = $frm->addbreak($title);
    if ($curr == 'NEW') {
        $frm->addmessage("This feature can be used to mask bad words in forum messages\n             with \"" . PHORUM_BADWORD_REPLACE . "\". All bad words will\n             automatically be replaced by that string. If you want to use\n             a different string (e.g. \"CENSORED\" or \"*****\"), then you\n             can change the definition of the constant\n             \"PHORUM_BADWORD_REPLACE\" in the Phorum file\n             include/constants.php.");
    }
    $row = $frm->addrow("Bad Word", $frm->text_box("string", $string, 50));
    $frm->addhelp($row, "Bad Word", "The word that you want to mask in forum messages.\n             Rules that apply to the matching are:\n             <ul>\n               <li><b>Only the full word</b> is matched, so \"foo\" would\n                   not mask (part of) \"foobar\";</li>\n               <li>The match is <b>case insensitive</b>, so \"foo\" would also\n                   mask \"FoO\".</li>\n             </ul>");
    $frm->addrow("Valid for Forum", $frm->select_tag("forum_id", $forum_list, $forum_id));
    $row = $frm->addrow('Comments', $frm->textarea('comments', $comments, 50, 7));
    $frm->addhelp($row, "Comments", "This field can be used to add some comments to the ban (why you\n             created it, when you did this, when the ban can be deleted, etc.)\n             These comments will only be shown on this page and are meant as\n             a means for the administrator to do some bookkeeping.");
    $frm->show();
    echo "<hr class=\"PhorumAdminHR\" />";
    if (count($bad_words)) {
        echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"PhorumAdminTable\" width=\"100%\">\n";
        echo "<tr>\n";
        echo "    <td class=\"PhorumAdminTableHead\">Word</td>\n";
        echo "    <td class=\"PhorumAdminTableHead\">Valid for Forum</td>\n";
        echo "    <td class=\"PhorumAdminTableHead\">&nbsp;</td>\n";
        echo "</tr>\n";
        foreach ($bad_words as $key => $item) {
            $edit_url = phorum_admin_build_url(array('module=badwords', 'edit=1', "curr={$key}"));
            $delete_url = phorum_admin_build_url(array('module=badwords', 'delete=1', "curr={$key}"));
예제 #4
0
파일: settings.php 프로젝트: netovs/Core
} elseif (isset($_GET['message']) && $_GET['message'] == 'success') {
    $okmsg = "Settings updated";
    phorum_admin_okmsg($okmsg);
}
// create the time zone drop down array
for ($x = -23; $x <= 23; $x++) {
    $tz_range[$x] = $x;
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post");
$frm->addbreak("Phorum General Settings");
$frm->hidden("module", "settings");
$row = $frm->addrow("Phorum Title", $frm->text_box("title", $PHORUM["title"], 50));
$row = $frm->addrow("Phorum Description", $frm->textarea("description", $PHORUM["description"], 30, 5, "style='width: 100%'"));
$row = $frm->addrow("DNS Lookups", $frm->select_tag("dns_lookup", array("No", "Yes"), $PHORUM["dns_lookup"]));
$frm->addhelp($row, "DNS Lookups", "DNS is the system that (amongsts other things) is responsible for\n     translating host names into IP addresses and vice versa.\n     If DNS lookups are enabled, phorum will use DNS lookups for:\n     <ul>\n     <li>logging the hostname from which a message was posted, instead of\n         the plain IP address;</li>\n     <li>being able to create IP ban items based on host and domain names;</li>\n     <li>checking the email address that is for user registrations.</li>\n     </ul>\n     If Phorum keeps reporting illegal email addresses during signup or\n     if you are suffering from massive delays during posting messages,\n     then there might be DNS problems on your server. In that case, disable\n     DNS lookups as a work around.");
$row = $frm->addrow("Hide inaccessible Forums on the Index Page", $frm->select_tag("hide_forums", array("No", "Yes"), $PHORUM["hide_forums"]));
$frm->addhelp($row, "Hide inaccessible Forums on the Index Page", "By setting this to Yes, forums that users are not allowed to read will be hidden from them in the forums list.");
$row = $frm->addrow("Show New Counts for Forums on the Index Page", $frm->select_tag("show_new_on_index", array(PHORUM_NEWFLAGS_NOCOUNT => "No", PHORUM_NEWFLAGS_COUNT => "Yes", PHORUM_NEWFLAGS_CHECK => "No count, just indicator"), $PHORUM["show_new_on_index"]));
$frm->addhelp($row, "Show New Counts for Forums on the Index Page", "This feature will show registered users how many new messages and threads there are in each forum on the forum index page.  If you have a large number of posts, a large number of forums, a large number of users or some combination of the three, this setting could cause some performance issues.  If you see performance issues, try setting it to \"No count, just indicator\" or \"No\"");
$row = $frm->addrow("How to Display Forums and Folders on the Index Page", $frm->select_tag("index_style", array(PHORUM_INDEX_DIRECTORY => 'Directory Structure', PHORUM_INDEX_FLAT => 'Flat Structure'), $PHORUM["index_style"]));
$frm->addhelp($row, "How to Display Forums and Folders on the Index Page", "Forum has multiple displaying styles available for the index page:\n     <ul>\n     <li><b>Directory Structure:</b><br/>\n         <br/>\n         <em>This style resembles the way in which you normally would browse a\n         filesystem directory structure, hence the name.</em><br/>\n         <br/>\n         When using this style, the index page will show a list of folders\n         and a list of forums that are available in the folder for which the\n         index page is shown. The user can either go to a forum or traverse\n         the folder tree by going to one of the deeper folders.<br/><br/></li>\n     <li><b>Flat Structure</b><br/>\n         <br/>\n         <em>This style will present the user a flat list of category sections\n         with forums (and possibly folders) in them. This is the style\n         that most forums use nowadays.</em><br/>\n         <br/>\n         When using this style, the root index page will show category\n         sections with forums and folders in them. Each section is a folder\n         that is directly below the root. The folders and forums that are\n         in those folders are shown in the corresponding sections.<br/>\n         Forums that are placed directly in the root folder, will be\n         shown in a generic \"Forums\" section.<br/>\n         <br/>\n         When visiting a subfolder, then the folders and forums inside that\n         subfolder are shown. For a subfolder, No sections are displayed.\n         This means that browsing subfolders in the flat structure works\n         a bit like browsing them in the directory structure.</li>\n     </ul>");
$row = $frm->addrow("Go To Forum if only One Forum is Visible on the Index", $frm->select_tag("jump_on_single_forum", array("No", "Yes"), $PHORUM['jump_on_single_forum']));
$frm->addhelp($row, "Go To Forum if only One Forum is Visible on the Index", "By setting this to Yes, Phorum will automatically jump to a forum if that is the only forum visible on the index page. This can be useful in case you are running a forum site with only one forum (or where visitors see only one forum due to permission settings), so visitors do not have to do an additional click to get from the index to the forum.");
$row = $frm->addrow("Enable Moderator Notifications", $frm->select_tag("enable_moderator_notifications", array("No", "Yes"), $PHORUM["enable_moderator_notifications"]));
$frm->addhelp($row, "Enable Moderator Notifications", "By setting this to Yes, Phorum will display notice to the various kinds of moderators when they have a new item that requires their attention. For example, message moderators will see a notice whenever there is an unapproved message.");
$row = $frm->addrow("User Post Edit Time Limit (minutes)", $frm->text_box("user_edit_timelimit", $PHORUM["user_edit_timelimit"], 10));
$frm->addhelp($row, "User Post Edit Time Limit (minutes)", "If set to a value larger then 0, this acts as a time limit for post editing. Users will only be able to edit their own posts within this time limit. This only applies if a user has the necessary permissions to edit their post, and does not affect moderators.");
$row = $frm->addrow("Track Edit Changes", $frm->select_tag("track_edits", array("No", "Yes", "Yes, Moderator Only"), $PHORUM["track_edits"]));
$frm->addhelp($row, "Track Edit Changes", "When enabled, the changes made to a message will be stored and viewed by users.  It can optionaly only be viewed by moderators.");
$row = $frm->addrow("Reply form appears", $frm->select_tag("reply_on_read_page", array("1" => "On the read page", "0" => "On a separate page"), $PHORUM["reply_on_read_page"]));
예제 #5
0
    if($inherit_id=="" && $inherit_id!==0) $inherit_id="NULL";

    $row=$frm->addrow("Inherit Settings from Forum", $frm->select_tag("inherit_id", $forum_list, $inherit_id, $disabled_form_input_inherit));

    // Set Settings from inherit forum
    if( $forum_settings_inherit ) {
        $forum_settings =$forum_settings_inherit;
        extract($forum_settings[$inherit_id]);
    }
}

$frm->addbreak("Moderation / Permissions");

$row=$frm->addrow("Moderate Messages", $frm->select_tag("moderation", array(PHORUM_MODERATE_OFF=>"Disabled", PHORUM_MODERATE_ON=>"Enabled"), $moderation, $disabled_form_input));

$frm->addhelp($row, "Moderate Messages", "This setting determines whether messages are visible to users immediately after they are posted.  If enabled, all messages will remain hidden until approved by a moderator.");

$frm->addrow("Email Messages To Moderators", $frm->select_tag("email_moderators", array(PHORUM_EMAIL_MODERATOR_OFF=>"Disabled", PHORUM_EMAIL_MODERATOR_ON=>"Enabled"), $email_moderators, $disabled_form_input));

$pub_perm_frm = $frm->checkbox("pub_perms[".PHORUM_USER_ALLOW_READ."]", 1, "Read", $pub_perms & PHORUM_USER_ALLOW_READ, $disabled_form_input)."&nbsp;&nbsp;".
$frm->checkbox("pub_perms[".PHORUM_USER_ALLOW_REPLY."]", 1, "Reply", $pub_perms & PHORUM_USER_ALLOW_REPLY, $disabled_form_input)."&nbsp;&nbsp;".
$frm->checkbox("pub_perms[".PHORUM_USER_ALLOW_NEW_TOPIC."]", 1, "Create&nbsp;New&nbsp;Topics", $pub_perms & PHORUM_USER_ALLOW_NEW_TOPIC, $disabled_form_input)."<br />".
$frm->checkbox("pub_perms[".PHORUM_USER_ALLOW_ATTACH."]", 1, "Attach&nbsp;Files", $pub_perms & PHORUM_USER_ALLOW_ATTACH, $disabled_form_input);

$frm->addrow("Public Users", $pub_perm_frm);

$reg_perm_frm = $frm->checkbox("reg_perms[".PHORUM_USER_ALLOW_READ."]", 1, "Read", $reg_perms & PHORUM_USER_ALLOW_READ, $disabled_form_input)."&nbsp;&nbsp;".
$frm->checkbox("reg_perms[".PHORUM_USER_ALLOW_REPLY."]", 1, "Reply", $reg_perms & PHORUM_USER_ALLOW_REPLY, $disabled_form_input)."&nbsp;&nbsp;".
$frm->checkbox("reg_perms[".PHORUM_USER_ALLOW_NEW_TOPIC."]", 1, "Create&nbsp;New&nbsp;Topics", $reg_perms & PHORUM_USER_ALLOW_NEW_TOPIC, $disabled_form_input)."<br />".
$frm->checkbox("reg_perms[".PHORUM_USER_ALLOW_EDIT."]", 1, "Edit&nbsp;Their&nbsp;Posts", $reg_perms & PHORUM_USER_ALLOW_EDIT, $disabled_form_input)."&nbsp;&nbsp;".
$frm->checkbox("reg_perms[".PHORUM_USER_ALLOW_ATTACH."]", 1, "Attach&nbsp;Files", $reg_perms & PHORUM_USER_ALLOW_ATTACH, $disabled_form_input);
예제 #6
0
파일: newforum.php 프로젝트: netovs/Core
if (!defined("PHORUM_DEFAULT_OPTIONS")) {
    $frm->addrow("Forum Title", $frm->text_box("name", $name, 30, 50));
    $frm->addrow("Forum Description", $frm->textarea("description", $description, $cols = 60, $rows = 10, "style=\"width: 100%;\""), "top");
    $parent_id_options = phorum_api_forums_get_parent_id_options($forum_id);
    $frm->addrow("Put this forum below folder", $frm->select_tag('parent_id', $parent_id_options, $parent_id));
    if ($vroot > 0) {
        $frm->addrow("This forum is in the Virtual Root of:", $folder_list[$vroot]);
    }
    $row = $frm->addrow("Make this forum visible in the forum index?", $frm->select_tag("active", array("No", "Yes"), $active));
    $frm->addhelp($row, "Make this forum visible in the forum index?", 'If this option is set to "No", then this forum will not be visible
         in the forum index. This is mainly an option for temporarily keeping
         a forum hidden to your users (e.g. while you are creating and
         configuring a forum or for testing out features).<br/>
         <br/>
         <b>This is not a security option!</b><br/>
         <br/>
         A forum that is not visible is still accessible by all users
         that have at least read access for it. If you need a forum that is
         only accessible by some of your users, then use the permission system
         for that. Revoke all rights from both public and registered users in
         the forum settings and use group or user permissions to grant access
         to the users.');
    // If we're inheriting settings from a different forum,
    // then disable the inherited fields in the input.
    $disabled_form_input = '';
    if ($inherit_id != -1) {
        $disabled_form_input = 'disabled="disabled"';
    }
    $frm->addbreak("Inherit Forum Settings");
    // First check if the settings for this forum are inherited by one or
    // more other forums and/or folders. Inherited inheritance is not
예제 #7
0
파일: logviewer.php 프로젝트: samuell/Core
// ----------------------------------------------------------------------
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", $filter_mode ? "Apply filter" : "Refresh page");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "event_logging");
$frm->hidden("curpage", $page);
$frm->hidden("el_action", $filter_mode ? "filter" : "logviewer");
$frm->addrow("<span style=\"float:right;margin-right:10px\">" . $frm->select_tag("pagelength", $pagelengths, $pagelength, 'onchange="this.form.submit()"') . "&nbsp;&nbsp;&nbsp\n         <input type=\"submit\" name=\"prevpage\" value=\"&lt;&lt;\"/>\n         page " . $frm->select_tag("page", $pagelist, $page, 'onchange="this.form.submit()"') . " of {$pages}\n         <input type=\"submit\" name=\"nextpage\" value=\"&gt;&gt;\"/>\n     </span>Number of entries: {$logcount}");
if ($filter_mode) {
    $frm->hidden("filter_mode", 1);
    $loglevel_checkboxes = '';
    foreach ($strings["LOGLEVELS"] as $l => $s) {
        $loglevel_checkboxes .= '<span style="white-space: nowrap">' . $frm->checkbox("show_loglevel[{$l}]", "1", "", isset($show_loglevel[$l]) ? 1 : 0, "id=\"llcb_{$l}\"") . ' <label for="llcb_' . $l . '"><img align="absmiddle" src="' . $PHORUM["http_path"] . '/mods/event_logging/images/loglevels/' . $l . '.png"/> ' . $s . '</label></span> ';
    }
    $row = $frm->addrow("Log levels to display", $loglevel_checkboxes);
    $frm->addhelp($row, "Log levels to display", "By using these checkboxes, you can limit the log levels that are displayed. If you do not check any of them, then no filtering will be applied and all log levels will be displayed.");
    $category_checkboxes = '';
    foreach ($strings["CATEGORIES"] as $l => $s) {
        $category_checkboxes .= '<span style="white-space: nowrap">' . $frm->checkbox("show_category[{$l}]", "1", "", isset($show_category[$l]) ? 1 : 0, "id=\"cacb_{$l}\"") . ' <label for="cacb_' . $l . '">' . $s . '</label></span> ';
    }
    $row = $frm->addrow("Categories to display", $category_checkboxes);
    $frm->addhelp($row, "Categories to display", "By using these checkboxes, you can limit the log categories that are displayed. If you do not check any of them, then no filtering will be applied and all log categories will be displayed.");
    $sources = array("" => "");
    $sources = array_merge($sources, event_logging_getsources());
    $row = $frm->addrow("Source to display", $frm->select_tag("source", $sources, isset($_POST["source"]) ? $_POST["source"] : ""));
    $row = $frm->addrow("Filter by user", "User ID " . $frm->text_box("user_id", isset($_POST["user_id"]) ? $_POST["user_id"] : "", 10) . " Username " . $frm->text_box("username", isset($_POST["username"]) ? $_POST["username"] : "", 20));
    $frm->addhelp($row, "Filter by user", "Using these fields, you can specify for what user you want to display the event logs.<br/><br/>The User ID must be the exact numeric id for the user.<br/><br/>In the username field, you can use the \"*\" wildcard (e.g. searching for \"john*\" would find both the users \"johndoe\" and \"johnny\").");
    $row = $frm->addrow("Filter by IP address", $frm->text_box("ip", isset($_POST["ip"]) ? $_POST["ip"] : "", 20));
    $frm->addhelp($row, "Filter by IP address", "Using this field, you can specify for what IP address you want to display the event logs.<br/><br/>In the field, you can use the \"*\" wildcard (e.g. searching for \"172.16.12.*\" will find both the IP addresses \"172.16.12.1\" and \"172.16.12.211\").");
    $row = $frm->addrow("Filter by message", $frm->text_box("message", isset($_POST["message"]) ? htmlspecialchars($_POST["message"]) : "", 40));
    $frm->addhelp($row, "Filter by message", "Filter all events where the message matches the specified text.<br/><br/>In the field, you can use the \"*\" wildcard (e.g. searching for \"fail*\" would find both entries with \"failure\" and \"failacity\").");
예제 #8
0
    return;
}
// ========================================================================
// Build the sanity checking admin page.
// ========================================================================
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Restart sanity checks");
$frm->hidden("module", "sanity_checks");
$frm->addbreak("Phorum System Sanity Checks");
$frm->addmessage("Below you will find the results for a number of sanity checks\n     that have been performed on your system. If you see any\n     warnings or errors, then read the comments for them and \n     try to resolve the issues.");
// Show sanity check results.
foreach ($PHORUM["SANITY_CHECKS"]["CHECKS"] as $check) {
    if ($check["status"] != PHORUM_SANITY_SKIP) {
        if (isset($check["error"])) {
            $check["error"] = str_replace("\n", " ", $check["error"]);
        }
        if (isset($check["solution"])) {
            $check["solution"] = str_replace("\n", " ", $check["solution"]);
        }
        $display = $status2display[$check["status"]];
        $block = "<div style=\"color:{$display[1]};background-color:{$display[0]};text-align:center;border:1px solid black;\">{$display[2]}</div>";
        $row = $frm->addrow($check['description'], $block);
        if (!empty($check["error"])) {
            if (!empty($check["solution"])) {
                $check["error"] .= "<br/><br/>" . "<strong>Possible solution:</strong>" . "<br/><br/>" . $check["solution"];
            }
            $frm->addhelp($row, "Sanity check failed", $check["error"]);
        }
    }
}
$frm->show();
예제 #9
0
파일: banlist.php 프로젝트: mgs2/kw-forum
            </form>
        </div>

        <?php 
} else {
    include_once "./include/admin/PhorumInputForm.php";
    $frm = new PhorumInputForm("", "post", $submit);
    $frm->hidden("module", "banlist");
    $frm->hidden("curr", "{$curr}");
    $frm->addbreak($title);
    if ($curr == "NEW") {
        $frm->addmessage("Ban items can be used to deny new user registrations and\n             posting of (private) messages, based on various criteria.\n             If a ban item applies to a user action, then this action\n             will be fully blocked by Phorum. This can for example be used\n             to block user registrations and postings from certain IP\n             addresses or to prevent certain words from being used in\n             forum messages.<br />\n             <br />\n             If you want to fully ban a user, then it's best to\n             set \"Active\" to \"No\" for the user in the\n             \"Edit Users\" interface.");
    }
    $frm->addrow("String To Match", $frm->text_box("string", $string, 50));
    $row = $frm->addrow("Field To Match", $frm->select_tag("type", $ban_types, $type));
    $frm->addhelp($row, "Field To Match", "\n            Below, you will find an overview of what\n            ban items are used by what Phorum actions:<br/>\n            <br/>\n            <b>User registration</b>:<br/>\n            \"Name/User Name\" checks the new username<br/>\n            \"Email Address\" checks the new email address<br/>\n            \"IP Address/Hostname\" checks the visitor's IP<br/>\n            <br/>\n            <b>Posting forum messages by anonymous users</b><br/>\n            \"Name/User Name\" checks the author's name<br/>\n            \"Email Address\" checks the author's email address<br/>\n            \"Illegal Words (SPAM)\" checks the subject and body<br/>\n            \"IP Address/Hostname\" checks the author's IP<br/>\n            <br/>\n            <b>Posting forum messages by registered users</b><br/>\n            \"Name/User Name\" checks the author's username<br/>\n            \"User-Id (registered User)\" checks the author's user id<br/>\n            \"Email Address\" checks the author's email address<br/>\n            \"IP Address/Hostname\" checks the author's IP<br/>\n            \"Illegal Words (SPAM)\" checks the subject and body<br/>\n            <br/>\n            <b>Posting private messages</b><br/>\n            \"Name/User Name\" checks the sender's username<br/>\n            \"User-Id (registered User)\" checks the sender's user id<br/>\n            \"Email Address\" checks the sender's email address<br/>\n            \"IP Address/Hostname\" checks the sender's IP\n        ");
    $row = $frm->addrow("Compare As", $frm->select_tag("pcre", $match_types, $pcre) . "<div style=\"font-size:x-small\">If using PCRE for comparison, \"String To Match\" should be a valid PCRE expression.<br/>See <a href=\"http://php.net/pcre\" target=\"_blank\">the PHP manual</a> for more information about PCRE.</div>");
    $frm->addhelp($row, "Compare As", "\n            This setting can be used to specify the matching method\n            that has to be used for the ban item. There are two options:<br/>\n            <br/>\n            <ul>\n              <li><b>String</b><br/>\n                  The exact string from the \"String To Match\" field\n                  will be used for matching. Wildcards are not available\n                  for the String field type.<br/><br/></li>\n\n              <li><b>PCRE</b><br/>\n                  The \"String To Match\" field will be treated as\n                  a <a href=\"http://www.php.net/pcre\">Perl Compatible\n                  Regular Expression</a>.</li>\n            </ul>\n        ");
    $frm->addrow("Valid for Forum", $frm->select_tag("forum_id", $forum_list, $forum_id));
    $row = $frm->addrow('Comments', $frm->textarea('comments', $comments, 50, 7));
    $frm->addhelp($row, "Comments", "This field can be used to add some comments to the ban (why you\n             created it, when you did this, when the ban can be deleted, etc.)\n             These comments will only be shown on this page and are meant as\n             a means for the administrator to do some bookkeeping.");
    $frm->show();
    if ($curr == "NEW") {
        $PHORUM['banlists'] = phorum_db_get_banlists(true);
        unset($PHORUM['banlists'][PHORUM_BAD_WORDS]);
        echo "<hr class=\"PhorumAdminHR\" />";
        if (count($PHORUM['banlists'])) {
            echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"PhorumAdminTable\" width=\"100%\">\n";
            echo "<tr>\n";
            echo "    <td class=\"PhorumAdminTableHead\">String</td>\n";
            echo "    <td class=\"PhorumAdminTableHead\">Field</td>\n";
예제 #10
0
파일: settings.php 프로젝트: netovs/Core
if (!file_exists('./mods/event_logging')) {
    $check = '<span style="color:red">The Event Logging module ' . 'is currently not installed; logging cannot ' . 'be enabled</span>';
    $disabled = 'disabled="disabled"';
    $PHORUM["mod_spamhurdles"]["log_events"] = 0;
} elseif (empty($PHORUM['mods']['event_logging'])) {
    $check = '<span style="color:red">The Event Logging module ' . 'is currently not activated; logging cannot ' . 'be enabled</span>';
    $disabled = 'disabled="disabled"';
    $PHORUM["mod_spamhurdles"]["log_events"] = 0;
} else {
    $check = '<span style="color:darkgreen">The Event Logging module ' . 'is activated; events can be logged by enabling the ' . 'feature below</span>';
    $disabled = '';
}
$frm->addrow($check, '');
$row = $frm->addrow('Log blocked form posts to the Event Logging module?', $frm->checkbox("log_events", 1, "Yes", $PHORUM["mod_spamhurdles"]["log_events"], $disabled));
$url = phorum_admin_build_url(array('module=modsettings', 'mod=event_logging', 'el_action=logviewer'));
$frm->addhelp($row, "Log blocked form posts to the Event Logging module?", "When both this feature and the Event Logging module are enabled,\n     then the Spam Hurdles module will log information about blocked\n     form posts to the Phorum Event Log. To view this log, go to\n     <a href=\"{$url}\">the Event Log viewer</a>");
// ----------------------------------------------------------------------
// Configure spam hurdles for posting messages
// ----------------------------------------------------------------------
$frm->addbreak("Spam Hurdles for posting new messages");
$row = $frm->addrow('What action has to be taken when a spam message is suspected?', $frm->select_tag('posting_block_action', array('blockerror' => 'Fully block and show an error', 'unapprove' => 'Accept, but make unapproved'), $PHORUM['mod_spamhurdles']['posting']['block_action']));
$frm->addhelp($row, "Action when a spam message is suspected", "You can choose whether you want to fully block suspected spam messages\n     or that you want to have them posted in a moderated state, so they\n     will need approval by a moderator.<br/>\n     <br/>\n     A message is suspicious if it fails one of the spam hurdles:<br/>\n     <ul>\n       <li>Block forms that are submitted multiple times</li>\n       <li>Check if an HTML commented form field is submitted</li>\n       <li>Let the browser sign the form using JavaScript</li>\n     </ul>\n     For the remaining hurdles, an error state might be resolved by\n     the user (e.g. by filling in the correct CAPTCHA code or by\n     resubmitting a too quickly posted form). For those errors,\n     there will always be an error message and a chance for the\n     user to fix the issue to make posting possible.");
create_spamhurdle_options($frm, 'posting', array('posting.tpl', 'posting_messageform.tpl'), 'tpl_editor_before_textarea', array("none" => "Disable hurdle", "anonymous" => "Enable for anonymous users", "all" => "Enable for all users"));
// ----------------------------------------------------------------------
// Configure spam hurdles for user registration
// ----------------------------------------------------------------------
$frm->addbreak("Spam Hurdles for user registration");
create_spamhurdle_options($frm, 'register', array('register.tpl'), 'tpl_register_form', array("none" => "Disable hurdle", "all" => "Enable hurdle"));
// ----------------------------------------------------------------------
// Configure spam hurdles for PM
// ----------------------------------------------------------------------
예제 #11
0
파일: cache.php 프로젝트: samuell/Core
            $error = "Database error while updating settings.";
        }
    }
}
if ($error) {
    phorum_admin_error($error);
} elseif ($okmsg) {
    phorum_admin_okmsg($okmsg);
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post");
$frm->hidden("module", "cache");
$frm->addbreak("Phorum Cache Settings");
$frm->addbreak("Which template data to cache (uses cache directory)");
$row = $frm->addrow("Enable Caching stylesheet data (CSS):", $frm->select_tag("cache_css", array("No", "Yes"), $PHORUM["cache_css"]));
$frm->addhelp($row, "Cache stylesheet", "Phorum uses a system where modules can add data to the main stylesheet\r\n     for the pages. By enabling this feature, Phorum can cache the dynamically\r\n     generated data and improve caching of the stylesheet data in the browsers\r\n     of your visitors. Enabling this feature is highly recommended. Only\r\n     disable it if you are having problems with it.");
$row = $frm->addrow("Enable Caching JavaScript code:", $frm->select_tag("cache_javascript", array("No", "Yes"), $PHORUM["cache_javascript"]));
$frm->addhelp($row, "Cache JavaScript", "Phorum uses a system where modules can provide JavaScript code for the\r\n     pages. By enabling this feature, Phorum can cache the dynamically\r\n     generated data and improve caching of the JavaScript data in the browsers\r\n     of your visitors. Enabling this feature is highly recommended. Only\r\n     disable it if you are having problems with it.");
$frm->addbreak("Which data to cache (uses selected cache layer)");
$row = $frm->addrow("Enable Caching Userdata:", $frm->select_tag("cache_users", array("No", "Yes"), $PHORUM["cache_users"]));
$row = $frm->addrow("Enable Caching Newflags:", $frm->select_tag("cache_newflags", array("No", "Yes"), $PHORUM["cache_newflags"]));
$row = $frm->addrow("Enable Caching Messages:", $frm->select_tag("cache_messages", array("No", "Yes"), $PHORUM["cache_messages"]));
$row = $frm->addrow("Enable Caching Banlists:", $frm->select_tag("cache_banlists", array("No", "Yes"), $PHORUM["cache_banlists"]));
$row = $frm->addrow("Enable Caching RSS-Feeds:", $frm->select_tag("cache_rss", array("No", "Yes"), $PHORUM["cache_rss"]));
$frm->addbreak("Settings that are set from include/config/cache.php");
$row = $frm->addrow("Cache Directory", $PHORUM['CACHECONFIG']['directory']);
$frm->addhelp($row, "Cache Directory", "Caching is used to take some load off the database and web server.\r\n     The cache directory is used for caching preprocessed Phorum templates\r\n     and for caching data in case \"file\" is set as the cache layer.<br/>\r\n     <br/>\r\n     For most installations, it will be fine to use the default temp directory\r\n     for the server (/tmp on UNIX systems and C:\\Windows\\Temp for Windows\r\n     systems).<br/>\r\n     <br/>\r\n     If your server has PHP Safe Mode enabled, you will need to create a\r\n     directory under your Phorum directory and make it writable by the web\r\n     server (you can use the directory \"./cache\" which was included in the\r\n     Phorum distribution for this purpose).");
$frm->addrow("Cache-Layer", $PHORUM['CACHECONFIG']['type']);
// calling mods
$frm = phorum_api_hook("admin_cache", $frm);
$frm->show();
예제 #12
0
include_once "./include/admin/PhorumInputForm.php";

$frm = new PhorumInputForm ( "", "post" );

$frm->addbreak( "Phorum General Settings" );

$frm->hidden( "module", "settings" );

$row=$frm->addrow( "Phorum Title", $frm->text_box( "title", $PHORUM["title"], 50 ) );

$row=$frm->addrow( "DNS Lookups", $frm->select_tag( "dns_lookup", array( "No", "Yes" ), $PHORUM["dns_lookup"] ) );

$row=$frm->addrow( "Use Cookies", $frm->select_tag( "use_cookies", array( "No", "Yes" ), $PHORUM["SETTINGS"]["use_cookies"] ) );

$row=$frm->addrow( "Hide Forums", $frm->select_tag( "hide_forums", array( "No", "Yes" ), $PHORUM["hide_forums"] ) );
$frm->addhelp($row, "Hide Forums", "By setting this to Yes, forums that users are not allowed to read will be hidden from them in the forums list." );

$row=$frm->addrow( "Show New Count in Forum List", $frm->select_tag( "show_new_on_index", array( "No", "Yes" ), $PHORUM["show_new_on_index"] ) );

$row=$frm->addrow( "Folder/Forum display style", $frm->select_tag( "use_new_folder_style", array( "Classic", "New" ), $PHORUM["use_new_folder_style"] ) );
$frm->addhelp($row, "Folder/Forum display style", "Since version 3, Phorum has included folders.  Until version 5.1, forums inside folders did not show until you clicked on the folder.  In 5.1, the list of forums in a folder can now be shown under that folder in the forum list.  This allows admins to organize a large list of forums all on one page." );

$row=$frm->addrow( "Enable Moderator Notifications", $frm->select_tag( "enable_moderator_notifications", array( "No", "Yes" ), $PHORUM["enable_moderator_notifications"] ) );
$frm->addhelp($row, "Enable Moderator Notifications", "By setting this to Yes, Phorum will display notice to the various kinds of moderators when they have a new item that requires their attention. For example, message moderators will see a notice whenever there is an unapproved message." );

$row=$frm->addrow( "User Post Edit Time Limit (minutes)", $frm->text_box( "user_edit_timelimit", $PHORUM["user_edit_timelimit"], 10) );
$frm->addhelp($row, "User Post Edit Time Limit (minutes)", "If set to a value larger then 0, this acts as a time limit for post editing. Users will only be able to edit their own posts within this time limit. This only applies if a user has the necessary permissions to edit their post, and does not affect moderators." );

$row=$frm->addrow( "Reply form appears", $frm->select_tag( "reply_on_read_page", array( "1"=>"On the read page", "0"=>"On a separate page" ), $PHORUM["reply_on_read_page"] ) );

$row=$frm->addrow( "After posting goto", $frm->select_tag( "redirect_after_post", array( "list"=>"Message List Page", "read"=>"Message Read Page" ), $PHORUM["redirect_after_post"] ) );
예제 #13
0
        // to return an array containing the following elements:
        //
        // [1] A status, which can be one of
        //     PHORUM_SANITY_OK     No problem found
        //     PHORUM_SANITY_WARN   Problem found, but no fatal one
        //     PHORUM_SANITY_CRIT   Critical problem found
        //
        // [2] A description of the problem that was found or NULL.
        //
        // [3] A solution for the problem or NULL.
        //
        list($status, $error, $solution) = call_user_func($check["function"]);
        if (isset($error)) $error = str_replace("\n", " ", $error);
        if (isset($solution)) $solution = str_replace("\n", " ", $solution);
        $display = $status2display[$status];
        $block = "<div style=\"color:{$display[1]};background-color:{$display[0]};text-align:center;border:1px solid black;\">{$display[2]}</div>";
        $row = $frm->addrow($check['description'], $block);
        if (! empty($error)) {
            if (! empty($solution))
                $error .= "<br/><br/>" .
                          "<strong>Possible solution:</strong>" .
                          "<br/><br/>" .
                          $solution;
            $frm->addhelp($row,"Sanity check failed",$error);
        }
    }

    $frm->show();

?>
예제 #14
0
     both interactive (CAPTCHA) and non-interactive anti-spam methods
     to keep away spam bots. On this page, you can control exactly
     what spam hurdles to enable.

    <br style="clear:both" />
    <?php 
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "spamhurdles");
$frm->addbreak("Non interactive spam blocking methods for posting messages");
$userspec = array("none" => "Disable hurdle", "anonymous" => "Enable for anonymous users", "all" => "Enable for all users");
$blockspec = array("blockerror" => "Fully block and show an error", "unapprove" => "Accept, but make unapproved");
$row = $frm->addrow("What action has to be taken when blocking a message?", $frm->select_tag("blockaction", $blockspec, $PHORUM["mod_spamhurdles"]["blockaction"]));
$row = $frm->addrow("Block message forms that are submitted multiple times", $frm->select_tag("blockmultipost", $userspec, $PHORUM["mod_spamhurdles"]["blockmultipost"]));
$frm->addhelp($row, "Block multiple submits", "If this option is enabled, then a unique key will be generated for each new message. As soon as the message is posted, this key will be invalidated for posting. This effectively prevents people from going back in the browser and resubmitting a (slightly changed) message (flooding) as well as spammers who directly submit posting forms to Phorum's post.php, without fetching a fresh unique key first.<br/><br/><b>User impact:</b><br/>This does not affect the way in which people can use Phorum, so the recommended value for this option is \"Enable for all users\".");
$row = $frm->addrow("Block message forms that are submitted too quickly", $frm->select_tag("blockquickpost", $userspec, $PHORUM["mod_spamhurdles"]["blockquickpost"]));
$frm->addhelp($row, "Block quick message submits", "If this option is enabled, Phorum will check how much time there is between starting a new message and actually posting it. If a message is posted too quickly, then it's considered to come from a posting robot. To prevent users from accidentally posting the message too quickly themselves (For example by typing only \"yes\" in the body and hitting the submit button), the posting button is disabled as long as the server would block the message. On the button, a countdown is shown to display how many seconds the user has to wait before posting.<br/><br/><b>User impact:</b><br/>This option does work for all browsers, only for the posting button to be disabled, JavaScript support is required.");
$row = $frm->addrow("Check if an HTML commented form field is submitted", $frm->select_tag("commentfieldcheck", $userspec, $PHORUM["mod_spamhurdles"]["commentfieldcheck"]));
$frm->addhelp($row, "Comment form field check", "If this option is enabled, then an extra form field is added to the posting form. However, this form field is embedded within an HTML comment block. Because of that, normal web browsers will fully ignore this extra field. On the other hand, some badly written spam bots will recognize the code as a form field. If such a spam bot posts a message including this extra form field, the message will be blocked.<br/><br/><b>User impact:</b><br/>This does not affect the way in which people can use Phorum, so the recommended value for this option is \"Enable for all users\".");
$row = $frm->addrow("Let the browser sign the message using JavaScript", $frm->select_tag("jsmd5check", $userspec, $PHORUM["mod_spamhurdles"]["jsmd5check"]));
$frm->addhelp($row, "Let the browser sign the message", "If this option is enabled, then the browser will retrieve two pieces of data from the server. The browser will have to create a signature for this data (using MD5) and does so by running some JavaScript. The signing JavaScript code is put in the message editor in a scrambled way (using iScramble) and the browser will have to descramble it using JavaScript to be able to run the signing code.<br/><br/>Functionally, this is all done to force the use of JavaScript when posting a message. This can block those spambots that do not interpret JavaScript, but only try to post the unmodified form information that is found on the message posting page.<br/><br/><b>User impact:</b><br/>This option requires JavaScript support in the browser. If a user does not have JavaScript (enabled), then posting is not possible.");
$frm->addbreak("Interactive CAPTCHA");
$row = $frm->addrow("Let visitors solve a CAPTCHA when registering a new account?", $frm->checkbox("register_captcha", 1, "Yes", $PHORUM["mod_spamhurdles"]["register_captcha"]));
$frm->addhelp($row, "Registering CAPTCHA", "If this option is enabled, a CAPTCHA (Completely Automated Public Turing-test to tell Computers and Humans Apart) will be used when visitors are registering a new user account. A check is added to the registering process, where the user has to prove that he/she is a human, by solving a simple puzzle. Below you can specify which type of CAPTCHA to use for this.<br/><br/><b>User impact:</b><br/>The user will have to solve the CAPTCHA before a new account can be registered. So this will require an extra action by the user. The exact user impact depends on the type of CAPTCHA that is used.");
$row = $frm->addrow("Let visitors solve a CAPTCHA when posting a new message", $frm->select_tag("posting_captcha", $userspec, $PHORUM["mod_spamhurdles"]["posting_captcha"]));
$frm->addhelp($row, "Posting CAPTCHA", "If this option is enabled, a CAPTCHA (Completely Automated Public Turing-test to tell Computers and Humans Apart) will be used when posting a new message. A check is added to the posting process, where the user has to prove that he/she is a human, by solving a simple puzzle. Below you can specify which type of CAPTCHA to use for this.<br/><br/><b>User impact:</b><br/>The user will have to solve the CAPTCHA before a message can be posted. So this will require an extra action by the user. The exact user impact depends on the type of CAPTCHA that is used.");
$captchaspec = array('javascript' => 'Code, drawn using JavaScript', 'image' => 'Code, drawn using a GIF image', 'asciiart' => 'Code, drawn using ASCII art', 'plaintext' => 'Code, plain text format', 'maptcha' => 'Solve a simple math question', 'recaptcha' => 'Code, using the reCAPTCHA service');
$row = $frm->addrow("Which type of CAPTCHA?", $frm->select_tag("captcha_type", $captchaspec, $PHORUM["mod_spamhurdles"]["captcha_type"], "id=\"captcha_select\" onchange=\"handle_captcha_select()\""));
$frm->addhelp($row, "Type of CAPTCHA", "This module supports a wide range of CAPTCHA types. See the README that was bundled with this module for detailed information on these types and for deciding which one you want to use for your site.");
$row = $frm->addrow("Enable spoken CAPTCHA? You will need the program \"Flite\" for this.", $frm->checkbox("spoken_captcha", 1, "Yes", $PHORUM["mod_spamhurdles"]["spoken_captcha"]));
예제 #15
0
파일: groups.php 프로젝트: netovs/Core
 // for getting back to the edit-page
 $frm->hidden('edit', '1');
 $frm->hidden("group_id", $_GET["group_id"]);
 $open_options = array(PHORUM_GROUP_CLOSED => "No", PHORUM_GROUP_OPEN => "Yes", PHORUM_GROUP_REQUIRE_APPROVAL => "Yes (require Group Moderator approval)");
 $frm->addrow("Name:", $frm->text_box("name", $group["name"], 50));
 $frm->addrow("Allow Membership Requests:", $frm->select_tag("open", $open_options, $group["open"], ""));
 $frm->show();
 echo "<br /><hr class=\"PhorumAdminHR\" /><br />";
 $frm = new PhorumInputForm("", "post", "Update");
 $frm->hidden("module", "groups");
 $frm->hidden("section", "forums");
 // for getting back to the edit-page
 $frm->hidden('edit', '1');
 $frm->hidden("group_id", $_GET["group_id"]);
 $row = $frm->addbreak("Edit Forum Permissions");
 $frm->addhelp($row, "Forum Permissions", "Permissions given to groups overwrite any permissions granted by the forum properties.  Also, if a user is granted permissions directly to a forum in the user admin, any group permissions he has for that forum will be ignored.  If the user is a member of two or more groups that have permissions in the same forum, the permissions will be combined. (eg. If group A allows read and reply and group B allows create and moderate, the user will receive all four permissions.)");
 $forumpaths = phorum_get_forum_info(1);
 $perm_frm = $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $new_forum_permission & PHORUM_USER_ALLOW_READ) . "&nbsp;&nbsp;" . $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $new_forum_permission & PHORUM_USER_ALLOW_REPLY) . "&nbsp;&nbsp;" . $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $new_forum_permission & PHORUM_USER_ALLOW_NEW_TOPIC) . "&nbsp;&nbsp;" . $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_EDIT . "]", 1, "Edit&nbsp;Their&nbsp;Posts", $new_forum_permission & PHORUM_USER_ALLOW_EDIT) . "<br />" . $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $new_forum_permission & PHORUM_USER_ALLOW_ATTACH) . "<br />" . $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_MODERATE_MESSAGES . "]", 1, "Moderate Messages", $new_forum_permission & PHORUM_USER_ALLOW_MODERATE_MESSAGES) . "&nbsp;&nbsp;" . $frm->checkbox("new_permissions[" . PHORUM_USER_ALLOW_MODERATE_USERS . "]", 1, "Moderate Users", $new_forum_permission & PHORUM_USER_ALLOW_MODERATE_USERS) . "&nbsp;&nbsp;";
 $arr[] = "Add A Forum...";
 foreach ($forumpaths as $forum_id => $forumname) {
     if (empty($group["permissions"][$forum_id]) && $forums[$forum_id]['folder_flag'] == 0) {
         $arr[$forum_id] = $forumname;
     }
 }
 if (count($arr) > 1) {
     $frm->addrow($frm->select_tag("new_forum", $arr), $perm_frm);
 }
 ksort($group["permissions"]);
 if (is_array($group["permissions"])) {
     foreach ($group["permissions"] as $forum_id => $perms) {
         $perm_frm = $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $perms & PHORUM_USER_ALLOW_READ) . "&nbsp;&nbsp;" . $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $perms & PHORUM_USER_ALLOW_REPLY) . "&nbsp;&nbsp;" . $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $perms & PHORUM_USER_ALLOW_NEW_TOPIC) . "&nbsp;&nbsp;" . $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_EDIT . "]", 1, "Edit&nbsp;Their&nbsp;Posts", $perms & PHORUM_USER_ALLOW_EDIT) . "<br />" . $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $perms & PHORUM_USER_ALLOW_ATTACH) . "<br />" . $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_MODERATE_MESSAGES . "]", 1, "Moderate Messages", $perms & PHORUM_USER_ALLOW_MODERATE_MESSAGES) . "&nbsp;&nbsp;" . $frm->checkbox("permissions[{$forum_id}][" . PHORUM_USER_ALLOW_MODERATE_USERS . "]", 1, "Moderate Users", $perms & PHORUM_USER_ALLOW_MODERATE_USERS) . "&nbsp;&nbsp;" . $frm->hidden("forums[{$forum_id}]", $forum_id);
예제 #16
0
파일: settings.php 프로젝트: sheldon/dejavu
    $settings["max_log_entries"] = (int) $_POST["max_log_entries"];
    $settings["min_log_level"] = (int) $_POST["min_log_level"];
    foreach ($eventtypes as $type => $desc) {
        $settings["do_log_{$type}"] = isset($_POST["do_log_{$type}"]) ? 1 : 0;
    }
    phorum_db_update_settings(array("mod_event_logging" => $settings));
    phorum_admin_okmsg("The settings were successfully saved.");
}
// Create the settings form.
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save settings");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "event_logging");
$frm->hidden("el_action", "settings");
$frm->addbreak("General Settings");
$row = $frm->addrow("Minimum log level", $frm->select_tag("min_log_level", $GLOBALS["PHORUM"]["DATA"]["MOD_EVENT_LOGGING"]["LOGLEVELS"], $settings["min_log_level"]));
$frm->addhelp($row, "Minimum log level", "This option configures the minimum log level for which log messages are written to the event log. Events with a lower log level will not be written.<br/><br/>\"Debug\" is the lowest log level and \"Alert\" the highest, so to log all events, set this option to \"Debug\".");
$row = $frm->addrow("Maximum amount of stored event logs (0 = unlimited)", $frm->text_box("max_log_entries", $settings["max_log_entries"], 5));
$frm->addhelp($row, "Maximum amount of stored event logs", "This option configures the maximum amount of event logs that can be stored in the database at a given time. If the amount of event logs grows larger than this configured maximum, then old entries will be automatically cleaned up.<br/><br/>If you do not want a limit on the number of event logs, then set this option to 0 (zero).");
$row = $frm->addrow("Resolve IP addresses to host names when writing the event log", $frm->checkbox("resolve_hostnames", "1", "", $settings["resolve_hostnames"]));
$frm->addhelp($row, "Resolve IP addresses", "If this option is enabled, the IP address of the visitor will immediately be resolved into its hostname. Enabling this option can result in delays for the user, in case hostname lookups are slow for some reason.<br/><br/><b>Because of the performance penalty, we do not recommend enabling this option, unless you really need it and know what you are doing.</b>");
$row = $frm->addbreak("Which events to log");
$frm->addhelp($row, "Which events to log", "Below, you see the events which the Event Logging module can log for you. Enable the checkbox for each event type that you wish to appear in the event log. You can use this to limit the amount of entries, in case you are not interested in some of them.<br/><br/>Note that other modules can also write entries to the event log. If you need to suppress logging for those, then please consult the settings and documentation of those modules.");
foreach ($eventtypes as $type => $desc) {
    if ($desc === NULL) {
        $frm->addsubbreak($type);
    } else {
        $frm->addrow($desc, $frm->checkbox("do_log_{$type}", "1", "", $settings["do_log_{$type}"]));
    }
}
$frm->show();
예제 #17
0
} else {
    $name = $field['name'];
    $length = $field['length'];
    $html_disabled = $field['html_disabled'];
    $show_in_admin = isset($field['show_in_admin']) ? $field['show_in_admin'] : 0;
    $title = "Edit Profile Field";
    $submit = "Update";
}
// Display the custom profile field editor.
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", $submit);
$frm->hidden("module", "customprofile");
$frm->hidden("curr", "{$curr}");
$frm->addbreak($title);
$row = $frm->addrow("Field Name", $frm->text_box('name', $name, 50));
$frm->addhelp($row, "Field Name", "This is the name to assign to the custom profile field. Because it must be possible to use this name as the name property for an input element in an HTML form, there are a few restrictions to it:<br/><ul><li>it can only contain letters, numbers<br/> and underscores (_);</li><li>it must start with a letter.</li></ul>");
$frm->addrow("Field Length (Max. " . PHORUM_MAX_CPLENGTH . ")", $frm->text_box("length", $length, 50));
$row = $frm->addrow("Disable HTML", $frm->checkbox("html_disabled", 1, "Yes", $html_disabled));
$frm->addhelp($row, "Disable HTML", "\n    If this option is enabled, then HTML code will not be usable\n    in this field. When displaying the custom field's data,\n    Phorum will automatically replace special HTML characters\n    with their safe HTML counter parts.<br/>\n    <br/>\n    There are two possible reasons for disabling it:<br/>\n    <ol>\n      <li>You need HTML in this field and run a module which formats\n          the field data into safe html (before storing it to the database\n          or before displaying it on screen).\n      <li>You run a module that needs to store an array in the field.\n    </ol>\n    So in practice, you only disable this option if module documentation tells\n    you to do so or if you are writing a module which needs this. If you don't\n    understand what's going on here, then don't disable the option.<br/>\n    <br/>\n    To learn about the security risks involved, search for \"XSS\" and\n    \"cross site scripting\" on the internet.");
$row = $frm->addrow("Show in user admin", $frm->checkbox("show_in_admin", 1, "Yes", $show_in_admin));
$frm->addhelp($row, "Show in user admin", "If this option is enabled, then the contents of the field will be displayed on the user details page in the Phorum admin interface (section \"Edit Users\").");
$frm->show();
// If we are not in edit mode, we show the list of available profile fields.
if ($curr == "NEW") {
    print "Creating a custom profile field here merely allows for the use\n           of the field. If you want to use it as an extra info field for\n           your users, you will need to edit the register, control center\n           and profile templates to actually allow users to enter data in\n           the fields and have it stored. You will have to use the name\n           you enter here as the name property of the HTML form element.\n           <hr class=\"PhorumAdminHR\" />";
    if (isset($PHORUM['PROFILE_FIELDS']["num_fields"])) {
        unset($PHORUM['PROFILE_FIELDS']["num_fields"]);
    }
    $active_fields = 0;
    foreach ($PHORUM["PROFILE_FIELDS"] as $f) {
        if (empty($f['deleted'])) {
예제 #18
0
파일: settings.php 프로젝트: samuell/Core
<?php

if (!defined("PHORUM_ADMIN")) {
    return;
}
// Apply default settings.
require_once './mods/editor_tools/defaults.php';
// Save the settings to the database.
if (count($_POST)) {
    $PHORUM["mod_editor_tools"] = array("enable_help" => $_POST["enable_help"] ? 1 : 0);
    $PHORUM['DB']->update_settings(array("mod_editor_tools" => $PHORUM["mod_editor_tools"]));
    phorum_admin_okmsg("The settings were successfully saved.");
}
// Build the settings form.
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "editor_tools");
$frm->addbreak("Edit settings for the Editor Tools module");
$row = $frm->addrow("Enable Help tool", $frm->checkbox("enable_help", "1", "", $PHORUM["mod_editor_tools"]["enable_help"]) . ' Yes');
$frm->addhelp($row, "Enable Help tool", "If you enable this option, then a help button will be added to\n     the tool bar. This help button can be used to open help pages\n     that are registered by other modules (e.g. to show a list of\n     smileys or available BBcode tags).");
$frm->show();
예제 #19
0
파일: settings.php 프로젝트: samuell/Core
        }
    }
    // Store the new settings array.
    $PHORUM['DB']->update_settings(array('mod_bbcode' => $PHORUM['mod_bbcode']));
    phorum_admin_okmsg("The settings were successfully saved.");
    if ($nr_of_enabled_tags > 0 && empty($PHORUM['mods']['editor_tools'])) {
        phorum_admin_error("<b>Notice:</b> You have configured one or more BBcode tags to add a button to the editor tool bar. However, you have not enabled the Editor Tools module. If you want to use the tool buttons, then remember to activate the Editor Tools module.");
    }
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post", "Save settings");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "bbcode");
$frm->addbreak("General settings for the BBcode module");
$row = $frm->addrow("Open links in new window", $frm->checkbox("links_in_new_window", "1", "Yes", $PHORUM["mod_bbcode"]["links_in_new_window"]));
$frm->addhelp($row, "Open links in new window", "When users post links on your forum, you can choose whether to open these in a new window or not.");
$row = $frm->addrow("Turn bare URLs into clickable links", $frm->checkbox("process_bare_urls", "1", "Yes", $PHORUM["mod_bbcode"]["process_bare_urls"]));
$frm->addhelp($row, "Turn bare URLs into clickable links", "If you enable this option, then the BBcode module will try to detect bare URLs in the message (URLs that are not surrounded by [url]...[/url] BBcode tags) and turn those into clickable links (as if they were surrounded by [url]...[/url]).");
$row = $frm->addrow("Turn bare email addresses into clickable links", $frm->checkbox("process_bare_email", "1", "Yes", $PHORUM["mod_bbcode"]["process_bare_email"]));
$frm->addhelp($row, "Turn bare email addresses into clickable links", "If you enable this option, then the BBcode module will try to detect bare email addresses in the message (addresses that are not surrounded by [email]...[/email] BBcode tags) and turn those into clickable links (as if they were surrounded by [email]...[/email]).");
$row = $frm->addrow("Show full URLs", $frm->checkbox("show_full_urls", "1", "Yes", $PHORUM["mod_bbcode"]["show_full_urls"]));
$frm->addhelp($row, "Show full URLs", "By default, URLs are truncated by phorum to show only [www.example.com]. This is done to prevent very long URLs from cluttering and distrurbing the web site layout. By enabling this feature, you can suppress the truncation, so full URLs are shown.");
$row = $frm->addrow("Add 'rel=nofollow' to links that are posted in your forum", $frm->checkbox("rel_no_follow", "1", "Yes", $PHORUM["mod_bbcode"]["rel_no_follow"]));
$frm->addhelp($row, "Add 'rel=nofollow' to links", 'You can enable Google\'s rel="nofollow" tag for links that are posted in your forums. This tag is used to discourage spamming links to web sites in forums (which can be done to influence search engines by implying that the site is a popular one, because of all the links).<br/><br/>Note that this does not stop spam links from being posted, but it does mean that spammers do not get any credit from Google for that link.');
$row = $frm->addrow("Enable BBcode quoting using the [quote] tag", $frm->checkbox("quote_hook", "1", "Yes", $PHORUM["mod_bbcode"]["quote_hook"]));
$frm->addhelp($row, "Enable BBcode [quote]", "If this feature is enabled, then quoting of messages is not done using the standard Phorum method (which resembles email message quoting), but using the BBcode module's quoting method instead. This means that the quoted text is placed within a [quote Author]...[/quote] bbcode block.<br/><br/>Two of the advantages of using this quote method is that the quoted message can be styles though CSS code and that no word wrapping is applied to the text.");
$row = $frm->addrow("Enable posting option \"disable BBcode\"", $frm->checkbox("allow_disable_per_post", "1", "Yes", $PHORUM["mod_bbcode"]["allow_disable_per_post"]));
$frm->addhelp($row, "Enable posting option \"disable BBcode\"", "If this feature is enabled, then your users can get an extra option in the posting editor for disabling the BBcode handling for the posted message. This can be useful if the user wants to post a text about BBcode tags or a text that contains strings that unintentionally match BBcode tags.<br/><br/>To make this option visible, you will have to add the code <b>{HOOK \"tpl_editor_disable_bbcode\"}</b> to the posting.tpl template file at an appropriate spot.");
$row = $frm->addrow("Enable BBcode escape sequence \\[...]", $frm->checkbox("enable_bbcode_escape", "1", "Yes", $PHORUM["mod_bbcode"]["enable_bbcode_escape"]));
$frm->addhelp($row, "Enable BBcode escape sequence", "If this feature is enabled, then your users can prepend BBcode tags with a backslash character in order to let the BBcode module ignore the tag. This is mostly useful for posting BBcode examples in a forum message. In the final rendered message, the backslash character will be hidden. For example, the following code could be added to a message:<br/><pre>\\[b]example for bold text\\[/b]<br/>\\[url=http://www.phorum.org]URL example\\[/url]<br/><br/>These would be showed in the final message as:<br/><pre>[b]example for bold text[/b]<br/>[url=http://www.phorum.org]URL example[/url]");
$row = $frm->addbreak("Activation of BBcode tags");
예제 #20
0
        $add_inherit_text = "<br />You can't inherit from another forum as these forums inherit from the current forum already:<br /><ul>\n";
        foreach ($forum_inherit_settings as $set_id => $set_data) {
            $add_inherit_text .= "<li>" . $set_data['name'] . " ( Id: {$set_id} ) </li>\n";
        }
        $add_inherit_text .= "</ul>\n";
    }
    $row = $frm->addrow("Inherit Settings from Forum", $frm->select_tag("inherit_id", $forum_list, $inherit_id, $disabled_form_input_inherit) . $add_inherit_text);
    // Set Settings from inherit forum
    if ($forum_settings_inherit) {
        $forum_settings = $forum_settings_inherit;
        extract($forum_settings[$inherit_id]);
    }
}
$frm->addbreak("Moderation / Permissions");
$row = $frm->addrow("Moderate Messages", $frm->select_tag("moderation", array(PHORUM_MODERATE_OFF => "Disabled", PHORUM_MODERATE_ON => "Enabled"), $moderation, $disabled_form_input));
$frm->addhelp($row, "Moderate Messages", "This setting determines whether messages are visible to users immediately after they are posted.  If enabled, all messages will remain hidden until approved by a moderator.");
$frm->addrow("Email Messages To Moderators", $frm->select_tag("email_moderators", array(PHORUM_EMAIL_MODERATOR_OFF => "Disabled", PHORUM_EMAIL_MODERATOR_ON => "Enabled"), $email_moderators, $disabled_form_input));
$row = $frm->addrow("Allow Email Notification for following topics", $frm->select_tag("allow_email_notify", array("No", "Yes"), $allow_email_notify, $disabled_form_input));
$frm->addhelp($row, "Allow Email Notification", "This option determines if it is possible for users to use email notification when following topics within this forum.<br/><br/>This does not only apply to enabling email notification at post time, but it also applies to clicking on \"" . $PHORUM["DATA"]["LANG"]["FollowThread"] . "\" from the message read page and to managing subscriptions from the user control center.");
$pub_perm_frm = $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $pub_perms & PHORUM_USER_ALLOW_READ, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $pub_perms & PHORUM_USER_ALLOW_REPLY, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $pub_perms & PHORUM_USER_ALLOW_NEW_TOPIC, $disabled_form_input) . "<br />" . $frm->checkbox("pub_perms[" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $pub_perms & PHORUM_USER_ALLOW_ATTACH, $disabled_form_input);
$frm->addrow("Public Users", $pub_perm_frm);
$reg_perm_frm = $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $reg_perms & PHORUM_USER_ALLOW_READ, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $reg_perms & PHORUM_USER_ALLOW_REPLY, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $reg_perms & PHORUM_USER_ALLOW_NEW_TOPIC, $disabled_form_input) . "<br />" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_EDIT . "]", 1, "Edit&nbsp;Their&nbsp;Posts", $reg_perms & PHORUM_USER_ALLOW_EDIT, $disabled_form_input) . "&nbsp;&nbsp;" . $frm->checkbox("reg_perms[" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $reg_perms & PHORUM_USER_ALLOW_ATTACH, $disabled_form_input);
$row = $frm->addrow("Registered Users", $reg_perm_frm);
$frm->addhelp($row, "Registered Users", "These settings do not apply to users that are granted permissions directly via the user admin or via a group permissions.");
$frm->addbreak("Display Settings");
$frm->addrow("Fixed Display-Settings (user can't override them)", $frm->select_tag("display_fixed", array("No", "Yes"), $display_fixed, $disabled_form_input));
$frm->addrow("Template", $frm->select_tag("template", phorum_get_template_info(), $template, $disabled_form_input));
$frm->addrow("Language", $frm->select_tag("language", phorum_get_language_info(), $language, $disabled_form_input));
$frm->addrow("List View", $frm->select_tag("threaded_list", array("Flat", "Threaded"), $threaded_list, $disabled_form_input));
$frm->addrow("Read View", $frm->select_tag("threaded_read", array("Flat", "Threaded", "Hybrid"), $threaded_read, $disabled_form_input));
$frm->addrow("Reverse Threading", $frm->select_tag("reverse_threading", array("No", "Yes"), $reverse_threading, $disabled_form_input));
예제 #21
0
파일: settings.php 프로젝트: mgs2/kw-forum
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
if (!defined("PHORUM_ADMIN")) {
    return;
}
$error = "";
if (count($_POST)) {
    // some sanity checking would be nice ;)
    $PHORUM["smtp_mail"] = array('host' => $_POST['host'], 'port' => empty($_POST['port']) ? "25" : $_POST['port'], 'auth' => $_POST['auth'], 'username' => $_POST['auth_username'], 'password' => $_POST['auth_password'], 'conn' => $_POST['conn'], 'log_successful' => $_POST['log_successful'], 'show_errors' => $_POST['show_errors']);
    if (empty($error)) {
        phorum_db_update_settings(array("smtp_mail" => $PHORUM["smtp_mail"]));
        phorum_admin_okmsg("Settings updated");
    }
}
include_once "./include/admin/PhorumInputForm.php";
$frm = new PhorumInputForm("", "post", "Save");
$frm->hidden("module", "modsettings");
$frm->hidden("mod", "smtp_mail");
$frm->addbreak("Settings for the SMTP Mail Module");
$frm->addrow("Hostname of mailserver", $frm->text_box("host", $PHORUM['smtp_mail']['host'], 50));
$frm->addrow("Port of mailserver", $frm->text_box("port", $PHORUM['smtp_mail']['port'], 5) . " (Default Port is 25, unencrypted. Encrypted Port is usually 465)");
$frm->addrow("Connection Type", $frm->select_tag("conn", array('plain' => 'Plain Connection', 'ssl' => 'SSL-Encryption', 'tls' => 'TLS-Encryption'), $PHORUM['smtp_mail']['conn']) . " (e.g. Google-Mail connection needs TLS)");
$frm->addrow("Use SMTP Auth", $frm->select_tag("auth", array(1 => 'Yes', 0 => 'No'), $PHORUM['smtp_mail']['auth']));
$frm->addrow("SMTP Auth Username", $frm->text_box("auth_username", $PHORUM['smtp_mail']['username'], 50));
$frm->addrow("SMTP Auth Password", $frm->text_box("auth_password", $PHORUM['smtp_mail']['password'], 50, 0, true));
$frm->addsubbreak("Logging / Errorhandling");
$row = $frm->addrow("Show errors on screen", $frm->select_tag("show_errors", array(1 => "Yes", 0 => "No"), $PHORUM['smtp_mail']['show_errors']));
$frm->addhelp($row, "Show errors on screen", "This option enables to show errors on screen (default). If disabled you should make sure that you have the Event Logging Module enabled which will log errors in email sending.");
$row = $frm->addrow("Log successful mails to the Event Logging Module", $frm->select_tag("log_successful", array(0 => "No", 1 => "Yes"), $PHORUM['smtp_mail']['log_successful']));
$frm->addhelp($row, "Logging of successful emails to the Event Logging Module", "This option logs successful email messages to the Event Logging Module if that is enabled too.\nErrors are logged there always (if the module is enabled).");
$frm->show();
예제 #22
0
파일: newfolder.php 프로젝트: samuell/Core
    $frm->hidden("module", "editfolder");
    $frm->hidden("forum_id", $forum_id);
    $title = "Edit existing folder";
} else {
    $frm->hidden("module", "newfolder");
    $title = "Add A Folder";
    $folders = $folder_data;
}
$frm->addbreak($title);
$frm->addrow("Folder Title", $frm->text_box("name", $name, 30));
$frm->addrow("Folder Description", $frm->textarea("description", $description, $cols = 60, $rows = 10, "style=\"width: 100%;\""), "top");
$parent_id_options = phorum_api_forums_get_parent_id_options($forum_id);
$frm->addrow("Put this forum below folder", $frm->select_tag('parent_id', $parent_id_options, $parent_id));
$frm->addrow("Make this forum visible in the forum index?", $frm->select_tag("active", array("No", "Yes"), $active));
$row = $frm->addrow("Virtual Root for descending forums/folders", $frm->checkbox("vroot", "1", "enabled", $vroot ? 1 : 0));
$frm->addhelp($row, "Virtual Root for descending forums/folders", "If you enable the virtual root feature for a folder, then this folder\n     will act as a separate Phorum installation. The folder will not be\n     visible in its parent folder anymore and if you visit the folder, it will\n     behave as if it were a Phorum root folder. This way you can run\n     multiple separated forums on a single Phorum installation.<br/><br/>\n     The users will be able to access all virtual root folders, unless you\n     use the permission system to setup different access rules.");
if ($foreign_vroot > 0) {
    $frm->addrow("This folder is in the Virtual Root of:", $folders[$foreign_vroot]);
}
$frm->addbreak("Inherit Folder Settings");
$inherit_id_options = phorum_api_forums_get_inherit_id_options($forum_id);
$row = $frm->addrow("Inherit the settings below this option from", $frm->select_tag("inherit_id", $inherit_id_options, $inherit_id) . $add_inherit_text);
$frm->addbreak("Display Settings");
$frm->addrow("Template", $frm->select_tag("template", phorum_api_template_list(TRUE), $template, $disabled_form_input));
$frm->addrow("Language", $frm->select_tag("language", phorum_api_lang_list(TRUE), $language, $disabled_form_input));
phorum_api_hook("admin_editfolder_form", $frm, $forum_settings);
$frm->show();
?>

<script type="text/javascript">
//<![CDATA[
예제 #23
0
         if (isset($user[$item['name']]) && trim($user[$item['name']]) != '') {
             $itemval = trim($user[$item['name']]);
         }
         $frm->addrow($item['name'], $itemval);
     }
 }
 phorum_hook("admin_users_form", $frm, $user);
 $frm->show();
 echo "<br /><hr class=\"PhorumAdminHR\" /><br /><a name=\"forums\"></a>";
 $frm = new PhorumInputForm("", "post", "Update");
 $frm->hidden("user_id", $_REQUEST["user_id"]);
 $frm->hidden("module", "users");
 $frm->hidden("section", "forums");
 $frm->hidden("referrer", $referrer);
 $row = $frm->addbreak("Edit Forum Permissions");
 $frm->addhelp($row, "Forum Permissions", "These are permissions set exclusively for this user.  You need to grant all permisssions you want the user to have for a forum here.  No permissions from groups or a forum's properties will be used once the user has specific permissions for a forum.");
 $forums = phorum_db_get_forums();
 $forumpaths = phorum_get_forum_info(1);
 $perm_frm = $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_READ . "]", 1, "Read") . "&nbsp;&nbsp;" . $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply") . "&nbsp;&nbsp;" . $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics") . "&nbsp;&nbsp;" . $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_EDIT . "]", 1, "Edit&nbsp;Their&nbsp;Posts") . "<br />" . $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files") . "<br />" . $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_MODERATE_MESSAGES . "]", 1, "Moderate Messages") . "&nbsp;&nbsp;" . $frm->checkbox("new_forum_permissions[" . PHORUM_USER_ALLOW_MODERATE_USERS . "]", 1, "Moderate Users") . "&nbsp;&nbsp;";
 $arr[] = "Add A Forum...";
 foreach ($forumpaths as $forum_id => $forumname) {
     if (!isset($user["forum_permissions"][$forum_id]) && $forums[$forum_id]['folder_flag'] == 0) {
         $arr[$forum_id] = $forumname;
     }
 }
 if (count($arr) > 1) {
     $frm->addrow($frm->select_tag("new_forum", $arr), $perm_frm);
 }
 if (is_array($user["forum_permissions"])) {
     foreach ($user["forum_permissions"] as $forum_id => $perms) {
         $perm_frm = $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_READ . "]", 1, "Read", $perms & PHORUM_USER_ALLOW_READ) . "&nbsp;&nbsp;" . $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_REPLY . "]", 1, "Reply", $perms & PHORUM_USER_ALLOW_REPLY) . "&nbsp;&nbsp;" . $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_NEW_TOPIC . "]", 1, "Create&nbsp;New&nbsp;Topics", $perms & PHORUM_USER_ALLOW_NEW_TOPIC) . "&nbsp;&nbsp;" . $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_EDIT . "]", 1, "Edit&nbsp;Their&nbsp;Posts", $perms & PHORUM_USER_ALLOW_EDIT) . "<br />" . $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_ATTACH . "]", 1, "Attach&nbsp;Files", $perms & PHORUM_USER_ALLOW_ATTACH) . "<br />" . $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_MODERATE_MESSAGES . "]", 1, "Moderate Messages", $perms & PHORUM_USER_ALLOW_MODERATE_MESSAGES) . "&nbsp;&nbsp;" . $frm->checkbox("forum_permissions[{$forum_id}][" . PHORUM_USER_ALLOW_MODERATE_USERS . "]", 1, "Moderate Users", $perms & PHORUM_USER_ALLOW_MODERATE_USERS) . "&nbsp;&nbsp;" . $frm->hidden("forums[{$forum_id}]", $forum_id);
예제 #24
0
파일: badwords.php 프로젝트: sheldon/dejavu
        <?php 
} else {
    // load bad-words-list
    $banlists = phorum_db_get_banlists();
    $bad_words = $banlists[PHORUM_BAD_WORDS];
    include_once "./include/admin/PhorumInputForm.php";
    $frm = new PhorumInputForm("", "post", $submit);
    $frm->hidden("module", "badwords");
    $frm->hidden("curr", "{$curr}");
    $row = $frm->addbreak($title);
    if ($curr == 'NEW') {
        $frm->addmessage("This feature can be used to mask bad words in forum messages\n             with \"" . PHORUM_BADWORD_REPLACE . "\". All bad words will\n             automatically be replaced by that string. If you want to use\n             a different string (e.g. \"CENSORED\" or \"*****\"), then you\n             can change the definition of the constant\n             \"PHORUM_BADWORD_REPLACE\" in the Phorum file\n             include/constants.php.");
    }
    $row = $frm->addrow("Bad Word", $frm->text_box("string", $string, 50));
    $frm->addhelp($row, "Bad Word", "The word that you want to mask in forum messages.\n             Rules that apply to the matching are:\n             <ul>\n               <li><b>Only the full word</b> is matched, so \"foo\" would\n                   not mask (part of) \"foobar\";</li>\n               <li>The match is <b>case insensitive</b>, so \"foo\" would also\n                   mask \"FoO\".</li>\n             </ul>");
    $frm->addrow("Valid for Forum", $frm->select_tag("forum_id", $forum_list, $forum_id));
    $frm->show();
    echo "<hr class=\"PhorumAdminHR\" />";
    if (count($bad_words)) {
        echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"PhorumAdminTable\" width=\"100%\">\n";
        echo "<tr>\n";
        echo "    <td class=\"PhorumAdminTableHead\">Word</td>\n";
        echo "    <td class=\"PhorumAdminTableHead\">Valid for Forum</td>\n";
        echo "    <td class=\"PhorumAdminTableHead\">&nbsp;</td>\n";
        echo "</tr>\n";
        foreach ($bad_words as $key => $item) {
            $ta_class = "PhorumAdminTableRow" . ($ta_class == "PhorumAdminTableRow" ? "Alt" : "");
            echo "<tr>\n";
            echo "    <td class=\"" . $ta_class . "\">" . htmlspecialchars($item[string]) . "</td>\n";
            echo "    <td class=\"" . $ta_class . "\">" . $forum_list[$item["forum_id"]] . "</td>\n";