mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 02:21:36 +00:00
Empty commit
This commit is contained in:
parent
98bc98ed16
commit
35473bd15d
@ -584,7 +584,7 @@ private function to_html ($Array) {
|
||||
$Str.='<em>'.$this->to_html($Block['Val'])."</em>";
|
||||
break;
|
||||
case 's':
|
||||
$Str.='<span style="text-decoration: line-through">'.$this->to_html($Block['Val']).'</span>';
|
||||
$Str.='<span style="text-decoration: line-through;">'.$this->to_html($Block['Val']).'</span>';
|
||||
break;
|
||||
case 'important':
|
||||
$Str.='<strong class="important_text">'.$this->to_html($Block['Val']).'</strong>';
|
||||
@ -635,7 +635,7 @@ private function to_html ($Array) {
|
||||
$Str.='<code>'.$Block['Val'].'</code>';
|
||||
break;
|
||||
case 'list':
|
||||
$Str .= '<'.$Block['ListType'].'>';
|
||||
$Str.='<'.$Block['ListType'].'>';
|
||||
foreach($Block['Val'] as $Line) {
|
||||
|
||||
$Str.='<li>'.$this->to_html($Line).'</li>';
|
||||
@ -688,10 +688,10 @@ private function to_html ($Array) {
|
||||
$Exploded = explode("|", $this->to_html($Block['Attr']));
|
||||
if(isset($Exploded[1]) && is_numeric($Exploded[1])) {
|
||||
$PostID = trim($Exploded[1]);
|
||||
$Str.= '<a href="#" onclick="QuoteJump(event, '.$PostID.'); return false;"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
|
||||
$Str.='<a href="#" onclick="QuoteJump(event, '.$PostID.'); return false;"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
|
||||
}
|
||||
else {
|
||||
$Str.= '<strong class="quoteheader">'.$Exploded[0].'</strong> wrote: ';
|
||||
$Str.='<strong class="quoteheader">'.$Exploded[0].'</strong> wrote: ';
|
||||
}
|
||||
}
|
||||
$Str.='<blockquote>'.$this->to_html($Block['Val']).'</blockquote>';
|
||||
@ -710,11 +710,11 @@ private function to_html ($Array) {
|
||||
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
|
||||
}
|
||||
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 {
|
||||
$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;
|
||||
case 'img':
|
||||
|
@ -488,7 +488,7 @@ function to_html($Array) {
|
||||
$Str.='<code>'.$Block['Val'].'</code>';
|
||||
break;
|
||||
case 'list':
|
||||
$Str .= '<ul>';
|
||||
$Str.='<ul>';
|
||||
foreach($Block['Val'] as $Line) {
|
||||
|
||||
$Str.='<li>'.$this->to_html($Line).'</li>';
|
||||
@ -524,7 +524,7 @@ function to_html($Array) {
|
||||
case 'quote':
|
||||
$this->NoImg++; // No images inside quote tags
|
||||
if(!empty($Block['Attr'])) {
|
||||
$Str.= '<strong>'.$this->to_html($Block['Attr']).'</strong> wrote: ';
|
||||
$Str.='<strong>'.$this->to_html($Block['Attr']).'</strong> wrote: ';
|
||||
}
|
||||
$Str.='<blockquote>'.$this->to_html($Block['Val']).'</blockquote>';
|
||||
$this->NoImg--;
|
||||
@ -542,7 +542,7 @@ function to_html($Array) {
|
||||
$Str.='[img]'.$Block['Val'].'[/img]';
|
||||
} else {
|
||||
if(check_perms('site_proxy_images')) {
|
||||
$Str.='<img style="max-width: 500px;" onclick="lightbox.init(this,500);" alt="'.$Block['Val'].'" src="http://'.SITE_URL.'/image.php?i='.urlencode($Block['Val']).'" />';
|
||||
$Str.='<img style="max-width: 500px;" onclick="lightbox.init(this,500);" alt="'.$Block['Val'].'" src="https://'.SITE_URL.'/image.php?i='.urlencode($Block['Val']).'" />';
|
||||
} else {
|
||||
$Str.='<img style="max-width: 500px;" onclick="lightbox.init(this,500);" alt="'.$Block['Val'].'" src="'.$Block['Val'].'" />';
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ function to_html($Array) {
|
||||
$Str.='<pre>'.$Block['Val'].'</pre>';
|
||||
break;
|
||||
case 'list':
|
||||
$Str .= '<ul>';
|
||||
$Str.='<ul>';
|
||||
foreach($Block['Val'] as $Line) {
|
||||
|
||||
$Str.='<li>'.$this->to_html($Line).'</li>';
|
||||
@ -485,7 +485,7 @@ function to_html($Array) {
|
||||
case 'quote':
|
||||
$this->NoImg++; // No images inside quote tags
|
||||
if(!empty($Block['Attr'])) {
|
||||
$Str.= '<strong>'.$this->to_html($Block['Attr']).'</strong> wrote: ';
|
||||
$Str.='<strong>'.$this->to_html($Block['Attr']).'</strong> wrote: ';
|
||||
}
|
||||
$Str.='<blockquote>'.$this->to_html($Block['Val']).'</blockquote>';
|
||||
$this->NoImg--;
|
||||
|
@ -48,7 +48,11 @@ public static function geoip($IP) {
|
||||
if (isset($IPs[$IP])) {
|
||||
return $IPs[$IP];
|
||||
}
|
||||
if (is_number($IP)) {
|
||||
$Long = $IP;
|
||||
} else {
|
||||
$Long = Tools::ip_to_unsigned($IP);
|
||||
}
|
||||
if(!$Long || $Long == 2130706433) { // No need to check cc for 127.0.0.1
|
||||
return false;
|
||||
}
|
||||
@ -126,7 +130,7 @@ public static function lookup_ip($IP) {
|
||||
*/
|
||||
public static function display_ip($IP) {
|
||||
$Line = display_str($IP).' ('.Tools::get_country_code_by_ajax($IP).') ';
|
||||
$Line .= '[<a href="user.php?action=search&ip_history=on&ip='.display_str($IP).'&matchtype=strict" title="Search">S</a>]';
|
||||
$Line .= '<a href="user.php?action=search&ip_history=on&ip='.display_str($IP).'&matchtype=strict" title="Search" class="brackets">S</a>';
|
||||
|
||||
return $Line;
|
||||
}
|
||||
|
@ -834,7 +834,6 @@ function compare($X, $Y){
|
||||
$Cache->cache_value('similar_positions_'.$ArtistID, $SimilarData, 3600*24);
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="similar_artist_map" class="box">
|
||||
<div id="flipper_head" class="head">
|
||||
<a href="#">↑</a>
|
||||
@ -855,19 +854,17 @@ function compare($X, $Y){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var cloudLoaded = false;
|
||||
|
||||
function flipView() {
|
||||
var state = document.getElementById('flip_view_1').style.display == 'block';
|
||||
|
||||
if(state) {
|
||||
|
||||
document.getElementById('flip_view_1').style.display='none';
|
||||
document.getElementById('flip_view_2').style.display='block';
|
||||
document.getElementById('flipper_title').innerHTML = 'Similar Artist Cloud';
|
||||
document.getElementById('flip_to').innerHTML = ' [Switch to Map]';
|
||||
document.getElementById('flipper_title').innerHTML = 'Similar artist cloud';
|
||||
document.getElementById('flip_to').innerHTML = 'Switch to map';
|
||||
|
||||
if(!cloudLoaded) {
|
||||
require("static/functions/jquery.js", function () {
|
||||
@ -878,15 +875,12 @@ function flipView() {
|
||||
});
|
||||
cloudLoaded = true;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
document.getElementById('flip_view_1').style.display='block';
|
||||
document.getElementById('flip_view_2').style.display='none';
|
||||
document.getElementById('flipper_title').innerHTML = 'Similar Artist Map';
|
||||
document.getElementById('flip_to').innerHTML = ' [Switch to Cloud]';
|
||||
|
||||
document.getElementById('flipper_title').innerHTML = 'Similar artist map';
|
||||
document.getElementById('flip_to').innerHTML = 'Switch to cloud';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,8 +290,8 @@ function compare($X, $Y){
|
||||
<a href="bookmarks.php?type=requests" class="brackets">Requests</a>
|
||||
<? if (count($TorrentList) > 0) { ?>
|
||||
<br /><br />
|
||||
<a href="bookmarks.php?action=remove_snatched&auth=<?=$LoggedUser['AuthKey']?>" class="brackets" onclick="return confirm('Are you sure you want to remove the bookmarks for all items you\'ve snatched?');">Remove Snatched</a>
|
||||
<a href="bookmarks.php?action=edit&type=torrents" class="brackets">Manage Torrents</a>
|
||||
<a href="bookmarks.php?action=remove_snatched&auth=<?=$LoggedUser['AuthKey']?>" class="brackets" onclick="return confirm('Are you sure you want to remove the bookmarks for all items you\'ve snatched?');">Remove snatched</a>
|
||||
<a href="bookmarks.php?action=edit&type=torrents" class="brackets">Manage torrents</a>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -18,7 +18,7 @@
|
||||
$Conditions = "WHERE t.UserID = $UserID AND tc.AuthorID != t.UserID AND tc.AddedTime > t.Time";
|
||||
$Title = 'Comments left on your torrents';
|
||||
$Header = 'Comments left on your uploads';
|
||||
if($Self) $OtherLink = '<a href="comments.php?action=torrents">Display comments you\'ve made</a>';
|
||||
if($Self) $OtherLink = '<a href="comments.php?action=torrents" class="brackets">Display comments you have made</a>';
|
||||
}
|
||||
else {
|
||||
$Conditions = "WHERE tc.AuthorID = $UserID";
|
||||
|
@ -55,6 +55,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!isset($Forums[$ForumID])) { error(404); }
|
||||
// Make sure they're allowed to look at the page
|
||||
if (!check_perms('site_moderate_forums')) {
|
||||
|
@ -36,8 +36,6 @@
|
||||
$ThreadID = $_GET['threadid'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($LoggedUser['PostsPerPage'])) {
|
||||
$PerPage = $LoggedUser['PostsPerPage'];
|
||||
} else {
|
||||
@ -165,7 +163,7 @@
|
||||
<div class="center">
|
||||
<a href="reports.php?action=report&type=thread&id=<?=$ThreadID?>" class="brackets">Report Thread</a>
|
||||
<a href="#" onclick="Subscribe(<?=$ThreadID?>);return false;" id="subscribelink<?=$ThreadID?>" class="brackets"><?=(in_array($ThreadID, $UserSubscriptions) ? 'Unsubscribe' : 'Subscribe')?></a>
|
||||
<a href="#" class="brackets" onclick="$('#searchthread').toggle(); this.innerHTML = (this.innerHTML == 'Search this Thread'?'Hide Search':'Search this Thread'); return false;">Search this Thread</a>
|
||||
<a href="#" onclick="$('#searchthread').toggle(); this.innerHTML = (this.innerHTML == 'Search this Thread'?'Hide Search':'Search this Thread'); return false;" class="brackets">Search this Thread</a>
|
||||
</div>
|
||||
<div id="searchthread" class="hidden center">
|
||||
<div style="display: inline-block;">
|
||||
|
@ -172,7 +172,10 @@
|
||||
|
||||
// Function to log a user's login attempt
|
||||
function log_attempt($UserID) {
|
||||
global $DB, $Cache, $AttemptID, $Attempts, $Bans, $BannedUntil, $Time;
|
||||
global $DB, $Cache, $AttemptID, $Attempts, $Bans, $BannedUntil, $Time, $UserID;
|
||||
$IPStr = $_SERVER['REMOTE_ADDR'];
|
||||
$IPA = substr($IPStr, 0, strcspn($IPStr, '.'));
|
||||
$IP = Tools::ip_to_unsigned($IPStr);
|
||||
if($AttemptID) { // User has attempted to log in recently
|
||||
$Attempts++;
|
||||
if ($Attempts>5) { // Only 6 allowed login attempts, ban user's IP
|
||||
@ -185,7 +188,6 @@ function log_attempt($UserID) {
|
||||
WHERE ID='".db_string($AttemptID)."'");
|
||||
|
||||
if ($Bans>9) { // Automated bruteforce prevention
|
||||
$IP = Tools::ip_to_unsigned($_SERVER['REMOTE_ADDR']);
|
||||
$DB->query("SELECT Reason FROM ip_bans WHERE ".$IP." BETWEEN FromIP AND ToIP");
|
||||
if($DB->record_count() > 0) {
|
||||
//Ban exists already, only add new entry if not for same reason
|
||||
@ -200,8 +202,7 @@ function log_attempt($UserID) {
|
||||
$DB->query("INSERT IGNORE INTO ip_bans
|
||||
(FromIP, ToIP, Reason) VALUES
|
||||
('$IP','$IP', 'Automated ban per >60 failed login attempts')");
|
||||
$A = substr($_SERVER['REMOTE_ADDR'], 0, strcspn($_SERVER['REMOTE_ADDR'], '.'));
|
||||
$Cache->delete_value('ip_bans_'.$A);
|
||||
$Cache->delete_value('ip_bans_'.$IPA);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -216,12 +217,16 @@ function log_attempt($UserID) {
|
||||
$Attempts=1;
|
||||
$DB->query("INSERT INTO login_attempts
|
||||
(UserID,IP,LastAttempt,Attempts) VALUES
|
||||
('".db_string($UserID)."','".db_string($_SERVER['REMOTE_ADDR'])."','".sqltime()."',1)");
|
||||
('".db_string($UserID)."','".db_string($IPStr)."','".sqltime()."',1)");
|
||||
}
|
||||
} // end log_attempt function
|
||||
|
||||
// If user has submitted form
|
||||
if(isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['password']) && !empty($_POST['password'])) {
|
||||
if (strtotime($BannedUntil) > time()) {
|
||||
header("Location: login.php");
|
||||
die();
|
||||
}
|
||||
$Err=$Validate->ValidateForm($_POST);
|
||||
|
||||
if(!$Err) {
|
||||
|
@ -95,13 +95,13 @@
|
||||
<a href="requests.php?action=delete&id=<?=$RequestID?>" class="brackets">Delete</a>
|
||||
<? } ?>
|
||||
<? if(has_bookmarked('request', $RequestID)) { ?>
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Unbookmark('request', <?=$RequestID?>,'[Bookmark]');return false;" class="brackets">Remove bookmark</a>
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Unbookmark('request', <?=$RequestID?>,'Bookmark');return false;" class="brackets">Remove bookmark</a>
|
||||
<? } else { ?>
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Bookmark('request', <?=$RequestID?>,'[Remove bookmark]');return false;" class="brackets">Bookmark</a>
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Bookmark('request', <?=$RequestID?>,'Remove bookmark');return false;" class="brackets">Bookmark</a>
|
||||
<? } ?>
|
||||
<a href="reports.php?action=report&type=request&id=<?=$RequestID?>" class="brackets">Report request</a>
|
||||
<? if(!$IsFilled) { ?>
|
||||
<a href="upload.php?requestid=<?=$RequestID?><?=($GroupID?"&groupid=$GroupID":'')?>" class="brackets">Upload request</a>
|
||||
<a href="upload.php?requestid=<?=$RequestID?><?= ($GroupID ? "&groupid=$GroupID" : '') ?>" class="brackets">Upload request</a>
|
||||
<? }
|
||||
if(!$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))) { ?>
|
||||
<a href="reports.php?action=report&type=request_update&id=<?=$RequestID?>" class="brackets">Request update</a>
|
||||
|
@ -404,7 +404,7 @@
|
||||
</table>
|
||||
<table class="layout">
|
||||
<tr id="release_list">
|
||||
<td class="label">Release Types</td>
|
||||
<td class="label">Release types</td>
|
||||
<td>
|
||||
<input type="checkbox" id="toggle_releases" onchange="Toggle('releases', 0)" <?=(!$Submitted || !empty($ReleaseArray) && count($ReleaseArray) == count($ReleaseTypes) ? ' checked="checked"' : '')?>/> <label for="toggle_releases">All</label>
|
||||
<? $i = 0;
|
||||
@ -495,7 +495,7 @@
|
||||
<table id="request_table" class="request_table border" cellpadding="6" cellspacing="1" border="0" width="100%">
|
||||
<tr class="colhead_dark">
|
||||
<td style="width: 38%;" class="nobr">
|
||||
<strong>Request Name</strong> / <a href="?order=year&sort=<?=(($CurrentOrder == 'year') ? $NewSort : 'desc')?>&<?=$CurrentURL ?>"><strong>Year</strong></a>
|
||||
<strong>Request name</strong> / <a href="?order=year&sort=<?=(($CurrentOrder == 'year') ? $NewSort : 'desc')?>&<?=$CurrentURL ?>"><strong>Year</strong></a>
|
||||
</td>
|
||||
<td class="nobr">
|
||||
<a href="?order=votes&sort=<?=(($CurrentOrder == 'votes') ? $NewSort : 'desc')?>&<?=$CurrentURL ?>"><strong>Votes</strong></a>
|
||||
@ -516,7 +516,7 @@
|
||||
<a href="?order=created&sort=<?=(($CurrentOrder == 'created') ? $NewSort : 'desc')?>&<?=$CurrentURL ?>"><strong>Created</strong></a>
|
||||
</td>
|
||||
<td class="nobr">
|
||||
<a href="?order=lastvote&sort=<?=(($CurrentOrder == 'lastvote') ? $NewSort : 'desc')?>&<?=$CurrentURL ?>"><strong>Last Vote</strong></a>
|
||||
<a href="?order=lastvote&sort=<?=(($CurrentOrder == 'lastvote') ? $NewSort : 'desc')?>&<?=$CurrentURL ?>"><strong>Last vote</strong></a>
|
||||
</td>
|
||||
</tr>
|
||||
<? if($NumResults == 0) { ?>
|
||||
|
@ -536,20 +536,13 @@ h3{margin:10px 0}
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
tr.torrent .bookmark > a:before { content:""; }
|
||||
tr.torrent .bookmark > a:after { content:""; }
|
||||
tr.torrent .bookmark > a:before { content: ""; }
|
||||
tr.torrent .bookmark > a:after { content: ""; }
|
||||
|
||||
.sidebar .navigation_list li {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.linkbox .brackets:before {
|
||||
content: "[ ";
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.linkbox .brackets:after {
|
||||
content: " ]";
|
||||
.linkbox .brackets:before, .linkbox .brackets:after {
|
||||
color: #757575;
|
||||
}
|
||||
|
@ -466,12 +466,6 @@ h3{margin:10px 0}
|
||||
.cats_comedy{width:30px; height:30px; background:url(https://what.cd/static/styles/minimal/images/icons/comedy.png) top left no-repeat}
|
||||
.cats_comics{width:30px; height:30px; background:url(https://what.cd/static/styles/minimal/images/icons/comics.png) top left no-repeat}
|
||||
|
||||
.linkbox .brackets:before {
|
||||
content: "[ ";
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.linkbox .brackets:after {
|
||||
content: " ]";
|
||||
.linkbox .brackets:before, .linkbox .brackets:after {
|
||||
color: #757575;
|
||||
}
|
||||
|
@ -489,6 +489,8 @@ table tr td.edition_info {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:734px;
|
||||
right:0;
|
||||
width: 300px;
|
||||
}
|
||||
#artist #content .linkbox:first-of-type a {
|
||||
margin-right:5px;
|
||||
|
Loading…
Reference in New Issue
Block a user