|
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 (0705) : /home/logmcpe/www/mcg/pages/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
$pagemenu = basename($_SERVER["PHP_SELF"]) ;
if($_GET['action']=='sup')
{
$tache_id=$_GET['id'];
dbi_query(" DELETE FROM tache WHERE tache_id = $tache_id") ;
dbi_query(" DELETE FROM sous_tache WHERE `sous_tache`.`sous_tache_id` = $tache_id") ;
header('Location:TacheClient.php?msg=Tache bien supprimé&color=success');
// exit() ;
}
// echo "testttttttttttjjjjkkktttt <br/>" ;
// if(!empty($_POST['contact_id']) )
// {
// echo "<pre>" ;
// prsint_r($_POST);
// echo "</pre>" ;
// exit() ;z
// }
// echo "<pre>" ;
// print_r($_GET) ;
// echo "<pre>" ;
include('file_tache.php');
if(!empty($_GET['client_id']))
{
$_SESSION["client_id"] = $_GET['client_id'];
}
$client_id=$_SESSION["client_id"] ;
// if(!empty($_POST) and empty($_POST['tache_Priorite']) )
// {
// $client_acces_pointage= $_POST['client_acces_pointage'];
// dbi_query(" UPDATE `client` SET client_acces_pointage = '$client_acces_pointage' WHERE client_id = $client_id; ");
// header('Location:pointageclient.php?msg=pointage bien Modifié&color=success');
// }
$q= dbi_fetch_row(dbi_query("SELECT * FROM client where client_id = ".$client_id)) ;
?>
<!DOCTYPE html>
<html>
<head>
<?php include('header.php'); ?>
<!--
<script type="text/javascript" src="plugins/selectize/selectize.js"></script>
<link rel="stylesheet" type="text/css" href="plugins/selectize/selectize.css" />
<script type="text/javascript" src="plugins/selectize/selectize.min.js"></script>
<link rel="stylesheet" type="text/css" href="plugins/selectize/selectize.default.css" />
<link rel="stylesheet" href="../../plugins/summernote/summernote-bs4.css">
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
jQuery 2.2.3 -->
<style type="text/css">
.modal-backdrop {
/* bug fix - no overlay */
display: 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>
  <li> <h3><a href="#myModal_tache_all" id="custId" data-toggle="modal" > <button type="button" class="btn btn-primary" > <i class="fas fa-plus"></i> NOUVELLE TACHE</button> </a></h3></li>
<!-- liens TOP MENU GAUCHE-->
</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 -->
<?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>
<div class="modal fade" id="myModal_tache_all" 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_tache_all" ></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">
<!-- /.col -->
<div class="modal fade" id="modal-nouveaucontact">
<div class="modal-dialog modal-lg">
<div class="modal-content">
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- PAGE PRINCIPALE -->
<div class="content">
<div class="container-fluid">
<?php include('widget_client_haut.php'); ?>
</div>
</div>
<!-- PASSAGE A LA COLONNE DE DROITE-->
<div class="col-lg-12">
<!-- CARD DE DROITE-->
<div class="card card-info">
<?php include('menu_client_haut.php'); ?>
<div class="card">
<div class="card-body">
<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
}
?>
<!-- /.card-header -->
<div class="card-body">
<?php
$suivi = dbi_query(" SELECT * FROM tache t,users u where t.user_id = u.user_id and client_id=$client_id ORDER BY date_creation DESC ") ;
?>
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<TR>
<th align="center" colspan="4"> Sujet </th>
<th align="center">Nom du salarié </th>
<th align="center">Statu </th>
<th align="center">Priorité </th>
<th align="center"> Date de création </th>
<th align="center"> Suprimmer </th>
</TR>
</thead>
<tbody>
<?php while($a = dbi_fetch_row($suivi)){
list($nbr) = dbi_fetch_row(dbi_query(" SELECT count(*) FROM `sous_tache` WHERE `tache_id` = ".$a['tache_id'])) ;
// echo " SELECT count(*) FROM `sous_tache` WHERE `sous_tache_id` = ".$a['tache_id']." -- $nbr <br/>" ;
list($sous_tache_id) = dbi_fetch_row(dbi_query("SELECT sous_tache_id FROM `sous_tache` WHERE `tache_id` = ".$a['tache_id']." AND `sous_tache_status` = 0 ")) ;
if($sous_tache_id >= 1 OR $nbr == 0)
{
$tache_status="Pas complété";
}else{ $tache_status="Complété";}
if($a['tache_Priorite']== 1)
{
$tache_Priorite= "Moyen" ;
}
elseif($a['tache_Priorite']== 2)
{
$tache_Priorite= "Haute" ;
}
elseif($a['tache_Priorite']== 3)
{
$tache_Priorite= "Urgente" ;
}
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() :
if($a['client_id']!= 0)
{
list($client_nom)= dbi_fetch_row(dbi_query("SELECT client_nom FROM `client` WHERE `client_id` = ".$a['client_id'])) ;
// echo "<br/>SELECT client_nom FROM `client` WHERE `client_id` = ".$a['client_id'] ;
}
else
{ $client_nom = " <strong style='color:red;'> Pas de client concerné </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 style='color:red;'>Pas de " ;
$salarie_prenom = "salarié </strong> " ;
}
$page = "TacheClient.php" ;
list($tache_sujet) = dbi_fetch_row(dbi_query(" SELECT tache_sujet FROM `tache_titre` WHERE `tache_titre_id` = ".$a['tache_titre_id'] )) ;
if(empty($tache_sujet)){
$tache_sujet = $a['tache_sujet'] ;
}
list($nbr_sous_t) = dbi_fetch_row(dbi_query("SELECT count(*) as nbr_sous_t FROM `sous_tache` WHERE `tache_id` = ".$a['tache_id'])) ;
?>
<tr>
<td colspan="4"> <a href="fetch_record2.php?rowid=<?=$a['tache_id']?>&page=<?=$page?>"> <?php echo $tache_sujet ; ?></a></td>
<td> <?php echo $salarie_nom." ".$salarie_prenom ; ?></td>
<td> <?php echo $tache_status ; ?></td>
<td> <?php echo $tache_Priorite; ?></td>
<td> <?php echo int2date($a['date_creation']); ?></td>
<!-- <td> <?php //echo $a['user_nom']." ".$a['user_prenom'] ; ?></td>/.table -->
<td>
<?php if($nbr_sous_t ==0){?>
<a class="btn btn-danger btn-sm" href="?action=sup&id=<?=$a['tache_id']?>" onclick="return confirm('Voulez-vous vraiment supprimer cette tache ?');">
<i class="fas fa-trash"></i> Supprimer
</a>
<?php }?>
</td>
<?php }?>
</tbody>
</table><!-- /.table -->
</div><!-- /.box-body -->
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- NE PAS TOUCHER AU DESSUS DESSOUS -->
</div>
</div>
</div>
</div>
</div>
<!-- /.col-md-6 -->
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
<div class="p-3">
<h5>Title</h5>
<p>Sidebar content</p>
</div>
</aside>
<!-- /.control-sidebar -->
<?php include('footerr.php'); ?>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script type="text/javascript">
$(document).ready(function(){
$('#myModal_tache_all').on('show.bs.modal', function (e) {
var rowid = $(e.relatedTarget).data('id');
$.ajax({
type : 'post',
url : 'tache_ajax_nv_all.php', //Here you will fetch records
data : 'rowid='+ rowid, //Pass $id
success : function(data){
$('#fetch_tache_all').html(data);//Show fetched data from database
}
});
});
});
</script>
</body>
</html>
