Empty commit

This commit is contained in:
Git 2013-02-07 08:00:47 +00:00
parent b1324098d8
commit df129a5ba5
52 changed files with 396 additions and 412 deletions

View File

@ -138,20 +138,10 @@ protected function ip_check($IP,$Gline=false,$Channel=BOT_REPORT_CHAN) {
$this->send_raw('GLINE *@'.$IP.' 90d :DNSBL Proxy');
}
}
$IPBans = $Cache->get_value('ip_bans');
if(!is_array($IPBans)) {
$DB->query("SELECT FromIP, ToIP FROM ip_bans");
$IPBans = $DB->to_array();
$Cache->cache_value('ip_bans', $IPBans, 0);
}
foreach($IPBans as $IPBan) {
list($FromIP, $ToIP) = $IPBan;
$Long = ip2long($IP);
if($Long >= $FromIP && $Long <= $ToIP) {
$this->send_to($Channel, 'Site IP Ban Detected: '.$IP);
if ($Gline) {
$this->send_raw('GLINE *@'.$IP.' 90d :IP Ban');
}
if(Tools::site_ban_ip($IP)) {
$this->send_to($Channel, 'Site IP Ban Detected: '.$IP);
if ($Gline) {
$this->send_raw('GLINE *@'.$IP.' 90d :IP Ban');
}
}
}*/

View File

@ -623,7 +623,7 @@ private function to_html ($Array) {
$Str.='<a href="wiki.php?action=article&amp;name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>';
break;
case 'tex':
$Str.='<img style="vertical-align: middle" src="'.STATIC_SERVER.'blank.gif" onload="if (this.src.substr(this.src.length-9,this.src.length) == \'blank.gif\') { this.src = \'http://chart.apis.google.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&amp;chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" />';
$Str.='<img style="vertical-align: middle" src="'.STATIC_SERVER.'blank.gif" onload="if (this.src.substr(this.src.length-9,this.src.length) == \'blank.gif\') { this.src = \'http://chart.apis.google.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&amp;chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" alt="TeX" />';
break;
case 'plain':
$Str.=$Block['Val'];
@ -710,11 +710,11 @@ private function to_html ($Array) {
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
}
else {
$Str .= '<strong>Use of the [mature] tag requires a description.</strong> The correct format is as follows: <strong>[mature=description] ...content... [/mature]</strong>, where "description" is a mandatory description of the post. Misleading descriptions will be penalized. For further information on our mature content policies, please refer to this <a href="wiki.php?action=article&id=1063">wiki</a>.';
$Str .= '<strong>Use of the [mature] tag requires a description.</strong> The correct format is as follows: <strong>[mature=description] ...content... [/mature]</strong>, where "description" is a mandatory description of the post. Misleading descriptions will be penalized. For further information on our mature content policies, please refer to this <a href="wiki.php?action=article&amp;id=1063">wiki</a>.';
}
}
else {
$Str .= '<span class="mature_blocked" style="font-style:italic;"><a href="wiki.php?action=article&id=1063">Mature content </a>has been blocked. You can choose to view mature content by editing your <a href="user.php?action=edit&userid=' . $LoggedUser['ID'] . '">settings</a>.</span>';
$Str .= '<span class="mature_blocked" style="font-style:italic;"><a href="wiki.php?action=article&amp;id=1063">Mature content </a>has been blocked. You can choose to view mature content by editing your <a href="user.php?action=edit&amp;userid=' . $LoggedUser['ID'] . '">settings</a>.</span>';
}
break;
case 'img':

View File

@ -440,7 +440,7 @@ function to_html($Array) {
$Str.='<a href="wiki.php?action=article&amp;name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>';
break;
case 'tex':
$Str.='<img style="vertical-align: middle" src="'.STATIC_SERVER.'blank.gif" onload="if (this.src.substr(this.src.length-9,this.src.length) == \'blank.gif\') { this.src = \'http://chart.apis.google.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&amp;chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" />';
$Str.='<img style="vertical-align: middle" src="'.STATIC_SERVER.'blank.gif" onload="if (this.src.substr(this.src.length-9,this.src.length) == \'blank.gif\') { this.src = \'http://chart.apis.google.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&amp;chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" alt="TeX" />';
break;
case 'plain':
$Str.=$Block['Val'];

View File

@ -111,9 +111,9 @@
<form class="manage_form" name="messages" action="inbox.php" method="post" id="messageform">
<input type="hidden" name="action" value="masschange" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="submit" name="read" value="Mark as read" />&nbsp;
<input type="submit" name="unread" value="Mark as unread" />&nbsp;
<input type="submit" name="delete" value="Delete message(s)" />
<input type="submit" name="read" value="Mark as read" />&nbsp;
<input type="submit" name="unread" value="Mark as unread" />&nbsp;
<input type="submit" name="delete" value="Delete message(s)" />
<table class="message_table checkboxes">
<tr class="colhead">

View File

@ -310,7 +310,7 @@
</td>
</tr>
<tr id="logcue_tr" class="hidden">
<td class="label">Log / Cue (FLAC only)</td>
<td class="label">Log / Cue (CD FLAC only)</td>
<td>
<input type="checkbox" id="needlog" name="needlog" onchange="ToggleLogScore()" <?=(!empty($NeedLog) ? 'checked="checked" ' : '')?>/><label for="needlog"> Require Log</label>
<span id="minlogscore_span" class="hidden">&nbsp;<input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum Log Score</span>

View File

@ -325,7 +325,7 @@
</tr>
<? if(!empty($LogCue)) { ?>
<tr>
<td class="label">Required FLAC only extra(s)</td>
<td class="label">Required CD FLAC only extra(s)</td>
<td>
<?=$LogCue?>
</td>

View File

@ -165,7 +165,7 @@
}
if (($NeedCue || $NeedLog)) {
if (!empty($_POST['all_media']) || $MediaArray[0] != 0) {
if (!(empty($_POST['all_media']) && $MediaArray[0] == 0)) {
$Err = "Only CD is allowed as media for FLAC Log/Cue Requests.";
}
}

View File

@ -68,17 +68,17 @@
<li>
No requesting invites to any sites anywhere on the site or IRC. Invites may be <strong>offered</strong> in the invite forum, and nowhere else.
</li>
<li>
No language other than English is permitted in the forums. If we can't understand it, we can't moderate it.
</li>
<li>
Be cautious when posting mature content on the forums. All mature imagery must abide by <a href="wiki.php?action=article&id=1063">the rules found here</a>. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse.
No language other than English is permitted in the forums. If we can't understand it, we can't moderate it.
</li>
<li>
Mature content in posts must be properly tagged. The correct format is as follows: <strong>[mature=description] ...content... [/mature]</strong>, where “description” is a mandatory description of the post contents. Misleading or inadequate descriptions will be penalized.
Be cautious when posting mature content on the forums. All mature imagery must abide by <a href="wiki.php?action=article&amp;id=1063">the rules found here</a>. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse.
</li>
<li>
Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum youre posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests & Designs, The Laboratory. If you are in doubt about a posts appropriateness, send a <a href="staff.php">Staff PM to the Forum Moderators</a> and wait for a reply before proceeding.
Mature content in posts must be properly tagged. The correct format is as follows: <strong>[mature=description] ...content... [/mature]</strong>, where “description” is a mandatory description of the post contents. Misleading or inadequate descriptions will be penalized.
</li>
<li>
Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum youre posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests &amp; Designs, The Laboratory. If you are in doubt about a posts appropriateness, send a <a href="staff.php">Staff PM to the Forum Moderators</a> and wait for a reply before proceeding.
</li>
</ul>
</div>

View File

@ -16,7 +16,7 @@
<table cellpadding="5" cellspacing="1" border="0" class="border" width="100%">
<tr class="colhead">
<td style="width:150px;"><strong>Allowed Client</strong></td>
<!-- td style="width:400px;"><strong>Additional Notes</strong></td> -->
<!-- td style="width:400px;"><strong>Additional Notes</strong></td> -->
</tr>
<?
$Row = 'a';

View File

@ -35,7 +35,7 @@
Collages should not be used to create artist discographies, as the artist pages already exist for this purpose. However, for an artist who has a multitude of side projects, it is allowed to create a collage containing all of the projects, to be placed in the Discography category.
</li>
<li>
Power Users and Donors get one personal collage. Elites can have two, Torrent Masters can have up to three, Power TMs up to four and Elite TM+ up to five. Donors always receive one more than the class maximum.
Power Users and Donors get one personal collage. Elites can have two, Torrent Masters can have up to three, Power TMs up to four and Elite TM+ up to five. Donors always receive one more than the class maximum.
</li>
<li>
Every collage must have at least 3 torrent groups in it, except for collages of type "Label", "Personal", and "Staff Picks".

View File

@ -14,9 +14,9 @@
<li>One account per person per lifetime. Anyone creating additional accounts will be banned.</li>
<li>Avatars must not exceed 256 kB or be vertically longer than 400 pixels. Avatars must be safe for work, be entirely unoffensive, and cannot contain any nudity or religious imagery. Use common sense.</li>
<li>Do not post our .torrent files on other sites. Every .torrent file has your personal passkey embedded in it. The tracker will automatically disable your account if you share your torrent files with others. You will not get your account back. This doesn't prohibit you from sharing the content on other sites, but does prohibit you from sharing the .torrent file.</li>
<li>Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker, and will lead to your getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all What.CD torrents.</li>
<li>Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker, and will lead to your getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all What.CD torrents.</li>
<li>This is a torrent site which promotes sharing amongst the community. If you are not willing to give back to the community what you take from it, this site is not for you. In other words, we expect you to have an acceptable share ratio. If you download a torrent, please, seed the copy you have until there are sufficient people seeding the torrent data before you stop.</li>
<li>Do not browse the site using proxies or TOR. The site will automatically alert us. This includes VPNs with dynamic IP addresses.</li>
<li>Do not browse the site using proxies or TOR. The site will automatically alert us. This includes VPNs with dynamic IP addresses.</li>
<li>Asking for invites to any site is not allowed anywhere on What.CD or our IRC network. Invites may be offered in the Invites forum, and nowhere else.</li>
<li>Trading and selling invites is strictly prohibited, as is offering them in public - this includes on any forum which is not a class-restricted section on an invitation-only torrent site.</li>
<li>Trading, selling, sharing, or giving away your account is prohibited. If you no longer want your account, send a staff PM requesting that it be disabled.</li>

View File

@ -17,7 +17,7 @@ function get_fls() {
JOIN users_main AS m ON m.ID=i.UserID
JOIN permissions AS p ON p.ID=m.PermissionID
JOIN users_levels AS l ON l.UserID = i.UserID
WHERE l.PermissionID = 41");
WHERE l.PermissionID = ".FLS_TEAM);
$FLS = $DB->to_array(false, MYSQLI_BOTH, array(3,'Paranoia'));
$Cache->cache_value('fls', $FLS, 180);
}

View File

@ -23,7 +23,7 @@
<? print_compose_staff_pm(true); ?>
<br />
<h3>First-line Support</h3>
<p><strong>These users are not official staff members</strong> - they're users who have volunteered their time to help people in need. Please treat them with respect and read <a href="wiki.php?action=article&amp;id=260">this</a> before contacting them. </p>
<p><strong>These users are not official staff members</strong> - they're users who have volunteered their time to help people in need. Please treat them with respect and read <a href="wiki.php?action=article&amp;id=260">this</a> before contacting them.</p>
<table class="staff" width="100%">
<tr class="colhead">
<td style="width:130px;">Username</td>
@ -53,7 +53,7 @@
<div class="box pad" style="padding:0px 10px 10px 10px;">
<br />
<h3>Forum Moderators</h3>
<p>Forum Mods are users who have been promoted to help moderate the forums. They can only help with forum oriented questions</p>
<p>Forum Moderators are users who have been promoted to help moderate the forums. They can only help with forum-oriented questions.</p>
<table class="staff" width="100%">
<tr class="colhead">
<td style="width:130px;">Username</td>

View File

@ -89,7 +89,7 @@
<a href="staffpm.php?view=open">[Open]</a>
<a href="staffpm.php?view=resolved">[Resolved]</a>
<? if ($IsStaff) { ?>
<a href="staffpm.php?action=scoreboard">[Scoreboard]</a>
<a href="staffpm.php?action=scoreboard">[Scoreboard]</a>
<? } ?>
</div>
</div>

View File

@ -169,10 +169,10 @@
include('managers/official_tags.php');
break;
case 'tag_aliases':
include('managers/tag_aliases.php');
break;
case 'permissions':
case 'tag_aliases':
include('managers/tag_aliases.php');
break;
case 'permissions':
if (!check_perms('admin_manage_permissions')) { error(403); }
if (!empty($_REQUEST['id'])) {
@ -218,15 +218,15 @@
if (!$Err) {
if (!is_numeric($_REQUEST['id'])) {
$DB->query("INSERT INTO permissions (Level,Name,Secondary,PermittedForums,`Values`,DisplayStaff)
VALUES ('".db_string($Level)."',
'".db_string($Name)."',
VALUES ('".db_string($Level)."',
'".db_string($Name)."',
".$Secondary.",
'".db_string($Forums)."',
'".db_string(serialize($Values))."',
'".db_string($DisplayStaff)."')");
} else {
$DB->query("UPDATE permissions SET Level='".db_string($Level)."',
Name='".db_string($Name)."',
Name='".db_string($Name)."',
Secondary=".$Secondary.",
PermittedForums='".db_string($Forums)."',
`Values`='".db_string(serialize($Values))."',

View File

@ -4,10 +4,11 @@
if (isset($_POST['submit'])) {
authorize();
$IPA = substr($_POST['start'], 0, strcspn($_POST['start'], '.'));
if ($_POST['submit'] == 'Delete') { //Delete
if(!is_number($_POST['id']) || $_POST['id'] == ''){ error(0); }
$DB->query('DELETE FROM ip_bans WHERE ID='.$_POST['id']);
$Bans = $Cache->delete_value('ip_bans');
$Cache->delete_value('ip_bans_'.$IPA);
} else { //Edit & Create, Shared Validation
$Val->SetFields('start', '1','regex','You must include the starting IP address.',array('regex'=>'/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/i'));
$Val->SetFields('end', '1','regex','You must include the ending IP address.',array('regex'=>'/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/i'));
@ -28,19 +29,12 @@
ToIP='$End',
Reason='$Notes'
WHERE ID='".$_POST['id']."'");
$Bans = $Cache->get_value('ip_bans');
$Cache->begin_transaction();
$Cache->update_row($_POST['id'], array($_POST['id'], $Start, $End));
$Cache->commit_transaction();
} else { //Create
$DB->query("INSERT INTO ip_bans
(FromIP, ToIP, Reason) VALUES
('$Start','$End', '$Notes')");
$ID = $DB->inserted_id();
$Bans = $Cache->get_value('ip_bans');
$Bans[$ID] = array($ID, $Start, $End);
$Cache->cache_value('ip_bans', $Bans, 0);
}
$Cache->delete_value('ip_bans_'.$IPA);
}
}

View File

@ -1,22 +1,21 @@
<?php
if(!check_perms('admin_manage_ipbans')) { error(403); }
if(isset($_GET['perform'])) {
if($_GET['perform'] == 'delete') {
if(!is_number($_GET['id']) || $_GET['id'] == ''){ error(0); }
$DB->query('DELETE FROM ip_bans WHERE ID='.$_GET['id']);
$Bans = $Cache->delete_value('ip_bans');
}
elseif($_GET['perform'] == 'create') {
if (!check_perms('admin_manage_ipbans')) { error(403); }
if (isset($_GET['perform'])) {
$IPA = substr($_GET['ip'], 0, strcspn($_GET['ip'], '.'));
if ($_GET['perform'] == 'delete') {
if (!is_number($_GET['id']) || $_GET['id'] == '') {
error(0);
}
$DB->query('DELETE FROM ip_bans WHERE ID='.$_GET['id']);
$Bans = $Cache->delete_value('ip_bans_'.$IPA);
} elseif ($_GET['perform'] == 'create') {
$Notes = db_string($_GET['notes']);
$IP = Tools::ip_to_unsigned($_GET['ip']); //Sanitized by Validation regex
$DB->query("INSERT INTO ip_bans
(FromIP, ToIP, Reason) VALUES
('$IP','$IP', '$Notes')");
$ID = $DB->inserted_id();
$Bans = $Cache->get_value('ip_bans');
$Bans[$ID] = array($ID, $Start, $End);
$Cache->cache_value('ip_bans', $Bans, 0);
$IP = Tools::ip_to_unsigned($_GET['ip']); //Sanitized by Validation regex
$DB->query("INSERT INTO ip_bans
(FromIP, ToIP, Reason) VALUES
('$IP','$IP', '$Notes')");
$Cache->delete_value('ip_bans_'.$IPA);
}
}

View File

@ -14,9 +14,9 @@
$Tags = explode(',', $_POST['tagname']);
foreach($Tags as $TagName) {
$TagName = Misc::sanitize_tag($TagName);
if(!empty($TagName)) {
$TagName = Misc::get_alias_tag($TagName);
$TagName = Misc::get_alias_tag($TagName);
// Check DB for tag matching name
$DB->query("SELECT t.ID FROM tags AS t WHERE t.Name LIKE '".$TagName."'");
list($TagID) = $DB->next_record();

View File

@ -161,7 +161,7 @@
<td colspan="3">
<? if(!$GroupID) { ?>
<a href="log.php?search=Torrent+<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)
<? } else {?>
<? } else {?>
<?=$LinkName?>
<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>

View File

@ -3,8 +3,8 @@
enforce_login();
$TorrentPass = $LoggedUser['torrent_pass'];
$DownloadAlt = $LoggedUser['DownloadAlt'];
$UserID = $LoggedUser['ID'];
$AuthKey = $LoggedUser['AuthKey'];
$UserID = $LoggedUser['ID'];
$AuthKey = $LoggedUser['AuthKey'];
} else {
$UserInfo = $Cache->get_value('user_'.$_REQUEST['torrent_pass']);
if(!is_array($UserInfo)) {
@ -33,12 +33,12 @@
if (!is_number($TorrentID)){ error(0); }
/* uTorrent remote redownloads .torrent files every fifteen minutes
to prevent this retardation from blowing bandwidth etc., let's block it
if he's downloaded the .torrent file twice before */
to prevent this retardation from blowing bandwidth etc., let's block it
if he's downloaded the .torrent file twice before */
if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== FALSE) {
$DB->query("SELECT 1 FROM users_downloads WHERE UserID=$UserID AND TorrentID=$TorrentID LIMIT 3");
if ($DB->record_count() > 2) {
error('You have already downloaded this .torrent three times. If you need to download it again, please do so from your browser, not through uTorrent remote.');
error('You have already downloaded this .torrent three times. If you need to download it again, please do so from your browser, not through uTorrent remote.');
die();
}
}
@ -96,10 +96,10 @@
if (!Torrents::has_token($TorrentID)) {
if ($FLTokens <= 0) {
error("You do not have any freeleech tokens left. Please use the regular DL link.");
error("You do not have any freeleech tokens left. Please use the regular DL link.");
}
if ($Size >= 1073741824) {
error("This torrent is too large. Please use the regular DL link.");
error("This torrent is too large. Please use the regular DL link.");
}
// Let the tracker know about this

View File

@ -1,12 +1,12 @@
<?
//*********************************************************************//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// This page relies on the TORRENT_FORM class. All it does is call //
// the necessary functions. //
//---------------------------------------------------------------------//
// At the bottom, there are grouping functions which are off limits to //
// most members. //
//*********************************************************************//
//**********************************************************************//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// This page relies on the TORRENT_FORM class. All it does is call //
// the necessary functions. //
//----------------------------------------------------------------------//
// At the bottom, there are grouping functions which are off limits to //
// most members. //
//**********************************************************************//
require(SERVER_ROOT.'/classes/class_torrent_form.php');

View File

@ -55,19 +55,19 @@
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
<h3>Description</h3>
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea><br />
<? if($CategoryID == 1) { ?>
<? if($CategoryID == 1) { ?>
<select id="releasetype" name="releasetype">
<? foreach ($ReleaseTypes as $Key => $Val) { ?>
<? foreach ($ReleaseTypes as $Key => $Val) { ?>
<option value='<?=$Key?>' <?=($Key == $ReleaseType ? " selected='selected'" : '')?>>
<?=$Val?>
</option>
<? } ?>
<? } ?>
</select>
<? if (check_perms('torrents_edit_vanityhouse')) { ?>
<? if (check_perms('torrents_edit_vanityhouse')) { ?>
<br />
<h3>Vanity House <input type="checkbox" name="vanity_house" value="1" <?=($VanityHouse ? 'checked="checked"' : '')?> /></h3>
<? }
} ?>
<h3>Vanity House <input type="checkbox" name="vanity_house" value="1" <?=($VanityHouse ? 'checked="checked" ' : '')?>/></h3>
<? }
} ?>
<h3>Edit summary</h3>
<input type="text" name="summary" size="92" /><br />
<div style="text-align: center;">

View File

@ -357,12 +357,12 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) {
error(403);
}
break;
case 'warn' :
include(SERVER_ROOT.'/sections/torrents/warn.php');
break;
case 'take_warn' :
include(SERVER_ROOT.'/sections/torrents/take_warn.php');
break;
case 'warn' :
include(SERVER_ROOT.'/sections/torrents/warn.php');
break;
case 'take_warn' :
include(SERVER_ROOT.'/sections/torrents/take_warn.php');
break;
default:
enforce_login();

View File

@ -52,7 +52,7 @@
} else {
authorize();
// Votes ninjutsu. This is so annoyingly complicated.
// Votes ninjutsu. This is so annoyingly complicated.
// 1. Get a list of everybody who voted on the old group and clear their cache keys
$DB->query("SELECT UserID FROM users_votes WHERE GroupID='$GroupID'");
while (list($UserID) = $DB->next_record()) {
@ -64,12 +64,12 @@
$DB->query("DELETE FROM users_votes WHERE GroupID='$GroupID'");
$DB->query("INSERT INTO torrents_votes (GroupID, Ups, Total, Score)
SELECT $NewGroupID, UpVotes, TotalVotes, VoteScore
FROM (SELECT IFNULL(SUM(IF(Type='Up',1,0)),0) As UpVotes,
FROM (SELECT IFNULL(SUM(IF(Type='Up',1,0)),0) As UpVotes,
COUNT(1) AS TotalVotes,
binomial_ci(IFNULL(SUM(IF(Type='Up',1,0)),0), COUNT(1)) AS VoteScore
FROM users_votes
WHERE GroupID = $NewGroupID
GROUP BY GroupID) AS a
FROM users_votes
WHERE GroupID = $NewGroupID
GROUP BY GroupID) AS a
ON DUPLICATE KEY UPDATE
Ups = a.UpVotes,
Total = a.TotalVotes,
@ -126,4 +126,4 @@
header('Location: torrents.php?id='.$GroupID);
}
?>
?>

View File

@ -190,7 +190,7 @@ function header_link($SortKey, $DefaultWay = "desc") {
<div class="notify_filter_links">
<a href="javascript:GroupClear($('#notificationform_<?=$FilterID?>').raw())" class="brackets">Clear selected in filter</a>&nbsp;&nbsp;&nbsp;
<a href="torrents.php?action=notify_clear_filter&amp;filterid=<?=$FilterID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Clear all old in filter</a>&nbsp;&nbsp;&nbsp;
<a href="torrents.php?action=notify_catchup_filter&amp;filterid=<?=$FilterID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Mark all in filter as read</a>
<a href="torrents.php?action=notify_catchup_filter&amp;filterid=<?=$FilterID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Mark all in filter as read</a>
</div>
<form class="manage_form" name="torrents" id="notificationform_<?=$FilterID?>" action="">
<table class="torrent_table cats checkboxes border">

View File

@ -21,7 +21,7 @@
Torrents::update_hash($GroupID);
Misc::write_log("Torrent Group ".$GroupID." (".$OldName.") was renamed to '".$NewName."' by ".$LoggedUser['Username']);
Misc::write_log("Torrent Group ".$GroupID." (".$OldName.") was renamed to '".$NewName."' by ".$LoggedUser['Username']);
Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "renamed to ".$NewName." from ".$OldName, 0);
header('Location: torrents.php?id='.$GroupID);

View File

@ -1,9 +1,9 @@
<?
//******************************************************************************//
//--------------- Take edit ----------------------------------------------------//
// This pages handles the backend of the 'edit torrent' function. It checks //
// the data, and if it all validates, it edits the values in the database //
// that correspond to the torrent in question. //
// This pages handles the backend of the 'edit torrent' function. It checks //
// the data, and if it all validates, it edits the values in the database //
// that correspond to the torrent in question. //
//******************************************************************************//
enforce_login();
@ -17,8 +17,8 @@
//******************************************************************************//
//--------------- Set $Properties array ----------------------------------------//
// This is used if the form doesn't validate, and when the time comes to enter //
// it into the database. //
// This is used if the form doesn't validate, and when the time comes to enter //
// it into the database. //
//******************************************************************************//
$Properties=array();
@ -297,9 +297,9 @@
if(check_perms('users_mod')) {
if($T[Format] != "'FLAC'") {
$SQL .= "
HasLog='0',
HasCue='0',
";
HasLog='0',
HasCue='0',
";
} else {
$SQL .= "
HasLog=$T[HasLog],
@ -352,20 +352,20 @@
list($caID) = $DB->next_record();
if (!$caID && $Properties['CassetteApproved']) {
$DB->query("INSERT INTO torrents_cassette_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')");
$DB->query("INSERT INTO torrents_cassette_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')");
}
if ($caID && !$Properties['CassetteApproved']) {
$DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID='$TorrentID'");
$DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID='$TorrentID'");
}
$DB->query("SELECT TorrentID FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'");
list($lmaID) = $DB->next_record();
if (!$lmaID && $Properties['LossymasterApproved']) {
$DB->query("INSERT INTO torrents_lossymaster_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')");
$DB->query("INSERT INTO torrents_lossymaster_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')");
}
if ($lmaID && !$Properties['LossymasterApproved']) {
$DB->query("DELETE FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'");
$DB->query("DELETE FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'");
}
$DB->query("SELECT TorrentID FROM torrents_lossyweb_approved WHERE TorrentID='$TorrentID'");

View File

@ -51,7 +51,7 @@
if(!preg_match("/^".IMAGE_REGEX."$/i", $Image)) {
$Image = '';
}
check_imagehost($Image);
check_imagehost($Image);
$Summary = db_string($_POST['summary']);
}

View File

@ -3,7 +3,7 @@
$GroupVotes = Votes::get_group_votes($GroupID);
$TotalVotes = $GroupVotes['Total'];
$UpVotes = $GroupVotes['Ups'];
$UpVotes = $GroupVotes['Ups'];
$Voted = isset($UserVotes[$GroupID])?$UserVotes[$GroupID]['Type']:false;
?>

View File

@ -8,10 +8,10 @@
$Key = (int) $_POST['key'];
$UserInfo = Users::user_info($UserID);
$DB -> query("SELECT
tc.Body,
tc.AddedTime
FROM torrents_comments AS tc
WHERE tc.ID='" . db_string($PostID) . "'");
tc.Body,
tc.AddedTime
FROM torrents_comments AS tc
WHERE tc.ID='" . db_string($PostID) . "'");
list($PostBody) = $DB -> next_record();
View::show_header('Warn User');

View File

@ -1,13 +1,13 @@
<?
//*********************************************************************//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// This page relies on the TORRENT_FORM class. All it does is call //
// the necessary functions. //
//---------------------------------------------------------------------//
// $Properties, $Err and $UploadForm are set in takeupload.php, and //
// are only used when the form doesn't validate and this page must be //
// called again. //
//*********************************************************************//
//**********************************************************************//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// This page relies on the TORRENT_FORM class. All it does is call //
// the necessary functions. //
//----------------------------------------------------------------------//
// $Properties, $Err and $UploadForm are set in takeupload.php, and //
// are only used when the form doesn't validate and this page must be //
// called again. //
//**********************************************************************//
ini_set('max_file_uploads','100');
View::show_header('Upload','upload,jquery,valid_tags,musicbrainz,multiformat_uploader');
@ -82,7 +82,7 @@
$GenreTags = $Cache->get_value('genre_tags');
if(!$GenreTags) {
$DB->query("SELECT Name FROM tags WHERE TagType='genre' ORDER BY Name");
$GenreTags = $DB->collect('Name');
$GenreTags = $DB->collect('Name');
$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
}
@ -105,7 +105,7 @@
<p><?=$NewDNU?'<strong class="important_text">':''?>Last Updated: <?=time_diff($Updated)?><?=$NewDNU?'</strong>':''?></p>
<p>The following releases are currently forbidden from being uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comment.
<? if ($HideDNU) { ?>
<span id="showdnu"><a href="#" onclick="$('#dnulist').toggle(); this.innerHTML=(this.innerHTML=='(Hide)'?'(Show)':'(Hide)'); return false;">(Show)</a></span>
<span id="showdnu"><a href="#" onclick="$('#dnulist').toggle(); this.innerHTML=(this.innerHTML=='(Hide)'?'(Show)':'(Hide)'); return false;">(Show)</a></span>
<? } ?>
</p>
<table id="dnulist" class="<?=($HideDNU?'hidden':'')?>">

View File

@ -1,8 +1,8 @@
<?
//******************************************************************************//
//--------------- Take upload --------------------------------------------------//
// This pages handles the backend of the torrent upload function. It checks //
// the data, and if it all validates, it builds the torrent file, then writes //
// This pages handles the backend of the torrent upload function. It checks //
// the data, and if it all validates, it builds the torrent file, then writes //
// the data to the database and the torrent to the disk. //
//******************************************************************************//
@ -29,7 +29,7 @@
//******************************************************************************//
//--------------- Set $Properties array ----------------------------------------//
// This is used if the form doesn't validate, and when the time comes to enter //
// This is used if the form doesn't validate, and when the time comes to enter //
// it into the database. //
$Properties=array();
@ -760,12 +760,12 @@
foreach($GroupInfo[1] as $TorrentInfo) {
if (($TorrentInfo['Media'] == $ThisMedia)
&& ($TorrentInfo['Remastered'] == $ThisRemastered)
&& ($TorrentInfo['RemasterYear'] == (int)$ThisRemasterYear)
&& ($TorrentInfo['RemasterTitle'] == $ThisRemasterTitle)
&& ($TorrentInfo['RemasterRecordLabel'] == $ThisRemasterRecordLabel)
&& ($TorrentInfo['RemasterCatalogueNumber'] == $ThisRemasterCatalogueNumber)
&& ($TorrentInfo['ID'] != $TorrentID)) {
&& ($TorrentInfo['Remastered'] == $ThisRemastered)
&& ($TorrentInfo['RemasterYear'] == (int)$ThisRemasterYear)
&& ($TorrentInfo['RemasterTitle'] == $ThisRemasterTitle)
&& ($TorrentInfo['RemasterRecordLabel'] == $ThisRemasterRecordLabel)
&& ($TorrentInfo['RemasterCatalogueNumber'] == $ThisRemasterCatalogueNumber)
&& ($TorrentInfo['ID'] != $TorrentID)) {
$UsedFormatBitrates[] = array('format' => $TorrentInfo['Format'], 'bitrate' => $TorrentInfo['Encoding']);
}
}
@ -843,21 +843,21 @@
if($Properties['Format']) {
$SQL.=" AND (Formats LIKE '%|".db_string(trim($Properties['Format']))."|%' OR Formats='') ";
$SQL.=" AND (Formats LIKE '%|".db_string(trim($Properties['Format']))."|%' OR Formats='') ";
} else {
$SQL.=" AND (Formats='') ";
$SQL.=" AND (Formats='') ";
}
if($_POST['bitrate']) {
$SQL.=" AND (Encodings LIKE '%|".db_string(trim($_POST['bitrate']))."|%' OR Encodings='') ";
$SQL.=" AND (Encodings LIKE '%|".db_string(trim($_POST['bitrate']))."|%' OR Encodings='') ";
} else {
$SQL.=" AND (Encodings='') ";
$SQL.=" AND (Encodings='') ";
}
if($Properties['Media']) {
$SQL.=" AND (Media LIKE '%|".db_string(trim($Properties['Media']))."|%' OR Media='') ";
$SQL.=" AND (Media LIKE '%|".db_string(trim($Properties['Media']))."|%' OR Media='') ";
} else {
$SQL.=" AND (Media='') ";
$SQL.=" AND (Media='') ";
}
// Either they aren't using NewGroupsOnly

View File

@ -43,29 +43,29 @@
<? } ?>
</li>
<? }
if (($Override=check_paranoia_here('collages+'))) { ?>
if (($Override=check_paranoia_here('collages+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Collages started: <?=number_format($NumCollages)?>
<? if(($Override=check_paranoia_here('collages'))) { ?>[<a <?= ($Override===2) ? 'class="paranoia_override"'
:'' ?>
:'' ?>
href="collages.php?userid=<?=$UserID?>" title="View">View</a>]
<? } ?>
</li>
<? }
if (($Override=check_paranoia_here('collagecontribs+'))) { ?>
if (($Override=check_paranoia_here('collagecontribs+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Collages contributed to: <? echo number_format($NumCollageContribs);
if (($Override=check_paranoia_here('collagecontribs'))) {
?> [<a <?= ($Override===2) ?
'class="paranoia_override"' : ''?> href="collages.php?userid=<?=$UserID?>&amp;contrib=1" title="View">View</a>]
'class="paranoia_override"' : ''?> href="collages.php?userid=<?=$UserID?>&amp;contrib=1" title="View">View</a>]
<? } ?>
</li>
<? }
//Let's see if we can view requests because of reasons
$ViewAll = check_paranoia_here('requestsfilled_list');
$ViewCount = check_paranoia_here('requestsfilled_count');
$ViewBounty = check_paranoia_here('requestsfilled_bounty');
$ViewAll = check_paranoia_here('requestsfilled_list');
$ViewCount = check_paranoia_here('requestsfilled_count');
$ViewBounty = check_paranoia_here('requestsfilled_bounty');
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
<li>Requests filled: <?=number_format($RequestsFilled)?></li>
<? } elseif(!$ViewCount && $ViewBounty && !$ViewAll) { ?>
<li>Requests voted: <?=Format::get_size($TotalSpent)?> collected</li>
@ -80,11 +80,11 @@
<? }
//Let's see if we can view requests because of reasons
$ViewAll = check_paranoia_here('requestsvoted_list');
$ViewCount = check_paranoia_here('requestsvoted_count');
$ViewBounty = check_paranoia_here('requestsvoted_bounty');
$ViewAll = check_paranoia_here('requestsvoted_list');
$ViewCount = check_paranoia_here('requestsvoted_count');
$ViewBounty = check_paranoia_here('requestsvoted_bounty');
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
<li>Requests voted: <?=number_format($RequestsVoted)?></li>
<? } elseif(!$ViewCount && $ViewBounty && !$ViewAll) { ?>
<li>Requests voted: <?=Format::get_size($TotalSpent)?> spent</li>
@ -97,13 +97,13 @@
[<a href="requests.php?type=voted&amp;userid=<?=$UserID?>" <?= ($ViewAll===2) ? 'class="paranoia_override"' : ''?> title="View">View</a>]
</li>
<? }
if (($Override=check_paranoia_here('uploads+'))) { ?>
if (($Override=check_paranoia_here('uploads+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Uploaded: <?=number_format($Uploads)?>
<? if(($Override=check_paranoia_here('uploads'))) { ?>[<a <?= $Override===2 ? 'class="paranoia_override"' :'' ?> href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>" title="View">View</a>]<? if(check_perms('zip_downloader')) { ?> [<a href="torrents.php?action=redownload&amp;type=uploads&amp;userid=<?=$UserID?>"
<? if(($Override=check_paranoia_here('uploads'))) { ?>[<a <?= $Override===2 ? 'class="paranoia_override"' :'' ?> href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>" title="View">View</a>]<? if(check_perms('zip_downloader')) { ?> [<a href="torrents.php?action=redownload&amp;type=uploads&amp;userid=<?=$UserID?>"
onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');">Download</a>]<? } } ?>
</li>
<? }
if (($Override=check_paranoia_here('uniquegroups+'))) { ?>
if (($Override=check_paranoia_here('uniquegroups+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>
Unique groups: <?echo number_format($UniqueGroups);
if(($Override=check_paranoia_here('uniquegroups'))) {?>
@ -111,12 +111,12 @@
<?}?>
</li>
<? }
if (($Override=check_paranoia_here('perfectflacs+'))) { ?>
if (($Override=check_paranoia_here('perfectflacs+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>"Perfect" FLACs: <?echo number_format($PerfectFLACs);
if (($Override=check_paranoia_here('perfectflacs'))) { ?>
if (($Override=check_paranoia_here('perfectflacs'))) { ?>
[<a <?= $Override===2 ? 'class="paranoia_override"' :'' ?> href="torrents.php?type=uploaded&amp;userid=<?=$UserID?>&amp;filter=perfectflac">View</a>]</li>
<? }
}
}
if (check_paranoia_here('seeding+') || check_paranoia_here('leeching+')) {
$DB->query("SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(x.uid) FROM xbt_files_users AS x INNER JOIN torrents AS t ON t.ID=x.fid WHERE x.uid='$UserID' AND x.active=1 GROUP BY Type");
@ -138,7 +138,7 @@
<?} ?>
</li>
<? }
if (($Override=check_paranoia_here('leeching+'))) { ?>
if (($Override=check_paranoia_here('leeching+'))) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Leeching: <? echo number_format($Leeching);
if(($Override=check_paranoia_here('leeching'))) { ?>
[<a <?= $Override===2 ? 'class="paranoia_override"' : ''?> href="torrents.php?type=leeching&amp;userid=<?=$UserID?>" title="View">View</a>]

View File

@ -20,7 +20,7 @@
die('Invalid IP');
}
if (empty($_GET['port']) || !is_number($_GET['port']) || $_GET['port']<1 || $_GET['port']>65535){
if (empty($_GET['port']) || !is_number($_GET['port']) || $_GET['port']<1 || $_GET['port']>65535){
die('Invalid Port');
}
@ -41,7 +41,7 @@
<form class="manage_form" name="connections" action="javascript:check_ip();" method="get">
<table class="layout">
<tr>
<td class="label">IP</td>
<td class="label">IP address</td>
<td>
<input type="text" id="ip" name="ip" value="<?=$_SERVER['REMOTE_ADDR']?>" size="20" />
</td>
@ -57,7 +57,7 @@
</form>
<div id="result" class="box pad"></div>
</div>
<script type="text/javascript">
<script type="text/javascript">//<![CDATA[
var result = $('#result').raw();
function check_ip() {
@ -68,5 +68,6 @@ function check_ip() {
result.innerHTML = response;
});
}
//]]>
</script>
<? View::show_footer(); ?>
<? View::show_footer(); ?>

View File

@ -37,15 +37,15 @@
}
function paranoia_level($Setting) {
global $Paranoia;
// 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid
return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2);
global $Paranoia;
// 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid
return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2);
}
function display_paranoia($FieldName) {
$Level = paranoia_level($FieldName);
print '<label><input type="checkbox" name="p_'.$FieldName.'_c" '.checked($Level >= 1).' onchange="AlterParanoia()" /> Show count</label>'."&nbsp;&nbsp;\n";
print '<label><input type="checkbox" name="p_'.$FieldName.'_l" '.checked($Level >= 2).' onchange="AlterParanoia()" /> Show list</label>';
$Level = paranoia_level($FieldName);
print '<label><input type="checkbox" name="p_'.$FieldName.'_c" '.checked($Level >= 1).' onchange="AlterParanoia()" /> Show count</label>'."&nbsp;&nbsp;\n";
print '<label><input type="checkbox" name="p_'.$FieldName.'_l" '.checked($Level >= 2).' onchange="AlterParanoia()" /> Show list</label>';
}
function checked($Checked) {
@ -89,7 +89,7 @@ function checked($Checked) {
<td>
<select name="stylesheet" id="stylesheet">
<? foreach($Stylesheets as $Style) { ?>
<option value="<?=$Style['ID']?>"<? if ($Style['ID'] == $StyleID) { ?>selected="selected"<? } ?>><?=$Style['ProperName']?></option>
<option value="<?=$Style['ID']?>"<? if ($Style['ID'] == $StyleID) { ?> selected="selected"<? } ?>><?=$Style['ProperName']?></option>
<? } ?>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Or -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -101,8 +101,8 @@ function checked($Checked) {
<td class="label"><strong>Default search type</strong></td>
<td>
<select name="searchtype" id="searchtype">
<option value="0"<? if ($SiteOptions['SearchType'] == 0) { ?>selected="selected"<? } ?>>Simple</option>
<option value="1"<? if ($SiteOptions['SearchType'] == 1) { ?>selected="selected"<? } ?>>Advanced</option>
<option value="0"<? if ($SiteOptions['SearchType'] == 0) { ?> selected="selected"<? } ?>>Simple</option>
<option value="1"<? if ($SiteOptions['SearchType'] == 1) { ?> selected="selected"<? } ?>>Advanced</option>
</select>
</td>
</tr>
@ -111,12 +111,12 @@ function checked($Checked) {
<td class="label"><strong>Torrent grouping</strong></td>
<td>
<select name="disablegrouping" id="disablegrouping">
<option value="0"<? if ($SiteOptions['DisableGrouping2'] == 0) { ?>selected="selected"<? } ?>>Group torrents by default</option>
<option value="1"<? if ($SiteOptions['DisableGrouping2'] == 1) { ?>selected="selected"<? } ?>>DO NOT group torrents by default</option>
<option value="0"<? if ($SiteOptions['DisableGrouping2'] == 0) { ?> selected="selected"<? } ?>>Group torrents by default</option>
<option value="1"<? if ($SiteOptions['DisableGrouping2'] == 1) { ?> selected="selected"<? } ?>>DO NOT group torrents by default</option>
</select>&nbsp;
<select name="torrentgrouping" id="torrentgrouping">
<option value="0"<? if ($SiteOptions['TorrentGrouping'] == 0) { ?>selected="selected"<? } ?>>Groups are open by default</option>
<option value="1"<? if ($SiteOptions['TorrentGrouping'] == 1) { ?>selected="selected"<? } ?>>Groups are closed by default</option>
<option value="0"<? if ($SiteOptions['TorrentGrouping'] == 0) { ?> selected="selected"<? } ?>>Groups are open by default</option>
<option value="1"<? if ($SiteOptions['TorrentGrouping'] == 1) { ?> selected="selected"<? } ?>>Groups are closed by default</option>
</select>
</td>
</tr>
@ -124,15 +124,15 @@ function checked($Checked) {
<td class="label"><strong>Discography view</strong></td>
<td>
<select name="discogview" id="discogview">
<option value="0"<? if ($SiteOptions['DiscogView'] == 0) { ?>selected="selected"<? } ?>>Open by default</option>
<option value="1"<? if ($SiteOptions['DiscogView'] == 1) { ?>selected="selected"<? } ?>>Closed by default</option>
<option value="0"<? if ($SiteOptions['DiscogView'] == 0) { ?> selected="selected"<? } ?>>Open by default</option>
<option value="1"<? if ($SiteOptions['DiscogView'] == 1) { ?> selected="selected"<? } ?>>Closed by default</option>
</select>
</td>
</tr>
<tr>
<td class="label"><strong>Show snatched torrents</strong></td>
<td>
<input type="checkbox" name="showsnatched" id="showsnatched" <? if (!empty($SiteOptions['ShowSnatched'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="showsnatched" id="showsnatched" <? if (!empty($SiteOptions['ShowSnatched'])) { ?>checked="checked" <? } ?>/>
<label for="showsnatched">Display "Snatched!" next to snatched torrents</label>
</td>
</tr>
@ -140,9 +140,9 @@ function checked($Checked) {
<td class="label"><strong>Forum posts per page</strong></td>
<td>
<select name="postsperpage" id="postsperpage">
<option value="25"<? if ($SiteOptions['PostsPerPage'] == 25) { ?>selected="selected"<? } ?>>25 (Default)</option>
<option value="50"<? if ($SiteOptions['PostsPerPage'] == 50) { ?>selected="selected"<? } ?>>50</option>
<option value="100"<? if ($SiteOptions['PostsPerPage'] == 100) { ?>selected="selected"<? } ?>>100</option>
<option value="25"<? if ($SiteOptions['PostsPerPage'] == 25) { ?> selected="selected"<? } ?>>25 (Default)</option>
<option value="50"<? if ($SiteOptions['PostsPerPage'] == 50) { ?> selected="selected"<? } ?>>50</option>
<option value="100"<? if ($SiteOptions['PostsPerPage'] == 100) { ?> selected="selected"<? } ?>>100</option>
</select>
</td>
</tr>
@ -216,52 +216,52 @@ function checked($Checked) {
<label for="disablesmileys">Disable smileys</label>
</td>
</tr>
<tr>
<td class="label"><strong>Mature content</strong></td>
<td>
<input type="checkbox" name="enablematurecontent" id="enablematurecontent" <? if (!empty($SiteOptions['EnableMatureContent'])) { ?>checked="checked"<? } ?> />
<label for="enablematurecontent">Show mature content</label>
</td>
</tr>
<tr>
<td class="label"><strong>Avatars</strong></td>
<td>
<select name="disableavatars" id="disableavatars" onclick="ToggleIdenticons();">
<option value="1" <? if($SiteOptions['DisableAvatars'] == 1) { ?> selected="selected" <? } ?>/>Disable avatars</option>
<option value="0" <? if($SiteOptions['DisableAvatars'] == 0) { ?> selected="selected" <? } ?>/>Show avatars</option>
<option value="2" <? if($SiteOptions['DisableAvatars'] == 2) { ?> selected="selected" <? } ?>/>Show avatars or:</option>
<option value="3" <? if($SiteOptions['DisableAvatars'] == 3) { ?> selected="selected" <? } ?>/>Replace all avatars with:</option>
</select>
<select name="identicons" id="identicons">
<option value="0" <? if($SiteOptions['Identicons'] == 0) { ?> selected="selected" <? } ?>/>Identicon</option>
<option value="1" <? if($SiteOptions['Identicons'] == 1) { ?> selected="selected" <? } ?>/>MonsterID</option>
<option value="2" <? if($SiteOptions['Identicons'] == 2) { ?> selected="selected" <? } ?>/>Wavatar</option>
<option value="3" <? if($SiteOptions['Identicons'] == 3) { ?> selected="selected" <? } ?>/>Retro</option>
<option value="4" <? if($SiteOptions['Identicons'] == 4) { ?> selected="selected" <? } ?>/>Robots 1</option>
<option value="5" <? if($SiteOptions['Identicons'] == 5) { ?> selected="selected" <? } ?>/>Robots 2</option>
<option value="6" <? if($SiteOptions['Identicons'] == 6) { ?> selected="selected" <? } ?>/>Robots 3</option>
</select>
</td>
</tr>
<!-- -->
<td class="label"><strong>Mature content</strong></td>
<td>
<input type="checkbox" name="enablematurecontent" id="enablematurecontent" <? if (!empty($SiteOptions['EnableMatureContent'])) { ?>checked="checked"<? } ?> />
<label for="enablematurecontent">Show mature content</label>
</td>
</tr>
<tr>
<td class="label"><strong>Avatars</strong></td>
<td>
<select name="disableavatars" id="disableavatars" onclick="ToggleIdenticons();">
<option value="1" <? if($SiteOptions['DisableAvatars'] == 1) { ?>selected="selected" <? } ?>/>Disable avatars</option>
<option value="0" <? if($SiteOptions['DisableAvatars'] == 0) { ?>selected="selected" <? } ?>/>Show avatars</option>
<option value="2" <? if($SiteOptions['DisableAvatars'] == 2) { ?>selected="selected" <? } ?>/>Show avatars or:</option>
<option value="3" <? if($SiteOptions['DisableAvatars'] == 3) { ?>selected="selected" <? } ?>/>Replace all avatars with:</option>
</select>
<select name="identicons" id="identicons">
<option value="0" <? if($SiteOptions['Identicons'] == 0) { ?>selected="selected" <? } ?>/>Identicon</option>
<option value="1" <? if($SiteOptions['Identicons'] == 1) { ?>selected="selected" <? } ?>/>MonsterID</option>
<option value="2" <? if($SiteOptions['Identicons'] == 2) { ?>selected="selected" <? } ?>/>Wavatar</option>
<option value="3" <? if($SiteOptions['Identicons'] == 3) { ?>selected="selected" <? } ?>/>Retro</option>
<option value="4" <? if($SiteOptions['Identicons'] == 4) { ?>selected="selected" <? } ?>/>Robots 1</option>
<option value="5" <? if($SiteOptions['Identicons'] == 5) { ?>selected="selected" <? } ?>/>Robots 2</option>
<option value="6" <? if($SiteOptions['Identicons'] == 6) { ?>selected="selected" <? } ?>/>Robots 3</option>
</select>
</td>
</tr>
<!-- -->
<tr>
<td class="label"><strong>Auto-save text</strong></td>
<td>
<input type="checkbox" name="disableautosave" id="disableautosave" <? if (!empty($SiteOptions['DisableAutoSave'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="disableautosave" id="disableautosave" <? if (!empty($SiteOptions['DisableAutoSave'])) { ?>checked="checked" <? } ?>/>
<label for="disableautosave">Disable reply text from being saved automatically when changing pages in a thread</label>
</td>
</tr>
<tr>
<td class="label"><strong>Voting links</strong></td>
<td>
<input type="checkbox" name="novotelinks" id="novotelinks" <? if (!empty($SiteOptions['NoVoteLinks'])) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="novotelinks" id="novotelinks" <? if (!empty($SiteOptions['NoVoteLinks'])) { ?>checked="checked" <? } ?>/>
<label for="novotelinks">Disable voting links on artist pages, collages, and snatched lists</label>
</td>
</tr>
<tr>
<td class="label"><strong>Download torrents as text files</strong></td>
<td>
<input type="checkbox" name="downloadalt" id="downloadalt" <? if ($DownloadAlt) { ?>checked="checked"<? } ?> />
<input type="checkbox" name="downloadalt" id="downloadalt" <? if ($DownloadAlt) { ?>checked="checked" <? } ?>/>
<label for="downloadalt">For users whose ISP blocks the downloading of torrent files</label>
</td>
</tr>
@ -290,12 +290,12 @@ function checked($Checked) {
<p class="min_padding">If changing this field, you must enter your current password in the "Current password" field before saving your changes.</p>
</td>
</tr>
<tr>
<td class="label"><strong>Last.fm Username</strong></td>
<td><input type="text" size="50" name="lastfm_username" id="lastfm_username" value="<?=display_str($LastFMUsername)?>" />
<p class="min_padding">Your Last.fm username. Will be used to display Last.fm information on your profile which can be seen by other users.</p>
</td>
</tr>
<tr>
<td class="label"><strong>Last.fm username</strong></td>
<td><input type="text" size="50" name="lastfm_username" id="lastfm_username" value="<?=display_str($LastFMUsername)?>" />
<p class="min_padding">Your Last.fm username. Will be used to display Last.fm information on your profile which can be seen by other users.</p>
</td>
</tr>
<tr>
<td class="label"><strong>Info</strong></td>

View File

@ -34,8 +34,8 @@
if (check_perms('admin_advanced_user_search') && check_perms('users_view_ips') && check_perms('users_view_email')) {
include('advancedsearch.php');
}
else {
else {
include('search.php');
}
break;
@ -91,38 +91,38 @@
$Cache->delete_value('collage_subs_user_new_'.$UserID);
include(SERVER_ROOT.'/sections/user/user.php');
break;
//Provide public methods for Last.fm data gets.
case 'lastfm_compare':
if(isset($_GET['username'])) {
echo LastFM::compare_user_with($_GET['username']);
}
break;
case 'lastfm_last_played_track':
if(isset($_GET['username'])) {
echo LastFM::get_last_played_track($_GET['username']);
}
break;
case 'lastfm_top_artists':
if(isset($_GET['username'])) {
echo LastFM::get_top_artists($_GET['username']);
}
break;
case 'lastfm_top_albums':
if(isset($_GET['username'])) {
echo LastFM::get_top_albums($_GET['username']);
}
break;
case 'lastfm_top_tracks':
if(isset($_GET['username'])) {
echo LastFM::get_top_tracks($_GET['username']);
}
break;
case 'lastfm_clear_cache':
if(isset($_GET['username']) && isset($_GET['uid'])) {
echo LastFM::clear_cache($_GET['username'],$_GET['uid']);
}
break;
//Provide public methods for Last.fm data gets.
case 'lastfm_compare':
if(isset($_GET['username'])) {
echo LastFM::compare_user_with($_GET['username']);
}
break;
case 'lastfm_last_played_track':
if(isset($_GET['username'])) {
echo LastFM::get_last_played_track($_GET['username']);
}
break;
case 'lastfm_top_artists':
if(isset($_GET['username'])) {
echo LastFM::get_top_artists($_GET['username']);
}
break;
case 'lastfm_top_albums':
if(isset($_GET['username'])) {
echo LastFM::get_top_albums($_GET['username']);
}
break;
case 'lastfm_top_tracks':
if(isset($_GET['username'])) {
echo LastFM::get_top_tracks($_GET['username']);
}
break;
case 'lastfm_clear_cache':
if(isset($_GET['username']) && isset($_GET['uid'])) {
echo LastFM::clear_cache($_GET['username'],$_GET['uid']);
}
break;
default:
if (isset($_REQUEST['id'])) {
include(SERVER_ROOT.'/sections/user/user.php');

View File

@ -148,7 +148,7 @@
<?
} elseif ($LoggedUser['RatioWatch'] || !$CanLeech) { ?>
<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&amp;id=310">this article</a> for more information.</strong>
<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&amp;id=310">this article</a> for more information.</strong>
</div>
<?
}

View File

@ -2,31 +2,30 @@
//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'");
if ($DB->record_count()) {
list($LastFMUsername) = $DB->next_record();
$LastFMInfo = LastFM::get_user_info($LastFMUsername);
//Hand everything else over to js (gets data via the username in an id-d div) to allow faster page loading.
?>
<div class="box box_info box_lastfm">
<div class="head colhead_dark">Last.fm</div>
<ul class="stats nobullet">
<li>
Username: <a id="lastfm_username" href="<?= $LastFMInfo['user']['url'] ?>" target="_blank" title="<?= $LastFMInfo['user']['name'] ?> on Last.fm: <?= $LastFMInfo['user']['playcount'] ?> plays, <?= $LastFMInfo['user']['playlists'] ?> playlists."><?= $LastFMInfo['user']['name'] ?></a>
</li>
<div id="lastfm_stats" <? if ($OwnProfile == true): ?>data-uid="<?= $OwnProfile ?>"<? endif; ?>>
</div>
<li>
[<a href="#" id="lastfm_expand" onclick="return false">Show more info</a>]
<?
//Append the reload stats button only if allowed on the current user page.
$Response = $Cache->get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']);
if (empty($Response)) :
?>
<span id="lastfm_reload_container">
[<a href="#" id="lastfm_reload" onclick="return false">Reload stats</a>]
</span>
<? endif; ?>
</li>
</ul>
</div>
list($LastFMUsername) = $DB->next_record();
$LastFMInfo = LastFM::get_user_info($LastFMUsername);
//Hand everything else over to js (gets data via the username in an id-d div) to allow faster page loading.
?>
<div class="box box_info box_lastfm">
<div class="head colhead_dark">Last.fm</div>
<ul class="stats nobullet">
<li>
Username: <a id="lastfm_username" href="<?= $LastFMInfo['user']['url'] ?>" target="_blank" title="<?= $LastFMInfo['user']['name'] ?> on Last.fm: <?= $LastFMInfo['user']['playcount'] ?> plays, <?= $LastFMInfo['user']['playlists'] ?> playlists."><?= $LastFMInfo['user']['name'] ?></a>
</li>
<div id="lastfm_stats" <? if ($OwnProfile == true): ?>data-uid="<?= $OwnProfile ?>"<? endif; ?>>
</div>
<li>
[<a href="#" id="lastfm_expand" onclick="return false">Show more info</a>]
<?
//Append the reload stats button only if allowed on the current user page.
$Response = $Cache->get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']);
if (empty($Response)) :
?>
<span id="lastfm_reload_container">
[<a href="#" id="lastfm_reload" onclick="return false">Reload stats</a>]
</span>
<? endif; ?>
</li>
</ul>
</div>
<? } ?>

View File

@ -58,8 +58,8 @@ function link_users($UserID, $TargetID) {
}
$AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] and [user]".$TargetInfo['Username']."[/user] linked by ".$LoggedUser['Username'];
$DB->query("UPDATE users_info AS i
JOIN users_dupes AS d ON d.UserID = i.UserID
$DB->query("UPDATE users_info AS i
JOIN users_dupes AS d ON d.UserID = i.UserID
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
WHERE d.GroupID = $GroupID");
}
@ -80,9 +80,9 @@ function unlink_user($UserID) {
return;
}
$AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] unlinked by ".$LoggedUser['Username'];
$DB->query("UPDATE users_info AS i
JOIN users_dupes AS d1 ON d1.UserID = i.UserID
JOIN users_dupes AS d2 ON d2.GroupID = d1.GroupID
$DB->query("UPDATE users_info AS i
JOIN users_dupes AS d1 ON d1.UserID = i.UserID
JOIN users_dupes AS d2 ON d2.GroupID = d1.GroupID
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
WHERE d2.UserID = $UserID");
$DB->query("DELETE FROM users_dupes WHERE UserID='$UserID'");
@ -126,8 +126,8 @@ function dupe_comments($GroupID, $Comments) {
$DB->query("UPDATE dupe_groups SET Comments = CONCAT('".db_string($Comments)."\n\n',Comments) WHERE ID = '$GroupID'");
}
$DB->query("UPDATE users_info AS i
JOIN users_dupes AS d ON d.UserID = i.UserID
$DB->query("UPDATE users_info AS i
JOIN users_dupes AS d ON d.UserID = i.UserID
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
WHERE d.GroupID = $GroupID");
}

View File

@ -36,7 +36,7 @@
$Warned = (isset($_POST['Warned']))? 1 : 0;
$Logs095 = (int)$_POST['095logs'];
if(isset($_POST['Uploaded']) && isset($_POST['Downloaded'])) {
$Uploaded = ($_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded']);
$Uploaded = ($_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded']);
if($Arithmetic = strpbrk($Uploaded, '+-')) {
$Uploaded += max(-$Uploaded, Format::get_bytes($Arithmetic));
}
@ -140,7 +140,7 @@
$Cur = $DB->next_record(MYSQLI_ASSOC, false);
if ($_POST['comment_hash'] != $Cur['CommentHash']) {
error("Somebody else has moderated this user since you loaded it. Please go back and refresh the page.");
error("Somebody else has moderated this user since you loaded it. Please go back and refresh the page.");
}
//NOW that we know the class of the current user, we can see if one staff member is trying to hax0r us.
@ -292,7 +292,7 @@
}
}
if ($Donor!=$Cur['Donor'] && check_perms('users_give_donor')) {
if ($Donor!=$Cur['Donor'] && check_perms('users_give_donor')) {
$UpdateSet[]="Donor='$Donor'";
$EditSummary[]="donor status changed";
$LightUpdates['Donor']=$Donor;
@ -332,7 +332,7 @@
$DeleteKeys = true;
}
if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) {
if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) {
$UpdateSet[]="Visible='$Visible'";
$EditSummary[]="visibility changed";
$LightUpdates['Visible']=$Visible;
@ -393,7 +393,7 @@
Misc::send_pm($UserID,0,db_string('Your warning has been reduced'),db_string("Your warning has been reduced by $ReduceWarning week(s) 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 week(s) to $WarnedUntil";
if ($WarnReason) { $Msg.=" for $WarnReason"; }

View File

@ -241,13 +241,13 @@ function check_paranoia_here($Setting) {
<? if ($OwnProfile || ($Override=check_paranoia_here(false)) || check_perms('users_mod')) { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&amp;userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
<? }
if (($OwnProfile || check_perms('users_mod')) && $Warned!='0000-00-00 00:00:00') { ?>
if (($OwnProfile || check_perms('users_mod')) && $Warned!='0000-00-00 00:00:00') { ?>
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Warning expires: <?= date('Y-m-d h:i', strtotime($Warned)) ?></li>
<? } ?>
</ul>
</div>
<?
//Last.fm statistics and comparability
include(SERVER_ROOT.'/sections/user/lastfm.php');
@ -737,7 +737,7 @@ function check_paranoia_here($Setting) {
</td>
<td>
<span id="vote_count_<?=$RequestID?>"><?=$Votes?></span>
<? if(check_perms('site_vote')){ ?>
<? if(check_perms('site_vote')){ ?>
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
&nbsp;&nbsp; <a href="javascript:Vote(0, <?=$RequestID?>)"><strong>(+)</strong></a>
<? } ?>
@ -1095,19 +1095,19 @@ function check_paranoia_here($Setting) {
<tr>
<td class="label">Disable:</td>
<td>
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?>checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
<? if (check_perms('users_disable_any')) { ?> |
<input type="checkbox" name="DisableAvatar" id="DisableAvatar"<? if ($DisableAvatar==1) { ?>checked="checked"<? } ?> /> <label for="DisableAvatar">Avatar</label> |
<input type="checkbox" name="DisableInvites" id="DisableInvites"<? if ($DisableInvites==1) { ?>checked="checked"<? } ?> /> <label for="DisableInvites">Invites</label> |
<input type="checkbox" name="DisableForums" id="DisableForums"<? if ($DisableForums==1) { ?>checked="checked"<? } ?> /> <label for="DisableForums">Forums</label> |
<input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging==1) { ?>checked="checked"<? } ?> /> <label for="DisableTagging" title="This only disables a user's ability to delete tags.">Tagging</label> |
<input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests==1) { ?>checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label>
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?> checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
<? if (check_perms('users_disable_any')) { ?> |
<input type="checkbox" name="DisableAvatar" id="DisableAvatar"<? if ($DisableAvatar==1) { ?> checked="checked"<? } ?> /> <label for="DisableAvatar">Avatar</label> |
<input type="checkbox" name="DisableInvites" id="DisableInvites"<? if ($DisableInvites==1) { ?> checked="checked"<? } ?> /> <label for="DisableInvites">Invites</label> |
<input type="checkbox" name="DisableForums" id="DisableForums"<? if ($DisableForums==1) { ?> checked="checked"<? } ?> /> <label for="DisableForums">Forums</label> |
<input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging==1) { ?> checked="checked"<? } ?> /> <label for="DisableTagging" title="This only disables a user's ability to delete tags.">Tagging</label> |
<input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests==1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label>
<br />
<input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload==1) { ?>checked="checked"<? } ?> /> <label for="DisableUpload">Upload</label> |
<input type="checkbox" name="DisableWiki" id="DisableWiki"<? if ($DisableWiki==1) { ?>checked="checked"<? } ?> /> <label for="DisableWiki">Wiki</label> |
<input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech==0) { ?>checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
<input type="checkbox" name="DisablePM" id="DisablePM"<? if ($DisablePM==1) { ?>checked="checked"<? } ?> /> <label for="DisablePM">PM</label> |
<input type="checkbox" name="DisableIRC" id="DisableIRC"<? if ($DisableIRC==1) { ?>checked="checked"<? } ?> /> <label for="DisableIRC">IRC</label>
<input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload==1) { ?> checked="checked"<? } ?> /> <label for="DisableUpload">Upload</label> |
<input type="checkbox" name="DisableWiki" id="DisableWiki"<? if ($DisableWiki==1) { ?> checked="checked"<? } ?> /> <label for="DisableWiki">Wiki</label> |
<input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech==0) { ?> checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
<input type="checkbox" name="DisablePM" id="DisablePM"<? if ($DisablePM==1) { ?> checked="checked"<? } ?> /> <label for="DisablePM">PM</label> |
<input type="checkbox" name="DisableIRC" id="DisableIRC"<? if ($DisableIRC==1) { ?> checked="checked"<? } ?> /> <label for="DisableIRC">IRC</label>
</td>
</tr>
<tr>

View File

@ -29,23 +29,23 @@
if ($UsersOnly == 1) {
$DB->query("SELECT
u.Email,
'".sqltime()."' AS Time,
u.IP,
c.Code
u.Email,
'".sqltime()."' AS Time,
u.IP,
c.Code
FROM users_main AS u
LEFT JOIN users_main AS u2 ON u2.Email = u.Email AND u2.ID != '$UserID'
LEFT JOIN geoip_country AS c ON INET_ATON(u.IP) BETWEEN c.StartIP AND c.EndIP
WHERE u.ID='$UserID' AND u2.ID > 0
UNION SELECT
h.Email,
h.Time,
h.IP,
c.Code
LEFT JOIN geoip_country AS c ON INET_ATON(u.IP) BETWEEN c.StartIP AND c.EndIP
WHERE u.ID='$UserID' AND u2.ID > 0
UNION SELECT
h.Email,
h.Time,
h.IP,
c.Code
FROM users_history_emails AS h
LEFT JOIN users_history_emails AS h2 ON h2.email=h.email and h2.UserID != '$UserID'
LEFT JOIN geoip_country AS c ON INET_ATON(h.IP) BETWEEN c.StartIP AND c.EndIP
WHERE h.UserID='$UserID' AND h2.UserID>0"/*AND Time<>'0000-00-00 00:00:00'*/."
LEFT JOIN geoip_country AS c ON INET_ATON(h.IP) BETWEEN c.StartIP AND c.EndIP
WHERE h.UserID='$UserID' AND h2.UserID>0"/*AND Time<>'0000-00-00 00:00:00'*/."
ORDER BY Time DESC");
} else {
$DB->query("SELECT

View File

@ -36,7 +36,7 @@
GROUP_CONCAT(h.Time SEPARATOR '|') AS UserSetTimes,
GROUP_CONCAT(h.IP SEPARATOR '|') AS UserIPs,
GROUP_CONCAT(m2.Username SEPARATOR '|') AS Usernames,
GROUP_CONCAT(m2.Enabled SEPARATOR '|') AS UsersEnabled,
GROUP_CONCAT(m2.Enabled SEPARATOR '|') AS UsersEnabled,
GROUP_CONCAT(i.Donor SEPARATOR '|') AS UsersDonor,
GROUP_CONCAT(i.Warned SEPARATOR '|') AS UsersWarned
FROM users_main AS m
@ -57,7 +57,7 @@
h3.Time AS UserSetTimes,
h3.IP AS UserIPs,
m3.Username AS Usernames,
m3.Enabled AS UsersEnabled,
m3.Enabled AS UsersEnabled,
i2.Donor AS UsersDonor,
i2.Warned AS UsersWarned
FROM users_history_emails AS h2
@ -118,7 +118,7 @@
$Old[$Key]['EndTime'] = $Val['Time'];
$Old[$Key]['IP'] = $Val['IP'];
$Old[$Key]['ElapsedTime'] = date(time() + strtotime($Old[$Key]['EndTime']) - strtotime($Old[$Key]['StartTime']));
$Old[$Key]['Email'] = $Val['Email'];
$Old[$Key]['Email'] = $Val['Email'];
} else {
// Shouldn't have to be here but I'll leave it anyway
@ -126,7 +126,7 @@
$Other[$Key]['EndTime'] = $Val['Time'];
$Other[$Key]['IP'] = $Val['IP'];
$Other[$Key]['ElapsedTime'] = date(time() + strtotime($Other[$Key]['EndTime']) - strtotime($Other[$Key]['StartTime']));
$Other[$Key]['Email'] = $Val['Email'];
$Other[$Key]['Email'] = $Val['Email'];
}
if ($Val['Usernames'] != '') {

View File

@ -57,17 +57,17 @@
break;
case 'subscribed_collages':
require('subscribed_collages.php');
break;
case 'catchup_collages':
require('catchup_collages.php');
break;
case 'token_history':
require('token_history.php');
break;
case 'quote_notifications':
require('quote_notifications.php');
break;
break;
case 'catchup_collages':
require('catchup_collages.php');
break;
case 'token_history':
require('token_history.php');
break;
case 'quote_notifications':
require('quote_notifications.php');
break;
default:
//You trying to mess with me query string? To the home page with you!
header('Location: index.php');

View File

@ -31,7 +31,7 @@
View::show_header("IP history for $Username");
?>
<script type="text/javascript">
<script type="text/javascript">//<![CDATA[
function ShowIPs(rowname) {
$('tr[name="'+rowname+'"]').toggle();
@ -41,15 +41,15 @@ function Ban(ip, id, elemID) {
if(notes != null && notes.length > 0) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById(elemID).innerHTML = "<strong>[Banned]</strong>";
}
}
}
xmlhttp.open("GET","tools.php?action=quick_ban&perform=create&ip=" + ip + "&notes=" + notes,true);
xmlhttp.send();
}
@ -59,48 +59,49 @@ function Ban(ip, id, elemID) {
function UnBan(ip, id, elemID) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById(elemID).innerHTML = "Ban";
document.getElementById(elemID).onclick = function() { Ban(ip, id, elemID); return false;};
}
}
xmlhttp.open("GET","tools.php?action=quick_ban&perform=delete&id="+id,true);
xmlhttp.open("GET","tools.php?action=quick_ban&perform=delete&id=" + id + "&ip=" + ip,true);
xmlhttp.send();
}
*/
*/
//]]>
</script>
<?
list($Page,$Limit) = Format::page_limit(IPS_PER_PAGE);
if ($UsersOnly == 1) {
$RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS
h1.IP,
h1.StartTime,
h1.EndTime,
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
GROUP_CONCAT(IFNULL(h2.EndTime,0) SEPARATOR '|'),
GROUP_CONCAT(um2.Username SEPARATOR '|'),
GROUP_CONCAT(um2.Enabled SEPARATOR '|'),
GROUP_CONCAT(ui2.Donor SEPARATOR '|'),
GROUP_CONCAT(ui2.Warned SEPARATOR '|')
FROM users_history_ips AS h1
LEFT JOIN users_history_ips AS h2 ON h2.IP=h1.IP AND h2.UserID!=$UserID
LEFT JOIN users_main AS um2 ON um2.ID=h2.UserID
LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID
h1.IP,
h1.StartTime,
h1.EndTime,
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
GROUP_CONCAT(IFNULL(h2.EndTime,0) SEPARATOR '|'),
GROUP_CONCAT(um2.Username SEPARATOR '|'),
GROUP_CONCAT(um2.Enabled SEPARATOR '|'),
GROUP_CONCAT(ui2.Donor SEPARATOR '|'),
GROUP_CONCAT(ui2.Warned SEPARATOR '|')
FROM users_history_ips AS h1
LEFT JOIN users_history_ips AS h2 ON h2.IP=h1.IP AND h2.UserID!=$UserID
LEFT JOIN users_main AS um2 ON um2.ID=h2.UserID
LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID
WHERE h1.UserID='$UserID'
AND h2.UserID>0 $SearchIPQuery
GROUP BY h1.IP, h1.StartTime
GROUP BY h1.IP, h1.StartTime
ORDER BY h1.StartTime DESC LIMIT $Limit");
} else {
$RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS
h1.IP,
h1.StartTime,
h1.IP,
h1.StartTime,
h1.EndTime,
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
@ -126,7 +127,7 @@ function UnBan(ip, id, elemID) {
?>
<div class="thin">
<div class="header">
<h2>IP history for <a href="/user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
<h2>IP address history for <a href="/user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
</div>
<div class="linkbox">
<? if($UsersOnly) { ?>
@ -184,16 +185,16 @@ function UnBan(ip, id, elemID) {
<?=$IP?> (<?=Tools::get_country_code_by_ajax($IP)?>)
<?
if($CanManageIPBans) {
if(!isset($IPs[$IP])) {
$sql = "SELECT ID, FromIP, ToIP FROM ip_bans WHERE '".Tools::ip_to_unsigned($IP)."' BETWEEN FromIP AND ToIP LIMIT 1";
if(!isset($IPs[$IP])) {
$sql = "SELECT ID, FromIP, ToIP FROM ip_bans WHERE '".Tools::ip_to_unsigned($IP)."' BETWEEN FromIP AND ToIP LIMIT 1";
$DB->query($sql);
if($DB->record_count() > 0) {
$IPs[$IP] = true;
$IPs[$IP] = true;
?>
<strong>[Banned]
<? }
else {
else {
$IPs[$IP] = false; ?>
<a id="<?=$counter?>" href="#" onclick="Ban('<?=$IP?>', '<?=$ID?>', '<?=$counter?>'); this.onclick=null;return false;">[Ban]</a>
<? }

View File

@ -261,13 +261,13 @@
<col class="col_post_body" />
</colgroup>
<tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>">
<span style="float:left;">
<?=time_diff($AddedTime) ?>
in <a href="forums.php?action=viewthread&amp;threadid=<?=$TopicID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>" title="<?=display_str($ThreadTitle)?>"><?=Format::cut_string($ThreadTitle, 75)?></a>
<?
if($ViewingOwn) {
if ((!$Locked || $Sticky) && (!$LastRead || $LastRead < $LastPostID)) { ?>
if ((!$Locked || $Sticky) && (!$LastRead || $LastRead < $LastPostID)) { ?>
<span class="new">(New!)</span>
<?
}
@ -314,12 +314,12 @@
<td class="body" valign="top">
<div id="content<?=$PostID?>">
<?=$Text->full_format($Body)?>
<? if($EditedUserID) { ?>
<? if($EditedUserID) { ?>
<br />
<br />
<? if(check_perms('site_moderate_forums')) { ?>
<a href="#content<?=$PostID?>" onclick="LoadEdit(<?=$PostID?>, 1)">&laquo;</a>
<? } ?>
<? } ?>
Last edited by
<?=Users::format_username($EditedUserID, false, false, false) ?> <?=time_diff($EditedTime,2,true,true)?>
<? } ?>

View File

@ -20,8 +20,8 @@
$PermittedForums = implode("','", array_keys($LoggedUser['CustomForums'], 1));
}
$sql = "SELECT SQL_CALC_FOUND_ROWS f.ID as ForumID, f.Name as ForumName, t.Title, q.TopicID, q.PostID, q.QuoterID
FROM users_notify_quoted AS q LEFT JOIN forums_topics AS t ON t.ID = q.TopicID LEFT JOIN forums AS f ON f.ID = q.ForumID
WHERE q.UserID = $LoggedUser[ID] AND ((f.MinClassRead <= '$LoggedUser[Class]'";
FROM users_notify_quoted AS q LEFT JOIN forums_topics AS t ON t.ID = q.TopicID LEFT JOIN forums AS f ON f.ID = q.ForumID
WHERE q.UserID = $LoggedUser[ID] AND ((f.MinClassRead <= '$LoggedUser[Class]'";
if (!empty($RestrictedForums)) {
$sql .= ' AND f.ID NOT IN (\'' . $RestrictedForums . '\')';

View File

@ -13,20 +13,20 @@
if (!$ShowAll) {
$sql = "SELECT c.ID,
c.Name,
c.NumTorrents,
s.LastVisit
c.Name,
c.NumTorrents,
s.LastVisit
FROM collages AS c
JOIN users_collage_subs AS s ON s.CollageID = c.ID
JOIN collages_torrents AS ct ON ct.CollageID = c.ID
WHERE s.UserID = ".$LoggedUser['ID']." AND c.Deleted='0'
AND ct.AddedOn > s.LastVisit
AND ct.AddedOn > s.LastVisit
GROUP BY c.ID";
} else {
$sql = "SELECT c.ID,
c.Name,
c.NumTorrents,
s.LastVisit
c.Name,
c.NumTorrents,
s.LastVisit
FROM collages AS c
JOIN users_collage_subs AS s ON s.CollageID = c.ID
LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID
@ -79,10 +79,10 @@
$RS = $DB->query("SELECT ct.GroupID,
tg.WikiImage,
tg.CategoryID
FROM collages_torrents AS ct
FROM collages_torrents AS ct
JOIN torrents_group AS tg ON ct.GroupID = tg.ID
WHERE ct.CollageID = $CollageID
AND ct.AddedOn > '$LastVisit'
AND ct.AddedOn > '$LastVisit'
ORDER BY ct.AddedOn");
$NewTorrentCount = $DB->record_count();
//$NewTorrents = $DB->to_array();

View File

@ -34,7 +34,7 @@
FROM users_subscriptions
WHERE UserID = '.$LoggedUser['ID'].') AS s
LEFT JOIN forums_last_read_topics AS l ON s.TopicID = l.TopicID AND l.UserID = '.$LoggedUser['ID'].'
JOIN forums_topics AS t ON t.ID = s.TopicID
JOIN forums_topics AS t ON t.ID = s.TopicID
JOIN forums_posts AS p ON t.ID = p.TopicID
JOIN forums AS f ON f.ID = t.ForumID
WHERE p.ID <= IFNULL(l.PostID,t.LastPostID)

View File

@ -45,15 +45,15 @@
list($Page,$Limit) = Format::page_limit(25);
$DB->query("SELECT SQL_CALC_FOUND_ROWS
f.TorrentID,
t.GroupID,
f.Time,
f.Expired,
f.Downloaded,
f.Uses,
g.Name,
t.Format,
t.Encoding
f.TorrentID,
t.GroupID,
f.Time,
f.Expired,
f.Downloaded,
f.Uses,
g.Name,
t.Format,
t.Encoding
FROM users_freeleeches AS f
JOIN torrents AS t ON t.ID = f.TorrentID
JOIN torrents_group AS g ON g.ID = t.GroupID

View File

@ -57,7 +57,7 @@
<div class="header">
<h2>Search articles</h2>
<div class="linkbox">
[<a href="wiki.php?action=create&amp;alias=<?=display_str($Alias->convert($_GET['search']))?>">Create an article</a>] [<a href="wiki.php?action=link&amp;alias=<?=display_str($Alias->convert($_GET['search']))?>">Link this search</a>]
[<a href="wiki.php?action=create&amp;alias=<?=display_str($Alias->convert($_GET['search']))?>">Create an article</a>] [<a href="wiki.php?action=link&amp;alias=<?=display_str($Alias->convert($_GET['search']))?>">Link this search</a>]
</div>
</div>
<div>

View File

@ -46,7 +46,7 @@
// $DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('$NewAlias', '$ArticleID')");
//}
$TitleAlias = $Alias->convert($_POST['title']);
$TitleAlias = $Alias->convert($_POST['title']);
if($TitleAlias!=$Alias) {
$DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('".db_string($TitleAlias)."', '$ArticleID')");
}