<div class="row justify-content-center g-1">
    <?php
    require 'data.php';
    function timeindo($jamnya) {
        $hari = date("l", strtotime($jamnya));
    
        switch($hari){
            case 'Monday':
                return 'Senin';
            break;
    
            case 'Tuesday':
                return 'Selasa';
            break;
    
            case 'Wednesday':
                return 'Rabu';
            break;
    
            case 'Thursday':
                return 'Kamis';
            break;
    
            case 'Friday':
                return 'Jumat';
            break;
    
            case 'Saturday':
                return 'Sabtu';
            break;
    
            case 'Sunday':
                return 'Minggu';
            break;
        }
    
    }
    
    function monthindo($jamnya) {
        $hari = date("F", strtotime($jamnya));
    
        switch($hari){
            case 'January':
                return 'Januari';
            break;
    
            case 'February':
                return 'Februari';
            break;
    
            case 'March':
                return 'Maret';
            break;
    
            case 'April':
                return 'April';
            break;
    
            case 'May':
                return 'Mei';
            break;
    
            case 'June':
                return 'Juni';
            break;
    
            case 'July':
                return 'Juli';
            break;
    
            case 'August':
                return 'Agustus';
            break;
    
            case 'September':
                return 'September';
            break;
    
            case 'November':
                return 'November';
            break;
    
            case 'December':
                return 'Desember';
            break;
        }
    
    }
        $gpanduan = "SELECT * FROM panduan_post WHERE panduan_status = '1' AND category_panduan = 'buktijp'";
        $qpanduan = mysqli_query($data, $gpanduan);
        $search = mysqli_real_escape_string($data, $_POST['bukti']);

        if(mysqli_num_rows($qpanduan) > 0) {
            echo '<div col-lg-12><h6 class="text-uppercase my-3"><small><i class="lni lni-keyword-research"></i></small> Semua Pencarian: '.$search.'</h6>
            <hr />
            </div>';
            while($fpanduan = mysqli_fetch_assoc($qpanduan)) {
                $title = $fpanduan['title_panduan'];
                $slug = $fpanduan['title_slug_panduan'];
                $desc = $fpanduan['short_dec_panduan'];
                $thumbnail = $fpanduan['thumbnail_panduan'];
                $tanggal = $fpanduan['tanggal_panduan'];


                if(stristr($title, $search) !== false) {
                    echo '<div class="col-lg-3 mb-2">
                    <div class="card card-post h-100 mb-3">
                        <div class="row g-0">
                            <div class="col-md-12">
                                <img src="'.$thumbnail.'" class="img-post rounded-start h-100" alt="'.$title.'">
                            </div>
    
                            <div class="col-md-12">
                                <div class="card-body">
                                    <h5>'.$title.'</h5>
                                    <p class="time-post text-uppercase"><i class="lni lni-timer"></i> '.timeindo($tanggal).', '.date("d", strtotime($tanggal)).' '.monthindo($tanggal).' '.date("Y", strtotime($tanggal)).'</p>
                                    <p>'.$desc.'</p>
    
                                    <div class="d-grid">
                                        <a href="?blog='.$slug.'" class="btn btn-primary fw-bold btn-sm"><i class="lni lni-cash-app"></i></small> Read More</a>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>';
                }

            }
        }
    ?>

</div>