|
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
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
session_start();
if($_POST['modifier']== "modifier"){
$idprodm=$_POST['idprodm'] ;
$salarie_id=$_POST['salarie_id'] ;
// echo "==> $salarie_id u<br/>" ;
// exit() ;
dbi_query("UPDATE `tmcpro`.`telepointage` SET `matricule` = $salarie_id WHERE `telepointage`.`id_p` = $idprodm ; ") ;
header('Location:probleme_salarie.php');
}
function check_null($value)
{
if(empty($value))
{
return 0;
}
else{
return $value;
}
}
$my_connection = ftp_connect("telegestion.appius.fr", 21) or exit('Erreur : connexion au serveur FTP impossible.');
ftp_login($my_connection, "AD_636", "AC4BRT9F");
$liste_fichiers = ftp_nlist($my_connection, '/sortie');
// print_r($liste_fichiers ) ;
// exit() ;
foreach($liste_fichiers as $fichier)
{
// echo $fichier. '<br/>';
$ret = ftp_nb_get($my_connection, "input.txt", $fichier, FTP_BINARY);
while ($ret == FTP_MOREDATA) {
// Faites ce que vous voulez...
// echo ".";
// Continue le téléchargement...
$ret = ftp_nb_continue($my_connection);
}
if ($ret != FTP_FINISHED) {
echo "Il y a eu un problème lors du téléchargement...";
exit(1);
}
ftp_delete($my_connection, $fichier) ;
$file = fopen("input.txt","r");
while(! feof($file))
{
$line = fgets($file);
$row = explode(";", $line);
$agence = check_null($row[0]);
$jour = check_null($row[1]);
$heure = check_null($row[2]);
$telephone = check_null($row[3]);
$matricule = check_null($row[5]);
$action = check_null($row[6]);
// echo "==> $jour ";
if($heure != 0)
{
$jour = dateMCPROint($jour) ;
$query = "INSERT INTO `telepointage`(`agence`, `jour`, `heure`, `telephone`, `matricule`, `action`) VALUES ('$agence', '$jour', '$heure', '$telephone', '$matricule', '$action')";
dbi_query($query) ;
}
}
// echo "<h2 align='center'>All Rows of Files are inserted successfully</h2>";
fclose($file);
}
?><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>
<!-- BARRE DE NAVIGATION -->
<?php include('menu.php'); ?>
<!-- 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 class="modal fade" id="myModal1" 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="fetch1" >
</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-clock"></i> Probléme salarie </h3>
</div>
</div>
</div>
<div class="card-body">
<?php
if(!empty($_POST))
{
$ismai = $_POST['ans']."".$_POST['mois'] ;
}
else
{
$ismai = date("Ym") ;
// echo "ppp=> $ismai <br/>" ;
}
// $_SESSION['favcolor'] = 'green';
// if(!empty($_GET['idans']))
// {
// $_SESSION['idans'] = $_GET['idans'];
// }
// elseif(empty($_GET['id']))
// {
// $_SESSION['idans'] = date("Ym");
// }
// $ismai = date("m");
// $an = $_SESSION['idans'] ;
// if(!empty($_GET['id']))
// {
// $ismai=$an."".$_GET['id'] ;
// }
// if(empty($_GET['id']))
// {
// $ismai = $an."".$ismai ;
// }
// $qa = dbi_query(" SELECT * FROM `telepointage` where `jour` LIKE '$ismai%' and matricule = 0 ORDER BY `telepointage`.`jour` ASC ") ;
// echo "SELECT * FROM `telepointage` where `jour` LIKE '$ismai%' and matricule not in (SELECT salarie_id FROM `salarie`) ORDER BY `telepointage`.`jour` ASC" ;
?>
<form id="bureau_mois" name="mois_form" method="POST" action="">
<div class="form-row">
<div class="form-group col-md-4">
<div class="input-group">
<?php $qm = dbi_query("SELECT * FROM `client` WHERE `client_statut` = '1'") ; ?>
<select class="form-control select" style="width: 100%;" name="mois" onchange="GetIdmois()";>
<option selected="selected">selectionner un mois </option>
<option value='01'> Janvier </option>
<option value='02'> Février </option>
<option value='03'> Mars </option>
<option value='04'> Avril </option>
<option value='05'> Mai </option>
<option value='06'> Juin </option>
<option value='07'> Juillet </option>
<option value='08'> Aout </option>
<option value='09'> Septembre </option>
<option value='10'> Octobre </option>
<option value='11'> Novembre </option>
<option value='12'> Décembre </option>
</select>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<select class="form-control select" style="width: 100%;" name="ans" onchange="GetIdans()";>
<option selected="selected">selectionner un année </option>
<option value='2020'> 2020 </option>
<option value='2021'> 2021 </option>
<option value='2022'> 2022 </option>
<option value='2023'> 2023 </option>
<option value='2024'> 2024 </option>
<option value='2025'> 2025 </option>
<option value='2026'> 2026 </option>
</select>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<button type="submit" name="Afficher" class="btn btn-primary">Afficher </button>
</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 align="center">Jour</th>
<th align="center">Salarié</th>
<th align="center">Client</th>
<th align="center">Heure</th>
<th align="center">Telephone</th>
<th align="center">Matricule</th>
<th align="center">Deb/fin</th>
<th align="center">Action</th>
<th align="center">SMS</th>
</TR>
</thead>
<tbody>
<?php
$qa = dbi_query(" SELECT * FROM `telepointage` where `jour` LIKE '$ismai%' and matricule not in (SELECT salarie_id FROM `salarie`) ORDER BY `telepointage`.`jour` ASC ") ;
while($tel = dbi_fetch_row($qa)) {
$classe="btn btn-info btn-sm";
list($presta_id_sms)=dbi_fetch_row(dbi_query("SELECT presta_id FROM sms_salarie_avertissement WHERE presta_id = ".$tel['id_p'])) ;
if($presta_id_sms!=""){ $classe="btn btn-block btn-default disabled"; ;}
?>
<?php list($inter_nom , $inter_pnom) = dbi_fetch_row(dbi_query(" SELECT salarie_nom , salarie_prenom FROM `salarie` WHERE `salarie_id` = ".$tel['matricule'])) ; ?>
<?php $tele =$tel['telephone'] ;
list($client_nom ) = dbi_fetch_row(dbi_query("SELECT client_nom FROM `client` WHERE `tele1` LIKE '$tele' OR `tele2` LIKE '$tele' OR `tele3` LIKE '$tele' OR `tele4` LIKE '$tele'")) ;
?>
<tr>
<td> <?php echo int2date($tel['jour']) ; ?> </td>
<td> <?php echo $inter_nom." ".$inter_pnom; ?> </td>
<td> <?php echo $client_nom ; ?> </td>
<td> <?php echo $tel['heure'] ; ?> </td>
<td> <?php echo $tel['telephone'] ; ?> </td>
<td> <?php echo $tel['matricule'] ; ?> </td>
<td> <?php echo $tel['action'] ; ?> </td>
<TD align="center" nowrap>
<?php echo '<a class="btn btn-info btn-sm" href="#myModal" id="custId" data-toggle="modal" data-id="'.$tel['id_p'].'"><i class="fas fa-pencil-alt"></i></a>';?>
</a>
</TD>
<TD align="center" nowrap>
<?php echo '<a class="'.$classe.'" href="#myModal1" id="custId" data-toggle="modal" data-id="'.$tel['id_p'].'" data-type="2" data-presta_id="'.$prest['presta_id'].'" >sms</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 : 'ajaxAjoutMat_Problem.php', //Here you will fetch records
data : 'rowid='+ rowid, //Pass $id
success : function(data){
$('#fetch').html(data);//Show fetched data from database
}
});
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#myModal1').on('show.bs.modal', function (e) {
var rowid = $(e.relatedTarget).data('id');
var rowid_type = $(e.relatedTarget).data('type');
var rowid_presta_id = $(e.relatedTarget).data('presta_id');
$.ajax({
type : 'post',
url : 'envioi_SMS_sal_sal.php', //Here you will fetch records
data : 'rowid='+ rowid +'&rowid_type='+ rowid_type +'&rowid_presta_id='+ rowid_presta_id, //Pass $id
success : function(data){
$('#fetch1').html(data);//Show fetched data from database
}
});
});
});
</script>
</body>
</html>
