|
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 (0705) : /home/logmcpe/www/mcg/pages/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
$q =dbi_query("SELECT * FROM `client` WHERE `client_statut` = '1' ");
// echo "<pre>" ;
// print_r($_POST) ;
// echo "</pre>" ;
if($_POST['modifier']== "modifier"){
$tele1=$_POST['tele1'] ;
$tele2=$_POST['tele2'] ;
$tele3=$_POST['tele3'] ;
$tele4=$_POST['tele4'] ;
$tele5=$_POST['tele5'] ;
$client_NFC = $_POST['client_NFC'] ;
$client_NFC_2 = $_POST['client_NFC_2'] ;
$idprodm=$_POST['idprodm'] ;
$client_acces_pointage= $_POST['client_acces_pointage'];
// dbi_query(" UPDATE `client` SET WHERE client_id = $client_id; ");
dbi_query("UPDATE client SET `tele1` = '$tele1', `tele2` = '$tele2' , `tele3` = '$tele3', `tele4` = '$tele4', `tele5` = '$tele5', client_acces_pointage = '$client_acces_pointage' , client_NFC = '$client_NFC',client_NFC_2 = '$client_NFC_2' WHERE `client`.`client_id` = $idprodm ") ;
// echo "test <br/>" ;
// exit() ;
$ay = 1233 ;
// $fichier_csv = fopen("sortie/AIDE_$idprodm.csv", "w+");
// ----------------fputs($fichier_csv, "0;$idprodm;$tele1;$tele2;$tele3;$tele4");
// $info = '0;'.$idprodm.';'.$client_NFC.';'.$client_NFC_2.';;' ;
// fputs($fichier_csv, $info);
// --------------------------- foreach($tabeleves as $ligne){
// ------------------------ fputcsv($fichier_csv, $ligne, ";");
// ------------------------------ }
// fclose($fichier_csv);
// $my_connection = ftp_connect("telegestion.appius.fr", 21) or exit('Erreur : connexion au serveur FTP impossible.');
// ftp_login($my_connection, "AD_636", "AC4BRT9F");
// ftp_pasv($my_connection, true);
// if(ftp_put($my_connection, "/entree/AIDE_$idprodm.csv", "sortie/AIDE_$idprodm.csv" , FTP_ASCII))
// {
// header('Location:Parametrage.php');
// --------------- echo "bravooOOOoo" ;
// }else{
// echo "Probléme de transfert sur le serveur" ;
// }
}
?>
<!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>
</ul>
</nav>
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<a href="index3.html" class="brand-link">
<img src="dist/img/logomcpro.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">MC PRO</span>
</a>
<div class="sidebar">
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="image">
<img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
</div>
<div class="info">
<a href="index.php" class="d-block">Steeven ROBLOT</a>
</div>
</div>
<?php include('menu.php'); ?>
</div>
</aside>
<!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Paramétrage</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="index.php">Accueil</a></li>
<li class="breadcrumb-item"><a href="fourinc.php">Pointages</a></li>
<li class="breadcrumb-item active">Paramétrage </li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<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 -->
<!-- /.content-header -->
<!-- PAGE PRINCIPALE -->
<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 = "Parametrage.php?id_etab="+id_etab;
else
window.location = "Parametrage.php";
}
</script>
<?php
if(!empty( $_GET["id_statu"]))
{
$_SESSION["id_statu"] = $_GET["id_statu"];
}
if(!empty( $_GET["id_etab"]))
{
$_SESSION["id_etab"] = $_GET["id_etab"];
}
if(empty($_SESSION["id_etab"]) OR $_SESSION["id_etab"]== 111 )
{
$where_etablissement_id="" ;
}
else{
$where_etablissement_id = " AND c.etablissement_id = ".$_SESSION["id_etab"] ;
}
// AND prospect = '0'
$tday = date('Ymd') ;
$q =dbi_query("SELECT DISTINCT(ch.client_id) FROM client c, etablissement e , chantier ch WHERE
c.etablissement_id= e.etablissement_id AND prospect = '0' AND ch.client_id = c.client_id
AND (chantier_fin >= $tday OR chantier_fin = 0) AND c.client_statut = '1' and c.client_id in
( SELECT client_id FROM PRESTATIONS p where `presta_date_fin` IS NULL OR `presta_date_fin` >= $tday ) $where_etablissement_id ");
?>
<section class="content">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<form id="client_statu_form" name="client_statu_form" method="POST" action="">
<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>
</form>
<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">
<thead>
<TR>
<th align="center">Client</th>
<th align="center">Etablissement</th>
<th align="center">Etat</th>
<th align="center">N° Téléphone </th>
<th align="center">N° puce NFC</th>
<th></th>
</TR>
</thead>
<tbody>
<?php while($cll = dbi_fetch_row($q)) {
$cl =dbi_fetch_row(dbi_query(" SELECT * FROM `client` c , etablissement e WHERE c.etablissement_id = e.etablissement_id and `client_id` = ".$cll['client_id'])) ;
if($cl['client_acces_pointage']==1){$client_acces_pointage = 'NV' ; }
if($cl['client_acces_pointage']==2){$client_acces_pointage = 'O' ; }
if($cl['client_acces_pointage']==3){$client_acces_pointage = 'N' ; }
?>
<tr>
<td> <?php echo $cl['client_nom']." ".$cl['client_id'] ; ?> </td>
<td><?php echo $cl['etablissement_nom'] ; ?> </td>
<td><?php echo $client_acces_pointage ; ?> </td>
<td><?php echo $cl['tele1'] ; ?> - <?php echo $cl['tele2'] ; ?> - <?php echo $cl['tele3'] ; ?> - <?php echo $cl['tele4'] ; ?> - <?php echo $cl['tele5'] ; ?></td>
<td><?php echo $cl['client_NFC'] ; ?> - <?php echo $cl['client_NFC_2'] ; ?> </td>
<td><?php echo '<a class="btn btn-info btn-sm" href="#myModal" id="custId" data-toggle="modal" data-id="'.$cl['client_id'].'"><i class="fas fa-pencil-alt"></i></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 type="text/javascript">
$(document).ready(function(){
$('#myModal').on('show.bs.modal', function (e) {
var rowid = $(e.relatedTarget).data('id');
$.ajax({
type : 'post',
url : 'ajaxModifierParametrage.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>
