mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
d2d5642c7a
commit
d7633075a3
@ -23,7 +23,7 @@
|
||||
* 3. For foo, there's two, same ArtistID, diff names, no redirect
|
||||
*/
|
||||
|
||||
$DB->query("SELECT AliasID, ArtistID FROM artists_alias WHERE Name='".$AliasName."'");
|
||||
$DB->query("SELECT AliasID, ArtistID FROM artists_alias WHERE Name LIKE '".$AliasName."'");
|
||||
list($CloneAliasID, $CloneArtistID) = $DB->next_record();
|
||||
if($CloneAliasID) {
|
||||
if($Redirect == 0) {
|
||||
|
@ -179,12 +179,10 @@
|
||||
?><script type="script/javascript">setTimeout('window.location="http://<?=NONSSL_SITE_URL?><?=$_SERVER['REQUEST_URI']?>"', 5)</script><?
|
||||
} else {
|
||||
$Cache->cache_value('stats_peers_lock', '1', 10);
|
||||
$DB->query("SELECT COUNT(uid) FROM xbt_files_users WHERE remaining>0 AND active>0");
|
||||
list($LeecherCount) = $DB->next_record();
|
||||
if(!$LeecherCount) { $LeecherCount = 0; }
|
||||
$DB->query("SELECT COUNT(uid) FROM xbt_files_users WHERE remaining=0 AND active>0");
|
||||
list($SeederCount) = $DB->next_record();
|
||||
if(!$SeederCount) { $SeederCount = 0; }
|
||||
$DB->query("SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(uid) FROM xbt_files_users WHERE active=1 GROUP BY Type");
|
||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||
$SeederCount = isset($PeerCount['Seeding'][1]) ? $PeerCount['Seeding'][1] : 0;
|
||||
$LeecherCount = isset($PeerCount['Leeching'][1]) ? $PeerCount['Leeching'][1] : 0;
|
||||
$Cache->cache_value('stats_peers',array($LeecherCount,$SeederCount),0);
|
||||
}
|
||||
} else {
|
||||
|
@ -119,10 +119,10 @@ function next_hour() {
|
||||
$Cache->cache_value('stats_snatches',$SnatchStats,0);
|
||||
}
|
||||
|
||||
$DB->query("SELECT COUNT(uid) FROM xbt_files_users WHERE remaining>0");
|
||||
list($LeecherCount) = $DB->next_record();
|
||||
$DB->query("SELECT COUNT(uid) FROM xbt_files_users WHERE remaining=0");
|
||||
list($SeederCount) = $DB->next_record();
|
||||
$DB->query("SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(uid) FROM xbt_files_users WHERE active=1 GROUP BY Type");
|
||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||
$SeederCount = isset($PeerCount['Seeding'][1]) ? $PeerCount['Seeding'][1] : 0;
|
||||
$LeecherCount = isset($PeerCount['Leeching'][1]) ? $PeerCount['Leeching'][1] : 0;
|
||||
$Cache->cache_value('stats_peers',array($LeecherCount,$SeederCount),0);
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM users_main WHERE Enabled='1' AND LastAccess>'".time_minus(3600*24)."'");
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?
|
||||
ini_set('memory_limit', -1);
|
||||
ini_set('memory_limit', '5G');
|
||||
set_time_limit(0);
|
||||
|
||||
//if (!check_perms('site_debug')) { error(403); }
|
||||
@ -7,11 +7,12 @@
|
||||
show_header();
|
||||
|
||||
//requires wget, unzip commands to be installed
|
||||
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'04.zip');
|
||||
shell_exec('unzip GeoLiteCity_'.date('Ym').'04.zip');
|
||||
shell_exec('rm GeoLiteCity_'.date('Ym').'04.zip');
|
||||
#shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'01.zip');
|
||||
shell_exec('wget http://debug.what.cd/GeoLiteCity_'.date('Ym').'01.zip');
|
||||
shell_exec('unzip GeoLiteCity_'.date('Ym').'01.zip');
|
||||
shell_exec('rm GeoLiteCity_'.date('Ym').'01.zip');
|
||||
|
||||
if(($Locations = file("GeoLiteCity_".date('Ym')."04/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
if(($Locations = file("GeoLiteCity_".date('Ym')."01/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
error("Download or extraction of maxmind database failed");
|
||||
}
|
||||
array_shift($Locations);
|
||||
@ -30,7 +31,7 @@
|
||||
echo "There are ".count($CountryIDs)." CountryIDs";
|
||||
echo "<br />";
|
||||
|
||||
if(($Blocks = file("GeoLiteCity_".date('Ym')."04/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
if(($Blocks = file("GeoLiteCity_".date('Ym')."01/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
echo "Error";
|
||||
}
|
||||
array_shift($Blocks);
|
||||
|
@ -511,13 +511,11 @@ function check_paranoia_here($Setting) {
|
||||
<? } ?>
|
||||
<?
|
||||
|
||||
if (check_paranoia_here('seeding+')) {
|
||||
$DB->query("SELECT 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 AND x.remaining=0");
|
||||
list($Seeding) = $DB->next_record();
|
||||
}
|
||||
if (check_paranoia_here('leeching+')) {
|
||||
$DB->query("SELECT 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 AND x.remaining>0");
|
||||
list($Leeching) = $DB->next_record();
|
||||
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");
|
||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||
$Seeding = isset($PeerCount['Seeding'][1]) ? $PeerCount['Seeding'][1] : 0;
|
||||
$Leeching = isset($PeerCount['Leeching'][1]) ? $PeerCount['Leeching'][1] : 0;
|
||||
}
|
||||
?>
|
||||
<? if (check_paranoia_here('seeding')) { ?>
|
||||
|
@ -207,7 +207,7 @@ h1.hidden {
|
||||
position: relative;
|
||||
float: right;
|
||||
width: 217px;
|
||||
height: 38px;
|
||||
height: 62px;
|
||||
padding: 10px 14px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
@ -227,7 +227,7 @@ h1.hidden {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
#userinfo_stats li:nth-child(even) {
|
||||
#userinfo_stats li:last-child {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
@ -239,6 +239,11 @@ h1.hidden {
|
||||
left: 128px;
|
||||
}
|
||||
|
||||
#fl_tokens {
|
||||
top: 5.4em;
|
||||
left: 128px;
|
||||
}
|
||||
|
||||
#userinfo_stats {
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -768,7 +773,7 @@ span.last_read a:hover {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
body#forums table.forum_post td.body > div { /* Wide main column (forums) */
|
||||
body#forums table.forum_post td.body > div, body#userhistory table.forum_post td.body > div { /* Wide main column (forums, user history) */
|
||||
width: 787px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user