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/TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TMCPRO/pages/ajaxNouvelleLivraison.php
<?php

// echo "yassin <br/>" ; 
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
   $no=1;
    
	// echo "<pre>" ; 
// print_r($_POST) ; 
// echo "</pre>" ; 
	
    $message = false;
    //where status ='pending'
   $select = "SELECT * FROM client where client_statut = '1' order by client_nom";
   $client = mysqli_query($conn,$select);

   $select = "SELECT * FROM produits";
   $produit = mysqli_query($conn,$select);
	?>



		  
	
						<div class="modal-header task-single-header" data-task-single-id="5" data-status="4">
						  <h4 class="modal-title">Ajouter Livraison <?php echo $prestationid ;?></h4>
						  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						  </button>
						</div>
          


<div class="modal-body">
       <form role="form" id="add" name="add" method="post" enctype="multipart/form-data" action="">
              <input type="hidden" name="edit" id="edit" value="<?php echo $check_out[0] ?>">
            <div class="card-body">        
<?php
  echo'<input type="hidden" name="ajout" value="ajout">';?>

<div class="form-row"> 
		

			<div class="form-group col-md-3">
				<label for="Date">Date: <?php echo int2date($check_out[1]); ?></label>
                 <input type="date" class="form-control" id="date" value="null"name="date"  required="required" >
			</div>
	 


	<div class="form-group col-md-6">
                 <label for="client">Client</label>
                  <select class="form-control js-example-basic-single" id="client" name="client" required="required" >
                    <option value="" selected >Selectionner Client</option>
                    <?php 
                    while ($row = mysqli_fetch_array($client)) {
                      if($_POST['rowid'] == $row["client_id"]){
                        echo "<option value='".$row["client_id"]."' selected>".$row["client_nom"]."</option>";
                      }else{
                        echo "<option value='".$row["client_id"]."'>".$row["client_nom"]."</option>";
                      }
                      
                    }
                    ?>
                  </select>
            </div>
			  <?php
			  $loc = dbi_query("SELECT * FROM `Lieu_de_stockage`")  ; 
			  ?>

 	        <div class="form-group col-md-3">
                    <label for="local">stock </label>
                  <select class="form-control" id="local-storage" name="local-storage" required="required" >
                    <option value="" selected >livraison depuis</option>
					<?php
				while($localo = dbi_fetch_row($loc)) {
					
					?>
                    <option value="<?php echo $localo['lieu_de_stockage_nom'] ?>" <?php if($check_out[5] == $localo['lieu_de_stockage_nom']) echo "selected"?> ><?php echo $localo['lieu_de_stockage_nom'] ?></option>
                    <?
				     }
					?>
                  </select>
            </div>			
			
			
 	    <div class="form-group col-md-12">
                <label for="add-item">Ajouter Produit</label>
                  <select onchange="selectChange()" class="form-control js-example-basic-single" id="product" placeholder="Add Item" name="product"  required="required">
                    <option value="" selected >Selectionner Produit</option>
                    <?php 
                    while ($row = mysqli_fetch_array($produit)) {
                      echo "<option value='".$row["Produit_ID"]."'>".$row["Produit_Designation"]."</option>";
                    }
                    ?>
                  </select>
		 </div> 


		<div class="form-group col-md-12">
                 <table id="myTable" class="table order-list table-bordered table-striped">
                <thead>
                    <tr>
                        <td>Description</td>
                        <td>Quantité</td>
                        <td><i class="fa fa-trash"></i></td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
                <tfoot>
                    <tr>
                    </tr>
                </tfoot>
              </table>
        </div>			
						
	
		
		<div class="form-group col-md-12">
			  
					<label for="inputAddresse">Note</label>
                <textarea   id="note" name="note" class="textarea" placeholder="Place some text here"
                          style="width: 200px; height: 200px; font-size: 20px; line-height: 20px; border: 1px solid #dddddd; padding: 10px;"> <?php echo $check_out[4]; ?></textarea>
        </div>
  
  
  
  
	

  </div>  
  		
				
               
              </div>
			  
			     <div class="modal-footer justify-content-between">
								  <button type="button" class="btn btn-primary" data-dismiss="modal">Fermer</button>
								  <button type="submit" name="submitbtn" class="btn btn-primary">Enregistrer</button>
								  </div>
          

			  
			  </form>
           
 <script src="../../plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>

<script type="text/javascript">
$(document).ready(function () {
  bsCustomFileInput.init();
});
</script>
<script src="../../plugins/summernote/summernote-bs4.min.js"></script>
<script>
  $(function () {
    // Summernote
    $('.textarea').summernote()
  })
</script>
			
<script>
  $(document).ready(function() {
      $('.js-example-basic-single').select2();
  });

  $(function () {
    $("#tables").DataTable();
    $('#example').DataTable({
      "paging": true,
      "lengthChange": false,
      "searching": false,
      "ordering": false,
      "info": true,
      "autoWidth": false
    });
  });

//   $("#product").change( function() {
//      alert($("#product").val());
// });

  $(document).ready(function () {
    var counter = 0;

    $("#product").on("change", function (e) {
        var id = $("#product").val()
        var name = $('#product').find(":selected").text();
        var newRow = $("<tr>");
        var cols = "";

         cols += '<td><input type="hidden" class="form-control" value="'+id+'"" readonly name="product[]"/><p>'+name+'</p></td>';

        cols += '<td><input type="number" class="form-control" value="1" name="quantity[]"/></td>';
        cols += '<td><span style="cursor:pointer;"><i id="ibtnDel" name="ibtnDel"  class="ibtnDel fa fa-trash"></i></span></td>';

        
        newRow.append(cols);
        $("table.order-list").append(newRow);
        counter++;
        $("#product").select2("close");
    });



    $("table.order-list").on("click", ".ibtnDel", function (event) {
        $(this).closest("tr").remove();       
        counter -= 1
    });


});



function calculateRow(row) {
    var price = +row.find('input[name^="price"]').val();

}

function calculateGrandTotal() {
    var grandTotal = 0;
    $("table.order-list").find('input[name^="price"]').each(function () {
        grandTotal += +$(this).val();
    });
    $("#grandtotal").text(grandTotal.toFixed(2));
}

//$('#product').selectize('option');
</script>
    

AnonSec - 2021