<!DOCTYPE html>
<?php include('config.php');?>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<meta name="apple-mobile-web-app-title" content="Notentool">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="manifest" href="manifest.json">
	
	
    <title>RONAHI CO.</title>

    <!-- Stylesheet File -->
    <link rel="stylesheet" href="assets/css/vendor.css">
    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="assets/css/responsive.css">
	
		<style>
	@import url(http://fonts.googleapis.com/earlyaccess/droidarabickufi.css);
	body,h5,h6 {
font-family: 'Droid Arabic Kufi', sans-serif;
}
	

	
	
	</style>
</head>

<body>

    <!-- preloader area start -->
    <div class="preloader" id="preloader">
        <div class="preloader-inner">
            <div class="spinner">
                <div class="dot1"></div>
                <div class="dot2"></div>
            </div>
        </div>
    </div>
    <!-- preloader area end -->

    <div class="body-overlay" id="body-overlay"></div>
   

    <!-- header start -->
    <div class="header-area" style="background-image: url(assets/img/bg/1.png);">
        <div class="container">
            <div class="row">
                <div class="col-sm-4 col-3">
                    <a class="menu-back-page" href="index.php">
                        <i class="fa fa-angle-left"></i>
                    </a>
                </div>
                <div class="col-sm-4 col-4 text-center">
                    <div class="page-name">پێشاندان</div>
                </div>
              
            </div>
        </div>
    </div>
    <!-- header end -->

    <!-- page-title stary -->
    <div class="page-title mg-top-50">
        <div class="container">
            <a class="float-left" href="index.php">سه‌ره‌تا</a>
            <span class="float-right">تۆمار</span>
        </div>
    </div>
    <!-- page-title end -->

      
                        
                        
<BR>
  <div class="container" STYLE="text-align:center">

 <button type="button" class="btn-c btn-secondary ripple mr-1 mb-2"><a href="components-table.php">گشتی</a></button>
 <button type="button" class="btn-c btn-danger ripple mr-1 mb-2"><a href="gawelan_list.php">گه‌ویلان</a></button>
    <button type="button" class="btn-c btn-info ripple mr-1 mb-2"><a href="dara_list.php">داره‌توو</a></button>
	    <button type="button" class="btn-c btn-success ripple mr-1 mb-1"><a href="rov_list.php">رۆڤیا</a></button>
		   <button type="button" class="btn-c btn-primary ripple mr-1 mb-1"><a href="bard_list.php">به‌رده‌ڕه‌ش</a></button>
              </div>                 
                                      
                                   
                       

                		
		<?php
    // am querya ba kar det bo srinaway babat
    $u_id = (int)@$_GET['u_id'];
    if (@$_GET['delete'] == 'index') {
      $deletepost = mysqli_query($con, "DELETE FROM users WHERE u_id = '$u_id'");
      if (isset($deletepost)) {
        header("Location: index.php");
      }
    }


    // am querya ba kar det bo srinaway babat
     ?>

            
    <!-- table 3 start -->
    <div class="table-area mg-top-90">
        <div class="container">
         
            <div class="ba-all-page-inner mb-4 p-0 border-radius-4">
                <div class="table-responsive">
		          <table class="table table-striped uikit-table-3">
                    
			
		
                        <thead>
                            <tr>
						
                            <th scope="col" style="background-color: #3F51B5;color: white;">سڕینه‌وه‌</th>
                              <th scope="col"style="background-color: #3F51B5;color: white;">عدد لترات</th>
                                <th scope="col"style="background-color: #3F51B5;color: white;">قیاس تانكی</th>
                                <th scope="col"style="background-color: #3F51B5;color: white;">سم</th>
                                <th scope="col"style="background-color: #3F51B5;color: white;">اسم الموقع</th>
                    
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
							
							<?php


$id = intval(@$_GET['id']);
if (isset($_GET['user']) == 'delete') {
 // $u_id = $_GET['u_id'];
  $delete_user = "DELETE FROM tomar WHERE id='$id'";
   $run_delete_user = mysqli_query($con, $delete_user);
   if (isset($run_delete_user)) {
        echo '<div class="alert alert-success" role="alert">بە سەر کەوتوی سرایەوە</div>';
   }else{
	   
	   echo"eoorrrr";
   }
}
 ?>

                           <?php
                                                         $sql = "SELECT * FROM tomar WHERE location_name='رۆڤیا' ";
                               $resultset = mysqli_query($con, $sql);
                               while( $row = mysqli_fetch_assoc($resultset) ) { 
                               echo "<tr >
						
<th ><button  type='btn-c btn-danger mr-1 mb-2' style='color:red;border-color: #770606;'><a href='components-table.php?user=delete&id=".$row['id']."' title='سڕینه‌وه‌' ><i class='fa fa-trash'></i></button></a></th>
                               <th style='color:#007bff;'>".$row['letar']."</th>
                               <th >".$row['tang_def']."</th>
                               <th style='color:red;'>".$row['sm_mtr']."</th>
                               <th>".$row['mauqh']."</th>
                            
                           </tr>";}  
                           ?>
                        </tbody>
                    </table>
					
						
				<?php
					$query = mysqli_query($con, "SELECT SUM(letar) AS total FROM `tomar` WHERE location_name='رۆڤیا'" ) or die(mysqli_error());
					$fetch = mysqli_fetch_array($query);
			?>
	       <table class="table uikit-table-1">
                        <thead>
                            <tr>
                               
                                <th scope="col"  style="    text-align: center; background: #3f51b5;color: #FFEB3B;}"> <label style="color: #ffffff;">لتر</label> <?php echo $fetch['total']?> : مجموع  </th>
								
                            </tr>
                        </thead>
                     
                    </table>	
					
					
                </div>
            </div>
        </div>
    </div>
    <!-- table 3 end -->

    <!-- blog-area start -->

    <div class="footer-area">
	 <div class="container">
            <div class="footer-bottom text-center" style="bottom: 30px; font-size: 30px;">
                <ul>
                    <li>
                        <a href="index.php">
                            <i class="fa fa-home"></i>
                            <p>سه‌ره‌تا</p>
                        </a>
                    </li>
                    <li>
                        <a href="components-table.php">
                            <i class="fa fa-file-text"></i>
                            <p>تۆمار</p>
                        </a>
                    </li>
                  
                    <li>
                        <a class="menu-bar" href="#">
                            <i class="fa fa-bars"></i>
                            <p>لیست</p>
                        </a>
                    </li>
                  
                </ul>
            </div>
        </div>

       
    </div>

    <!-- back to top area start -->
    <div class="back-to-top">
        <span class="back-top"><i class="fa fa-angle-up"></i></span>
    </div>
    <!-- back to top area end -->

    <!-- All Js File here -->
    <script src="assets/js/vendor.js"></script>
    <script src="assets/js/main.js"></script>

</body>

</html>