Subversion Repositories ALCASAR

Rev

Rev 1157 | Rev 1566 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
508 richard 1
<?php
1157 stephane 2
require_once('/var/www/html/acc/manager/lib/alcasar/ticketspdf.class.php');
509 richard 3
// ticket d'impression (thank's to Geoffroy MUSITELLI)
508 richard 4
//--recupération des variables provenant du formulaire 
913 richard 5
$langue_imp=utf8_decode($_POST["langue_imp"]);
584 richard 6
$log_imp=utf8_decode($_POST["log_imp"]);
7
$passwd_imp=utf8_decode($_POST["passwd_imp"]);
8
$exp_imp=utf8_decode($_POST["exp_imp"]);
9
$sto_imp=utf8_decode($_POST["sto_imp"]);
901 richard 10
$mas_imp=utf8_decode($_POST["mas_imp"]);
584 richard 11
$mds_imp=utf8_decode($_POST["mds_imp"]);
12
$mms_imp=utf8_decode($_POST["mms_imp"]);
1281 richard 13
//	Langue du Ticket d'impression en fonction de la liste déroulante
14
if (isset($_POST["langue_imp"])) { $langue_imp = $_POST["langue_imp"]; } else { $langue_imp = "en"; };
15
if (is_file("../lib/langues_imp.php")) include("../lib/langues_imp.php") ;
16
// Si les valeurs de durée ne sont pas définies, on les remplace par la valeur 'Illimitée'
17
	if (($sto_imp=='') or ($sto_imp=='-')){ $sto_imp=$l_unlimited;}
18
	if (($mas_imp=='') or ($mas_imp=='-')){ $mas_imp=$l_unlimited;}
19
	if (($mds_imp=='') or ($mds_imp=='-')){ $mds_imp=$l_unlimited;}
20
	if (($mms_imp=='') or ($mms_imp=='-')){ $mms_imp=$l_unlimited;}
508 richard 21
//création de la classe PDF pour faire l'entête et pieds de page
1157 stephane 22
$pdf = new ticketsPDF(2,3);
23
$pdf->setTicketsTitle($l_title_imp);
24
$pdf->setTicketsFooter($l_footer_imp);
25
$pdf->newTickets();
26
$pdf->Ln(5);
27
$pdf->addInfos($l_login_imp, $log_imp);
28
$pdf->addInfos($l_password_imp, $passwd_imp);
29
$pdf->Ln(5);
30
$pdf->addInfos($l_max_all_session_imp, $mas_imp);
31
$pdf->addInfos($l_session_timeout_imp, $sto_imp);
32
$pdf->addInfos($l_max_daily_session_imp, $mds_imp);
33
$pdf->addInfos($l_expiration_imp, $exp_imp);
34
$pdf->Ln(10);
35
$pdf->addComment($l_explain);
508 richard 36
 
1157 stephane 37
// Création du duplicata
38
$pdf->newTickets();
39
$pdf->Ln(5);
40
$pdf->addInfos($l_login_imp, $log_imp);
41
$pdf->addInfos($l_password_imp, $passwd_imp);
42
$pdf->Ln(5);
43
$pdf->addInfos($l_max_all_session_imp, $mas_imp);
44
$pdf->addInfos($l_session_timeout_imp, $sto_imp);
45
$pdf->addInfos($l_max_daily_session_imp, $mds_imp);
46
$pdf->addInfos($l_expiration_imp, $exp_imp);
47
$pdf->Ln(10);
48
$pdf->addComment($l_duplicate,'C');//à mettre en rouge
508 richard 49
 
946 richard 50
// envoie du document au navigateur 
913 richard 51
$ticket_name="ticket_".$log_imp.".pdf";
946 richard 52
$pdf->Output("ticket.pdf");
53
header ('Location: ticket.pdf');
508 richard 54
?>