 <?php
                        
include './connection.php';
$cdate=$_REQUEST["q"];
$cdate=date("d/m/Y",strtotime($cdate));
                        $q2="SELECT * FROM `causelist`  WHERE cdate='".$cdate."' ORDER BY cast(court_id as int) ASC  ";
                            $result2=$conn->query($q2);
                            if (!empty($result2) && $result2->num_rows > 0)
                             {
                         
                             while( $row2=$result2->fetch_assoc())
                                 {
                                    $q1="Select * from courts where ID=".$row2["court_id"]."";
                                    $result=$conn->query($q1);
                                    $row=$result->fetch_assoc();
                                                    echo '  
                                                        <div  class="col-lg-4 col-md-4 wow fadeInUp" data-wow-delay="0.1s">
                                                            <div  style="padding-left:12px;padding-top:12px; border-radius:13px;" class="room-item shadow rounded ">
                                                        
                                                
                                                                    <div >
                                                                             <h5 class="mb-0">'.$row["courtname"].'</h5>
                                                                        
                                                                    </div>
                                                                   <p class="text-body mb-3">Date:'.$row2["cdate"].'&nbsp;&nbsp;&nbsp; <u style="color:red;">'.$row2["type"].'</u></p>
                                                                   
                                                                     <p>
                                                        
                                                        <a href="./Administrator'.$row2["file_path"].'">Click to View & Download</a>
                                                    </p><br>
                                                                   
                                                            
                                                            </div>
                                                        </div>
                                                       
                                                   ';

                                 


                                }
                             }

                               ?>
