예제 #1
0
 function show()
 {
     if ($this->_title) {
         echo "<div class=\"PhorumAdminMenuTitle\">{$this->_title}</div>\n";
     }
     echo "<div class=\"PhorumAdminMenu\"";
     if ($this->_id) {
         echo " id=\"{$this->_id}\"";
     }
     echo ">";
     foreach ($this->_links as $link) {
         $desc = htmlspecialchars($link["description"]);
         $href = htmlspecialchars($_SERVER["PHP_SELF"]);
         $title = htmlspecialchars($link["title"]);
         $input_args = array();
         if (!empty($link["module"])) {
             $input_args[] = "module={$link['module']}";
         }
         $url = phorum_admin_build_url($input_args);
         $html = "<a title=\"{$desc}\" href=\"{$url}";
         $html .= "\">{$title}</a><br />";
         echo $html;
     }
     echo "</div>\n";
 }
예제 #2
0
파일: mods.php 프로젝트: sleepy909/cpassman
if (defined("PHORUM_INSTALL")) {
    $frm = new PhorumInputForm("", "post", "Continue ->");
    $frm->addbreak("Optional modules");
    $frm->hidden("module", "install");
    $frm->hidden("sanity_checks_done", "1");
    $frm->hidden("step", "modules");
    $frm->hidden("do_modules_update", "1");
    $frm->addmessage("Phorum has a very robust module system.  The following modules are included with the distribution.  You can find more modules at the Phorum web site.  Some modules may have additional configuration options, which are not available during install.  To configure the modules, click the Modules menu item after installation is done.");
} else {
    $frm = new PhorumInputForm("", "post");
    $frm->addbreak("Phorum Module Settings");
    $frm->hidden("module", "mods");
}
foreach ($list['modules'] as $name => $info) {
    if ($info["settings"] && !defined("PHORUM_INSTALL")) {
        $settings_url = phorum_admin_build_url(array('module=modsettings', "mod={$name}"));
        $settings_link = "<br /><a name=\"link-settings-{$name}\" href=\"{$settings_url}\">Settings</a>";
    } else {
        $settings_link = "";
    }
    $text = $info["title"];
    if (isset($info["version"])) {
        $text .= " (version " . $info["version"] . ")";
    }
    if (isset($info["desc"])) {
        $text .= "<div class=\"small\">" . wordwrap($info["desc"], 90, "<br />") . "</div>";
    }
    if (isset($info["author"])) {
        $text .= "<div class=\"small\">Created by " . $info["author"] . "</div>";
    }
    if (isset($info["release_date"])) {
예제 #3
0
        </tr>
        <tr>
            <td class="PhorumAdminTableHead">Display Name</td>
            <td class="PhorumAdminTableHead">Email</td>
            <td class="PhorumAdminTableHead">Status</td>
            <td class="PhorumAdminTableHead">Posts</td>
            <td class="PhorumAdminTableHead">Last Activity</td>
            <td class="PhorumAdminTableHead">Delete</td>
        </tr>
EOT;
        foreach ($user_ids as $user_id) {
            $user = $users[$user_id];
            $status = $user_status_map[$user['active']];
            $posts = intval($user['posts']);
            $ta_class = "PhorumAdminTableRow" . ($ta_class == "PhorumAdminTableRow" ? "Alt" : "");
            $edit_url = phorum_admin_build_url(array('module=users', 'user_id=' . $user['user_id'], 'edit=1'));
            echo "<tr>\n";
            echo "    <td class=\"" . $ta_class . "\"><a href=\"{$edit_url}\">" . (empty($PHORUM['custom_display_name']) ? htmlspecialchars($user['display_name']) : $user['display_name']) . "</a></td>\n";
            echo "    <td class=\"" . $ta_class . "\">" . htmlspecialchars($user['email']) . "</td>\n";
            echo "    <td class=\"" . $ta_class . "\">{$status}</td>\n";
            echo "    <td class=\"" . $ta_class . "\" style=\"text-align:right\">{$posts}</td>\n";
            echo "    <td class=\"" . $ta_class . "\" align=\"right\">" . (intval($user['date_last_active']) ? phorum_date($PHORUM['short_date'], intval($user['date_last_active'])) : "&nbsp;") . "</td>\n";
            echo "    <td class=\"" . $ta_class . "\"><input type=\"checkbox\" name=\"deleteIds[]\" value=\"{$user['user_id']}\"></td>\n";
            echo "</tr>\n";
        }
        echo <<<EOT
        <tr>
          <td colspan="6" align="right">
          <input type="button" value="Check All"
           onClick="CheckboxControl(this.form, true);">
          <input type="button" value="Clear All"
예제 #4
0
파일: settings.php 프로젝트: netovs/Core
                if ($_POST[$field] != $PHORUM["display_name_source"]) {
                    $need_display_name_updates = TRUE;
                }
                break;
        }
        if ($error) {
            break;
        }
    }
    if (empty($error)) {
        unset($_POST["module"]);
        unset($_POST["phorum_admin_token"]);
        if ($PHORUM['DB']->update_settings($_POST)) {
            $redir = phorum_admin_build_url(array('module=settings', 'message=success'), TRUE);
            if ($need_display_name_updates) {
                $redir = phorum_admin_build_url(array('module=update_display_names'), TRUE);
            }
            phorum_api_redirect($redir);
            exit;
        } else {
            $error = "Database error while updating settings.";
        }
    }
}
if ($error) {
    phorum_admin_error($error);
} elseif (isset($_GET['message']) && $_GET['message'] == 'success') {
    $okmsg = "Settings updated";
    phorum_admin_okmsg($okmsg);
}
// create the time zone drop down array
예제 #5
0
파일: logviewer.php 프로젝트: samuell/Core
        $_POST[$k] = $v;
    }
}
// Are we running in filter mode?
$filter_mode = defined("LOGVIEWER_FILTER_MODE") || isset($_POST["filter_mode"]);
// Some defaults for the page.
$default_pagelength = 20;
$default_loglevel = EVENTLOG_LVL_DEBUG;
// The available page lengths.
$pagelengths = array(10 => "10 events per page", 20 => "20 events per page", 50 => "50 events per page", 100 => "100 events per page", 250 => "250 events per page");
// ----------------------------------------------------------------------
// Build event log filter.
// ----------------------------------------------------------------------
// The base URL for creating URL's to the filter page. This will be used
// later on, for making parts of the output clickable for adjusting the filter.
$filter_base = phorum_admin_build_url(array('module=modsettings', 'mod=event_logging', 'el_action=filter'));
$show_loglevel = array();
$show_categories = array();
$filter = NULL;
if ($filter_mode) {
    $filter = array();
    // What log levels to show?
    // No log level selected at all will show all log levels.
    $loglevels = NULL;
    if (count($_POST)) {
        if (isset($_POST["show_loglevel"])) {
            $show_loglevel = $_POST["show_loglevel"];
            $loglevels = array_keys($show_loglevel);
            foreach ($loglevels as $l) {
                $filter_base .= '&show_loglevel[' . urlencode($l) . ']';
            }
예제 #6
0
파일: newforum.php 프로젝트: netovs/Core
    }
    $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
    // allowed, so if this is the case, choosing a forum to inherit from
    // is not allowed.
    $disabled_form_input_inherit = '';
    $add_inherit_text = "";
    if ($forum_id) {
        $slaves = phorum_api_forums_by_inheritance($forum_id);
        if (!empty($slaves)) {
            $disabled_form_input_inherit = 'disabled="disabled"';
            $add_inherit_text = "<br />You cannot let this forum inherit its " . "settings from another forum, because the " . "following forums and or folders inherit from " . "the current forum already:<br /><ul>\n";
            foreach ($slaves as $id => $data) {
                array_shift($data['forum_path']);
                $edit_url = phorum_admin_build_url(array('module=edit' . ($data['folder_flag'] ? 'folder' : 'forum'), "forum_id={$id}"));
                $add_inherit_text .= "<li><a href=\"{$edit_url}\">" . implode(" / ", $data['forum_path']) . "</li>\n";
            }
            $add_inherit_text .= "</ul>\n";
        }
    }
    $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, $disabled_form_input_inherit) . $add_inherit_text);
}
$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 Anonymous 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) . "<br/>" . $frm->checkbox('allow_email_notify', 1, 'Allow email notification for following topics', $allow_email_notify, $disabled_form_input);
예제 #7
0
파일: rebuild.php 프로젝트: mgs2/kw-forum
        $okmsg .= "{$threads_updated} threads updated.<br />";
    }
    if (isset($_POST['rebuild_searchdata']) && !empty($_POST['rebuild_searchdata'])) {
        if (empty($PHORUM['DBCONFIG']['empty_search_table'])) {
            $ret = phorum_db_rebuild_search_data();
            $okmsg .= "Searchdata successfully rebuilt.<br />";
        } else {
            $okmsg .= "<strong>Flag &quot;empty_search_table&quot; set in db configuration. Search table is not going to be rebuild with that.</strong>";
        }
    }
    if (isset($_POST['rebuild_userposts']) && !empty($_POST['rebuild_userposts'])) {
        $ret = phorum_db_rebuild_user_posts();
        $okmsg .= "Postcounts for users updated.<br />";
    }
    if (isset($_POST['rebuild_display_names']) && !empty($_POST['rebuild_display_names'])) {
        $redir_url = phorum_admin_build_url(array('module=update_display_names', 'request=integrity'), TRUE);
        phorum_redirect_by_url($redir_url);
        exit;
    }
    if (isset($_POST['rebuild_forumpaths']) && !empty($_POST['rebuild_forumpaths'])) {
        $forums = phorum_admin_build_path_array();
        unset($forums[0]);
        foreach ($forums as $fid => $forumpath) {
            $update_forum = array('forum_id' => $fid, 'forum_path' => $forumpath);
            phorum_db_update_forum($update_forum);
        }
        $okmsg .= "Forum paths successfully rebuilt.<br />";
    }
}
if ($error) {
    phorum_admin_error($error);
예제 #8
0
파일: groups.php 프로젝트: netovs/Core
    }
    $frm->show();
}
if (empty($_REQUEST["edit"])) {
    $frm = new PhorumInputForm("", "post");
    $frm->addbreak("Phorum Group Admin");
    $frm->hidden("module", "groups");
    $frm->hidden("section", "add");
    $frm->addrow("Add A Group:", $frm->text_box("group_name", "", 50));
    $frm->show();
    $frm_url = phorum_admin_build_url();
    echo "<hr class=\"PhorumAdminHR\" />";
    echo "<form action=\"{$frm_url}\" method=\"post\">\n";
    echo "<input type=\"hidden\" name=\"phorum_admin_token\" value=\"{$PHORUM['admin_token']}\">\n";
    echo "<input type=\"hidden\" name=\"module\" value=\"groups\">\n";
    echo "<input type=\"hidden\" name=\"action\" value=\"deleteGroups\">\n";
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"PhorumAdminTable\" width=\"100%\">\n";
    echo "<tr>\n";
    echo "    <td class=\"PhorumAdminTableHead\">Group</td>\n";
    echo "    <td class=\"PhorumAdminTableHead\">Delete</td>\n";
    echo "</tr>\n";
    foreach ($groups as $group) {
        $edit_url = phorum_admin_build_url(array('module=groups', 'edit=1', 'group_id=' . $group['group_id']));
        echo "<tr>\n";
        echo "    <td class=\"PhorumAdminTableRow\"><a href=\"{$edit_url}\">" . htmlspecialchars($group['name']) . "</a></td>\n";
        echo "    <td class=\"PhorumAdminTableRow\">Delete? <input type=\"checkbox\" name=\"deleteIds[]\" value=\"{$group['group_id']}\"></td>\n";
        echo "</tr>\n";
    }
    echo "<tr><td colspan=\"2\" align=\"right\"><input type=\"submit\" name=\"submit\" value=\"Delete Selected\"></td></tr>";
    echo "</table></form>\n";
}
예제 #9
0
unset($get['module']);
unset($get['phorum_admin_token']);
if (empty($post) && empty($get)) {
    $module = '';
    if (isset($_POST['module'])) {
        $module = basename($_POST['module']);
    } elseif (isset($_GET['module'])) {
        $module = basename($_GET['module']);
    }
    $url = phorum_admin_build_url('module=' . urlencode($module));
    phorum_redirect_by_url($url);
}
$targetargs = $_SERVER['QUERY_STRING'];
$target_html = htmlspecialchars(phorum_admin_build_url($targetargs));
$targs_html = htmlspecialchars($targetargs);
$post_url = phorum_admin_build_url('base');
?>
You are accessing the admin after a security timeout.<br /><br />
The requested URL was: 
<pre><?php 
echo $target_html;
?>
</pre><br />
<strong>Please make sure that you really want to access this URL and weren't tricked to go to the admin.</strong><br />
Please click on <strong>continue</strong> to go to this URL or on <strong>cancel</strong> to go to the forum homepage.
<br /><br />
<form action="<?php 
echo $post_url;
?>
" method="POST">
<input type="hidden" name="module" value="tokenmissing" />
예제 #10
0
파일: login.php 프로젝트: samuell/Core
require_once PHORUM_PATH . '/include/api/sign.php';
if (isset($_POST["username"]) && isset($_POST["password"])) {
    $user_id = phorum_api_user_authenticate(PHORUM_ADMIN_SESSION, trim($_POST["username"]), trim($_POST["password"]));
    if ($user_id && phorum_api_user_set_active_user(PHORUM_ADMIN_SESSION, $user_id) && phorum_api_user_session_create(PHORUM_ADMIN_SESSION)) {
        // update the token and time
        $GLOBALS["PHORUM"]["user"]['settings_data']['admin_token_time'] = time();
        $sig_data = $GLOBALS["PHORUM"]["user"]['user_id'] . time() . $GLOBALS["PHORUM"]["user"]['username'];
        $GLOBALS["PHORUM"]["user"]['settings_data']['admin_token'] = phorum_api_sign($sig_data);
        $GLOBALS["PHORUM"]['admin_token'] = $GLOBALS["PHORUM"]["user"]['settings_data']['admin_token'];
        $tmp_user = array('user_id' => $GLOBALS["PHORUM"]["user"]['user_id'], 'settings_data' => $GLOBALS["PHORUM"]["user"]['settings_data']);
        phorum_api_user_save($tmp_user);
        if (!empty($_POST["target"])) {
            $target_url = phorum_admin_build_url($_POST['target'], TRUE);
            phorum_api_redirect($target_url);
        } else {
            $redir_url = phorum_admin_build_url(NULL, TRUE);
            phorum_api_redirect($redir_url);
        }
        exit;
    } else {
        /**
         * TODO Move to User API.
         */
        phorum_api_hook("failed_login", array("username" => $_POST["username"], "password" => $_POST["password"], "location" => "admin"));
    }
}
require_once './include/admin/PhorumInputForm.php';
$frm = new PhorumInputForm("", "post");
if (!empty($_SERVER["QUERY_STRING"])) {
    $frm->hidden("target", htmlspecialchars($_SERVER["QUERY_STRING"], ENT_COMPAT, $PHORUM["DATA"]['CHARSET']));
}
예제 #11
0
            }
        } else {
            // just default root ...
            phorum_admin_set_vroot($cur_folder_id, 0, $cur_folder_id);
        }
        // done with vroots
        phorum_db_drop_folder($cur_folder_id);
        $msg = "The folder was deleted.  All forums and folders in this folder have been moved to this folder's parent.";
    } else {
        phorum_db_drop_forum($_GET["forum_id"]);
        $msg = "The forum was deleted.  All messages in that forum were deleted.";
    }
} elseif ($_GET["confirm"] == "No") {
    $msg = "No action was taken.";
} else {
    $forums = phorum_db_get_forums((int) $_GET["forum_id"]);
    $forum = array_shift($forums);
    if ($forum["folder_flag"]) {
        $msg = "Are you sure you want to delete {$forum['name']}?  All forums and folders in this folder will be moved to this folder's parent.";
    } else {
        $msg = "Are you sure you want to delete {$forum['name']}?  All messages in this forum will be deleted";
    }
    $frm_url = phorum_admin_build_url('base');
    $msg .= "<form action=\"{$frm_url}\" method=\"get\"><input type=\"hidden\" name=\"phorum_admin_token\" value=\"{$PHORUM['admin_token']}\"><input type=\"hidden\" name=\"module\" value=\"{$module}\" /><input type=\"hidden\" name=\"forum_id\" value=\"{$forum['forum_id']}\" /><input type=\"hidden\" name=\"folder_flag\" value=\"{$forum['folder_flag']}\" /><input type=\"submit\" name=\"confirm\" value=\"Yes\" />&nbsp;<input type=\"submit\" name=\"confirm\" value=\"No\" /></form>";
}
?>
<div class="PhorumInfoMessage"><?php 
echo $msg;
?>
</div>
예제 #12
0
파일: default.php 프로젝트: samuell/Core
            $elts[] = "<a href=\"{$elturl}\">{$name}</a>";
        }
    }
    $path = implode(' / ', $elts);
} else {
    $path = '<strong>Root folder</strong>';
}
?>

<div class="PhorumAdminTitle">
  Forum and folder settings
</div>

<div class="PhorumAdminBreadcrumbs">
  <?php 
if (empty($folder['forum_id'])) {
    print "<span class=\"icon-folder\"></span>";
} else {
    $upurl = phorum_admin_build_url(array('module=default', "parent_id={$parent_parent_id}"));
    print "<a href=\"{$upurl}\"><span class=\"icon-folder-up\"></span></a>";
}
echo "{$path}";
?>
</div>

<table border="0" cellspacing="2" cellpadding="3" width="100%">
<?php 
echo $rows;
?>
</table>
예제 #13
0
    if ($perc > 100) {
        $perc = 100;
    }
    ?>

    <strong>Running display name updates.</strong><br/>
    <strong>This might take a while ...</strong><br/><br/>
    <table><tr><td>
    <div style="height:20px;width:300px; border:1px solid black">
    <div style="height:20px;width:<?php 
    print $perc;
    ?>
%;background-color:green">
    </div></div></td><td style="padding-left:10px">
      <?php 
    $update_count = min(($batch + 1) * $batchsize, $user_count);
    print "{$update_count} users of {$user_count} updated";
    ?>
    </td></tr></table> <?php 
    $redir = phorum_admin_build_url(array('module=update_display_names', "batch=" . ($batch + 1), 'step=2', 'user_count=' . $user_count), TRUE);
    ?>

    <script type="text/javascript">
    window.onload = function () {
        document.location.href = '<?php 
    print addslashes($redir);
    ?>
';
    }
    </script> <?php 
}
예제 #14
0
파일: settings.php 프로젝트: netovs/Core
$frm->addbreak("Log settings");
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
예제 #15
0
파일: upgrade.php 프로젝트: samuell/Core
        list($dummy, $upgrade) = each($upgrades);
        $message = phorum_dbupgrade_run($upgrade);
        // Show the results.
        $frm = new PhorumInputForm("", "post", "Continue -&gt;");
        $frm->addbreak("Upgrading Phorum (multiple steps possible) ...");
        $w = floor($index / $count * 100);
        $frm->addmessage('<table><tr><td>' . '<div style="height:20px;width:300px; border:1px solid black">' . '<div style="height:20px;width:' . $w . '%; background-color:green">' . '</div></div></td><td style="padding-left:10px">' . 'upgrade ' . $index . " of " . $count . '</td></tr></table>');
        $frm->addmessage($message);
        $frm->hidden("step", 1);
        $frm->hidden("module", "upgrade");
        $frm->hidden("is_module_upgrade", $is_module_upgrade);
        $frm->hidden("upgradeindex", $index);
        $frm->hidden("upgradecount", $count);
        $frm->show();
        break;
        // Step 2: the upgrade has been completed.
    // Step 2: the upgrade has been completed.
    case 2:
        // Show the results.
        $base_url = phorum_admin_build_url();
        $frm = new PhorumInputForm("", "post", "Finish");
        $frm->addbreak("The upgrade is complete");
        $frm->addmessage("You may want to look through the " . "<a href=\"{$base_url}\">the admin interface</a> " . "for any new features in this version.");
        $frm->show();
        break;
        // Safety net for illegal step values.
    // Safety net for illegal step values.
    default:
        print "Internal error: illegal upgrading step " . htmlspecialchars($step) . " requested.";
        return;
}
예제 #16
0
            alert('Please select the message(s) that you want to delete.');
            return false;
        }

        return confirm(
            'Delete the ' + count + ' selected message(s) ' +
            '/ thread(s) from the database?'
        );
    }

    //]]>
    </script>

    <form id="selectform" method="post"
          action="<?php 
        echo phorum_admin_build_url('base');
        ?>
">
    <input type="hidden" name="phorum_admin_token" value="<?php 
        echo $PHORUM['admin_token'];
        ?>
" />
    
    <input type="hidden" name="module" value="<?php 
        print ADMIN_MODULE;
        ?>
" />
    <input type="hidden" name="filterdesc" id="filterdesc" value="<?php 
        // Remember the filter description if one is available
        // (should be at this point).
        if (isset($_POST["filterdesc"])) {
예제 #17
0
<?php

////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//   Copyright (C) 2007  Phorum Development Team                              //
//   http://www.phorum.org                                                    //
//                                                                            //
//   This program is free software. You can redistribute it and/or modify     //
//   it under the terms of either the current Phorum License (viewable at     //
//   phorum.org) or the Phorum License that was distributed with this file    //
//                                                                            //
//   This program is distributed in the hope that it will be useful,          //
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   You should have received a copy of the Phorum License                    //
//   along with this program.                                                 //
////////////////////////////////////////////////////////////////////////////////
if (!defined("PHORUM_ADMIN")) {
    return;
}
include_once "./include/api/base.php";
include_once "./include/api/user.php";
phorum_api_user_session_destroy(PHORUM_ADMIN_SESSION);
$redir_url = phorum_admin_build_url('base');
phorum_redirect_by_url($redir_url);
exit;
예제 #18
0
         }
     } else {
         if (isset($_POST['forum_id'])) {
             unset($_POST['forum_id']);
         }
         $res = phorum_db_add_forum($_POST);
         // set/build the forum_path
         $cur_forum_id = $res;
         $built_paths = phorum_admin_build_path_array($cur_forum_id);
         phorum_db_update_forum(array('forum_id' => $cur_forum_id, 'forum_path' => $built_paths[$cur_forum_id]));
     }
     if ($res) {
         if ($reload) {
             $url = phorum_admin_build_url(array('module=editforum', 'forum_id=' . $_POST['forum_id']));
         } else {
             $url = phorum_admin_build_url(array('module=default', 'parent_id=' . $_POST['parent_id']));
         }
         phorum_redirect_by_url($url);
         exit;
     } else {
         $error = "Database error while adding/updating forum.";
     }
 }
 foreach ($_POST as $key => $value) {
     ${$key} = $value;
 }
 $pub_perms = 0;
 if (isset($_POST["pub_perms"])) {
     foreach ($_POST["pub_perms"] as $perm => $check) {
         $pub_perms = $pub_perms | $perm;
     }
예제 #19
0
파일: mods.php 프로젝트: samuell/Core
        $text .= "<div class=\"module_release_date\">Released " . $info["release_date"] . "</div>";
    }
    if ($info['version_disabled']) {
        $html .= "<div class=\"module_error\">" . "Module disabled. Phorum version " . "{$info['required_version']} or higher is required " . "for running this module." . "</div>";
    } else {
        $links = array();
        if ($info["settings"]) {
            $setting_url = phorum_admin_build_url(array('module=modsettings', 'mod=' . $name));
            $links[] = "<a name=\"link-settings-{$name}\" href=\"{$setting_url}\">" . "Edit module settings</a>";
        }
        if (isset($info["url"])) {
            $links[] = "<a target=\"_blank\" href=\"" . $info["url"] . "\">Visit web site</a>";
        }
        foreach (array('README', 'INSTALL', 'Changelog') as $file) {
            if (file_exists("./mods/{$name}/{$file}")) {
                $add_url = phorum_admin_build_url(array('module=mods', 'mod=' . $name, 'info=' . $file));
                $links[] = "<a href=\"{$add_url}\">View {$file}</a>";
            }
        }
        if (!empty($links)) {
            $html .= "<div class=\"module_links\">";
            $html .= implode(' | ', $links);
            $html .= "</div>";
        }
    }
    $html .= '</div></div>';
}
$html .= "<div style=\"text-align: center\" class=\"PhorumAdminTitle\">" . "<input type=\"submit\" value=\"Save settings\">" . "</div>" . "</form>";
print $html;
?>
예제 #20
0
파일: newfolder.php 프로젝트: samuell/Core
        // Currently stored as a vroot folder?
        if ($newfolder['vroot'] == $newfolder['forum_id']) {
            // And requested to disable the vroot?
            if (!$enable_vroot) {
                phorum_api_forums_save(array('forum_id' => $newfolder['forum_id'], 'vroot' => $newfolder['parent_id']));
            }
        } else {
            // And requested to enable the vroot?
            if ($enable_vroot) {
                phorum_api_forums_save(array('forum_id' => $newfolder['forum_id'], 'vroot' => $newfolder['forum_id']));
            }
        }
        // The message to show on the next page.
        $okmsg = "Folder \"{$folder['name']}\" was successfully saved";
        // The URL to redirect to.
        $url = phorum_admin_build_url(array('module=default', "parent_id=" . $folder['parent_id'], 'okmsg=' . rawurlencode($okmsg)), TRUE);
        phorum_api_redirect($url);
        exit;
    }
} elseif (defined("PHORUM_EDIT_FOLDER")) {
    $folder_id = isset($_POST['forum_id']) ? $_POST['forum_id'] : $_GET['forum_id'];
    $folder = phorum_api_forums_by_forum_id($folder_id, PHORUM_FLAG_INCLUDE_INACTIVE);
} else {
    $parent_id = $PHORUM['vroot'];
    if (!empty($_GET['parent_id'])) {
        $parent_id = (int) $_GET['parent_id'];
    }
    // Prepare a folder data array for initializing the form.
    $folder = phorum_api_forums_save(array('forum_id' => NULL, 'folder_flag' => 1, 'inherit_id' => 0, 'parent_id' => $parent_id, 'name' => ''), PHORUM_FLAG_PREPARE);
}
extract($folder);
예제 #21
0
        }
    }
    if ($active_fields > 0) {
        ?>
        <table border="0" cellspacing="1" cellpadding="0"
               class="PhorumAdminTable" width="100%">
        <tr>
          <td class="PhorumAdminTableHead">Field</td>
          <td class="PhorumAdminTableHead">Length</td>
          <td class="PhorumAdminTableHead">HTML disabled</td>
          <td class="PhorumAdminTableHead">&nbsp;</td>
        </tr> <?php 
        foreach ($PHORUM["PROFILE_FIELDS"] as $key => $item) {
            // Do not show deleted fields.
            if (!empty($item['deleted'])) {
                continue;
            }
            $edit_url = phorum_admin_build_url(array('module=customprofile', 'edit=1', "curr={$key}"));
            $delete_url = phorum_admin_build_url(array('module=customprofile', 'delete=1', "curr={$key}"));
            print "<tr>\n";
            print "  <td class=\"PhorumAdminTableRow\">" . $item['name'] . "</td>\n";
            print "    <td class=\"PhorumAdminTableRow\">" . $item['length'] . "</td>\n";
            print "    <td class=\"PhorumAdminTableRow\">" . ($item['html_disabled'] ? "Yes" : "No") . "</td>\n";
            print "    <td class=\"PhorumAdminTableRow\"><a href=\"{$edit_url}\">Edit</a>&nbsp;&#149;&nbsp;<a href=\"{$delete_url}\">Delete</a></td>\n";
            print "</tr>\n";
        }
        print "</table>\n";
    } else {
        echo "There are currently no custom profile fields configured.";
    }
}
예제 #22
0
            alert('Please select the message(s) that you want to delete.');
            return false;
        }

        return confirm(
            'Delete the ' + count + ' selected message(s) ' +
            '/ thread(s) from the database?'
        );
    }

    //]]>
    </script>

    <form id="selectform" method="post"
          action="<?php 
        echo phorum_admin_build_url();
        ?>
">
    <input type="hidden" name="phorum_admin_token" value="<?php 
        echo $PHORUM['admin_token'];
        ?>
" />
    <input type="hidden" name="module" value="<?php 
        print ADMIN_MODULE;
        ?>
" />
    <input type="hidden" id="filterdesc" name="filterdesc" value="<?php 
        // Remember the filter description if one is available
        // (should be at this point).
        if (isset($_POST["filterdesc"])) {
            print htmlspecialchars($_POST["filterdesc"]);
예제 #23
0
 /**
  * Return the HTML for this menu.
  *
  * @return string   HTML for rendering the menu
  */
 function getHtml()
 {
     $html = '';
     if ($this->_title) {
         $html .= "<div class=\"PhorumAdminMenuTitle\">{$this->_title}</div>\n";
     }
     $html .= "<div class=\"PhorumAdminMenu\"";
     if ($this->_id) {
         $html .= " id=\"{$this->_id}\"";
     }
     $html .= ">";
     foreach ($this->_links as $link) {
         if (isset($link["type"]) && $link["type"] == "custom") {
             $desc = htmlspecialchars($link["description"]);
             $title = htmlspecialchars($link["title"]);
             $url = htmlspecialchars($link["url"]);
             $html .= "<a title=\"{$desc}\" href=\"{$url}\"";
             if (strlen($link["target"]) > 0) {
                 $html .= " target=\"{$link["target"]}\" ";
             }
             $html .= "\">{$title}</a><br />";
         } else {
             $desc = htmlspecialchars($link["description"]);
             $title = htmlspecialchars($link["title"]);
             $input_args = array();
             if (!empty($link["module"])) {
                 $input_args[] = "module={$link['module']}";
             }
             $url = phorum_admin_build_url($input_args);
             $html .= "<a title=\"{$desc}\" href=\"{$url}";
             $html .= "\">{$title}</a><br />";
         }
     }
     $html .= "</div>\n";
     return $html;
 }
예제 #24
0
파일: users.php 프로젝트: mgs2/kw-forum
EOT;
        if (!empty($_REQUEST["registered"])) {
            echo "<td class=\"PhorumAdminTableHead\"><a href=\"{$registered_sort_url}\" style=\"color: #FFF;\">Registered</a></td>";
        }
        echo <<<EOT
            <td class="PhorumAdminTableHead">Delete</td>
        </tr>
EOT;
        foreach ($user_ids as $user_id) {
            $user = $users[$user_id];
            $status = $user_status_map[$user['active']];
            $posts = intval($user['posts']);
            $ta_class = "PhorumAdminTableRow" . ($ta_class == "PhorumAdminTableRow" ? "Alt" : "");
            $user_input_args = array('module=users', 'user_id=' . $user['user_id'], 'edit=1', 'page=' . $page, 'pagelength=' . $pagelength, 'sort=' . $sort, 'sort_dir=' . $sort_dir);
            $user_input_args = array_merge($user_input_args, $url_safe_search_arr);
            $edit_url = phorum_admin_build_url($user_input_args);
            echo "<tr>\n";
            echo "    <td class=\"" . $ta_class . "\"><a href=\"{$edit_url}\">" . (empty($PHORUM['custom_display_name']) ? htmlspecialchars($user['display_name']) : $user['display_name']) . "</a></td>\n";
            echo "    <td class=\"" . $ta_class . "\"><a href=\"{$edit_url}\">" . (empty($PHORUM['custom_display_name']) ? htmlspecialchars($user['real_name']) : $user['display_name']) . "</td>\n";
            echo "    <td class=\"" . $ta_class . "\">" . htmlspecialchars($user['email']) . "</td>\n";
            echo "    <td class=\"" . $ta_class . "\">" . htmlspecialchars($user['clubid']) . "</td>\n";
            echo "    <td class=\"" . $ta_class . "\">{$status}</td>\n";
            echo "    <td class=\"" . $ta_class . "\" style=\"text-align:right\">{$posts}</td>\n";
            echo "    <td class=\"" . $ta_class . "\" align=\"right\">" . (intval($user['date_last_active']) ? phorum_date($PHORUM['short_date'], intval($user['date_last_active'])) : "&nbsp;") . "</td>\n";
            if (!empty($_REQUEST["registered"])) {
                echo "    <td class=\"" . $ta_class . "\" align=\"right\">" . (intval($user['date_added']) ? phorum_date($PHORUM['short_date'], intval($user['date_added'])) : "&nbsp;") . "</td>\n";
            }
            echo "    <td class=\"" . $ta_class . "\"><input type=\"checkbox\" name=\"deleteIds[]\" value=\"{$user['user_id']}\"></td>\n";
            echo "</tr>\n";
        }
        echo <<<EOT
예제 #25
0
파일: newfolder.php 프로젝트: mgs2/kw-forum
                 // just default root ...
                 phorum_admin_set_vroot($cur_folder_id, 0, $cur_folder_id);
             }
             // we have now set this folder as vroot
         } elseif ($setvroot && ($oldfolder['vroot'] == 0 || $oldfolder['vroot'] != $cur_folder_id)) {
             if (!phorum_admin_set_vroot($cur_folder_id)) {
                 $error = "Database error while setting virtual-root info.";
             }
         }
         // is there an else?
     } else {
         $error = "Database error while adding/updating folder.";
     }
 }
 if (empty($error)) {
     $redir_url = phorum_admin_build_url(array('parent_id=' . $cur_folder["parent_id"]), TRUE);
     phorum_redirect_by_url($redir_url);
     exit;
 }
 foreach ($_POST as $key => $value) {
     ${$key} = $value;
 }
 $forum_settings = $_POST;
 if ($setvroot) {
     $vroot = $_POST["forum_id"];
 } else {
     if ($_POST["forum_id"] != $oldfolder["vroot"]) {
         $vroot = $oldfolder["vroot"];
     } else {
         $vroot = 0;
     }
예제 #26
0
파일: badwords.php 프로젝트: mgs2/kw-forum
        $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}"));
            $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";
            echo "    <td class=\"" . $ta_class . "\"><a href=\"{$edit_url}\">Edit</a>&nbsp;&#149;&nbsp;<a href=\"{$delete_url}\">Delete</a></td>\n";
            echo "</tr>\n";
        }
        echo "</table>\n";
    } else {
        echo "No bad words in list currently.";
    }
}
예제 #27
0
파일: install.php 프로젝트: samuell/Core
     $frm = new PhorumInputForm("", "post");
     $frm->hidden("step", "create_admin_user");
     $frm->hidden("module", "install");
     $frm->hidden("sanity_checks_done", "1");
     $frm->addbreak("Creating An Administrator");
     $frm->addmessage("Please enter the following information.  This can be your user information or you can create an administrator that is separate from yourself.<br /><br />Note: If you are using a pre-existing authentication database, please enter the username and password of the admin user that already exists.");
     $admin_user = isset($_POST["admin_user"]) ? $_POST["admin_user"] : "";
     $admin_email = isset($_POST["admin_email"]) ? $_POST["admin_email"] : "";
     $frm->addrow("Admin User Name", $frm->text_box("admin_user", $admin_user, 30));
     $frm->addrow("Admin Email Address", $frm->text_box("admin_email", $admin_email, 30));
     $frm->addrow("Admin Password", $frm->text_box("admin_pass", "", 30, 0, true));
     $frm->addrow("(again)", $frm->text_box("admin_pass2", "", 30, 0, true));
     $frm->show();
     break;
 case "done":
     $cont_url = phorum_admin_build_url();
     $PHORUM['DB']->update_settings(array("installed" => 1));
     echo "The setup is complete.  You can now go to <a href=\"{$cont_url}\">the admin</a> and start making Phorum all your own.<br /><br /><strong>Here are some things you will want to look at:</strong><br /><br /><a href=\"{$_SERVER['PHP_SELF']}?module=settings\">The General Settings page</a><br /><br /><a href=\"{$_SERVER['PHP_SELF']}?module=mods\">Pre-installed modules</a><br /><br /><a href=\"docs/faq.txt\">The FAQ</a><br /><br /><a href=\"docs/performance.txt\">How to get peak performance from Phorum</a><br /><br /><strong>For developers:</strong><br /><br /><a href=\"docs/creating_mods.txt\">Module Creation</a><br /><br /><a href=\"docs/permissions.txt\">How Phorum permisssions work</a><br /><br /><a href=\"docs/CODING-STANDARDS\">The Phorum Team's codings standards</a>";
     break;
 case "modules":
     // Retrieve a list of available modules.
     require_once './include/api/modules.php';
     $list = phorum_api_modules_list();
     $frm = new PhorumInputForm("", "post", "Continue ->");
     $frm->addbreak("Optional modules");
     $frm->hidden("module", "install");
     $frm->hidden("sanity_checks_done", "1");
     $frm->hidden("step", "modules");
     $frm->hidden("do_modules_update", "1");
     $frm->addmessage("Phorum has a very robust module system.  The following modules are\n             included with the distribution.  You can find more modules at the\n             Phorum web site.  Some modules may have additional configuration\n             options, which are not available during install.  To configure the\n             modules, click the \"Modules\" menu item in the admin interface\n             after installation is done.");
     foreach ($list['modules'] as $name => $info) {
예제 #28
0
 <tr>
   <td class="PhorumAdminTableHead">String</td>
   <td class="PhorumAdminTableHead">Image file</td>
   <td class="PhorumAdminTableHead">Image</td>
   <td class="PhorumAdminTableHead">ALT attribute</td>
   <td class="PhorumAdminTableHead">Used for</td>
   <td class="PhorumAdminTableHead">&nbsp;</td>
 </tr>
 <?php 
 foreach ($PHORUM["mod_smileys"]["smileys"] as $id => $item) {
     $used_for_txt = $PHORUM_MOD_SMILEY_USES[$item['uses']];
     foreach ($item as $key => $val) {
         $item[$key] = htmlspecialchars($val);
     }
     $edit_url = phorum_admin_build_url(array('module=modsettings', 'mod=smileys', 'smiley_id=' . $id, 'edit=1'));
     $delete_url = phorum_admin_build_url(array('module=modsettings', 'mod=smileys', 'smiley_id=' . $id, 'delete=1'));
     print "<tr>\n";
     print "  <td class=\"PhorumAdminTableRow\">{$item["search"]}</td>\n";
     print "  <td class=\"PhorumAdminTableRow\">{$item["smiley"]}</td>\n";
     print "  <td class=\"PhorumAdminTableRow\" align=\"center\">";
     if ($item["active"]) {
         print "<img src=\"{$PHORUM["mod_smileys"]["prefix"]}{$item["smiley"]}\"/></td>\n";
     } else {
         print "<div style=\"color:red\">UNAVAILBLE</div>";
     }
     print "  <td class=\"PhorumAdminTableRow\">{$item["alt"]}</td>\n";
     print "  <td class=\"PhorumAdminTableRow\" style=\"white-space:nowrap\">{$used_for_txt}</td>\n";
     print "  <td class=\"PhorumAdminTableRow\">" . "<a href=\"{$edit_url}\">Edit</a>&nbsp;&#149;&nbsp;" . "<a href=\"{$delete_url}\">Delete</a></td>\n";
     print "</tr>\n";
 }
 print "</table>\n";
예제 #29
0
unset($get['module']);
unset($get['phorum_admin_token']);
if (empty($post) && empty($get)) {
    $module = '';
    if (isset($_POST['module'])) {
        $module = basename($_POST['module']);
    } elseif (isset($_GET['module'])) {
        $module = basename($_GET['module']);
    }
    $url = phorum_admin_build_url('module=' . urlencode($module), TRUE);
    phorum_api_redirect($url);
}
$targetargs = $_SERVER['QUERY_STRING'];
$target_html = phorum_admin_build_url($targetargs);
$targs_html = htmlspecialchars($targetargs);
$post_url = phorum_admin_build_url();
?>
You are accessing the admin after a security timeout.<br /><br />
The requested URL was: 
<pre><?php 
echo $target_html;
?>
</pre><br />
<strong>Please make sure that you really want to access this URL and weren't tricked to go to the admin.</strong><br />
Please click on <strong>continue</strong> to go to this URL or on <strong>cancel</strong> to go to the forum homepage.
<br /><br />
<form action="<?php 
echo $post_url;
?>
" method="POST">
<input type="hidden" name="module" value="tokenmissing" />
예제 #30
0
       <td class="PhorumAdminTableHead">HTML disabled</td>
       <td class="PhorumAdminTableHead">Type</td>
       <td class="PhorumAdminTableHead">Show in Admin?</td>
       <td class="PhorumAdminTableHead">&nbsp;</td>
     </tr> <?php 
     foreach ($PHORUM["CUSTOM_FIELDS"] as $field_type => $fields) {
         if (isset($fields["num_fields"])) {
             unset($fields["num_fields"]);
         }
         foreach ($fields as $key => $item) {
             // Do not show deleted fields.
             if (!empty($item['deleted'])) {
                 continue;
             }
             $edit_url = phorum_admin_build_url(array('module=customprofile', 'edit=1', "curr={$key}"));
             $delete_url = phorum_admin_build_url(array('module=customprofile', 'delete=1', "curr={$key}", "field_type=" . $item['field_type']));
             $readable_type = $TYPES_ARRAY[$field_type];
             print "<tr>\n";
             print "  <td class=\"PhorumAdminTableRow\">" . $item['name'] . "</td>\n";
             print "    <td class=\"PhorumAdminTableRow\">" . $item['length'] . "</td>\n";
             print "    <td class=\"PhorumAdminTableRow\">" . ($item['html_disabled'] ? "Yes" : "No") . "</td>\n";
             print "    <td class=\"PhorumAdminTableRow\">" . $readable_type . "</td>\n";
             print "    <td class=\"PhorumAdminTableRow\">" . ($item['show_in_admin'] ? "Yes" : "No") . "</td>\n";
             print "    <td class=\"PhorumAdminTableRow\"><a href=\"{$edit_url}\">Edit</a>&nbsp;&#149;&nbsp;<a href=\"{$delete_url}\">Delete</a></td>\n";
             print "</tr>\n";
         }
     }
     print "</table>\n";
 } else {
     echo "There are currently no custom fields configured.";
 }