<?php include 'sets.php';?>
<?php
$superuser="0";
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Webadmin <?php echo $domain ?></title>
<?php include 'codes.php';?>
</head>
<body>

<?php include 'navbar.php';?>
    
<div class="container">
<div class="frame">
<div class="frametitles flist">
<?php
if  (isset($_POST['changesection'.$_REQUEST['id']])) {
$section_id = $mysqli->real_escape_string(stripslashes($_REQUEST['section_id']));
$mysqli->query("UPDATE items SET section_id='$section_id' WHERE insert_id='{$_REQUEST['id']}'"); 
}?> 
<?php
if ($_REQUEST['secid']) { 
$secid = $mysqli->real_escape_string(stripslashes($_REQUEST['secid']));
}else{
$secid=0;
}

$resultsc = $mysqli->query("SELECT id FROM sections WHERE lang_id=$lang");
$srows = mysqli_num_rows($resultsc);

$result = $mysqli->query("SELECT * FROM items WHERE promote LIKE '%1%' AND lang_id=$lang");
$rows = mysqli_num_rows($result);
?>
<a href="list-itemsp.php"><?php echo $adminpromoted ?></a> (<?php echo $rows ?>)
</div>
<div class="framein">

<div id="contentlistingitem">
<ul class="nospace">
<?php
include ('pagination.php'); 

$result = $mysqli->query("SELECT * FROM items WHERE promote LIKE '%1%' AND lang_id=$lang ORDER BY type desc, publish desc, priority LIMIT $start,$nritems");
while($row = $result->fetch_array()) {
$count++;
$id=$row['insert_id'];
$submitid=$row['insert_id'];
$lang_id=$row['lang_id'];
$category_id=$row['category_id'];
$catid=$row['category_id'];
$section_id=$row['section_id'];
$secid=$row['section_id'];
$name=$row['name'];
$description=$row['description'];
$details=$row['details'];
$text=$row['text'];
$code=$row['code'];
$url=$row['url'];
$email=$row['email'];
$script=$row['script'];
$price=$row['price'];
$offerprice=$row['offerprice'];
$weight=$row['weight'];
$unit=$row['unit'];
$image=$row['image'];
$file=$row['file'];
$new=$row['new'];
$available=$row['available'];
$promote=$row['promote'];
$size=$row['size'];
$color=$row['color'];
$showpage=$row['showpage'];
$publish=$row['publish'];
$priority=$row['priority'];
$date=$row['date'];

$result1 = $mysqli->query("SELECT * FROM categories WHERE insert_id=$category_id AND lang_id=$lang");
$row = $result1->fetch_array(); 
$catid=$row['insert_id'];
$cat=$row['name'];
$typec=$row['type'];
?>
<?php include 'itemin.php';?>
<?php } ?>
      
<div class="divpaginate">
<?php include 'paginate.php';?>
</div>
</ul>
</div>
      
</div>
</div>
</div>

<?php include 'menudown.php';?>

</body>
</html>