Skip to content

Commit

Permalink
Empty commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Git committed Jun 9, 2013
1 parent 0c8d35e commit a06c4ea
Show file tree
Hide file tree
Showing 25 changed files with 461 additions and 158 deletions.
32 changes: 32 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
32 changes: 16 additions & 16 deletions classes/fonts/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand All @@ -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.



Expand All @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions classes/useragent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
18 changes: 18 additions & 0 deletions gazelle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions sections/inbox/takecompose.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@

$ConvID = Misc::send_pm($ToID, $LoggedUser['ID'], $Subject, $Body, $ConvID);



header('Location: ' . Inbox::get_inbox_link($LoggedUser['ListUnreadPMsFirst']));
?>
3 changes: 3 additions & 0 deletions sections/tools/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
98 changes: 98 additions & 0 deletions sections/tools/managers/label_aliases.php
Original file line number Diff line number Diff line change
@@ -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&amp;order=GoodLabels">Sort by Good Labels</a>]
[<a href="tools.php?action=label_aliases&amp;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(); ?>
2 changes: 2 additions & 0 deletions sections/tools/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 4 additions & 1 deletion sections/user/advancedsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
44 changes: 33 additions & 11 deletions sections/user/community_stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -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("
Expand Down Expand Up @@ -220,8 +239,11 @@
<a href="torrents.php?type=downloaded&amp;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>
Expand Down
Loading

0 comments on commit a06c4ea

Please sign in to comment.