mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Empty commit
This commit is contained in:
parent
b1324098d8
commit
df129a5ba5
@ -138,20 +138,10 @@ protected function ip_check($IP,$Gline=false,$Channel=BOT_REPORT_CHAN) {
|
|||||||
$this->send_raw('GLINE *@'.$IP.' 90d :DNSBL Proxy');
|
$this->send_raw('GLINE *@'.$IP.' 90d :DNSBL Proxy');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$IPBans = $Cache->get_value('ip_bans');
|
if(Tools::site_ban_ip($IP)) {
|
||||||
if(!is_array($IPBans)) {
|
$this->send_to($Channel, 'Site IP Ban Detected: '.$IP);
|
||||||
$DB->query("SELECT FromIP, ToIP FROM ip_bans");
|
if ($Gline) {
|
||||||
$IPBans = $DB->to_array();
|
$this->send_raw('GLINE *@'.$IP.' 90d :IP Ban');
|
||||||
$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');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
@ -623,7 +623,7 @@ private function to_html ($Array) {
|
|||||||
$Str.='<a href="wiki.php?action=article&name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>';
|
$Str.='<a href="wiki.php?action=article&name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>';
|
||||||
break;
|
break;
|
||||||
case 'tex':
|
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&chf=bg,s,FFFFFF00&chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&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&chf=bg,s,FFFFFF00&chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" alt="TeX" />';
|
||||||
break;
|
break;
|
||||||
case 'plain':
|
case 'plain':
|
||||||
$Str.=$Block['Val'];
|
$Str.=$Block['Val'];
|
||||||
@ -710,11 +710,11 @@ private function to_html ($Array) {
|
|||||||
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
|
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
|
||||||
}
|
}
|
||||||
else {
|
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&id=1063">wiki</a>.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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&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>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'img':
|
case 'img':
|
||||||
|
@ -440,7 +440,7 @@ function to_html($Array) {
|
|||||||
$Str.='<a href="wiki.php?action=article&name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>';
|
$Str.='<a href="wiki.php?action=article&name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>';
|
||||||
break;
|
break;
|
||||||
case 'tex':
|
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&chf=bg,s,FFFFFF00&chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&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&chf=bg,s,FFFFFF00&chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" alt="TeX" />';
|
||||||
break;
|
break;
|
||||||
case 'plain':
|
case 'plain':
|
||||||
$Str.=$Block['Val'];
|
$Str.=$Block['Val'];
|
||||||
|
@ -111,9 +111,9 @@
|
|||||||
<form class="manage_form" name="messages" action="inbox.php" method="post" id="messageform">
|
<form class="manage_form" name="messages" action="inbox.php" method="post" id="messageform">
|
||||||
<input type="hidden" name="action" value="masschange" />
|
<input type="hidden" name="action" value="masschange" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="submit" name="read" value="Mark as read" />
|
<input type="submit" name="read" value="Mark as read" />
|
||||||
<input type="submit" name="unread" value="Mark as unread" />
|
<input type="submit" name="unread" value="Mark as unread" />
|
||||||
<input type="submit" name="delete" value="Delete message(s)" />
|
<input type="submit" name="delete" value="Delete message(s)" />
|
||||||
|
|
||||||
<table class="message_table checkboxes">
|
<table class="message_table checkboxes">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
|
@ -310,7 +310,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="logcue_tr" class="hidden">
|
<tr id="logcue_tr" class="hidden">
|
||||||
<td class="label">Log / Cue (FLAC only)</td>
|
<td class="label">Log / Cue (CD FLAC only)</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" id="needlog" name="needlog" onchange="ToggleLogScore()" <?=(!empty($NeedLog) ? 'checked="checked" ' : '')?>/><label for="needlog"> Require Log</label>
|
<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"> <input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum Log Score</span>
|
<span id="minlogscore_span" class="hidden"> <input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum Log Score</span>
|
||||||
|
@ -325,7 +325,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<? if(!empty($LogCue)) { ?>
|
<? if(!empty($LogCue)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Required FLAC only extra(s)</td>
|
<td class="label">Required CD FLAC only extra(s)</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$LogCue?>
|
<?=$LogCue?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (($NeedCue || $NeedLog)) {
|
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.";
|
$Err = "Only CD is allowed as media for FLAC Log/Cue Requests.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,17 +68,17 @@
|
|||||||
<li>
|
<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.
|
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>
|
||||||
<li>
|
|
||||||
No language other than English is permitted in the forums. If we can't understand it, we can't moderate it.
|
|
||||||
</li>
|
|
||||||
<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>
|
||||||
<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&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>
|
||||||
<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 you’re 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 post’s 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 you’re 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 post’s appropriateness, send a <a href="staff.php">Staff PM to the Forum Moderators</a> and wait for a reply before proceeding.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<table cellpadding="5" cellspacing="1" border="0" class="border" width="100%">
|
<table cellpadding="5" cellspacing="1" border="0" class="border" width="100%">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td style="width:150px;"><strong>Allowed Client</strong></td>
|
<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>
|
</tr>
|
||||||
<?
|
<?
|
||||||
$Row = 'a';
|
$Row = 'a';
|
||||||
|
@ -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.
|
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>
|
||||||
<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>
|
||||||
<li>
|
<li>
|
||||||
Every collage must have at least 3 torrent groups in it, except for collages of type "Label", "Personal", and "Staff Picks".
|
Every collage must have at least 3 torrent groups in it, except for collages of type "Label", "Personal", and "Staff Picks".
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
<li>One account per person per lifetime. Anyone creating additional accounts will be banned.</li>
|
<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>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>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>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>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 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>
|
<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>
|
||||||
|
@ -17,7 +17,7 @@ function get_fls() {
|
|||||||
JOIN users_main AS m ON m.ID=i.UserID
|
JOIN users_main AS m ON m.ID=i.UserID
|
||||||
JOIN permissions AS p ON p.ID=m.PermissionID
|
JOIN permissions AS p ON p.ID=m.PermissionID
|
||||||
JOIN users_levels AS l ON l.UserID = i.UserID
|
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'));
|
$FLS = $DB->to_array(false, MYSQLI_BOTH, array(3,'Paranoia'));
|
||||||
$Cache->cache_value('fls', $FLS, 180);
|
$Cache->cache_value('fls', $FLS, 180);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<? print_compose_staff_pm(true); ?>
|
<? print_compose_staff_pm(true); ?>
|
||||||
<br />
|
<br />
|
||||||
<h3>First-line Support</h3>
|
<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&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&id=260">this</a> before contacting them.</p>
|
||||||
<table class="staff" width="100%">
|
<table class="staff" width="100%">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td style="width:130px;">Username</td>
|
<td style="width:130px;">Username</td>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<div class="box pad" style="padding:0px 10px 10px 10px;">
|
<div class="box pad" style="padding:0px 10px 10px 10px;">
|
||||||
<br />
|
<br />
|
||||||
<h3>Forum Moderators</h3>
|
<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%">
|
<table class="staff" width="100%">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td style="width:130px;">Username</td>
|
<td style="width:130px;">Username</td>
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
<a href="staffpm.php?view=open">[Open]</a>
|
<a href="staffpm.php?view=open">[Open]</a>
|
||||||
<a href="staffpm.php?view=resolved">[Resolved]</a>
|
<a href="staffpm.php?view=resolved">[Resolved]</a>
|
||||||
<? if ($IsStaff) { ?>
|
<? if ($IsStaff) { ?>
|
||||||
<a href="staffpm.php?action=scoreboard">[Scoreboard]</a>
|
<a href="staffpm.php?action=scoreboard">[Scoreboard]</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -169,10 +169,10 @@
|
|||||||
include('managers/official_tags.php');
|
include('managers/official_tags.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'tag_aliases':
|
case 'tag_aliases':
|
||||||
include('managers/tag_aliases.php');
|
include('managers/tag_aliases.php');
|
||||||
break;
|
break;
|
||||||
case 'permissions':
|
case 'permissions':
|
||||||
if (!check_perms('admin_manage_permissions')) { error(403); }
|
if (!check_perms('admin_manage_permissions')) { error(403); }
|
||||||
|
|
||||||
if (!empty($_REQUEST['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
@ -218,15 +218,15 @@
|
|||||||
if (!$Err) {
|
if (!$Err) {
|
||||||
if (!is_numeric($_REQUEST['id'])) {
|
if (!is_numeric($_REQUEST['id'])) {
|
||||||
$DB->query("INSERT INTO permissions (Level,Name,Secondary,PermittedForums,`Values`,DisplayStaff)
|
$DB->query("INSERT INTO permissions (Level,Name,Secondary,PermittedForums,`Values`,DisplayStaff)
|
||||||
VALUES ('".db_string($Level)."',
|
VALUES ('".db_string($Level)."',
|
||||||
'".db_string($Name)."',
|
'".db_string($Name)."',
|
||||||
".$Secondary.",
|
".$Secondary.",
|
||||||
'".db_string($Forums)."',
|
'".db_string($Forums)."',
|
||||||
'".db_string(serialize($Values))."',
|
'".db_string(serialize($Values))."',
|
||||||
'".db_string($DisplayStaff)."')");
|
'".db_string($DisplayStaff)."')");
|
||||||
} else {
|
} else {
|
||||||
$DB->query("UPDATE permissions SET Level='".db_string($Level)."',
|
$DB->query("UPDATE permissions SET Level='".db_string($Level)."',
|
||||||
Name='".db_string($Name)."',
|
Name='".db_string($Name)."',
|
||||||
Secondary=".$Secondary.",
|
Secondary=".$Secondary.",
|
||||||
PermittedForums='".db_string($Forums)."',
|
PermittedForums='".db_string($Forums)."',
|
||||||
`Values`='".db_string(serialize($Values))."',
|
`Values`='".db_string(serialize($Values))."',
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
if (isset($_POST['submit'])) {
|
if (isset($_POST['submit'])) {
|
||||||
authorize();
|
authorize();
|
||||||
|
|
||||||
|
$IPA = substr($_POST['start'], 0, strcspn($_POST['start'], '.'));
|
||||||
if ($_POST['submit'] == 'Delete') { //Delete
|
if ($_POST['submit'] == 'Delete') { //Delete
|
||||||
if(!is_number($_POST['id']) || $_POST['id'] == ''){ error(0); }
|
if(!is_number($_POST['id']) || $_POST['id'] == ''){ error(0); }
|
||||||
$DB->query('DELETE FROM ip_bans WHERE ID='.$_POST['id']);
|
$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
|
} 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('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'));
|
$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',
|
ToIP='$End',
|
||||||
Reason='$Notes'
|
Reason='$Notes'
|
||||||
WHERE ID='".$_POST['id']."'");
|
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
|
} else { //Create
|
||||||
$DB->query("INSERT INTO ip_bans
|
$DB->query("INSERT INTO ip_bans
|
||||||
(FromIP, ToIP, Reason) VALUES
|
(FromIP, ToIP, Reason) VALUES
|
||||||
('$Start','$End', '$Notes')");
|
('$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!check_perms('admin_manage_ipbans')) { error(403); }
|
if (!check_perms('admin_manage_ipbans')) { error(403); }
|
||||||
if(isset($_GET['perform'])) {
|
if (isset($_GET['perform'])) {
|
||||||
if($_GET['perform'] == 'delete') {
|
$IPA = substr($_GET['ip'], 0, strcspn($_GET['ip'], '.'));
|
||||||
if(!is_number($_GET['id']) || $_GET['id'] == ''){ error(0); }
|
if ($_GET['perform'] == 'delete') {
|
||||||
$DB->query('DELETE FROM ip_bans WHERE ID='.$_GET['id']);
|
if (!is_number($_GET['id']) || $_GET['id'] == '') {
|
||||||
$Bans = $Cache->delete_value('ip_bans');
|
error(0);
|
||||||
}
|
}
|
||||||
elseif($_GET['perform'] == 'create') {
|
$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']);
|
$Notes = db_string($_GET['notes']);
|
||||||
$IP = Tools::ip_to_unsigned($_GET['ip']); //Sanitized by Validation regex
|
$IP = Tools::ip_to_unsigned($_GET['ip']); //Sanitized by Validation regex
|
||||||
$DB->query("INSERT INTO ip_bans
|
$DB->query("INSERT INTO ip_bans
|
||||||
(FromIP, ToIP, Reason) VALUES
|
(FromIP, ToIP, Reason) VALUES
|
||||||
('$IP','$IP', '$Notes')");
|
('$IP','$IP', '$Notes')");
|
||||||
$ID = $DB->inserted_id();
|
$Cache->delete_value('ip_bans_'.$IPA);
|
||||||
$Bans = $Cache->get_value('ip_bans');
|
|
||||||
$Bans[$ID] = array($ID, $Start, $End);
|
|
||||||
$Cache->cache_value('ip_bans', $Bans, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
$Tags = explode(',', $_POST['tagname']);
|
$Tags = explode(',', $_POST['tagname']);
|
||||||
foreach($Tags as $TagName) {
|
foreach($Tags as $TagName) {
|
||||||
$TagName = Misc::sanitize_tag($TagName);
|
$TagName = Misc::sanitize_tag($TagName);
|
||||||
|
|
||||||
if(!empty($TagName)) {
|
if(!empty($TagName)) {
|
||||||
$TagName = Misc::get_alias_tag($TagName);
|
$TagName = Misc::get_alias_tag($TagName);
|
||||||
// Check DB for tag matching name
|
// Check DB for tag matching name
|
||||||
$DB->query("SELECT t.ID FROM tags AS t WHERE t.Name LIKE '".$TagName."'");
|
$DB->query("SELECT t.ID FROM tags AS t WHERE t.Name LIKE '".$TagName."'");
|
||||||
list($TagID) = $DB->next_record();
|
list($TagID) = $DB->next_record();
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<? if(!$GroupID) { ?>
|
<? if(!$GroupID) { ?>
|
||||||
<a href="log.php?search=Torrent+<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)
|
<a href="log.php?search=Torrent+<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)
|
||||||
<? } else {?>
|
<? } else {?>
|
||||||
<?=$LinkName?>
|
<?=$LinkName?>
|
||||||
<a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
|
<a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
|
||||||
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
enforce_login();
|
enforce_login();
|
||||||
$TorrentPass = $LoggedUser['torrent_pass'];
|
$TorrentPass = $LoggedUser['torrent_pass'];
|
||||||
$DownloadAlt = $LoggedUser['DownloadAlt'];
|
$DownloadAlt = $LoggedUser['DownloadAlt'];
|
||||||
$UserID = $LoggedUser['ID'];
|
$UserID = $LoggedUser['ID'];
|
||||||
$AuthKey = $LoggedUser['AuthKey'];
|
$AuthKey = $LoggedUser['AuthKey'];
|
||||||
} else {
|
} else {
|
||||||
$UserInfo = $Cache->get_value('user_'.$_REQUEST['torrent_pass']);
|
$UserInfo = $Cache->get_value('user_'.$_REQUEST['torrent_pass']);
|
||||||
if(!is_array($UserInfo)) {
|
if(!is_array($UserInfo)) {
|
||||||
@ -33,12 +33,12 @@
|
|||||||
if (!is_number($TorrentID)){ error(0); }
|
if (!is_number($TorrentID)){ error(0); }
|
||||||
|
|
||||||
/* uTorrent remote redownloads .torrent files every fifteen minutes
|
/* uTorrent remote redownloads .torrent files every fifteen minutes
|
||||||
to prevent this retardation from blowing bandwidth etc., let's block it
|
to prevent this retardation from blowing bandwidth etc., let's block it
|
||||||
if he's downloaded the .torrent file twice before */
|
if he's downloaded the .torrent file twice before */
|
||||||
if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== FALSE) {
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== FALSE) {
|
||||||
$DB->query("SELECT 1 FROM users_downloads WHERE UserID=$UserID AND TorrentID=$TorrentID LIMIT 3");
|
$DB->query("SELECT 1 FROM users_downloads WHERE UserID=$UserID AND TorrentID=$TorrentID LIMIT 3");
|
||||||
if ($DB->record_count() > 2) {
|
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();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,10 +96,10 @@
|
|||||||
|
|
||||||
if (!Torrents::has_token($TorrentID)) {
|
if (!Torrents::has_token($TorrentID)) {
|
||||||
if ($FLTokens <= 0) {
|
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) {
|
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
|
// Let the tracker know about this
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?
|
<?
|
||||||
//*********************************************************************//
|
//**********************************************************************//
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||||
// This page relies on the TORRENT_FORM class. All it does is call //
|
// This page relies on the TORRENT_FORM class. All it does is call //
|
||||||
// the necessary functions. //
|
// the necessary functions. //
|
||||||
//---------------------------------------------------------------------//
|
//----------------------------------------------------------------------//
|
||||||
// At the bottom, there are grouping functions which are off limits to //
|
// At the bottom, there are grouping functions which are off limits to //
|
||||||
// most members. //
|
// most members. //
|
||||||
//*********************************************************************//
|
//**********************************************************************//
|
||||||
|
|
||||||
require(SERVER_ROOT.'/classes/class_torrent_form.php');
|
require(SERVER_ROOT.'/classes/class_torrent_form.php');
|
||||||
|
|
||||||
|
@ -55,19 +55,19 @@
|
|||||||
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
||||||
<h3>Description</h3>
|
<h3>Description</h3>
|
||||||
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea><br />
|
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea><br />
|
||||||
<? if($CategoryID == 1) { ?>
|
<? if($CategoryID == 1) { ?>
|
||||||
<select id="releasetype" name="releasetype">
|
<select id="releasetype" name="releasetype">
|
||||||
<? foreach ($ReleaseTypes as $Key => $Val) { ?>
|
<? foreach ($ReleaseTypes as $Key => $Val) { ?>
|
||||||
<option value='<?=$Key?>' <?=($Key == $ReleaseType ? " selected='selected'" : '')?>>
|
<option value='<?=$Key?>' <?=($Key == $ReleaseType ? " selected='selected'" : '')?>>
|
||||||
<?=$Val?>
|
<?=$Val?>
|
||||||
</option>
|
</option>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</select>
|
</select>
|
||||||
<? if (check_perms('torrents_edit_vanityhouse')) { ?>
|
<? if (check_perms('torrents_edit_vanityhouse')) { ?>
|
||||||
<br />
|
<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>
|
<h3>Edit summary</h3>
|
||||||
<input type="text" name="summary" size="92" /><br />
|
<input type="text" name="summary" size="92" /><br />
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
|
@ -357,12 +357,12 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) {
|
|||||||
error(403);
|
error(403);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'warn' :
|
case 'warn' :
|
||||||
include(SERVER_ROOT.'/sections/torrents/warn.php');
|
include(SERVER_ROOT.'/sections/torrents/warn.php');
|
||||||
break;
|
break;
|
||||||
case 'take_warn' :
|
case 'take_warn' :
|
||||||
include(SERVER_ROOT.'/sections/torrents/take_warn.php');
|
include(SERVER_ROOT.'/sections/torrents/take_warn.php');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
enforce_login();
|
enforce_login();
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
} else {
|
} else {
|
||||||
authorize();
|
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
|
// 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'");
|
$DB->query("SELECT UserID FROM users_votes WHERE GroupID='$GroupID'");
|
||||||
while (list($UserID) = $DB->next_record()) {
|
while (list($UserID) = $DB->next_record()) {
|
||||||
@ -64,12 +64,12 @@
|
|||||||
$DB->query("DELETE FROM users_votes WHERE GroupID='$GroupID'");
|
$DB->query("DELETE FROM users_votes WHERE GroupID='$GroupID'");
|
||||||
$DB->query("INSERT INTO torrents_votes (GroupID, Ups, Total, Score)
|
$DB->query("INSERT INTO torrents_votes (GroupID, Ups, Total, Score)
|
||||||
SELECT $NewGroupID, UpVotes, TotalVotes, VoteScore
|
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,
|
COUNT(1) AS TotalVotes,
|
||||||
binomial_ci(IFNULL(SUM(IF(Type='Up',1,0)),0), COUNT(1)) AS VoteScore
|
binomial_ci(IFNULL(SUM(IF(Type='Up',1,0)),0), COUNT(1)) AS VoteScore
|
||||||
FROM users_votes
|
FROM users_votes
|
||||||
WHERE GroupID = $NewGroupID
|
WHERE GroupID = $NewGroupID
|
||||||
GROUP BY GroupID) AS a
|
GROUP BY GroupID) AS a
|
||||||
ON DUPLICATE KEY UPDATE
|
ON DUPLICATE KEY UPDATE
|
||||||
Ups = a.UpVotes,
|
Ups = a.UpVotes,
|
||||||
Total = a.TotalVotes,
|
Total = a.TotalVotes,
|
||||||
@ -126,4 +126,4 @@
|
|||||||
|
|
||||||
header('Location: torrents.php?id='.$GroupID);
|
header('Location: torrents.php?id='.$GroupID);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -190,7 +190,7 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
|||||||
<div class="notify_filter_links">
|
<div class="notify_filter_links">
|
||||||
<a href="javascript:GroupClear($('#notificationform_<?=$FilterID?>').raw())" class="brackets">Clear selected in filter</a>
|
<a href="javascript:GroupClear($('#notificationform_<?=$FilterID?>').raw())" class="brackets">Clear selected in filter</a>
|
||||||
<a href="torrents.php?action=notify_clear_filter&filterid=<?=$FilterID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Clear all old in filter</a>
|
<a href="torrents.php?action=notify_clear_filter&filterid=<?=$FilterID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Clear all old in filter</a>
|
||||||
<a href="torrents.php?action=notify_catchup_filter&filterid=<?=$FilterID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Mark all in filter as read</a>
|
<a href="torrents.php?action=notify_catchup_filter&filterid=<?=$FilterID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Mark all in filter as read</a>
|
||||||
</div>
|
</div>
|
||||||
<form class="manage_form" name="torrents" id="notificationform_<?=$FilterID?>" action="">
|
<form class="manage_form" name="torrents" id="notificationform_<?=$FilterID?>" action="">
|
||||||
<table class="torrent_table cats checkboxes border">
|
<table class="torrent_table cats checkboxes border">
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
Torrents::update_hash($GroupID);
|
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);
|
Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "renamed to ".$NewName." from ".$OldName, 0);
|
||||||
|
|
||||||
header('Location: torrents.php?id='.$GroupID);
|
header('Location: torrents.php?id='.$GroupID);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?
|
<?
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
//--------------- Take edit ----------------------------------------------------//
|
//--------------- Take edit ----------------------------------------------------//
|
||||||
// This pages handles the backend of the 'edit torrent' function. It checks //
|
// 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 //
|
// the data, and if it all validates, it edits the values in the database //
|
||||||
// that correspond to the torrent in question. //
|
// that correspond to the torrent in question. //
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
|
|
||||||
enforce_login();
|
enforce_login();
|
||||||
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
//--------------- Set $Properties array ----------------------------------------//
|
//--------------- 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. //
|
// it into the database. //
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
|
|
||||||
$Properties=array();
|
$Properties=array();
|
||||||
@ -297,9 +297,9 @@
|
|||||||
if(check_perms('users_mod')) {
|
if(check_perms('users_mod')) {
|
||||||
if($T[Format] != "'FLAC'") {
|
if($T[Format] != "'FLAC'") {
|
||||||
$SQL .= "
|
$SQL .= "
|
||||||
HasLog='0',
|
HasLog='0',
|
||||||
HasCue='0',
|
HasCue='0',
|
||||||
";
|
";
|
||||||
} else {
|
} else {
|
||||||
$SQL .= "
|
$SQL .= "
|
||||||
HasLog=$T[HasLog],
|
HasLog=$T[HasLog],
|
||||||
@ -352,20 +352,20 @@
|
|||||||
list($caID) = $DB->next_record();
|
list($caID) = $DB->next_record();
|
||||||
|
|
||||||
if (!$caID && $Properties['CassetteApproved']) {
|
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']) {
|
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'");
|
$DB->query("SELECT TorrentID FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'");
|
||||||
list($lmaID) = $DB->next_record();
|
list($lmaID) = $DB->next_record();
|
||||||
|
|
||||||
if (!$lmaID && $Properties['LossymasterApproved']) {
|
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']) {
|
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'");
|
$DB->query("SELECT TorrentID FROM torrents_lossyweb_approved WHERE TorrentID='$TorrentID'");
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
if(!preg_match("/^".IMAGE_REGEX."$/i", $Image)) {
|
if(!preg_match("/^".IMAGE_REGEX."$/i", $Image)) {
|
||||||
$Image = '';
|
$Image = '';
|
||||||
}
|
}
|
||||||
check_imagehost($Image);
|
check_imagehost($Image);
|
||||||
$Summary = db_string($_POST['summary']);
|
$Summary = db_string($_POST['summary']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
$GroupVotes = Votes::get_group_votes($GroupID);
|
$GroupVotes = Votes::get_group_votes($GroupID);
|
||||||
|
|
||||||
$TotalVotes = $GroupVotes['Total'];
|
$TotalVotes = $GroupVotes['Total'];
|
||||||
$UpVotes = $GroupVotes['Ups'];
|
$UpVotes = $GroupVotes['Ups'];
|
||||||
|
|
||||||
$Voted = isset($UserVotes[$GroupID])?$UserVotes[$GroupID]['Type']:false;
|
$Voted = isset($UserVotes[$GroupID])?$UserVotes[$GroupID]['Type']:false;
|
||||||
?>
|
?>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
$Key = (int) $_POST['key'];
|
$Key = (int) $_POST['key'];
|
||||||
$UserInfo = Users::user_info($UserID);
|
$UserInfo = Users::user_info($UserID);
|
||||||
$DB -> query("SELECT
|
$DB -> query("SELECT
|
||||||
tc.Body,
|
tc.Body,
|
||||||
tc.AddedTime
|
tc.AddedTime
|
||||||
FROM torrents_comments AS tc
|
FROM torrents_comments AS tc
|
||||||
WHERE tc.ID='" . db_string($PostID) . "'");
|
WHERE tc.ID='" . db_string($PostID) . "'");
|
||||||
list($PostBody) = $DB -> next_record();
|
list($PostBody) = $DB -> next_record();
|
||||||
|
|
||||||
View::show_header('Warn User');
|
View::show_header('Warn User');
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?
|
<?
|
||||||
//*********************************************************************//
|
//**********************************************************************//
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||||
// This page relies on the TORRENT_FORM class. All it does is call //
|
// This page relies on the TORRENT_FORM class. All it does is call //
|
||||||
// the necessary functions. //
|
// the necessary functions. //
|
||||||
//---------------------------------------------------------------------//
|
//----------------------------------------------------------------------//
|
||||||
// $Properties, $Err and $UploadForm are set in takeupload.php, and //
|
// $Properties, $Err and $UploadForm are set in takeupload.php, and //
|
||||||
// are only used when the form doesn't validate and this page must be //
|
// are only used when the form doesn't validate and this page must be //
|
||||||
// called again. //
|
// called again. //
|
||||||
//*********************************************************************//
|
//**********************************************************************//
|
||||||
|
|
||||||
ini_set('max_file_uploads','100');
|
ini_set('max_file_uploads','100');
|
||||||
View::show_header('Upload','upload,jquery,valid_tags,musicbrainz,multiformat_uploader');
|
View::show_header('Upload','upload,jquery,valid_tags,musicbrainz,multiformat_uploader');
|
||||||
@ -82,7 +82,7 @@
|
|||||||
$GenreTags = $Cache->get_value('genre_tags');
|
$GenreTags = $Cache->get_value('genre_tags');
|
||||||
if(!$GenreTags) {
|
if(!$GenreTags) {
|
||||||
$DB->query("SELECT Name FROM tags WHERE TagType='genre' ORDER BY Name");
|
$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);
|
$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><?=$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.
|
<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) { ?>
|
<? 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>
|
</p>
|
||||||
<table id="dnulist" class="<?=($HideDNU?'hidden':'')?>">
|
<table id="dnulist" class="<?=($HideDNU?'hidden':'')?>">
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?
|
<?
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
//--------------- Take upload --------------------------------------------------//
|
//--------------- Take upload --------------------------------------------------//
|
||||||
// This pages handles the backend of the torrent upload function. It checks //
|
// 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, and if it all validates, it builds the torrent file, then writes //
|
||||||
// the data to the database and the torrent to the disk. //
|
// the data to the database and the torrent to the disk. //
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
//--------------- Set $Properties array ----------------------------------------//
|
//--------------- 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. //
|
// it into the database. //
|
||||||
|
|
||||||
$Properties=array();
|
$Properties=array();
|
||||||
@ -760,12 +760,12 @@
|
|||||||
|
|
||||||
foreach($GroupInfo[1] as $TorrentInfo) {
|
foreach($GroupInfo[1] as $TorrentInfo) {
|
||||||
if (($TorrentInfo['Media'] == $ThisMedia)
|
if (($TorrentInfo['Media'] == $ThisMedia)
|
||||||
&& ($TorrentInfo['Remastered'] == $ThisRemastered)
|
&& ($TorrentInfo['Remastered'] == $ThisRemastered)
|
||||||
&& ($TorrentInfo['RemasterYear'] == (int)$ThisRemasterYear)
|
&& ($TorrentInfo['RemasterYear'] == (int)$ThisRemasterYear)
|
||||||
&& ($TorrentInfo['RemasterTitle'] == $ThisRemasterTitle)
|
&& ($TorrentInfo['RemasterTitle'] == $ThisRemasterTitle)
|
||||||
&& ($TorrentInfo['RemasterRecordLabel'] == $ThisRemasterRecordLabel)
|
&& ($TorrentInfo['RemasterRecordLabel'] == $ThisRemasterRecordLabel)
|
||||||
&& ($TorrentInfo['RemasterCatalogueNumber'] == $ThisRemasterCatalogueNumber)
|
&& ($TorrentInfo['RemasterCatalogueNumber'] == $ThisRemasterCatalogueNumber)
|
||||||
&& ($TorrentInfo['ID'] != $TorrentID)) {
|
&& ($TorrentInfo['ID'] != $TorrentID)) {
|
||||||
$UsedFormatBitrates[] = array('format' => $TorrentInfo['Format'], 'bitrate' => $TorrentInfo['Encoding']);
|
$UsedFormatBitrates[] = array('format' => $TorrentInfo['Format'], 'bitrate' => $TorrentInfo['Encoding']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -843,21 +843,21 @@
|
|||||||
|
|
||||||
|
|
||||||
if($Properties['Format']) {
|
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 {
|
} else {
|
||||||
$SQL.=" AND (Formats='') ";
|
$SQL.=" AND (Formats='') ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_POST['bitrate']) {
|
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 {
|
} else {
|
||||||
$SQL.=" AND (Encodings='') ";
|
$SQL.=" AND (Encodings='') ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Properties['Media']) {
|
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 {
|
} else {
|
||||||
$SQL.=" AND (Media='') ";
|
$SQL.=" AND (Media='') ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Either they aren't using NewGroupsOnly
|
// Either they aren't using NewGroupsOnly
|
||||||
|
@ -43,29 +43,29 @@
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
if (($Override=check_paranoia_here('collages+'))) { ?>
|
if (($Override=check_paranoia_here('collages+'))) { ?>
|
||||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Collages started: <?=number_format($NumCollages)?>
|
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Collages started: <?=number_format($NumCollages)?>
|
||||||
<? if(($Override=check_paranoia_here('collages'))) { ?>[<a <?= ($Override===2) ? 'class="paranoia_override"'
|
<? if(($Override=check_paranoia_here('collages'))) { ?>[<a <?= ($Override===2) ? 'class="paranoia_override"'
|
||||||
:'' ?>
|
:'' ?>
|
||||||
href="collages.php?userid=<?=$UserID?>" title="View">View</a>]
|
href="collages.php?userid=<?=$UserID?>" title="View">View</a>]
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</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);
|
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Collages contributed to: <? echo number_format($NumCollageContribs);
|
||||||
if (($Override=check_paranoia_here('collagecontribs'))) {
|
if (($Override=check_paranoia_here('collagecontribs'))) {
|
||||||
?> [<a <?= ($Override===2) ?
|
?> [<a <?= ($Override===2) ?
|
||||||
'class="paranoia_override"' : ''?> href="collages.php?userid=<?=$UserID?>&contrib=1" title="View">View</a>]
|
'class="paranoia_override"' : ''?> href="collages.php?userid=<?=$UserID?>&contrib=1" title="View">View</a>]
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
|
|
||||||
//Let's see if we can view requests because of reasons
|
//Let's see if we can view requests because of reasons
|
||||||
$ViewAll = check_paranoia_here('requestsfilled_list');
|
$ViewAll = check_paranoia_here('requestsfilled_list');
|
||||||
$ViewCount = check_paranoia_here('requestsfilled_count');
|
$ViewCount = check_paranoia_here('requestsfilled_count');
|
||||||
$ViewBounty = check_paranoia_here('requestsfilled_bounty');
|
$ViewBounty = check_paranoia_here('requestsfilled_bounty');
|
||||||
|
|
||||||
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
|
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
|
||||||
<li>Requests filled: <?=number_format($RequestsFilled)?></li>
|
<li>Requests filled: <?=number_format($RequestsFilled)?></li>
|
||||||
<? } elseif(!$ViewCount && $ViewBounty && !$ViewAll) { ?>
|
<? } elseif(!$ViewCount && $ViewBounty && !$ViewAll) { ?>
|
||||||
<li>Requests voted: <?=Format::get_size($TotalSpent)?> collected</li>
|
<li>Requests voted: <?=Format::get_size($TotalSpent)?> collected</li>
|
||||||
@ -80,11 +80,11 @@
|
|||||||
<? }
|
<? }
|
||||||
|
|
||||||
//Let's see if we can view requests because of reasons
|
//Let's see if we can view requests because of reasons
|
||||||
$ViewAll = check_paranoia_here('requestsvoted_list');
|
$ViewAll = check_paranoia_here('requestsvoted_list');
|
||||||
$ViewCount = check_paranoia_here('requestsvoted_count');
|
$ViewCount = check_paranoia_here('requestsvoted_count');
|
||||||
$ViewBounty = check_paranoia_here('requestsvoted_bounty');
|
$ViewBounty = check_paranoia_here('requestsvoted_bounty');
|
||||||
|
|
||||||
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
|
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
|
||||||
<li>Requests voted: <?=number_format($RequestsVoted)?></li>
|
<li>Requests voted: <?=number_format($RequestsVoted)?></li>
|
||||||
<? } elseif(!$ViewCount && $ViewBounty && !$ViewAll) { ?>
|
<? } elseif(!$ViewCount && $ViewBounty && !$ViewAll) { ?>
|
||||||
<li>Requests voted: <?=Format::get_size($TotalSpent)?> spent</li>
|
<li>Requests voted: <?=Format::get_size($TotalSpent)?> spent</li>
|
||||||
@ -97,13 +97,13 @@
|
|||||||
[<a href="requests.php?type=voted&userid=<?=$UserID?>" <?= ($ViewAll===2) ? 'class="paranoia_override"' : ''?> title="View">View</a>]
|
[<a href="requests.php?type=voted&userid=<?=$UserID?>" <?= ($ViewAll===2) ? 'class="paranoia_override"' : ''?> title="View">View</a>]
|
||||||
</li>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
if (($Override=check_paranoia_here('uploads+'))) { ?>
|
if (($Override=check_paranoia_here('uploads+'))) { ?>
|
||||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Uploaded: <?=number_format($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&userid=<?=$UserID?>" title="View">View</a>]<? if(check_perms('zip_downloader')) { ?> [<a href="torrents.php?action=redownload&type=uploads&userid=<?=$UserID?>"
|
<? if(($Override=check_paranoia_here('uploads'))) { ?>[<a <?= $Override===2 ? 'class="paranoia_override"' :'' ?> href="torrents.php?type=uploaded&userid=<?=$UserID?>" title="View">View</a>]<? if(check_perms('zip_downloader')) { ?> [<a href="torrents.php?action=redownload&type=uploads&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>]<? } } ?>
|
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>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
if (($Override=check_paranoia_here('uniquegroups+'))) { ?>
|
if (($Override=check_paranoia_here('uniquegroups+'))) { ?>
|
||||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>
|
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>
|
||||||
Unique groups: <?echo number_format($UniqueGroups);
|
Unique groups: <?echo number_format($UniqueGroups);
|
||||||
if(($Override=check_paranoia_here('uniquegroups'))) {?>
|
if(($Override=check_paranoia_here('uniquegroups'))) {?>
|
||||||
@ -111,12 +111,12 @@
|
|||||||
<?}?>
|
<?}?>
|
||||||
</li>
|
</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);
|
<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&userid=<?=$UserID?>&filter=perfectflac">View</a>]</li>
|
[<a <?= $Override===2 ? 'class="paranoia_override"' :'' ?> href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=perfectflac">View</a>]</li>
|
||||||
<? }
|
<? }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_paranoia_here('seeding+') || check_paranoia_here('leeching+')) {
|
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");
|
$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>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
if (($Override=check_paranoia_here('leeching+'))) { ?>
|
if (($Override=check_paranoia_here('leeching+'))) { ?>
|
||||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Leeching: <? echo number_format($Leeching);
|
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Leeching: <? echo number_format($Leeching);
|
||||||
if(($Override=check_paranoia_here('leeching'))) { ?>
|
if(($Override=check_paranoia_here('leeching'))) { ?>
|
||||||
[<a <?= $Override===2 ? 'class="paranoia_override"' : ''?> href="torrents.php?type=leeching&userid=<?=$UserID?>" title="View">View</a>]
|
[<a <?= $Override===2 ? 'class="paranoia_override"' : ''?> href="torrents.php?type=leeching&userid=<?=$UserID?>" title="View">View</a>]
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
die('Invalid IP');
|
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');
|
die('Invalid Port');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<form class="manage_form" name="connections" action="javascript:check_ip();" method="get">
|
<form class="manage_form" name="connections" action="javascript:check_ip();" method="get">
|
||||||
<table class="layout">
|
<table class="layout">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">IP</td>
|
<td class="label">IP address</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" id="ip" name="ip" value="<?=$_SERVER['REMOTE_ADDR']?>" size="20" />
|
<input type="text" id="ip" name="ip" value="<?=$_SERVER['REMOTE_ADDR']?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<div id="result" class="box pad"></div>
|
<div id="result" class="box pad"></div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">//<![CDATA[
|
||||||
var result = $('#result').raw();
|
var result = $('#result').raw();
|
||||||
|
|
||||||
function check_ip() {
|
function check_ip() {
|
||||||
@ -68,5 +68,6 @@ function check_ip() {
|
|||||||
result.innerHTML = response;
|
result.innerHTML = response;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<? View::show_footer(); ?>
|
<? View::show_footer(); ?>
|
||||||
|
@ -37,15 +37,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function paranoia_level($Setting) {
|
function paranoia_level($Setting) {
|
||||||
global $Paranoia;
|
global $Paranoia;
|
||||||
// 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid
|
// 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid
|
||||||
return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2);
|
return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_paranoia($FieldName) {
|
function display_paranoia($FieldName) {
|
||||||
$Level = paranoia_level($FieldName);
|
$Level = paranoia_level($FieldName);
|
||||||
print '<label><input type="checkbox" name="p_'.$FieldName.'_c" '.checked($Level >= 1).' onchange="AlterParanoia()" /> Show count</label>'." \n";
|
print '<label><input type="checkbox" name="p_'.$FieldName.'_c" '.checked($Level >= 1).' onchange="AlterParanoia()" /> Show count</label>'." \n";
|
||||||
print '<label><input type="checkbox" name="p_'.$FieldName.'_l" '.checked($Level >= 2).' onchange="AlterParanoia()" /> Show list</label>';
|
print '<label><input type="checkbox" name="p_'.$FieldName.'_l" '.checked($Level >= 2).' onchange="AlterParanoia()" /> Show list</label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function checked($Checked) {
|
function checked($Checked) {
|
||||||
@ -89,7 +89,7 @@ function checked($Checked) {
|
|||||||
<td>
|
<td>
|
||||||
<select name="stylesheet" id="stylesheet">
|
<select name="stylesheet" id="stylesheet">
|
||||||
<? foreach($Stylesheets as $Style) { ?>
|
<? 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>
|
</select>
|
||||||
- Or -
|
- Or -
|
||||||
@ -101,8 +101,8 @@ function checked($Checked) {
|
|||||||
<td class="label"><strong>Default search type</strong></td>
|
<td class="label"><strong>Default search type</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchtype" id="searchtype">
|
<select name="searchtype" id="searchtype">
|
||||||
<option value="0"<? if ($SiteOptions['SearchType'] == 0) { ?>selected="selected"<? } ?>>Simple</option>
|
<option value="0"<? if ($SiteOptions['SearchType'] == 0) { ?> selected="selected"<? } ?>>Simple</option>
|
||||||
<option value="1"<? if ($SiteOptions['SearchType'] == 1) { ?>selected="selected"<? } ?>>Advanced</option>
|
<option value="1"<? if ($SiteOptions['SearchType'] == 1) { ?> selected="selected"<? } ?>>Advanced</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -111,12 +111,12 @@ function checked($Checked) {
|
|||||||
<td class="label"><strong>Torrent grouping</strong></td>
|
<td class="label"><strong>Torrent grouping</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="disablegrouping" id="disablegrouping">
|
<select name="disablegrouping" id="disablegrouping">
|
||||||
<option value="0"<? if ($SiteOptions['DisableGrouping2'] == 0) { ?>selected="selected"<? } ?>>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>
|
<option value="1"<? if ($SiteOptions['DisableGrouping2'] == 1) { ?> selected="selected"<? } ?>>DO NOT group torrents by default</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="torrentgrouping" id="torrentgrouping">
|
<select name="torrentgrouping" id="torrentgrouping">
|
||||||
<option value="0"<? if ($SiteOptions['TorrentGrouping'] == 0) { ?>selected="selected"<? } ?>>Groups are open 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>
|
<option value="1"<? if ($SiteOptions['TorrentGrouping'] == 1) { ?> selected="selected"<? } ?>>Groups are closed by default</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -124,15 +124,15 @@ function checked($Checked) {
|
|||||||
<td class="label"><strong>Discography view</strong></td>
|
<td class="label"><strong>Discography view</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="discogview" id="discogview">
|
<select name="discogview" id="discogview">
|
||||||
<option value="0"<? if ($SiteOptions['DiscogView'] == 0) { ?>selected="selected"<? } ?>>Open 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>
|
<option value="1"<? if ($SiteOptions['DiscogView'] == 1) { ?> selected="selected"<? } ?>>Closed by default</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><strong>Show snatched torrents</strong></td>
|
<td class="label"><strong>Show snatched torrents</strong></td>
|
||||||
<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>
|
<label for="showsnatched">Display "Snatched!" next to snatched torrents</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -140,9 +140,9 @@ function checked($Checked) {
|
|||||||
<td class="label"><strong>Forum posts per page</strong></td>
|
<td class="label"><strong>Forum posts per page</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="postsperpage" id="postsperpage">
|
<select name="postsperpage" id="postsperpage">
|
||||||
<option value="25"<? if ($SiteOptions['PostsPerPage'] == 25) { ?>selected="selected"<? } ?>>25 (Default)</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="50"<? if ($SiteOptions['PostsPerPage'] == 50) { ?> selected="selected"<? } ?>>50</option>
|
||||||
<option value="100"<? if ($SiteOptions['PostsPerPage'] == 100) { ?>selected="selected"<? } ?>>100</option>
|
<option value="100"<? if ($SiteOptions['PostsPerPage'] == 100) { ?> selected="selected"<? } ?>>100</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -216,52 +216,52 @@ function checked($Checked) {
|
|||||||
<label for="disablesmileys">Disable smileys</label>
|
<label for="disablesmileys">Disable smileys</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td class="label"><strong>Avatars</strong></td>
|
<td class="label"><strong>Mature content</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="disableavatars" id="disableavatars" onclick="ToggleIdenticons();">
|
<input type="checkbox" name="enablematurecontent" id="enablematurecontent" <? if (!empty($SiteOptions['EnableMatureContent'])) { ?>checked="checked"<? } ?> />
|
||||||
<option value="1" <? if($SiteOptions['DisableAvatars'] == 1) { ?> selected="selected" <? } ?>/>Disable avatars</option>
|
<label for="enablematurecontent">Show mature content</label>
|
||||||
<option value="0" <? if($SiteOptions['DisableAvatars'] == 0) { ?> selected="selected" <? } ?>/>Show avatars</option>
|
</td>
|
||||||
<option value="2" <? if($SiteOptions['DisableAvatars'] == 2) { ?> selected="selected" <? } ?>/>Show avatars or:</option>
|
</tr>
|
||||||
<option value="3" <? if($SiteOptions['DisableAvatars'] == 3) { ?> selected="selected" <? } ?>/>Replace all avatars with:</option>
|
<tr>
|
||||||
</select>
|
<td class="label"><strong>Avatars</strong></td>
|
||||||
<select name="identicons" id="identicons">
|
<td>
|
||||||
<option value="0" <? if($SiteOptions['Identicons'] == 0) { ?> selected="selected" <? } ?>/>Identicon</option>
|
<select name="disableavatars" id="disableavatars" onclick="ToggleIdenticons();">
|
||||||
<option value="1" <? if($SiteOptions['Identicons'] == 1) { ?> selected="selected" <? } ?>/>MonsterID</option>
|
<option value="1" <? if($SiteOptions['DisableAvatars'] == 1) { ?>selected="selected" <? } ?>/>Disable avatars</option>
|
||||||
<option value="2" <? if($SiteOptions['Identicons'] == 2) { ?> selected="selected" <? } ?>/>Wavatar</option>
|
<option value="0" <? if($SiteOptions['DisableAvatars'] == 0) { ?>selected="selected" <? } ?>/>Show avatars</option>
|
||||||
<option value="3" <? if($SiteOptions['Identicons'] == 3) { ?> selected="selected" <? } ?>/>Retro</option>
|
<option value="2" <? if($SiteOptions['DisableAvatars'] == 2) { ?>selected="selected" <? } ?>/>Show avatars or:</option>
|
||||||
<option value="4" <? if($SiteOptions['Identicons'] == 4) { ?> selected="selected" <? } ?>/>Robots 1</option>
|
<option value="3" <? if($SiteOptions['DisableAvatars'] == 3) { ?>selected="selected" <? } ?>/>Replace all avatars with:</option>
|
||||||
<option value="5" <? if($SiteOptions['Identicons'] == 5) { ?> selected="selected" <? } ?>/>Robots 2</option>
|
</select>
|
||||||
<option value="6" <? if($SiteOptions['Identicons'] == 6) { ?> selected="selected" <? } ?>/>Robots 3</option>
|
<select name="identicons" id="identicons">
|
||||||
</select>
|
<option value="0" <? if($SiteOptions['Identicons'] == 0) { ?>selected="selected" <? } ?>/>Identicon</option>
|
||||||
</td>
|
<option value="1" <? if($SiteOptions['Identicons'] == 1) { ?>selected="selected" <? } ?>/>MonsterID</option>
|
||||||
</tr>
|
<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>
|
<tr>
|
||||||
<td class="label"><strong>Auto-save text</strong></td>
|
<td class="label"><strong>Auto-save text</strong></td>
|
||||||
<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>
|
<label for="disableautosave">Disable reply text from being saved automatically when changing pages in a thread</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><strong>Voting links</strong></td>
|
<td class="label"><strong>Voting links</strong></td>
|
||||||
<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>
|
<label for="novotelinks">Disable voting links on artist pages, collages, and snatched lists</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><strong>Download torrents as text files</strong></td>
|
<td class="label"><strong>Download torrents as text files</strong></td>
|
||||||
<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>
|
<label for="downloadalt">For users whose ISP blocks the downloading of torrent files</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><strong>Last.fm Username</strong></td>
|
<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)?>" />
|
<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>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><strong>Info</strong></td>
|
<td class="label"><strong>Info</strong></td>
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
if (check_perms('admin_advanced_user_search') && check_perms('users_view_ips') && check_perms('users_view_email')) {
|
if (check_perms('admin_advanced_user_search') && check_perms('users_view_ips') && check_perms('users_view_email')) {
|
||||||
include('advancedsearch.php');
|
include('advancedsearch.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
include('search.php');
|
include('search.php');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -91,38 +91,38 @@
|
|||||||
$Cache->delete_value('collage_subs_user_new_'.$UserID);
|
$Cache->delete_value('collage_subs_user_new_'.$UserID);
|
||||||
include(SERVER_ROOT.'/sections/user/user.php');
|
include(SERVER_ROOT.'/sections/user/user.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//Provide public methods for Last.fm data gets.
|
//Provide public methods for Last.fm data gets.
|
||||||
case 'lastfm_compare':
|
case 'lastfm_compare':
|
||||||
if(isset($_GET['username'])) {
|
if(isset($_GET['username'])) {
|
||||||
echo LastFM::compare_user_with($_GET['username']);
|
echo LastFM::compare_user_with($_GET['username']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'lastfm_last_played_track':
|
case 'lastfm_last_played_track':
|
||||||
if(isset($_GET['username'])) {
|
if(isset($_GET['username'])) {
|
||||||
echo LastFM::get_last_played_track($_GET['username']);
|
echo LastFM::get_last_played_track($_GET['username']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'lastfm_top_artists':
|
case 'lastfm_top_artists':
|
||||||
if(isset($_GET['username'])) {
|
if(isset($_GET['username'])) {
|
||||||
echo LastFM::get_top_artists($_GET['username']);
|
echo LastFM::get_top_artists($_GET['username']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'lastfm_top_albums':
|
case 'lastfm_top_albums':
|
||||||
if(isset($_GET['username'])) {
|
if(isset($_GET['username'])) {
|
||||||
echo LastFM::get_top_albums($_GET['username']);
|
echo LastFM::get_top_albums($_GET['username']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'lastfm_top_tracks':
|
case 'lastfm_top_tracks':
|
||||||
if(isset($_GET['username'])) {
|
if(isset($_GET['username'])) {
|
||||||
echo LastFM::get_top_tracks($_GET['username']);
|
echo LastFM::get_top_tracks($_GET['username']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'lastfm_clear_cache':
|
case 'lastfm_clear_cache':
|
||||||
if(isset($_GET['username']) && isset($_GET['uid'])) {
|
if(isset($_GET['username']) && isset($_GET['uid'])) {
|
||||||
echo LastFM::clear_cache($_GET['username'],$_GET['uid']);
|
echo LastFM::clear_cache($_GET['username'],$_GET['uid']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (isset($_REQUEST['id'])) {
|
if (isset($_REQUEST['id'])) {
|
||||||
include(SERVER_ROOT.'/sections/user/user.php');
|
include(SERVER_ROOT.'/sections/user/user.php');
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
<?
|
<?
|
||||||
} elseif ($LoggedUser['RatioWatch'] || !$CanLeech) { ?>
|
} elseif ($LoggedUser['RatioWatch'] || !$CanLeech) { ?>
|
||||||
<div class="box pad" style="text-align:center">
|
<div class="box pad" style="text-align:center">
|
||||||
<strong class="important_text">You may not send invites while on Ratio Watch or while your leeching privileges are disabled. Please read <a href="wiki.php?action=article&id=310">this article</a> for more information.</strong>
|
<strong class="important_text">You may not send invites while on Ratio Watch or while your leeching privileges are disabled. Please read <a href="wiki.php?action=article&id=310">this article</a> for more information.</strong>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
|
@ -2,31 +2,30 @@
|
|||||||
//Include Last.fm in the user sidebar only if a Last.fm username is specified.
|
//Include Last.fm in the user sidebar only if a Last.fm username is specified.
|
||||||
$DB->query("SELECT username FROM lastfm_users WHERE ID = '$UserID'");
|
$DB->query("SELECT username FROM lastfm_users WHERE ID = '$UserID'");
|
||||||
if ($DB->record_count()) {
|
if ($DB->record_count()) {
|
||||||
list($LastFMUsername) = $DB->next_record();
|
list($LastFMUsername) = $DB->next_record();
|
||||||
$LastFMInfo = LastFM::get_user_info($LastFMUsername);
|
$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.
|
//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="box box_info box_lastfm">
|
||||||
<div class="head colhead_dark">Last.fm</div>
|
<div class="head colhead_dark">Last.fm</div>
|
||||||
<ul class="stats nobullet">
|
<ul class="stats nobullet">
|
||||||
<li>
|
<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>
|
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>
|
</li>
|
||||||
<div id="lastfm_stats" <? if ($OwnProfile == true): ?>data-uid="<?= $OwnProfile ?>"<? endif; ?>>
|
<div id="lastfm_stats" <? if ($OwnProfile == true): ?>data-uid="<?= $OwnProfile ?>"<? endif; ?>>
|
||||||
</div>
|
</div>
|
||||||
<li>
|
<li>
|
||||||
[<a href="#" id="lastfm_expand" onclick="return false">Show more info</a>]
|
[<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.
|
//Append the reload stats button only if allowed on the current user page.
|
||||||
$Response = $Cache->get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']);
|
$Response = $Cache->get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']);
|
||||||
if (empty($Response)) :
|
if (empty($Response)) :
|
||||||
?>
|
?>
|
||||||
<span id="lastfm_reload_container">
|
<span id="lastfm_reload_container">
|
||||||
[<a href="#" id="lastfm_reload" onclick="return false">Reload stats</a>]
|
[<a href="#" id="lastfm_reload" onclick="return false">Reload stats</a>]
|
||||||
</span>
|
</span>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
@ -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'];
|
$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
|
$DB->query("UPDATE users_info AS i
|
||||||
JOIN users_dupes AS d ON d.UserID = i.UserID
|
JOIN users_dupes AS d ON d.UserID = i.UserID
|
||||||
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
||||||
WHERE d.GroupID = $GroupID");
|
WHERE d.GroupID = $GroupID");
|
||||||
}
|
}
|
||||||
@ -80,9 +80,9 @@ function unlink_user($UserID) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] unlinked by ".$LoggedUser['Username'];
|
$AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] unlinked by ".$LoggedUser['Username'];
|
||||||
$DB->query("UPDATE users_info AS i
|
$DB->query("UPDATE users_info AS i
|
||||||
JOIN users_dupes AS d1 ON d1.UserID = i.UserID
|
JOIN users_dupes AS d1 ON d1.UserID = i.UserID
|
||||||
JOIN users_dupes AS d2 ON d2.GroupID = d1.GroupID
|
JOIN users_dupes AS d2 ON d2.GroupID = d1.GroupID
|
||||||
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
||||||
WHERE d2.UserID = $UserID");
|
WHERE d2.UserID = $UserID");
|
||||||
$DB->query("DELETE FROM users_dupes WHERE 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 dupe_groups SET Comments = CONCAT('".db_string($Comments)."\n\n',Comments) WHERE ID = '$GroupID'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$DB->query("UPDATE users_info AS i
|
$DB->query("UPDATE users_info AS i
|
||||||
JOIN users_dupes AS d ON d.UserID = i.UserID
|
JOIN users_dupes AS d ON d.UserID = i.UserID
|
||||||
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
||||||
WHERE d.GroupID = $GroupID");
|
WHERE d.GroupID = $GroupID");
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
$Warned = (isset($_POST['Warned']))? 1 : 0;
|
$Warned = (isset($_POST['Warned']))? 1 : 0;
|
||||||
$Logs095 = (int)$_POST['095logs'];
|
$Logs095 = (int)$_POST['095logs'];
|
||||||
if(isset($_POST['Uploaded']) && isset($_POST['Downloaded'])) {
|
if(isset($_POST['Uploaded']) && isset($_POST['Downloaded'])) {
|
||||||
$Uploaded = ($_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded']);
|
$Uploaded = ($_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded']);
|
||||||
if($Arithmetic = strpbrk($Uploaded, '+-')) {
|
if($Arithmetic = strpbrk($Uploaded, '+-')) {
|
||||||
$Uploaded += max(-$Uploaded, Format::get_bytes($Arithmetic));
|
$Uploaded += max(-$Uploaded, Format::get_bytes($Arithmetic));
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@
|
|||||||
|
|
||||||
$Cur = $DB->next_record(MYSQLI_ASSOC, false);
|
$Cur = $DB->next_record(MYSQLI_ASSOC, false);
|
||||||
if ($_POST['comment_hash'] != $Cur['CommentHash']) {
|
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.
|
//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'";
|
$UpdateSet[]="Donor='$Donor'";
|
||||||
$EditSummary[]="donor status changed";
|
$EditSummary[]="donor status changed";
|
||||||
$LightUpdates['Donor']=$Donor;
|
$LightUpdates['Donor']=$Donor;
|
||||||
@ -332,7 +332,7 @@
|
|||||||
$DeleteKeys = true;
|
$DeleteKeys = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) {
|
if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) {
|
||||||
$UpdateSet[]="Visible='$Visible'";
|
$UpdateSet[]="Visible='$Visible'";
|
||||||
$EditSummary[]="visibility changed";
|
$EditSummary[]="visibility changed";
|
||||||
$LightUpdates['Visible']=$Visible;
|
$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"));
|
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";
|
$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();
|
list($WarnedUntil) = $DB->next_record();
|
||||||
$Msg = "warning reduced by $ReduceWarning week(s) to $WarnedUntil";
|
$Msg = "warning reduced by $ReduceWarning week(s) to $WarnedUntil";
|
||||||
if ($WarnReason) { $Msg.=" for $WarnReason"; }
|
if ($WarnReason) { $Msg.=" for $WarnReason"; }
|
||||||
|
@ -241,13 +241,13 @@ function check_paranoia_here($Setting) {
|
|||||||
<? if ($OwnProfile || ($Override=check_paranoia_here(false)) || check_perms('users_mod')) { ?>
|
<? if ($OwnProfile || ($Override=check_paranoia_here(false)) || check_perms('users_mod')) { ?>
|
||||||
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
|
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&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>
|
<li <?= $Override===2 ? 'class="paranoia_override"' : ''?>>Warning expires: <?= date('Y-m-d h:i', strtotime($Warned)) ?></li>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?
|
<?
|
||||||
//Last.fm statistics and comparability
|
//Last.fm statistics and comparability
|
||||||
include(SERVER_ROOT.'/sections/user/lastfm.php');
|
include(SERVER_ROOT.'/sections/user/lastfm.php');
|
||||||
@ -737,7 +737,7 @@ function check_paranoia_here($Setting) {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span id="vote_count_<?=$RequestID?>"><?=$Votes?></span>
|
<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']?>" />
|
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<a href="javascript:Vote(0, <?=$RequestID?>)"><strong>(+)</strong></a>
|
<a href="javascript:Vote(0, <?=$RequestID?>)"><strong>(+)</strong></a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
@ -1095,19 +1095,19 @@ function check_paranoia_here($Setting) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label">Disable:</td>
|
<td class="label">Disable:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?>checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
|
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?> checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
|
||||||
<? if (check_perms('users_disable_any')) { ?> |
|
<? 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="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="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="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="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="DisableRequests" id="DisableRequests"<? if ($DisableRequests==1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label>
|
||||||
<br />
|
<br />
|
||||||
<input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload==1) { ?>checked="checked"<? } ?> /> <label for="DisableUpload">Upload</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="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="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="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="DisableIRC" id="DisableIRC"<? if ($DisableIRC==1) { ?> checked="checked"<? } ?> /> <label for="DisableIRC">IRC</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -29,23 +29,23 @@
|
|||||||
|
|
||||||
if ($UsersOnly == 1) {
|
if ($UsersOnly == 1) {
|
||||||
$DB->query("SELECT
|
$DB->query("SELECT
|
||||||
u.Email,
|
u.Email,
|
||||||
'".sqltime()."' AS Time,
|
'".sqltime()."' AS Time,
|
||||||
u.IP,
|
u.IP,
|
||||||
c.Code
|
c.Code
|
||||||
FROM users_main AS u
|
FROM users_main AS u
|
||||||
LEFT JOIN users_main AS u2 ON u2.Email = u.Email AND u2.ID != '$UserID'
|
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
|
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
|
WHERE u.ID='$UserID' AND u2.ID > 0
|
||||||
UNION SELECT
|
UNION SELECT
|
||||||
h.Email,
|
h.Email,
|
||||||
h.Time,
|
h.Time,
|
||||||
h.IP,
|
h.IP,
|
||||||
c.Code
|
c.Code
|
||||||
FROM users_history_emails AS h
|
FROM users_history_emails AS h
|
||||||
LEFT JOIN users_history_emails AS h2 ON h2.email=h.email and h2.UserID != '$UserID'
|
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
|
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'*/."
|
WHERE h.UserID='$UserID' AND h2.UserID>0"/*AND Time<>'0000-00-00 00:00:00'*/."
|
||||||
ORDER BY Time DESC");
|
ORDER BY Time DESC");
|
||||||
} else {
|
} else {
|
||||||
$DB->query("SELECT
|
$DB->query("SELECT
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
GROUP_CONCAT(h.Time SEPARATOR '|') AS UserSetTimes,
|
GROUP_CONCAT(h.Time SEPARATOR '|') AS UserSetTimes,
|
||||||
GROUP_CONCAT(h.IP SEPARATOR '|') AS UserIPs,
|
GROUP_CONCAT(h.IP SEPARATOR '|') AS UserIPs,
|
||||||
GROUP_CONCAT(m2.Username SEPARATOR '|') AS Usernames,
|
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.Donor SEPARATOR '|') AS UsersDonor,
|
||||||
GROUP_CONCAT(i.Warned SEPARATOR '|') AS UsersWarned
|
GROUP_CONCAT(i.Warned SEPARATOR '|') AS UsersWarned
|
||||||
FROM users_main AS m
|
FROM users_main AS m
|
||||||
@ -57,7 +57,7 @@
|
|||||||
h3.Time AS UserSetTimes,
|
h3.Time AS UserSetTimes,
|
||||||
h3.IP AS UserIPs,
|
h3.IP AS UserIPs,
|
||||||
m3.Username AS Usernames,
|
m3.Username AS Usernames,
|
||||||
m3.Enabled AS UsersEnabled,
|
m3.Enabled AS UsersEnabled,
|
||||||
i2.Donor AS UsersDonor,
|
i2.Donor AS UsersDonor,
|
||||||
i2.Warned AS UsersWarned
|
i2.Warned AS UsersWarned
|
||||||
FROM users_history_emails AS h2
|
FROM users_history_emails AS h2
|
||||||
@ -118,7 +118,7 @@
|
|||||||
$Old[$Key]['EndTime'] = $Val['Time'];
|
$Old[$Key]['EndTime'] = $Val['Time'];
|
||||||
$Old[$Key]['IP'] = $Val['IP'];
|
$Old[$Key]['IP'] = $Val['IP'];
|
||||||
$Old[$Key]['ElapsedTime'] = date(time() + strtotime($Old[$Key]['EndTime']) - strtotime($Old[$Key]['StartTime']));
|
$Old[$Key]['ElapsedTime'] = date(time() + strtotime($Old[$Key]['EndTime']) - strtotime($Old[$Key]['StartTime']));
|
||||||
$Old[$Key]['Email'] = $Val['Email'];
|
$Old[$Key]['Email'] = $Val['Email'];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Shouldn't have to be here but I'll leave it anyway
|
// Shouldn't have to be here but I'll leave it anyway
|
||||||
@ -126,7 +126,7 @@
|
|||||||
$Other[$Key]['EndTime'] = $Val['Time'];
|
$Other[$Key]['EndTime'] = $Val['Time'];
|
||||||
$Other[$Key]['IP'] = $Val['IP'];
|
$Other[$Key]['IP'] = $Val['IP'];
|
||||||
$Other[$Key]['ElapsedTime'] = date(time() + strtotime($Other[$Key]['EndTime']) - strtotime($Other[$Key]['StartTime']));
|
$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'] != '') {
|
if ($Val['Usernames'] != '') {
|
||||||
|
@ -57,17 +57,17 @@
|
|||||||
break;
|
break;
|
||||||
case 'subscribed_collages':
|
case 'subscribed_collages':
|
||||||
require('subscribed_collages.php');
|
require('subscribed_collages.php');
|
||||||
break;
|
break;
|
||||||
case 'catchup_collages':
|
case 'catchup_collages':
|
||||||
require('catchup_collages.php');
|
require('catchup_collages.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'token_history':
|
case 'token_history':
|
||||||
require('token_history.php');
|
require('token_history.php');
|
||||||
break;
|
break;
|
||||||
case 'quote_notifications':
|
case 'quote_notifications':
|
||||||
require('quote_notifications.php');
|
require('quote_notifications.php');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//You trying to mess with me query string? To the home page with you!
|
//You trying to mess with me query string? To the home page with you!
|
||||||
header('Location: index.php');
|
header('Location: index.php');
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
View::show_header("IP history for $Username");
|
View::show_header("IP history for $Username");
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">//<![CDATA[
|
||||||
function ShowIPs(rowname) {
|
function ShowIPs(rowname) {
|
||||||
$('tr[name="'+rowname+'"]').toggle();
|
$('tr[name="'+rowname+'"]').toggle();
|
||||||
|
|
||||||
@ -41,15 +41,15 @@ function Ban(ip, id, elemID) {
|
|||||||
if(notes != null && notes.length > 0) {
|
if(notes != null && notes.length > 0) {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
if (window.XMLHttpRequest) {
|
if (window.XMLHttpRequest) {
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
} else {
|
} else {
|
||||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
xmlhttp.onreadystatechange=function() {
|
xmlhttp.onreadystatechange=function() {
|
||||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
document.getElementById(elemID).innerHTML = "<strong>[Banned]</strong>";
|
document.getElementById(elemID).innerHTML = "<strong>[Banned]</strong>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("GET","tools.php?action=quick_ban&perform=create&ip=" + ip + "¬es=" + notes,true);
|
xmlhttp.open("GET","tools.php?action=quick_ban&perform=create&ip=" + ip + "¬es=" + notes,true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
}
|
}
|
||||||
@ -59,48 +59,49 @@ function Ban(ip, id, elemID) {
|
|||||||
function UnBan(ip, id, elemID) {
|
function UnBan(ip, id, elemID) {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
if (window.XMLHttpRequest) {
|
if (window.XMLHttpRequest) {
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
} else {
|
} else {
|
||||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
xmlhttp.onreadystatechange=function() {
|
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).innerHTML = "Ban";
|
||||||
document.getElementById(elemID).onclick = function() { Ban(ip, id, elemID); return false;};
|
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();
|
xmlhttp.send();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
list($Page,$Limit) = Format::page_limit(IPS_PER_PAGE);
|
list($Page,$Limit) = Format::page_limit(IPS_PER_PAGE);
|
||||||
|
|
||||||
if ($UsersOnly == 1) {
|
if ($UsersOnly == 1) {
|
||||||
$RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS
|
$RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS
|
||||||
h1.IP,
|
h1.IP,
|
||||||
h1.StartTime,
|
h1.StartTime,
|
||||||
h1.EndTime,
|
h1.EndTime,
|
||||||
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
|
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
|
||||||
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
|
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
|
||||||
GROUP_CONCAT(IFNULL(h2.EndTime,0) SEPARATOR '|'),
|
GROUP_CONCAT(IFNULL(h2.EndTime,0) SEPARATOR '|'),
|
||||||
GROUP_CONCAT(um2.Username SEPARATOR '|'),
|
GROUP_CONCAT(um2.Username SEPARATOR '|'),
|
||||||
GROUP_CONCAT(um2.Enabled SEPARATOR '|'),
|
GROUP_CONCAT(um2.Enabled SEPARATOR '|'),
|
||||||
GROUP_CONCAT(ui2.Donor SEPARATOR '|'),
|
GROUP_CONCAT(ui2.Donor SEPARATOR '|'),
|
||||||
GROUP_CONCAT(ui2.Warned SEPARATOR '|')
|
GROUP_CONCAT(ui2.Warned SEPARATOR '|')
|
||||||
FROM users_history_ips AS h1
|
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_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_main AS um2 ON um2.ID=h2.UserID
|
||||||
LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID
|
LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID
|
||||||
WHERE h1.UserID='$UserID'
|
WHERE h1.UserID='$UserID'
|
||||||
AND h2.UserID>0 $SearchIPQuery
|
AND h2.UserID>0 $SearchIPQuery
|
||||||
GROUP BY h1.IP, h1.StartTime
|
GROUP BY h1.IP, h1.StartTime
|
||||||
ORDER BY h1.StartTime DESC LIMIT $Limit");
|
ORDER BY h1.StartTime DESC LIMIT $Limit");
|
||||||
} else {
|
} else {
|
||||||
$RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS
|
$RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS
|
||||||
h1.IP,
|
h1.IP,
|
||||||
h1.StartTime,
|
h1.StartTime,
|
||||||
h1.EndTime,
|
h1.EndTime,
|
||||||
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
|
GROUP_CONCAT(h2.UserID SEPARATOR '|'),
|
||||||
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
|
GROUP_CONCAT(h2.StartTime SEPARATOR '|'),
|
||||||
@ -126,7 +127,7 @@ function UnBan(ip, id, elemID) {
|
|||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<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>
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<? if($UsersOnly) { ?>
|
<? if($UsersOnly) { ?>
|
||||||
@ -184,16 +185,16 @@ function UnBan(ip, id, elemID) {
|
|||||||
<?=$IP?> (<?=Tools::get_country_code_by_ajax($IP)?>)
|
<?=$IP?> (<?=Tools::get_country_code_by_ajax($IP)?>)
|
||||||
<?
|
<?
|
||||||
if($CanManageIPBans) {
|
if($CanManageIPBans) {
|
||||||
if(!isset($IPs[$IP])) {
|
if(!isset($IPs[$IP])) {
|
||||||
$sql = "SELECT ID, FromIP, ToIP FROM ip_bans WHERE '".Tools::ip_to_unsigned($IP)."' BETWEEN FromIP AND ToIP LIMIT 1";
|
$sql = "SELECT ID, FromIP, ToIP FROM ip_bans WHERE '".Tools::ip_to_unsigned($IP)."' BETWEEN FromIP AND ToIP LIMIT 1";
|
||||||
$DB->query($sql);
|
$DB->query($sql);
|
||||||
|
|
||||||
if($DB->record_count() > 0) {
|
if($DB->record_count() > 0) {
|
||||||
$IPs[$IP] = true;
|
$IPs[$IP] = true;
|
||||||
?>
|
?>
|
||||||
<strong>[Banned]
|
<strong>[Banned]
|
||||||
<? }
|
<? }
|
||||||
else {
|
else {
|
||||||
$IPs[$IP] = false; ?>
|
$IPs[$IP] = false; ?>
|
||||||
<a id="<?=$counter?>" href="#" onclick="Ban('<?=$IP?>', '<?=$ID?>', '<?=$counter?>'); this.onclick=null;return false;">[Ban]</a>
|
<a id="<?=$counter?>" href="#" onclick="Ban('<?=$IP?>', '<?=$ID?>', '<?=$counter?>'); this.onclick=null;return false;">[Ban]</a>
|
||||||
<? }
|
<? }
|
||||||
|
@ -261,13 +261,13 @@
|
|||||||
<col class="col_post_body" />
|
<col class="col_post_body" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="colhead_dark">
|
<tr class="colhead_dark">
|
||||||
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>">
|
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>">
|
||||||
<span style="float:left;">
|
<span style="float:left;">
|
||||||
<?=time_diff($AddedTime) ?>
|
<?=time_diff($AddedTime) ?>
|
||||||
in <a href="forums.php?action=viewthread&threadid=<?=$TopicID?>&postid=<?=$PostID?>#post<?=$PostID?>" title="<?=display_str($ThreadTitle)?>"><?=Format::cut_string($ThreadTitle, 75)?></a>
|
in <a href="forums.php?action=viewthread&threadid=<?=$TopicID?>&postid=<?=$PostID?>#post<?=$PostID?>" title="<?=display_str($ThreadTitle)?>"><?=Format::cut_string($ThreadTitle, 75)?></a>
|
||||||
<?
|
<?
|
||||||
if($ViewingOwn) {
|
if($ViewingOwn) {
|
||||||
if ((!$Locked || $Sticky) && (!$LastRead || $LastRead < $LastPostID)) { ?>
|
if ((!$Locked || $Sticky) && (!$LastRead || $LastRead < $LastPostID)) { ?>
|
||||||
<span class="new">(New!)</span>
|
<span class="new">(New!)</span>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
@ -314,12 +314,12 @@
|
|||||||
<td class="body" valign="top">
|
<td class="body" valign="top">
|
||||||
<div id="content<?=$PostID?>">
|
<div id="content<?=$PostID?>">
|
||||||
<?=$Text->full_format($Body)?>
|
<?=$Text->full_format($Body)?>
|
||||||
<? if($EditedUserID) { ?>
|
<? if($EditedUserID) { ?>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<? if(check_perms('site_moderate_forums')) { ?>
|
<? if(check_perms('site_moderate_forums')) { ?>
|
||||||
<a href="#content<?=$PostID?>" onclick="LoadEdit(<?=$PostID?>, 1)">«</a>
|
<a href="#content<?=$PostID?>" onclick="LoadEdit(<?=$PostID?>, 1)">«</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
Last edited by
|
Last edited by
|
||||||
<?=Users::format_username($EditedUserID, false, false, false) ?> <?=time_diff($EditedTime,2,true,true)?>
|
<?=Users::format_username($EditedUserID, false, false, false) ?> <?=time_diff($EditedTime,2,true,true)?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
$PermittedForums = implode("','", array_keys($LoggedUser['CustomForums'], 1));
|
$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
|
$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
|
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]'";
|
WHERE q.UserID = $LoggedUser[ID] AND ((f.MinClassRead <= '$LoggedUser[Class]'";
|
||||||
|
|
||||||
if (!empty($RestrictedForums)) {
|
if (!empty($RestrictedForums)) {
|
||||||
$sql .= ' AND f.ID NOT IN (\'' . $RestrictedForums . '\')';
|
$sql .= ' AND f.ID NOT IN (\'' . $RestrictedForums . '\')';
|
||||||
|
@ -13,20 +13,20 @@
|
|||||||
|
|
||||||
if (!$ShowAll) {
|
if (!$ShowAll) {
|
||||||
$sql = "SELECT c.ID,
|
$sql = "SELECT c.ID,
|
||||||
c.Name,
|
c.Name,
|
||||||
c.NumTorrents,
|
c.NumTorrents,
|
||||||
s.LastVisit
|
s.LastVisit
|
||||||
FROM collages AS c
|
FROM collages AS c
|
||||||
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
||||||
JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
||||||
WHERE s.UserID = ".$LoggedUser['ID']." AND c.Deleted='0'
|
WHERE s.UserID = ".$LoggedUser['ID']." AND c.Deleted='0'
|
||||||
AND ct.AddedOn > s.LastVisit
|
AND ct.AddedOn > s.LastVisit
|
||||||
GROUP BY c.ID";
|
GROUP BY c.ID";
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT c.ID,
|
$sql = "SELECT c.ID,
|
||||||
c.Name,
|
c.Name,
|
||||||
c.NumTorrents,
|
c.NumTorrents,
|
||||||
s.LastVisit
|
s.LastVisit
|
||||||
FROM collages AS c
|
FROM collages AS c
|
||||||
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
||||||
LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
||||||
@ -79,10 +79,10 @@
|
|||||||
$RS = $DB->query("SELECT ct.GroupID,
|
$RS = $DB->query("SELECT ct.GroupID,
|
||||||
tg.WikiImage,
|
tg.WikiImage,
|
||||||
tg.CategoryID
|
tg.CategoryID
|
||||||
FROM collages_torrents AS ct
|
FROM collages_torrents AS ct
|
||||||
JOIN torrents_group AS tg ON ct.GroupID = tg.ID
|
JOIN torrents_group AS tg ON ct.GroupID = tg.ID
|
||||||
WHERE ct.CollageID = $CollageID
|
WHERE ct.CollageID = $CollageID
|
||||||
AND ct.AddedOn > '$LastVisit'
|
AND ct.AddedOn > '$LastVisit'
|
||||||
ORDER BY ct.AddedOn");
|
ORDER BY ct.AddedOn");
|
||||||
$NewTorrentCount = $DB->record_count();
|
$NewTorrentCount = $DB->record_count();
|
||||||
//$NewTorrents = $DB->to_array();
|
//$NewTorrents = $DB->to_array();
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
FROM users_subscriptions
|
FROM users_subscriptions
|
||||||
WHERE UserID = '.$LoggedUser['ID'].') AS s
|
WHERE UserID = '.$LoggedUser['ID'].') AS s
|
||||||
LEFT JOIN forums_last_read_topics AS l ON s.TopicID = l.TopicID AND l.UserID = '.$LoggedUser['ID'].'
|
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_posts AS p ON t.ID = p.TopicID
|
||||||
JOIN forums AS f ON f.ID = t.ForumID
|
JOIN forums AS f ON f.ID = t.ForumID
|
||||||
WHERE p.ID <= IFNULL(l.PostID,t.LastPostID)
|
WHERE p.ID <= IFNULL(l.PostID,t.LastPostID)
|
||||||
|
@ -45,15 +45,15 @@
|
|||||||
list($Page,$Limit) = Format::page_limit(25);
|
list($Page,$Limit) = Format::page_limit(25);
|
||||||
|
|
||||||
$DB->query("SELECT SQL_CALC_FOUND_ROWS
|
$DB->query("SELECT SQL_CALC_FOUND_ROWS
|
||||||
f.TorrentID,
|
f.TorrentID,
|
||||||
t.GroupID,
|
t.GroupID,
|
||||||
f.Time,
|
f.Time,
|
||||||
f.Expired,
|
f.Expired,
|
||||||
f.Downloaded,
|
f.Downloaded,
|
||||||
f.Uses,
|
f.Uses,
|
||||||
g.Name,
|
g.Name,
|
||||||
t.Format,
|
t.Format,
|
||||||
t.Encoding
|
t.Encoding
|
||||||
FROM users_freeleeches AS f
|
FROM users_freeleeches AS f
|
||||||
JOIN torrents AS t ON t.ID = f.TorrentID
|
JOIN torrents AS t ON t.ID = f.TorrentID
|
||||||
JOIN torrents_group AS g ON g.ID = t.GroupID
|
JOIN torrents_group AS g ON g.ID = t.GroupID
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h2>Search articles</h2>
|
<h2>Search articles</h2>
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
[<a href="wiki.php?action=create&alias=<?=display_str($Alias->convert($_GET['search']))?>">Create an article</a>] [<a href="wiki.php?action=link&alias=<?=display_str($Alias->convert($_GET['search']))?>">Link this search</a>]
|
[<a href="wiki.php?action=create&alias=<?=display_str($Alias->convert($_GET['search']))?>">Create an article</a>] [<a href="wiki.php?action=link&alias=<?=display_str($Alias->convert($_GET['search']))?>">Link this search</a>]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
// $DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('$NewAlias', '$ArticleID')");
|
// $DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('$NewAlias', '$ArticleID')");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
$TitleAlias = $Alias->convert($_POST['title']);
|
$TitleAlias = $Alias->convert($_POST['title']);
|
||||||
if($TitleAlias!=$Alias) {
|
if($TitleAlias!=$Alias) {
|
||||||
$DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('".db_string($TitleAlias)."', '$ArticleID')");
|
$DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('".db_string($TitleAlias)."', '$ArticleID')");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user