File: /var/www/www-root/data/www/NEWs/news.automoon.click/templates/2/news_load.php
<?php
include('../../inc/conf.php');
$data = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT * FROM `t_data` LIMIT 1"));
if (!isset($_COOKIE['cou'])) {
include("../../inc/geo/getcou.php");
setcookie ('cou', $crabs_country, $dt+315360000, '/', SITE);
} else {
$crabs_country = $_COOKIE['cou'];
}
if (isset($_COOKIE['city'])) {
$crabs_city = $_COOKIE['city'];
} else { $crabs_city = ''; }
?>
<section class="clearfix">
<?php
$qr3 = mysqli_query($connect_db, "SELECT id,ti,img,uchpu,linktype,newtab,relasttab FROM `t_news` WHERE `hide` = '0' AND (cou = '' OR cou LIKE '%".$crabs_country."%') ORDER BY RAND() LIMIT 4");
while($row2 = mysqli_fetch_assoc($qr3)) {
if (empty($row2['uchpu'])) { $nowchpu = '1'; } else { $nowchpu = htmlspecialchars($row2['uchpu']); }
if ($data['news_linktype'] == 3) {
if ($row2['linktype'] == 0) { $lnkview2 = '?type=open'; }
if ($row2['linktype'] == 1) { $lnkview2 = '?type=short'; }
if ($row2['linktype'] == 2) { $lnkview2 = ''; }
} else {
if ($data['news_linktype'] == 0) { $lnkview2 = '?type=open'; }
if ($data['news_linktype'] == 1) { $lnkview2 = '?type=short'; }
if ($data['news_linktype'] == 2) { $lnkview2 = ''; }
}
if ($data['news_newtab'] == 2) {
if ($row2['newtab'] == 0) { $retab2 = ''; } else {
if ($row2['relasttab'] == 0) { $retab2 = ''; }
if ($row2['relasttab'] == 1) { $retab2 = 'crabs_remain'; }
if ($row2['relasttab'] == 2) { $retab2 = 'crabs_renew'; }
}
} else {
if ($data['news_newtab'] == 0) { $retab2 = ''; } else {
if ($data['news_relasttab'] == 0) { $retab2 = ''; }
if ($data['news_relasttab'] == 1) { $retab2 = 'crabs_remain'; }
if ($data['news_relasttab'] == 2) { $retab2 = 'crabs_renew'; }
}
}
?>
<div class="column standard lt-1">
<a href="/view/<?php echo $nowchpu.'.'.wu_encode($row2['id']); echo $lnkview2; ?>" class="mid-preview js-ad-block <?php echo $retab2; ?>" <?php if ($data['news_newtab'] == 2) { if ($row2['newtab'] == 1) { echo ' target="_blank"'; } } else { if ($data['news_newtab'] == 1) { echo ' target="_blank"'; } } ?>>
<div class="image"><img src="/img/upl/<?php echo $row2['img']; ?>" data-src="/img/upl/<?php echo $row2['img']; ?>" class="lazyload"></div>
<div class="title"><?php echo htmlspecialchars(macros_city($row2['ti'])); ?></div>
</a>
</div>
<?php } ?>
</section>
<section class="clearfix">
<?php
$qr3 = mysqli_query($connect_db, "SELECT id,ti,img,uchpu,linktype,newtab,relasttab FROM `t_news` WHERE `hide` = '0' AND (cou = '' OR cou LIKE '%".$crabs_country."%') ORDER BY RAND() LIMIT 4");
while($row2 = mysqli_fetch_assoc($qr3)) {
if (empty($row2['uchpu'])) { $nowchpu = '1'; } else { $nowchpu = htmlspecialchars($row2['uchpu']); }
if ($data['news_linktype'] == 3) {
if ($row2['linktype'] == 0) { $lnkview2 = '?type=open'; }
if ($row2['linktype'] == 1) { $lnkview2 = '?type=short'; }
if ($row2['linktype'] == 2) { $lnkview2 = ''; }
} else {
if ($data['news_linktype'] == 0) { $lnkview2 = '?type=open'; }
if ($data['news_linktype'] == 1) { $lnkview2 = '?type=short'; }
if ($data['news_linktype'] == 2) { $lnkview2 = ''; }
}
if ($data['news_newtab'] == 2) {
if ($row2['newtab'] == 0) { $retab2 = ''; } else {
if ($row2['relasttab'] == 0) { $retab2 = ''; }
if ($row2['relasttab'] == 1) { $retab2 = 'crabs_remain'; }
if ($row2['relasttab'] == 2) { $retab2 = 'crabs_renew'; }
}
} else {
if ($data['news_newtab'] == 0) { $retab2 = ''; } else {
if ($data['news_relasttab'] == 0) { $retab2 = ''; }
if ($data['news_relasttab'] == 1) { $retab2 = 'crabs_remain'; }
if ($data['news_relasttab'] == 2) { $retab2 = 'crabs_renew'; }
}
}
?>
<div class="column standard lt-1">
<a href="/view/<?php echo $nowchpu.'.'.wu_encode($row2['id']); echo $lnkview2; ?>" class="mid-preview js-ad-block <?php echo $retab2; ?>" <?php if ($data['news_newtab'] == 2) { if ($row2['newtab'] == 1) { echo ' target="_blank"'; } } else { if ($data['news_newtab'] == 1) { echo ' target="_blank"'; } } ?>>
<div class="image"><img src="/img/upl/<?php echo $row2['img']; ?>" data-src="/img/upl/<?php echo $row2['img']; ?>" class="lazyload"></div>
<div class="title"><?php echo htmlspecialchars(macros_city($row2['ti'])); ?></div>
</a>
</div>
<?php } ?>
</section>
<?php
$qr4 = mysqli_query($connect_db, "SELECT id,ti,img,uchpu,linktype,newtab,relasttab FROM `t_news` WHERE `hide` = '0' AND (cou = '' OR cou LIKE '%".$crabs_country."%') ORDER BY RAND() LIMIT 2");
?>
<section class="first clearfix ">
<?php
while($row = mysqli_fetch_assoc($qr4)) {
if (empty($row2['uchpu'])) { $nowchpu = '1'; } else { $nowchpu = htmlspecialchars($row2['uchpu']); }
if ($data['news_linktype'] == 3) {
if ($row['linktype'] == 0) { $lnkview = '?type=open'; }
if ($row['linktype'] == 1) { $lnkview = '?type=short'; }
if ($row['linktype'] == 2) { $lnkview = ''; }
} else {
if ($data['news_linktype'] == 0) { $lnkview = '?type=open'; }
if ($data['news_linktype'] == 1) { $lnkview = '?type=short'; }
if ($data['news_linktype'] == 2) { $lnkview = ''; }
}
if ($data['news_newtab'] == 2) {
if ($row['newtab'] == 0) { $retab = ''; } else {
if ($row['relasttab'] == 0) { $retab = ''; }
if ($row['relasttab'] == 1) { $retab = 'crabs_remain'; }
if ($row['relasttab'] == 2) { $retab = 'crabs_renew'; }
}
} else {
if ($data['news_newtab'] == 0) { $retab = ''; } else {
if ($data['news_relasttab'] == 0) { $retab = ''; }
if ($data['news_relasttab'] == 1) { $retab = 'crabs_remain'; }
if ($data['news_relasttab'] == 2) { $retab = 'crabs_renew'; }
}
}
?>
<div class="column wide">
<a href="/view/<?php echo $nowchpu.'.'.wu_encode($row['id']); echo $lnkview; ?>" class="wide-preview js-ad-block <?php echo $retab; ?>" <?php if ($data['news_newtab'] == 2) { if ($row['newtab'] == 1) { echo ' target="_blank"'; } } else { if ($data['news_newtab'] == 1) { echo ' target="_blank"'; } } ?>>
<div class="image"><img src="/img/upl/<?php echo $row['img']; ?>" data-src="/img/upl/<?php echo $row['img']; ?>" class="lazyload crabsonit"></div>
<div class="text">
<div class="category-label">Горячая новость!</div>
<div class="title"><?php echo htmlspecialchars(macros_city($row['ti'])); ?></div>
</div>
</a>
</div>
<?php } ?>
</section>