Subversion Repositories ALCASAR

Rev

Rev 2473 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2473 Rev 2493
Line 3... Line 3...
3
 * Print tickets of the new user
3
 * Print tickets of the new user
4
 *
4
 *
5
 * @author    Tom Houdayer
5
 * @author    Tom Houdayer
6
 * @copyright Copyright (C) ALCASAR (http://www.alcasar.net)
6
 * @copyright Copyright (C) ALCASAR (http://www.alcasar.net)
7
 * @license   GPL-3.0
7
 * @license   GPL-3.0
8
 * @version   $Id: ticket_user.php 2473 2017-12-30 00:37:45Z tom.houdayer $
8
 * @version   $Id: ticket_user.php 2493 2018-02-26 01:27:02Z tom.houdayer $
9
 */
9
 */
10
 
10
 
11
require_once __DIR__ . '/../lib/alcasar/TicketsGenerator.php';
11
require_once __DIR__ . '/../lib/alcasar/TicketsGenerator.php';
12
$langue_imp = ((isset($_POST['langue_imp'])) ? $_POST['langue_imp'] : 'en');
12
$langue_imp = ((isset($_POST['langue_imp'])) ? $_POST['langue_imp'] : 'en');
13
require_once __DIR__ . '/../lib/langues_imp.php';
13
require_once __DIR__ . '/../lib/langues_imp.php';
Line 38... Line 38...
38
 
38
 
39
// Save the PDF and redirect user to it
39
// Save the PDF and redirect user to it
40
$filename = 'ticket_' . $log_imp . '.pdf';
40
$filename = 'ticket_' . $log_imp . '.pdf';
41
// Remove accents
41
// Remove accents
42
$filename = strtr(utf8_decode($filename), utf8_decode('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'), 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'); // TODO : manage all UTF-8 chars
42
$filename = strtr(utf8_decode($filename), utf8_decode('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'), 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'); // TODO : manage all UTF-8 chars
-
 
43
 
43
$ticketsGenerator->saveAs($filename);
44
$ret = $ticketsGenerator->saveAs($filename);
-
 
45
if (!$ret) {
-
 
46
	echo $content_generation;
-
 
47
	echo 'Error during tickets report generation';
-
 
48
	exit();
-
 
49
}
-
 
50
 
44
header('Location: ' . $filename);
51
header('Location: ' . $filename);