<?php include 'header.php'?>
<section id="container" >
      <header class="header black-bg">
              <div class="sidebar-toggle-box">
                  <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
              </div>
            <a href="#" class="logo"><b>Admin Dashboard</b></a>
            <div class="nav notify-row" id="top_menu">
               
                         
                   
                </ul>
            </div>
            <div class="top-menu">
            	<ul class="nav pull-right top-menu">
                    <li><a class="logout" href="logout.php">Logout</a></li>
                    <li><a class="logout" href="add-settings.php">New Settings</a></li>
            	</ul>
            </div>
        </header>
      <?php include 'sidebar.php'?>
    <?  if(isset($_GET['id']))
{
$adminid=$_GET['id'];
$msg=mysqli_query($con,"delete from main_content where main_content_ID='$adminid'");
if($msg)
{
echo "<script>alert('Data deleted');</script>";
}
}?>

      <section id="main-content">
          <section class="wrapper">
          	<h3><i class="fa fa-angle-right"></i> Contact Settings</h3>
				<div class="row">
				
                  
	                  
                  <div class="col-md-12">
                      <div class="content-panel">
                          <table class="table table-striped table-advance table-hover">
	                  	  	  <h4><i class="fa fa-angle-right"></i> Contact Settings</h4>
	                  	  	  <hr>
                              <thead>
                              <tr>
                                  
                                  
                                  <th> Contact N0.</th>
                                  <th> Site Email </th>
                                  <th> Address </th>
                                  <th> Facebook link</th>
                                  <th> Twitter link </th>
                                  <th> Instagram link </th>
                                  <th> Youtube link </th>

                                  
                                
                              </tr>
                              </thead>
                              <tbody>
                              <?php $ret=mysqli_query($con,"select * from main_content");
							  $cnt=1;
							  while($row=mysqli_fetch_array($ret))
							  {?>
                              <tr>
                
                                  
                                 
                                  <td><?php echo $row['phone'];?></td>
                                  <td><?php echo $row['email'];?></td>
                                 
                                  <td><?php echo $row['address'];?></td> 
                                  <td><?php echo $row['fb_link'];?></td>
                                  <td><?php echo $row['twitter_link'];?></td>
                                 
                                  <td><?php echo $row['insta_link'];?></td> 
                                  <td><?php echo $row['youtube_link'];?></td>                                   
                                  
                                  <td>
                                     
                                     <a href="update-contact.php?uid=<?php echo $row['main_content_ID'];?>"> 
                                     <button class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></button></a>
                                     <a href="dashboard.php?id=<?php echo $row['main_content_ID'];?>"> 
                                     <button class="btn btn-danger btn-xs" onClick="return confirm('Do you really want to delete');"><i class="fa fa-trash-o "></i></button></a>
                                  </td>
                              </tr>
                              <?php $cnt=$cnt+1; }?>
                             
                              </tbody>
                          </table>
                      </div>
                  </div>
              </div>
		</section>
      </section
  ></section>
    <script src="assets/js/jquery.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="assets/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="assets/js/jquery.scrollTo.min.js"></script>
    <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="assets/js/common-scripts.js"></script>
  <script>
      $(function(){
          $('select.styled').customSelect();
      });

  </script>

  </body>
</html>
