@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | function displaySilverbulletPropertyWidget(&$theProfile, $readonly, &$uiElements) { |
32 | 32 | ?> |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | <ul style='margin:1px'> |
44 | 44 | <?php |
45 | 45 | foreach ($completeness as $missing_attrib) { |
46 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
46 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
47 | 47 | } |
48 | 48 | ?> |
49 | 49 | </ul> |
50 | 50 | </div> |
51 | 51 | <?php |
52 | 52 | } else { |
53 | - echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm); |
|
53 | + echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm); |
|
54 | 54 | } |
55 | 55 | ?> |
56 | 56 | <br/> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if ($readonly === FALSE) { |
60 | 60 | ?> |
61 | 61 | <form action='edit_silverbullet.php?inst_id=<?php echo $theProfile->institution; ?>&profile_id=<?php echo $theProfile->identifier; ?>' method='POST'> |
62 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
62 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
63 | 63 | </form> |
64 | 64 | <?php |
65 | 65 | } |
@@ -92,21 +92,21 @@ discard block |
||
92 | 92 | $has_overrides = TRUE; |
93 | 93 | } |
94 | 94 | } |
95 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
95 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
96 | 96 | $typelist = $theProfile->getEapMethodsinOrderOfPreference(); |
97 | 97 | $allcomplete = TRUE; |
98 | 98 | foreach ($typelist as $eaptype) { |
99 | 99 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
100 | 100 | $completeness = $theProfile->isEapTypeDefinitionComplete($eaptype); |
101 | 101 | if ($completeness === true) { |
102 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
102 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
103 | 103 | } else { |
104 | 104 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
105 | 105 | $buffer_eaptypediv .= _("Information needed!"); |
106 | 106 | if (is_array($completeness)) { |
107 | 107 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
108 | 108 | foreach ($completeness as $missing_attrib) { |
109 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
109 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
110 | 110 | } |
111 | 111 | $buffer_eaptypediv .= "</ul>"; |
112 | 112 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | foreach ($attribs as $attrib) { |
119 | 119 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
120 | 120 | $justOnce = TRUE; |
121 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
121 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | $buffer_eaptypediv .= "<br/>"; |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
165 | 165 | $diagUrl = "../diag/"; |
166 | 166 | } else { |
167 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
167 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
168 | 168 | } |
169 | 169 | ?> |
170 | - <form action='<?php echo $diagUrl . "action_realmcheck.php?inst_id=" . $theProfile->institution . "&profile_id=" . $theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
171 | - <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link . $_SERVER['SCRIPT_NAME']); ?>'/> |
|
170 | + <form action='<?php echo $diagUrl."action_realmcheck.php?inst_id=".$theProfile->institution."&profile_id=".$theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
171 | + <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link.$_SERVER['SCRIPT_NAME']); ?>'/> |
|
172 | 172 | <button type='submit' name='profile_action' value='check' <?php echo ($has_realm ? "" : "disabled='disabled'"); ?> title='<?php echo _("The realm can only be checked if you configure the realm!"); ?>'> |
173 | 173 | <?php echo _("Check realm reachability"); ?> |
174 | 174 | </button> |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | ?> |
202 | 202 | <div style='display: flex;'> |
203 | 203 | <?php |
204 | - $idpLevelUrl = $link . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $theProfile->institution; |
|
205 | - $displayurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
206 | - $QRurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
204 | + $idpLevelUrl = $link.dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$theProfile->institution; |
|
205 | + $displayurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
206 | + $QRurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
207 | 207 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
208 | 208 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
209 | 209 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -215,9 +215,9 @@ discard block |
||
215 | 215 | if (empty($rawQr)) { |
216 | 216 | throw new Exception("Something went seriously wrong during QR code generation!"); |
217 | 217 | } |
218 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
218 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
219 | 219 | $size = getimagesize($uri); |
220 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
220 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
221 | 221 | |
222 | 222 | //echo "<nobr>$displayurl</nobr></a>"; |
223 | 223 | echo "<p>$displayurl</p></a>"; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | <h2><?php |
262 | 262 | switch ($deploymentObject->consortium) { |
263 | 263 | case "eduroam": |
264 | - $displayname = config\ConfAssistant::CONSORTIUM['name'] . " " . core\DeploymentManaged::PRODUCTNAME; |
|
264 | + $displayname = config\ConfAssistant::CONSORTIUM['name']." ".core\DeploymentManaged::PRODUCTNAME; |
|
265 | 265 | break; |
266 | 266 | case "OpenRoaming": |
267 | 267 | $displayname = "OpenRoaming ANP"; |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | default: |
270 | 270 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
271 | 271 | } |
272 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; |
|
272 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; |
|
273 | 273 | ?></h2> |
274 | 274 | <table> |
275 | 275 | <caption><?php echo _("Deployment Details"); ?></caption> |
@@ -283,13 +283,13 @@ discard block |
||
283 | 283 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
284 | 284 | <?php |
285 | 285 | if ($deploymentObject->host1_v4 !== NULL) { |
286 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
286 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
287 | 287 | } |
288 | 288 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
289 | 289 | echo "<br/>"; |
290 | 290 | } |
291 | 291 | if ($deploymentObject->host1_v6 !== NULL) { |
292 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
292 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
293 | 293 | } |
294 | 294 | ?> |
295 | 295 | </td> |
@@ -297,9 +297,9 @@ discard block |
||
297 | 297 | <td><?php echo $deploymentObject->port1; ?></td> |
298 | 298 | <td> |
299 | 299 | <?php |
300 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
301 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
302 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
300 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
301 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
302 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
303 | 303 | ?> |
304 | 304 | </td> |
305 | 305 | </tr> |
@@ -307,22 +307,22 @@ discard block |
||
307 | 307 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
308 | 308 | <?php |
309 | 309 | if ($deploymentObject->host2_v4 !== NULL) { |
310 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
310 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
311 | 311 | } |
312 | 312 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
313 | 313 | echo "<br/>"; |
314 | 314 | } |
315 | 315 | if ($deploymentObject->host2_v6 !== NULL) { |
316 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
316 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
317 | 317 | } |
318 | 318 | ?></td> |
319 | 319 | <td><?php echo _("RADIUS port number: ") ?></td> |
320 | 320 | <td><?php echo $deploymentObject->port2; ?></td> |
321 | 321 | <td> |
322 | 322 | <?php |
323 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
324 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
325 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
323 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
324 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
325 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
326 | 326 | ?> |
327 | 327 | </td> |
328 | 328 | </tr> |
@@ -374,12 +374,12 @@ discard block |
||
374 | 374 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
375 | 375 | echo '<br>'; |
376 | 376 | if ($res['FAILURE'] == 2) { |
377 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
377 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
378 | 378 | } else { |
379 | 379 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
380 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
380 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
381 | 381 | } else { |
382 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
382 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
383 | 383 | } |
384 | 384 | } |
385 | 385 | } |
@@ -399,12 +399,12 @@ discard block |
||
399 | 399 | if ($res['FAILURE'] > 0) { |
400 | 400 | echo '<br>'; |
401 | 401 | if ($res['FAILURE'] == 2) { |
402 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
402 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
403 | 403 | } else { |
404 | 404 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
405 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
405 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
406 | 406 | } else { |
407 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
407 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
408 | 408 | } |
409 | 409 | } |
410 | 410 | } |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | <div> |
604 | 604 | <input type="hidden" name="consortium" value="eduroam"/> |
605 | 605 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
606 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
606 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
607 | 607 | </button> |
608 | 608 | |
609 | 609 | </div> |