$rating_plus = $rating + $rate_minus;
$plus_bar = round(100 * $rating_plus / $vote_num); $minus_bar = 100 - $plus_bar;
<div class="rate-bar-wrap"> <div class="rate-bar-plus-var>{$plus_bar}%</div> <div class="rate-bar"> <div class="rate-bar-plus" style="width:{$plus_bar}%;"></div> </div> <div class="rate-bar-minus-var>{$minus_bar}%</div> </div>
engine/ajax/subscribe.php
elseif ($do == 'tags') {
$tag = str_replace(",", " + ", $tag);
if (clean_url($_SERVER['HTTP_REFERER']) != clean_url($_SERVER['HTTP_HOST'])) die("Hacking attempt!");
if (!isset($_SERVER['HTTP_REFERER']) || clean_url($_SERVER['HTTP_REFERER']) != clean_url($_SERVER['HTTP_HOST'])) die("Hacking attempt!");
if($_POST['do']=='click'){
if (isset($_POST['do']) && $_POST['do'] == 'click') {
require_once ENGINE_DIR."/mods/miniposter/index.php"; $tpl->result['content'] = preg_replace_callback("#\\{poster(.+?)\\}#i","mpic",$tpl->result['content']);
$(document).on('click','.unsubcomm',function(){ ShowLoading(); var $this = $(this); $.post(dle_root+"engine/ajax/subscribe.php",{post_id:$('#post_id').val()},function(d){ HideLoading(); if(d.error) DLEalert(d.error,"Ошибка"); else $this.html(d.html); },"json"); });
?>
if ($config['speedbar'] ... } ?>
<?PHP
error_reporting(E_ALL ^ E_NOTICE); @ini_set('error_reporting', E_ALL ^ E_NOTICE);