@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | ( $_POST['consortium'] == "OpenRoaming" && count($myfed->getAttributes("fed:openroaming")) > 0 ) |
42 | 42 | ) |
43 | 43 | ) {*/ |
44 | - if (isset($_POST['consortium']) && $_POST['consortium'] == "eduroam") |
|
44 | + if (isset($_POST['consortium']) && $_POST['consortium'] == "eduroam") |
|
45 | 45 | { |
46 | 46 | $deployment = $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']); |
47 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '#profilebox_' . $deployment->identifier); |
|
47 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'#profilebox_'.$deployment->identifier); |
|
48 | 48 | exit(0); |
49 | 49 | } else { |
50 | 50 | throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!"); |
@@ -101,23 +101,23 @@ discard block |
||
101 | 101 | if (isset($_POST['agreement']) && $_POST['agreement'] == "true") { |
102 | 102 | $deployment->addAttribute("hiddenmanagedsp:tou_accepted", NULL, 1); |
103 | 103 | } |
104 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '#profilebox_' . $deployment->identifier); |
|
104 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'#profilebox_'.$deployment->identifier); |
|
105 | 105 | exit(0); |
106 | 106 | case web\lib\common\FormElements::BUTTON_DELETE: |
107 | 107 | $response = $deployment->setRADIUSconfig(); |
108 | 108 | if (in_array('OK', $response)) { |
109 | 109 | $deployment->deactivate(); |
110 | 110 | } |
111 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)) . '#profilebox_' . |
|
111 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)).'#profilebox_'. |
|
112 | 112 | $deployment->identifier); |
113 | 113 | exit(0); |
114 | 114 | case web\lib\common\FormElements::BUTTON_REMOVESP: |
115 | 115 | $deployment->remove(); |
116 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier); |
|
116 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier); |
|
117 | 117 | exit(0); |
118 | 118 | case web\lib\common\FormElements::BUTTON_RENEWTLS: |
119 | 119 | $deployment->renewtls(); |
120 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier); |
|
120 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier); |
|
121 | 121 | exit(0); |
122 | 122 | case web\lib\common\FormElements::BUTTON_ACTIVATE: |
123 | 123 | if (count($deployment->getAttributes("hiddenmanagedsp:tou_accepted")) > 0) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if (in_array('OK', $response)) { |
126 | 126 | $deployment->activate(); |
127 | 127 | } |
128 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)) . '#profilebox_' . $deployment->identifier); |
|
128 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)).'#profilebox_'.$deployment->identifier); |
|
129 | 129 | exit(0); |
130 | 130 | } else { |
131 | 131 | throw new Exception("Activate button pushed without acknowledged ToUs!"); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } else { |
155 | 155 | $response = ['NOOP', 'NOOP']; |
156 | 156 | } |
157 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)) . '#profilebox_' . $deployment->identifier); |
|
157 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)).'#profilebox_'.$deployment->identifier); |
|
158 | 158 | exit(0); |
159 | 159 | default: |
160 | 160 | throw new Exception("Unknown button action requested!"); |
@@ -163,10 +163,10 @@ discard block |
||
163 | 163 | if (isset($_POST['command'])) { |
164 | 164 | switch ($_POST['command']) { |
165 | 165 | case web\lib\common\FormElements::BUTTON_CLOSE: |
166 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier) . '#profilebox_' . $deployment->identifier; |
|
166 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier).'#profilebox_'.$deployment->identifier; |
|
167 | 167 | exit(0); |
168 | 168 | default: |
169 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '#profilebox_' . $deployment->identifier); |
|
169 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'#profilebox_'.$deployment->identifier); |
|
170 | 170 | exit(0); |
171 | 171 | } |
172 | 172 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | echo $uiElements->instLevelInfoBoxes($my_inst); |
194 | 194 | $deploymentOptions = $deployment->getAttributes(); |
195 | 195 | echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'> |
196 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
196 | + <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>"; |
|
197 | 197 | $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE); |
198 | 198 | ?> |
199 | 199 | <fieldset class='option_container' id='managedsp_override'> |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <!-- input for VLAN identifier for home users--> |
228 | 228 | <td> |
229 | 229 | <span id='vlan_label'> |
230 | - <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?> |
|
230 | + <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?> |
|
231 | 231 | </span> |
232 | 232 | </td> |
233 | 233 | <td> |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | </fieldset> |
248 | 248 | |
249 | 249 | <?php |
250 | - echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
250 | + echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
251 | 251 | echo $deco->footer(); |
252 | 252 | |
253 | 253 | |
254 | 254 | \ No newline at end of file |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | |
32 | 32 | function displaySilverbulletPropertyWidget(&$theProfile, $readonly, &$uiElements) { |
33 | 33 | ?> |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | <ul style='margin:1px'> |
45 | 45 | <?php |
46 | 46 | foreach ($completeness as $missing_attrib) { |
47 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
47 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
48 | 48 | } |
49 | 49 | ?> |
50 | 50 | </ul> |
51 | 51 | </div> |
52 | 52 | <?php |
53 | 53 | } else { |
54 | - 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 | + 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); |
|
55 | 55 | } |
56 | 56 | ?> |
57 | 57 | <br/> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if ($readonly === FALSE) { |
61 | 61 | ?> |
62 | 62 | <form action='edit_silverbullet.php?inst_id=<?php echo $theProfile->institution; ?>&profile_id=<?php echo $theProfile->identifier; ?>' method='POST'> |
63 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
63 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
64 | 64 | </form> |
65 | 65 | <?php |
66 | 66 | } |
@@ -96,21 +96,21 @@ discard block |
||
96 | 96 | $has_overrides = TRUE; |
97 | 97 | } |
98 | 98 | } |
99 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
99 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
100 | 100 | $typelist = $theProfile->getEapMethodsinOrderOfPreference(); |
101 | 101 | $allcomplete = TRUE; |
102 | 102 | foreach ($typelist as $eaptype) { |
103 | 103 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
104 | 104 | $completeness = $theProfile->isEapTypeDefinitionComplete($eaptype); |
105 | 105 | if ($completeness === true) { |
106 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
106 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
107 | 107 | } else { |
108 | 108 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
109 | 109 | $buffer_eaptypediv .= _("Information needed!"); |
110 | 110 | if (is_array($completeness)) { |
111 | 111 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
112 | 112 | foreach ($completeness as $missing_attrib) { |
113 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
113 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
114 | 114 | } |
115 | 115 | $buffer_eaptypediv .= "</ul>"; |
116 | 116 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | foreach ($attribs as $attrib) { |
123 | 123 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
124 | 124 | $justOnce = TRUE; |
125 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
125 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | $buffer_eaptypediv .= "<br/>"; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | if ($theProfile->isRedirected()) { |
149 | 149 | $iconData = $uiElements->iconData('PROFILES_REDIRECTED'); |
150 | 150 | $iconData['text'] = _("Profile redirected"); |
151 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
151 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
152 | 152 | |
153 | 153 | } |
154 | 154 | |
@@ -156,15 +156,15 @@ discard block |
||
156 | 156 | switch ($certStatus) { |
157 | 157 | case core\AbstractProfile::CERT_STATUS_OK: |
158 | 158 | $iconData = $uiElements->iconData('CERT_STATUS_OK'); |
159 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
159 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
160 | 160 | break; |
161 | 161 | case core\AbstractProfile::CERT_STATUS_WARN: |
162 | 162 | $iconData = $uiElements->iconData('CERT_STATUS_WARN'); |
163 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
163 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
164 | 164 | break; |
165 | 165 | case core\AbstractProfile::CERT_STATUS_ERROR: |
166 | 166 | $iconData = $uiElements->iconData('CERT_STATUS_ERROR'); |
167 | - $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData)); |
|
167 | + $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData)); |
|
168 | 168 | break; |
169 | 169 | } |
170 | 170 | $buffer_headline .= "</div>"; |
@@ -190,11 +190,11 @@ discard block |
||
190 | 190 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
191 | 191 | $diagUrl = "../diag/"; |
192 | 192 | } else { |
193 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
193 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
194 | 194 | } |
195 | 195 | ?> |
196 | - <form action='<?php echo $diagUrl . "action_realmcheck.php?inst_id=" . $theProfile->institution . "&profile_id=" . $theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
197 | - <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link . $_SERVER['SCRIPT_NAME']); ?>'/> |
|
196 | + <form action='<?php echo $diagUrl."action_realmcheck.php?inst_id=".$theProfile->institution."&profile_id=".$theProfile->identifier ?>' method='post' accept-charset='UTF-8'> |
|
197 | + <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link.$_SERVER['SCRIPT_NAME']); ?>'/> |
|
198 | 198 | <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!"); ?>'> |
199 | 199 | <?php echo _("Check realm reachability"); ?> |
200 | 200 | </button> |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | ?> |
242 | 242 | <div style='display: flex;'> |
243 | 243 | <?php |
244 | - $idpLevelUrl = $link . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $theProfile->institution; |
|
245 | - $displayurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
246 | - $QRurl = $idpLevelUrl . "&profile=" . $theProfile->identifier; |
|
244 | + $idpLevelUrl = $link.dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$theProfile->institution; |
|
245 | + $displayurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
246 | + $QRurl = $idpLevelUrl."&profile=".$theProfile->identifier; |
|
247 | 247 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
248 | 248 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
249 | 249 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -255,9 +255,9 @@ discard block |
||
255 | 255 | if (empty($rawQr)) { |
256 | 256 | throw new Exception("Something went seriously wrong during QR code generation!"); |
257 | 257 | } |
258 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
258 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
259 | 259 | $size = getimagesize($uri); |
260 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
260 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
261 | 261 | |
262 | 262 | //echo "<nobr>$displayurl</nobr></a>"; |
263 | 263 | echo "<p>$displayurl</p></a>"; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $radius_status = array(); |
287 | 287 | $radius_status[0] = $deploymentObject->radius_status_1; |
288 | 288 | $radius_status[1] = $deploymentObject->radius_status_2; |
289 | - $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
289 | + $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem"); |
|
290 | 290 | $retry = $deploymentObject->checkRADIUSHostandConfigDaemon(); |
291 | 291 | if (is_array($retry)) { |
292 | 292 | foreach ($retry as $id => $stat) { |
@@ -297,11 +297,11 @@ discard block |
||
297 | 297 | } |
298 | 298 | ?> |
299 | 299 | <div style='display: table-row_id;'> |
300 | - <div class='profilebox' id="profilebox_<?php echo $deploymentObject->identifier;?>" style='display: table-cell;'> |
|
300 | + <div class='profilebox' id="profilebox_<?php echo $deploymentObject->identifier; ?>" style='display: table-cell;'> |
|
301 | 301 | <h2><?php |
302 | 302 | switch ($deploymentObject->consortium) { |
303 | 303 | case "eduroam": |
304 | - $displayname = config\ConfAssistant::CONSORTIUM['name'] . " " . core\DeploymentManaged::PRODUCTNAME; |
|
304 | + $displayname = config\ConfAssistant::CONSORTIUM['name']." ".core\DeploymentManaged::PRODUCTNAME; |
|
305 | 305 | break; |
306 | 306 | case "OpenRoaming": |
307 | 307 | $displayname = "OpenRoaming ANP"; |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | default: |
310 | 310 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
311 | 311 | } |
312 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; |
|
312 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; |
|
313 | 313 | ?></h2> |
314 | 314 | <table> |
315 | 315 | <caption><?php echo _("Deployment Details"); ?></caption> |
@@ -324,13 +324,13 @@ discard block |
||
324 | 324 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
325 | 325 | <?php |
326 | 326 | if ($deploymentObject->host1_v4 !== NULL) { |
327 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
327 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
328 | 328 | } |
329 | 329 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
330 | 330 | echo "<br/>"; |
331 | 331 | } |
332 | 332 | if ($deploymentObject->host1_v6 !== NULL) { |
333 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
333 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
334 | 334 | } |
335 | 335 | ?> |
336 | 336 | </td> |
@@ -338,9 +338,9 @@ discard block |
||
338 | 338 | <td><?php echo $deploymentObject->port1; ?></td> |
339 | 339 | <td> |
340 | 340 | <?php |
341 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
342 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
343 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; |
|
341 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
342 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
343 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>"; |
|
344 | 344 | ?> |
345 | 345 | </td> |
346 | 346 | </tr> |
@@ -348,22 +348,22 @@ discard block |
||
348 | 348 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
349 | 349 | <?php |
350 | 350 | if ($deploymentObject->host2_v4 !== NULL) { |
351 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
351 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
352 | 352 | } |
353 | 353 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
354 | 354 | echo "<br/>"; |
355 | 355 | } |
356 | 356 | if ($deploymentObject->host2_v6 !== NULL) { |
357 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
357 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
358 | 358 | } |
359 | 359 | ?></td> |
360 | 360 | <td><?php echo _("RADIUS port number: ") ?></td> |
361 | 361 | <td><?php echo $deploymentObject->port2; ?></td> |
362 | 362 | <td> |
363 | 363 | <?php |
364 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
365 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
366 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; |
|
364 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
365 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
366 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>"; |
|
367 | 367 | ?> |
368 | 368 | </td> |
369 | 369 | </tr> |
@@ -379,28 +379,28 @@ discard block |
||
379 | 379 | <tr> |
380 | 380 | <td><strong><?php echo _("RADSEC over TLS credentials"); ?></strong></td> |
381 | 381 | <td> |
382 | - <input type="hidden" id="priv_key_data_<?php echo $deploymentObject->identifier;?>" value="<?php echo $deploymentObject->radsec_priv;?>"> |
|
383 | - <input type="hidden" id="cert_data_<?php echo $deploymentObject->identifier;?>" value="<?php echo $deploymentObject->radsec_cert;?>"> |
|
384 | - <input type="hidden" id="ca_cert_data" value="<?php echo $cacert;?>"> |
|
385 | - <button class="sp_priv_key" id="priv_key_<?php echo $deploymentObject->identifier;?>" name="showc" style="background-color: gray; color: white" type="submit"><?php echo _('private key');?></button> |
|
386 | - <button class="sp_cert" id="cert_<?php echo $deploymentObject->identifier;?>" name="showp" style="background-color: gray; color: white" type="submit"><?php echo _('certificate');?></button> |
|
387 | - <button class="ca_cert" name="showca" style="background-color: gray; color: white" type="submit"><?php echo _('CA certificate');?></button> |
|
388 | - <button name="sendzip" onclick="location.href='inc/sendzip.inc.php?inst_id=<?php echo $deploymentObject->institution;?>&dep_id=<?php echo $deploymentObject->identifier;?>'" style="background-color: gray; color: white" type="button"><?php echo _('download ZIP-file with full data');?></button> |
|
382 | + <input type="hidden" id="priv_key_data_<?php echo $deploymentObject->identifier; ?>" value="<?php echo $deploymentObject->radsec_priv; ?>"> |
|
383 | + <input type="hidden" id="cert_data_<?php echo $deploymentObject->identifier; ?>" value="<?php echo $deploymentObject->radsec_cert; ?>"> |
|
384 | + <input type="hidden" id="ca_cert_data" value="<?php echo $cacert; ?>"> |
|
385 | + <button class="sp_priv_key" id="priv_key_<?php echo $deploymentObject->identifier; ?>" name="showc" style="background-color: gray; color: white" type="submit"><?php echo _('private key'); ?></button> |
|
386 | + <button class="sp_cert" id="cert_<?php echo $deploymentObject->identifier; ?>" name="showp" style="background-color: gray; color: white" type="submit"><?php echo _('certificate'); ?></button> |
|
387 | + <button class="ca_cert" name="showca" style="background-color: gray; color: white" type="submit"><?php echo _('CA certificate'); ?></button> |
|
388 | + <button name="sendzip" onclick="location.href='inc/sendzip.inc.php?inst_id=<?php echo $deploymentObject->institution; ?>&dep_id=<?php echo $deploymentObject->identifier; ?>'" style="background-color: gray; color: white" type="button"><?php echo _('download ZIP-file with full data'); ?></button> |
|
389 | 389 | </td |
390 | 390 | </tr> |
391 | 391 | <tr> <td></td><td> |
392 | 392 | <?php |
393 | - echo _('Not valid after:') . ' '. date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s') . ' UTC'; |
|
394 | - $dleft = floor(($data['validTo_time_t']-time())/(24*60*60)); |
|
393 | + echo _('Not valid after:').' '.date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s').' UTC'; |
|
394 | + $dleft = floor(($data['validTo_time_t'] - time()) / (24 * 60 * 60)); |
|
395 | 395 | if ($dleft > 0) { |
396 | - echo '<br>' . _('Number of days to expiry:') . ' ' . $dleft; |
|
396 | + echo '<br>'._('Number of days to expiry:').' '.$dleft; |
|
397 | 397 | } else { |
398 | - echo '<br>' . _('If you are using RADSEC over TLS you should urgently renew your credentisls') . '!'; |
|
398 | + echo '<br>'._('If you are using RADSEC over TLS you should urgently renew your credentisls').'!'; |
|
399 | 399 | } |
400 | 400 | ?></td></tr> |
401 | 401 | <tr> <td></td><td> |
402 | 402 | <?php |
403 | - echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials') . '<br>' . |
|
403 | + echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials').'<br>'. |
|
404 | 404 | _('click on "Renew RADSEC over TLS credentials" button'); |
405 | 405 | ?> |
406 | 406 | </td></tr> |
@@ -411,14 +411,14 @@ discard block |
||
411 | 411 | <tr> |
412 | 412 | <td><strong><?php echo _("RADSEC TLS-PSK identity"); ?></strong></td> |
413 | 413 | <td> |
414 | - SP_<?php echo $deploymentObject->identifier . '-' . $deploymentObject->institution;?> |
|
414 | + SP_<?php echo $deploymentObject->identifier.'-'.$deploymentObject->institution; ?> |
|
415 | 415 | </td> |
416 | 416 | </tr> |
417 | 417 | |
418 | 418 | <tr> |
419 | 419 | <td><strong><?php echo _("RADSEC TLS-PSK key"); ?></strong></td> |
420 | 420 | <td> |
421 | - <?php echo $deploymentObject->pskkey;?> |
|
421 | + <?php echo $deploymentObject->pskkey; ?> |
|
422 | 422 | </td> |
423 | 423 | </tr> |
424 | 424 | <?php } ?> |
@@ -473,12 +473,12 @@ discard block |
||
473 | 473 | if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) { |
474 | 474 | echo '<br>'; |
475 | 475 | if ($res['FAILURE'] == 2) { |
476 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
476 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
477 | 477 | } else { |
478 | 478 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
479 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
479 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
480 | 480 | } else { |
481 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
481 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
482 | 482 | } |
483 | 483 | } |
484 | 484 | } |
@@ -513,12 +513,12 @@ discard block |
||
513 | 513 | if ($res['FAILURE'] > 0) { |
514 | 514 | echo '<br>'; |
515 | 515 | if ($res['FAILURE'] == 2) { |
516 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
516 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
517 | 517 | } else { |
518 | 518 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
519 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
519 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
520 | 520 | } else { |
521 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
521 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
522 | 522 | } |
523 | 523 | } |
524 | 524 | } |
@@ -546,24 +546,24 @@ discard block |
||
546 | 546 | </div> |
547 | 547 | <div style='width:20px;'></div> <!-- QR code space, reserved --> |
548 | 548 | <div style='display: table-cell; min-width:200px;'> |
549 | - <?php $tablecaption = _("Hotspot Usage Statistics");?> |
|
549 | + <?php $tablecaption = _("Hotspot Usage Statistics"); ?> |
|
550 | 550 | <h1><?php echo $tablecaption; ?></h1> |
551 | - <h2><?php echo _("5 most recent authentications");?></h2> |
|
552 | - <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)");?></p> |
|
551 | + <h2><?php echo _("5 most recent authentications"); ?></h2> |
|
552 | + <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)"); ?></p> |
|
553 | 553 | <table class='authrecord'> |
554 | - <caption><?php echo $tablecaption;?></caption> |
|
554 | + <caption><?php echo $tablecaption; ?></caption> |
|
555 | 555 | <tr style='text-align: left;'> |
556 | - <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th> |
|
557 | - <th scope="col"><strong><?php echo _("Realm");?></strong></th> |
|
558 | - <th scope="col"><strong><?php echo _("MAC Address");?></strong></th> |
|
559 | - <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th> |
|
560 | - <th scope="col"><strong><?php echo _("Result");?></strong></th> |
|
561 | - <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th> |
|
556 | + <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th> |
|
557 | + <th scope="col"><strong><?php echo _("Realm"); ?></strong></th> |
|
558 | + <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th> |
|
559 | + <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th> |
|
560 | + <th scope="col"><strong><?php echo _("Result"); ?></strong></th> |
|
561 | + <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th> |
|
562 | 562 | </tr> |
563 | 563 | <?php |
564 | - $userAuthData = $deploymentObject->retrieveStatistics(0,5); |
|
564 | + $userAuthData = $deploymentObject->retrieveStatistics(0, 5); |
|
565 | 565 | foreach ($userAuthData as $oneRecord) { |
566 | - echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>" |
|
566 | + echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>" |
|
567 | 567 | . "<td>".$oneRecord['activity_time']."</td>" |
568 | 568 | . "<td>".$oneRecord['realm']."</td>" |
569 | 569 | . "<td>".$oneRecord['mac']."</td>" |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | } |
756 | 756 | ?> |
757 | 757 | </h2> |
758 | - <?php if(count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?> |
|
758 | + <?php if (count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?> |
|
759 | 759 | <form method='post' action='sort_profiles.php?inst_id=<?php echo $my_inst->identifier; ?>' accept-charset='UTF-8'> |
760 | 760 | <div> |
761 | 761 | <button type='submit' name='profile_sorting'> |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | <div> |
825 | 825 | <input type="hidden" name="consortium" value="eduroam"/> |
826 | 826 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
827 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
827 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
828 | 828 | </button> |
829 | 829 | <span style='color: red;'> |
830 | 830 | <?php if ($hasMail == 0) { |
@@ -348,19 +348,19 @@ discard block |
||
348 | 348 | ); |
349 | 349 | // Generate a new private (and public) key pair |
350 | 350 | $privkey = openssl_pkey_new(array( |
351 | - "private_key_bits" => 4096, |
|
352 | - "private_key_type" => OPENSSL_KEYTYPE_RSA)); |
|
351 | + "private_key_bits" => 4096, |
|
352 | + "private_key_type" => OPENSSL_KEYTYPE_RSA)); |
|
353 | 353 | // export private key to $clientprivateKey (as string) |
354 | 354 | openssl_pkey_export($privkey, $this->radsec_priv); |
355 | 355 | // Generate a certificate signing request |
356 | 356 | $csr = openssl_csr_new($dn, $privkey, |
357 | - array('digest_alg' => 'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf")); |
|
357 | + array('digest_alg' => 'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf")); |
|
358 | 358 | // get CA certificate and private key |
359 | 359 | $caprivkey = array(file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.key"), |
360 | 360 | \config\Master::MANAGEDSP['capass']); |
361 | 361 | $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); |
362 | 362 | $clientcert = openssl_csr_sign($csr, $cacert, $caprivkey, \config\Master::MANAGEDSP['daystoexpiry'], |
363 | - array('digest_alg'=>'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf"), rand()); |
|
363 | + array('digest_alg'=>'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf"), rand()); |
|
364 | 364 | openssl_x509_export($clientcert, $this->radsec_cert); |
365 | 365 | } |
366 | 366 | /** |
@@ -479,9 +479,9 @@ discard block |
||
479 | 479 | */ |
480 | 480 | public function renewtls() |
481 | 481 | { |
482 | - $id = $this->identifier; |
|
483 | - $futureTlsClient = $this->createTLScredentials(); |
|
484 | - $this->databaseHandle->exec("UPDATE deployment SET radsec_priv = ?, radsec_cert = ? WHERE deployment_id = ?", "ssi", $this->radsec_priv, $this->radsec_cert, $id); |
|
482 | + $id = $this->identifier; |
|
483 | + $futureTlsClient = $this->createTLScredentials(); |
|
484 | + $this->databaseHandle->exec("UPDATE deployment SET radsec_priv = ?, radsec_cert = ? WHERE deployment_id = ?", "ssi", $this->radsec_priv, $this->radsec_cert, $id); |
|
485 | 485 | } |
486 | 486 | /** |
487 | 487 | * marks the deployment as deactivated |