<?php
$resultcat1 = $mysqli->query("SELECT id FROM categories WHERE type=1 AND lang_id=$lang");
$rowscat1 = mysqli_num_rows($resultcat1);
$resultcat2 = $mysqli->query("SELECT id FROM categories WHERE type=2 AND lang_id=$lang");
$rowscat2 = mysqli_num_rows($resultcat2);
$resultinfo = $mysqli->query("SELECT id FROM items WHERE type=1 AND lang_id=$lang");
$rowsinfo = mysqli_num_rows($resultinfo);
$resultitems = $mysqli->query("SELECT id FROM items WHERE type=2 AND lang_id=$lang");
$rowsitems = mysqli_num_rows($resultitems);
?>
<div class="divhome">

<div><span class="icon fa-pencil titlesg color3 bordercolor3"></span> <span class="titlesg bordercolor1">Webadmin <a href="../" target="_blank"><?php echo $domain ?></a></span></div>

<div class="boxesguide">

<div class="boxes2">
<div class="marg10">
<div class="frame margtop20">
<div class="box1 bgrcolor2">
<span class="icon fa-cog colorwhite"></span>
</div>
<div class="box2">
<span class="titles color2"><?php echo $adminadmin ?></span> <span class="caretbig color2"></span>
<div class="margtop10">
<a href=<?php if ($user==1 OR $superuser==1) { echo "siteinfo.php"; } else { echo "wsinfo.php"; }?>><span class="icon fa-cogs color3"></span> <?php echo $adminsiteinfo ?></a> 
<?php if ($requests==1) { ?>
<a href="list-requests.php"><span class="icon fa-envelope-open-o color2"></span> <strong><?php echo $rowsrequests ?></strong> <?php echo $adminrequests ?></a>
<?php } ?>
<?php if ($rowsmembers>0) { ?>
<a href="list-categories.php?t=4"><span class="icon fa-users color2"></span> <strong><?php echo $rowsmembers ?></strong> <?php echo $adminmembers ?></a>
<?php } ?>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
</div>

<div class="boxes2">
<div class="marg10">
<div class="frame margtop20">
<div class="box1 bgrgrey">
<span class="icon fa-list colorwhite"></span>
</div>
<div class="box2">
<span class="titles colorgrey"><?php echo $admintype1 ?></span> <span class="caretbig colorgrey"></span>
<div class="margtop10">
<span class="icon fa-list"></span> <strong><?php echo $rowsinfo ?></strong> <?php echo $adminitems ?>
</div>
</div>
<div class="box3 bgrgrey">
<a href="add-category.php" class="colorwhite"><span class="icon fa-plus"></span></a>
</div>
<div class="box3 colorgrey">
<strong><?php echo $rowscat1 ?></strong>
</div>
<div class="cleared"></div>
</div>
</div>
</div>

<div class="boxes2">
<div class="marg10">
<div class="frame margtop20">
<div class="box1 bgrcolor1">
<span class="icon fa-list-alt colorwhite"></span>
</div>
<div class="box2">
<span class="titles colorgrey"><?php echo $admintype2 ?></span> <span class="caretbig color1"></span>
<div class="margtop10">
<span class="icon fa-list-alt color1"></span> <strong><?php echo $rowsitems ?></strong> <?php echo $adminitems ?>
</div>
</div>
<div class="box3 bgrcolor1">
<a href="add-category.php?typec1=2" class="colorwhite"><span class="icon fa-plus"></span></a>
</div>
<div class="box3 colorgrey">
<strong><?php echo $rowscat2 ?></strong>
</div>
<div class="cleared"></div>
</div>
</div>
</div>

<div class="cleared"></div>
</div>

<div class="frame margtop20">
<div class="framein">
<?php echo $adminguide ?>
</div>
</div>

</div>