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/TEST/../MC/factures/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/../MC/factures/../f_route.php
<?php
// lllk
include 'includes/config_tmcpro2.php' ;
include 'includes/stable_functions_tmcpro.php' ;


// error_reporting(E_ALL); 
// ini_set("display_errors", 1); 

if(!empty($_POST)){
	
	echo "<pre>" ; 
	print_r($_POST) ;
	echo "</pre>" ; 
	
}

$R=dbi_query("SELECT client_id id, concat(client_nom, ' ', client_pnom) civ, IF(client_genre='SERENA',1,0) as serena, IF(client_genre='FORMATION',1,0) as formation FROM ".TABLE_CLIENT." where agence_id=$agence  ");
$CLIENTS=array();
	while($cl = dbi_fetch_row($R))
	{
			$CLIENTS []=$cl['id'];
	}
// print_r($CLIENTS);
function jour_jouren2($jour,$get)
{
	static $presta_jour ;
	$from = $get ;
 $presta_jour = array('nynnnnn' => $get, 'nnynnnn' => date("Ymd", strtotime("+1 day", strtotime($from))), 'nnnynnn' => date("Ymd", strtotime("+2 day", strtotime($from))), 'nnnnynn' => date("Ymd", strtotime("+3 day", strtotime($from))), 'nnnnnyn' => date("Ymd", strtotime("+4 day", strtotime($from))), 'nnnnnny' => date("Ymd", strtotime("+5 day", strtotime($from))), 'ynnnnnn' => date("Ymd", strtotime("+6 day", strtotime($from)))) ;
 return $presta_jour[$jour] ;
}
function get_prest_sejm( $interdispo,$from ,$to,$agence,$CLIENTS)
{
$id=0;
	  $p=array();
$db=debutsem(date('Y', strtotime($from)),date('m', strtotime($from)),date('d', strtotime($from)));
$dbto=debutsem(date('Y', strtotime($to)),date('m', strtotime($to)),date('d', strtotime($to)));
$fin=date('Ymd',int2time($dbto)+6*24*3600 );
while($db < $fin )
	{
	$and = date('Ymd',int2time($db)+6*24*3600 );
	$presta_jour1 = array('nynnnnn' => '1', 'nnynnnn' => '2', 'nnnynnn' => '3', 'nnnnynn' => '4', 'nnnnnyn' => '5', 'nnnnnny' => '6', 'ynnnnnn' => '0')  ;
$presta_jour2 = array('1' => 'nynnnnn', '2' => 'nnynnnn', '3' => 'nnnynnn', '4' => 'nnnnynn', '5' => 'nnnnnyn', '6' => 'nnnnnny', '0' => 'ynnnnnn')  ;



	// echo " --->  $db // $and \n ";
	$q2 = dbi_query("SELECT p.* FROM ".TABLE_PREST." p, ".TABLE_CLIENT." c WHERE p.client_id=c.client_id and p.agence_id=$agence AND ((presta_date_debut <= $db) OR (presta_jour = 'nnnnnnn' OR  presta_jour is NULL))  AND  presta_date_debut < $and AND (p.presta_date_fin >= $db OR p.presta_date_fin >= $and OR p.presta_date_fin IS NULL) ");
	// $q2 = dbi_query("SELECT p.* FROM ".TABLE_PREST." p, ".TABLE_CLIENT." c WHERE p.client_id=c.client_id and p.agence_id=$agence AND presta_date_debut <= $and AND (p.presta_date_fin >= $db OR p.presta_date_fin IS NULL) ");
	// $q2 = dbi_query("SELECT * FROM ".TABLE_PREST." p where p.client_id=".$clien['client_id']." AND p.agence_id=$agence AND presta_date_debut < $to AND (p.presta_date_fin >= $from  OR p.presta_date_fin >= $to OR p.presta_date_fin IS NULL) ");
	while($prest = dbi_fetch_row($q2))
	{
	if($prest['presta_jour']== 'nnnnnnn' || $prest['presta_jour']== '' || $prest['presta_jour']== NULL )
	$prest['presta_jour']=$presta_jour2[date("w",strtotime($prest['presta_date_fin']))];
	
		$data = array('jour' => $prest['presta_jour'], 'deb' => $prest['presta_Hdeb'], 'duree' => $prest['presta_Hduree'], 'inter' => $prest['inter_id'], 'taux' => $prest['presta_forfait']) ;
		// $q1 = dbi_query("SELECT * FROM ".TABLE_PRESTA_MODIF." WHERE presta_id = ".$prest['presta_id']." order by `start`, `date`") ;
		$q1 = dbi_query("SELECT * FROM ".TABLE_PRESTA_MODIF." WHERE presta_id = ".$prest['presta_id']." AND start <= $and  order by `start`, `date`") ;
	
		
	// echo $prest['presta_jour'].' !! ';
		while (($m = dbi_fetch_row($q1)) )
		{
			$jour = $m['jour'] === NULL ? $data['jour'] : $m['jour'] ;
				$date=jour_jouren2($jour,$db);
			 if($date>=$m['start']) {
			  // if($m['start'] <= $to)
			 // {
				$data['jour'] = $m['jour'] === NULL ? $data['jour'] : $m['jour'] ;
				$data['deb'] = $m['Hdeb'] === NULL ? $data['deb'] : $m['Hdeb'] ;
				$data['duree'] = $m['Hduree'] === NULL ? $data['duree'] : $m['Hduree'] ;
				$data['inter'] = $m['inter_id'] === NULL ? $data['inter'] : $m['inter_id'] ;
				$data['taux'] = $m['taux'] === NULL ? $data['taux'] : $m['taux'] ;
			 }
		}
$jour=$data['jour'];
// echo $jour.' ++++ ';
	if (in_array($data['inter'], $interdispo))   {
	$heurefin=addDuree($data['deb'],$data['duree']);
	// $qexcept=dbi_query("SELECT * FROM ".TABLE_EXCEPT." WHERE (date BETWEEN ".$from." AND ".$to.") AND date <= ".jour_jouren2($presta_jour1[$jour],$from)." AND presta_id=".$prest['presta_id']." ");	
	$qexcept=dbi_query("SELECT * FROM ".TABLE_EXCEPT." WHERE (date BETWEEN ".$db." AND ".$and.") AND presta_id=".$prest['presta_id']." ");	
	
	if($rr = dbi_fetch_row($qexcept)){
		}
		else{
		if (in_array($prest['client_id'], $CLIENTS))
		{
		// echo "!! ".$data['jour']." / $db !!";
$presta=array("presta_id" => $prest['presta_id'],"presta_desc" => $prest['presta_desc']	,	"presta_date_debut" => $prest['presta_date_debut']	,	"presta_Hdeb" => $data['deb']	,	"presta_Hduree" => $data['duree']	,	"presta_recur" => $prest['presta_recur']	,	"presta_date_fin" => $prest['presta_date_fin']	,	"presta_jour" => $jour	,	"presta_forfait" => $prest['presta_jour']	, 	"presta_forfaitHT" => $prest['presta_forfaitHT'],	"presta_status" => $prest['presta_status']	,	"presta_sem" => $prest['presta_sem']	,	"client_id" => $prest['client_id']	,	"inter_id" => $data['inter']	,	"agence_id" =>	$prest['agence_id'],	"date" =>	jour_jouren2($jour,$db));

	$p[$id]=	$presta;
			++$id;
			}
				// array_push($p['id'],$id);
				// array_push($p['deb'],$data['deb']);
				// array_push($p['fin'],$heurefin);
				// array_push($p['cli'],$prest['client_id']);
				// array_push($p['duree'],$data['duree']);
				// array_push($p['jour'],$data['jour']);
				// array_push($p['inter'],$data['inter']);
}
	 }

	}
	// $inters[$db]=$inter;
	// echo " ++ $db ---> $and // ";
	// get_prest_sem( $interdispo ,$interjour, $inters[$db],$db ,$agence);
	// $db = date('Ymd',int2time($db)+7*24*3600 );
	$db = time2int(add_day(int2time($db),7) );
	}
// $to = time2int(int2time($from)+6*24*3600) ;
// echo " $from --> $to // "
		// echo " !!!!!!!!!!!!!!!!! ";
		// echo '<pre>';
	// print_r($p);
	// echo '</pre>';
	return $p;
	
	/*for( $numint=0 ; $numint < count($inters) ; $numint++ )
		{
		$inters[$numint]['presta']=array();
		// echo $inters[$numint]['id'].' +++ ';
			$interv=$inters[$numint]['id'];	
			$heures_contrat='';
			$total=0;			
			for ( $j = 0 ; $j < count($p['id']);$j++)
				{
				if($p['inter'][$j]==$interv )
				{
			
					if(	in_array($p['jour'][$j], $jourdispo))
					{
						// echo '  +++++++ '.$p['jour'][$j].' ! ';
				// print_r($jourdispo);
					// echo '  +++++++ '.$p['jour'][$j];
						$debP=$p['deb'][$j];
						$finP=$p['fin'][$j];
						$client_idP=$p['cli'][$j];
						$jourP=$presta_jour1[$p['jour'][$j]];
						array_push($inters[$numint]['presta'],array( 'deb' => $debP, 'fin'=>$finP, 'cli' => array( '0' => $client_idP ),'jour'=>$jourP ));
					}
				$total+=$p['duree'][$j];
				}
				}
$heures_contrat=0;
$sql="SELECT contrat_heure FROM ".TABLE_CONTRAT." WHERE inter_id = ".$interv." AND agence_id = ".$agence." AND contrat_debut<=".$from." AND ( contrat_fin IS NULL OR contrat_fin >".$from." ) ORDER BY contrat_debut DESC";
list($heures_contrat)=dbi_fetch_row(dbi_query($sql));
				$inters[$numint]['total']=$total/60;
				$inters[$numint]['hcontrat']=$heures_contrat;
		}*/

}








function count_week_days($__date_from, $__date_to, $__holidays_between=array(), $__weekend_days=array()) {
   $total_days_count = $__date_to > $__date_from ? round(($__date_to - $__date_from)/(24*3600)) : 0;
   $full_weeks_count = floor($total_days_count/7);
   $weekend_days_count = $full_weeks_count*count($__weekend_days);
   $days_left_uncovered = $total_days_count - $full_weeks_count*7;
   for($i = 0; $i < $days_left_uncovered; $i++) {
      $date_to_check = $i ? strtotime("+{$i} day", $__date_from) : $__date_from;
      if(in_array(date('N', $date_to_check), $__weekend_days)) {
         $weekend_days_count++;
      }
   }
   $week_days_count = $total_days_count - $weekend_days_count - count($__holidays_between);
   return $week_days_count;
}
function daysfr ($value = 0)
{
$tab = array(0 => 'Dimanche', 1 => 'Lundi',  2 => 'Mardi', 3 => 'Mercredi', 4 => 'Jeudi', 5 => 'Vendredi', 6 => 'Samedi');
	 return $tab[$value];
}
// exit() ; 
function get_prest_sem( $IN,$from ,$to)
{
		$end   = dateformaint($to) ;
		$date  = dateformaint($from);
		$p = array();

		while ($date <= $end )
			{
				// $q = dbi_query("SELECT * FROM PRESTATIONS p where p.client_id  ".$IN." AND presta_date_debut <= $date AND (p.presta_date_fin >= $date OR p.presta_date_fin IS NULL) ");
				$q = dbi_query("SELECT * FROM PRESTATIONS p where p.client_id  ".$IN." AND presta_date_debut <= $date AND (p.presta_date_fin >= $date OR p.presta_date_fin IS NULL) AND ( p.presta_recur IS NULL OR p.presta_recur NOT IN ( SELECT presta_id FROM PRESTATIONS where client_id  ".$IN." AND presta_date_fin < $date ) ) ");
				while($prest = dbi_fetch_row($q))
					{
						 
						$date_presta_sem = $prest['presta_date_debut'] ;
						$q1 = dbi_query("SELECT * FROM PRESTATIONS_MODIF WHERE presta_id = ".$prest['presta_id']." AND start <= ".$date."  order by start, modif_id ") ;
						while ( $m = dbi_fetch_row($q1) )
						{
							if( $m['presta_sem'] != NULL ) $date_presta_sem = $m['start'];

							$prest['presta_sem'] = $m['presta_sem'] === NULL ? $prest['presta_sem'] : $m['presta_sem'] ;
							$prest['presta_jour'] = $m['presta_jour'] === NULL ? $prest['presta_jour'] : $m['presta_jour'] ;
							$prest['presta_Hdeb'] = $m['presta_Hdeb'] === NULL ? $prest['presta_Hdeb'] : $m['presta_Hdeb'] ;
							$prest['presta_Hduree'] = $m['presta_Hduree'] === NULL ? $prest['presta_Hduree'] : $m['presta_Hduree'] ;
							$prest['salarie_id'] = $m['salarie_id'] === NULL ? $prest['salarie_id'] : $m['salarie_id'] ;
							$prest['chantier_id'] = $m['chantier_id'] === NULL ? $prest['chantier_id'] : $m['chantier_id'] ;
							$prest['presta_forfait'] = $m['presta_forfait'] === NULL ? $prest['presta_forfait'] : $m['presta_forfait'] ;
						}
						// echo "<pre>" ;
						// print_r($p) ;
						// echo "</pre>" ;
						// echo "===========+++++++++++++++++++++++++++++++++++++++++++++++++++++======================== <br/>" ; 
						$day = date("w", strtotime( int2date_autre_format($date)));
							if( $day == $prest['presta_jour'] OR  ( $date == $prest['presta_date_debut'] &&  $prest['presta_date_debut']	== $prest['presta_date_fin'] ) ){
								// echo "SELECT date_presta FROM EXCEPTIONS WHERE presta_id = ".$prest['presta_id']." AND date_presta = ".$date." <br>";
								$EXP = dbi_fetch_row(dbi_query("SELECT * FROM EXCEPTIONS WHERE presta_id = ".$prest['presta_id']." AND date_presta = ".$date." " )) ;	   ;
								
									if($EXP ){
										$heurefin = addDuree($prest['presta_Hdeb'], $prest['presta_Hduree']);
										// echo $EXP." ^D^^^^";
											if( $EXP['new_presta_id'] != NULL	&& $EXP['en_cours'] == '1')
										{
											// if($EXP['ad'] == '1')
												// echo $EXP['presta_id']." +++++++++++ ";
											// elseif($EXP['ded'] == '1')
												// echo $EXP['presta_id']." ------- ";
											// echo '<br>'.$date.' <> '.$EXP['facture']." ++++ ".$EXP['ad']."<br>";
											// echo $EXP['facture']." ------- ".$EXP['des'];
												if($EXP['ad'] == '1' && $EXP['facture'] == '1')
														$p[] = array('id' => $prest['presta_id'],'excpt_id' => $EXP['excpt_id'],'idchantier' => $prest['chantier_id'],'idclient' => $prest['client_id'],'nbH' => '','taux' => $prest['presta_forfait'],'tauxHT' => '','type' => 'add','date' => $date,'jour' => $prest['presta_jour'],'deb' => $prest['presta_Hdeb'],'duree' => $EXP['Hduree'],'change' => 1,'fin' => $heurefin) ;
												elseif($EXP['ded'] == '1' &&  $EXP['facture'] == '1')
														$p[] = array('id' => $prest['presta_id'],'excpt_id' => $EXP['excpt_id'],'idchantier' => $prest['chantier_id'],'idclient' => $prest['client_id'],'nbH' => '','taux' => $prest['presta_forfait'],'tauxHT' => '','type' => 'ded','date' => $date,'jour' => $prest['presta_jour'],'deb' => $prest['presta_Hdeb'],'duree' => $EXP['Hduree'],'change' => 1,'fin' => $heurefin) ;
												elseif($EXP['ded'] == '1' &&  $EXP['facture'] == "")
														$p[] = array('id' => $prest['presta_id'],'excpt_id' => $EXP['excpt_id'],'idchantier' => $prest['chantier_id'],'idclient' => $prest['client_id'],'nbH' => '','taux' => $prest['presta_forfait'],'tauxHT' => '','type' => 'ded','date' => $date,'jour' => $prest['presta_jour'],'deb' => $prest['presta_Hdeb'],'duree' => $EXP['Hduree'],'change' => 1,'fin' => $heurefin ,'deduire' => 'non') ;


										}
											// elseif ( $EXP['new_presta_id'] == NULL && $EXP['facture'] != '1') j'ai(DSI) commenté ce code pour je puisse affiche les deux exceprtion (prstation) factuté et non facturé 
											elseif ( $EXP['new_presta_id'] == NULL)
										{
											// echo " $date >= $from  && $date <= $to " ;
											// if( $date >= $from  && $date <= $to )
												$p[] = array(
												'id' => $prest['presta_id'],
												'excpt_id' => $EXP['excpt_id'],
												'idchantier' => $prest['chantier_id'],
												'idclient' => $prest['client_id'],
												'nbH' => '',
												'taux' => $prest['presta_forfait'],
												'tauxHT' => '',
												'type' => 'e2',
												'date' => $date,
												'jour' => $prest['presta_jour'],
												'deb' => $prest['presta_Hdeb'],
												'duree' => $prest['presta_Hduree'],
												'facture' => $EXP['facture'],
												'fin' => $heurefin) ;
										}
										// elseif( $EXP['new_presta_id'] == NULL){

												// $p[] = array('id' => $prest['presta_id'],'excpt_id' => $EXP['excpt_id'],'idchantier' => $prest['chantier_id'],'idclient' => $prest['client_id'],'nbH' => '','taux' => $prest['presta_forfait'],'tauxHT' => '','type' => 'e2','date' => $date,'jour' => $prest['presta_jour'],'deb' => $prest['presta_Hdeb'],'duree' => $EXP['Hduree'],'change' => 1,'fin' => $heurefin) ;

										// }






									} else {

										if( $prest['presta_sem'] == 1 )
										{
											$heurefin = addDuree($prest['presta_Hdeb'], $prest['presta_Hduree']);
												$p[] = array(
												'id' => $prest['presta_id'],
												'idchantier' => $prest['chantier_id'],
												'idclient' => $prest['client_id'],
												'nbH' => '',
												'taux' => $prest['presta_forfait'],
												'tauxHT' => '',
												'type' => 'p',
												'date' => $date,
												'jour' => $prest['presta_jour'],
												'inter' => $prest['salarie_id'],
												'deb' => $prest['presta_Hdeb'],
												'duree' => $prest['presta_Hduree'],
												'fin' => $heurefin) ;
										} elseif( $prest['presta_sem'] >0 ) {
										$nbre =count_week_days(strtotime(int2date_autre_format($date_presta_sem,'d.m.Y')), strtotime(int2date_autre_format($date,'d.m.Y')));
										$modolo = $nbre % $prest['presta_sem'] ;
										if( $modolo == 0)
											$heurefin = addDuree($prest['presta_Hdeb'], $prest['presta_Hduree']);
												$p[] = array(
												'id' => $prest['presta_id'],
												'idchantier' => $prest['chantier_id'],
												'idclient' => $prest['client_id'],
												'nbH' => '',
												'taux' => $prest['presta_forfait'],
												'tauxHT' => '',
												'type' => 'p',
												'date' => $date,
												'jour' => $prest['presta_jour'],
												'inter' => $prest['salarie_id'],
												'deb' => $prest['presta_Hdeb'],
												'duree' => $prest['presta_Hduree'],
												'fin' => $heurefin) ;
										}
									}
							}
					}
				$date =  date("Ymd", strtotime("+1 day", strtotime($date)));
			}


	return $p;
}








// if(!empty($_POST['11063facture'])){

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

// echo "-------------<br/>" ; 
// $inter = unserialize( base64_decode( $_POST["11063inter"] ) );
// echo "<pre>";
// print_r($inter ) ;
// echo "</pre>";
// exit() ; 
// }






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

if(isset($_POST['clients']) && !empty($_POST['clients']) && !empty($_POST['from']) && !empty($_POST['to']) && !empty($_POST['datefacture'])){
	
			// echo ' <br/>'."$client_id ,eeeeeeeeeee";
// echo '<pre>';
// print_r($_POST);
// echo '</pre>';
include 'includes/fch.php' ;
	// dateformaint($
$from=dateformaint($_POST['from']);
$to=dateformaint($_POST['to']);
$au=dateformaint($_POST['datefacture']);
$au1 = sprintf("%02d/%02d/%04d", substr($au, 6, 2), substr($au, 4, 2), substr($au, 0, 4)) ;
$prev=false;
$nb_prev=0;

	foreach ($_POST['clients'] as $client_id)
	{


// include 'includes/fch3.php' ;
		// echo ' <br/>'."$client_id ,";

$_POST['fact_format']='n';
$textf=NULL;
$somme=$_POST[$client_id.'total'];
$prev=false;
$nb_prev=0;
$facture = unserialize( base64_decode( $_POST[$client_id."facture"] ) );
$inter = unserialize( base64_decode( $_POST[$client_id."inter"] ) );
$numfact=dbi_query("SELECT * FROM ".TABLE_FACT." WHERE date_debut>=$from AND date_fin<=$to  AND client_id=$client_id ") ;
// echo "SELECT * FROM ".TABLE_FACT." WHERE date_debut>=$from AND date_fin<=$to  AND client_id=$client_id ";
// echo "SELECT * FROM ".TABLE_FACT." WHERE date_debut>=$from AND date_fin<=$to  AND client_id=$client_id AND agence_id=$agence";
$row_cnt = mysqli_num_rows($numfact);
if($row_cnt)
{

}
else
{
$fact_id=creerFactureCh($client_id,0,$from,$to,$f,$au1, $_POST['fact_format'], $prev, $cumul, $nb_prev, $textf,$facture,$somme,$inter);
// echo ' ************** ';
}



	}
	// $IN .= ' 0 ) ';
		// echo $client_id.'<br>';
		// $id = 0;


	// */

}
// echo '<pre>';
// print_r($_POST);
// echo '</pre>';
$where = '';
if(isset($_POST['mois']) && isset($_POST['annee'])){
// $where = "  AND client_id NOT IN ( SELECT client_id FROM ".TABLE_FACT." WHERE date_debut>='".$_POST['annee'].''.$_POST['mois'].'01'."' AND date_fin<='".date('Ymt', strtotime($_POST['annee'].'-'.$_POST['mois'].'-01'))."'  ) ";
}
if( !empty($_POST['from']) && !empty($_POST['to']) ){
// $where = "  AND client_id NOT IN ( SELECT client_id FROM ".TABLE_FACT." WHERE date_debut>='".$_POST['from']."' AND date_fin<='".$_POST['to']."'  ) ";
}
// ECHO $where;
// $where = '';
$date = date('Y-m-01');
$annee = $year = date('Y');
$mois = $month = date('m');
if(isset($_POST['datefacture']))
$datefacture = $_POST['datefacture'];
else
$datefacture = date('Y-m-d');

$months = array(
     1 => 'Janvier',
     2 => 'Février',
     3 => 'Mars',
     4 => 'Avril',
     5 => 'Mai',
     6 => 'Juin',
     7 => 'Juillet',
     8 => 'Août',
     9=> 'Septembre',
    10=> 'Octobre',
    11 => 'Novembre',
    12 => 'Décembre'
);


if(isset($_POST['mois']) && isset($_POST['annee'])){
	$datecal = $_POST['annee'].'-'.$_POST['mois'].'-01';
	$annee = $_POST['annee'];
	$mois = $_POST['mois'];
}

// echo '<pre>';
// print_r($_POST);
// echo '</pre>';
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Edition des factures</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">
  <!-- daterange picker -->
  <link rel="stylesheet" href="../plugins/daterangepicker/daterangepicker.css">
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- Bootstrap Color Picker -->
  <link rel="stylesheet" href="../plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
  <!-- Tempusdominus Bbootstrap 4 -->
  <link rel="stylesheet" href="../plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- Select2 -->
  <link rel="stylesheet" href="../plugins/select2/css/select2.min.css">
  <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
  <!-- Bootstrap4 Duallistbox -->
  <link rel="stylesheet" href="../plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
  <!-- Theme style -->
  <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">
</head>
<body class="hold-transition sidebar-mini">


<div class="wrapper">
<!-- TOP MENU -->
<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></a>
                        </li>
                    <!-- liens TOP MENU GAUCHE-->
                 
                        </td>



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

<?php include('menu.php'); ?>
<div  class="modal fade" id="PrestUpt" 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="jalil" ></div>


							</div>
						</div>
</div>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->



    <!-- Main content -->
    <section class="content">
		<div class="container-fluid">

			<div class="row">
				<div class="col-lg-6 col-6">

				</div>
			
				
			</div>
			<div class="row">
				<!-- /.col -->
				<div class="col-md-12">
					<div class="card card-info" style='border:2px solid #17a2b8;'>
						<div class="card-header">
							<h3 class="card-title">Feuille de route </h3>
						</div>
						<!-- form start -->
						<form role="form" method='POST' action=''>
							<!-- /.card-header -->
							<div class="card-body" >
								<div class="row">
									<div class="col-12">
										<div class="form-group">
											<select class="duallistbox" multiple="multiple" style="height: 150px;" name="inter" id="client_ids[]">
														<?php   $req =dbi_query("SELECT * FROM salarie  WHERE 	salarie_statut = '1'  ORDER BY  salarie_nom ASC ") ;

																while(  $cli=dbi_fetch_row($req)) { ?>
																<option value="<?php echo $cli['salarie_id '] ; ?>" <?php if(in_array($cli['salarie_id'] , $_POST['inter'])) echo 'selected';?>><?php echo utf8_encode($cli['salarie_nom']); ?></option>
														<?php   }	?>
											</select>
										</div>
									</div>

									<div class="col-sm-3">
									  <div class="form-group">
											<label>Du :</label>
											<input type="date" class="form-control" data-inputmask-alias="datetime" data-inputmask-inputformat="dd/mm/yyyy" data-mask name="from" placeholder="jj/mm/aaaa"  >
									  </div>
									</div>
									<div class="col-sm-3">
										<div class="form-group">
											<label>Au : </label>
										<input type="date" class="form-control" data-inputmask-alias="datetime" data-inputmask-inputformat="dd/mm/yyyy" data-mask name="to" placeholder="jj/mm/aaaa"  >
										</div>
									</div>
									
									<div class="col-sm-3">
									  <div class="form-group"><label><br/></label>
										<button type="submit" class="btn btn-block bg-gradient-primary">Valider</button>
									  </div>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div> <!-- /.col -->
			</div><!-- /.row -->

	
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <footer class="main-footer">
    <div class="float-right d-none d-sm-block">
      <b>Version</b> 3.0.2
    </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>
<!-- Select2 -->
<script src="../plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.js"></script>
<!-- InputMask -->
<script src="../plugins/moment/moment.min.js"></script>
<script src="../plugins/inputmask/min/jquery.inputmask.bundle.min.js"></script>
<!-- date-range-picker -->
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Bootstrap Switch -->
<script src="../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- Page script -->
<script>
  $(function () {
$("#allcheck").click(function(){
    $('input:checkbox').not(this).prop('checked', this.checked);
});
	 var TOTALCA ="<?php echo number_format( $CATTC, 2, ',', ' ').'<sup> € </sup>';?>";
	$('#TOTALCA').html(TOTALCA);
	 var TOTALCAHT ="<?php echo number_format( $CAHT, 2, ',', ' ').'<sup> € </sup>';?>";
	$('#TOTALCAHT').html(TOTALCAHT);
    //Initialize Select2 Elements
    $('.select2').select2()

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })

    //Datemask dd/mm/yyyy
    $('#datemask').inputmask('dd/mm/yyyy', { 'placeholder': 'dd/mm/yyyy' })
    //Datemask2 mm/dd/yyyy
    $('#datemask2').inputmask('mm/dd/yyyy', { 'placeholder': 'mm/dd/yyyy' })
    //Money Euro
    $('[data-mask]').inputmask()

    //Date range picker
    $('#reservation').daterangepicker()
    //Date range picker with time picker
    $('#reservationtime').daterangepicker({
      timePicker: true,
      timePickerIncrement: 30,
      locale: {
        format: 'MM/DD/YYYY hh:mm A'
      }
    })
    //Date range as a button
    $('#daterange-btn').daterangepicker(
      {
        ranges   : {
          'Today'       : [moment(), moment()],
          'Yesterday'   : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
          'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
          'Last 30 Days': [moment().subtract(29, 'days'), moment()],
          'This Month'  : [moment().startOf('month'), moment().endOf('month')],
          'Last Month'  : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        },
        startDate: moment().subtract(29, 'days'),
        endDate  : moment()
      },
      function (start, end) {
        $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
      }
    )

    //Timepicker
    $('#timepicker').datetimepicker({
      format: 'LT'
    })

    //Bootstrap Duallistbox
    $('.duallistbox').bootstrapDualListbox()

    //Colorpicker
    $('.my-colorpicker1').colorpicker()
    //color picker with addon
    $('.my-colorpicker2').colorpicker()

    $('.my-colorpicker2').on('colorpickerChange', function(event) {
      $('.my-colorpicker2 .fa-square').css('color', event.color.toString());
    });

    $("input[data-bootstrap-switch]").each(function(){
      $(this).bootstrapSwitch('state', $(this).prop('checked'));
    });

  })
</script>
</body>
</html>

AnonSec - 2021