<?php include_once 'include/main.inc.php';?>
<?php $hover = "blog";

$page_metatitle = " Blog | Insights from School Furniture Manufacturers - Jiph Furniture Pvt. Ltd.";
$page_metakey ="Blog - ".COMPANY_NAME;
$page_metadesc = "Stay updated with the latest trends, designs, and tips from Jiph Furniture Pvt. Ltd., expert School Furniture Manufacturers, to create functional and durable learning spaces. Explore our blog for valuable insights!";

$blog = mysqli_query($GLOBALS['dbconn'], "select blogDate,catImage,catName,blogDname,catDesc,blog_written from blog_tbl order by catID DESC");
$popular_posts = mysqli_query($GLOBALS['dbconn'], "select blogDate,catImage,catName,blogDname,catDesc,blog_written from blog_tbl order by catID DESC LIMIT 0, 5");

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <?php include "app_top.php";?>
</head>
<body>
    <?php include "app_header.php";?>
    <div class="heading_banner" style="background-image: url(<?=site_url?>/designer/images/category-banner.jpg)">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-center">
                    <div class="cat_title">Our Blogs</div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="inner_breadcrumb hidden_xs">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <ul class="breadcrumb">
                        <li><a href="<?=site_url?>" title="Home">Home</a></li>
                        <li class="active">Our Blogs</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="blog_page">
        <div class="container">
            <div class="row">
                <div class="col-xxl-9 col-xl-9 col-lg-9 col-md-9 col-sm-9 col-12">
                    <div class="blog_left">
                        <h1 class="catTitle_22">Our Blogs</h1>
                        <div class="clearfix"></div>
                        <div class="row">
                        <?php while($blog_res = mysqli_fetch_array($blog)){ 
                                if ($blog_res['catImage'] != '') {
                                    $blog_img =  getImage($blog_res['catImage'], 636, 424, $blog_res['catName'], "/uploaded-files/blog/images/");
                                } else {
                                    $blog_img = NO_IMG_URL;
                                }

                                $blog_shortdesc = str_ireplace('{companyName}', $admin_res['companyName'], $blog_res['catDesc']);
                                
                                ?>
                            <div class="col-xxl-6 col-xl-6 col-lg-6 col-md-6 col-12">
                                <div class="single-post2">
                                    <div class="blog-thumb2">
                                        <a href="<?= site_url; ?>/blog/<?= getValidFileName($blog_res['catName']); ?>.htm" title="<?= $blog_res['blogDname']; ?>"><img src="<?=$blog_img?>" alt="<?= $blog_res['blogDname']; ?>"  title="<?= $blog_res['blogDname']; ?>"></a>
                                    </div>
                                    <div class="blog-content2">                                         
                                        <h2 class="titleBlog"><a href="<?= site_url; ?>/blog/<?= getValidFileName($blog_res['catName']); ?>.htm" title="<?= $blog_res['blogDname']; ?>"><span><?= $blog_res['blogDname']; ?></span></a></h2>
                                        <p><?=substr($blog_shortdesc,0,200);?>...</p>
                                        <a href="<?= site_url; ?>/blog/<?= getValidFileName($blog_res['catName']); ?>.htm" title="Read More" class="read_more_1 bg_btn_1">Read More <span></span><span></span><span></span><span></span></a>
                                    </div>
                                </div>
                            </div>
                            <?php } ?>
                        </div>
                    </div>
                </div>
                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
                    <div class="left_sidebar">
                        <div class="left_title1">Popular Post</div>
                        <?php while($blog_res = mysqli_fetch_array($popular_posts)){ 
                            if ($blog_res['catImage'] != '') {
                                $blog_img =  getImage($blog_res['catImage'], 636, 424, $blog_res['catName'], "/uploaded-files/blog/images/");
                            } else {
                                $blog_img = NO_IMG_URL;
                            } 
                            ?>
                            <div class="right_news">
                                <a href="<?= site_url; ?>/blog/<?= getValidFileName($blog_res['catName'])?>.htm" title="<?= $blog_res['blogDname']; ?>">
                                    <div class="image">
                                        <img src="<?=$blog_img?>" alt="<?= $blog_res['blogDname']; ?>"  title="<?= $blog_res['blogDname']; ?>">
                                    </div>
                                </a>
                                <div class="titleBRight"><a href="<?= site_url; ?>/blog/<?= getValidFileName($blog_res['catName'])?>.htm" title="<?= $blog_res['blogDname']; ?>"><?= $blog_res['blogDname']; ?></a></div>
                            </div>
                         <?php } ?>  
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php include "app_footer.php";?>
    <?php include "app_bottom.php";?>
</body>
</html>