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"]);
|
508 |
richard |
13 |
//--initialisation des classes FPDF
|
913 |
richard |
14 |
//Langue du Ticket d'impression en fonction de la liste déroulante
|
|
|
15 |
switch ($langue_imp){
|
|
|
16 |
case 'fr':
|
921 |
richard |
17 |
$l_title_imp = "TICKET D'ACCÈS INTERNET";
|
|
|
18 |
$l_footer_imp = "Généré par ALCASAR";
|
1157 |
stephane |
19 |
//$l_explain1_imp = "Entrer 'alcasar' dans votre navigateur pour gérer votre compte (mot de passe, certificat, etc.).";
|
|
|
20 |
//$l_explain2_imp = "Entrer 'logout' dans votre navigateur pour vous déconnecter.";
|
|
|
21 |
$l_explain = "Entrer 'alcasar' dans votre navigateur pour gérer votre compte
|
|
|
22 |
(mot de passe, certificat, etc.).
|
|
|
23 |
Entrer 'logout' dans votre navigateur pour vous déconnecter.";
|
913 |
richard |
24 |
$l_login_imp = "Utilisateur :";
|
|
|
25 |
$l_password_imp = "Mot de passe :";
|
921 |
richard |
26 |
$l_max_all_session_imp="Durée totale autorisée :";
|
913 |
richard |
27 |
$l_session_timeout_imp="Durée d'une session :";
|
|
|
28 |
$l_max_daily_session_imp="Durée journalière :";
|
|
|
29 |
$l_max_monthly_session_imp ="Durée mensuelle :";
|
|
|
30 |
$l_expiration_imp="Date d'expiration :";
|
922 |
richard |
31 |
$l_unlimited="Illimitée";
|
|
|
32 |
$l_without="Aucune";
|
1157 |
stephane |
33 |
$l_duplicate="Duplicata";
|
913 |
richard |
34 |
break;
|
|
|
35 |
case 'de':
|
921 |
richard |
36 |
$l_title_imp = "INTERNETZUGANG TICKET";
|
|
|
37 |
$l_footer_imp = "Präsentiert von ALCASAR";
|
1157 |
stephane |
38 |
//$l_explain1_imp = "Geben Sie 'Alcasar' in Ihrem Browser, um Ihr Konto zu verwalten (kennwort, zertifikat, etc.).";
|
|
|
39 |
//$l_explain2_imp = "Geben Sie 'logout' in Ihrem Browser zu trennen.";
|
|
|
40 |
$l_explain = "Geben Sie 'Alcasar' in Ihrem Browser, um Ihr Konto zu verwalten (kennwort, zertifikat, etc.).
|
|
|
41 |
Geben Sie 'logout' in Ihrem Browser zu trennen.
|
|
|
42 |
";
|
913 |
richard |
43 |
$l_login_imp = "Login :";
|
|
|
44 |
$l_password_imp = "Passwort :";
|
|
|
45 |
$l_max_all_session_imp="Maximale erlaubt Dauer :";
|
|
|
46 |
$l_session_timeout_imp="Dauer der Sitzung :";
|
|
|
47 |
$l_max_daily_session_imp="Stunden täglich :";
|
|
|
48 |
$l_max_monthly_session_imp ="monatlich Dauer :";
|
|
|
49 |
$l_expiration_imp="Verfallsdatum :";
|
922 |
richard |
50 |
$l_unlimited="Unbegrentz";
|
|
|
51 |
$l_without="Ohne";
|
1157 |
stephane |
52 |
$l_duplicate="Duplikat";
|
913 |
richard |
53 |
break;
|
|
|
54 |
case 'nl':
|
|
|
55 |
$l_title_imp = "ONTVANGST INTERNET";
|
921 |
richard |
56 |
$l_footer_imp = "Powered by ALCASAR";
|
1157 |
stephane |
57 |
//$l_explain1_imp = "Voer 'Alcasar' in uw browser om uw account te beheren (wachtwoord, certificaat, etc.).";
|
|
|
58 |
//$l_explain2_imp = "Voer 'logout' in uw browser de verbinding te verbreken.";
|
|
|
59 |
$l_explain = "Voer 'Alcasar' in uw browser om uw account te beheren (wachtwoord, certificaat, etc.).
|
|
|
60 |
Voer 'logout' in uw browser de verbinding te verbreken.";
|
913 |
richard |
61 |
$l_login_imp = "Gebruikers :";
|
|
|
62 |
$l_password_imp = "Wachtwoord :";
|
921 |
richard |
63 |
$l_max_all_session_imp="Totaal toegestane tijd :";
|
913 |
richard |
64 |
$l_session_timeout_imp="Sessieduur :";
|
|
|
65 |
$l_max_daily_session_imp="Dagelijkse uren :";
|
|
|
66 |
$l_max_monthly_session_imp ="Maandelijkse duur :";
|
|
|
67 |
$l_expiration_imp="Vervaldatum :";
|
922 |
richard |
68 |
$l_unlimited="Onbeperkte";
|
|
|
69 |
$l_without="Ohne";
|
1157 |
stephane |
70 |
$l_duplicate="Duplicaat";
|
913 |
richard |
71 |
break;
|
|
|
72 |
case 'es':
|
|
|
73 |
$l_title_imp = "BONO INTERNET";
|
921 |
richard |
74 |
$l_footer_imp = "Desarrollado por ALCASAR";
|
1157 |
stephane |
75 |
//$l_explain1_imp = "Escribe 'Alcasar' de su navegador para administrar su cuenta (contraseña, certificado, etc.).";
|
|
|
76 |
//$l_explain2_imp = "Escribe 'logout' de su navegador para desconectar.";
|
|
|
77 |
$l_explain = "Escribe 'Alcasar' de su navegador para administrar su cuenta (contraseña, certificado, etc.).
|
|
|
78 |
Escribe 'logout' de su navegador para desconectar.";
|
913 |
richard |
79 |
$l_login_imp = "Usuario :";
|
|
|
80 |
$l_password_imp = "Contraseña :";
|
921 |
richard |
81 |
$l_max_all_session_imp="Tiempo total permitido :";
|
913 |
richard |
82 |
$l_session_timeout_imp="Duraciôn de Sesiôn :";
|
|
|
83 |
$l_max_daily_session_imp="Horas diarias :";
|
|
|
84 |
$l_max_monthly_session_imp ="Duraciôn mensual :";
|
|
|
85 |
$l_expiration_imp="Fecha de caducidad :";
|
922 |
richard |
86 |
$l_unlimited="Ilimitado";
|
|
|
87 |
$l_without="Sin";
|
1157 |
stephane |
88 |
$l_duplicate="Duplicado";
|
913 |
richard |
89 |
break;
|
|
|
90 |
case 'it':
|
|
|
91 |
$l_title_imp = "RICEVIMENTO INTERNET";
|
921 |
richard |
92 |
$l_footer_imp = "Powered by ALCASAR";
|
1157 |
stephane |
93 |
//$l_explain1_imp = "Inserisci 'alcasar' nel tuo browser per gestire il tuo account (password, certificato, ecc).";
|
|
|
94 |
//$l_explain2_imp = "Inserisci 'logout' nel tuo browser per disconnettersi.";
|
|
|
95 |
$l_explain = "Inserisci 'alcasar' nel tuo browser per gestire il tuo account (password, certificato, ecc).
|
|
|
96 |
Inserisci 'logout' nel tuo browser per disconnettersi.";
|
913 |
richard |
97 |
$l_login_imp = "Utenti :";
|
|
|
98 |
$l_password_imp = "Password :";
|
921 |
richard |
99 |
$l_max_all_session_imp="Tempo totale consentito:";
|
913 |
richard |
100 |
$l_session_timeout_imp="Durata della sessione :";
|
|
|
101 |
$l_max_daily_session_imp="Ore giornaliere :";
|
|
|
102 |
$l_max_monthly_session_imp ="Durata mensile :";
|
|
|
103 |
$l_expiration_imp="Data di scadenza :";
|
922 |
richard |
104 |
$l_unlimited="Illimitato";
|
|
|
105 |
$l_without="Senza";
|
1157 |
stephane |
106 |
$l_duplicate="Duplicato";
|
921 |
richard |
107 |
break;
|
|
|
108 |
case 'pt':
|
|
|
109 |
$l_title_imp = "BILHETE DE ACESSO À INTERNET";
|
|
|
110 |
$l_footer_imp = "Desenvolvido por ALCASAR";
|
1157 |
stephane |
111 |
//$l_explain1_imp = "Digite 'Alcasar' no seu navegador para gerenciar sua conta (senha, certidão, etc).";
|
|
|
112 |
//$l_explain2_imp = "Digite 'logout' no seu navegador para desligar.";
|
|
|
113 |
$l_explain = "Digite 'Alcasar' no seu navegador para gerenciar sua conta (senha, certidão, etc).
|
|
|
114 |
Digite 'logout' no seu navegador para desligar.";
|
921 |
richard |
115 |
$l_login_imp = "Usuário :";
|
|
|
116 |
$l_password_imp = "Senha :";
|
|
|
117 |
$l_max_all_session_imp="Tempo máximo de toda conexão :";
|
|
|
118 |
$l_session_timeout_imp="Fim da conexão :";
|
|
|
119 |
$l_max_daily_session_imp="Conexão máxima diária :";
|
|
|
120 |
$l_max_monthly_session_imp ="MConexão máxima mensal :";
|
|
|
121 |
$l_expiration_imp="Data de vencimento :";
|
922 |
richard |
122 |
$l_unlimited="Ilimitado";
|
|
|
123 |
$l_without="Sem";
|
1157 |
stephane |
124 |
$l_duplicate="Duplicado";
|
922 |
richard |
125 |
break;
|
913 |
richard |
126 |
default:
|
921 |
richard |
127 |
$l_title_imp = "INTERNET ACCESS TICKET";
|
|
|
128 |
$l_footer_imp = "Powered by ALCASAR";
|
1157 |
stephane |
129 |
//$l_explain1_imp = "Enter 'alcasar' in your browser to manage your account (password, certificate, etc.).";
|
|
|
130 |
//$l_explain2_imp = "Enter 'logout' in your browser to disconnect.";
|
|
|
131 |
$l_explain = "Enter 'alcasar' in your browser to manage your account (password, certificate, etc.).
|
|
|
132 |
Enter 'logout' in your browser to disconnect.";
|
913 |
richard |
133 |
$l_login_imp = "Login :";
|
|
|
134 |
$l_password_imp = "Password :";
|
921 |
richard |
135 |
$l_max_all_session_imp="Total time allowed :";
|
913 |
richard |
136 |
$l_session_timeout_imp="Session timeout :";
|
|
|
137 |
$l_max_daily_session_imp="Max daily session :";
|
|
|
138 |
$l_max_monthly_session_imp ="Max monthly session :";
|
|
|
139 |
$l_expiration_imp="Expiration date :";
|
922 |
richard |
140 |
$l_unlimited="Unlimited";
|
|
|
141 |
$l_without="Without";
|
1157 |
stephane |
142 |
$l_duplicate="Duplicate";
|
913 |
richard |
143 |
break;
|
|
|
144 |
}
|
1157 |
stephane |
145 |
|
|
|
146 |
/* Si les valeurs de durée sont égal à '-' remplissage avec la valeur 'Illimitée'*/
|
|
|
147 |
if ($sto_imp=='-'){ $sto_imp=$l_unlimited;}
|
|
|
148 |
if ($mas_imp=='-'){ $mas_imp=$l_unlimited;}
|
|
|
149 |
if ($mds_imp=='-'){ $mds_imp=$l_unlimited;}
|
|
|
150 |
if ($mms_imp=='-'){ $mms_imp=$l_unlimited;}
|
508 |
richard |
151 |
//création de la classe PDF pour faire l'entête et pieds de page
|
1157 |
stephane |
152 |
// Ajout d'un ticket sur la fiche PDF
|
508 |
richard |
153 |
|
1157 |
stephane |
154 |
// Préparation de la fiche PDF
|
|
|
155 |
$pdf = new ticketsPDF(2,3);
|
|
|
156 |
$pdf->setTicketsTitle($l_title_imp);
|
|
|
157 |
$pdf->setTicketsFooter($l_footer_imp);
|
|
|
158 |
$pdf->newTickets();
|
|
|
159 |
$pdf->Ln(5);
|
|
|
160 |
$pdf->addInfos($l_login_imp, $log_imp);
|
|
|
161 |
$pdf->addInfos($l_password_imp, $passwd_imp);
|
|
|
162 |
$pdf->Ln(5);
|
|
|
163 |
$pdf->addInfos($l_max_all_session_imp, $mas_imp);
|
|
|
164 |
$pdf->addInfos($l_session_timeout_imp, $sto_imp);
|
|
|
165 |
$pdf->addInfos($l_max_daily_session_imp, $mds_imp);
|
|
|
166 |
$pdf->addInfos($l_expiration_imp, $exp_imp);
|
|
|
167 |
$pdf->Ln(10);
|
|
|
168 |
$pdf->addComment($l_explain);
|
508 |
richard |
169 |
|
1157 |
stephane |
170 |
// Création du duplicata
|
|
|
171 |
$pdf->newTickets();
|
|
|
172 |
$pdf->Ln(5);
|
|
|
173 |
$pdf->addInfos($l_login_imp, $log_imp);
|
|
|
174 |
$pdf->addInfos($l_password_imp, $passwd_imp);
|
|
|
175 |
$pdf->Ln(5);
|
|
|
176 |
$pdf->addInfos($l_max_all_session_imp, $mas_imp);
|
|
|
177 |
$pdf->addInfos($l_session_timeout_imp, $sto_imp);
|
|
|
178 |
$pdf->addInfos($l_max_daily_session_imp, $mds_imp);
|
|
|
179 |
$pdf->addInfos($l_expiration_imp, $exp_imp);
|
|
|
180 |
$pdf->Ln(10);
|
|
|
181 |
$pdf->addComment($l_duplicate,'C');//à mettre en rouge
|
508 |
richard |
182 |
|
946 |
richard |
183 |
// envoie du document au navigateur
|
913 |
richard |
184 |
$ticket_name="ticket_".$log_imp.".pdf";
|
946 |
richard |
185 |
$pdf->Output("ticket.pdf");
|
|
|
186 |
header ('Location: ticket.pdf');
|
508 |
richard |
187 |
?>
|