
<ul id="js-emails" class="notification notification-layout-2">    
    <?php 
        try {            
        $i = 0;
        $jj =1;
        $stmt = $db->prepare("SELECT DISTINCT(regst_id) AS regst,con_info_id AS coninfo, sub_matt AS subj, 
        info_notes AS msgenote, dueCon AS regdate,info_sts AS stats, title_name AS appoint FROM tbl_info_register i
        INNER JOIN tbl_con_infos c ON c.reg_info_id = i.regst_id 
        INNER JOIN tbl_title t ON t.title_id = c.appntsent 
        WHERE c.dRcv = '".$rleId."' AND c.info_sts=9
        ORDER BY con_info_id DESC");
       
        $stmt->execute(array());
        $QueStmt = $stmt->rowCount();

        if($QueStmt > 0){
            while ($rows = $stmt->fetch(PDO::FETCH_ASSOC)) {
            $coninfo = $rows['coninfo'];
            $regst= $rows['regst'];
            $subj =$rows['subj']; 
            $msgenote = $rows['msgenote'];
            $regdate = $rows['regdate'];
            if($rows['stats']==1){$inforead='class="unread"';}else{$inforead="";}
            $i++;
        ?>
        <div class="line-content">
            <li <?php echo $inforead;?>>
                <div class="d-flex align-items-center px-3 px-sm-4 px-lg-5 py-1 py-lg-0 height-4 height-mobile-auto">
                    <div class="custom-control custom-checkbox mr-3 order-1">
                        <input type="checkbox" class="custom-control-input" id="msg-1">
                        <label class="custom-control-label" for="msg-1"></label>
                    </div>
                    <a href="#" title="starred" class="d-flex align-items-center py-1 ml-2 mt-4 mt-lg-0 ml-lg-0 mr-lg-4 fs-lg color-warning-500 order-3 order-lg-2"><i class="fa fa-star"></i></a>
                    <div class="d-flex flex-row flex-wrap flex-1 align-items-stretch align-self-stretch order-2 order-lg-3">
                        <div class="row w-100">
                            <a href="?b=vwbox&regid=<?php echo $regst;?>&conid=<?php echo $coninfo;?>" class="name d-flex width-sm align-items-center pt-1 pb-0 py-lg-1 col-12 col-lg-auto"><?php echo $rows['appoint'];?></a>
                            <a href="?b=vwbox&regid=<?php echo $regst;?>&conid=<?php echo $coninfo;?>" class="name d-flex align-items-center pt-0 pb-1 py-lg-1 flex-1 col-12 col-lg-auto">
                                <?php echo substr($subj, 0, 70)." - ".substr($msgenote, 0, 30)."...";?>
                            </a>
                        </div>
                    </div>
                    <div class="fs-sm text-muted ml-auto hide-on-hover-parent order-4 position-on-mobile-absolute
                     pos-top pos-right mt-2 mr-3 mr-sm-4 mt-lg-0 mr-lg-0"><?php echo date('d M Y', strtotime($regdate));?></div>
                </div>
            </li>
        </div>   
        <?php 	
            }//END. While
            
        }//End Count.	
        }
        catch (PDOException $ex) {
            echo $ex->getMessage();
        }           
        ?>  
</ul>