Empty commit

This commit is contained in:
Git 2013-05-22 08:01:02 +00:00
parent 95e1d6266c
commit b4fe1d35f1
5 changed files with 30 additions and 22 deletions

View File

@ -1,7 +1,10 @@
<?
if ($ID = (int)($_GET['id'])) {
// Check if conversation belongs to user
$DB->query("SELECT UserID, Level, AssignedToUser FROM staff_pm_conversations WHERE ID=$ID");
$DB->query("
SELECT UserID, Level, AssignedToUser
FROM staff_pm_conversations
WHERE ID=$ID");
list($UserID, $Level, $AssignedToUser) = $DB->next_record();
if ($UserID == $LoggedUser['ID'] || ($IsFLS && $Level == 0) ||
@ -11,7 +14,10 @@
}*/
// Conversation belongs to user or user is staff, unresolve it
$DB->query("UPDATE staff_pm_conversations SET Status='Unanswered' WHERE ID=$ID");
$DB->query("
UPDATE staff_pm_conversations
SET Status='Unanswered'
WHERE ID=$ID");
// Clear cache for user
$Cache->delete_value('num_staff_pms_'.$LoggedUser['ID']);

View File

@ -26,7 +26,7 @@
<div class="header">
<h2>Staff PMs</h2>
<div class="linkbox">
<a href="#" onclick="$('#compose').toggle();" class="brackets">Compose New</a>
<a href="#" onclick="$('#compose').toggle();" class="brackets">Compose new</a>
</div>
</div>
<br />
@ -40,7 +40,6 @@
?>
<h2>No messages</h2>
<?
} else {
// Messages, draw table
?>
@ -62,11 +61,13 @@
if ($Unread === '1') {
$RowClass = 'unreadpm';
} else {
$Row = ($Row === 'a') ? 'b' : 'a';
$Row = (($Row === 'a') ? 'b' : 'a');
$RowClass = 'row'.$Row;
}
if ($Status == 'Resolved') { $ShowBox++; }
if ($Status == 'Resolved') {
$ShowBox++;
}
if ($ShowBox == 2) {
// First resolved PM
?>
@ -86,12 +87,13 @@
// Get assigned
$Assigned = ($Level == 0) ? 'First Line Support' : $ClassLevels[$Level]['Name'];
// No + on Sysops
if ($Assigned != 'Sysop') { $Assigned .= '+'; }
if ($Assigned != 'Sysop') {
$Assigned .= '+';
}
// Table row
?>
<tr class="<?=$RowClass?>">
<td class="center"><input type="checkbox" name="id[]" value="<?=$ID?>" /></td>
<td><a href="staffpm.php?action=viewconv&amp;id=<?=$ID?>"><?=display_str($Subject)?></a></td>
<td><?=time_diff($Date, 2, true)?></td>
@ -107,9 +109,7 @@
<input type="submit" value="Resolve selected" />
</form>
<?
}
?>
</div>
</div>

View File

@ -62,7 +62,10 @@
<div id="inbox">
<?
// Get messages
$StaffPMs = $DB->query("SELECT UserID, SentDate, Message, ID FROM staff_pm_messages WHERE ConvID=$ConvID");
$StaffPMs = $DB->query("
SELECT UserID, SentDate, Message, ID
FROM staff_pm_messages
WHERE ConvID=$ConvID");
while (list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) {
// Set user string
@ -77,11 +80,12 @@
$Username = $UserInfo['Username'];
}
?>
<div class="box vertical_space">
<div class="box vertical_space" id="post<?=$MessageID?>">
<div class="head">
<? // TODO: the inline style in the <a> tag is an ugly hack. get rid of it. ?>
<a class="postid" href="staffpm.php?action=viewconv&amp;id=<?=$ConvID?>#post<?=$MessageID?>" style="font-weight: normal;">#<?=$MessageID?></a>
<strong>
<?=$UserString?>
</strong>
<?=time_diff($SentDate, 2, true)?>
<? if ($Status != 'Resolved') { ?>
@ -90,7 +94,7 @@
</div>
<div class="body"><?=$Text->full_format($Message)?></div>
</div>
<div align="center" style="display: none"></div>
<div align="center" style="display: none;"></div>
<?
$DB->set_query_id($StaffPMs);
}
@ -128,7 +132,7 @@
<div id="ajax_message" class="hidden center alertbar"></div>
<? }
// Replybox and buttons
// Reply box and buttons
?>
<h3>Reply</h3>
<div class="box pad">
@ -148,14 +152,14 @@
<select id="assign_to" name="assign">
<optgroup label="User classes">
<? // FLS "class"
$Selected = (!$AssignedToUser && $Level == 0) ? ' selected="selected"' : '';
$Selected = ((!$AssignedToUser && $Level == 0) ? ' selected="selected"' : '');
?>
<option value="class_0"<?=$Selected?>>First Line Support</option>
<? // Staff classes
foreach ($ClassLevels as $Class) {
// Create one <option> for each staff user class
if ($Class['Level'] >= 650) {
$Selected = (!$AssignedToUser && ($Level == $Class['Level'])) ? ' selected="selected"' : '';
$Selected = ((!$AssignedToUser && ($Level == $Class['Level'])) ? ' selected="selected"' : '');
?>
<option value="class_<?=$Class['Level']?>"<?=$Selected?>><?=$Class['Name']?></option>
<? }
@ -174,7 +178,7 @@
);
while (list($ID, $Name) = $DB->next_record()) {
// Create one <option> for each staff member
$Selected = ($AssignedToUser == $ID) ? ' selected="selected"' : '';
$Selected = (($AssignedToUser == $ID) ? ' selected="selected"' : '');
?>
<option value="user_<?=$ID?>"<?=$Selected?>><?=$Name?></option>
<? } ?>
@ -194,7 +198,7 @@
");
while (list($ID, $Name) = $DB->next_record()) {
// Create one <option> for each FLS user
$Selected = ($AssignedToUser == $ID) ? ' selected="selected"' : '';
$Selected = (($AssignedToUser == $ID) ? ' selected="selected"' : '');
?>
<option value="user_<?=$ID?>"<?=$Selected?>><?=$Name?></option>
<? } ?>

View File

@ -63,8 +63,7 @@
<tr><td><a href="tools.php?action=edit_tags">Batch tag editor</a></td></tr>
<? } if (check_perms('users_mod')) { ?>
<tr><td><a href="tools.php?action=manipulate_tree">Manipulate tree</a></td></tr>
<? }
if (check_perms('admin_update_geoip')) { ?>
<? } if (check_perms('admin_update_geoip')) { ?>
<tr><td><a href="tools.php?action=update_geoip">Update GeoIP </a></td></tr>
<? } if (check_perms('admin_create_users')) { ?>
<tr><td><a href="tools.php?action=create_user">Create user</a></td></tr>

View File

@ -37,7 +37,6 @@
}
}
$DB->query("INSERT INTO torrents_tags
(TagID, GroupID, PositiveVotes, UserID) VALUES
('$TagID', '$GroupID', '3', '$UserID')