Empty commit

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

View File

@ -138,22 +138,12 @@ 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)) {
$DB->query("SELECT FromIP, ToIP FROM ip_bans");
$IPBans = $DB->to_array();
$Cache->cache_value('ip_bans', $IPBans, 0);
}
foreach($IPBans as $IPBan) {
list($FromIP, $ToIP) = $IPBan;
$Long = ip2long($IP);
if($Long >= $FromIP && $Long <= $ToIP) {
$this->send_to($Channel, 'Site IP Ban Detected: '.$IP); $this->send_to($Channel, 'Site IP Ban Detected: '.$IP);
if ($Gline) { if ($Gline) {
$this->send_raw('GLINE *@'.$IP.' 90d :IP Ban'); $this->send_raw('GLINE *@'.$IP.' 90d :IP Ban');
} }
} }
}
}*/ }*/
protected function listen() { protected function listen() {

View File

@ -623,7 +623,7 @@ private function to_html ($Array) {
$Str.='<a href="wiki.php?action=article&amp;name='.urlencode($Block['Val']).'">'.$Block['Val'].'</a>'; $Str.='<a href="wiki.php?action=article&amp;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&amp;chf=bg,s,FFFFFF00&amp;chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&amp;chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" />'; $Str.='<img style="vertical-align: middle" src="'.STATIC_SERVER.'blank.gif" onload="if (this.src.substr(this.src.length-9,this.src.length) == \'blank.gif\') { this.src = \'http://chart.apis.google.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chl='.urlencode(mb_convert_encoding($Block['Val'],"UTF-8","HTML-ENTITIES")).'&amp;chco=\' + hexify(getComputedStyle(this.parentNode,null).color); }" alt="TeX" />';
break; 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&amp;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&amp;id=1063">Mature content </a>has been blocked. You can choose to view mature content by editing your <a href="user.php?action=edit&amp;userid=' . $LoggedUser['ID'] . '">settings</a>.</span>';
} }
break; break;
case 'img': case 'img':

View File

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

View File

@ -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">&nbsp;<input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum Log Score</span> <span id="minlogscore_span" class="hidden">&nbsp;<input type="text" name="minlogscore" id="minlogscore" size="4" value="<?=(!empty($MinLogScore) ? $MinLogScore : '')?>" /> Minimum Log Score</span>

View File

@ -325,7 +325,7 @@
</tr> </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>

View File

@ -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.";
} }
} }

View File

@ -72,13 +72,13 @@
No language other than English is permitted in the forums. If we can't understand it, we can't moderate it. 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>
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. Be cautious when posting mature content on the forums. All mature imagery must abide by <a href="wiki.php?action=article&amp;id=1063">the rules found here</a>. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse.
</li> </li>
<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. 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>
<li> <li>
Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum youre posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests & Designs, The Laboratory. If you are in doubt about a posts appropriateness, send a <a href="staff.php">Staff PM to the Forum Moderators</a> and wait for a reply before proceeding. Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum youre posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests &amp; Designs, The Laboratory. If you are in doubt about a posts appropriateness, send a <a href="staff.php">Staff PM to the Forum Moderators</a> and wait for a reply before proceeding.
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -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);
} }

View File

@ -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>

View File

@ -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);
} }
} }

View File

@ -2,21 +2,20 @@
if (!check_perms('admin_manage_ipbans')) { error(403); } if (!check_perms('admin_manage_ipbans')) { error(403); }
if (isset($_GET['perform'])) { if (isset($_GET['perform'])) {
$IPA = substr($_GET['ip'], 0, strcspn($_GET['ip'], '.'));
if ($_GET['perform'] == 'delete') { if ($_GET['perform'] == 'delete') {
if(!is_number($_GET['id']) || $_GET['id'] == ''){ error(0); } if (!is_number($_GET['id']) || $_GET['id'] == '') {
$DB->query('DELETE FROM ip_bans WHERE ID='.$_GET['id']); error(0);
$Bans = $Cache->delete_value('ip_bans');
} }
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);
} }
} }

View File

@ -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');

View File

@ -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');

View File

@ -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(); ?>

View File

@ -291,7 +291,7 @@ function checked($Checked) {
</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>

View File

@ -28,5 +28,4 @@
</li> </li>
</ul> </ul>
</div> </div>
<? } ?> <? } ?>

View File

@ -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();
@ -69,10 +69,11 @@ function UnBan(ip, id, elemID) {
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);
@ -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) { ?>