|
Server IP : 10.128.40.6 / Your IP : 216.73.217.36 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/MC/../www/mcg/plugins/jszip/../../.github/../test/../pages/python/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// require __DIR__ . '/vendor_sms_recu/autoload.php';
// include 'includes_sms_recu/ovhhh.php';
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
// for($i=1 ; $i<= 30 ; $i++){
// if($i<10){
// $chaine_date = "2023040".$i ;
// }else{
// $chaine_date = "202304".$i ;
// }
// dbi_query("INSERT INTO `verification_pointage` (`id_verification_pointage`, `date`, `valide`) VALUES (NULL, '".$chaine_date."', '0')") ;
// }
$month = date('m') ;
$year = date('Y') ;
// echo "==$year===$month <qbr/>" ;
$d=cal_days_in_month(CAL_GREGORIAN,$month,$year);
$an_mo = $year."".$month ;
list($nbr_jour) = dbi_fetch_row(dbi_query(" SELECT count(*) FROM `verification_pointage` WHERE `date` LIKE '".$an_mo."%'")) ;
// echo " SELECT count(*) FROM `verification_pointage` WHERE `date` LIKE '".$an_mo."%' <br/>" ;
// echo "$d --- kkkk ==>$nbr_jour <br/>" ;
// exit() ;
if($nbr_jour < $d){
dbi_query("DELETE FROM `verification_pointage` WHERE `date` LIKE '".$an_mo."%'") ;
for($i=1 ; $i<= $d ; $i++ )
{
if($i<10){
$chaine_date = $year."".$month."0".$i ;
}else{
$chaine_date = $year."".$month."".$i ;
}
dbi_query("INSERT INTO `verification_pointage` (`id_verification_pointage`, `date`, `valide`) VALUES (NULL, '".$chaine_date."', '0')") ;
}
}
session_start();
if(empty($_SESSION['datej'])){$_SESSION['datej'] = date('Ymd');}
// exit() ; // $date_jour = date('Ymd');
// echo int2date($date_jour );
if(isset($_POST['date_jour']))
{
$_SESSION['datej'] = dateformaint($_POST['date_jour']);
}
$date_jour = $_SESSION['datej'] ;
// echo "<pre>" ;
// print_r($_SESSION) ;
// echo "</pre>" ;
// echo "========> ".$date_jour."<br/>" ;
// Start the session
function diff_time($t1 , $t2){
//Heures au format (hh:mm:ss) la plus grande puis le plus petite
$tab=explode(":", $t1);
$tab2=explode(":", $t2);
$h=$tab[0];
$m=$tab[1];
$s=$tab[2];
$h2=$tab2[0];
$m2=$tab2[1];
$s2=$tab2[2];
if ($h2>$h) {
$h=$h+24;
}
if ($m2>$m) {
$m=$m+60;
$h2++;
}
if ($s2>$s) {
$s=$s+60;
$m2++;
}
$ht=$h-$h2;
$mt=$m-$m2;
$st=$s-$s2;
if (strlen($ht)==1) {
$ht="0".$ht;
}
if (strlen($mt)==1) {
$mt="0".$mt;
}
if (strlen($st)==1) {
$st="0".$st;
}
return $ht.":".$mt.":".$st;
}
// $uuu = diff_time('06:04:00' , '06:00:00') ;
// echo "$uuu<br/>" ;
// exit() ;
// mise a jour de la table télépoinatage ( ajout de id client pour chaqur pointage)
$qo =dbi_query("SELECT * FROM `telepointage` WHERE jour >= 20210801 AND (`client_id` IS NULL OR client_id = 0 )") ;
while($j= dbi_fetch_row($qo))
{
$telephone= $j['telephone'] ;
list($client_id) = dbi_fetch_row(dbi_query("SELECT client_id FROM `client` WHERE `tele1` LIKE '$telephone' or `tele2` LIKE '$telephone' or `tele3` LIKE '$telephone' or `tele4` LIKE '$telephone' or `tele5` LIKE '$telephone' ")) ;
// echo "$telephone ==> $client_id <br/>" ;
dbi_query("UPDATE `telepointage` SET `client_id` = '$client_id' WHERE `id_p` = ".$j['id_p'] );
}
// echo $date_jour ;
?>
<html>
<head>
<?php include('header.php'); ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
<script type='text/javascript' src='jquery-3.6.0.min.js'></script>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<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 -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<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>
<!-- Sidebar -->
<div class="sidebar">
<!-- Sidebar user panel (optional) -->
<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="#" class="d-block">Steeven ROBLOT</a>
</div>
</div>
<?php include('menu.php'); ?>
<!-- Sidebar Menu -->
</div>
<!-- /.sidebar -->
</aside>
<!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
<div class="content-wrapper">
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>choix de Date </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="indexpointages3.php">Pointages</a></li>
<li class="breadcrumb-item active">Choix Date </li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Content Header (Page header) -->
<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 -->
<section class="content">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<?php
// if(!empty($_POST))
// {
// echo "<pre>" ;
// print_r($_POST) ;
// echo "<pre>" ;
// }
if(!empty($_POST))
{
$an= $_POST['ans'] ;
$mois = $_POST['mois'] ;
// $ismai = $_POST['ans']."".$_POST['mois'] ;
$ismai = $an."".$mois ;
$salarie_id=$_POST['salarie_id'] ;
// $qa = dbi_query(" SELECT * FROM `telepointage` where matricule = $salarie_id and `jour` LIKE '$ismai%' ORDER BY `telepointage`.`jour` DESC ,heure DESC ") ;
}
// echo "ppp=> $an <br/>" ;
// $a = dbi_query("SELEC * FROM `etablissement` $where1")
function dateDifference($date1, $date2)
{
$first = DateTime::createFromFormat('m/d/Y', $date1);
$second = DateTime::createFromFormat('m/d/Y', $date2);
if($date1 > $date2) return week_between_two_dates($date2, $date1);
return floor($first->diff($second)->days/7);
}
// if(!empty($_POST))
// {
// echo "<pre>" ;
// print_r($_POST) ;
// echo "</pre>" ;
// }
?>
<h4> Choisissez une date pour valider les pointages </h4>
<br/>
<form id="bureau_mois" name="mois_form" method="POST" action="Pres_jours2_new.php">
<div class="form-row">
<div class="form-group col-md-4">
<div class="input-group">
<label></label>
</div>
</div>
<div class="form-group col-md-3">
<div class="input-group">
<div class="input-group-prepend"><span class="input-group-text"><i class="far fa-calendar-alt"></i></span></div>
<input type="date" class="form-control" id="date_jour" name="date_jour" value='<?php echo int2date_autre_format($date_jour); ?>' placeholder="jj/mm/aaaa"/>
</div>
</div>
<div class="form-group col-md-2">
<div class="input-group">
<button type="submit" name="Afficher" class="btn btn-primary">Afficher </button>
</div>
</div>
</div>
</form>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/>
</div><!-- /.card-body -->
</div><!-- /.card card-primary card-outline -->
</div> <!-- /.col-12 -->
</div> <!-- /.row -->
</section> <!-- /.section -->
</div>
<?php include('footerr.php'); ?>
</body>
</html>
