This commit is contained in:
Shish 2023-01-11 18:37:02 +00:00
parent 38609133b1
commit 9b6f40e06e
6 changed files with 35 additions and 18 deletions

View File

@ -76,6 +76,10 @@ class Image
public static function by_id(int $id): ?Image
{
global $database;
if($id > 2**32) {
// for some reason bots query huge numbers and pollute the DB error logs...
return null;
}
$row = $database->get_row("SELECT * FROM images WHERE images.id=:id", ["id"=>$id]);
return ($row ? new Image($row) : null);
}

View File

@ -1,13 +1,12 @@
document.addEventListener('DOMContentLoaded', () => {
if(Cookies.get("ui-tnc-agreed") !== "true") {
if(Cookies.get("ui-tnc-agreed") !== "true" && window.location.href.indexOf("/wiki/") == -1) {
$("BODY").addClass("censored");
$("BODY").append("<div class='tnc_bg'></div>");
$("BODY").append(""+
"<div class='tnc'>"+
"<p>For legal reasons, we need to point out that:"+
"<p>A) this site contains material not suitable for minors"+
"<br>B) cookies may be used"+
"<p><a onclick='tnc_agree();'>Click here if you're an adult, and you're ok with that</a>"+
"<p>Cookies may be used. Please read our <a href='https://rule34.paheal.net/wiki/Privacy%20policy'>privacy policy</a> for more information."+
"<p>By accepting to enter you agree to our <a href='https://rule34.paheal.net/wiki/rules'>rules</a> and <a href='https://rule34.paheal.net/wiki/Terms%20of%20use'>terms of service</a>."+
"<p><a onclick='tnc_agree();'>Agree</a> / <a href='https://google.com'>Disagree</a>"+
"</div>"+
"");
}

View File

@ -38,7 +38,7 @@ class SourceSetEvent extends Event
}
class TagSetException extends SCoreException
class TagSetException extends UserErrorException
{
public ?string $redirect;

View File

@ -11,7 +11,7 @@
<a style="font-size: 2em;" onclick="toggleNav();">&nbsp;Sidebar&nbsp;</a>
</td>
<td id="mini-logo">
<a class="vis-mobile" href="//rule34.paheal.net/post/list"><img alt="logo" src="//rule34.paheal.net/themes/rule34v2/rule34_logo_top.png" style="height: 34px;"/></a>
<a class="vis-mobile" href="//rule34.paheal.net/post/list"><img alt="logo" src="//rule34.paheal.net/themes/rule34v2/rule34_logo_christ.png" style="height: 34px;"/></a>
</td>
<td>
<input name='search' size="45" type='text' placeholder='Search' autocomplete='off' class='autocomplete_tags' value="<?=$query;?>"/>
@ -37,22 +37,22 @@
</ul>
</li>
</ul>
<!--<ul class="header-sites">
<!--<ul class="header-sites">
<li><a href="#" class="top_parent">Sites</a>
<ul>
<li><a href="//rule34.paheal.net/" class="sub_option">Rule #34</a></li>
<li><a href="//rule63.paheal.net/" class="sub_option">Rule #63</a></li>
<li><a href="//cosplay.paheal.net/" class="sub_option">Cosplay</a></li>
<li><a href="http://rule63.paheal.net/" class="sub_option">Rule #63</a></li>
<li><a href="http://cosplay.paheal.net/" class="sub_option">Cosplay</a></li>
<li><a href="//rule34c.paheal.net/" class="sub_option">Rule #34c</a></li>
</ul>
</li>
</ul>-->
<ul>
<li><a href="#" class="top_parent">Community &#9660;</a>
<ul>
<!--<li><a href="//forum.paheal.net" class="sub_option">Forum</a></li>-->
<!--<li><a href="http://forum.paheal.net" class="sub_option">Forum</a></li>-->
<li><a href="//rule34.paheal.net/wiki/friends" class="parent">Friends of paheal</a>
<li><a href="//rule34.paheal.net/wiki/DNP" class="parent">DNP List</a>
<li><a href="#" class="parent">Chat</a>
@ -81,15 +81,15 @@
</ul>
</li>
</ul>
<ul>
<li><a class="menu top_parent" href="//rule34.paheal.net/wiki/Notes">ANNOUNCEMENTS</a></li>
</ul>
<ul>
<li><a class="menu top_parent" href="https://s.zlink2.com/splash.php?idzone=3832265&return_url=" target="_blank" style="color: red;">Cunt Empire!</a></li>
<li><a href="https://s.zlinkb.com/d.php?z=3832265" target="_blank">[Check out our partners!]</a></li>
</ul>
</div>
</div>

View File

@ -31,6 +31,7 @@ class CustomHomeTheme extends HomeTheme
#counter {display: none;}
}
</style>
<meta name="juicyads-site-verification" content="20d309e193510e130c3f8a632f281335">
</head>
<body>
$body
@ -70,6 +71,20 @@ EOD
<script type='text/javascript' data-cfasync='false' async>(adsbyjuicy = window.adsbyjuicy || []).push({'adzone':825625});</script>
<!--JuicyAds END-->
<script type='application/javascript' src='https://a.realsrv.com/video-slider.js'></script>
<script type='application/javascript'>
var adConfig = {
'idzone': 3465907,
'frequency_period': 720,
'close_after': 0,
'on_complete': 'hide',
'branding_enabled': 1,
'screen_density': 25,
'cta_enabled': 0
};
ExoVideoSlider.init(adConfig);
</script>
<small><small>
$contact_link Serving $num_comma posts &ndash;
Running <a href='https://code.shishnet.org/shimmie2/'>Shimmie2</a>

View File

@ -125,8 +125,7 @@ EOD;
<article>
$flash_html
<!-- <h2>Database reboot will be happening in a bit, expect a few minutes of downtime~</h2>
-->
<!-- <h2>Server hardware upgrades will be happening today, expect some downtime while reboots happen~</h2> -->
$main_block_html
</article>