@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id; |
251 | 251 | } |
252 | 252 | if ($clients > $maxSupportedClients * 0.9) { |
253 | - $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!"); |
|
253 | + $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!"); |
|
254 | 254 | } |
255 | 255 | } |
256 | 256 | if (count($serverCandidates) == 0 && $federation != "DEFAULT") { |
@@ -281,28 +281,28 @@ discard block |
||
281 | 281 | $ourLocation = ['lon' => $geoip['geo']['lon'], 'lat' => $geoip['geo']['lat']]; |
282 | 282 | } |
283 | 283 | $inst = new IdP($this->institution); |
284 | - $ourserver = $this->findGoodServerLocation($ourLocation, $inst->federation , []); |
|
284 | + $ourserver = $this->findGoodServerLocation($ourLocation, $inst->federation, []); |
|
285 | 285 | // now, find an unused port in the preferred server |
286 | 286 | $foundFreePort1 = 0; |
287 | 287 | while ($foundFreePort1 == 0) { |
288 | 288 | $portCandidate = random_int(1200, 65535); |
289 | - $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '" . $ourserver . "' AND port_instance_1 = $portCandidate"); |
|
289 | + $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '".$ourserver."' AND port_instance_1 = $portCandidate"); |
|
290 | 290 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) { |
291 | 291 | $foundFreePort1 = $portCandidate; |
292 | 292 | } |
293 | 293 | } |
294 | - $ourSecondServer = $this->findGoodServerLocation($ourLocation, $inst->federation , [$ourserver]); |
|
294 | + $ourSecondServer = $this->findGoodServerLocation($ourLocation, $inst->federation, [$ourserver]); |
|
295 | 295 | $foundFreePort2 = 0; |
296 | 296 | while ($foundFreePort2 == 0) { |
297 | 297 | $portCandidate = random_int(1200, 65535); |
298 | - $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '" . $ourSecondServer . "' AND port_instance_2 = $portCandidate"); |
|
298 | + $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '".$ourSecondServer."' AND port_instance_2 = $portCandidate"); |
|
299 | 299 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) { |
300 | 300 | $foundFreePort2 = $portCandidate; |
301 | 301 | } |
302 | 302 | } |
303 | 303 | // and make up a shared secret that is halfways readable |
304 | 304 | $futureSecret = $this->randomString(16, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); |
305 | - $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '" . $ourserver . "', radius_instance_2 = '" . $ourSecondServer . "', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret' WHERE deployment_id = $this->identifier"); |
|
305 | + $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '".$ourserver."', radius_instance_2 = '".$ourSecondServer."', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret' WHERE deployment_id = $this->identifier"); |
|
306 | 306 | return ["port_instance_1" => $foundFreePort1, "port_instance_2" => $foundFreePort2, "secret" => $futureSecret, "radius_instance_1" => $ourserver, "radius_instance_2" => $ourserver]; |
307 | 307 | } |
308 | 308 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | * @return void |
346 | 346 | */ |
347 | 347 | public function deactivate() { |
348 | - $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::INACTIVE . " WHERE deployment_id = $this->identifier"); |
|
348 | + $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::INACTIVE." WHERE deployment_id = $this->identifier"); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * @return void |
356 | 356 | */ |
357 | 357 | public function activate() { |
358 | - $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::ACTIVE . " WHERE deployment_id = $this->identifier"); |
|
358 | + $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::ACTIVE." WHERE deployment_id = $this->identifier"); |
|
359 | 359 | } |
360 | 360 | |
361 | 361 | /** |
@@ -381,15 +381,15 @@ discard block |
||
381 | 381 | public function sendToRADIUS($idx, $post) { |
382 | 382 | |
383 | 383 | $hostname = "radius_hostname_$idx"; |
384 | - $ch = curl_init( "http://" . $this->$hostname ); |
|
384 | + $ch = curl_init("http://".$this->$hostname); |
|
385 | 385 | if ($ch) { |
386 | - curl_setopt( $ch, CURLOPT_POST, 1); |
|
387 | - curl_setopt( $ch, CURLOPT_POSTFIELDS, $post); |
|
388 | - $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ": $post\n"); |
|
389 | - curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); |
|
390 | - curl_setopt( $ch, CURLOPT_HEADER, 0); |
|
391 | - curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); |
|
392 | - $res = curl_exec( $ch ); |
|
386 | + curl_setopt($ch, CURLOPT_POST, 1); |
|
387 | + curl_setopt($ch, CURLOPT_POSTFIELDS, $post); |
|
388 | + $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.": $post\n"); |
|
389 | + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
|
390 | + curl_setopt($ch, CURLOPT_HEADER, 0); |
|
391 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
392 | + $res = curl_exec($ch); |
|
393 | 393 | if ($res === FALSE) { |
394 | 394 | $res = 'FAILURE'; |
395 | 395 | } |
@@ -398,35 +398,35 @@ discard block |
||
398 | 398 | } else { |
399 | 399 | $res = 'FAILURE'; |
400 | 400 | } |
401 | - $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = " . ($res == 'OK'? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE) . " WHERE deployment_id = $this->identifier"); |
|
401 | + $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = ".($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE)." WHERE deployment_id = $this->identifier"); |
|
402 | 402 | return $res; |
403 | 403 | } |
404 | 404 | |
405 | 405 | private function sendMailtoAdmin($remove, $response) { |
406 | 406 | $txt = ''; |
407 | 407 | if ($remove) { |
408 | - $txt = _('Profile dectivation failed' . ' '); |
|
408 | + $txt = _('Profile dectivation failed'.' '); |
|
409 | 409 | } else { |
410 | - $txt = _('Profile activation/modification failed' . ' '); |
|
410 | + $txt = _('Profile activation/modification failed'.' '); |
|
411 | 411 | } |
412 | 412 | if (array_count_values($response)['FAILURE'] == 2) { |
413 | - $txt = $txt . _('on both RADIUS servers: primary and backup') . '.'; |
|
413 | + $txt = $txt._('on both RADIUS servers: primary and backup').'.'; |
|
414 | 414 | } else { |
415 | 415 | if ($response['res[1]'] == 'FAILURE') { |
416 | - $txt = $txt . _('on primary RADIUS server') . '.'; |
|
416 | + $txt = $txt._('on primary RADIUS server').'.'; |
|
417 | 417 | } else { |
418 | - $txt = $txt . _('on backup RADIUS server') . '.'; |
|
418 | + $txt = $txt._('on backup RADIUS server').'.'; |
|
419 | 419 | } |
420 | 420 | } |
421 | 421 | $mail = \core\common\OutsideComm::mailHandle(); |
422 | 422 | $email = $this->getAttributes("support:email")[0]['value']; |
423 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System"; |
|
423 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System"; |
|
424 | 424 | $mail->addAddress($email); |
425 | 425 | $mail->Subject = _('RADIUS profile update problem'); |
426 | 426 | $mail->Body = $txt; |
427 | 427 | |
428 | 428 | $sent = $mail->send(); |
429 | - $this->loggerInstance->debug(1, 'TO SEND: ' . $email . ' ' . $txt); |
|
429 | + $this->loggerInstance->debug(1, 'TO SEND: '.$email.' '.$txt); |
|
430 | 430 | } |
431 | 431 | /** |
432 | 432 | * prepare request to add/modify RADIUS settings for given deployment |
@@ -436,12 +436,12 @@ discard block |
||
436 | 436 | */ |
437 | 437 | public function setRADIUSconfig($remove = 0) { |
438 | 438 | $toPost = array(1 => '', 2 => ''); |
439 | - $toPost[1] = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&'; |
|
439 | + $toPost[1] = 'instid='.$this->institution.'&deploymentid='.$this->identifier.'&secret='.$this->secret.'&country='.$this->getAttributes("internal:country")[0]['value'].'&'; |
|
440 | 440 | if ($remove) { |
441 | - $toPost[1] = $toPost[1] . 'remove=1&'; |
|
441 | + $toPost[1] = $toPost[1].'remove=1&'; |
|
442 | 442 | } else { |
443 | 443 | if ($this->getAttributes("managedsp:operatorname")[0]['value'] ?? NULL) { |
444 | - $toPost[1] = $toPost[1] . 'operatorname=' . $this->getAttributes("managedsp:operatorname")[0]['value'] . '&'; |
|
444 | + $toPost[1] = $toPost[1].'operatorname='.$this->getAttributes("managedsp:operatorname")[0]['value'].'&'; |
|
445 | 445 | } |
446 | 446 | if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) { |
447 | 447 | $idp = new IdP($this->institution); |
@@ -458,16 +458,16 @@ discard block |
||
458 | 458 | } |
459 | 459 | } |
460 | 460 | if (!empty($allRealms)) { |
461 | - $toPost[1] = $toPost[1] . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&'; |
|
462 | - $toPost[1] = $toPost[1] . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&'; |
|
461 | + $toPost[1] = $toPost[1].'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&'; |
|
462 | + $toPost[1] = $toPost[1].'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&'; |
|
463 | 463 | } |
464 | 464 | } |
465 | 465 | } |
466 | 466 | $toPost[2] = $toPost[1]; |
467 | - $toPost[1] = $toPost[1] . 'port=' . $this->port1; |
|
468 | - $toPost[2] = $toPost[2] . 'port=' . $this->port2; |
|
467 | + $toPost[1] = $toPost[1].'port='.$this->port1; |
|
468 | + $toPost[2] = $toPost[2].'port='.$this->port2; |
|
469 | 469 | $response = array(); |
470 | - for ($idx=1; $idx<=2; $idx++) { |
|
470 | + for ($idx = 1; $idx <= 2; $idx++) { |
|
471 | 471 | $response['res['.$idx.']'] = $this->sendToRADIUS($idx, $toPost[$idx]); |
472 | 472 | } |
473 | 473 | if (in_array('FAILURE', $response)) { |
@@ -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 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | if (!isset($_GET['deployment_id'])) { |
38 | 38 | $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED); |
39 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier); |
|
39 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier); |
|
40 | 40 | exit(0); |
41 | 41 | } |
42 | 42 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | if (in_array('OK', $response)) { |
51 | 51 | $deployment->deactivate(); |
52 | 52 | } |
53 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
53 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
54 | 54 | exit(0); |
55 | 55 | } |
56 | 56 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (in_array('OK', $response)) { |
60 | 60 | $deployment->activate(); |
61 | 61 | } |
62 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
62 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
63 | 63 | exit(0); |
64 | 64 | } |
65 | 65 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $res = $deployment->setRADIUSconfig(); |
82 | 82 | $addParam = "&res=$res"; |
83 | 83 | } |
84 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . $addParam); |
|
84 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier.$addParam); |
|
85 | 85 | exit(0); |
86 | 86 | } |
87 | 87 | } |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | echo $uiElements->instLevelInfoBoxes($my_inst); |
110 | 110 | $deploymentOptions = $deployment->getAttributes(); |
111 | 111 | 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'> |
112 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
112 | + <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>"; |
|
113 | 113 | $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, "Profile"); |
114 | 114 | ?> |
115 | 115 | <?php |
116 | 116 | echo "<fieldset class='option_container' id='managedsp_override'> |
117 | - <legend><strong>" . _("Options for this deployment") . "</strong></legend>"; |
|
117 | + <legend><strong>" . _("Options for this deployment")."</strong></legend>"; |
|
118 | 118 | ?> |
119 | 119 | <table> |
120 | 120 | <tr> |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | <!-- input for VLAN identifier for home users--> |
133 | 133 | <td> |
134 | 134 | <span id='vlan_label'> |
135 | - <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?> |
|
135 | + <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?> |
|
136 | 136 | </span> |
137 | 137 | </td> |
138 | 138 | <td> |
@@ -147,10 +147,10 @@ discard block |
||
147 | 147 | </table> |
148 | 148 | <?php |
149 | 149 | echo $optionDisplay->prefilledOptionTable("managedsp"); |
150 | - echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>" . _("Add new option") . "</button>"; |
|
150 | + echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>"._("Add new option")."</button>"; |
|
151 | 151 | echo "</fieldset>"; |
152 | 152 | |
153 | 153 | |
154 | - 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_sp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
154 | + 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_sp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
155 | 155 | echo $deco->footer(); |
156 | 156 |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | <td> |
151 | 151 | <?php |
152 | 152 | echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
153 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
154 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
153 | + "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
154 | + "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
155 | 155 | ?> |
156 | 156 | </td> |
157 | 157 | </tr> |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | <td> |
174 | 174 | <?php |
175 | 175 | echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
176 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
177 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
176 | + "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
177 | + "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
178 | 178 | ?> |
179 | 179 | </td> |
180 | 180 | </tr> |
@@ -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 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | $link = 'http://'; |
40 | 40 | } |
41 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
41 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
42 | 42 | $link = htmlspecialchars($link); |
43 | 43 | |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot)); |
@@ -93,21 +93,21 @@ discard block |
||
93 | 93 | <?php |
94 | 94 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
95 | 95 | echo "<tr> |
96 | - <td>" . _("Check another realm's reachability") . "</td> |
|
96 | + <td>" . _("Check another realm's reachability")."</td> |
|
97 | 97 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
98 | 98 | <input type='text' name='realm' id='realm'> |
99 | 99 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
100 | - <button type='submit'>" . _("Go!") . "</button> |
|
100 | + <button type='submit'>"._("Go!")."</button> |
|
101 | 101 | </form> |
102 | 102 | </td> |
103 | 103 | </tr>"; |
104 | 104 | } |
105 | 105 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED |
106 | 106 | echo "<tr> |
107 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
107 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
108 | 108 | <td> |
109 | 109 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
110 | - <button type='submit'>" . _("Go!") . "</button> |
|
110 | + <button type='submit'>" . _("Go!")."</button> |
|
111 | 111 | </form> |
112 | 112 | </td> |
113 | 113 | </tr>"; |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | <?php |
119 | 119 | $hotspotProfiles = $my_inst->listDeployments(); |
120 | 120 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
121 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
121 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
122 | 122 | } |
123 | 123 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
124 | - echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
124 | + echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>"; |
|
125 | 125 | // display an info box with the connection data |
126 | 126 | } |
127 | 127 | |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | ?> |
130 | 130 | <div style='display: table-row; margin-bottom: 20px;'> |
131 | 131 | <div class='profilebox' style='display: table-cell;'> |
132 | - <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
132 | + <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
133 | 133 | <table> |
134 | 134 | <tr> |
135 | 135 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
136 | 136 | <?php |
137 | 137 | if ($deploymentObject->host1_v4 !== NULL) { |
138 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
138 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
139 | 139 | } |
140 | 140 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
141 | 141 | echo "<br/>"; |
142 | 142 | } |
143 | 143 | if ($deploymentObject->host1_v6 !== NULL) { |
144 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
144 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
145 | 145 | } |
146 | 146 | ?> |
147 | 147 | </td> |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | <td><?php echo $deploymentObject->port1; ?></td> |
150 | 150 | <td> |
151 | 151 | <?php |
152 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
153 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
154 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
152 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
153 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
154 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
155 | 155 | ?> |
156 | 156 | </td> |
157 | 157 | </tr> |
@@ -159,22 +159,22 @@ discard block |
||
159 | 159 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
160 | 160 | <?php |
161 | 161 | if ($deploymentObject->host2_v4 !== NULL) { |
162 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
162 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
163 | 163 | } |
164 | 164 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
165 | 165 | echo "<br/>"; |
166 | 166 | } |
167 | 167 | if ($deploymentObject->host2_v6 !== NULL) { |
168 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
168 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
169 | 169 | } |
170 | 170 | ?></td> |
171 | 171 | <td><?php echo _("RADIUS port number: ") ?></td> |
172 | 172 | <td><?php echo $deploymentObject->port2; ?></td> |
173 | 173 | <td> |
174 | 174 | <?php |
175 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
176 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
177 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
175 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
176 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
177 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
178 | 178 | ?> |
179 | 179 | </td> |
180 | 180 | </tr> |
@@ -225,12 +225,12 @@ discard block |
||
225 | 225 | if ($res['FAILURE'] > 0) { |
226 | 226 | echo '<br>'; |
227 | 227 | if ($res['FAILURE'] == 2) { |
228 | - echo ' <span style="color: red;">' . _("Activation failure, your request is queued for handling.") . '</span>'; |
|
228 | + echo ' <span style="color: red;">'._("Activation failure, your request is queued for handling.").'</span>'; |
|
229 | 229 | } else { |
230 | 230 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
231 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
231 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
232 | 232 | } else { |
233 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
233 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
234 | 234 | } |
235 | 235 | } |
236 | 236 | } |
@@ -250,12 +250,12 @@ discard block |
||
250 | 250 | if ($res['FAILURE'] > 0) { |
251 | 251 | echo '<br>'; |
252 | 252 | if ($res['FAILURE'] == 2) { |
253 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
253 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
254 | 254 | } else { |
255 | 255 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
256 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
256 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
257 | 257 | } else { |
258 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
258 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
259 | 259 | } |
260 | 260 | } |
261 | 261 | } |