Subversion Repositories ALCASAR

Rev

Rev 2179 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2179 Rev 2851
1
<?php
1
<?php
2
/**
2
/**
3
 * Tickets template for TicketsGenerator
3
 * Tickets template for TicketsGenerator
4
 *
4
 *
5
 * @author    Tom Houdayer
5
 * @author    Tom Houdayer & Rexy
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: tickets.template.php 2179 2017-04-25 18:07:10Z tom.houdayer $
8
 * @version   $Id: tickets.template.php 2851 2020-07-16 21:54:46Z rexy $
9
 */
9
 */
10
 
10
 
11
$langue_imp = $language;
11
$langue_imp = $language;
12
require __DIR__ . '/../langues_imp.php';
12
require __DIR__ . '/../langues_imp.php';
13
 
13
 
14
$img_logoAlcasar      = __DIR__ . '/../../../../images/logo-alcasar.png';
14
$img_logoAlcasar      = __DIR__ . '/../../../../images/logo-alcasar.png';
15
$img_logoOrganization = __DIR__ . '/../../../../images/organisme.png';
15
$img_logoOrganization = __DIR__ . '/../../../../images/organisme.png';
16
?>
16
?>
17
<!doctype html>
17
<!doctype html>
18
<html>
18
<html>
19
<head>
19
<head>
20
	<meta charset="utf-8">
20
	<meta charset="utf-8">
21
	<style>
21
	<style>
-
 
22
	@font-face {
-
 
23
		font-family: 'DejaVuSerif';
-
 
24
		src: url("/usr/share/fonts/TTF/dejavu/DejaVuSerif.ttf") format('truetype');
-
 
25
	}	
22
		body {
26
		body {
23
			margin: 0;
27
			margin: 0;
24
		}
28
		}
25
		.ticket {
29
		.ticket {
26
			margin: 14px 0;
30
			margin: 14px 0;
27
			width: 50%;
31
			width: 50%;
28
			display: inline-block;
32
			display: inline-block;
29
			font-family: Arial;
33
			font-family: 'DejaVuSerif';
30
			font-size: 8px;
34
			font-size: 8px;
31
			line-height: 16px;
35
			line-height: 16px;
32
		}
36
		}
33
		.ticket-header {
37
		.ticket-header {
34
			min-height:  30px;
38
			min-height:  30px;
35
			line-height: 30px;
39
			line-height: 30px;
36
			font-size: 10px;
40
			font-size: 10px;
37
			text-align: center;
41
			text-align: center;
38
		}
42
		}
39
		.ticket-header > .ticket-title {
43
		.ticket-header > .ticket-title {
40
			color: red;
44
			color: red;
41
			font-weight: bold;
45
			font-weight: bold;
42
		}
46
		}
43
		.ticket-box {
47
		.ticket-box {
44
			position: relative;
48
			position: relative;
45
			border: 1px solid black;
49
			border: 1px solid black;
46
			border-radius: 10px;
50
			border-radius: 10px;
47
			width: 220px;
51
			width: 220px;
48
			margin: 0 auto;
52
			margin: 0 auto;
49
		}
53
		}
50
		.ticket-box > .logo {
54
		.ticket-box > .logo {
51
			position: absolute;
55
			position: absolute;
52
			display: inline-block;
56
			display: inline-block;
53
			width:  60px;
57
			width:  60px;
54
			height: 60px;
58
			height: 60px;
55
			text-align: center;
59
			text-align: center;
56
		}
60
		}
57
		.ticket-box > .logo img {
61
		.ticket-box > .logo img {
58
			max-width:  100%;
62
			max-width:  100%;
59
			max-height: 100%;
63
			max-height: 100%;
60
		}
64
		}
61
		.ticket-box > .logo-alcasar {
65
		.ticket-box > .logo-alcasar {
62
			top:  -30px;
66
			top:  -30px;
63
			left: -30px;
67
			left: -30px;
64
		}
68
		}
65
		.ticket-box > .logo-organization {
69
		.ticket-box > .logo-organization {
66
			top:   -30px;
70
			top:   -30px;
67
			right: -30px;
71
			right: -30px;
68
		}
72
		}
69
		.ticket-body {
73
		.ticket-body {
70
			position: relative;
74
			position: relative;
71
			z-index: 10;
75
			z-index: 10;
72
			padding: 5px;
76
			padding: 5px;
73
		}
77
		}
74
		.ticket-body > div > span {
78
		.ticket-body > div > span {
75
			display: inline-block;
79
			display: inline-block;
76
		}
80
		}
77
		.ticket-body > div.spacer {
81
		.ticket-body > div.spacer {
78
			height: 10px;
82
			height: 10px;
79
		}
83
		}
80
		.ticket-body > div > span.key {
84
		.ticket-body > div > span.key {
81
			width: 52%;
85
			width: 52%;
82
			text-align: right;
86
			text-align: right;
83
		}
87
		}
84
		.ticket-body > div > span.value {
88
		.ticket-body > div > span.value {
85
			width: 48%;
89
			width: 48%;
86
			font-weight: bold;
90
			font-weight: bold;
87
		}
91
		}
88
		.ticket-footer > .infos {
92
		.ticket-footer > .infos {
89
			font-size: 7px;
93
			font-size: 7px;
90
			height: 52px;
94
			height: 52px;
91
		}
95
		}
92
		.center {
96
		.center {
93
			text-align: center;
97
			text-align: center;
94
		}
98
		}
95
	</style>
99
	</style>
96
</head>
100
</head>
97
<body>
101
<body>
98
	<?php foreach ($users as $user):
102
	<?php foreach ($users as $user):
99
	  ?><div class="ticket">
103
	  ?><div class="ticket">
100
			<div class="ticket-header">
104
			<div class="ticket-header">
101
				<span class="ticket-title"><?= $l_title_imp ?></span>
105
				<span class="ticket-title"><?= $l_title_imp ?></span>
102
			</div>
106
			</div>
103
			<div class="ticket-box">
107
			<div class="ticket-box">
104
				<div class="logo logo-alcasar"><img src="<?= $img_logoAlcasar ?>" alt=""></div>
108
				<div class="logo logo-alcasar"><img src="<?= $img_logoAlcasar ?>" alt=""></div>
105
				<div class="logo logo-organization"><img src="<?= $img_logoOrganization ?>" alt=""></div>
109
				<div class="logo logo-organization"><img src="<?= $img_logoOrganization ?>" alt=""></div>
106
				<div class="ticket-body">
110
				<div class="ticket-body">
107
					<div class="spacer"></div>
111
					<div class="spacer"></div>
108
					<div><span class="key"><?= $l_login_imp ?>&nbsp;</span><span class="value"><?= $user->username ?></span></div>
112
					<div><span class="key"><?= $l_login_imp ?>&nbsp;</span><span class="value"><?= $user->username ?></span></div>
109
					<div><span class="key"><?= $l_password_imp ?>&nbsp;</span><span class="value"><?= $user->password ?></span></div>
113
					<div><span class="key"><?= $l_password_imp ?>&nbsp;</span><span class="value"><?= $user->password ?></span></div>
110
					<div class="spacer"></div>
114
					<div class="spacer"></div>
111
					<div><span class="key"><?= $l_max_all_session_imp ?>&nbsp;</span><span class="value"><?= $user->maxAllSession ?></span></div>
115
					<div><span class="key"><?= $l_max_all_session_imp ?>&nbsp;</span><span class="value"><?= $user->maxAllSession ?></span></div>
112
					<div><span class="key"><?= $l_session_timeout_imp ?>&nbsp;</span><span class="value"><?= $user->sessionTimeout ?></span></div>
116
					<div><span class="key"><?= $l_session_timeout_imp ?>&nbsp;</span><span class="value"><?= $user->sessionTimeout ?></span></div>
113
					<div><span class="key"><?= $l_max_daily_session_imp ?>&nbsp;</span><span class="value"><?= $user->maxDailySession ?></span></div>
117
					<div><span class="key"><?= $l_max_daily_session_imp ?>&nbsp;</span><span class="value"><?= $user->maxDailySession ?></span></div>
114
					<div><span class="key"><?= $l_expiration_imp ?>&nbsp;</span><span class="value"><?= $user->expiration ?></span></div>
118
					<div><span class="key"><?= $l_expiration_imp ?>&nbsp;</span><span class="value"><?= $user->expiration ?></span></div>
115
					<div class="spacer"></div>
119
					<div class="spacer"></div>
116
				</div>
120
				</div>
117
			</div>
121
			</div>
118
			<div class="ticket-footer">
122
			<div class="ticket-footer">
119
				<?php if ($user->isDuplicate): ?>
123
				<?php if ($user->isDuplicate): ?>
120
					<div class="infos center">
124
					<div class="infos center">
121
						<p><?= $l_duplicate ?></p>
125
						<p><?= $l_duplicate ?></p>
122
					</div>
126
					</div>
123
				<?php else: ?>
127
				<?php else: ?>
124
					<div class="infos">
128
					<div class="infos">
125
						<p><?= nl2br($l_explain, false) ?></p>
129
						<p><?= nl2br($l_explain, false) ?></p>
126
					</div>
130
					</div>
127
				<?php endif; ?>
131
				<?php endif; ?>
128
				<div class="credits center"><?= $l_footer_imp ?></div>
132
				<div class="credits center"><?= $l_footer_imp ?></div>
129
			</div>
133
			</div>
130
		</div><?php
134
		</div><?php
131
	endforeach; ?>
135
	endforeach; ?>
132
</body>
136
</body>
133
</html>
137
</html>
134
 
138