|
Server IP : 10.128.40.6 / Your IP : 216.73.217.20 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/TEST/www/../../TMCPRO/gmail/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// $a = 2 ;
// $b = 6 ;
// $somme = $a + $b ;
// echo "la somme est ==> $somme <br/>" ;
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
session_start();
// echo "test" ;
// echo "<pre>" ;
// print_r($_SESSION) ;
// echo "<s/pre>" ;
if(!empty($_POST))
{
echo "<pre>" ;
print_r($_POST) ;
echo "</pre>" ;
$salarie_id = $_POST['salarie_id'] ;
$date_message = date('Ymd');
$date_message_format = date('Y-m-d h:i:s', time());
$provenance_message = 2 ;
$statut_message = 2 ;
$contenu_message = addslashes($_POST['contenu_message']) ;
dbi_query("INSERT INTO `messages`
(`date_message`, `salarie_id`, `contenu_message`, `statut_message`, `provenance_message`, `date_message_format`)
VALUES ($date_message, '$salarie_id', '$contenu_message', '$statut_message', '$provenance_message', '$date_message_format')") ;
header('Location:message_extranet.php?msg=Message envoyé&color=success');
}
?><html>
<head>
<?php include('header.php'); ?>
<link rel="stylesheet" href="../plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
</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>
  <?php echo '<a href="#myModal" id="custId" data-toggle="modal" data-id="0"><button type="button" class="btn btn-primary"><i class="fas fa-plus"></i> Nouveau Message </button></a>';?>
</li>
</ul>
<!-- liens TOP MENU DROITE -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="login.php?dec=1" class="nav-link">
<i class="nav-icon fas fa-power-off"></i>
</a>
</li><!-- Placer ici l'élément à positionner à droite du TOP MENU -->
</ul>
</nav>
<!-- BARRE DE NAVIGATION -->
<?php include('menu.php'); ?>
<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>
<!-- 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><!-- /.row -->
</div>
</div>
<!-- /.content-header -->
<!-- PAGE PRINCIPALE -->
<section class="content">
<?php
if(isset($_GET["msg"])){
?>
<div class="alert alert-<?php echo $_GET["color"]; ?> alert-dismissible col-12" role="alert">
<strong><?php echo $_GET["color"].': '; ?></strong><?php echo $_GET["msg"]; ?>.
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<?php
}
?>
<div class="row">
<div class="col-12">
<div class="card card-info">
<div class="card-header">
<div class="row">
<div class="col-sm-11">
<h3 class="card-title"> <i class="far fa-user-tie">   </i> Messages </h3>
</div>
</div>
</div>
<div class="card-body">
<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-hover">
<thead>
<tr>
<th>Message</th> <!-- /.Table Client - Champs client_nom -->
<th>salarie</th> <!-- /.Table Client - Champs client_cp -->
<th>VILLE</th> <!-- /.Table Client - Champs client_ville -->
</tr>
</thead>
<tbody>
<?php $query = dbi_query("SELECT * FROM `messages` m salarie s WHERE m.salarie_id = s.salarie_id `statut_message` = 2 AND `provenance_message` = 1 ORDER BY `messages`.`date_message_format` DESC ");
// echo "SELECT * FROM client c, etablissement etab,categorie cat where c.etablissement_id = etab.etablissement_id and c.categorie_id = cat.categorie_id $where_statut $where_etablissement_id ORDER BY c.`client_nom` ASC " ;
while($cl = dbi_fetch_row($query)){
?>
<tr>
<td> <?= stripslashes( $cl['salarie_nom'])." ".stripslashes( $cl['salarie_prenom']) ?> </td>
<td> <?php echo $cl['client_cp'] ; ?></td>
<td> <?php echo $cl['client_ville'] ; ?></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 src="../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.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 : 'nouveau_message.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>
