<?php require_once 'protect.php'; ?>
<?php if ($formhome) { ?><div class="content divform"><?php include $formhome.'.php';?></div><?php } ?>
<?php
// info1
$result2 = $mysqli->query("SELECT * FROM items WHERE category_id=$catid AND lang_id=$lang AND publish='yes' AND type=1 AND priority<10 ORDER BY priority");
while($row = $result2->fetch_array()) {	
$count++;
$id=$row['insert_id'];
$category_id=$row['category_id'];
$section_id=$row['section_id'];
$pageid=$row['page_id'];
$pageitem=$row['page'];
if ($itempage==1) { $siteitem=$pageitem; }
$pagesiteitem=$siteitem.".".$pageid;
$name=$row['name'];
$details=$row['details'];
$text=$row['text'];
$extra=$row['extra'];
$code=$row['code'];
$url=$row['url'];
$script=$row['script'];
$size=$row['size'];
$color=$row['color'];
$image=$row['image'];
$file=$row['file'];
$priority=$row['priority'];
$itemdate=$row['date'];
?><?php include 'info.php';?><?php }?>
<?php
$resultsec = $mysqli->query("SELECT id FROM sections WHERE promote LIKE '%1%' AND lang_id=$lang");
$rowspsec = mysqli_num_rows($resultsec);
$resultcat = $mysqli->query("SELECT id FROM categories WHERE promote LIKE '%1%' AND lang_id=$lang");
$rowspcat = mysqli_num_rows($resultcat);
?>
<?php if ($promoteorder==0) { ?>
<?php if ($titlehome1) { ?><div class="cleared content"><?php echo $titlehome1 ?></div><?php } ?>
<?php if ($rowspsec>0) { ?><div class="cleared content contentcat wp3"><?php include 'sec.php';?></div><?php }?>
<?php if ($rowspcat>0) { ?><div class="cleared content contentcat wp3"><?php include 'cat.php';?></div><?php }?>
<?php }?>
<?php echo $texthome1 ?>
<?php if ($titlehome2) { ?><div class="cleared content divh"><?php echo $titlehome2 ?></div><?php } ?>
<?php
$respromote = $mysqli->query("SELECT COUNT(id) FROM items WHERE promote LIKE '%1%' AND lang_id=$lang AND publish='yes'");
$rowsprom = $respromote->fetch_row();
$rowspromote = $rowsprom[0];
?>
<?php if ($rowspromote>0 AND $promoteitem==1) {?>
<div class="content"><div class="divitems bordercolor3">
<?php
// promote items
$result1 = $mysqli->query("SELECT * FROM items WHERE promote LIKE '%1%' AND lang_id=$lang AND publish='yes' ORDER BY type desc, priority");
while($row = $result1->fetch_array()) {	
include 'itemq.php';
?>
<?php if ($typei==2) { 
include 'itemb.php';
} else {
include 'info.php';
}?>
<?php }?>
<div class="cleared"></div>
</div></div><?php } ?>
<?php echo $texthome2 ?>
<?php if ($promoteorder==1) { ?>
<?php if ($titlehome1) { ?><div class="cleared content"><?php echo $titlehome1 ?></div><?php } ?>
<?php if ($rowspsec>0) { ?><div class="cleared content contentcat wp3"><?php include 'sec.php';?></div><?php }?>
<?php if ($rowspcat>0) { ?><div class="cleared content contentcat wp3"><?php include 'cat.php';?></div><?php }?>
<?php }?>
<div class="slogan color3 parallax divmodel1 text-center"><?php echo $slogan1 ?></div>
<?php
// info2
$result2 = $mysqli->query("SELECT * FROM items WHERE category_id=$catid AND lang_id=$lang AND publish='yes' AND type=1 AND priority>=10 ORDER BY priority");
while($row = $result2->fetch_array()) {	
$count++;
$id=$row['insert_id'];
$category_id=$row['category_id'];
$section_id=$row['section_id'];
$pageid=$row['page_id'];
$pageitem=$row['page'];
if ($itempage==1) { $siteitem=$pageitem; }
$pagesiteitem=$siteitem.".".$pageid;
$name=$row['name'];
$details=$row['details'];
$text=$row['text'];
$extra=$row['extra'];
$code=$row['code'];
$url=$row['url'];
$script=$row['script'];
$size=$row['size'];
$color=$row['color'];
$image=$row['image'];
$file=$row['file'];
$priority=$row['priority'];
$itemdate=$row['date'];
?><?php include 'info.php';?><?php }?><div class="cleared"></div>
<?php if ($reviewsmodule==1) { ?><?php include 'reviewsmodule.php';?><?php }?>