AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TEST/../TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/../TMCPRO/pages/Statistiques_stock.php
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
// echooo "yassine <br/>" ; 
// exit() ; 

        $date_arr = explode("-",$_POST["dateD"]);
        $dateD = $date_arr[0]."".$date_arr[1]."".$date_arr[2];
		
		// echo "==>  $dateD <br/>" ; 
		
		
		   $date_arr = explode("-",$_POST["dateF"]);
        $dateF = $date_arr[0]."".$date_arr[1]."".$date_arr[2];
	
	// echo "==> ddddd $dateF <br/>" ; 
   $resu = dbi_query("SELECT * FROM client where 1")  ; 
   // $select = "SELECT * FROM `client`";
   // $resu = mysqli_query($conn,$select);
   while($cus = dbi_fetch_row($resu)) {
   $customerList[] = $cus['client_id'];
   }
   
   // print_r($customerList) ; 

$q= dbi_query("SELECT *  FROM  produits") ; 



?>


<!DOCTYPE html>
<html>

			<head>

			<?php include('header.php'); ?>


			</head> 
			
<body class="hold-transition sidebar-mini">	


								
<!-- Site wrapper -->
<div class="wrapper">

				<!-- TOP MENU -->
													<nav class="main-header navbar navbar-expand navbar-white navbar-light">
													<ul class="navbar-nav">
															<li class="nav-item">
																	<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
															</li>

															<li>
															<?php echo '<a href="#myModal2"  id="custId" data-toggle="modal" data-id="'.$c['Fournisseur_ID'].'"><h3><button type="button"   class="btn btn-primary" ><i class="fas fa-plus"></i>  Statistiques </button></h3></a>';?>
															</li>
													</ul> 
												</nav> 
												  
  
<!-- BARRE DE NAVIGATION -->


<?php include('menu.php'); ?>

												  <div  class="modal fade" id="myModal2" role="dialog" class="modal fade task-modal-single in" tabindex="-1"  aria-labelledby="myLargeModalLabel" >
													  <div class="modal-dialog modal-lg">
														<div class="modal-content data">
															<div id="fetch2" ></div>
															
															   
															</div>
														</div>
												  </div>
  



 <!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
												<div class="content-header">
												  <div class="container-fluid">
													<div class="row mb-2">
																			<div  class="modal fade" id="myModal" role="dialog" class="modal fade task-modal-single in" tabindex="-1"  aria-labelledby="myLargeModalLabel" >
																			  <div class="modal-dialog modal-lg">
																				<div class="modal-content data">
																					<div id="fetch" >
																					</div>
																			   
																					</div>
																				</div>
																			</div>      
													</div><!-- /.row -->
												  </div>
												</div>
												<!-- /.content-header -->

    <!-- PAGE PRINCIPALE -->
   
   
   
   
   	
				<section class="content">
					<div class="row">
						<div class="col-12">
							<div class="card card-primary card-outline">
															<div class="card-header">
																<div class="row">
																	<div class="col-sm-11">
																		<h3 class="card-title"> <i class="nav-icon fas fa-id-card"></i> Statistiques   </h3>
																	</div>
																</div> 
															</div>
						
									<div class="card-body">
										<div class="onglet_dotted">
											<div style="width:100%; float:left; vertical-align:top" class="header_ray">
												<div id="tab">
													<div class="box-body">
														  <table id="example1" class="table table-bordered table-striped" >
															<thead>
															<tr>
															 <th>Produit </th>
															 
															  <th>Quantit&#233; </th>
												  
												  
															  
															</tr>
															</thead>
															<tbody>
														  <?php
														  
														  // echo "====".$_SESSION["local"]."<br/>" ; 
														   while($row = dbi_fetch_row($q))
														   {
															   
															   
																   $whero = "and local = '".$_POST["client_bureau"]."' and date between $dateD and $dateF " ;
																   if(!empty($_POST))
																   {
															
															   list($qttR) =  dbi_fetch_row(dbi_query( "SELECT SUM(p.quantity) FROM  check_out c, check_out_produit p where c.id = p.check_out_id  $whero  and 	product_Id = ".$row['Produit_ID'])) ; 
																   }
														   // list($qttL) =  dbi_fetch_row(dbi_query( "SELECT SUM(p.quantity) FROM  check_out c, check_out_produit p where c.id = p.check_out_id $whero and 	product_Id = ".$row['Produit_ID']))  ;
														   
														// $etat = $qttR - $qttL  
														if($qttR >0)
														{
														?>
														  
														
																<tr>
																	
																	
															  <td><?php echo $row['Produit_Designation'];  ?></td>

															   <td><?php echo $qttR;  ?></td>
														   
													<?
														}
														   
														   }        
													?>
																	 
													
														 
														  
														
															</tfoot>
														  </table><!-- /.table -->
													</div><!-- /.box-body -->
												</div><!-- /.tab -->
											</div><!-- /.header_ray -->
										</div><!-- /.onglet_dotted -->
								    </div><!-- /.card-body -->
							    </div><!-- /.card card-primary card-outline -->
							</div> <!-- /.col-12 -->
						</div>  <!-- /.row -->
				</section> <!-- /.section -->
     


	
	</div>
  
  
<?php include('footerr.php'); ?>

<script type="text/javascript">
$(document).ready(function(){
    $('#myModal2').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'ajaxStatistiques.php', //Here you will fetch records 
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch2').html(data);//Show fetched data from database
            }
        });
     });
});

    
</script>


</body>
</html>

AnonSec - 2021