mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-19 04:31:36 +00:00
7 changes from Mon Aug 22 02:37:20 2011 +0200 to Mon Aug 22 03:16:48 2011 +0000
empty fix relative date display fixes http://what.cd/forums.php?action=viewthread&threadid=138447
This commit is contained in:
parent
cd4b22489c
commit
9c7079266d
@ -12,7 +12,7 @@ function time_ago($TimeStamp) {
|
|||||||
return time()-$TimeStamp;
|
return time()-$TimeStamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function time_diff($TimeStamp,$Levels=2,$Span=true) {
|
function time_diff($TimeStamp,$Levels=2,$Span=true, $Lowercase=false) {
|
||||||
if(!is_number($TimeStamp)) { // Assume that $TimeStamp is SQL timestamp
|
if(!is_number($TimeStamp)) { // Assume that $TimeStamp is SQL timestamp
|
||||||
if($TimeStamp == '0000-00-00 00:00:00') { return 'Never'; }
|
if($TimeStamp == '0000-00-00 00:00:00') { return 'Never'; }
|
||||||
$TimeStamp = strtotime($TimeStamp);
|
$TimeStamp = strtotime($TimeStamp);
|
||||||
@ -123,6 +123,10 @@ function time_diff($TimeStamp,$Levels=2,$Span=true) {
|
|||||||
$Return .= ' ago';
|
$Return .= ' ago';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Lowercase) {
|
||||||
|
$Return = strtolower($Return);
|
||||||
|
}
|
||||||
|
|
||||||
if ($Span) {
|
if ($Span) {
|
||||||
return '<span class="time" title="'.date('M d Y, H:i', $TimeStamp).'">'.$Return.'</span>';
|
return '<span class="time" title="'.date('M d Y, H:i', $TimeStamp).'">'.$Return.'</span>';
|
||||||
} else {
|
} else {
|
||||||
|
@ -86,9 +86,6 @@
|
|||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<body id="<?=$Document == 'collages' ? 'collage' : $Document?>" <?= ((!$Mobile && $LoggedUser['Rippy'] == 'On') ? 'onload="say()"' : '') ?>>
|
<body id="<?=$Document == 'collages' ? 'collage' : $Document?>" <?= ((!$Mobile && $LoggedUser['Rippy'] == 'On') ? 'onload="say()"' : '') ?>>
|
||||||
<?
|
|
||||||
|
|
||||||
} ?>
|
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<h1 class="hidden"><?=SITE_NAME?></h1>
|
<h1 class="hidden"><?=SITE_NAME?></h1>
|
||||||
|
|
||||||
|
12
gazelle.sql
12
gazelle.sql
@ -388,6 +388,15 @@ CREATE TABLE `news` (
|
|||||||
KEY `Time` (`Time`)
|
KEY `Time` (`Time`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE `ocelot_query_times` (
|
||||||
|
`buffer` enum('users','torrents','snatches','peers') NOT NULL,
|
||||||
|
`starttime` datetime NOT NULL,
|
||||||
|
`ocelotinstance` datetime NOT NULL,
|
||||||
|
`querylength` int(11) NOT NULL,
|
||||||
|
`timespent` int(11) NOT NULL,
|
||||||
|
UNIQUE KEY `starttime` (`starttime`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
CREATE TABLE `permissions` (
|
CREATE TABLE `permissions` (
|
||||||
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`Level` int(10) unsigned NOT NULL,
|
`Level` int(10) unsigned NOT NULL,
|
||||||
@ -1075,7 +1084,8 @@ CREATE TABLE `users_info` (
|
|||||||
KEY `JoinDate` (`JoinDate`),
|
KEY `JoinDate` (`JoinDate`),
|
||||||
KEY `Inviter` (`Inviter`),
|
KEY `Inviter` (`Inviter`),
|
||||||
KEY `RatioWatchEnds` (`RatioWatchEnds`),
|
KEY `RatioWatchEnds` (`RatioWatchEnds`),
|
||||||
KEY `RatioWatchDownload` (`RatioWatchDownload`)
|
KEY `RatioWatchDownload` (`RatioWatchDownload`),
|
||||||
|
KEY `BitcoinAddress` (`BitcoinAddress`(4))
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `users_main` (
|
CREATE TABLE `users_main` (
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
||||||
<h3>Artist info</h3>
|
<h3>Artist info</h3>
|
||||||
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea> <br />
|
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea> <br />
|
||||||
<h3>Vanity House <input type="checkbox" name="vanity_house" value="1" <?=( check_perms('artist_edit_vanityhouse') ? '' : 'disabled="disabled"' )?> <?=($VanityHouse ? 'checked="checked"' : '')?>" /></h3>
|
<h3>Vanity House <input type="checkbox" name="vanity_house" value="1" <?=( check_perms('artist_edit_vanityhouse') ? '' : 'disabled="disabled"' )?> <?=($VanityHouse ? 'checked="checked"' : '')?> /></h3>
|
||||||
<h3>Edit summary</h3>
|
<h3>Edit summary</h3>
|
||||||
<input type="text" name="summary" size="92" /><br />
|
<input type="text" name="summary" size="92" /><br />
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
<? if (count($ArtistList) == 0) { ?>
|
<? if (count($ArtistList) == 0) { ?>
|
||||||
<h2>You have not bookmarked any artists.</h2>
|
<h2>You have not bookmarked any artists.</h2>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!--content-->
|
||||||
<?
|
<?
|
||||||
show_footer();
|
show_footer();
|
||||||
die();
|
die();
|
||||||
|
@ -17,13 +17,10 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'remove_snatched':
|
case 'remove_snatched':
|
||||||
header('Location: bookmarks.php');
|
|
||||||
die();
|
|
||||||
error(0); // disable this for now as it's the heaviest part of the entire site
|
|
||||||
authorize();
|
authorize();
|
||||||
$DB->query("DELETE b FROM bookmarks_torrents AS b WHERE b.UserID='".$LoggedUser['ID']."' AND b.GroupID IN(SELECT DISTINCT t.GroupID FROM torrents AS t INNER JOIN xbt_snatched AS s ON s.fid=t.ID AND s.uid='".$LoggedUser['ID']."')");
|
$DB->query("DELETE b FROM bookmarks_torrents AS b WHERE b.UserID='".$LoggedUser['ID']."' AND b.GroupID IN(SELECT DISTINCT t.GroupID FROM torrents AS t INNER JOIN xbt_snatched AS s ON s.fid=t.ID AND s.uid='".$LoggedUser['ID']."')");
|
||||||
$Cache->delete_value('bookmarks_torrents_'.$UserID);
|
$Cache->delete_value('bookmarks_torrent_'.$UserID);
|
||||||
$Cache->delete_value('bookmarks_torrents_'.$UserID.'_full');
|
$Cache->delete_value('bookmarks_torrent_'.$UserID.'_full');
|
||||||
header('Location: bookmarks.php');
|
header('Location: bookmarks.php');
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
|
@ -255,14 +255,14 @@ function compare($X, $Y){
|
|||||||
<a href="bookmarks.php?type=requests">[Requests]</a>
|
<a href="bookmarks.php?type=requests">[Requests]</a>
|
||||||
<? if (count($TorrentList) > 0) { ?>
|
<? if (count($TorrentList) > 0) { ?>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<a href="bookmarks.php?action=remove_snatched&auth=<?=$LoggedUser['AuthKey']?>" onclick="alert('This feature is temporarily disabled');">[Remove Snatched]</a>
|
<a href="bookmarks.php?action=remove_snatched&auth=<?=$LoggedUser['AuthKey']?>" onclick="return confirm('Are you sure you want to remove the bookmarks for all items you\'ve snatched?');">[Remove Snatched]</a>
|
||||||
<?//onclick="return confirm('Are you sure you want to remove the bookmarks for all items you\'ve snatched?');">[Remove Snatched]</a>?>
|
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
<? if (count($TorrentList) == 0) { ?>
|
<? if (count($TorrentList) == 0) { ?>
|
||||||
<div class="box pad" align="center">
|
<div class="box pad" align="center">
|
||||||
<h2>You have not bookmarked any torrents.</h2>
|
<h2>You have not bookmarked any torrents.</h2>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!--content-->
|
||||||
<?
|
<?
|
||||||
show_footer();
|
show_footer();
|
||||||
die();
|
die();
|
||||||
|
@ -140,8 +140,8 @@
|
|||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<h2>Browse collages<?=(!empty($UserLink) ? (isset($CollageIDs) ? ' with contributions by '.$UserLink : ' started by '.$UserLink) : '')?></h2>
|
<h2>Browse collages<?=(!empty($UserLink) ? (isset($CollageIDs) ? ' with contributions by '.$UserLink : ' started by '.$UserLink) : '')?></h2>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<div>
|
|
||||||
<? if (!$BookmarkView) { ?>
|
<? if (!$BookmarkView) { ?>
|
||||||
|
<div>
|
||||||
<form action="" method="get">
|
<form action="" method="get">
|
||||||
<div><input type="hidden" name="action" value="search" /></div>
|
<div><input type="hidden" name="action" value="search" /></div>
|
||||||
<table cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
|
<table cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
|
||||||
@ -197,8 +197,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<? } // if (!$BookmarkView) ?>
|
<? } // if (!$BookmarkView) ?>
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<? if (!$BookmarkView) { ?>
|
<? if (!$BookmarkView) {
|
||||||
<?
|
|
||||||
if (check_perms('site_collages_create')) { ?>
|
if (check_perms('site_collages_create')) { ?>
|
||||||
<a href="collages.php?action=new">[New collage]</a>
|
<a href="collages.php?action=new">[New collage]</a>
|
||||||
<? }
|
<? }
|
||||||
@ -232,7 +231,6 @@
|
|||||||
<a href="bookmarks.php?type=collages">[Collages]</a>
|
<a href="bookmarks.php?type=collages">[Collages]</a>
|
||||||
<a href="bookmarks.php?type=requests">[Requests]</a>
|
<a href="bookmarks.php?type=requests">[Requests]</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<br /><br />
|
|
||||||
<?
|
<?
|
||||||
$Pages=get_pages($Page,$NumResults,COLLAGES_PER_PAGE,9);
|
$Pages=get_pages($Page,$NumResults,COLLAGES_PER_PAGE,9);
|
||||||
echo $Pages;
|
echo $Pages;
|
||||||
@ -246,7 +244,8 @@
|
|||||||
<h2>Your search did not match anything.</h2>
|
<h2>Your search did not match anything.</h2>
|
||||||
<p>Make sure all names are spelled correctly, or try making your search less specific.</p>
|
<p>Make sure all names are spelled correctly, or try making your search less specific.</p>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div><!--box-->
|
||||||
|
</div><!--content-->
|
||||||
<? show_footer(); die();
|
<? show_footer(); die();
|
||||||
} ?>
|
} ?>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
<? if($Depth < count($Edits)) { ?>
|
<? if($Depth < count($Edits)) { ?>
|
||||||
<a href="#edit_info_<?=$PostID?>" onclick="LoadEdit('<?=$Type?>', <?=$PostID?>, <?=($Depth + 1)?>); return false;">«</a>
|
<a href="#edit_info_<?=$PostID?>" onclick="LoadEdit('<?=$Type?>', <?=$PostID?>, <?=($Depth + 1)?>); return false;">«</a>
|
||||||
<?=(($Depth == 0) ? 'Last edited by' : 'Edited by')?>
|
<?=(($Depth == 0) ? 'Last edited by' : 'Edited by')?>
|
||||||
<?=format_username($UserID, $Username) ?> <?=strtolower(time_diff($Time))?>
|
<?=format_username($UserID, $Username) ?> <?=time_diff($Time,2,true,true)?>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<em>Original Post</em>
|
<em>Original Post</em>
|
||||||
<? }
|
<? }
|
||||||
|
@ -390,7 +390,7 @@
|
|||||||
<a href="#content<?=$PostID?>" onclick="LoadEdit('forums', <?=$PostID?>, 1); return false;">«</a>
|
<a href="#content<?=$PostID?>" onclick="LoadEdit('forums', <?=$PostID?>, 1); return false;">«</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
Last edited by
|
Last edited by
|
||||||
<?=format_username($EditedUserID, $EditedUsername) ?> <?=strtolower(time_diff($EditedTime))?>
|
<?=format_username($EditedUserID, $EditedUsername) ?> <?=time_diff($EditedTime,2,true,true)?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -75,7 +75,9 @@
|
|||||||
<div class="head">
|
<div class="head">
|
||||||
<strong><?=$Users[(int)$SenderID]['UserStr']?></strong> <?=time_diff($SentDate)?> - <a href="#quickpost" onclick="Quote('<?=$MessageID?>','<?=$Users[(int)$SenderID]['Username']?>');">[Quote]</a>
|
<strong><?=$Users[(int)$SenderID]['UserStr']?></strong> <?=time_diff($SentDate)?> - <a href="#quickpost" onclick="Quote('<?=$MessageID?>','<?=$Users[(int)$SenderID]['Username']?>');">[Quote]</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="body" id="message<?=$MessageID?>"><?=$Text->full_format($Body)?></div>
|
<div class="body" id="message<?=$MessageID?>">
|
||||||
|
<?=$Text->full_format($Body)?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
enforce_login();
|
enforce_login();
|
||||||
include(SERVER_ROOT.'/sections/requests/functions.php');
|
include(SERVER_ROOT.'/sections/requests/functions.php');
|
||||||
|
|
||||||
$RequestTax = 0.5;
|
$RequestTax = 0.1;
|
||||||
|
|
||||||
// Minimum and default amount of upload to remove from the user when they vote.
|
// Minimum and default amount of upload to remove from the user when they vote.
|
||||||
// Also change in static/functions/requests.js
|
// Also change in static/functions/requests.js
|
||||||
|
@ -421,7 +421,7 @@
|
|||||||
<a href="#content<?=$PostID?>" onclick="LoadEdit('requests', <?=$PostID?>, 1); return false;">«</a>
|
<a href="#content<?=$PostID?>" onclick="LoadEdit('requests', <?=$PostID?>, 1); return false;">«</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
Last edited by
|
Last edited by
|
||||||
<?=format_username($EditedUserID, $EditedUsername) ?> <?=strtolower(time_diff($EditedTime))?>
|
<?=format_username($EditedUserID, $EditedUsername) ?> <?=time_diff($EditedTime,2,true,true)?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -86,10 +86,11 @@
|
|||||||
BitrateList,
|
BitrateList,
|
||||||
FormatList,
|
FormatList,
|
||||||
MediaList,
|
MediaList,
|
||||||
LogCue
|
LogCue,
|
||||||
|
TimeStampDiff(MINUTE, LastVote, NOW())
|
||||||
FROM requests
|
FROM requests
|
||||||
WHERE ID = ".$RequestID);
|
WHERE ID = ".$RequestID);
|
||||||
list($Title, $RequesterID, $OldTorrentID, $RequestCategoryID, $RequestReleaseType, $RequestCatalogueNumber, $BitrateList, $FormatList, $MediaList, $LogCue) = $DB->next_record();
|
list($Title, $RequesterID, $OldTorrentID, $RequestCategoryID, $RequestReleaseType, $RequestCatalogueNumber, $BitrateList, $FormatList, $MediaList, $LogCue, $VoteTime) = $DB->next_record();
|
||||||
|
|
||||||
if(!empty($OldTorrentID)) {
|
if(!empty($OldTorrentID)) {
|
||||||
$Err = "This request has already been filled";
|
$Err = "This request has already been filled";
|
||||||
@ -162,7 +163,6 @@
|
|||||||
TimeFilled = '".sqltime()."'
|
TimeFilled = '".sqltime()."'
|
||||||
WHERE ID = ".$RequestID);
|
WHERE ID = ".$RequestID);
|
||||||
|
|
||||||
|
|
||||||
if($CategoryName == "Music") {
|
if($CategoryName == "Music") {
|
||||||
$ArtistForm = get_request_artists($RequestID);
|
$ArtistForm = get_request_artists($RequestID);
|
||||||
$ArtistName = display_artists($ArtistForm, false, true);
|
$ArtistName = display_artists($ArtistForm, false, true);
|
||||||
@ -174,8 +174,8 @@
|
|||||||
$DB->query("SELECT UserID FROM requests_votes WHERE RequestID = ".$RequestID);
|
$DB->query("SELECT UserID FROM requests_votes WHERE RequestID = ".$RequestID);
|
||||||
$UserIDs = $DB->to_array();
|
$UserIDs = $DB->to_array();
|
||||||
foreach ($UserIDs as $User) {
|
foreach ($UserIDs as $User) {
|
||||||
list($UserID) = $User;
|
list($VoterID) = $User;
|
||||||
send_pm($UserID, 0, db_string("The request '".$FullName."' has been filled"), db_string("One of your requests - [url=http://".NONSSL_SITE_URL."/requests.php?action=view&id=".$RequestID."]".$FullName."[/url] - has been filled. You can view it at [url]http://".NONSSL_SITE_URL."/torrents.php?torrentid=".$TorrentID), '');
|
send_pm($VoterID, 0, db_string("The request '".$FullName."' has been filled"), db_string("One of your requests - [url=http://".NONSSL_SITE_URL."/requests.php?action=view&id=".$RequestID."]".$FullName."[/url] - has been filled. You can view it at [url]http://".NONSSL_SITE_URL."/torrents.php?torrentid=".$TorrentID), '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$RequestVotes = get_votes_array($RequestID);
|
$RequestVotes = get_votes_array($RequestID);
|
||||||
@ -192,6 +192,7 @@
|
|||||||
$Cache->delete_value('request_'.$RequestID);
|
$Cache->delete_value('request_'.$RequestID);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$DB->query("SELECT ArtistID FROM requests_artists WHERE RequestID = ".$RequestID);
|
$DB->query("SELECT ArtistID FROM requests_artists WHERE RequestID = ".$RequestID);
|
||||||
$ArtistIDs = $DB->to_array();
|
$ArtistIDs = $DB->to_array();
|
||||||
foreach($ArtistIDs as $ArtistID) {
|
foreach($ArtistIDs as $ArtistID) {
|
||||||
|
@ -19,12 +19,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
while ($row = $DB->next_record()) {
|
while ($row = $DB->next_record()) {
|
||||||
$amount = " ";
|
$amount = false;
|
||||||
foreach ($Receiveds as $R) {
|
foreach ($Receiveds as $R) {
|
||||||
if ($R->address == $row['BitcoinAddress']) {
|
if ($R->address == $row['BitcoinAddress']) {
|
||||||
$amount = $R->amount . ' BTC';
|
$amount = $R->amount . ' BTC';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($amount === false) { continue; }
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=format_username($row['ID'],$row['Username'],$row['Donor'])?></td>
|
<td><?=format_username($row['ID'],$row['Username'],$row['Donor'])?></td>
|
||||||
|
@ -214,6 +214,10 @@
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'canariesv2':
|
||||||
|
include('data/canariesv2.php');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'ip_ban':
|
case 'ip_ban':
|
||||||
//TODO: Clean up db table ip_bans.
|
//TODO: Clean up db table ip_bans.
|
||||||
include("managers/bans.php");
|
include("managers/bans.php");
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
if (!check_perms('users_mod') && empty($LoggedUser['CustomPermissions'])) { error(403); }
|
if (!check_perms('users_mod')) {
|
||||||
|
error(403);
|
||||||
|
}
|
||||||
show_header('Staff Tools');
|
show_header('Staff Tools');
|
||||||
?>
|
?>
|
||||||
<div class="permissions">
|
<div class="permissions">
|
||||||
|
@ -334,7 +334,7 @@ function filelist($Str) {
|
|||||||
//There was a type but it wasn't an option!
|
//There was a type but it wasn't an option!
|
||||||
$ReportType = $Types['master']['other'];
|
$ReportType = $Types['master']['other'];
|
||||||
}
|
}
|
||||||
$ReportInfo .= "<tr><td>".(check_perms('admin_reports') ? "<a href='user.php?id=$ReporterID'>$ReporterName</a> <a href='reportsv2.php?view=report&id=$ReportID'>reported it</a> " : "Someone reported it ").strtolower(time_diff($ReportedTime))." for the reason '".$ReportType['title']."':";
|
$ReportInfo .= "<tr><td>".(check_perms('admin_reports') ? "<a href='user.php?id=$ReporterID'>$ReporterName</a> <a href='reportsv2.php?view=report&id=$ReportID'>reported it</a> " : "Someone reported it ").time_diff($ReportedTime,2,true,true)." for the reason '".$ReportType['title']."':";
|
||||||
$ReportInfo .= "<blockquote>".$Text->full_format($ReportReason)."</blockquote></td></tr>";
|
$ReportInfo .= "<blockquote>".$Text->full_format($ReportReason)."</blockquote></td></tr>";
|
||||||
}
|
}
|
||||||
$ReportInfo .= "</table>";
|
$ReportInfo .= "</table>";
|
||||||
@ -616,7 +616,7 @@ function filelist($Str) {
|
|||||||
<a href="#content<?=$PostID?>" onclick="LoadEdit('torrents', <?=$PostID?>, 1); return false;">«</a>
|
<a href="#content<?=$PostID?>" onclick="LoadEdit('torrents', <?=$PostID?>, 1); return false;">«</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
Last edited by
|
Last edited by
|
||||||
<?=format_username($EditedUserID, $EditedUsername) ?> <?=strtolower(time_diff($EditedTime))?>
|
<?=format_username($EditedUserID, $EditedUsername) ?> <?=time_diff($EditedTime,2,true,true)?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -145,7 +145,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
|||||||
$Val->SetFields('ratio', '0', 'inarray', 'Invalid ratio field', $NumberChoices);
|
$Val->SetFields('ratio', '0', 'inarray', 'Invalid ratio field', $NumberChoices);
|
||||||
$Val->SetFields('uploaded', '0', 'inarray', 'Invalid uploaded field', $NumberChoices);
|
$Val->SetFields('uploaded', '0', 'inarray', 'Invalid uploaded field', $NumberChoices);
|
||||||
$Val->SetFields('downloaded', '0', 'inarray', 'Invalid downloaded field', $NumberChoices);
|
$Val->SetFields('downloaded', '0', 'inarray', 'Invalid downloaded field', $NumberChoices);
|
||||||
$Val->SetFields('snatched', '0', 'inarray', 'Invalid snatched field', $NumberChoices);
|
//$Val->SetFields('snatched', '0', 'inarray', 'Invalid snatched field', $NumberChoices);
|
||||||
|
|
||||||
$Val->SetFields('matchtype', '0', 'inarray', 'Invalid matchtype field', array('inarray'=>array('strict', 'fuzzy', 'regex')));
|
$Val->SetFields('matchtype', '0', 'inarray', 'Invalid matchtype field', array('inarray'=>array('strict', 'fuzzy', 'regex')));
|
||||||
|
|
||||||
@ -194,9 +194,13 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
|||||||
um1.ID,
|
um1.ID,
|
||||||
um1.Username,
|
um1.Username,
|
||||||
um1.Uploaded,
|
um1.Uploaded,
|
||||||
um1.Downloaded,
|
um1.Downloaded,';
|
||||||
(SELECT COUNT(uid) FROM xbt_snatched AS xs WHERE xs.uid=um1.ID) AS Snatches,
|
if ($_GET['snatched'] == "off") {
|
||||||
um1.PermissionID,
|
$SQL .= "'X' AS Snatches,";
|
||||||
|
} else {
|
||||||
|
$SQL .= "(SELECT COUNT(uid) FROM xbt_snatched AS xs WHERE xs.uid=um1.ID) AS Snatches,";
|
||||||
|
}
|
||||||
|
$SQL .= 'um1.PermissionID,
|
||||||
um1.Email,
|
um1.Email,
|
||||||
um1.Enabled,
|
um1.Enabled,
|
||||||
um1.IP,
|
um1.IP,
|
||||||
@ -254,15 +258,24 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_GET['cc'])) {
|
if (!empty($_GET['cc'])) {
|
||||||
$Where[]="um1.ipcc = '".$_GET['cc']."'";
|
if ($_GET['cc_op'] == "equal") {
|
||||||
|
$Where[]="um1.ipcc = '".$_GET['cc']."'";
|
||||||
|
} else {
|
||||||
|
$Where[]="um1.ipcc != '".$_GET['cc']."'";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($_GET['tracker_ip'])){
|
if(!empty($_GET['tracker_ip'])){
|
||||||
$Distinct = 'DISTINCT ';
|
$Distinct = 'DISTINCT ';
|
||||||
$Join[]=' JOIN xbt_files_users AS xfu ON um1.ID=xfu.uid ';
|
$Join[]=' JOIN xbt_files_users AS xfu ON um1.ID=xfu.uid ';
|
||||||
$Where[]= ' (xfu.ipa '.$Match.wrap((int) ip2long($_GET['tracker_ip'])).' OR xfu.ip '.$Match.wrap($_GET['tracker_ip']).')';
|
$Where[]= ' xfu.ip '.$Match.wrap($_GET['tracker_ip']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(!empty($_GET['tracker_ip'])){
|
||||||
|
// $Distinct = 'DISTINCT ';
|
||||||
|
// $Join[]=' JOIN xbt_snatched AS xs ON um1.ID=xs.uid ';
|
||||||
|
// $Where[]= ' xs.IP '.$Match.wrap($_GET['ip']);
|
||||||
|
// }
|
||||||
|
|
||||||
if(!empty($_GET['comment'])){
|
if(!empty($_GET['comment'])){
|
||||||
$Where[]='ui1.AdminComment'.$Match.wrap($_GET['comment']);
|
$Where[]='ui1.AdminComment'.$Match.wrap($_GET['comment']);
|
||||||
@ -553,6 +566,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
|||||||
<option value="above"<? if(isset($_GET['snatched']) && $_GET['snatched']==='above'){echo ' selected="selected"';}?>>Above</option>
|
<option value="above"<? if(isset($_GET['snatched']) && $_GET['snatched']==='above'){echo ' selected="selected"';}?>>Above</option>
|
||||||
<option value="below"<? if(isset($_GET['snatched']) && $_GET['snatched']==='below'){echo ' selected="selected"';}?>>Below</option>
|
<option value="below"<? if(isset($_GET['snatched']) && $_GET['snatched']==='below'){echo ' selected="selected"';}?>>Below</option>
|
||||||
<option value="between"<? if(isset($_GET['snatched']) && $_GET['snatched']==='between'){echo ' selected="selected"';}?>>Between</option>
|
<option value="between"<? if(isset($_GET['snatched']) && $_GET['snatched']==='between'){echo ' selected="selected"';}?>>Between</option>
|
||||||
|
<option value="off"<? if(isset($_GET['snatched']) && $_GET['snatched']==='off'){echo ' selected="selected"';}?>>Off</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" name="snatched1" size="6" value="<?=display_str($_GET['snatched1'])?>" />
|
<input type="text" name="snatched1" size="6" value="<?=display_str($_GET['snatched1'])?>" />
|
||||||
<input type="text" name="snatched2" size="6" value="<?=display_str($_GET['snatched2'])?>" />
|
<input type="text" name="snatched2" size="6" value="<?=display_str($_GET['snatched2'])?>" />
|
||||||
@ -603,7 +617,11 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="label nobr">Country Code:</td>
|
<td class="label nobr">Country Code:</td>
|
||||||
<td>
|
<td width="30%">
|
||||||
|
<select name="cc_op">
|
||||||
|
<option value="equal"<? if ($_GET['cc_op']==='equal'){ echo ' selected="selected"';}?>>Equals</option>
|
||||||
|
<option value="not_equal"<? if ($_GET['cc_op']==='not_equal'){ echo ' selected="selected"';}?>>Not Equal</option>
|
||||||
|
</select>
|
||||||
<input type="text" name="cc" size="2" value="<?=display_str($_GET['cc'])?>" />
|
<input type="text" name="cc" size="2" value="<?=display_str($_GET['cc'])?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -692,7 +710,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = ''){
|
|||||||
$DB->set_query_id($Results);
|
$DB->set_query_id($Results);
|
||||||
?>
|
?>
|
||||||
<td><?=(int)$Downloads?></td>
|
<td><?=(int)$Downloads?></td>
|
||||||
<td><?=number_format($Snatched)?></td>
|
<td><?=is_numeric($Snatched) ? number_format($Snatched) : display_str($Snatched)?></td>
|
||||||
<td><? if($DisableInvites) { echo 'X'; } else { echo $Invites; } ?></td>
|
<td><? if($DisableInvites) { echo 'X'; } else { echo $Invites; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
|
@ -782,9 +782,82 @@ function check_paranoia_here($Setting) {
|
|||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include_once(SERVER_ROOT.'/sections/staff/functions.php');
|
||||||
|
$FLS = get_fls();
|
||||||
|
$IsFLS = false;
|
||||||
|
foreach($FLS as $F) {
|
||||||
|
if($LoggedUser['ID'] == $F['ID']) {
|
||||||
|
$IsFLS = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (check_perms('users_mod', $Class) || $IsFLS) {
|
||||||
|
$UserLevel = $LoggedUser['Class'];
|
||||||
|
$DB->query("SELECT
|
||||||
|
SQL_CALC_FOUND_ROWS
|
||||||
|
ID,
|
||||||
|
Subject,
|
||||||
|
Status,
|
||||||
|
Level,
|
||||||
|
AssignedToUser,
|
||||||
|
Date,
|
||||||
|
ResolverID
|
||||||
|
FROM staff_pm_conversations
|
||||||
|
WHERE UserID = $UserID AND (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."')
|
||||||
|
ORDER BY Date DESC");
|
||||||
|
if ($DB->record_count()) {
|
||||||
|
$StaffPMs = $DB->to_array();
|
||||||
|
?>
|
||||||
|
<div class="box">
|
||||||
|
<div class="head">Staff PMs <a href="#" onclick="$('#staffpms').toggle();return false;">(View)</a></div>
|
||||||
|
<table width="100%" class="hidden" id="staffpms">
|
||||||
|
<tr class="colhead">
|
||||||
|
<td>Subject</td>
|
||||||
|
<td>Date</td>
|
||||||
|
<td>Assigned To</td>
|
||||||
|
<td>Resolved By</td>
|
||||||
|
</tr>
|
||||||
|
<? foreach($StaffPMs as $StaffPM) {
|
||||||
|
list($ID, $Subject, $Status, $Level, $AssignedTo, $Date, $ResolverID) = $StaffPM;
|
||||||
|
// Get assigned
|
||||||
|
if ($AssignedToUser == '') {
|
||||||
|
// Assigned to class
|
||||||
|
$Assigned = ($Level == 0) ? "First Line Support" : $ClassLevels[$Level]['Name'];
|
||||||
|
// No + on Sysops
|
||||||
|
if ($Assigned != 'Sysop') { $Assigned .= "+"; }
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Assigned to user
|
||||||
|
$UserInfo = user_info($AssignedToUser);
|
||||||
|
$Assigned = format_username($UserID, $UserInfo['Username'], $UserInfo['Donor'], $UserInfo['Warned'], $UserInfo['Enabled'], $UserInfo['PermissionID']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ResolverID) {
|
||||||
|
$UserInfo = user_info($ResolverID);
|
||||||
|
$Resolver = format_username($ResolverID, $UserInfo['Username'], $UserInfo['Donor'], $UserInfo['Warned'], $UserInfo['Enabled'], $UserInfo['PermissionID']);
|
||||||
|
} else {
|
||||||
|
$Resolver = "(unresolved)";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><a href="staffpm.php?action=viewconv&id=<?=$ID?>"><?=display_str($Subject)?></a></td>
|
||||||
|
<td><?=time_diff($Date, 2, true)?></td>
|
||||||
|
<td><?=$Assigned?></td>
|
||||||
|
<td><?=$Resolver?></td>
|
||||||
|
</tr>
|
||||||
|
<? } ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<? }
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<br />
|
<br />
|
||||||
<? if (check_perms('users_mod', $Class)) { ?>
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
if (check_perms('users_mod', $Class)) { ?>
|
||||||
<form id="form" action="user.php" method="post">
|
<form id="form" action="user.php" method="post">
|
||||||
<input type="hidden" name="action" value="moderate" />
|
<input type="hidden" name="action" value="moderate" />
|
||||||
<input type="hidden" name="userid" value="<?=$UserID?>" />
|
<input type="hidden" name="userid" value="<?=$UserID?>" />
|
||||||
|
@ -309,7 +309,7 @@
|
|||||||
<a href="#content<?=$PostID?>" onclick="LoadEdit(<?=$PostID?>, 1)">«</a>
|
<a href="#content<?=$PostID?>" onclick="LoadEdit(<?=$PostID?>, 1)">«</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
Last edited by
|
Last edited by
|
||||||
<?=format_username($EditedUserID, $EditedUsername) ?> <?=strtolower(time_diff($EditedTime))?>
|
<?=format_username($EditedUserID, $EditedUsername) ?> <?=time_diff($EditedTime,2,true,true)?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user