@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $deployment = $validator->existingDeploymentManaged($_GET['deployment_id'], $inst); |
21 | 21 | $format = ''; |
22 | 22 | if (isset($_GET['as']) && $_GET['as']=='csv') { |
23 | - $format = 'csv'; |
|
23 | + $format = 'csv'; |
|
24 | 24 | } |
25 | 25 | if (!isset($_POST['stats'])) { |
26 | 26 | $backlog = $_GET['backlog']; |
@@ -47,25 +47,25 @@ discard block |
||
47 | 47 | |
48 | 48 | $userAuthData = $deployment->retrieveStatistics($backlogTime); |
49 | 49 | if ($format == 'csv') { |
50 | - header('Content-Type: text/csv'); |
|
50 | + header('Content-Type: text/csv'); |
|
51 | 51 | header('Content-Disposition: attachment; filename="backlog_'.$deployment->identifier.'_'.$backlog.'.csv"'); |
52 | - $fp = fopen('php://output', 'w'); |
|
53 | - fputcsv($fp, [_("Timestamp (UTC)"), _("Outer-Identity"), _("Result"), _("MAC Address"), |
|
54 | - _("Chargeable-User-Identity"), _("AP Identifier"), _("Protocol")], ';', '"', ''); |
|
55 | - foreach ($userAuthData as $oneRecord) { |
|
56 | - fputcsv($fp, [$oneRecord['activity_time'], $oneRecord['outer_user'], |
|
57 | - ($oneRecord['result'] == "OK" ? _("Success") : _("Failure")), |
|
58 | - $oneRecord['mac'], $oneRecord['cui'], |
|
59 | - $oneRecord['ap_id'], $oneRecord['prot']], ';', '"', ''); |
|
52 | + $fp = fopen('php://output', 'w'); |
|
53 | + fputcsv($fp, [_("Timestamp (UTC)"), _("Outer-Identity"), _("Result"), _("MAC Address"), |
|
54 | + _("Chargeable-User-Identity"), _("AP Identifier"), _("Protocol")], ';', '"', ''); |
|
55 | + foreach ($userAuthData as $oneRecord) { |
|
56 | + fputcsv($fp, [$oneRecord['activity_time'], $oneRecord['outer_user'], |
|
57 | + ($oneRecord['result'] == "OK" ? _("Success") : _("Failure")), |
|
58 | + $oneRecord['mac'], $oneRecord['cui'], |
|
59 | + $oneRecord['ap_id'], $oneRecord['prot']], ';', '"', ''); |
|
60 | 60 | } |
61 | - fclose($fp); |
|
61 | + fclose($fp); |
|
62 | 62 | } else { |
63 | 63 | ?> |
64 | 64 | |
65 | 65 | <h1><?php $tablecaption = _("Deployment Usage Records"); echo $tablecaption; ?></h1> |
66 | 66 | <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)"); |
67 | - echo _("Protocol is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/TLS-Client-Cert-Serial"); |
|
68 | - ?></p> |
|
67 | + echo _("Protocol is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/TLS-Client-Cert-Serial"); |
|
68 | + ?></p> |
|
69 | 69 | <table class='authrecord'> |
70 | 70 | <caption><?php echo $tablecaption;?></caption> |
71 | 71 | <tr> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | 11 | |
12 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
12 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
13 | 13 | $auth = new \web\lib\admin\Authentication(); |
14 | 14 | $auth->authenticate(); |
15 | 15 | $languageInstance = new \core\common\Language(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | if ($editMode == 'fullaccess') { |
20 | 20 | $deployment = $validator->existingDeploymentManaged($_GET['deployment_id'], $inst); |
21 | 21 | $format = ''; |
22 | - if (isset($_GET['as']) && $_GET['as']=='csv') { |
|
22 | + if (isset($_GET['as']) && $_GET['as'] == 'csv') { |
|
23 | 23 | $format = 'csv'; |
24 | 24 | } |
25 | 25 | if (!isset($_POST['stats'])) { |
@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | echo _("Protocol is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/TLS-Client-Cert-Serial"); |
68 | 68 | ?></p> |
69 | 69 | <table class='authrecord'> |
70 | - <caption><?php echo $tablecaption;?></caption> |
|
70 | + <caption><?php echo $tablecaption; ?></caption> |
|
71 | 71 | <tr> |
72 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
73 | - <th scope="col"><strong><?php echo _("Outer-Identity");?></strong></th> |
|
74 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
75 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
76 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
77 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
78 | - <th scope="col"><strong><?php echo _("Protocol");?></strong></th> |
|
72 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
73 | + <th scope="col"><strong><?php echo _("Outer-Identity"); ?></strong></th> |
|
74 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
75 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
76 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
77 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
78 | + <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th> |
|
79 | 79 | </tr> |
80 | 80 | <?php |
81 | 81 | foreach ($userAuthData as $oneRecord) { |
82 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
82 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
83 | 83 | . "<td>".$oneRecord['activity_time']."</td>" |
84 | 84 | // $oneRecord['CN'] is a simple string, not an array, so disable Scrutinizer type check here |
85 | 85 | . "<td>".$oneRecord['outer_user']."</td>" |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | * <base_url>/copyright.php after deploying the software |
21 | 21 | * */ |
22 | 22 | |
23 | - /** |
|
24 | - * This file is used to display a deployment. |
|
25 | - * |
|
26 | - * @author Maja Gorecka-Wolniewicz <[email protected]> |
|
27 | - */ |
|
23 | + /** |
|
24 | + * This file is used to display a deployment. |
|
25 | + * |
|
26 | + * @author Maja Gorecka-Wolniewicz <[email protected]> |
|
27 | + */ |
|
28 | 28 | ?> |
29 | 29 | <?php |
30 | 30 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | if ($deploymentObject->radsec_cert != NULL) { |
343 | 343 | echo "<i>"; |
344 | 344 | echo _('If your certificate is close to expiry or you need to create new RADIUS over TLS credentials') . '<br>' . |
345 | - _('click on "Renew RADIUS over TLS credentials" button') . '<br>'; |
|
345 | + _('click on "Renew RADIUS over TLS credentials" button') . '<br>'; |
|
346 | 346 | |
347 | 347 | echo '<br/>' . _('You can upload your own CSR to replace default TLS credentials.') . '<br>' . |
348 | 348 | _('Click on "Upload CSR to sign my own TLS credentials"'); |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | <td> |
362 | 362 | <?php printf(_("PSK Identity: %s"), "<span id='pskid_data_$depId'>SP".$depId.'-'.$deploymentObject->institution.'</span>'); |
363 | 363 | echo copyIcon("pskid_icon_$depId"); |
364 | - ?> |
|
364 | + ?> |
|
365 | 365 | <br> |
366 | 366 | <?php printf(_("PSK hexphrase: %s"), "<span id='pskkey_data_$depId'>".$deploymentObject->pskkey."</span>"); |
367 | 367 | echo copyIcon("pskkey_icon_$depId"); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | <h1><?php echo $tablecaption; ?></h1> |
565 | 565 | <h2><?php echo _("5 most recent authentications");?></h2> |
566 | 566 | <p><?php echo _("<b>AP Identifier</b> is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id") .'<br>'; |
567 | - echo _("<b>Protocol</b> is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/<i>TLS-Client-Cert-Serial</i>"); ?></p> |
|
567 | + echo _("<b>Protocol</b> is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/<i>TLS-Client-Cert-Serial</i>"); ?></p> |
|
568 | 568 | <table class='authrecord'> |
569 | 569 | <caption><?php echo $tablecaption;?></caption> |
570 | 570 | <tr style='text-align: left;'> |
@@ -585,9 +585,9 @@ discard block |
||
585 | 585 | . "<td>".$oneRecord['outer_user']."</td>" |
586 | 586 | . "<td>".($oneRecord['result'] == "OK" ? _("Success") : _("Failure"))."</td>" |
587 | 587 | . "<td>".$oneRecord['mac']."</td>" |
588 | - . "<td>".substr($oneRecord['cui'], 0, 18) |
|
589 | - . ($oneRecord['cui']=='' ? "" : "... " . copyIcon("cui_icon_".$deploymentObject->identifier."_$i") |
|
590 | - . "<span style='display: none;' id='cui_data_".$deploymentObject->identifier."_$i'>".$oneRecord['cui'].'</span>')."</td>" |
|
588 | + . "<td>".substr($oneRecord['cui'], 0, 18) |
|
589 | + . ($oneRecord['cui']=='' ? "" : "... " . copyIcon("cui_icon_".$deploymentObject->identifier."_$i") |
|
590 | + . "<span style='display: none;' id='cui_data_".$deploymentObject->identifier."_$i'>".$oneRecord['cui'].'</span>')."</td>" |
|
591 | 591 | . "<td>".$oneRecord['ap_id']."</td>" |
592 | 592 | . "<td>".$oneRecord['prot']."</td>" |
593 | 593 | . "</tr>"; |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | $query = 'inc/deploymentLogs.inc.php?inst_id='.$deploymentObject->institution."&deployment_id=$depId&backlog="; |
628 | 628 | ?></h2> |
629 | 629 | <?php echo _('You will receive zip file with logs from both RADIUS servers: primary (folder named radius-1) and secondary (folder named radius-2).') . '<br>' . |
630 | - _('If no logs are available an empty zip file is provided.');?> |
|
630 | + _('If no logs are available an empty zip file is provided.');?> |
|
631 | 631 | <div style='height:3px'></div> |
632 | 632 | <button name="logs" type="button" onclick="location.href='<?php echo $query;?>1';"><?php echo _('Today');?> |
633 | 633 | </button> |
@@ -659,9 +659,9 @@ discard block |
||
659 | 659 | foreach (array($dsp->host1_v4, $dsp->host2_v4) as $host) { |
660 | 660 | $connection = @fsockopen($host, \config\Master::MANAGEDSP['radiusconfigport']); |
661 | 661 | if (is_resource($connection)) { |
662 | - fclose($connection); |
|
662 | + fclose($connection); |
|
663 | 663 | } else { |
664 | - return false; |
|
664 | + return false; |
|
665 | 665 | } |
666 | 666 | } |
667 | 667 | return true; |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | </button> |
684 | 684 | <span style='color: red;'> |
685 | 685 | <?php if ($hasMail == 0) { |
686 | - echo _("Helpdesk mail address is required but missing!"); |
|
686 | + echo _("Helpdesk mail address is required but missing!"); |
|
687 | 687 | } |
688 | 688 | ?> |
689 | 689 | </span> |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | <?php |
97 | 97 | function copyIcon($target) { |
98 | - return '<img class="copy_link" id="'.$target.'" src="../resources/images/icons/Tabler/copy.svg" title="'. _("Copy to clipboard").'" >'; |
|
98 | + return '<img class="copy_link" id="'.$target.'" src="../resources/images/icons/Tabler/copy.svg" title="'._("Copy to clipboard").'" >'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @param \core\DeploymentManaged $deploymentObject the deployment to work with |
105 | 105 | * @throws Exception |
106 | 106 | */ |
107 | -function displayDeploymentPropertyWidget(&$deploymentObject, $errormsg=[]) { |
|
107 | +function displayDeploymentPropertyWidget(&$deploymentObject, $errormsg = []) { |
|
108 | 108 | // RADIUS status icons |
109 | 109 | $depId = $deploymentObject->identifier; |
110 | 110 | $radiusMessages = [ |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $radius_status = array(); |
115 | 115 | $radius_status[0] = $deploymentObject->radius_status_1; |
116 | 116 | $radius_status[1] = $deploymentObject->radius_status_2; |
117 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
117 | + $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
118 | 118 | $retry = $deploymentObject->checkRADIUSHostandConfigDaemon(); |
119 | 119 | $isradiusready = radius_ready($deploymentObject); |
120 | 120 | if (is_array($retry)) { |
@@ -126,11 +126,11 @@ discard block |
||
126 | 126 | } |
127 | 127 | ?> |
128 | 128 | <div style='display: table-row_id;'> |
129 | - <div class='profilebox' id="profilebox_<?php echo $depId;?>" style='display: table-cell;'> |
|
129 | + <div class='profilebox' id="profilebox_<?php echo $depId; ?>" style='display: table-cell;'> |
|
130 | 130 | <h2><?php |
131 | 131 | switch ($deploymentObject->consortium) { |
132 | 132 | case "eduroam": |
133 | - $displayname = config\ConfAssistant::CONSORTIUM['name'] . " " . core\DeploymentManaged::PRODUCTNAME. ": SP$depId-".$deploymentObject->institution; |
|
133 | + $displayname = config\ConfAssistant::CONSORTIUM['name']." ".core\DeploymentManaged::PRODUCTNAME.": SP$depId-".$deploymentObject->institution; |
|
134 | 134 | break; |
135 | 135 | case "OpenRoaming": |
136 | 136 | $displayname = "OpenRoaming ANP"; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | default: |
139 | 139 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
140 | 140 | } |
141 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; |
|
141 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; |
|
142 | 142 | ?></h2> |
143 | 143 | <table class="deployments"> |
144 | 144 | <caption><?php echo _("Deployment Details"); ?></caption> |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | <td> |
172 | 172 | <?php |
173 | 173 | if ($deploymentObject->status) { |
174 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
175 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
176 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; |
|
174 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
175 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
176 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>"; |
|
177 | 177 | } |
178 | 178 | ?> |
179 | 179 | </td> |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | <td> |
204 | 204 | <?php |
205 | 205 | if ($deploymentObject->status) { |
206 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
207 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
208 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; |
|
206 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
207 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
208 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>"; |
|
209 | 209 | } |
210 | 210 | ?> |
211 | 211 | </td> |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | <tr style="vertical-align:bottom"> |
214 | 214 | <td><?php echo _("RADIUS shared secret for both servers"); ?></td> |
215 | 215 | <td> |
216 | - <span id="shared_data_<?php echo $deploymentObject->identifier;?>"><?php echo $deploymentObject->secret;?></span> |
|
216 | + <span id="shared_data_<?php echo $deploymentObject->identifier; ?>"><?php echo $deploymentObject->secret; ?></span> |
|
217 | 217 | <?php echo copyIcon("shared_icon_".$deploymentObject->identifier) ?> |
218 | 218 | </td> |
219 | 219 | <td></td> |
@@ -249,9 +249,9 @@ discard block |
||
249 | 249 | <td> |
250 | 250 | <?php |
251 | 251 | if ($deploymentObject->status) { |
252 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
253 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
254 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; |
|
252 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
253 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
254 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>"; |
|
255 | 255 | } |
256 | 256 | ?> |
257 | 257 | </td> |
@@ -281,9 +281,9 @@ discard block |
||
281 | 281 | <td> |
282 | 282 | <?php |
283 | 283 | if ($deploymentObject->status) { |
284 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
285 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
286 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; |
|
284 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
285 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
286 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>"; |
|
287 | 287 | } |
288 | 288 | ?> |
289 | 289 | </td> |
@@ -299,27 +299,27 @@ discard block |
||
299 | 299 | <td> |
300 | 300 | <?php |
301 | 301 | if ($deploymentObject->radsec_priv == '') { |
302 | - echo _('The client certificate was created using an uploaded CSR, the private key is not available') . '<br><br>'; |
|
302 | + echo _('The client certificate was created using an uploaded CSR, the private key is not available').'<br><br>'; |
|
303 | 303 | } |
304 | - echo _('Subject:') . ' ' . $data['name'] . '<br>'; |
|
305 | - echo _('Serial number:') . ' ' . $data['serialNumberHex'] . '<br>'; |
|
306 | - $dleft = floor(($data['validTo_time_t']-time())/(24*60*60)); |
|
304 | + echo _('Subject:').' '.$data['name'].'<br>'; |
|
305 | + echo _('Serial number:').' '.$data['serialNumberHex'].'<br>'; |
|
306 | + $dleft = floor(($data['validTo_time_t'] - time()) / (24 * 60 * 60)); |
|
307 | 307 | if ($dleft < 30) { |
308 | 308 | echo '<font color="red">'; |
309 | 309 | } |
310 | - echo _('Not valid after:') . ' '. date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s') . ' UTC'; |
|
310 | + echo _('Not valid after:').' '.date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s').' UTC'; |
|
311 | 311 | if ($dleft > 2) { |
312 | - echo '<br>' . _('Number of days to expiry:') . ' ' . $dleft; |
|
312 | + echo '<br>'._('Number of days to expiry:').' '.$dleft; |
|
313 | 313 | } else { |
314 | - echo '<br>' . _('If you are using RADIUS over TLS you should urgently renew your credentials') . '!'; |
|
314 | + echo '<br>'._('If you are using RADIUS over TLS you should urgently renew your credentials').'!'; |
|
315 | 315 | } |
316 | 316 | if ($dleft < 30) { echo '</font>'; } |
317 | 317 | ?></td> |
318 | 318 | </tr><tr><td></td> |
319 | 319 | |
320 | 320 | <td> |
321 | - <span style="display: none;" id="cert_data_<?php echo $depId;?>"><?php echo $deploymentObject->radsec_cert;?></span> |
|
322 | - <span style="display: none;" id="ca_cert_data_<?php echo $depId;?>"><?php echo $cacert;?></span> |
|
321 | + <span style="display: none;" id="cert_data_<?php echo $depId; ?>"><?php echo $deploymentObject->radsec_cert; ?></span> |
|
322 | + <span style="display: none;" id="ca_cert_data_<?php echo $depId; ?>"><?php echo $cacert; ?></span> |
|
323 | 323 | <?php if ($deploymentObject->radsec_priv != '') { |
324 | 324 | echo _("private key").copyIcon("priv_key_icon_$depId")." "; |
325 | 325 | echo '<span style="display: none;" id="priv_key_data_'.$depId.'">'.$deploymentObject->radsec_priv.'</span>'; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | echo _("CA certificate").copyIcon("ca_cert_icon_$depId"); |
331 | 331 | ?> |
332 | 332 | <br/> |
333 | - <button name="sendzip" onclick="location.href='inc/sendZip.inc.php?inst_id=<?php echo $deploymentObject->institution;?>&dep_id=<?php echo $depId?>'" type="button"><?php echo _('download ZIP-file with full data');?></button> |
|
333 | + <button name="sendzip" onclick="location.href='inc/sendZip.inc.php?inst_id=<?php echo $deploymentObject->institution; ?>&dep_id=<?php echo $depId?>'" type="button"><?php echo _('download ZIP-file with full data'); ?></button> |
|
334 | 334 | |
335 | 335 | </td> |
336 | 336 | <td></td> |
@@ -341,10 +341,10 @@ discard block |
||
341 | 341 | <?php |
342 | 342 | if ($deploymentObject->radsec_cert != NULL) { |
343 | 343 | echo "<i>"; |
344 | - echo _('If your certificate is close to expiry or you need to create new RADIUS over TLS credentials') . '<br>' . |
|
345 | - _('click on "Renew RADIUS over TLS credentials" button') . '<br>'; |
|
344 | + echo _('If your certificate is close to expiry or you need to create new RADIUS over TLS credentials').'<br>'. |
|
345 | + _('click on "Renew RADIUS over TLS credentials" button').'<br>'; |
|
346 | 346 | |
347 | - echo '<br/>' . _('You can upload your own CSR to replace default TLS credentials.') . '<br>' . |
|
347 | + echo '<br/>'._('You can upload your own CSR to replace default TLS credentials.').'<br>'. |
|
348 | 348 | _('Click on "Upload CSR to sign my own TLS credentials"'); |
349 | 349 | echo "</i>"; |
350 | 350 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | ?> |
381 | 381 | <tr></tr> |
382 | - <tr><th colspan="2"><?php echo _('Additional deployment settings');?></th></tr> |
|
382 | + <tr><th colspan="2"><?php echo _('Additional deployment settings'); ?></th></tr> |
|
383 | 383 | <tr> |
384 | 384 | <td> |
385 | 385 | <?php |
@@ -459,12 +459,12 @@ discard block |
||
459 | 459 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
460 | 460 | echo '<br>'; |
461 | 461 | if ($res['FAILURE'] == 2) { |
462 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
462 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
463 | 463 | } else { |
464 | 464 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
465 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
465 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
466 | 466 | } else { |
467 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
467 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
468 | 468 | } |
469 | 469 | } |
470 | 470 | } |
@@ -491,12 +491,12 @@ discard block |
||
491 | 491 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
492 | 492 | echo '<br>'; |
493 | 493 | if ($res['FAILURE'] == 2) { |
494 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
494 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
495 | 495 | } else { |
496 | 496 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
497 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
497 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
498 | 498 | } else { |
499 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
499 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
500 | 500 | } |
501 | 501 | } |
502 | 502 | } |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | </div> |
545 | 545 | <?php |
546 | 546 | if (!$isradiusready) { |
547 | - echo '<p>'. _("We are not able to handle a new configuration request requiring contact with RADIUS servers now.") . '<br>' . _("Check later."); |
|
547 | + echo '<p>'._("We are not able to handle a new configuration request requiring contact with RADIUS servers now.").'<br>'._("Check later."); |
|
548 | 548 | |
549 | 549 | } |
550 | 550 | if (count($errormsg) > 0 && array_key_exists($deploymentObject->identifier, $errormsg)) { |
@@ -560,38 +560,38 @@ discard block |
||
560 | 560 | </div> |
561 | 561 | <div style='width:20px;'></div> <!-- QR code space, reserved --> |
562 | 562 | <div style='display: table-cell; min-width:200px;'> |
563 | - <?php $tablecaption = _("Hotspot Usage Statistics");?> |
|
563 | + <?php $tablecaption = _("Hotspot Usage Statistics"); ?> |
|
564 | 564 | <h1><?php echo $tablecaption; ?></h1> |
565 | - <h2><?php echo _("5 most recent authentications");?></h2> |
|
566 | - <p><?php echo _("<b>AP Identifier</b> is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id") .'<br>'; |
|
565 | + <h2><?php echo _("5 most recent authentications"); ?></h2> |
|
566 | + <p><?php echo _("<b>AP Identifier</b> is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id").'<br>'; |
|
567 | 567 | echo _("<b>Protocol</b> is a protocol used between a client and RADIUS server, for TLS it is a /-separated tuple TLS/<i>TLS-Client-Cert-Serial</i>"); ?></p> |
568 | 568 | <table class='authrecord'> |
569 | - <caption><?php echo $tablecaption;?></caption> |
|
569 | + <caption><?php echo $tablecaption; ?></caption> |
|
570 | 570 | <tr style='text-align: left;'> |
571 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
572 | - <th scope="col"><strong><?php echo _("Outer-Identity");?></strong></th> |
|
573 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
574 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
575 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
576 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
577 | - <th scope="col"><strong><?php echo _("Protocol");?></strong></th> |
|
571 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
572 | + <th scope="col"><strong><?php echo _("Outer-Identity"); ?></strong></th> |
|
573 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
574 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
575 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
576 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
577 | + <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th> |
|
578 | 578 | </tr> |
579 | 579 | <?php |
580 | - $userAuthData = $deploymentObject->retrieveStatistics(0,5); |
|
580 | + $userAuthData = $deploymentObject->retrieveStatistics(0, 5); |
|
581 | 581 | $i = 0; |
582 | 582 | foreach ($userAuthData as $oneRecord) { |
583 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
583 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
584 | 584 | . "<td>".$oneRecord['activity_time']."</td>" |
585 | 585 | . "<td>".$oneRecord['outer_user']."</td>" |
586 | 586 | . "<td>".($oneRecord['result'] == "OK" ? _("Success") : _("Failure"))."</td>" |
587 | 587 | . "<td>".$oneRecord['mac']."</td>" |
588 | 588 | . "<td>".substr($oneRecord['cui'], 0, 18) |
589 | - . ($oneRecord['cui']=='' ? "" : "... " . copyIcon("cui_icon_".$deploymentObject->identifier."_$i") |
|
589 | + . ($oneRecord['cui'] == '' ? "" : "... ".copyIcon("cui_icon_".$deploymentObject->identifier."_$i") |
|
590 | 590 | . "<span style='display: none;' id='cui_data_".$deploymentObject->identifier."_$i'>".$oneRecord['cui'].'</span>')."</td>" |
591 | 591 | . "<td>".$oneRecord['ap_id']."</td>" |
592 | 592 | . "<td>".$oneRecord['prot']."</td>" |
593 | 593 | . "</tr>"; |
594 | - if ($oneRecord['cui']!='') { |
|
594 | + if ($oneRecord['cui'] != '') { |
|
595 | 595 | $i++; |
596 | 596 | } |
597 | 597 | } |
@@ -613,11 +613,11 @@ discard block |
||
613 | 613 | echo _('Get statistics as CSV file:').' '; |
614 | 614 | $query = 'inc/deploymentStats.inc.php?inst_id='.$deploymentObject->institution."&deployment_id=$depId&as=csv&backlog="; |
615 | 615 | ?> |
616 | - <button name="sendcsv" type="button" onclick="location.href='<?php echo $query;?>WEEK';"><?php echo _('Last week');?> |
|
616 | + <button name="sendcsv" type="button" onclick="location.href='<?php echo $query; ?>WEEK';"><?php echo _('Last week'); ?> |
|
617 | 617 | </button> |
618 | - <button name="sendcsv" type="button" onclick="location.href='<?php echo $query;?>MONTH';"><?php echo _('Last 30 days');?> |
|
618 | + <button name="sendcsv" type="button" onclick="location.href='<?php echo $query; ?>MONTH';"><?php echo _('Last 30 days'); ?> |
|
619 | 619 | </button> |
620 | - <button name="sendcsv" type="button" onclick="location.href='<?php echo $query;?>FULL';"><?php echo _('Last 6 months');?> |
|
620 | + <button name="sendcsv" type="button" onclick="location.href='<?php echo $query; ?>FULL';"><?php echo _('Last 6 months'); ?> |
|
621 | 621 | </button> |
622 | 622 | </div><!-- statistics space --> |
623 | 623 | <div style='height:5px'></div> |
@@ -626,12 +626,12 @@ discard block |
||
626 | 626 | <h2><?php echo _('To get detailed logs from RADIUS sites click a button below.'); |
627 | 627 | $query = 'inc/deploymentLogs.inc.php?inst_id='.$deploymentObject->institution."&deployment_id=$depId&backlog="; |
628 | 628 | ?></h2> |
629 | - <?php echo _('You will receive zip file with logs from both RADIUS servers: primary (folder named radius-1) and secondary (folder named radius-2).') . '<br>' . |
|
630 | - _('If no logs are available an empty zip file is provided.');?> |
|
629 | + <?php echo _('You will receive zip file with logs from both RADIUS servers: primary (folder named radius-1) and secondary (folder named radius-2).').'<br>'. |
|
630 | + _('If no logs are available an empty zip file is provided.'); ?> |
|
631 | 631 | <div style='height:3px'></div> |
632 | - <button name="logs" type="button" onclick="location.href='<?php echo $query;?>1';"><?php echo _('Today');?> |
|
632 | + <button name="logs" type="button" onclick="location.href='<?php echo $query; ?>1';"><?php echo _('Today'); ?> |
|
633 | 633 | </button> |
634 | - <button name="logs" type="button" onclick="location.href='<?php echo $query;?>7';"><?php echo _('Last 7 days');?> |
|
634 | + <button name="logs" type="button" onclick="location.href='<?php echo $query; ?>7';"><?php echo _('Last 7 days'); ?> |
|
635 | 635 | </button> |
636 | 636 | </div> |
637 | 637 | </div> |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | <div> |
680 | 680 | <input type="hidden" name="consortium" value="eduroam"/> |
681 | 681 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
682 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
682 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
683 | 683 | </button> |
684 | 684 | <span style='color: red;'> |
685 | 685 | <?php if ($hasMail == 0) { |