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 (0705) :  /home/logmcpe/www/mcg/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/mcg/pages/profilprosepct9.php
<?php

include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
$pagemenu = basename($_SERVER["PHP_SELF"]) ;
// echo "<pre>" ;
// print_r($_GET) ;
// echo "</pre>" ;
// exit() ;



function get_lat_long($address){

    $address = str_replace(" ", "+", $address);

    /*$json = file_get_contents("https://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&key=AIzaSyC4HqZf-zANxtQqW0riYOrRKdrXvzMqCqM");
    $json = json_decode($json);

    $lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
    $long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};
    return $lat.','.$long;
*/


    $url = "https://maps.google.com/maps/api/geocode/json?key=AIzaSyC4HqZf-zANxtQqW0riYOrRKdrXvzMqCqM&address=".urlencode($address);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$responseJson = curl_exec($ch);
curl_close($ch);

$response = json_decode($responseJson);

if ($response->status == 'OK') {
    $latitude = $response->results[0]->geometry->location->lat;
    $longitude = $response->results[0]->geometry->location->lng;

   /* echo 'Latitude: ' . $latitude;
    echo '<br />';
    echo 'Longitude: ' . $longitude;
   */ return $latitude.','.$longitude;

} /*else {
    echo $response->status;
    var_dump($response);
} */
}



if(!empty($_GET['client_id']))
{
$_SESSION["client_id"]=$_GET['client_id'];

}
 $cleint_id=$_SESSION["client_id"] ;
$client_id = $_SESSION["client_id"] ;
$_SESSION["cleint_id"]= NULL ;


// exit() ;
			if($_GET['sup_tache_pospect']== 1)
{
	// echo "test" ;
	// exit() ;

	$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:profilprosepct9.php?msg= <strong> Bien : </strong>sous tache bien supprimé&color=success');

}


 // //////////////////// **********************************l'ajout d'une tache prospect ******************************************* ///////////////////////////////////

					  if($_POST['submitbtn']=="enregistrer")
			 {

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

 // echo "<pre>" ;
 // print_r($_POST) ;
 // echo "<pre>" ;
 $page="index.php";

 if(!empty($_POST['tache_date_fin']))
						{
 $tache_date_fin= dateformaint($_POST['tache_date_fin']) ;
						}
 // echo "==> $tache_date_fin <br/>" ;
 // exit() ;

		  $date_creation = date("Ymd");

						$tache_sujet= "Nouvelle demande de devis" ;

						// $tache_date_fin=$_POST['tache_date_fin'] ;

						$tache_Priorite=$_POST['tache_Priorite'] ;
						$salarie_id=$_POST['salarie_id'] ;
						// $client_id=$_POST['client_id'] ;
						// $user_id=$_SESSION['MCPRO']['user_id'] ;
						$user_id = $_SESSION['MCPRO']['login']['4'] ;
						$tache_designation=addslashes($_POST['tache_designation']) ;



					dbi_query(" INSERT INTO  tache (
					tache_sujet,
					tache_date_fin,
					tache_Priorite,
					salarie_id,
					client_id,
					user_id,

					date_creation,
					tache_prospect
 )
 VALUES
 (

 '$tache_sujet',
 '$tache_date_fin',
 '$tache_Priorite',
 '$salarie_id',
 '$client_id',
 '$user_id',

 '$date_creation',
 '1'

)") ;

list($tache_idd)=dbi_fetch_row(dbi_query("SELECT max(tache_id) FROM `tache`")) ;
header("Location:profilprosepct9.php?msg=tache bien ajouté&color=success&page=$page&rowid=$tache_idd");
			 }






  //////////////////////************************************** Modifer sous tache ***********************************************/////////////////////////////////////////

  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:profilprosepct9.php?msg= <strong> Bien : </strong> sous tache bien modifié&color=success');
  }


			 // if(!empty($_POST))
			 // {

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


			// exit() ;

			 // }


			 // ****************************************************** la partie contact ****************************************************************

			                   	if($_GET['action']=='sup')
	    {
			$contact_id=$_GET['id'];

	$sreussie=dbi_query("DELETE FROM ".contact." WHERE contact_id = $contact_id") ;

	 header('Location:profilprosepct9.php?msg=contact bien supprimé&color=success');


		}

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



		$contact_nom=addslashes($_POST['contact_nom']);
		$contact_pnom=addslashes($_POST['contact_pnom']);
		$contact_fonction=addslashes($_POST['contact_fonction']);
		$contact_tele1=addslashes($_POST['contact_tele1']);
		$contact_tele2=addslashes($_POST['contact_tele2']);
		$contact_email=addslashes($_POST['contact_email']);

				dbi_query(" UPDATE contact SET contact_nom = '$contact_nom', contact_pnom = '$contact_pnom',  contact_fonction = '$contact_fonction', `contact_tele1` = '$contact_tele1', contact_tele2 = '$contact_tele2', contact_email = '$contact_email' WHERE contact_id = ".$_POST['contact_id']);

		header('Location:profilprosepct9.php?msg=contact bien Modifié&color=success');
		}





			 $qq =dbi_query("SELECT * FROM `categorie`") ;


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

		 // echo "$cleint_id <br/>" ;
                       $contact_nom=$_POST['contact_nom'] ;
					    $contact_pnom=$_POST['contact_pnom'] ;
						$contact_fonction=$_POST['contact_fonction'] ;
						$contact_tele1=$_POST['contact_tele1'] ;
						$contact_tele2=$_POST['contact_tele2'] ;
						$contact_email=$_POST['contact_email'] ;


					dbi_query(" INSERT INTO  contact (
					contact_nom,
					contact_pnom,
					contact_fonction,
					contact_tele1,
					contact_tele2,
					contact_email,
					client_id
 )
 VALUES
 (

 '$contact_nom',
 '$contact_pnom',
 '$contact_fonction',
 '$contact_tele1',
 '$contact_tele2',
 '$contact_email',
 '$client_id'
)") ;

	header('Location:profilprosepct9.php?msg=contact bien ajouté&color=success');
		}



			 //***************************************************  ENd end partie contact end *************************************************************************









	                  //*****************************************************************modifier prosepecte **************************************************************************


																					 if($_POST['modifier_prospect']== "modifier_prospect")
																		 {
																			 // echo "bbb <br/>" ;
																			 // exit() ;


																					$societe=addslashes($_POST['societe']) ;
																					$id_Categorie=addslashes($_POST['cleint_categorie']) ;
																					$client_adr1=addslashes($_POST['adr1']) ;
																					$client_adr2=addslashes($_POST['adr2']) ;
																					$client_adr3=addslashes($_POST['adr3']) ;
																					$client_cp=$_POST['cp'] ;
																					$client_ville=addslashes($_POST['ville']) ;
																					$client_tele=$_POST['tele'] ;

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


																	 $latlong    =   get_lat_long($_POST['adr1']);
																	 $map        =   explode(',' ,$latlong);
																	 $mapLat         =   $map[0];
																	 $mapLong    =   $map[1];




																					dbi_query( " UPDATE client
															SET client_nom = '$societe', client_adr1 = '$client_adr1',
															  client_adr1 = '$client_adr1',
															  client_adr2 = '$client_adr2',
															  client_adr3 = '$client_adr3',
															  client_cp =   '$client_cp',
															  client_ville = '$client_ville',


															  categorie_id  = '$id_Categorie',
															  client_tele  = '$client_tele',

																latitude    ='$mapLat',
															  longitude	  ='$mapLong'
															WHERE client_id = $cleint_id ") ;

																$q= dbi_fetch_row(dbi_query("SELECT * FROM client where client_id = ".$cleint_id)) ;
																header('Location:profilprosepct9.php?msg=Prospect bien modifié&color=success');
																		 }

                         //*****************************************************************end **************************************************************************

  //***************************************************************************************  modifier document  **************************************************************************


if($_POST["Modifier_document"]== "Modifier_document"){
	 // echo "aa <br/>" ;
  if (!file_exists($_FILES['file']['tmp_name']) || !is_uploaded_file($_FILES['file']['tmp_name']))
  {


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

	// exit() ;



  $document_id=$_POST['document_id'] ;
	$document_nom=$_POST['document_nom'] ;





	// dbi_query("INSERT INTO document_client (

						// document_nom,
						// client_id,
						// document_visibilite,
						// date_document,
						// document_emplacement )

						// VALUES (

						// '$document_nom',
						// '$client_id',
						// '$document_visibilite',
						// '$date_document',
						// '$target_file'

					    // )") ;




						dbi_query("

						UPDATE document_client SET
						document_nom = '$document_nom',


                        client_id = '$client_id'
						WHERE document_id = '$document_id'

					    ") ;
						header('Location:profilprosepct9.php?msg=Document bien Modifié&color=success');
  }
  else
  {

	  				  				  $target_dir = "documents/clients/";
									  $document_id=$_POST['document_id'] ;

  $target_file = $target_dir."".$document_id."". basename(addslashes($_FILES["file"]["name"]));
  $uploadOk = 1;
  $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));


				 move_uploaded_file($_FILES["file"]["tmp_name"], $target_file) ;

				 // header("location: salarie_document.php?msg=Course added&color=success");


						$document_nom= addslashes($_POST['document_nom']) ;
						$document_visibilite=$_POST['document_visibilite'] ;







						dbi_query("

						UPDATE document_client SET
						document_nom = '$document_nom',
						document_emplacement = '$target_file' ,

                          client_id = '$client_id'
						WHERE document_id = '$document_id'

					    ") ;
						header('Location:profilprosepct9.php?msg=Document bien Modifié&color=success');
						// header("location: course.php");




  }
}









  //***************************************************************************************  l'ajout de document  **************************************************************************


function string2url($chaine) {
 $chaine = trim($chaine);
 $chaine = strtr($chaine, "A?A???а?в?????O?????ф???EEEEийклCз??II??опU?UUщ?ыь???","aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn");
 $chaine = strtr($chaine,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz");
 $chaine = preg_replace('#([^.a-z0-9]+)#i', '-', $chaine);
        $chaine = preg_replace('#-{2,}#','',$chaine);
        $chaine = preg_replace('#-$#','',$chaine);
        $chaine = preg_replace('#^-#','',$chaine);
 return $chaine;
}


	if (!is_dir("documents"))
	{
		mkdir("documents", 0755) ;
		chmod("documents", 0755) ;
	}
		if (!is_dir("documents/clients"))
	{
		mkdir("documents/clients", 0755) ;
		chmod("documents/clients", 0755) ;
	}
		if (!is_dir("documents/intervenants"))
	{
		mkdir("documents/intervenants", 0755) ;
		chmod("documents/intervenants", 0755) ;
	}

        $nomrep="documents/clients";
if($_POST["ajouter_document"]== "ajouter_document"){




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


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


	// exit() ;

	       list($document_id)=  dbi_fetch_row(dbi_query( "SELECT max(document_id) FROM `document_client`")) ;
		  $document_id= $document_id + 1 ;
				  $target_dir = "documents/clients/";
				  $date_document = date('Ymd');
  $target_file = $target_dir."".$document_id."". basename(addslashes($_FILES["file"]["name"]));
  $uploadOk = 1;
  $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));


				 move_uploaded_file($_FILES["file"]["tmp_name"], $target_file) ;

				 // header("location: salarie_document.php?msg=Course added&color=success");

						$document_nom=addslashes($_POST['document_nom']) ;
						$document_visibilite=$_POST['document_visibilite'] ;




						dbi_query("INSERT INTO document_client (

						document_nom,
						client_id,
						document_visibilite,
						date_document,
						document_emplacement )

						VALUES (

						'$document_nom',
						'$client_id',
						'$document_visibilite',
						'$date_document',
						'$target_file'

					    )") ;
						header('Location:profilprosepct9.php?msg=Document bien ajouté&color=success');



// $qa1 = dbi_query("SELECT client_nom,client_data FROM ".TABLE_CLIENT." WHERE  client_id=$client ") ;
// $a1=dbi_fetch_row($qa1);
// $data = unserialize($a1['client_data']);

// $nbre_data=count($data);
// $nb_min = 1;
// $nb_max = 10000;
// $nombre = mt_rand($nb_min,$nb_max);
// $client_nom=$a1['client_nom'];
// $desc="";
// if(!empty($_POST['desc']))
// $desc=$_POST['desc'];



// $date_doc = date('Ymd');
// $extension = strrchr($_FILES['doc']['name'], '.');

// $nom_doc=addslashes('client-'.$agence.'-'.$client_nom.''.$nombre.''.$extension.'');

// $nom_doc=string2url($nom_doc);

// if(empty($a1['client_data']))
// $client_data=array(array($nom_doc,$date_doc,$desc));
// else {
// $client_data=$data;
// array_push( $client_data,array($nom_doc,$date_doc,$desc));
// }

// if(move_uploaded_file($_FILES['doc']['tmp_name'] , "$nomrep/".$nom_doc.''))
// dbi_query("UPDATE ".TABLE_CLIENT." SET client_data='".addslashes(serialize($client_data))."' WHERE  client_id=$client ") ;
// else $erreur=true	;

	}



// echo "vvv <br/>" ;
if(isset($_GET['action']) && isset($_GET['id'])&& $_GET['action']=='sup_doc')
{
	// echo "vvvKKKK <br/>" ;
	// exit();
$id=$_GET['id'];
$qa1 = dbi_query("DELETE FROM document_client WHERE document_id = ".$id) ;

$a1=dbi_fetch_row($qa1);
	header('Location:profilprosepct9.php?msg=Document bien supprimé&color=success');

}

	?>





<!DOCTYPE html>
<html>

<head>

  <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <!-- Enregistrer le titre de la page --><title> LogMCPRO | Prospect</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">
    <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">
		<div class="wrapper">

			<nav class="main-header navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav">

            <li class="nav-item">
						<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
            </li>





          </ul>
      </nav>

      <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <a href="index3.html" class="brand-link">
        <img src="dist/img/logomcpro.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
        <span class="brand-text font-weight-light">MC PRO</span>
        </a>

            <div class="sidebar">
                <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                    <div class="image">
                        <img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
                    </div>
                        <div class="info">
                            <a href="#" class="d-block">Steeven ROBLOT</a>
                        </div>
                </div>

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

            </div>

        </aside>

<div  class="modal fade" id="myModal_modif_contact" 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="document_ajaxModifier" 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_document" ></div>
    </div>
  </div>
</div>

<div  class="modal fade" id="myModal_tache_prospect" 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_tch_prospect" ></div>
    </div>
  </div>
</div>

<div  class="modal fade" id="myModal_doc" 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_doc" ></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 TACHE</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 action="" method="POST">
													    <div class="form-row">

													        <div class="form-group col-md-6">
															        <label>Priorité </label>
															           <div class="input-group">
																	           <select class="form-control" name="tache_Priorite"  id="tache_Priorite">
																		<option value="-1" selected="selected" disabled="disabled">-Priorité-</option>
																		<option value="1" selected > Moyen </option>
																		<option value="2" > Haute </option>
																		<option value="3" > Urgente </option>
																	            </select>
															 </div>
														</div>

				<?php
				 $req =dbi_query("SELECT *  FROM `salarie` WHERE `salarie_statut` = '1' ORDER BY `salarie`.`salarie_nom` ASC") ;
				?>
													       <div class="form-group col-md-6"><!-- Liste déroulante jour -->
															       <label>Salarié </label>

															         <select class="form-control select2" style="width: 100%;" name="salarie_id">
															            <option value="-1" selected="selected" disabled="disabled">-Salarié-</option>
															<?php
															while(  $sal=dbi_fetch_row($req))
															{
															?>

																           <option value="<?php echo $sal['salarie_id'] ; ?>"  ><?php echo $sal['salarie_nom']." ".$sal['salarie_prenom']; ?></option>

																<?php
															}
															?>
															         </select>
														     </div>



													                  </div>
											                   </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" value="enregistrer" >Enregistrer</button>

												  </form>
												</div>
								</div>
							</div>
						</div>

				 <!-- *************************** modal cree  nouvelle  sous tache  ***************** -->

				       <div class="modal fade" id="modal-sousTACHE">
        <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`") ; 	?>



          <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>
         <?php  list($tache_id)=dbi_fetch_row(dbi_query("SELECT tache_id  FROM `tache` WHERE tache_prospect = 1 and client_id =  $client_id ")) ; ?>

                <input type="hidden" name="sous_tache_prospect_chef" value="sous_tache_prospect_chef">
				<input type="hidden" name="tache_idd" value="<?php echo $tache_id ; ?>">
				<input type="hidden" name="sous_tache_prespect" value="sous_tache_prespect">
				
				<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_sous_tache"  value="sous_tache" class="btn btn-primary">Enregistrer</button>

			  </form>
            </div>
          </div>
          <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
      </div>

 <!-- Ne pas toucher au dessus / fin de la BARRE DE NAVIGATION-->

 <!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-4">

              <?php $q= dbi_fetch_row(dbi_query("SELECT * FROM client where client_id = ".$cleint_id)) ;?>


              <div class="info-box bg-warning">
  							<span class="info-box-icon"><i class="fas fa-grin"></i></span>

  							<div class="info-box-content">

  								<span class="info-box-number"><?php echo $q['client_nom'] ; ?> </span>

  								<div class="progress">
  									<div class="progress-bar" style="width: 100%"></div>
  								</div>
  								<span class="progress-description">
  									<?php echo $q['client_adr1'] ; ?> -   <?php echo $q['client_cp'] ; ?>  <?php echo $q['client_ville'] ; ?>
  								</span>
  							</div>
  						</div>

  						</div>
          <div class="col-sm-8">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="index9.php">Accueil</a></li>
              <li class="breadcrumb-item"><a href="prospect9.php">Prospects</a></li>
              <li class="breadcrumb-item active"><?php echo $q['client_nom'] ; ?> </li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>




		    <!-- ------------------------mo dal nouveau contact *****************- -->
		 <div class="modal fade" id="modal-nouveaucontact">
        <div class="modal-dialog modal-lg">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">Nouveau Contact</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">

  <!-- ///////Ligne Nom -->
  <form method="POST" action="">

  <div class="form-group">
    <label for="inputcontact_nom">Nom</label>
    <input type="text" class="form-control" id="inputcontact_nom"  name="contact_nom" placeholder="Nom">
  </div>

  <!-- ///////Ligne Prénom -->

  <div class="form-group">
    <label for="inputcontact_prenom">Prénom</label>
    <input type="text" class="form-control" id="inputcontact_prenom"  name="contact_pnom" placeholder="Prénom">
  </div>

  <!-- ///////Ligne Fonction -->

  <div class="form-group">
    <label for="inputcontact_fonction">Fonction</label>
    <input type="text" class="form-control" id="inputcontact_fonction"  name="contact_fonction" placeholder="Fonction">
  </div>

  <!-- ///////Ligne tele1 -->

  <div class="form-group">
    <label for="inputcontact_tele1">Telephone</label>
    <input type="text" class="form-control" id="inputcontact_tele1"  name="contact_tele1" placeholder="Télephone">
  </div>

  <!-- ///////Ligne tele2 -->

  <div class="form-group">
    <label for="inputcontact_tele2">Telephone</label>
    <input type="text" class="form-control" id="inputcontact_tele2"  name="contact_tele2" placeholder="Télephone">
  </div>

  <!-- ///////Ligne email -->

  <div class="form-group">
    <label for="inputcontact_email">Email</label>
    <input type="text" class="form-control" id="inputcontact_email"  name="contact_email" placeholder="Email">
  </div>


            </div>
            <div class="modal-footer justify-content-between">
			  <input  name="ajouter_contact" type="hidden" value="ajouter_contact">
			  <input type="submit"  class="btn btn-primary" value="Enregistrer">
              <button type="button" class="btn btn-danger" data-dismiss="modal">Fermer</button>


            </div>
			  </form>
          </div>
          <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
      </div>





    <!-- PAGE PRINCIPALE -->
    <div class="content">
        <div class="row">
          <div class="col-12">
            <div class="card card-info">

<?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
        }
       ?>
 <!-- ----------------------------------*************************************************  la fiche prospect  ********************************************************** -------------- -->

							<div class="card-body">
									     <form action="" method="POST">


											 <div class="form-row">






											  </div> <!-- ///////Permet de passer à la ligne suivante -->

											 <!-- ///////Ligne hsociété & Catégorie -->

											  <div class="form-row"> <!-- champs Société -->
												<div class="form-group col-md-8">
												  <label for="inputsociete">Soci&eacute;t&eacute;</label>
												  <input type="text" class="form-control" id="inputsociete"  name="societe" placeholder="Société" value="<?=$q['client_nom'] ; ?>">
											   </div>

											   <div class="form-group col-md-4"><!-- Liste déroulante statut -->
															<label>Cat&eacute;gorie</label>
															<select class="form-control" name="cleint_categorie">
																	<?php
																	 $qq =dbi_query("SELECT * FROM `categorie`") ;
															while($cat = dbi_fetch_row($qq))
															{

															?>
																<option value="<?=$cat['categorie_id'] ?>"  <?php if($q['categorie_id']==$cat['categorie_id']) echo 'SELECTED'; ?> ><?=$cat['categorie_nom'] ?></option>
																<?
															}

															?>

															</select>
												</div>




											  </div> <!-- ///////Permet de passer à la ligne suivante -->


											<!-- ///////Ligne Adresse 1 -->

											  <div class="form-group">
												<label for="inputAddresse">Addresse</label>
												<input type="text" class="form-control" id="inputAddresse"  name="adr1" value="<?=$q['client_adr1'] ; ?>" >
											  </div>

											  <!-- ///////Ligne Adresse 2 -->
                        <div class="form-row">
											  <div class="form-group col-md-6">
												<label for="inputAddresse2">Addresse 2</label>
												<input type="text" class="form-control" id="inputAddresse2" name="adr2" value="<?=$q['client_adr2'] ; ?>" >
											  </div>

											  <!-- ///////Ligne Adresse 3 -->

											  <div class="form-group col-md-6">
												<label for="inputAddresse3">Addresse 3</label>
												<input type="text" class="form-control" id="inputAddresse3" name="adr3" value="<?=$q['client_adr3'] ; ?>">
											  </div>
                      </div>


											<!-- ///////Ligne Code Postal & Ville -->

											  <div class="form-row">
												<div class="form-group col-md-2">
												  <label for="inputcp">Code Postal</label>
												  <input type="text" class="form-control" name="cp" id="inputcp" value="<?=$q['client_cp'] ; ?>">
												</div>
												<div class="form-group col-md-5">
												  <label for="inputville">Ville</label>
												  <input type="text" class="form-control" name="ville" id="inputville" value="<?=$q['client_ville'] ; ?>" >
												</div>






												<div class="form-group col-md-5"><!-- Télephone -->
														   <div class="form-group">
												<label for="inputtel">T&eacute;l&eacute;phone</label>
												<input type="text" class="form-control" id="inputtel" name="tele" value="<?=$q['client_tele'] ; ?>"  >
											  </div>
												</div>




											  </div> <!-- ///////Permet de passer à la ligne suivante -->

											  <input  name="modifier_prospect" type="hidden" value="modifier_prospect">
											  <button type="submit" class="btn btn-primary"><i class="far fa-save"></i> Enregistrer</button>
									</form>
								</div>








  <!-- ----------------------------------*************************************************  la partie contact  ********************************************************** -------------- -->

																<?php
																 $qm = dbi_query("SELECT * FROM contact where  client_id = '$client_id'") ;

																?>


						<div class="card-body">

              <section class="content-header">
                <div class="container-fluid">
                  <div class="row mb-2">
                    <div class="col-sm-10">
                    <button type="button" class="btn btn-block btn-secondary">CONTACTS</button>
                    </div>
                    <div class="col-sm-2">

                        <button type="button" class="btn btn-block btn-primary" data-toggle="modal" data-target="#modal-nouveaucontact"><i class="fas fa-plus"></i> CONTACT</button>


                    </div>
                  </div>
                </div><!-- /.container-fluid -->
              </section>

							<table id="example1" class="table table-hover">
									<thead>
									   <tr>
											<th style="text-align:center;">Nom</th>     		<!-- /.Table Contact - Champs contact_nom -->
											<th style="text-align:center;">Fonction</th> 	<!-- /.Table Contact - Champs contact_fonction -->
											<th style="text-align:center;">Tél. 1</th>	<!-- /.Table Contact - Champs contact_tel1 -->
											<th style="text-align:center;">Tél 2</th>	<!-- /.Table Contact - Champs contact_tel2-->
											<th style="text-align:center;">E-mail</th>		<!-- /.Table Contact - Champs contact_email-->
											<th></th>
									   </tr>
									</thead>
											<tbody>


											<?php while($q=dbi_fetch_row($qm)){ ?>
											<?php
											 $chaine =  $q['contact_nom']." ". $q['contact_pnom'] ;
											 ?>
											<tr>
										<td style="text-align:center;"><?php echo $chaine ?></td>

										<td style="text-align:center;"><?php echo $q['contact_fonction'] ; ?></td>
										<td style="text-align:center;"><?php echo $q['contact_tele1'] ; ?></td>
										<td style="text-align:center;"><?php echo $q['contact_tele2'] ; ?></td>
										<td style="text-align:center;"><?php echo $q['contact_email'] ; ?></td>


										  <TD align="center" nowrap>
							  <?php echo '<a class="btn btn-info btn-sm" href="#myModal_modif_contact"  id="custId" data-toggle="modal" data-id="'.$q['contact_id'].'"><i class="fas fa-pencil-alt"> Editer</i> </a>';?>



							 </a>







							   <a class="btn btn-danger btn-sm" href="?action=sup&id=<?=$q['contact_id']?>"  onclick="return confirm('Voulez-vous vraiment supprimer ce contact ?');">

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

											   </a>

							  </TD>


											</tr>

											<?php }?>

											</tbody>

										  </table>

				 </div>









						<div class="card-body">

              <section class="content-header">
                <div class="container-fluid">
                  <div class="row mb-2">
                    <div class="col-sm-10">
                      <button type="button" class="btn btn-block btn-secondary">DOCUMENTS</button>

                    </div>
                    <div class="col-sm-2">

                        <button href="#myModal_doc"  id="custId" data-toggle="modal" type="button" class="btn btn-block btn-primary"><i class="fas fa-plus"></i> DOCUMENT</button>


                    </div>
                  </div>
                </div><!-- /.container-fluid -->
              </section>







<?php






$qa = dbi_query("SELECT * FROM document_client WHERE   client_id=$client_id  ") ;



?>
 <!-- ----------------------------------*************************************************  la partie Document  ********************************************************** -------------- -->

 <table id="example1" class="table table-hover">
    <thead>
        <tr>

			<th style="text-align:center;">Description</th>
			<th style="text-align:center;">Date de l'Upload</th>
			<th style="text-align:center;"></th>
		</tr>
    </thead>
    <tbody>
		<?php

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

				$nomrepp=$docc['document_emplacement'];

				// echo "==> $nomrep <br/>" ;

		?>
	<tr>

		<td style="text-align:center;"><?=$docc['document_nom']?></td>
		<td style="text-align:center;"><?=int2date($docc['date_document'])?></td>

		<td align="center" nowrap>

      <a class="btn btn-primary btn-sm"  href="<?=$nomrepp?>" target="_blank"><i class="fas fa-file"> Voir</i> </a>



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



							 </a>


		<a href="profilprosepct9.php?doc=cl&action=sup_doc&id=<?=$docc['document_id']?>" onclick="return confirm('Voulez-vous vraiment supprimer ce document ?');" class="btn btn-danger btn-sm"> <i class="fas fa-trash"> Supprimer</i>         </a>  </td>
	</tr>
		<?php }
		echo '</tbody>' ;
		echo '</table>';


		?>



						</div>






 <!-- ****************************************************************** ----  partie tache ---   *********************************************************** -->





                             							<div class="card-body">

                                            <section class="content-header">
                                              <div class="container-fluid">
                                                <div class="row mb-2">
                                                  <div class="col-sm-10">
                                                    <button type="button" class="btn btn-block btn-secondary">TACHES</button>

                                                  </div>
                                                  <div class="col-sm-2">

                                                    <?php
                                                     list($nbr_tache)=dbi_fetch_row(dbi_query("SELECT count(tache_id) as nbr_tache  FROM `tache` WHERE `tache_prospect` = 1 and client_id =  $client_id ")) ;
                                                     if($nbr_tache > 0 ){
                                                     ?>
                                                    <button type="button" class="btn btn-block btn-primary" data-toggle="modal" data-target="#modal-sousTACHE"></i><i class="fas fa-plus"></i> ACTION</button>
                                                     <?php }else{ ?>
                                                    <button type="button" class="btn btn-block btn-primary" data-toggle="modal" data-target="#modal-tache"><i class="fas fa-plus"></i> TACHE</button>
                                                      <?php }?>


                                                  </div>
                                                </div>
                                              </div><!-- /.container-fluid -->
                                            </section>


                    <table id="example1" class="table table-hover">
										    <thead>
										       <tr>
										         <th>Statut</th>
										         <th>Désignation</th>
										         <th>Date</th>
											       <th>Pour</th>
										         <th></th>
                          </tr>
										    </thead>
										    <tbody>
										<?php
											// puisque chaque client a une seule tache de type recouvrement donc on peut avoir l'id de cette tache
										list($tache_id)=dbi_fetch_row(dbi_query("SELECT tache_id  FROM `tache` WHERE `tache_prospect` = 1 and client_id =  $client_id ")) ;

										// echo "==>".$tache_id."<br/>" ;
									   if(!empty($tache_id)){
										$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."'> A faire </span>" ;
								}
								else{

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

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

											?>

										<tr>
										 <td><?=$sous_tache_status?></td>
                     <td><?="<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_tache_prospect"  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="profilprosepct9.php?sous_tache_id=<?=$soustache['sous_tache_id']?>&sup_tache_pospect=1" onclick="return confirm('Voulez-vous vraiment supprimer ce sous tache ?');">

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

										   </a>
										   </td>


										</tr>

											<?php
										}
										?>




										</tbody>

									  </table>
							</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 -->
  <footer class="main-footer">
    <div class="float-right d-none d-sm-block">
      <b>Version</b> 3.0.1
    </div>
    <strong>Copyright &copy; 2014-2019 <a href="http://adminlte.io">AdminLTE.io</a>.</strong> All rights
    reserved.
  </footer>

  <!-- 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>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>

<script>
  $(function () {
    // Summernote
    $('.textarea').summernote()
  }) ;



  $(document).ready(function(){
    $('#myModal_doc').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'ajaxAjoutDocument.php', //Here you will fetch records
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch_doc').html(data);//Show fetched data from database
            }
        });
     });
});

</script>
</body>


<script type="text/javascript">
$(document).ready(function(){
    $('#myModal_modif_contact').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'ajaxModifierContact.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(){
    $('#document_ajaxModifier').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'document_ajaxModifier.php', //Here you will fetch records
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch_document').html(data);//Show fetched data from database
            }
        });
     });
});


</script>


<script type="text/javascript">
$(document).ready(function(){
    $('#myModal_tache_prospect').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_tch_prospect').html(data);//Show fetched data from database
            }
        });
     });
});


</script>
</body>
</html>

AnonSec - 2021