|
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 ] |
|---|
<?php
$to = "dsi.pro2000@gmail.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: jawad.ezzaanouni040@gmail.com" . "\r\n" .
"CC: somebodyelse@example.com";
// mail($to,$subject,$txt,$headers);
// echo "test fffffffffffffffffffffffffffffffff<br/>" ;
// the message
// $msg = "First line of text\nSecond line of text";
// use wordwrap() if lines are longer than 70 characters
// $msg = wordwrap($msg,70);
// send email
// mail("dsi.pro2000@gmail.com","My subject",$msg);
// exit() ;
require __DIR__ . '/vendor_sms_recu/autoload.php';
include 'includes_sms_recu/ovh.php';
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
// echo "<pre>" ;
// print_r($_SESSION) ;
// echo "<pre>" ;
// $_SESSION['MCPRO']['user_id']
// function getmicrotime(){
// list($usec, $sec) = explode(" ",microtime());
// return ((float)$usec + (float)$sec);
// }
// $debut = getmicrotime();
$a = dbi_query("SELECT * FROM `chantier`") ;
while($b=dbi_fetch_row($a))
{
if($b['chantier_debut']== $b['chantier_fin'])
{
dbi_query("UPDATE chantier SET `chantier_recur` = '0' WHERE chantier_ID = ".$b['chantier_ID']) ;
}
}
foreach ($messagesDetails as $messagesDetail) {
// echo "<pre>" ;
// print_r($messagesDetail) ;
// echo "</pre>" ;
// echo "==>".$messagesDetail['sender']."<br/>" ;
list($id_sms_recu) = dbi_fetch_row(dbi_query(" SELECT id_sms_recu FROM `sms_recu` WHERE `id` = ".$messagesDetail['id'])) ;
// echo "====> $id_sms_recu <br/>" ;
if($id_sms_recu == "")
{
$date_only = date2int_DSI(substr($messagesDetail['creationDatetime'],0,10)) ;
// echo "==> $date_only <br/>" ;
// exit() ;
$heure_only=substr($messagesDetail['creationDatetime'],11,5) ;
$heure_forma = heure2int($heure_only) ;
dbi_query("INSERT INTO `sms_recu` (`id_sms_recu`, `id`, `message`, `sender`, `date_recu`, date_only ,heure_only,heure_forma) VALUES (NULL, '".$messagesDetail['id']."', '".addslashes($messagesDetail['message'])."', '".$messagesDetail['sender']."', '".$messagesDetail['creationDatetime']."', '".$date_only."', '".$heure_only."', '".$heure_forma."')") ;
dbi_query("INSERT INTO `boit_send_receives` (`id_sms`, `message`, `number`, `date_full`, date_only ,heure_only,heure_forma,type) VALUES ('".$messagesDetail['id']."', '".addslashes($messagesDetail['message'])."', '".$messagesDetail['sender']."', '".$messagesDetail['creationDatetime']."', '".$date_only."', '".$heure_only."', '".$heure_forma."',1)") ;
}
// exit() ;
$sender = str_replace('+33', '0',$messagesDetail['sender']);
// echo "ddd==>$sender <br/>" ;
list($client_nom)= dbi_fetch_row(dbi_query("SELECT client_nom FROM contact con , client c where contact_tele1 = $sender and c.client_id = con.client_id ")) ;
// echo "===> ".$messagesDetail['creationDatetime']."<br/>" ;
// echo "===> ".substr($messagesDetail['creationDatetime'],0,10)."<br/>" ;
// echo "===> ".substr($messagesDetail['creationDatetime'],11,5)."<br/>" ;
}
list($nbr_sms) = dbi_fetch_row(dbi_query(" SELECT count(*) FROM `sms_recu` ")) ;
list($value) = dbi_fetch_row(dbi_query("select value_sms from config_sms where id = 1")) ;
$notif = $nbr_sms - $value ;
// ini_set('display_errors','on');
// error_reporting(E_ALL);
?>
<script language="Javascript">
function GetIdBureau()
{
var id="";
id = document.admin_form.admin_id.value ;
if( id > 0 || id=="INDEFINI" )
window.location = "index.php?id="+id;
else
window.location = "index.php";
}
</script>
<?php
// echo "<pre>" ;
// print_r($_GET) ;
// echo "<pre>" ;
if(!empty($_GET['id']))
{
$_SESSION['MCPRO']['user_id']= $_GET['id'] ;
}
$today = date("Y-m-d H:i:s");
$Admin_ID = $_SESSION['MCPRO']['admin'] ;
$user_id=$_SESSION['MCPRO']['user_id'] ;
session_start();
if( !empty($_GET['d'])) {
$uid = $_GET['i'];
$date = $_GET['d'];
include_once('libbox/lib/class.imap3.php');
$email1 = new Imap();
$connect1 = $email1->connect('{ssl0.ovh.net/pop3/ssl/novalidate-cert}INBOX','contact@mc-pro.fr','Steeven2411' );
$inbox1 = $email1->delMessages('html',$date);
}
if(!empty($_POST) AND empty($_POST['update_tache']))
{
// echo "<pre>" ;
// print_r($_POST) ;
// echo "<pre>" ;
$page="index.php";
if(!empty($_POST['tache_date_fin']))
{
$tache_date_fin= dateformaint($_POST['tache_date_fin']) ;
}
// echo "==> $tache_date_fin <br/>" ;
// exit() ;
$date_creation = date("Ymd");
$tache_sujet=addslashes($_POST['tache_sujet']) ;
// $tache_date_fin=$_POST['tache_date_fin'] ;
$tache_Priorite=$_POST['tache_Priorite'] ;
$salarie_id=$_POST['salarie_id'] ;
$client_id=$_POST['client_id'] ;
// $user_id=$_SESSION['MCPRO']['user_id'] ;
$user_id = $_SESSION['MCPRO']['login']['4'] ;
$tache_designation=addslashes($_POST['tache_designation']) ;
dbi_query(" INSERT INTO tache (
tache_sujet,
tache_date_fin,
tache_Priorite,
salarie_id,
client_id,
user_id,
date_creation
)
VALUES
(
'$tache_sujet',
'$tache_date_fin',
'$tache_Priorite',
'$salarie_id',
'$client_id',
'$user_id',
'$date_creation'
)") ;
list($tache_idd)=dbi_fetch_row(dbi_query("SELECT max(tache_id) FROM `tache`")) ;
header("Location:fetch_record.php?msg=tache bien ajouté&color=success&page=$page&rowid=$tache_idd");
}
?>
<!DOCTYPE html>
<html>
<head>
<?php include('header.php'); ?>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar -->
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
</li>
<li>
<h3><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-tache"><i class="fas fa-plus"></i> NOUVELLE TACHE</button></h3>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="index.html" class="nav-link"><!--Accueil --></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="#" class="nav-link"><!--Contact --></a>
</li>
<?php if($notif !=0 ){ ?>
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa-bell"></i>
<span class="badge badge-warning navbar-badge">M</span>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<span class="dropdown-item dropdown-header"><?php echo $notif ; ?> Notifications</span>
<div class="dropdown-divider"></div>
<a href="sms_.php" class="dropdown-item">
<i class="fas fa-envelope mr-2"></i> <?php echo $notif ; ?> Nouveaux message
<span class="float-right text-muted text-sm">1 mins</span>
</a>
<div class="dropdown-divider"></div>
<a href="sms_recuuu.php" class="dropdown-item dropdown-footer">Voie tous les messages</a>
</div>
</li>
<?php }?>
</ul>
<!-- SEARCH FORM
<form class="form-inline ml-3">
<div class="input-group input-group-sm">
<input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
<div class="input-group-append">
<button class="btn btn-navbar" type="submit">
<i class="fas fa-search"></i>
</button>
</div>
</div>
</form>
-->
</nav>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<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>
<!-- Content Wrapper. Contains page content -->
<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="modal-tache">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Nouvelle TACHE</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="card-body">
<form action="" method="POST">
<!-- ///////Ligne société & Catégorie -->
<!-- ///////Ligne -->
<div class="form-row">
<div class="form-group col-md-8">
<label for="inputsociete">Sujet</label>
<input type="text" class="form-control" name="tache_sujet" required>
</div>
<div class="form-group col-md-4">
<label>Priorité </label>
<div class="input-group">
<!-- <input type="text" class="form-control" name="number" placeholder="jj/mm/aaaa"> -->
<select class="form-control" name="tache_Priorite" id="tache_Priorite">
<option value="-1" selected="selected" disabled="disabled">-Priorité-</option>
<option value="1" selected > Moyen </option>
<option value="2" > Haute </option>
<option value="3" > Urgente </option>
</select>
</div>
</div>
<?php
$req =dbi_query("SELECT * FROM `salarie` WHERE `salarie_statut` = '1' ORDER BY `salarie`.`salarie_nom` ASC") ;
?>
<div class="form-group col-md-6"><!-- Liste déroulante jour -->
<label>Salarié </label>
<select class="form-control select2" style="width: 100%;" name="salarie_id">
<option value="-1" selected="selected" disabled="disabled">-Salarié-</option>
<?php
while( $sal=dbi_fetch_row($req))
{
?>
<option value="<?php echo $sal['salarie_id'] ; ?>" ><?php echo $sal['salarie_nom']." ".$sal['salarie_prenom']; ?></option>
<?php
}
?>
</select>
</div>
<?php
// $q= dbi_query("SELECT * FROM prospect") ;
$req_client =dbi_query("SELECT * FROM `client` WHERE `client_statut` = '1' and prospect = 0 ORDER BY `client`.`client_nom` ASC") ;
?>
<div class="form-group col-md-6"><!-- Liste déroulante jour -->
<label>Client </label>
<select class="form-control select2" style="width: 100%;" name="client_id">
<option value="-1" selected="selected" disabled="disabled">-Client-</option>
<?php
while( $cli=dbi_fetch_row($req_client))
{
?>
<option value="<?php echo $cli['client_id'] ; ?>" ><?php echo $cli['client_nom']; ?></option>
<?php
}
?>
</select>
</div>
</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>
</form>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</div><!-- /.row -->
</div>
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- Small boxes (Stat box) -->
<div class="row">
<!-- ./col -->
<!-- ./col -->
<!-- ./col -->
<!-- ./col -->
</div>
<!-- /.row -->
<!-- Main row -->
<!-- Left col -->
<?php
$Admin_ID = 83 ;
// $suivi = dbi_query(" SELECT * FROM sous_tache st , tache t where st.tache_id = t.tache_id AND sous_tache_status = 0 AND st.user_id = $Admin_ID ") ;
$suivi = dbi_query(" SELECT * FROM sous_tache st , tache t where st.tache_id = t.tache_id AND sous_tache_status = 0 AND st.user_id = $user_id ORDER BY st.sous_tache_date_fin ASC ") ;
?>
<section class="content">
<div class="row">
<div class="col-12">
<div class="card card-primary">
<div class="card-body">
<form id="admin_form" name="admin_form" method="POST" action="sb.php">
<div class="form-row">
<div class="form-group col-md-4">
<div class="input-group">
<select class="form-control select" style="width: 100%;" id="admin_id" name="admin_id" onchange="GetIdBureau()";>
<?php if(isset($etablissement_id) && isset($etablissement_nom)) { ?>
<?php
}
$etab=dbi_query("SELECT * FROM users ");
while($et=dbi_fetch_row($etab)){
?>
<option value="<?php echo $et['user_id'];?>" <?php if( $et['user_id'] == $user_id) echo "SELECTED"; ?> ><?php echo $et['user_nom']." ".$et['user_prenom']?></option>
<?php
}
?>
</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="" class="table table-hover">
<thead>
<TR>
<th align="center">Client</th>
<th align="center">Salarié </th>
<th align="center"> Tache </th>
<th align="center"> Designation</th>
<th align="center">Date </th>
</TR>
</thead>
<tbody>
<?php while($a = dbi_fetch_row($suivi)){
list($Admin_nom) = dbi_fetch_row( dbi_query("SELECT user_nom,user_prenom FROM `users` WHERE `user_id` = ".$a['user_id'])) ;
// list($salarie_nom ,$salarie_prenom ) = dbi_fetch_row( dbi_query("SELECT salarie_nom , salarie_prenom FROM `salarie` WHERE `salarie_id` = ".$a['inter_id'])) ;
// $salarie_nomm = $salarie_nom." ".$salarie_prenom ;
// exit() :
// pour identifier les prospect car on peut pas faire la diffrence entre les prospect et les clients
// if($a['client_id']<100 and $a['client_id']!= 0)
// {
// list($client_nom)= dbi_fetch_row(dbi_query("SELECT prospect_nom FROM `prospect` WHERE `prospect_id` = ".$a['client_id'])) ;
// $nom_de_client=$client_nom." (Prospect) " ;
// $client_nom = $client_nom." (Prospect) " ;
// $client_id=$a['client_id'] ;
// }
// else
// {
if($a['client_id']!= 0)
{
list($client_nom,$prospect)= dbi_fetch_row(dbi_query("SELECT client_nom,prospect FROM `client` WHERE `client_id` = ".$a['client_id'])) ;
}
else
{ $client_nom = " <strong > N.C </strong>"; }
// }
list($salarie_nom , $salarie_prenom)= dbi_fetch_row(dbi_query("SELECT salarie_nom , salarie_prenom FROM `salarie` WHERE `salarie_id` = ".$a['salarie_id'])) ;
if(empty($salarie_nom) AND empty($salarie_prenom))
{
$salarie_nom = " <strong >N" ;
$salarie_prenom = ".C </strong> " ;
}
$sous_tache_date_fin = date2int_DSI($a['sous_tache_date_fin']) ;
$today = date("Ymd");
// echo "==> ==> $sous_tache_date_fin <br/>" ;
if($today>$sous_tache_date_fin)
{
$dat_fin =int2date($sous_tache_date_fin) ;
// echo "tetfrreeerrett <br/>" ;
$badge = 'badge-danger';
$dat_fin="<span class='badge ".$badge."'>".$dat_fin."</span>" ;
}
elseif($today== $sous_tache_date_fin)
{
$dat_fin =int2date($sous_tache_date_fin) ;
// echo "tetfrreeerrett <br/>" ;
$badge = 'badge-success';
$dat_fin="<span class='badge ".$badge."'>".$dat_fin."</span>" ;
}
else
{
$dat_fin =int2date($sous_tache_date_fin) ;
}
// exit() ;
$page = "index.php" ;
// echo "==>".$a['tache_recouvrement']."<br/>" ;
?>
<tr>
<?php
if($prospect == 1) // si on a un prospect et non un client
{
if($a['PRIORITAIRE']==1)
{
?>
<td> <a href="profilprosepct.php?client_id=<?=$a['client_id']?>&page=<?=$page?>"> <?php echo $client_nom ; ?></a> <span class="right badge badge-danger">Pr</span> </td>
<?php
}
else
{
?>
<td> <a href="profilprosepct.php?client_id=<?=$a['client_id']?>&page=<?=$page?>"> <?php echo $client_nom ; ?></a></td>
<?php
}
}
else
{
if($a['tache_recouvrement'] == 1 )
{
if($a['PRIORITAIRE']==1)
{
?>
<td> <a href="cRvouvrement.php?client_id= <?php echo $a['client_id']?>&page=<?=$page?> ; ?>" target="" > <?php echo $client_nom ; ?></a> <span class="right badge badge-danger">Pr</span> </td>
<?php
}
else
{
?>
<td> <a href="cRvouvrement.php?client_id= <?php echo $a['client_id']?>&page=<?=$page?> ; ?>" target="" > <?php echo $client_nom ; ?> </a></td>
<?php
}
}else{
if($a['PRIORITAIRE']==1)
{
?>
<td> <a href="fetch_record.php?rowid=<?=$a['tache_id']?>&page=<?=$page?>"> <?php echo $client_nom ; ?></a> <span class="right badge badge-danger">Pr</span> </td>
<?php
}
else
{
?>
<td> <a href="fetch_record.php?rowid=<?=$a['tache_id']?>&page=<?=$page?>"> <?php echo $client_nom ; ?></a></td>
<?php
}
}
}
?>
<td> <?php echo $salarie_nom." ".$salarie_prenom ; ?></td>
<td> <?php echo $a['tache_sujet'] ; ?></td>
<td> <?php echo substr($a['sous_tache_designation'] , 0, 50)." ...";?></td>
<td> <?php echo $dat_fin ; ?></td>
<?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>
<!-- /.row (main row) -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php
// $fin = getmicrotime();
// echo "Page générée en ".round($fin-$debut, 3) ." secondes.<br />";
?>
<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.min.js"></script>
<!-- Page Script -->
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- <script src="libbox/loadingoverlay.js"></script> -->
<!-- jQuery -->
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<!-- Bootstrap -->
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="../plugins/datatables/jquery.dataTables.js"></script>
<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
<!-- loading-overlay -->
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
});
});
</script>
<script src="../plugins/select2/js/select2.full.min.js"></script>
<script>
$(function () {
//Initialize Select2 Elements
$('.select2').select2()
//Initialize Select2 Elements
$('.select2bs4').select2({
theme: 'bootstrap4'
})
})
</script>
</body>
<?php
//vider la table automate_salarie on rempli cet table dans la page anomalies_salarie.php // include planning_prestation.php
dbi_query("TRUNCATE TABLE automate_salarie") ;
?>
</html>