|
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/MC/includes/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include_once 'code/init.php';
// ini_set('display_errors','on');
// error_reporting(E_ALL);
?>
<html>
<body>
<?php
// exit() ;
// if( !empty($_POST))
// {
// echo "<pre>" ;
// print_r($_POST) ;
// echo "</pre>" ;
// exit() ;
// }
// echo "---> <br/>" ;
if(isset($_POST['contrat_datefin_essai_year']))
{
$from =date2int($_POST['contrat_date_day'],$_POST['contrat_date_month'],$_POST['contrat_date_year']) ;
$to =date2int($_POST['contrat_datefin_essai_day'],$_POST['contrat_datefin_essai_month'],$_POST['contrat_datefin_essai_year']) ;
if (!is_dir("templates"))
{
mkdir("templates", 0755) ;
chmod("templates", 0755) ;
}
if (!is_dir("templates/".$_POST['tmp']))
{
mkdir("templates/".$_POST['tmp'], 0755) ;
chmod("templates/".$_POST['tmp'], 0755) ;
}
include_once 'includes/tmp_absence_pdf.php' ;
// $contrat = dbi_fetch_row(dbi_query("SELECT * FROM ".TABLE_CONTRAT." WHERE inter_id=".$_POST['interv_id']." AND agence_id = $agence AND contrat_id='".$_POST['contrat_id']."' ORDER BY contrat_debut DESC")) ;
// $contrat_initial = dbi_fetch_row(dbi_query("SELECT * FROM ".TABLE_CONTRAT." WHERE inter_id=".$_POST['interv_id']." AND contrat_id='".$contrat['parent_id']."' AND agence_id = $agence ORDER BY contrat_debut DESC")) ;
// $h_ctjour='';
// $totheures=$contrat['contrat_heure'];
// for($i=0; $i<strlen($jourAg); $i++) {
// $nbh = $contrat['nbh_'.strtolower($lejour2[$i])];
// if($nbh!='') {
// $h_ctjour.=$lejour2[$i]." : ".$nbh."<ln></ln>";
// }
// }
include 'absencepdff.php';
$pdf = new Template ($from,$to,$agence);
$nompdf=$_POST['interv_id'];
$path = "templates/".$_POST['tmp']."/".$nompdf.".pdf";
$pdf->Output($path, 'F') ;
//header("Content-disposition: attachment; filename=".$_POST['tmp']."-$nom_inter-".$_POST['contrat_id'].".pdf");
header("Content-Disposition: attachment;location:templates/".$_POST['tmp']."/".$nompdf.".pdf" );
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("location:templates/".$_POST['tmp']."/".$nompdf.".pdf" );
header("Content-Length: ".filesize($path));
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");
readfile($path);
//header('Content-Type: application/pdf');
//header("Content-Disposition: attachment;location:templates/".$_POST['tmp']."/".$nompdf.".pdf" );
//header("location:templates/".$_POST['tmp']."/".$nompdf.".pdf" );
}
print_header ('','','style="margin-top:15px; padding:20px;"');
?>
<br />
<br />
<center>
<div id="frm_contrat_partial">
</table>
</div>
<form action="" method="post">
<input type="hidden" name="nbh" style="width:50px;">
<input type="hidden" name="tmp" value="CT"/>
<table class="td_normal" cellpadding="4">
<tr>
<td>
date Début :
</td>
<td class="td_listing0"><?=date_selection_html("contrat_date_", '')?></td>
</tr>
<tr>
<tr><td>Date Fin : </td><td><?=date_selection_html("contrat_datefin_essai_", '') ?>
</td></tr>
</td></tr>
<tr>
<td colspan="2" align="right" class="td_listing1"><input type="submit" value="Ajouter" class="bigbutton" onClick="this.disabled=true;this.form.submit();"></td>
</tr>
</table>
</form><br /><br />
</body></html>