<?php include("includes/header.php"); ?>
<?php include("includes/auto_out.php"); ?>
<!DOCTYPE html>
<html>
<head>
  <title>All Message | <?php echo $sitename;  ?> HQ</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">

   <!--CSS-->
  <link rel="stylesheet" href="style.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">

    <!-- Bootstrap Core CSS -->
      <link href="css/bootstrap.min.css" rel="stylesheet">

     <!-- Font Awesome -->
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">

      <!-- Custom CSS -->
      <link href="css/blog-home.css" rel="stylesheet">

      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]-->
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
          <script src="js/jquery.js"></script>
          <script src="js/bootstrap.js"></script>





          <!----MODAL-------------------->
          <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>



</head>

<body>
  <?php  include("includes/dashboard_navbar.php"); ?>
  <!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here-->
  <style>
    body{
      background-color: #f5f5f5;
    }
    .destop-siderbar{
      background-color: #131e2a;
      height: 100%;
      width:240px;
      box-shadow: 0 0 4px 0 rgba(0,0,0,.50), 0 2px 4px 0 rgba(0,0,0,.50);
      position: fixed;
      margin-left:-20px;
      padding:50px 25px;
    }
    .destop-siderbar li{
       padding: 30px 20px;
       list-style: none;
    }
    .destop-siderbar li a{
      color: #fff;
      font-size: 17px;
      padding:10px 0px;
    }
    .destop-siderbar li a i{
      color:rgb(45, 156, 219);
      font-weight: lighter;
    }
    .destop-siderbar .active {
      background-color:#123962;
      box-shadow: 0 0 4px 0 rgba(0,0,0,.50), 0 2px 4px 0 rgba(0,0,0,.50);
      
    }
    .destop-siderbar .active a{
      color:#fff;
    }
    .destop-siderbar .active a:hover{
      color:#fff;
    }
    .destop-siderbar li a:hover{
      color: #a5bdd9;
      text-decoration: none;
    }
    .panel{
      border-radius: 0px;
      border-color: transparent;
    }
    .input-danger{
       border:1px solid darkred;
       color:darkred;
     }
     .input-danger::placeholder{
       opacity: 0.6;
       color:darkred;
     }
  </style>

  <div class="container-fluid">
    <div class="row">
      <!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here-->
      <div class="col-sm-2 hidden-xs" style="height: 100%;">
              <?php include("includes/desktop_side.php"); ?>
      </div>
      <!--/////////////////////// DESTOP Side bar starts here--><!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here-->
      <div class="col-sm-10">
        <br><br><br><br>
        <div class="row">
          <div class="col-sm-12" align="">
            
            
          </div>
        </div>

        <!----------------------------------------------------------------------------------->


            <div class="row">
              <div class="col-sm-12">
                 <div class="panel panel-default">
                  <div class="panel-body">
                       <span style="font-size: 16px; font-weight: bold;"><i class="fa fa-caret-left" style="font-size: 18px;"></i> <i class="fa fa-caret-right" style="font-size: 18px;"></i> ALL MESSAGES</span>
                    

                       <style>
                         table thead tr th{
                           font-size: 13px;
                           font-weight: bolder;
                         }
                         table tbody tr td{
                           font-size: 13px;
                           font-weight:;
                         }
                       </style>

                         <div class="table-responsive">
                          
                          <div class="hidden-lg hidden-md" align="left" style="font-size: 15px; margin-left: 10px; color: red;"><img src="images/swipe-left.gif" class="img-responsive" width="45"> Swipe left to view full message details.</div>
                          <hr>
                         <table class="table table-bordered table-striped">
                             <thead>
                               <tr>
                                <th>REPLY</th>
                                <th>X</th>
                                <th>DATE</th>
                                <th>ACCOUNT</th>
                                <th>CL EMAIL</th>
                                <th>TYPE</th>
                                <th>DESC</th>

                               </tr>
                            
                       <?php
                        $query = mysqli_query($conn, "SELECT * FROM support ORDER BY id DESC");
                        $numrow = mysqli_num_rows($query);
                        if($numrow >= 1){
                          while($row = mysqli_fetch_assoc($query)){
                            
                            $user_id = $row['user_id'];
                            $my_account = $row["my_account"];
                            $client_email = $row["client_email"];
                            $issue_type = $row["issue_type"];
                            $description = $row['description'];
                            $issue_date = $row["issue_date"];   ?>
                                 
                                 </thead>
                                 <tbody class="tbody">
                                 <tr>

                                  <td> <a href="mailer.php?client_email=<?php echo $client_email; ?>&&issue_type=<?php echo $issue_type; ?>&&description=<?php echo $description; ?>" class="btn btn-primary" style="border-radius: 0px;"><i class="fa fa-share"></i></a> </td>

                                  <td><a href="delete-msg.php?user_id=<?php echo $user_id; ?>" class="btn btn-danger" style="border-radius: 0px;"><i class="fa fa-trash"></i></a> </td>

                                 
                                  <td><?php echo $issue_date; ?></td>
                                  <td><?php echo $my_account; ?></td>
                                  <td><?php echo $client_email; ?></td>
                                  <td><?php echo ($issue_type); ?></td>
                                  <td><?php echo $description; ?></td>
                                   
                                 </tr>
                               



                        <?php  }
                        }else{
                          echo ' <br><br>
                    <div align="center">
                    <img src="images/empty.png" width="80" class="img-responsive">
                    <br>
                    <span style="font-size: 18px;">What\'s Up Comrade</span><br><br>
                    <span style="font-size: 15px;">You have not traded crypto with btczux, <a href="sell-bitcoin.php">Trade Now <i class="fa fa-caret-right"></i></a></span>
                    </div>

                    <br><br><br><br><br>';
                        }
                       ?>

                           </tbody>
                         </table>

                       </div>
                       

                       
                            
                   
                    <br>
                  </div>
                </div>
              </div>
            </div>






          </div>








          </div>
        </div>
        
        
        
        
        
        
      </div>
    </div>
  </div>
</body>
</html>