mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 04:01:35 +00:00
Empty commit
This commit is contained in:
parent
0c8d35eec1
commit
a06c4ea077
32
.gitattributes
vendored
Normal file
32
.gitattributes
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# Try to autodetect as fallback
|
||||
* text=auto
|
||||
|
||||
#
|
||||
# Explicit settings in case git gets retarded
|
||||
#
|
||||
|
||||
#
|
||||
# Text files
|
||||
#
|
||||
*.sql
|
||||
*.php text
|
||||
*.xml text
|
||||
*.js text
|
||||
*.html text
|
||||
*.txt text
|
||||
*.css text
|
||||
*.phtml text
|
||||
*.tpl text
|
||||
|
||||
#
|
||||
# Binary files
|
||||
#
|
||||
*.png binary
|
||||
*.jpeg binary
|
||||
*.jpg binary
|
||||
*.gif binary
|
||||
*.jar binary
|
||||
*.ico binary
|
||||
*.TTF binary
|
||||
*.tar.* binary
|
||||
*.bz2 binary
|
@ -11,13 +11,13 @@ The SOFTWARE PRODUCT is protected by copyright laws and international copyright
|
||||
1. GRANT OF LICENSE. This EULA grants you the following rights:
|
||||
· Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
|
||||
· Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT; provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product.
|
||||
2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
|
||||
2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
|
||||
· Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
|
||||
· Restrictions on Alteration. You may not rename, edit or create any derivative works from the SOFTWARE PRODUCT, other than subsetting when embedding them in documents.
|
||||
· Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
|
||||
· Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts.
|
||||
3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material.
|
||||
4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software-Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.
|
||||
4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software-Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.
|
||||
LIMITED WARRANTY
|
||||
NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.
|
||||
NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this Microsoft product, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
|
||||
@ -52,7 +52,7 @@ To add a new font to your computer:
|
||||
|
||||
Tips
|
||||
|
||||
To select more than one font to add, press and hold down the CTRL key, and then click the fonts you want.
|
||||
To select more than one font to add, press and hold down the CTRL key, and then click the fonts you want.
|
||||
|
||||
To select a range of fonts in the list, press and hold down the SHIFT key while dragging the cursor over the fonts.
|
||||
|
||||
@ -67,19 +67,19 @@ Windows 3.1x
|
||||
|
||||
To add fonts to your computer:
|
||||
|
||||
1) In the Control Panel window, choose the Fonts icon. The fonts already installed are listed in the Installed Fonts box.
|
||||
1) In the Control Panel window, choose the Fonts icon. The fonts already installed are listed in the Installed Fonts box.
|
||||
|
||||
2) Choose the Add button.
|
||||
2) Choose the Add button.
|
||||
|
||||
3) In the Add Fonts dialog box, select the font you want to add. You can add more than one font at a time. You can also select all the fonts listed by choosing the Select All button. If the font is not located in the current drive or directory, select the drive and directory where it is located. If the font you want to add is on someone else's computer, you can use the Network button to browse through and connect to shared directories on other computers.
|
||||
3) In the Add Fonts dialog box, select the font you want to add. You can add more than one font at a time. You can also select all the fonts listed by choosing the Select All button. If the font is not located in the current drive or directory, select the drive and directory where it is located. If the font you want to add is on someone else's computer, you can use the Network button to browse through and connect to shared directories on other computers.
|
||||
|
||||
4) If you are low on disk space and want to use the fonts directly from the directory (network or local) where they are located, without copying the font files to the Windows directory, clear the Copy Fonts To Windows Directory check box.
|
||||
4) If you are low on disk space and want to use the fonts directly from the directory (network or local) where they are located, without copying the font files to the Windows directory, clear the Copy Fonts To Windows Directory check box.
|
||||
|
||||
5) Choose the OK button.
|
||||
5) Choose the OK button.
|
||||
|
||||
6) In the Fonts dialog box, choose the Close button.
|
||||
6) In the Fonts dialog box, choose the Close button.
|
||||
|
||||
For help with the Fonts and Add Fonts dialog boxes, choose the Help button or press F1 while using the dialog boxes.
|
||||
For help with the Fonts and Add Fonts dialog boxes, choose the Help button or press F1 while using the dialog boxes.
|
||||
|
||||
|
||||
|
||||
@ -89,17 +89,17 @@ Windows NT
|
||||
|
||||
To add fonts to your computer:
|
||||
|
||||
1) In the Control Panel window, choose the Fonts icon. The fonts already installed are listed in the Installed Fonts box.
|
||||
1) In the Control Panel window, choose the Fonts icon. The fonts already installed are listed in the Installed Fonts box.
|
||||
|
||||
2) Choose the Add button.
|
||||
2) Choose the Add button.
|
||||
|
||||
3)In the Add Fonts dialog box, select the font you want to add. If the font is not located in the current drive or directory, select the drive and directory where it is located. You can add more than one font at a time. You can also select all the fonts listed by choosing the Select All button.
|
||||
3)In the Add Fonts dialog box, select the font you want to add. If the font is not located in the current drive or directory, select the drive and directory where it is located. You can add more than one font at a time. You can also select all the fonts listed by choosing the Select All button.
|
||||
|
||||
4) If you are low on disk space and want to use the fonts directly from the directory (network or local) where they are located, without copying the font files to the \systemroot\SYSTEM directory, clear the Copy Fonts To Windows Directory check box.
|
||||
4) If you are low on disk space and want to use the fonts directly from the directory (network or local) where they are located, without copying the font files to the \systemroot\SYSTEM directory, clear the Copy Fonts To Windows Directory check box.
|
||||
|
||||
5) Choose the OK button.
|
||||
5) Choose the OK button.
|
||||
|
||||
6) Choose the Close button.
|
||||
6) Choose the Close button.
|
||||
|
||||
For help with the Fonts and Add Fonts dialog boxes, choose the Help button or press F1 while using the dialog boxes.
|
||||
|
||||
|
@ -52,8 +52,8 @@ class USER_AGENT {
|
||||
'android' => 'Android',
|
||||
'palm' => 'Palm',
|
||||
'mot-razr' => 'Motorola Razr',
|
||||
'tablet PC' => 'Windows RT',
|
||||
'ARM; Trident' => 'Windows RT',
|
||||
// 'tablet PC' => 'Windows RT',
|
||||
// 'ARM; Trident' => 'Windows RT',
|
||||
//Windows
|
||||
'Windows NT 6.2' => 'Windows 8',
|
||||
'Windows 8' => 'Windows 8',
|
||||
|
18
gazelle.sql
18
gazelle.sql
@ -290,6 +290,15 @@ CREATE TABLE `featured_albums` (
|
||||
`Ended` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `featured_merch` (
|
||||
`ProductID` int(10) NOT NULL DEFAULT '0',
|
||||
`Title` varchar(35) NOT NULL DEFAULT '',
|
||||
`Image` varchar(255) NOT NULL DEFAULT '',
|
||||
`Started` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`Ended` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`ArtistID` int(10) unsigned DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `forums` (
|
||||
`ID` int(6) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`CategoryID` tinyint(2) NOT NULL DEFAULT '0',
|
||||
@ -445,6 +454,15 @@ CREATE TABLE `ip_bans` (
|
||||
KEY `ToIP` (`ToIP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `label_aliases` (
|
||||
`ID` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`BadLabel` varchar(100) NOT NULL,
|
||||
`AliasLabel` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`ID`),
|
||||
KEY `BadLabel` (`BadLabel`),
|
||||
KEY `AliasLabel` (`AliasLabel`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `lastfm_users` (
|
||||
`ID` int(10) unsigned NOT NULL,
|
||||
`Username` varchar(20) NOT NULL,
|
||||
|
@ -55,5 +55,7 @@
|
||||
|
||||
$ConvID = Misc::send_pm($ToID, $LoggedUser['ID'], $Subject, $Body, $ConvID);
|
||||
|
||||
|
||||
|
||||
header('Location: ' . Inbox::get_inbox_link($LoggedUser['ListUnreadPMsFirst']));
|
||||
?>
|
||||
|
@ -190,6 +190,9 @@
|
||||
case 'tag_aliases':
|
||||
include('managers/tag_aliases.php');
|
||||
break;
|
||||
case 'label_aliases':
|
||||
include('managers/label_aliases.php');
|
||||
break;
|
||||
case 'permissions':
|
||||
if (!check_perms('admin_manage_permissions')) {
|
||||
error(403);
|
||||
|
98
sections/tools/managers/label_aliases.php
Normal file
98
sections/tools/managers/label_aliases.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/*
|
||||
if(!check_perms('torrents_edit') || $LoggedUser['DisableWiki']) {
|
||||
error(403);
|
||||
}
|
||||
*/
|
||||
|
||||
if (!check_perms('users_mod') && !$LoggedUser['ExtraClasses'][DELTA_TEAM]) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
View::show_header('Label Aliases');
|
||||
|
||||
$OrderBy = ($_GET['order']) == "BadLabels" ? "BadLabel" : "AliasLabel";
|
||||
/*
|
||||
$LabelID = (int) $_GET['id'];
|
||||
$LabelNameSQL = "";
|
||||
//TODO join with labels table to get label name
|
||||
if(!empty($LabelID)) {
|
||||
$DB->query("SELECT name FROM labels WHERE ID = '$LabelID'");
|
||||
if($DB->record_count()) {
|
||||
list($LabelName) = $DB->next_record();
|
||||
}
|
||||
$LabelNameSQL = " WHERE AliasLabel = '$LabelName'";
|
||||
}
|
||||
*/
|
||||
|
||||
if (isset($_POST['newalias'])) {
|
||||
$BadLabel = db_string($_POST['BadLabel']);
|
||||
$AliasLabel = db_string($_POST['AliasLabel']);
|
||||
|
||||
$DB->query("INSERT INTO label_aliases (BadLabel, AliasLabel) VALUES ('$BadLabel', '$AliasLabel')");
|
||||
}
|
||||
|
||||
if (isset($_POST['changealias']) && is_number($_POST['aliasid'])) {
|
||||
$AliasID = $_POST['aliasid'];
|
||||
$BadLabel = db_string($_POST['BadLabel']);
|
||||
$AliasLabel = db_string($_POST['AliasLabel']);
|
||||
|
||||
if ($_POST['save']) {
|
||||
$DB->query("UPDATE label_aliases SET BadLabel = '$BadLabel', AliasLabel = '$AliasLabel' WHERE ID = '$AliasID' ");
|
||||
}
|
||||
if ($_POST['delete']) {
|
||||
$DB->query("DELETE FROM label_aliases WHERE ID = '$AliasID'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="header">
|
||||
<h2>Label Aliases <?=$LabelName ? "for <a href='labels.php?id=$LabelID'>" . $LabelName ."</a>" : ""?></h2>
|
||||
<div class="linkbox">
|
||||
[<a href="tools.php?action=label_aliases&order=GoodLabels">Sort by Good Labels</a>]
|
||||
[<a href="tools.php?action=label_aliases&order=BadLabels">Sort by Bad Labels</a>]
|
||||
</div>
|
||||
</div>
|
||||
<table width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Label</td>
|
||||
<td>Renamed From</td>
|
||||
<td>Submit</td>
|
||||
</tr>
|
||||
<tr/>
|
||||
<tr>
|
||||
<form method="post">
|
||||
<input type="hidden" name="newalias" value="1" />
|
||||
<td>
|
||||
<input type="text" name="AliasLabel" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="BadLabel" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" value="Add Alias" />
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
<?
|
||||
$DB->query("SELECT ID,BadLabel, AliasLabel FROM label_aliases $LabelNameSQL ORDER BY $OrderBy");
|
||||
while (list($ID, $BadLabel, $AliasLabel) = $DB->next_record()) {
|
||||
?>
|
||||
<tr>
|
||||
<form method="post">
|
||||
<input type="hidden" name="changealias" value="1" />
|
||||
<input type="hidden" name="aliasid" value="<?=$ID?>" />
|
||||
<td>
|
||||
<input type="text" name="AliasLabel" value="<?=$AliasLabel?>" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="BadLabel" value="<?=$BadLabel?>" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" name="save" value="Save Alias" />
|
||||
<input type="submit" name="delete" value="Delete Alias" />
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
<? }?>
|
||||
</table>
|
||||
<? View::show_footer(); ?>
|
@ -30,6 +30,8 @@
|
||||
<tr><td><a href="tools.php?action=tokens">Manage freeleech tokens</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=official_tags">Official tags manager</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=tag_aliases">Tag aliases</a></td></tr>
|
||||
<? } if (check_perms('users_mod') || $LoggedUser['ExtraClasses'][DELTA_TEAM]) { ?>
|
||||
<tr><td><a href="tools.php?action=label_aliases">Label aliases</a></td></tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -9,7 +9,10 @@
|
||||
} elseif (preg_match("/^".EMAIL_REGEX."$/i", $_GET['search'])) {
|
||||
$_GET['email'] = $_GET['search'];
|
||||
} elseif (preg_match('/^[a-z0-9_?]{1,20}$/iD',$_GET['search'])) {
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username='".db_string($_GET['search'])."'");
|
||||
$DB->query("
|
||||
SELECT ID
|
||||
FROM users_main
|
||||
WHERE Username = '".db_string($_GET['search'])."'");
|
||||
if (list($ID) = $DB->next_record()) {
|
||||
header('Location: user.php?id='.$ID);
|
||||
die();
|
||||
|
@ -6,33 +6,52 @@
|
||||
SELECT COUNT(x.uid), COUNT(DISTINCT x.fid)
|
||||
FROM xbt_snatched AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid='$UserID'");
|
||||
WHERE x.uid = '$UserID'");
|
||||
list($Snatched, $UniqueSnatched) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM torrents_comments WHERE AuthorID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM torrents_comments
|
||||
WHERE AuthorID = '$UserID'");
|
||||
list($NumComments) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM artist_comments WHERE AuthorID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM artist_comments
|
||||
WHERE AuthorID = '$UserID'");
|
||||
list($NumArtistComments) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM collages_comments WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM collages_comments
|
||||
WHERE UserID = '$UserID'");
|
||||
list($NumCollageComments) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM requests_comments WHERE AuthorID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM requests_comments
|
||||
WHERE AuthorID = '$UserID'");
|
||||
list($NumRequestComments) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM collages WHERE Deleted='0' AND UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM collages
|
||||
WHERE Deleted = '0'
|
||||
AND UserID = '$UserID'");
|
||||
list($NumCollages) = $DB->next_record();
|
||||
|
||||
$DB->query("
|
||||
SELECT COUNT(DISTINCT CollageID)
|
||||
FROM collages_torrents AS ct
|
||||
JOIN collages ON CollageID = ID
|
||||
WHERE Deleted='0'
|
||||
AND ct.UserID='$UserID'");
|
||||
WHERE Deleted = '0'
|
||||
AND ct.UserID = '$UserID'");
|
||||
list($NumCollageContribs) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(DISTINCT GroupID) FROM torrents WHERE UserID = '$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(DISTINCT GroupID)
|
||||
FROM torrents
|
||||
WHERE UserID = '$UserID'");
|
||||
list($UniqueGroups) = $DB->next_record();
|
||||
|
||||
$DB->query("
|
||||
@ -220,8 +239,11 @@
|
||||
<a href="torrents.php?type=downloaded&userid=<?=$UserID?>" class="brackets" title="View">View</a>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override=check_paranoia_here('invitedcount'))) {
|
||||
$DB->query("SELECT COUNT(UserID) FROM users_info WHERE Inviter='$UserID'");
|
||||
if (($Override = check_paranoia_here('invitedcount'))) {
|
||||
$DB->query("
|
||||
SELECT COUNT(UserID)
|
||||
FROM users_info
|
||||
WHERE Inviter = '$UserID'");
|
||||
list($Invited) = $DB->next_record();
|
||||
?>
|
||||
<li>Invited: <?=number_format($Invited)?></li>
|
||||
|
@ -2,19 +2,31 @@
|
||||
authorize();
|
||||
|
||||
$InviteKey = db_string($_GET['invite']);
|
||||
$DB->query("SELECT InviterID FROM invites WHERE InviteKey='$InviteKey'");
|
||||
$DB->query("
|
||||
SELECT InviterID
|
||||
FROM invites
|
||||
WHERE InviteKey='$InviteKey'");
|
||||
list($UserID) = $DB->next_record();
|
||||
if ($DB->record_count() == 0 || $UserID!=$LoggedUser['ID']) {
|
||||
if ($DB->record_count() == 0 || $UserID != $LoggedUser['ID']) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
$DB->query("DELETE FROM invites WHERE InviteKey='$InviteKey'");
|
||||
$DB->query("
|
||||
DELETE FROM invites
|
||||
WHERE InviteKey = '$InviteKey'");
|
||||
|
||||
if (!check_perms('site_send_unlimited_invites')) {
|
||||
$DB->query("SELECT Invites FROM users_main WHERE ID = ".$UserID." LIMIT 1");
|
||||
$DB->query("
|
||||
SELECT Invites
|
||||
FROM users_main
|
||||
WHERE ID = $UserID
|
||||
LIMIT 1");
|
||||
list($Invites) = $DB->next_record();
|
||||
if ($Invites < 10) {
|
||||
$DB->query("UPDATE users_main SET Invites=Invites+1 WHERE ID='$UserID'");
|
||||
$DB->query("
|
||||
UPDATE users_main
|
||||
SET Invites = Invites + 1
|
||||
WHERE ID = '$UserID'");
|
||||
$Cache->begin_transaction('user_info_heavy_'.$UserID);
|
||||
$Cache->update_row(false, array('Invites'=>'+1'));
|
||||
$Cache->commit_transaction(0);
|
||||
|
@ -8,7 +8,10 @@
|
||||
$Sneaky = true;
|
||||
} else {
|
||||
if (!$UserCount = $Cache->get_value('stats_user_count')) {
|
||||
$DB->query("SELECT COUNT(ID) FROM users_main WHERE Enabled='1'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM users_main
|
||||
WHERE Enabled = '1'");
|
||||
list($UserCount) = $DB->next_record();
|
||||
$Cache->cache_value('stats_user_count', $UserCount, 0);
|
||||
}
|
||||
@ -21,7 +24,11 @@
|
||||
list($UserID, $Username, $PermissionID) = array_values(Users::user_info($UserID));
|
||||
|
||||
|
||||
$DB->query("SELECT InviteKey, Email, Expires FROM invites WHERE InviterID='$UserID' ORDER BY Expires");
|
||||
$DB->query("
|
||||
SELECT InviteKey, Email, Expires
|
||||
FROM invites
|
||||
WHERE InviterID = '$UserID'
|
||||
ORDER BY Expires");
|
||||
$Pending = $DB->to_array();
|
||||
|
||||
$OrderWays = array('username', 'email', 'joined', 'lastseen', 'uploaded', 'downloaded', 'ratio');
|
||||
@ -73,17 +80,18 @@
|
||||
|
||||
$CurrentURL = Format::get_url(array('action', 'order', 'sort'));
|
||||
|
||||
$DB->query("SELECT
|
||||
ID,
|
||||
Email,
|
||||
Uploaded,
|
||||
Downloaded,
|
||||
JoinDate,
|
||||
LastAccess
|
||||
$DB->query("
|
||||
SELECT
|
||||
ID,
|
||||
Email,
|
||||
Uploaded,
|
||||
Downloaded,
|
||||
JoinDate,
|
||||
LastAccess
|
||||
FROM users_main as um
|
||||
LEFT JOIN users_info AS ui ON ui.UserID=um.ID
|
||||
WHERE ui.Inviter='$UserID'
|
||||
ORDER BY ".$OrderBy." ".$CurrentSort);
|
||||
LEFT JOIN users_info AS ui ON ui.UserID=um.ID
|
||||
WHERE ui.Inviter = '$UserID'
|
||||
ORDER BY $OrderBy $CurrentSort");
|
||||
|
||||
$Invited = $DB->to_array();
|
||||
|
||||
@ -111,7 +119,10 @@
|
||||
-Cannot 'invite always' and the user limit is reached
|
||||
*/
|
||||
|
||||
$DB->query("SELECT can_leech FROM users_main WHERE ID = ".$UserID);
|
||||
$DB->query("
|
||||
SELECT can_leech
|
||||
FROM users_main
|
||||
WHERE ID = $UserID");
|
||||
list($CanLeech) = $DB->next_record();
|
||||
|
||||
if (!$Sneaky
|
||||
@ -144,12 +155,12 @@
|
||||
</div>
|
||||
<?
|
||||
} elseif (!empty($LoggedUser['DisableInvites'])) { ?>
|
||||
<div class="box pad" style="text-align: center">
|
||||
<div class="box pad" style="text-align: center;">
|
||||
<strong class="important_text">Your invites have been disabled. Please read <a href="wiki.php?action=article&id=310">this article</a> for more information.</strong>
|
||||
</div>
|
||||
<?
|
||||
} elseif ($LoggedUser['RatioWatch'] || !$CanLeech) { ?>
|
||||
<div class="box pad" style="text-align:center">
|
||||
<div class="box pad" style="text-align: center;">
|
||||
<strong class="important_text">You may not send invites while on Ratio Watch or while your leeching privileges are disabled. Please read <a href="wiki.php?action=article&id=310">this article</a> for more information.</strong>
|
||||
</div>
|
||||
<?
|
||||
@ -169,7 +180,7 @@
|
||||
$Row = 'a';
|
||||
foreach ($Pending as $Invite) {
|
||||
list($InviteKey, $Email, $Expires) = $Invite;
|
||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||
$Row = (($Row == 'a') ? 'b' : 'a');
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td><?=display_str($Email)?></td>
|
||||
@ -199,13 +210,13 @@
|
||||
$Row = 'a';
|
||||
foreach ($Invited as $User) {
|
||||
list($ID, $Email, $Uploaded, $Downloaded, $JoinDate, $LastAccess) = $User;
|
||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||
$Row = (($Row == 'a') ? 'b' : 'a');
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td><?=Users::format_username($ID, true, true, true, true)?></td>
|
||||
<td><?=display_str($Email)?></td>
|
||||
<td><?=time_diff($JoinDate,1)?></td>
|
||||
<td><?=time_diff($LastAccess,1);?></td>
|
||||
<td><?=time_diff($JoinDate, 1)?></td>
|
||||
<td><?=time_diff($LastAccess, 1);?></td>
|
||||
<td><?=Format::get_size($Uploaded)?></td>
|
||||
<td><?=Format::get_size($Downloaded)?></td>
|
||||
<td><?=Format::get_ratio_html($Uploaded, $Downloaded)?></td>
|
||||
|
@ -8,7 +8,10 @@
|
||||
$Sneaky = true;
|
||||
} else {
|
||||
if (!$UserCount = $Cache->get_value('stats_user_count')) {
|
||||
$DB->query("SELECT COUNT(ID) FROM users_main WHERE Enabled='1'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM users_main
|
||||
WHERE Enabled = '1'");
|
||||
list($UserCount) = $DB->next_record();
|
||||
$Cache->cache_value('stats_user_count', $UserCount, 0);
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?
|
||||
//Include Last.fm in the user sidebar only if a Last.fm username is specified.
|
||||
$DB->query("SELECT username FROM lastfm_users WHERE ID = '$UserID'");
|
||||
$DB->query("
|
||||
SELECT username
|
||||
FROM lastfm_users
|
||||
WHERE ID = '$UserID'");
|
||||
if ($DB->record_count()) {
|
||||
list($LastFMUsername) = $DB->next_record();
|
||||
$LastFMInfo = LastFM::get_user_info($LastFMUsername);
|
||||
|
@ -138,7 +138,10 @@ function dupe_comments($GroupID, $Comments) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$DB->query("SELECT SHA1(Comments) AS CommentHash FROM dupe_groups WHERE ID = $GroupID");
|
||||
$DB->query("
|
||||
SELECT SHA1(Comments) AS CommentHash
|
||||
FROM dupe_groups
|
||||
WHERE ID = $GroupID");
|
||||
list($OldCommentHash) = $DB->next_record();
|
||||
if ($OldCommentHash != sha1($Comments)) {
|
||||
$AdminComment = sqltime()." - Linked accounts updated: Comments updated by ".$LoggedUser['Username'];
|
||||
|
@ -16,7 +16,10 @@
|
||||
case 'update':
|
||||
if ($_REQUEST['target']) {
|
||||
$Target = $_REQUEST['target'];
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username LIKE '".db_string($Target)."'");
|
||||
$DB->query("
|
||||
SELECT ID
|
||||
FROM users_main
|
||||
WHERE Username LIKE '".db_string($Target)."'");
|
||||
if (list($TargetID) = $DB->next_record()) {
|
||||
link_users($UserID, $TargetID);
|
||||
} else {
|
||||
@ -24,7 +27,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("SELECT GroupID FROM users_dupes WHERE UserID = '$UserID'");
|
||||
$DB->query("
|
||||
SELECT GroupID
|
||||
FROM users_dupes
|
||||
WHERE UserID = '$UserID'");
|
||||
list($GroupID) = $DB->next_record();
|
||||
|
||||
if ($_REQUEST['dupecomments'] && $GroupID) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
if (!check_perms('site_torrents_notify')) {
|
||||
error(403);
|
||||
}
|
||||
View::show_header('Manage notifications');
|
||||
View::show_header('Manage notifications', 'jquery,jquery.validate,form_validate');
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
@ -92,7 +92,7 @@
|
||||
<a href="#" onclick="$('#filter_<?=$N['ID']?>').toggle(); return false;" class="brackets">Show</a>
|
||||
</h3>
|
||||
<? } ?>
|
||||
<form class="<?=($NewFilter ? 'create_form' : 'edit_form')?>" name="notification" action="user.php" method="post">
|
||||
<form class="<?=($NewFilter ? 'create_form' : 'edit_form')?>" id="<?=($NewFilter ? 'filter_form' : '')?>" name="notification" action="user.php" method="post">
|
||||
<input type="hidden" name="formid" value="<?=$i?>" />
|
||||
<input type="hidden" name="action" value="notify_handle" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
@ -104,7 +104,7 @@
|
||||
<tr>
|
||||
<td class="label"><strong>Notification filter name</strong></td>
|
||||
<td>
|
||||
<input type="text" name="label<?=$i?>" style="width: 100%;" />
|
||||
<input type="text" class="required" name="label<?=$i?>" style="width: 100%;" />
|
||||
<p class="min_padding">A name for the notification filter set to tell different filters apart.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
list($UserID, $Username, $PermissionID) = array_values(Users::user_info($_REQUEST['userid']));
|
||||
|
||||
$DB->query("SELECT
|
||||
u.CustomPermissions
|
||||
$DB->query("
|
||||
SELECT u.CustomPermissions
|
||||
FROM users_main AS u
|
||||
WHERE u.ID='$UserID'");
|
||||
|
||||
@ -40,7 +40,10 @@
|
||||
$Cache->begin_transaction('user_info_heavy_'.$UserID);
|
||||
$Cache->update_row(false, array('CustomPermissions' => $Delta));
|
||||
$Cache->commit_transaction(0);
|
||||
$DB->query("UPDATE users_main SET CustomPermissions='".db_string(serialize($Delta))."' WHERE ID='$UserID'");
|
||||
$DB->query("
|
||||
UPDATE users_main
|
||||
SET CustomPermissions = '".db_string(serialize($Delta))."'
|
||||
WHERE ID = '$UserID'");
|
||||
} elseif (!empty($Customs)) {
|
||||
$Delta = unserialize($Customs);
|
||||
}
|
||||
@ -50,15 +53,15 @@
|
||||
|
||||
function display_perm($Key,$Title) {
|
||||
global $Defaults, $Permissions;
|
||||
$Perm='<input id="default_'.$Key.'" type="checkbox" disabled="disabled"';
|
||||
$Perm = '<input id="default_'.$Key.'" type="checkbox" disabled="disabled"';
|
||||
if (isset($Defaults[$Key]) && $Defaults[$Key]) {
|
||||
$Perm.=' checked="checked"';
|
||||
$Perm.= ' checked="checked"';
|
||||
}
|
||||
$Perm.=' /><input type="checkbox" name="perm_'.$Key.'" id="'.$Key.'" value="1"';
|
||||
$Perm.= ' /><input type="checkbox" name="perm_'.$Key.'" id="'.$Key.'" value="1"';
|
||||
if (isset($Permissions[$Key]) && $Permissions[$Key]) {
|
||||
$Perm.=' checked="checked"';
|
||||
$Perm.= ' checked="checked"';
|
||||
}
|
||||
$Perm.=' /> <label for="'.$Key.'">'.$Title.'</label><br />';
|
||||
$Perm.= ' /> <label for="'.$Key.'">'.$Title.'</label><br />';
|
||||
echo $Perm;
|
||||
}
|
||||
|
||||
@ -82,7 +85,7 @@ function reset() {
|
||||
</div>
|
||||
</div>
|
||||
<div class="box pad">
|
||||
Before using permissions, please understand that it allows you to both add and remove access to specific features. If you think that to add access to a feature, you need to uncheck everything else, <strong>YOU ARE WRONG</strong>. The checkmarks on the left, which are grayed out, are the standard permissions granted by their class (and donor/artist status), any changes you make to the right side will overwrite this. It's not complicated, and if you screw up, click the defaults link at the top. It will reset the user to their respective features granted by class, then you can check or uncheck the one or two things you want to change. <strong>DO NOT UNCHECK EVERYTHING.</strong> If you need further clarification, ask a developer before using this tool.
|
||||
Before using permissions, please understand that it allows you to both add and remove access to specific features. If you think that to add access to a feature, you need to uncheck everything else, <strong>YOU ARE WRONG</strong>. The checkmarks on the left, which are grayed out, are the standard permissions granted by their class (and donor/artist status). Any changes you make to the right side will overwrite this. It's not complicated, and if you screw up, click the defaults link at the top. It will reset the user to their respective features granted by class, then you can check or uncheck the one or two things you want to change. <strong>DO NOT UNCHECK EVERYTHING.</strong> If you need further clarification, ask a developer before using this tool.
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
@ -27,12 +27,13 @@
|
||||
|
||||
$UserSessions = $Cache->get_value('users_sessions_'.$UserID);
|
||||
if (!is_array($UserSessions)) {
|
||||
$DB->query("SELECT
|
||||
SessionID,
|
||||
Browser,
|
||||
OperatingSystem,
|
||||
IP,
|
||||
LastUpdate
|
||||
$DB->query("
|
||||
SELECT
|
||||
SessionID,
|
||||
Browser,
|
||||
OperatingSystem,
|
||||
IP,
|
||||
LastUpdate
|
||||
FROM users_sessions
|
||||
WHERE UserID='$UserID'
|
||||
ORDER BY LastUpdate DESC");
|
||||
|
@ -122,15 +122,21 @@
|
||||
// End building $Paranoia
|
||||
|
||||
|
||||
//Email change
|
||||
$DB->query("SELECT Email FROM users_main WHERE ID=".$UserID);
|
||||
// Email change
|
||||
$DB->query("
|
||||
SELECT Email
|
||||
FROM users_main
|
||||
WHERE ID=".$UserID);
|
||||
list($CurEmail) = $DB->next_record();
|
||||
if ($CurEmail != $_POST['email']) {
|
||||
if (!check_perms('users_edit_profiles')) { // Non-admins have to authenticate to change email
|
||||
$DB->query("SELECT PassHash,Secret FROM users_main WHERE ID='".db_string($UserID)."'");
|
||||
$DB->query("
|
||||
SELECT PassHash, Secret
|
||||
FROM users_main
|
||||
WHERE ID='".db_string($UserID)."'");
|
||||
list($PassHash,$Secret)=$DB->next_record();
|
||||
if (!Users::check_password($_POST['cur_pass'], $PassHash, $Secret)) {
|
||||
$Err = "You did not enter the correct password.";
|
||||
$Err = 'You did not enter the correct password.';
|
||||
}
|
||||
}
|
||||
if (!$Err) {
|
||||
@ -244,14 +250,22 @@
|
||||
|
||||
$LastFMUsername = db_string($_POST['lastfm_username']);
|
||||
$OldLastFMUsername = '';
|
||||
$DB->query("SELECT username FROM lastfm_users WHERE ID = '$UserID'");
|
||||
$DB->query("
|
||||
SELECT username
|
||||
FROM lastfm_users
|
||||
WHERE ID = '$UserID'");
|
||||
if ($DB->record_count() > 0) {
|
||||
list($OldLastFMUsername) = $DB->next_record();
|
||||
if ($OldLastFMUsername != $LastFMUsername) {
|
||||
if (empty($LastFMUsername)) {
|
||||
$DB->query("DELETE FROM lastfm_users WHERE ID = '$UserID'");
|
||||
$DB->query("
|
||||
DELETE FROM lastfm_users
|
||||
WHERE ID = '$UserID'");
|
||||
} else {
|
||||
$DB->query("UPDATE lastfm_users SET Username = '$LastFMUsername' WHERE ID = '$UserID'");
|
||||
$DB->query("
|
||||
UPDATE lastfm_users
|
||||
SET Username = '$LastFMUsername'
|
||||
WHERE ID = '$UserID'");
|
||||
}
|
||||
}
|
||||
} elseif (!empty($LastFMUsername)) {
|
||||
@ -297,9 +311,8 @@
|
||||
i.DownloadAlt='$DownloadAlt',
|
||||
i.UnseededAlerts='$UnseededAlerts',
|
||||
m.Email='".db_string($_POST['email'])."',
|
||||
m.IRCKey='".db_string($_POST['irckey'])."',";
|
||||
|
||||
$SQL .= "m.Paranoia='".db_string(serialize($Paranoia))."'";
|
||||
m.IRCKey='".db_string($_POST['irckey'])."',
|
||||
m.Paranoia='".db_string(serialize($Paranoia))."'";
|
||||
|
||||
if ($ResetPassword) {
|
||||
$ChangerIP = db_string($LoggedUser['IP']);
|
||||
|
@ -233,14 +233,19 @@
|
||||
$Cache->delete_value('enabled_'.$UserID);
|
||||
|
||||
if ($_POST['LogOut']) {
|
||||
$DB->query("SELECT SessionID FROM users_sessions WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT SessionID
|
||||
FROM users_sessions
|
||||
WHERE UserID='$UserID'");
|
||||
while (list($SessionID) = $DB->next_record()) {
|
||||
$Cache->delete_value('session_'.$UserID.'_'.$SessionID);
|
||||
}
|
||||
$Cache->delete_value('users_sessions_'.$UserID);
|
||||
|
||||
|
||||
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
DELETE FROM users_sessions
|
||||
WHERE UserID='$UserID'");
|
||||
|
||||
}
|
||||
}
|
||||
@ -288,7 +293,11 @@
|
||||
$LightUpdates['PermissionID'] = $Class;
|
||||
$DeleteKeys = true;
|
||||
|
||||
$DB->query("SELECT DISTINCT DisplayStaff FROM permissions WHERE ID = $Class OR ID = ".$ClassLevels[$Cur['Class']]['ID']);
|
||||
$DB->query("
|
||||
SELECT DISTINCT DisplayStaff
|
||||
FROM permissions
|
||||
WHERE ID = $Class
|
||||
OR ID = ".$ClassLevels[$Cur['Class']]['ID']);
|
||||
if ($DB->record_count() == 2) {
|
||||
if ($Classes[$Class]['Level'] < $Cur['Class']) {
|
||||
$SupportFor = '';
|
||||
@ -427,7 +436,10 @@
|
||||
Misc::send_pm($UserID, 0, 'Your warning has been extended', "Your warning has been extended by $ExtendWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
|
||||
|
||||
$UpdateSet[] = "Warned=Warned + INTERVAL $ExtendWarning WEEK";
|
||||
$DB->query("SELECT Warned + INTERVAL $ExtendWarning WEEK FROM users_info WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT Warned + INTERVAL $ExtendWarning WEEK
|
||||
FROM users_info
|
||||
WHERE UserID='$UserID'");
|
||||
list($WarnedUntil) = $DB->next_record();
|
||||
$Msg = "warning extended by $ExtendWarning $Weeks to $WarnedUntil";
|
||||
if ($WarnReason) {
|
||||
@ -440,7 +452,10 @@
|
||||
$Weeks = 'week' . (($ReduceWarning == 1) ? '' : 's');
|
||||
Misc::send_pm($UserID, 0, 'Your warning has been reduced', "Your warning has been reduced by $ReduceWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason");
|
||||
$UpdateSet[] = "Warned=Warned - INTERVAL $ReduceWarning WEEK";
|
||||
$DB->query("SELECT Warned - INTERVAL $ReduceWarning WEEK FROM users_info WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT Warned - INTERVAL $ReduceWarning WEEK
|
||||
FROM users_info
|
||||
WHERE UserID='$UserID'");
|
||||
list($WarnedUntil) = $DB->next_record();
|
||||
$Msg = "warning reduced by $ReduceWarning $Weeks to $WarnedUntil";
|
||||
if ($WarnReason) {
|
||||
@ -648,7 +663,10 @@
|
||||
}
|
||||
|
||||
if ($MergeStatsFrom && check_perms('users_edit_ratio')) {
|
||||
$DB->query("SELECT ID, Uploaded, Downloaded FROM users_main WHERE Username LIKE '".$MergeStatsFrom."'");
|
||||
$DB->query("
|
||||
SELECT ID, Uploaded, Downloaded
|
||||
FROM users_main
|
||||
WHERE Username LIKE '$MergeStatsFrom'");
|
||||
if ($DB->record_count() > 0) {
|
||||
list($MergeID, $MergeUploaded, $MergeDownloaded) = $DB->next_record();
|
||||
$DB->query("
|
||||
@ -657,11 +675,11 @@
|
||||
SET
|
||||
um.Uploaded = 0,
|
||||
um.Downloaded = 0,
|
||||
ui.AdminComment = CONCAT('".sqltime()." - Stats (Uploaded: ".Format::get_size($MergeUploaded).", Downloaded: ".Format::get_size($MergeDownloaded).", Ratio: ".Format::get_ratio($MergeUploaded, $MergeDownloaded).") merged into https://".SSL_SITE_URL."/user.php?id=".$UserID." (".$Cur['Username'].") by ".$LoggedUser['Username']."\n\n', ui.AdminComment)
|
||||
ui.AdminComment = CONCAT('".sqltime()." - Stats (Uploaded: ".Format::get_size($MergeUploaded).", Downloaded: ".Format::get_size($MergeDownloaded).", Ratio: ".Format::get_ratio($MergeUploaded, $MergeDownloaded).") merged into https://".SSL_SITE_URL."/user.php?id=$UserID (".$Cur['Username'].") by ".$LoggedUser['Username']."\n\n', ui.AdminComment)
|
||||
WHERE ID = ".$MergeID);
|
||||
$UpdateSet[] = "Uploaded = Uploaded + '$MergeUploaded'";
|
||||
$UpdateSet[] = "Downloaded = Downloaded + '$MergeDownloaded'";
|
||||
$EditSummary[] = "stats merged from https://".SSL_SITE_URL."/user.php?id=".$MergeID." (".$MergeStatsFrom.") (previous stats: Uploaded: ".Format::get_size($Cur['Uploaded']).", Downloaded: ".Format::get_size($Cur['Downloaded']).", Ratio: ".Format::get_ratio($Cur['Uploaded'], $Cur['Downloaded']).")";
|
||||
$EditSummary[] = "stats merged from https://".SSL_SITE_URL."/user.php?id=$MergeID ($MergeStatsFrom) (previous stats: Uploaded: ".Format::get_size($Cur['Uploaded']).", Downloaded: ".Format::get_size($Cur['Downloaded']).", Ratio: ".Format::get_ratio($Cur['Uploaded'], $Cur['Downloaded']).")";
|
||||
$Cache->delete_value('users_stats_'.$UserID);
|
||||
$Cache->delete_value('users_stats_'.$MergeID);
|
||||
}
|
||||
@ -676,14 +694,19 @@
|
||||
$Cache->delete_value('user_stats_'.$UserID);
|
||||
$Cache->delete_value('enabled_'.$UserID);
|
||||
|
||||
$DB->query("SELECT SessionID FROM users_sessions WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT SessionID
|
||||
FROM users_sessions
|
||||
WHERE UserID='$UserID'");
|
||||
while (list($SessionID) = $DB->next_record()) {
|
||||
$Cache->delete_value('session_'.$UserID.'_'.$SessionID);
|
||||
}
|
||||
$Cache->delete_value('users_sessions_'.$UserID);
|
||||
|
||||
|
||||
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
DELETE FROM users_sessions
|
||||
WHERE UserID = '$UserID'");
|
||||
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,11 @@ function check_paranoia_here($Setting) {
|
||||
<? if (!$OwnProfile) { ?>
|
||||
<a href="inbox.php?action=compose&to=<?=$UserID?>" class="brackets">Send message</a>
|
||||
<?
|
||||
$DB->query("SELECT FriendID FROM friends WHERE UserID='$LoggedUser[ID]' AND FriendID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT FriendID
|
||||
FROM friends
|
||||
WHERE UserID='$LoggedUser[ID]'
|
||||
AND FriendID='$UserID'");
|
||||
if ($DB->record_count() == 0) { ?>
|
||||
<a href="friends.php?action=add&friendid=<?=$UserID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Add to friends</a>
|
||||
<? } ?>
|
||||
@ -299,14 +303,20 @@ function check_paranoia_here($Setting) {
|
||||
}
|
||||
|
||||
if (check_paranoia_here('uploads+')) {
|
||||
$DB->query("SELECT COUNT(ID) FROM torrents WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM torrents
|
||||
WHERE UserID = '$UserID'");
|
||||
list($Uploads) = $DB->next_record();
|
||||
} else {
|
||||
$Uploads = 0;
|
||||
}
|
||||
|
||||
if (check_paranoia_here('artistsadded')) {
|
||||
$DB->query("SELECT COUNT(ta.ArtistID) FROM torrents_artists AS ta WHERE ta.UserID = ".$UserID);
|
||||
$DB->query("
|
||||
SELECT COUNT(ta.ArtistID)
|
||||
FROM torrents_artists AS ta
|
||||
WHERE ta.UserID = $UserID");
|
||||
list($ArtistsAdded) = $DB->next_record();
|
||||
} else {
|
||||
$ArtistsAdded = 0;
|
||||
@ -362,20 +372,36 @@ function check_paranoia_here($Setting) {
|
||||
</div>
|
||||
<?
|
||||
if (check_perms('users_mod', $Class) || check_perms('users_view_ips',$Class) || check_perms('users_view_keys',$Class)) {
|
||||
$DB->query("SELECT COUNT(*) FROM users_history_passwords WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(*)
|
||||
FROM users_history_passwords
|
||||
WHERE UserID = '$UserID'");
|
||||
list($PasswordChanges) = $DB->next_record();
|
||||
if (check_perms('users_view_keys',$Class)) {
|
||||
$DB->query("SELECT COUNT(*) FROM users_history_passkeys WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(*)
|
||||
FROM users_history_passkeys
|
||||
WHERE UserID = '$UserID'");
|
||||
list($PasskeyChanges) = $DB->next_record();
|
||||
}
|
||||
if (check_perms('users_view_ips',$Class)) {
|
||||
$DB->query("SELECT COUNT(DISTINCT IP) FROM users_history_ips WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(DISTINCT IP)
|
||||
FROM users_history_ips
|
||||
WHERE UserID = '$UserID'");
|
||||
list($IPChanges) = $DB->next_record();
|
||||
$DB->query("SELECT COUNT(DISTINCT IP) FROM xbt_snatched WHERE uid='$UserID' AND IP != ''");
|
||||
$DB->query("
|
||||
SELECT COUNT(DISTINCT IP)
|
||||
FROM xbt_snatched
|
||||
WHERE uid = '$UserID'
|
||||
AND IP != ''");
|
||||
list($TrackerIPs) = $DB->next_record();
|
||||
}
|
||||
if (check_perms('users_view_email',$Class)) {
|
||||
$DB->query("SELECT COUNT(*) FROM users_history_emails WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT COUNT(*)
|
||||
FROM users_history_emails
|
||||
WHERE UserID = '$UserID'");
|
||||
list($EmailChanges) = $DB->next_record();
|
||||
}
|
||||
?>
|
||||
@ -464,15 +490,18 @@ function check_paranoia_here($Setting) {
|
||||
<? }
|
||||
if (check_perms('users_view_invites')) {
|
||||
if (!$InviterID) {
|
||||
$Invited='<span style="font-style: italic;">Nobody</span>';
|
||||
$Invited = '<span style="font-style: italic;">Nobody</span>';
|
||||
} else {
|
||||
$Invited='<a href="user.php?id='.$InviterID.'">'.$InviterName.'</a>';
|
||||
$Invited = '<a href="user.php?id='.$InviterID.'">'.$InviterName.'</a>';
|
||||
}
|
||||
|
||||
?>
|
||||
<li>Invited by: <?=$Invited?></li>
|
||||
<li>Invites: <?
|
||||
$DB->query("SELECT count(InviterID) FROM invites WHERE InviterID = '$UserID'");
|
||||
$DB->query("
|
||||
SELECT count(InviterID)
|
||||
FROM invites
|
||||
WHERE InviterID = '$UserID'");
|
||||
list($Pending) = $DB->next_record();
|
||||
if ($DisableInvites) {
|
||||
echo 'X';
|
||||
@ -485,13 +514,19 @@ function check_paranoia_here($Setting) {
|
||||
}
|
||||
|
||||
if (!isset($SupportFor)) {
|
||||
$DB->query("SELECT SupportFor FROM users_info WHERE UserID = ".$LoggedUser['ID']);
|
||||
$DB->query("
|
||||
SELECT SupportFor
|
||||
FROM users_info
|
||||
WHERE UserID = ".$LoggedUser['ID']);
|
||||
list($SupportFor) = $DB->next_record();
|
||||
}
|
||||
if ($Override = check_perms('users_mod') || $OwnProfile || !empty($SupportFor)) {
|
||||
?>
|
||||
<li <?=($Override === 2 || $SupportFor ? 'class="paranoia_override"' : '')?>>Clients: <?
|
||||
$DB->query("SELECT DISTINCT useragent FROM xbt_files_users WHERE uid = ".$UserID);
|
||||
<li<?=(($Override === 2 || $SupportFor) ? ' class="paranoia_override"' : '')?>>Clients: <?
|
||||
$DB->query("
|
||||
SELECT DISTINCT useragent
|
||||
FROM xbt_files_users
|
||||
WHERE uid = $UserID");
|
||||
$Clients = $DB->collect(0);
|
||||
echo implode('; ', $Clients);
|
||||
?></li>
|
||||
@ -506,21 +541,21 @@ function check_paranoia_here($Setting) {
|
||||
</div>
|
||||
<div class="main_column">
|
||||
<?
|
||||
if ($RatioWatchEnds!='0000-00-00 00:00:00'
|
||||
if ($RatioWatchEnds != '0000-00-00 00:00:00'
|
||||
&& (time() < strtotime($RatioWatchEnds))
|
||||
&& ($Downloaded*$RequiredRatio)>$Uploaded
|
||||
&& ($Downloaded * $RequiredRatio) > $Uploaded
|
||||
) {
|
||||
?>
|
||||
<div class="box">
|
||||
<div class="head">Ratio watch</div>
|
||||
<div class="pad">This user is currently on ratio watch and must upload <?=Format::get_size(($Downloaded*$RequiredRatio)-$Uploaded)?> in the next <?=time_diff($RatioWatchEnds)?>, or their leeching privileges will be revoked. Amount downloaded while on ratio watch: <?=Format::get_size($Downloaded-$RatioWatchDownload)?></div>
|
||||
<div class="pad">This user is currently on ratio watch and must upload <?=Format::get_size(($Downloaded * $RequiredRatio) - $Uploaded)?> in the next <?=time_diff($RatioWatchEnds)?>, or their leeching privileges will be revoked. Amount downloaded while on ratio watch: <?=Format::get_size($Downloaded - $RatioWatchDownload)?></div>
|
||||
</div>
|
||||
<? } ?>
|
||||
<div class="box">
|
||||
<div class="head">
|
||||
<span style="float: left;">Profile<? if ($CustomTitle) { ?> - </span>
|
||||
<span class="user_title"><? echo html_entity_decode($DisplayCustomTitle); } ?></span>
|
||||
<span style="float: right;"><?=(!empty($Badges) ? "$Badges " : '')?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
<span style="float: right;"><?=(!empty($Badges) ? "$Badges " : '')?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
</div>
|
||||
<div class="pad" id="profilediv">
|
||||
<? if (!$Info) { ?>
|
||||
@ -872,7 +907,10 @@ function check_paranoia_here($Setting) {
|
||||
|
||||
// Displays a table of forum warnings viewable only to Forum Moderators
|
||||
if ($LoggedUser['Class'] == 650 && check_perms('users_warn', $Class)) {
|
||||
$DB->query("SELECT Comment FROM users_warnings_forums WHERE UserID = '$UserID'");
|
||||
$DB->query("
|
||||
SELECT Comment
|
||||
FROM users_warnings_forums
|
||||
WHERE UserID = '$UserID'");
|
||||
list($ForumWarnings) = $DB->next_record();
|
||||
if ($DB->record_count() > 0) {
|
||||
?>
|
||||
|
@ -25,6 +25,11 @@
|
||||
$("#messageform").validate();
|
||||
}
|
||||
break;
|
||||
case "user":
|
||||
if(query['action'] == "notify") {
|
||||
$("#filter_form").validate();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1,103 +1,103 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* TableSorter 2.0 - Client-side table sorting with ease!
|
||||
* Version 2.0.5b
|
||||
* @requires jQuery v1.2.3
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2007 Christian Bach
|
||||
* Examples and docs at: http://tablesorter.com
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @description Create a sortable table with multi-column sorting capabilitys
|
||||
*
|
||||
*
|
||||
* @example $('table').tablesorter();
|
||||
* @desc Create a simple tablesorter interface.
|
||||
*
|
||||
*
|
||||
* @example $('table').tablesorter({ sortList:[[0,0],[1,0]] });
|
||||
* @desc Create a tablesorter interface and sort on the first and secound column column headers.
|
||||
*
|
||||
*
|
||||
* @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });
|
||||
*
|
||||
*
|
||||
* @desc Create a tablesorter interface and disableing the first and second column headers.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @example $('table').tablesorter({ headers: { 0: {sorter:"integer"}, 1: {sorter:"currency"} } });
|
||||
*
|
||||
*
|
||||
* @desc Create a tablesorter interface and set a column parser for the first
|
||||
* and second column.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param Object
|
||||
* settings An object literal containing key/value pairs to provide
|
||||
* optional settings.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @option String cssHeader (optional) A string of the class name to be appended
|
||||
* to sortable tr elements in the thead of the table. Default value:
|
||||
* "header"
|
||||
*
|
||||
*
|
||||
* @option String cssAsc (optional) A string of the class name to be appended to
|
||||
* sortable tr elements in the thead on a ascending sort. Default value:
|
||||
* "headerSortUp"
|
||||
*
|
||||
*
|
||||
* @option String cssDesc (optional) A string of the class name to be appended
|
||||
* to sortable tr elements in the thead on a descending sort. Default
|
||||
* value: "headerSortDown"
|
||||
*
|
||||
*
|
||||
* @option String sortInitialOrder (optional) A string of the inital sorting
|
||||
* order can be asc or desc. Default value: "asc"
|
||||
*
|
||||
*
|
||||
* @option String sortMultisortKey (optional) A string of the multi-column sort
|
||||
* key. Default value: "shiftKey"
|
||||
*
|
||||
*
|
||||
* @option String textExtraction (optional) A string of the text-extraction
|
||||
* method to use. For complex html structures inside td cell set this
|
||||
* option to "complex", on large tables the complex option can be slow.
|
||||
* Default value: "simple"
|
||||
*
|
||||
*
|
||||
* @option Object headers (optional) An array containing the forces sorting
|
||||
* rules. This option let's you specify a default sorting rule. Default
|
||||
* value: null
|
||||
*
|
||||
*
|
||||
* @option Array sortList (optional) An array containing the forces sorting
|
||||
* rules. This option let's you specify a default sorting rule. Default
|
||||
* value: null
|
||||
*
|
||||
*
|
||||
* @option Array sortForce (optional) An array containing forced sorting rules.
|
||||
* This option let's you specify a default sorting rule, which is
|
||||
* prepended to user-selected rules. Default value: null
|
||||
*
|
||||
*
|
||||
* @option Boolean sortLocaleCompare (optional) Boolean flag indicating whatever
|
||||
* to use String.localeCampare method or not. Default set to true.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @option Array sortAppend (optional) An array containing forced sorting rules.
|
||||
* This option let's you specify a default sorting rule, which is
|
||||
* appended to user-selected rules. Default value: null
|
||||
*
|
||||
*
|
||||
* @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter
|
||||
* should apply fixed widths to the table columns. This is usefull when
|
||||
* using the pager companion plugin. This options requires the dimension
|
||||
* jquery plugin. Default value: false
|
||||
*
|
||||
*
|
||||
* @option Boolean cancelSelection (optional) Boolean flag indicating if
|
||||
* tablesorter should cancel selection of the table headers text.
|
||||
* Default value: true
|
||||
*
|
||||
*
|
||||
* @option Boolean debug (optional) Boolean flag indicating if tablesorter
|
||||
* should display debuging information usefull for development.
|
||||
*
|
||||
*
|
||||
* @type jQuery
|
||||
*
|
||||
*
|
||||
* @name tablesorter
|
||||
*
|
||||
*
|
||||
* @cat Plugins/Tablesorter
|
||||
*
|
||||
*
|
||||
* @author Christian Bach/christian.bach@polyester.se
|
||||
*/
|
||||
|
||||
@ -347,7 +347,7 @@
|
||||
tableBody[0].appendChild(r[pos][j]);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,7 +381,7 @@
|
||||
}
|
||||
|
||||
var meta = ($.metadata) ? true : false;
|
||||
|
||||
|
||||
var header_index = computeTableHeaderCellIndexes(table);
|
||||
|
||||
$tableHeaders = $(table.config.selectorHeaders, table).each(function (index) {
|
||||
@ -389,8 +389,8 @@
|
||||
this.column = header_index[this.parentNode.rowIndex + "-" + this.cellIndex];
|
||||
// this.column = index;
|
||||
this.order = formatSortingOrder(table.config.sortInitialOrder);
|
||||
|
||||
|
||||
|
||||
|
||||
this.count = this.order;
|
||||
|
||||
if (checkHeaderMetadata(this) || checkHeaderOptions(table, index)) this.sortDisabled = true;
|
||||
@ -493,12 +493,12 @@
|
||||
};
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function checkHeaderOptionsSortingLocked(table, i) {
|
||||
if ((table.config.headers[i]) && (table.config.headers[i].lockedOrder)) return table.config.headers[i].lockedOrder;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function applyWidget(table) {
|
||||
var c = table.config.widgets;
|
||||
var l = c.length;
|
||||
@ -727,7 +727,7 @@
|
||||
this.order = this.count++ % 2;
|
||||
// always sort on the locked order.
|
||||
if(this.lockedOrder) this.order = this.lockedOrder;
|
||||
|
||||
|
||||
// user only whants to sort on one
|
||||
// column
|
||||
if (!e[config.sortMultiSortKey]) {
|
||||
@ -1028,4 +1028,4 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
@ -1025,15 +1025,17 @@ ul#artistcomplete {
|
||||
#lightbox {
|
||||
z-index: 1;
|
||||
position: fixed;
|
||||
top: 25%;
|
||||
top: 10%;
|
||||
left: 50%;
|
||||
width: 800px;
|
||||
height: 80%;
|
||||
margin-left: -400px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#lightbox img {
|
||||
max-width: 800px;
|
||||
max-height: 100%;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px #222;
|
||||
|
Loading…
Reference in New Issue
Block a user