Empty commit

This commit is contained in:
Git 2015-10-31 08:00:29 +00:00
parent bc3c3df65a
commit 58558082d4
6 changed files with 75 additions and 10 deletions

View File

@ -1,5 +1,11 @@
CHANGE LOG
2015-10-31 by newman
Add read-only version of site options for mods
2015-10-30 by newman
Update staff.php layout
2015-10-27 by newman
Paginate ask the staff

View File

@ -159,3 +159,11 @@ function get_support() {
'staff' => get_staff()
);
}
function printSectionDiv($ClassName) {
?>
</div><br />
<div class='box pad' style='padding: 10px 10px 10px 10px;'>
<h2 style='text-align: left;'><?=$ClassName?></h2>
<?
}

View File

@ -20,10 +20,13 @@
<p>If you are looking for help with a general question, we appreciate it if you would only message through the staff inbox, where we can all help you.</p>
<p>You can do that by <strong><a href="#" onclick="$('#compose').gtoggle(); return false;">sending a message to the Staff Inbox</a></strong>.</p>
</div>
</div>
<div class="box pad" style="padding: 0px 10px 10px 10px;">
<? View::parse('generic/reply/staffpm.php', array('Hidden' => true)); ?>
<br />
<h3 id="fls">First-Line Support</h3>
<p><strong>These users are not official staff members.</strong> They are users who have volunteered their time to help people in need. Please treat them with respect, and read <a href="wiki.php?action=article&amp;id=260">this</a> before contacting them.</p>
<h2 style="text-align: left;">Community Help</h2>
<h3 style="font-size: 17px;" id="fls"><i>First-Line Support</i></h3>
<p><strong>These users are not official staff members.</strong> They are users who have volunteered their time to help people in need. Please treat them with respect, and read <a href="wiki.php?action=article&amp;id=260">this</a> before contacting them.</p><br />
<table class="staff" width="100%">
<tr class="colhead">
<td style="width: 130px;">Username</td>
@ -39,12 +42,10 @@
} ?>
</table>
</div>
<br />
<div class="box pad" style="padding: 0px 10px 10px 10px;">
<br />
<h3 id="forum_mods">Forum Moderators</h3>
<p>Forum Moderators are users who have been promoted to help moderate the forums. They can only help with forum-oriented questions.</p>
<h3 style="font-size: 17px;" id="forum_mods"><i>Forum Moderators</i></h3>
<p>Forum Moderators are users who have been promoted to help moderate the forums. They can only help with forum-oriented questions.</p><br />
<table class="staff" width="100%">
<tr class="colhead">
<td style="width: 130px;">Username</td>
@ -67,6 +68,8 @@
<?
$CurClass = 0;
$CloseTable = false;
$DevDiv = false;
$AdminDiv = false;
foreach ($Staff as $StaffMember) {
list($ID, $Class, $ClassName, $Username, $Paranoia, $LastAccess, $Remark) = $StaffMember;
if ($Class != $CurClass) { // Start new class of staff members
@ -85,21 +88,37 @@
$HTMLID = 'mods';
break;
case 'Developer':
printSectionDiv("Development");
$DevDiv = true;
$HTMLID = 'devs';
break;
case 'Lead Developer':
if (!$DevDiv) {
printSectionDiv("Development");
$DevDiv = true;
}
$HTMLID = 'lead_devs';
break;
case 'Administrator':
printSectionDiv("Administration");
$AdminDiv = true;
$HTMLID = 'admins';
break;
case 'System Administrator':
case 'Sysop':
if (!$AdminDiv) {
printSectionDiv("Administration");
}
$HTMLID = 'sysops';
break;
default:
$HTMLID = '';
}
echo "\t\t<h3 id=\"$HTMLID\">".$ClassName."s</h3>\n";
if ($HTMLID != 'mods') {
echo "\t\t<h3 style=\"font-size: 17px;\" id=\"$HTMLID\"><i>".$ClassName."s</i></h3>\n";
} else {
echo "\t\t<h2 style='text-align: left'>" . $ClassName . "s</h2>\n";
}
?>
<table class="staff" width="100%">
<tr class="colhead">

View File

@ -1,8 +1,40 @@
<?
if (!check_perms('admin_manage_permissions')) {
if (!check_perms('admin_manage_permissions') && !check_perms('users_mod')) {
error(403);
}
if (!check_perms('admin_manage_permissions')) {
View::show_header('Site Options');
$DB->query("SELECT Name, Value, Comment FROM site_options");
?>
<div class="header">
<h1>Site Options</h1>
</div>
<table width="100%">
<tr class="colhead">
<td>Name</td>
<td>Value</td>
<td>Comment</td>
</tr>
<?
$Row = 'a';
while (list($Name, $Value, $Comment) = $DB->next_record()) {
$Row = $Row === 'a' ? 'b' : 'a';
?>
<tr class="row<?=$Row?>">
<td><?=$Name?></td>
<td><?=$Value?></td>
<td><?=$Comment?></td>
</tr>
<?
}
?>
</table>
<?
View::show_footer();
die();
}
if (isset($_POST['submit'])) {
authorize();

View File

@ -224,7 +224,7 @@ function create_row($Title, $URL, $HasPermission = false, $Tooltip = false) {
create_row("Rerender stylesheet gallery images", "tools.php?action=rerender_gallery", check_perms("site_debug") || check_perms("users_mod"));
create_row("Schedule", "schedule.php?auth=$LoggedUser[AuthKey]", check_perms("site_debug"));
create_row("Service stats", "tools.php?action=service_stats", check_perms("site_debug"));
create_row("Site options", "tools.php?action=site_options", check_perms('admin_manage_permissions'));
create_row("Site options", "tools.php?action=site_options", check_perms('users_mod'));
create_row("Tracker info", "tools.php?action=ocelot_info", check_perms("users_mod"));
create_row("Update GeoIP", "tools.php?action=update_geoip", check_perms("admin_update_geoip"));

View File

@ -32,7 +32,7 @@
)
) {
error(403);
}
}
$Email = $_POST['email'];
$Username = $LoggedUser['Username'];