GIF89a
<?php ob_start(); ini_set('error_reporting', E_STRICT); include("session.php"); include("connect.php"); include("libs.php"); mysqli_set_charset($conn,'utf8'); date_default_timezone_set('Asia/Kolkata'); //setOnline($conn,$_COOKIE["user_id"]); ?> <!DOCTYPE html> <html> <?php include'head.php'; ?> <body> <?php include'header.php'; ?> <section> <div class="container no-gutters"> <div class="row row-spac no-gutters"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <div class="row" style="background-color: #ccc8c8"> <div class="col-12" > <div class=" d-flex justify-content-center fs-3"> <nav class="navbar navbar-expand navbar-light"> <div class="container-fluid"> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav"> <li class="nav-item mx-2"> <a class="nav-link active fs-6" href="index.php">INBOX</a> </li> <li class="nav-item mx-2"> <a class="nav-link fs-6" href="all.php">ALL</a> </li> </ul> </div> </div> </nav> </div> </div> </div> </div> </div> </section> <section class="mx-3"> <div class="container no-gutters"> <div class="row row-spac no-gutters"> <div class="col-md-5 no-gutters my-1" style="margin: auto;padding: 0px;"> <?php $sqlC="SELECT DISTINCT frnd_id FROM `chat` WHERE `my_id`='".$_COOKIE["user_id"]."'"; $rsC=mysqli_query($conn,$sqlC); while($rowC=mysqli_fetch_array($rsC)){ $sqlP="SELECT * FROM `app_users` WHERE `sr`='".$rowC['frnd_id']."'"; $rsP=mysqli_query($conn,$sqlP); $rowP=mysqli_fetch_assoc($rsP); ?> <div class="row" onclick="sendToChat('<?php echo $rowC['frnd_id']; ?>','<?php echo $_COOKIE["user_id"]; ?>')"> <div class="col-3 mx-0"> <div class="d-flex justify-content-between align-items-center mt-3"> <img src="<?php echo findDP($conn,$rowP["img"],$rowP["gender"]); ?>" class="" height="60px" width="60px"> </div> </div> <div class="col-5"> <div class="top my-3 float-start"> <a class="text-decoration-none text-dark"><?php echo ucfirst($rowP["user_name"]); ?></a><br> <a class="text-decoration-none text-dark"><?php echo findLastChat($conn,$rowC['frnd_id'],$_COOKIE["user_id"]); ?></a><br> <?php if(checkOnline($conn,$rowC['frnd_id'])>5){ ?> <a class="text-decoration-none text-success"><font color="red">Offline</font></a> <?php } else { ?> <a class="text-decoration-none text-success"><font color="green">Online</font></a> <?php } ?> </div> </div> <div class="col-4"> <div class="top my-3 float-end"> <small style="font-size:12px;"><?php echo findLastChatTime($conn,$rowC['frnd_id'],$_COOKIE["user_id"]); ?></small> </div> </div> <hr> </div> <?php } ?> </div> </div> </div> </div> </section> <?php include 'footer.php';?> <script> function openNav() { document.getElementById("mySidebar").style.width = "250px"; document.getElementById("main").style.marginLeft = "250px"; } function closeNav() { document.getElementById("mySidebar").style.width = "0"; document.getElementById("main").style.marginLeft= "0"; } </script> </body> </html> <div id="snackbar"><span id="snack_msgg" style="color: white"></span></div>