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
6e8e01a471
commit
a7a85c2bdb
@ -706,7 +706,7 @@ private function to_html ($Array) {
|
|||||||
global $LoggedUser;
|
global $LoggedUser;
|
||||||
if ($LoggedUser['EnableMatureContent']) {
|
if ($LoggedUser['EnableMatureContent']) {
|
||||||
if (!empty($Block['Attr'])) {
|
if (!empty($Block['Attr'])) {
|
||||||
$Str.='<strong class="mature" style="font-size: 1.2em;">Mature content:</strong><strong> ' . $Block['Attr'] . '</strong><br \> <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
|
$Str.='<strong class="mature" style="font-size: 1.2em;">Mature content:</strong><strong> ' . $Block['Attr'] . '</strong><br /> <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
|
||||||
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
|
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -458,7 +458,7 @@ public static function format_username($UserID, $Badges = false, $IsWarned = tru
|
|||||||
|
|
||||||
if ($Badges) {
|
if ($Badges) {
|
||||||
$ClassesDisplay = array();
|
$ClassesDisplay = array();
|
||||||
foreach($SecondaryClasses as $PermID => $PermHTML) {
|
foreach ($SecondaryClasses as $PermID => $PermHTML) {
|
||||||
if ($UserInfo['ExtraClasses'][$PermID]) {
|
if ($UserInfo['ExtraClasses'][$PermID]) {
|
||||||
$ClassesDisplay[] = '<span class="secondary_class" title="'.$Classes[$PermID]['Name'].'">'.$PermHTML.'</span>';
|
$ClassesDisplay[] = '<span class="secondary_class" title="'.$Classes[$PermID]['Name'].'">'.$PermHTML.'</span>';
|
||||||
}
|
}
|
||||||
@ -547,10 +547,9 @@ public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $Ret
|
|||||||
//case 1 is avatars disabled
|
//case 1 is avatars disabled
|
||||||
switch($Setting) {
|
switch($Setting) {
|
||||||
case 0:
|
case 0:
|
||||||
if(!empty($Avatar)) {
|
if (!empty($Avatar)) {
|
||||||
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
|
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$URL = STATIC_SERVER."common/avatars/default.png";
|
$URL = STATIC_SERVER."common/avatars/default.png";
|
||||||
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
||||||
}
|
}
|
||||||
@ -587,16 +586,14 @@ public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $Ret
|
|||||||
$Type = "identicon";
|
$Type = "identicon";
|
||||||
}
|
}
|
||||||
$Rating = "pg";
|
$Rating = "pg";
|
||||||
if(!$Robot) {
|
if (!$Robot) {
|
||||||
$URL = "https://www.gravatar.com/avatar/".md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
|
$URL = "https://secure.gravatar.com/avatar/".md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$URL = "https://static1.robohash.org/".md5($Username)."?set=set".$Type."&size=".$Size."x".$Size;
|
$URL = "https://static1.robohash.org/".md5($Username)."?set=set".$Type."&size=".$Size."x".$Size;
|
||||||
}
|
}
|
||||||
if($ShowAvatar == True && !empty($Avatar)) {
|
if ($ShowAvatar == True && !empty($Avatar)) {
|
||||||
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
|
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
shell_exec('unzip GeoLiteCity-latest.zip');
|
shell_exec('unzip GeoLiteCity-latest.zip');
|
||||||
shell_exec('rm GeoLiteCity-latest.zip');
|
shell_exec('rm GeoLiteCity-latest.zip');
|
||||||
|
|
||||||
if(($Locations = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
if (($Locations = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||||
error("Download or extraction of maxmind database failed");
|
error("Download or extraction of maxmind database failed");
|
||||||
}
|
}
|
||||||
array_shift($Locations);
|
array_shift($Locations);
|
||||||
@ -21,7 +21,7 @@
|
|||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
$CountryIDs = array();
|
$CountryIDs = array();
|
||||||
foreach($Locations as $Location) {
|
foreach ($Locations as $Location) {
|
||||||
$Parts = explode(",", $Location);
|
$Parts = explode(",", $Location);
|
||||||
//CountryIDs[1] = "AP";
|
//CountryIDs[1] = "AP";
|
||||||
$CountryIDs[trim($Parts[0], '"')] = trim($Parts[1], '"');
|
$CountryIDs[trim($Parts[0], '"')] = trim($Parts[1], '"');
|
||||||
@ -30,7 +30,7 @@
|
|||||||
echo "There are ".count($CountryIDs)." CountryIDs";
|
echo "There are ".count($CountryIDs)." CountryIDs";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
if(($Blocks = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
if (($Blocks = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||||
echo "Error";
|
echo "Error";
|
||||||
}
|
}
|
||||||
array_shift($Blocks);
|
array_shift($Blocks);
|
||||||
@ -44,19 +44,19 @@
|
|||||||
$DB->query("TRUNCATE TABLE geoip_country");
|
$DB->query("TRUNCATE TABLE geoip_country");
|
||||||
|
|
||||||
$Values = array();
|
$Values = array();
|
||||||
foreach($Blocks as $Index => $Block) {
|
foreach ($Blocks as $Index => $Block) {
|
||||||
list($StartIP, $EndIP, $CountryID) = explode(",", $Block);
|
list($StartIP, $EndIP, $CountryID) = explode(",", $Block);
|
||||||
$StartIP = trim($StartIP, '"');
|
$StartIP = trim($StartIP, '"');
|
||||||
$EndIP = trim($EndIP, '"');
|
$EndIP = trim($EndIP, '"');
|
||||||
$CountryID = trim($CountryID, '"');
|
$CountryID = trim($CountryID, '"');
|
||||||
$Values[] = "('".$StartIP."', '".$EndIP."', '".$CountryIDs[$CountryID]."')";
|
$Values[] = "('".$StartIP."', '".$EndIP."', '".$CountryIDs[$CountryID]."')";
|
||||||
if($Index % $SplitOn == 0) {
|
if ($Index % $SplitOn == 0) {
|
||||||
$DB->query("INSERT INTO geoip_country (StartIP, EndIP, Code) VALUES ".implode(", ", $Values));
|
$DB->query("INSERT INTO geoip_country (StartIP, EndIP, Code) VALUES ".implode(", ", $Values));
|
||||||
$Values = array();
|
$Values = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($Values) > 0) {
|
if (count($Values) > 0) {
|
||||||
$DB->query("INSERT INTO geoip_country (StartIP, EndIP, Code) VALUES ".implode(", ", $Values));
|
$DB->query("INSERT INTO geoip_country (StartIP, EndIP, Code) VALUES ".implode(", ", $Values));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (!check_perms('admin_update_geoip')) { die(); }
|
if (!check_perms('admin_update_geoip')) {
|
||||||
|
die();
|
||||||
|
}
|
||||||
enforce_login();
|
enforce_login();
|
||||||
|
|
||||||
ini_set('memory_limit',1024*1024*1024);
|
ini_set('memory_limit',1024*1024*1024);
|
||||||
@ -100,7 +102,7 @@
|
|||||||
if (preg_match('/\|([A-Z]{2})\|ipv4\|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\|(\d+)\|/', $Country, $Matches)) {
|
if (preg_match('/\|([A-Z]{2})\|ipv4\|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\|(\d+)\|/', $Country, $Matches)) {
|
||||||
|
|
||||||
$Start = Tools::ip_to_unsigned($Matches[2]);
|
$Start = Tools::ip_to_unsigned($Matches[2]);
|
||||||
if($Start == 2147483647) { continue; }
|
if ($Start == 2147483647) { continue; }
|
||||||
|
|
||||||
if (!isset($Current)) {
|
if (!isset($Current)) {
|
||||||
$Current = array('StartIP' => $Start, 'EndIP' => $Start + $Matches[3],'Code' => $Matches[1]);
|
$Current = array('StartIP' => $Start, 'EndIP' => $Start + $Matches[3],'Code' => $Matches[1]);
|
||||||
|
@ -562,7 +562,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = '') {
|
|||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<td class="label nobr"><span title="Units are in bytes">Uploaded:</span></td>
|
<td class="label nobr"><span title="Units are in gibibytes (the base 2 sibling of gigabytes)">Uploaded:</span></td>
|
||||||
<td width="30%">
|
<td width="30%">
|
||||||
<select name="uploaded">
|
<select name="uploaded">
|
||||||
<option value="equal"<? if ($_GET['uploaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
<option value="equal"<? if ($_GET['uploaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||||
@ -596,7 +596,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = '') {
|
|||||||
<input type="text" name="invites1" size="6" value="<?=display_str($_GET['invites1'])?>" />
|
<input type="text" name="invites1" size="6" value="<?=display_str($_GET['invites1'])?>" />
|
||||||
<input type="text" name="invites2" size="6" value="<?=display_str($_GET['invites2'])?>" />
|
<input type="text" name="invites2" size="6" value="<?=display_str($_GET['invites2'])?>" />
|
||||||
</td>
|
</td>
|
||||||
<td class="label nobr"><span title="Units are in bytes">Downloaded:</span></td>
|
<td class="label nobr"><span title="Units are in gibibytes (the base 2 sibling of gigabytes)">Downloaded:</span></td>
|
||||||
<td width="30%">
|
<td width="30%">
|
||||||
<select name="downloaded">
|
<select name="downloaded">
|
||||||
<option value="equal"<? if ($_GET['downloaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
<option value="equal"<? if ($_GET['downloaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user