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/TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TMCPRO/pages/fetch_record.php
<?php
	// print_r($_GET);
	// print_r($_POST);
	// exit() ; 
// $userAnswer =z $_POST['name'];
// echo json_encode($userAnswer);



// $DateAndTime = date('m-d-Y h:i:s a', time());
// echo "The current date and time are $DateAndTime.";
$date_heure_creation = date('d-m-Y h:i:s', time());

$date_heure_fin_tach = date('d-m-Y h:i:s', time());
// echo "The current date and time are $DateAndTimee.";
// exit() ;


// if(!empty($_POST))
// {
	// echo "<pre>" ;
	// print_r($_POST);
	// echo "</pre>" ;
	// exit();
// }
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;

if(!empty($_POST['update_tache']))
{


$tache_sujet = addslashes($_POST['tache_sujet']) ;

$salarie_id = $_POST['salarie_id'] ;
$client_id = $_POST['client_id'] ;




dbi_query("UPDATE `tache` SET `client_id` = '$client_id ', `salarie_id` = '$salarie_id',
 `tache_sujet` = '$tache_sujet' WHERE `tache`.`tache_id` = ".$_POST['update_tache']) ;

	header("Location:fetch_record2.php?msg=Tache bien mofifié&color=success");

}


if($_POST['complete']=="complete")
{

	// echo "<pre>" ;
	// print_r($_POST) ;
	// echo "<pre>" ;
	$tache_id = $_POST['tache_id'] ;

             list($numbre) = dbi_fetch_row(dbi_query(" SELECT count(*) as numbre FROM `sous_tache` WHERE `tache_id` = $tache_id  and sous_tache_status = 0 ")) ;

			 // echo "====> $numbre <br/>" ;
			 if($numbre == 0)
			 {


	if($_POST['tache_status']==1)
	{
	$tache_status = 1 ;
	}
	else{$tache_status = 0 ; }
	dbi_query("UPDATE `tache` SET `tache_status` = '$tache_status' WHERE `tache`.`tache_id` = ".$tache_id ) ;

	header('Location:fetch_record2.php?msg= <strong> Bien : </strong>  Tache bien modifié&color=success');
			 }
			 else
			 {
			 // echo "  <br/>" ;
			 				 header("Location:fetch_record2.php?msg= <strong> Attention : </strong> l'opération echoué, il a des sous taches non complétés !!!!!!&color=danger");

			 }


}

if(!empty($_GET['page']))
{

 $_SESSION["page"]=$_GET['page'] ;
 $_SESSION["rowid"]=$_GET['rowid'] ;
}



// echo "<pre>" ;
// print_r($_GET);
// echo "</pre>" ;


// echo "<pre>" ;
// print_r($_SESSION);
// echo "</pre>" ;


// exit() ;


// exit() ;
  $page =   $_SESSION["page"] ;
  $tache_id =  $_SESSION["rowid"] ;
  $_POST['rowid'] = $_SESSION["rowid"] ;

  // echo "=================> ". $tache_id."<br/>" ;

  if(!empty($_POST['sous_tache_id']))
  {
	  // echo "bbbbbb <br/>" ;
// echo "<pre>" ;
// print_r($_POST);
// echo "</pre>" ;
// exit() ;


	 $sous_tache_designation=addslashes($_POST['sous_tache_designation']) ;
	 $sous_tache_status =  $_POST['sous_tache_status'] ;
	 $user_id = $_POST['user_id'] ;
	 $sous_tache_date_fin = $_POST['sous_tache_date_fin'] ;
	$sous_tache_id  = $_POST['sous_tache_id'] ;
$PRIORITAIRE = $_POST['PRIORITAIRE'];
	if($_POST['sous_tache_status'] == 0)
	{
		// echo "aaaa" ;
		// exit() ;


	dbi_query(" update sous_tache SET sous_tache_designation ='".$sous_tache_designation."', sous_tache_status ='".$sous_tache_status."', PRIORITAIRE ='".$PRIORITAIRE."', user_id = '".$user_id."',sous_tache_date_fin = '".$sous_tache_date_fin."' WHERE  sous_tache_id = '".$sous_tache_id."'");
	}
	 else{
		 // echo "bbb" ;
		// exit() ;
		 $user_id_fin_tache = $_SESSION['MCPRO']['login']['4'] ;
		 	$date_fin = date('Ymd');
	dbi_query(" update sous_tache SET sous_tache_designation ='".$sous_tache_designation."', sous_tache_status ='".$sous_tache_status."', PRIORITAIRE ='".$PRIORITAIRE."', user_id = '".$user_id."',sous_tache_date_fin = '".$sous_tache_date_fin."',date_heure_fin_tach = '".$date_heure_fin_tach."', user_id_fin_tache = '".$user_id_fin_tache."', date_fin = '".$date_fin."' WHERE  sous_tache_id = '".$sous_tache_id."'");
	 }

		// echo " update sous_tache SET sous_tache_designation ='".$sous_tache_designation."', sous_tache_status ='".$sous_tache_status."', user_id = '".$user_id."',sous_tache_date_fin = '".$sous_tache_date_fin."' WHERE  sous_tache_id = '".$sous_tache_id."'" ;
		// exit() ;

		header('Location:fetch_record2.php?msg= <strong> Bien : </strong> sous tache bien modifié&color=success');
  }





if($_GET['sup']== 1)
{


	$que =dbi_query(" SELECT * FROM sous_tache WHERE `sous_tache_id` = ".$_GET['sous_tache_id']) ;

	while($que_sup= dbi_fetch_row($que))
	{
	$tache_id = $que_sup['tache_id'] ;
	$user_id = $que_sup['user_id'] ;
	$sous_tache_designation = $que_sup['sous_tache_designation'] ;
	$sous_tache_date_fin = $que_sup['sous_tache_date_fin'] ;
	$sous_tache_status = $que_sup['sous_tache_status'] ;
	$date_creation = $que_sup['date_creation'] ;
	$date_heure_creation = $que_sup['date_heure_creation'] ;
	$date_heure_fin_tach = $que_sup['date_heure_fin_tach'] ;
	$user_id_fin_tache = $que_sup['user_id_fin_tache'] ;
	$user_id_creation = $que_sup['user_id_creation'] ;

	$date_sup = date('Ymd');
	$user_sup = $_SESSION['MCPRO']['login']['4'] ;
	$date_heure_sup = date('d-m-Y h:i:s', time());


	}


	dbi_query("INSERT INTO `sous_tache_sup` (`sous_tache_id`, `tache_id`, `user_id`, `sous_tache_designation`, `sous_tache_date_fin`, `sous_tache_status`, `date_creation`, `user_id_creation`,
	`date_heure_creation`, `date_heure_fin_tach`, `user_id_fin_tache`, `user_sup`, `date_sup`, `date_heure_sup`) VALUES
	('', '$tache_id', '$user_id', '$sous_tache_designation', '$sous_tache_date_fin', '$sous_tache_status', '$date_creation', '$user_id_creation',
	'$date_heure_creation', '$date_heure_fin_tach', '$user_id_fin_tache', '$user_sup', '$date_sup', '$date_heure_sup')");
	dbi_query("DELETE FROM `sous_tache` WHERE `sous_tache`.`sous_tache_id`  =".$_GET['sous_tache_id']) ;

			header('Location:fetch_record2.php?msg= <strong> Bien : </strong>sous tache bien supprimé&color=success');

}

if($_POST['ajout']== "ajout")
{

echo "<pre>" ;
print_r($_POST);
echo "</pre>" ;
exit() ;

$sous_tache_designation = addslashes ($_POST['sous_tache_designation']) ;
		    $sous_tache_date_fin = $_POST['sous_tache_date_fin'];
			$user_id = $_POST['user_id'];
			// $sous_tache_status = $_POST['sous_tache_status'][$index];
			$sous_tache_id = $_POST['sous_tache_id'][$index];
			$sous_tache_status  =  $_POST['sous_tache_status'];

			$today_p = date('Ymd');

	$res = dbi_query(" INSER INTO  sous_tache (tache_id,sous_tache_designation, sous_tache_date_fin,user_id, sous_tache_status,actif,date_creation,date_heure_creation)
				 VALUES  ('$tache_id','$sous_tache_designation','$sous_tache_date_fin','$user_id','$sous_tache_status','1','$today_p','$date_heure_creation')") ;
				 header('Location:fetch_record2.php?msg= <strong> Bien : </strong> sous tache bien ajouté&#233;&color=success');

}

// $res = dbi_query(" INSERT INTO  sous_tache (sous_tache_designation, sous_tache_date_fin,user_id, sous_tache_status,tache_id,actif)
				 // VALUES  ('$sous_tache_designation','$sous_tache_date_fin','$user_id','$sous_tache_status','$tache_id','1')") ;

if($_POST['rowid']) {
    $id = $_POST['rowid'];
	$q= dbi_query("SELECT * FROM tache t , users u where  t.`user_id` = u.`user_id` and t.tache_id =".$id."" );
	$cl=dbi_fetch_row($q);
	if($cl['tache_Priorite']== 1)
					{
						$tache_Priorite= "Moyen" ;
					}
					elseif($cl['tache_Priorite']== 2)
					{
						 $tache_Priorite= "Haute" ;
					}
					elseif($cl['tache_Priorite']== 3)
					{
					$tache_Priorite= "Urgente" ;
					}

					if($cl['salarie_id']!= 0)
					{

										list($salarie_nom , $salarie_prenom)= dbi_fetch_row(dbi_query("SELECT salarie_nom , salarie_prenom FROM `salarie` WHERE `salarie_id` = ".$cl['salarie_id'])) ;
					 $salarie_id=  $cl['salarie_id'] ;
					     $chain_salarie =  $salarie_nom." ".$salarie_prenom ;
						 $chain_salarie = "<a href='TacheSalarie.php?salarie_id=$salarie_id' >".$chain_salarie."</a>" ;
					}
					if(empty($salarie_nom) AND empty($salarie_prenom))
					{
						 $chain_salarie =  " <strong> N.C </strong>" ;

					}



					if($cl['client_id']<100) // pour identifier les prospect car on peut pas faire la diffrence entre les prospect et les clients
					{


					  list($client_nom)= dbi_fetch_row(dbi_query("SELECT prospect_nom   FROM `prospect` WHERE `prospect_id` = ".$cl['client_id'])) ;
					    $nom_de_client=$client_nom." (Prospect) " ;
					  $client_id=$cl['client_id'] ;

                    }
					else
					{

					  if($cl['client_id']!= 0)
					  {
					  list($client_nom)= dbi_fetch_row(dbi_query("SELECT client_nom   FROM `client` WHERE `client_id` = ".$cl['client_id'])) ;
					    $nom_de_client=$client_nom ;
					  $client_id=$cl['client_id'] ;
					  $client_nom = "<a href='profilclient.php?client_id=$client_id' >".$client_nom."</a>" ;
					  }
					  else
					  { $client_nom = " <strong> N.C </strong>"; }

				    }

				   $date_creation = $cl['date_creation'] ;
				   $userrr = $cl['user_nom']." ".$cl['user_prenom'] ;
				   // echo "==> $user <br/>" ;
}



?>

<html>

<head>

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


			</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>
		    <h3><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-tache"></i> NOUVELLE ACTION</button></h3>
		                            </li>

									&nbsp
									<li>
			<h3> <button type="button" class="btn btn-primary" href="#myModal3"  id="custId" data-toggle="modal" data-id="<?=$tache_id?>"></i> MODIFIER TACHE </button></h3>
                                    </li>



								   </ul>

							 <!-- liens TOP MENU DROITE -->


								<ul class="navbar-nav ml-auto">
								 <!-- 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>


<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 Action</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>


            <div class="modal-body">


               <div class="card-body">


     <form method="post" action="/pages/sms/send_message_sous_tache.php">
 <!-- ///////Ligne société & Catégorie -->
<!-- ///////Ligne -->
  <div class="form-row">

   <?php

      $today = date("Y-m-d");
	   // echo " $today <br/>" ;
   ?>

   <div class="form-group col-md-4">
      <label for="inputsociete">Date</label>

	<input type="date" class="form-control" id="end" name="sous_tache_date_fin" value="<?=$today?>">

   </div>






  				<?php $req_user =dbi_query("SELECT * FROM `users` where  etat = 1 ") ; 	?>



          <div class="form-group col-md-4">
      <label for="inputsociete" >Affecté à </label>

                    <!-- <input type="text" class="form-control"  name="number"  placeholder="jj/mm/aaaa"> -->

                      <select required="required" class="form-control select2" name="user_id">
				<option value="" selected="selected" disabled="disabled">-User-</option>
				<?php
				while(  $user=dbi_fetch_row($req_user))
				{
				?>

                    <option value="<?=$user['user_id']?>" ><?php echo $user['user_nom']." ".$user['user_prenom'];  ?></option>

					<?php
				}
				?>
                </select>



   </div>

    	<div class="form-group col-md-4"><!-- Liste déroulante établissement -->
                <label>Terminé</label>
				<div class="input-group">
                <select class="form-control" name="sous_tache_status">
				<option value="0"  > NON</option>
                 <option value="1"  > OUI</option>
                </select>
				</div>
    </div>











	  <div class="form-group col-md-4">
      <label>Prioritaire </label>
	  <div class="input-group">

                    <!-- <input type="text" class="form-control"  name="number"  placeholder="jj/mm/aaaa"> -->

                    <select class="form-control" name="PRIORITAIRE"  id="PRIORITAIRE">

                        <option value="0" selected > NON </option>
                        <option value="1" > OUI </option>

                    </select>
                  </div>

   </div>



   <div class="form-group col-md-4">
      <label>SMS </label>
	  <div class="input-group">

                    <!--
					il ma demandé de bolqué   les sms alors    <option value="0" > OUI </option>   au lieu <option value="1" > OUI </option>

					<input type="text" class="form-control"  name="number"  placeholder="jj/mm/aaaa"> -->

                    <select class="form-control" name="sms" id="sms">

                        <option value="0" selected > NON </option>
                        <option value="0" > OUI </option>


                    </select>
                  </div>

   </div>


	&nbsp;&nbsp;














              <div class="form-group col-md-12">

			  <label for="inputAddresse">Désignation</label>


			   <textarea class="" placeholder=""
                          style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;" name="sous_tache_designation"   ></textarea>



			  </div>






















  </div>

				<input type="hidden" name="client_nom" value="<?php echo $nom_de_client ; ?>">
			  <input type="hidden" name="ajout" value="ajout">

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






 <!-- 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  class="modal fade" id="myModal3" 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="fetch3" >
																					</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">
              <?php echo $_GET["msg"]; ?>
          <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <?php
        }
       ?>
					<div class="row">
						<div class="col-12">
							<div class="card">







									<div class="card-body">




		 <div class="col-lg-12">
            <!-- small box -->
            <div class="small-box bg-info">
              <div class="inner">
                <h3> <?php echo $cl['tache_sujet'] ;  ?></h3>
				<?php 	$tache_id = $cl['tache_id'] ;

             list($numbre) = dbi_fetch_row(dbi_query(" SELECT count(*) as numbre FROM `sous_tache` WHERE `tache_id` = $tache_id  and sous_tache_status = 0 ")) ;

			 // echo "====> $numbre <br/>" ;
			 if($numbre == 0)
			 {
			 ?>
				                                                     clôturer
																		<div class="custom-control custom-switch" >
																			  <input onclick="enableTxt(this)" onFocus="Complété" class="custom-control-input" type="checkbox" value="<?php echo $cl['tache_id'];?>" name="etat" id="todoCheck<?php echo $cl['tache_id'];?>" <?php if($cl['tache_status'] == 1 ) echo 'checked '; ?>>
																			  <label class="custom-control-label" for="todoCheck<?php echo $cl['tache_id'];?>"></label>
																		</div>

			 <?php }?>

                <p></p>
              </div>
              <div class="icon">

              </div>
              <a href="<?=$page?>" class="small-box-footer">Retour <i class="fas fa-arrow-circle-right"></i></a>


	   </div>
          </div>

<div class="modal-body">

 <form action="" method="POST">
   <div class="row">
   <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
              <span class="info-box-icon bg-info"><i class="fas fa-user-tie"></i></span>

              <div class="info-box-content">
                <span class="info-box-text">Client</span>
                <span class="info-box-number"><?php echo $client_nom ;  ?></span>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
          <!-- /.col -->
          <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
              <span class="info-box-icon bg-success"><i class="fas fa-id-card-alt"></i></span>

              <div class="info-box-content">
                <span class="info-box-text">Salarié</span>
                <span class="info-box-number"><?php echo $chain_salarie  ;  ?></span>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
          <!-- /.col -->
          <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
              <span class="info-box-icon bg-warning"><i class="fas fa-calendar-alt"></i></span>

              <div class="info-box-content">
                <span class="info-box-text">Créée le</span>
                <span class="info-box-number"> <?=int2date($date_creation)?></span>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
          <!-- /.col -->
          <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
              <span class="info-box-icon bg-danger"><i class="far fa-star"></i></span>

              <div class="info-box-content">
                <span class="info-box-text">Créée par</span>
                <span class="info-box-number"><?=$userrr?></span>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->






   </div>







</div>








													               <div class="card-body">
              <table id="example1" class="table table-hover">
                <thead>
                <tr>
                  <th>Terminée</th>     		<!-- /.Table Client - Champs client_nom -->
                  <th colspan="8" >Désignation</th>
				  <th></th>
					<th></th> 				  <!-- /.Table Client - Champs client_adr1 -->
                  	<!-- /.Table Client - Champs client_cp -->
				<th></th>
				<th></th>



                </tr>
                </thead>
                <tbody>
				<?php
				$qa= dbi_query("SELECT * FROM `sous_tache` WHERE tache_id =  ".$tache_id." ORDER BY `sous_tache`.`date_heure_creation_forma_date` DESC") ;

				// echo "SELECT * FROM `sous_tache` WHERE tache_id =  ".$tache_id." ORDER BY `sous_tache`.`sous_tache_date_fin` DESC" ;

				while($soustache=dbi_fetch_row($qa))
				{

	list($user_nom_crea, $user_prenom_crea)= dbi_fetch_row( dbi_query(" SELECT user_nom , user_prenom  FROM `users` WHERE `user_id`  = ".$soustache['user_id_creation'] ));
	$user_chaine_crea = $user_nom_crea." ".$user_prenom_crea ;

    list($user_nom, $user_prenom)= dbi_fetch_row( dbi_query(" SELECT user_nom , user_prenom  FROM `users` WHERE `user_id`  = ".$soustache['user_id'] ));

	$user_chaine = $user_nom." ".$user_prenom ;
	if($soustache['sous_tache_status']==0){
		$badge = 'badge-danger';
		$sous_tache_status="<span class='badge ".$badge."'> Non </span>" ;
		}
		else{

			$badge = 'badge-success';
		$sous_tache_status="<span class='badge ".$badge."'> Oui </span>" ;

			}
			// ."==>".$soustache['sous_tache_id']

					?>

					<tr>
                 <td><?=$sous_tache_status?></td>

                 <td colspan="8"><?="<strong>".$user_chaine_crea." : </strong> ".$soustache['sous_tache_designation'] ?></td>
				  <td><?= int2date(date2int_DSI($soustache['sous_tache_date_fin']))?></td>
				      <td><?=$user_chaine ?></td>

				 	<td align="center">

				   <?php echo '<a class="btn btn-info btn-sm" href="#myModal"  id="custId" data-toggle="modal" data-id="'.$soustache['sous_tache_id'].'"><i class="fas fa-pencil-alt"></i> </a>';?>

					  <a class="btn btn-danger btn-sm" href="fetch_record2.php?sous_tache_id=<?=$soustache['sous_tache_id']?>&sup=1" onclick="return confirm('Voulez-vous vraiment supprimer ce sous tache ?');">

				 <i class="fas fa-trash"></i>

				   </a>
				   </td>
				  <td> <?= $soustache['date_heure_creation'] ?></td>

                </tr>

					<?php
				}
				?>




                </tbody>

              </table>
            </div>







								    </div><!-- /.card-body -->
							    </div><!-- /.card card-primary card-outline -->
							</div> <!-- /.col-12 -->
						</div>  <!-- /.row -->
				</section> <!-- /.section -->




	</div>


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

<script src="../../plugins/summernote/summernote-bs4.min.js"></script>
<script>
  $(function () {
    // Summernote
    $('.textarea').summernote()
  })
</script>


<script type="text/javascript">
  $( document ).ready(function() {
	  // alert('OK');
    // $("#salarie_mutuelle").click(function () {
      // val=$(this).val();
      // if(val==1){
        // $("#end").prop('disabled', false);
      // }else{
        // $("#end").prop('disabled', true);
      // }

    // });

	$('#myModal1').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'suivi_sal_action.php', //Here you will fetch records
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch1').html(data);//Show fetched data from database
            }
        });
     });
	$('#myModal2').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
		var client_id= $(this).attr('client_id');
		// alert(rowid);
        $.ajax({
            type : 'post',
            url : 'suivi_sal_action_upt.php', //Here you will fetch records
            data :  'rowid='+ rowid+'&client_id='+client_id, //Pass $id
            success : function(data){
            $('#fetch2').html(data);//Show fetched data from database
            }
        });
     });



// if ($("#yourCheckboxID").is(":checked")) {
    // checkbox is checked
// } else {
    // checkbox is not checked
// }

});



function enableTxt(elem) {
    var id = $(elem).val();

	var c = 0;

if ( $(elem).prop( "checked" ) )
	c = 1;
        $.ajax({
            type : 'post',
            url : 'cloturer_tache.php', //Here you will fetch records
            data :  'id='+id+'&c='+c , //Pass $id
            success : function(data){
            // $('#fetch2').html(data);//Show fetched data from database
            }
        });
        // $.ajax({
            // type : 'post',
            // url : 'suivi_sal_action_etat.php', //Here you will fetch records
            // data :  'id='+id+'&c='+c ,//Pass $id
            // success : function(data){
            // $('#fetch2').html(data);//Show fetched data from database
            // }
        // });
    // alert(id);
}



</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 : 'jaxModifSousTache.php', //Here you will fetch records
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch').html(data);//Show fetched data from database
            }
        });
     });
});


</script>



<script type="text/javascript">
$(document).ready(function(){
    $('#myModal3').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'AjaxModifTache_fetch_record.php', //Here you will fetch records
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch3').html(data);//Show fetched data from database
            }
        });
     });
});


</script>

</body>
</html>

AnonSec - 2021