Empty commit

This commit is contained in:
Git 2012-08-23 08:00:17 +00:00
parent 14ba5bd400
commit d0e6987329
8 changed files with 59 additions and 13 deletions

View File

@ -72,7 +72,7 @@ public function analysis($Message, $Report='', $Time=43200) {
),
$Time
);
send_irc('PRIVMSG '.LAB_CHAN.' :'.$Message.' '.$Document.' '.' http://'.NONSSL_SITE_URL.'/tools.php?action=analysis&case='.$Identifier.' http://'.NONSSL_SITE_URL.$_SERVER['REQUEST_URI']);
send_irc('PRIVMSG '.LAB_CHAN.' :'.$Message.' '.$Document.' '.' https://'.SSL_SITE_URL.'/tools.php?action=analysis&case='.$Identifier.' https://'.SSL_SITE_URL.$_SERVER['REQUEST_URI']);
}
public function log_var($Var, $VarName = FALSE) {

View File

@ -426,6 +426,7 @@ function parse($Str) {
}
function to_html($Array) {
global $SSL;
$this->Levels++;
if($this->Levels>10) { return $Block['Val']; } // Hax prevention
$Str = '';

View File

@ -264,7 +264,7 @@
* @param $UserID int The UserID to get info for
*/
function user_info($UserID) {
global $DB, $Cache, $Classes;
global $DB, $Cache, $Classes, $SSL;
$UserInfo = $Cache->get_value('user_info_'.$UserID);
// the !isset($UserInfo['Paranoia']) can be removed after a transition period
if(empty($UserInfo) || empty($UserInfo['ID']) || !isset($UserInfo['Paranoia']) || empty($UserInfo['Class'])) {

View File

@ -2,7 +2,7 @@
function notify ($Channel, $Message) {
global $LoggedUser;
send_irc("PRIVMSG ".$Channel." :".$Message." error by ".(!empty($LoggedUser['ID']) ? "http://".NONSSL_SITE_URL."/user.php?id=".$LoggedUser['ID'] ." (".$LoggedUser['Username'].")" : $_SERVER['REMOTE_ADDR']." (".geoip($_SERVER['REMOTE_ADDR']).")")." accessing http://".NONSSL_SITE_URL."".$_SERVER['REQUEST_URI'].(!empty($_SERVER['HTTP_REFERER'])? " from ".$_SERVER['HTTP_REFERER'] : ''));
send_irc("PRIVMSG ".$Channel." :".$Message." error by ".(!empty($LoggedUser['ID']) ? "https://".SSL_SITE_URL."/user.php?id=".$LoggedUser['ID'] ." (".$LoggedUser['Username'].")" : $_SERVER['REMOTE_ADDR']." (".geoip($_SERVER['REMOTE_ADDR']).")")." accessing https://".SSL_SITE_URL."".$_SERVER['REQUEST_URI'].(!empty($_SERVER['HTTP_REFERER'])? " from ".$_SERVER['HTTP_REFERER'] : ''));
}
$Errors = array('403','404','413','504');

View File

@ -297,23 +297,25 @@ function next_hour() {
$DB->query("SELECT ID FROM users_info AS i JOIN users_main AS m ON m.ID=i.UserID
WHERE i.RatioWatchEnds!='0000-00-00 00:00:00'
AND i.RatioWatchDownload+10*1024*1024*1024<m.Downloaded
And m.Enabled='1'");
AND m.Enabled='1'
AND m.can_leech='1'");
$UserIDs = $DB->collect('ID' );
if(count($UserIDs) > 0) {
$Subject = 'Leeching Disabled';
$Message = 'You have downloaded more then 10gb while on Ratio Watch. Your Leeching privleges have been disabled. Please reread the rules and refer to this guide on how to improve your ratio https://ssl.what.cd/wiki.php?action=article&id=110';
$Message = 'You have downloaded more then 10gb while on Ratio Watch. Your Leeching privileges have been disabled. Please reread the rules and refer to this guide on how to improve your ratio https://ssl.what.cd/wiki.php?action=article&id=110';
foreach($UserIDs as $UserID) {
send_pm($UserID,0,db_string($Subject),db_string($Message));
send_irc("PRIVMSG #reports : Leeching Disabled. Downloaded 10GB+ on Ratio Watch. https://what.cd/user.php?id=$UserID");
}
$DB->query("UPDATE users_info AS i JOIN users_main AS m ON m.ID=i.UserID
SET
m.can_leech='0',
i.AdminComment=CONCAT('$sqltime - Leeching ability disabled by ratio watch system - required ratio: ', m.RequiredRatio,'
i.AdminComment=CONCAT('$sqltime - Leech disabled by ratio watch system for downloading more than 10 gigs on ratio watch. - required ratio: ', m.RequiredRatio,'
' , i.AdminComment)
WHERE m.ID IN(".implode(',',$UserIDs).")");
WHERE m.ID IN(".implode(',',$UserIDs).")");
}
}

View File

@ -24,6 +24,11 @@
$UsersOnly = $_GET['usersonly'];
if(isset($_POST['ip'])) {
$SearchIP = db_string($_POST['ip']);
$SearchIPQuery = " AND h1.IP = '$SearchIP' ";
}
show_header("IP history for $Username");
?>
<script type="text/javascript">
@ -89,7 +94,7 @@ function UnBan(ip, id, elemID) {
LEFT JOIN users_main AS um2 ON um2.ID=h2.UserID
LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID
WHERE h1.UserID='$UserID'
AND h2.UserID>0
AND h2.UserID>0 $SearchIPQuery
GROUP BY h1.IP, h1.StartTime
ORDER BY h1.StartTime DESC LIMIT $Limit");
} else {
@ -108,7 +113,7 @@ function UnBan(ip, id, elemID) {
LEFT JOIN users_history_ips AS h2 ON h2.IP=h1.IP AND h2.UserID!=$UserID
LEFT JOIN users_main AS um2 ON um2.ID=h2.UserID
LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID
WHERE h1.UserID='$UserID'
WHERE h1.UserID='$UserID' $SearchIPQuery
GROUP BY h1.IP, h1.StartTime
ORDER BY h1.StartTime DESC LIMIT $Limit");
}
@ -123,8 +128,28 @@ function UnBan(ip, id, elemID) {
<div class="header">
<h2>IP history for <a href="/user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
</div>
<div class="linkbox"><?=$Pages?></div>
<div class="linkbox">
<? if($UsersOnly) { ?>
<a href="userhistory.php?action=ips&userid=<?=$UserID?>">[View All IPs]</a>
<? } else { ?>
<a href="userhistory.php?action=ips&userid=<?=$UserID?>&usersonly=1">[View IPs With Users]</a>
<? } ?>
<br/>
<?=$Pages?>
</div>
<table>
<tr class="colhead">
<td>IP Search</td>
</tr>
<tr><td>
<form method="post" action="">
<input type="text" name="ip"/>
<input type="submit" value="Search"/>
</td></tr>
</table>
<table>
<tr class="colhead">
<td>IP address</td>
<td>Started</td>

View File

@ -27,7 +27,7 @@ var isMobile = {
if(isMobile.Android()) {
if(!hasCookie(ANDROID_COOKIE_NAME)) {
setCookie(ANDROID_COOKIE_NAME, true, 365);
var result=confirm("A Android App is available for What.CD, would you like to download it?");
var result=confirm("An Android App is available for What.CD, would you like to download it?");
if (result==true) {
window.location = ANDROID_APP_URL;
}

View File

@ -235,12 +235,30 @@ util.fn = util.prototype = {
for (var i=0,il=this.objects.length;i<il;i++) {
var object = this.objects[i];
var classes = object.className.split(' ');
if(array_search(class_name, classes)) {
if (array_search(class_name, classes)) {
return true;
}
}
return false;
},
toggle_class: function(class_name) {
for (var i=0,il=this.objects.length;i<il;i++) {
var object = this.objects[i];
var classes = object.className.split(' ');
var result = array_search(class_name, classes);
if (result !== false) {
classes.splice(result,1);
object.className = classes.join(' ');
} else {
if (object.className === '') {
object.className = class_name;
} else {
object.className = object.className + ' ' + class_name;
}
}
}
return this;
},
disable : function () {
for (var i=0,il=this.objects.length;i<il;i++) {
this.objects[i].disabled = true;