ob_start();
include('boconf.php');
$catid= $_GET['id'];
$canonical = "$urlsite/folder-$catid";
$checklink = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (strpos($checklink,'cat.php',true)) {header("Location: $urlsite/folder-$catid", true, 301); }
$wc=mysqli_query($conn,"select * from mj_folders where id='$catid' ");
while($rowc=mysqli_fetch_array($wc))
{
$titlecat=$rowc[1];
$decribe=$rowc[2];
$parent= $rowc[3];
$parentid= $rowc[4];
}
include('meta.php');
include('header.php');
echo"
";
if($showname='yes'){
echo"
$titlecat
";
}
if($parent==0){
echo"
";
$qsubcats=mysqli_query($conn,"select id,name from mj_folders where parentcatid='$catid' ");
$numsubcats= mysqli_num_rows($qsubcats);
while($rowc=mysqli_fetch_array($qsubcats))
{
echo"
$rowc[1]";
}
echo"
";
}
//posts
$qposts=mysqli_query($conn,"select id,name,image from mj_books where find_in_set('$catid', folder) limit 20");
$numposts= mysqli_num_rows($qposts);
while($rowc=mysqli_fetch_array($qposts))
{
echo"
";
}
echo"
جديد الكتب
";
include('v-lastposts.php');
echo"
";
include('footer.php');
?>