@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id; |
| 271 | 271 | } |
| 272 | 272 | if ($clients > $maxSupportedClients * 0.9) { |
| 273 | - $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!"); |
|
| 273 | + $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!"); |
|
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | 276 | if (count($serverCandidates) == 0 && $federation != "DEFAULT") { |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | return $this->findGoodServerLocation($adminLocation, "DEFAULT", $blacklistedServers, $this->consortium); |
| 280 | 280 | } |
| 281 | 281 | if (count($serverCandidates) == 0) { |
| 282 | - throw new Exception("No available server found for new SP! $federation " . /** @scrutinizer ignore-type */ print_r($serverCandidates, true)); |
|
| 282 | + throw new Exception("No available server found for new SP! $federation "./** @scrutinizer ignore-type */ print_r($serverCandidates, true)); |
|
| 283 | 283 | } |
| 284 | 284 | // put the nearest server on top of the list |
| 285 | 285 | ksort($serverCandidates); |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | $foundFreePort1 = 0; |
| 308 | 308 | while ($foundFreePort1 == 0) { |
| 309 | 309 | $portCandidate = random_int(1200, 65535); |
| 310 | - $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '" . $ourserver . "' AND port_instance_1 = $portCandidate"); |
|
| 310 | + $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '".$ourserver."' AND port_instance_1 = $portCandidate"); |
|
| 311 | 311 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) { |
| 312 | 312 | $foundFreePort1 = $portCandidate; |
| 313 | 313 | } |
@@ -316,14 +316,14 @@ discard block |
||
| 316 | 316 | $foundFreePort2 = 0; |
| 317 | 317 | while ($foundFreePort2 == 0) { |
| 318 | 318 | $portCandidate = random_int(1200, 65535); |
| 319 | - $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '" . $ourSecondServer . "' AND port_instance_2 = $portCandidate"); |
|
| 319 | + $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '".$ourSecondServer."' AND port_instance_2 = $portCandidate"); |
|
| 320 | 320 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) { |
| 321 | 321 | $foundFreePort2 = $portCandidate; |
| 322 | 322 | } |
| 323 | 323 | } |
| 324 | 324 | // and make up a shared secret that is halfways readable |
| 325 | 325 | $futureSecret = $this->randomString(16, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); |
| 326 | - $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '" . $ourserver . "', radius_instance_2 = '" . $ourSecondServer . "', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret', consortium = '$this->consortium' WHERE deployment_id = $this->identifier"); |
|
| 326 | + $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '".$ourserver."', radius_instance_2 = '".$ourSecondServer."', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret', consortium = '$this->consortium' WHERE deployment_id = $this->identifier"); |
|
| 327 | 327 | return ["port_instance_1" => $foundFreePort1, "port_instance_2" => $foundFreePort2, "secret" => $futureSecret, "radius_instance_1" => $ourserver, "radius_instance_2" => $ourserver]; |
| 328 | 328 | } |
| 329 | 329 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | public function deactivate() |
| 372 | 372 | { |
| 373 | - $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::INACTIVE . " WHERE deployment_id = $this->identifier"); |
|
| 373 | + $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::INACTIVE." WHERE deployment_id = $this->identifier"); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | */ |
| 382 | 382 | public function activate() |
| 383 | 383 | { |
| 384 | - $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::ACTIVE . " WHERE deployment_id = $this->identifier"); |
|
| 384 | + $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::ACTIVE." WHERE deployment_id = $this->identifier"); |
|
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | /** |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | { |
| 394 | 394 | $customAttrib = $this->getAttributes("managedsp:operatorname"); |
| 395 | 395 | if (count($customAttrib) == 0) { |
| 396 | - return "1sp." . $this->identifier . "-" . $this->institution . \config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
| 396 | + return "1sp.".$this->identifier."-".$this->institution.\config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
| 397 | 397 | } |
| 398 | 398 | return $customAttrib[0]["value"]; |
| 399 | 399 | } |
@@ -409,13 +409,13 @@ discard block |
||
| 409 | 409 | { |
| 410 | 410 | |
| 411 | 411 | $hostname = "radius_hostname_$idx"; |
| 412 | - $ch = curl_init("http://" . $this->$hostname); |
|
| 412 | + $ch = curl_init("http://".$this->$hostname); |
|
| 413 | 413 | if ($ch === FALSE) { |
| 414 | 414 | $res = 'FAILURE'; |
| 415 | 415 | } else { |
| 416 | 416 | curl_setopt($ch, CURLOPT_POST, 1); |
| 417 | 417 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post); |
| 418 | - $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ": $post\n"); |
|
| 418 | + $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.": $post\n"); |
|
| 419 | 419 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
| 420 | 420 | curl_setopt($ch, CURLOPT_HEADER, 0); |
| 421 | 421 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | $this->loggerInstance->debug(1, $this); |
| 432 | 432 | } |
| 433 | 433 | $this->loggerInstance->debug(1, "Database update"); |
| 434 | - $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = " . ($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE) . " WHERE deployment_id = $this->identifier"); |
|
| 434 | + $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = ".($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE)." WHERE deployment_id = $this->identifier"); |
|
| 435 | 435 | return $res; |
| 436 | 436 | } |
| 437 | 437 | |
@@ -452,19 +452,19 @@ discard block |
||
| 452 | 452 | } else { |
| 453 | 453 | $txt = $remove ? _('Profile dectivation failed') : _('Profile activation/modification failed'); |
| 454 | 454 | } |
| 455 | - $txt = $txt . ' '; |
|
| 455 | + $txt = $txt.' '; |
|
| 456 | 456 | if (array_count_values($response)[$status] == 2) { |
| 457 | - $txt = $txt . _('on both RADIUS servers: primary and backup') . '.'; |
|
| 457 | + $txt = $txt._('on both RADIUS servers: primary and backup').'.'; |
|
| 458 | 458 | } else { |
| 459 | 459 | if ($response['res[1]'] == $status) { |
| 460 | - $txt = $txt . _('on primary RADIUS server') . '.'; |
|
| 460 | + $txt = $txt._('on primary RADIUS server').'.'; |
|
| 461 | 461 | } else { |
| 462 | - $txt = $txt . _('on backup RADIUS server') . '.'; |
|
| 462 | + $txt = $txt._('on backup RADIUS server').'.'; |
|
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | $mail = \core\common\OutsideComm::mailHandle(); |
| 466 | 466 | $email = $this->getAttributes("support:email")[0]['value']; |
| 467 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System"; |
|
| 467 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System"; |
|
| 468 | 468 | $mail->addAddress($email); |
| 469 | 469 | if ($status == 'OK') { |
| 470 | 470 | $mail->Subject = _('RADIUS profile update problem fixed'); |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | return NULL; |
| 499 | 499 | } |
| 500 | 500 | $timeout = 10; |
| 501 | - curl_setopt($ch, CURLOPT_URL, 'http://' . $host); |
|
| 501 | + curl_setopt($ch, CURLOPT_URL, 'http://'.$host); |
|
| 502 | 502 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 503 | 503 | curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
| 504 | 504 | curl_exec($ch); |
@@ -590,35 +590,35 @@ discard block |
||
| 590 | 590 | { |
| 591 | 591 | $remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1; |
| 592 | 592 | $toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => '')); |
| 593 | - $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&'; |
|
| 593 | + $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier.'&secret='.$this->secret.'&country='.$this->getAttributes("internal:country")[0]['value'].'&'; |
|
| 594 | 594 | if ($remove) { |
| 595 | - $toPostTemplate = $toPostTemplate . 'remove=1&'; |
|
| 595 | + $toPostTemplate = $toPostTemplate.'remove=1&'; |
|
| 596 | 596 | } else { |
| 597 | 597 | if ($this->getAttributes("managedsp:operatorname")[0]['value'] ?? NULL) { |
| 598 | - $toPostTemplate = $toPostTemplate . 'operatorname=' . $this->getAttributes("managedsp:operatorname")[0]['value'] . '&'; |
|
| 598 | + $toPostTemplate = $toPostTemplate.'operatorname='.$this->getAttributes("managedsp:operatorname")[0]['value'].'&'; |
|
| 599 | 599 | } |
| 600 | 600 | if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) { |
| 601 | 601 | $allRealms = $this->getAllRealms(); |
| 602 | 602 | if (!empty($allRealms)) { |
| 603 | - $toPostTemplate = $toPostTemplate . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&'; |
|
| 604 | - $toPostTemplate = $toPostTemplate . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&'; |
|
| 603 | + $toPostTemplate = $toPostTemplate.'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&'; |
|
| 604 | + $toPostTemplate = $toPostTemplate.'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&'; |
|
| 605 | 605 | } |
| 606 | 606 | } |
| 607 | 607 | } |
| 608 | 608 | foreach (array_keys($toPost) as $key) { |
| 609 | - $elem = 'port' . $key; |
|
| 610 | - $toPost[$key] = $toPostTemplate . 'port=' . $this->$elem; |
|
| 609 | + $elem = 'port'.$key; |
|
| 610 | + $toPost[$key] = $toPostTemplate.'port='.$this->$elem; |
|
| 611 | 611 | } |
| 612 | 612 | $response = array(); |
| 613 | 613 | foreach ($toPost as $key => $value) { |
| 614 | - $this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n"); |
|
| 615 | - $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]); |
|
| 614 | + $this->loggerInstance->debug(1, 'toPost '.$toPost[$key]."\n"); |
|
| 615 | + $response['res['.$key.']'] = $this->sendToRADIUS($key, $toPost[$key]); |
|
| 616 | 616 | } |
| 617 | 617 | if ($onlyone) { |
| 618 | - $response['res[' . ($onlyone == 1) ? 2 : 1 . ']'] = \core\AbstractDeployment::RADIUS_OK; |
|
| 618 | + $response['res['.($onlyone == 1) ? 2 : 1.']'] = \core\AbstractDeployment::RADIUS_OK; |
|
| 619 | 619 | } |
| 620 | 620 | foreach (array('OK', 'FAILURE') as $status) { |
| 621 | - if ( ( ($status == 'OK' && $notify) || ($status == 'FAILURE') ) && ( in_array($status, $response) ) ) { |
|
| 621 | + if ((($status == 'OK' && $notify) || ($status == 'FAILURE')) && (in_array($status, $response))) { |
|
| 622 | 622 | $this->sendMailtoAdmin($remove, $response, $status); |
| 623 | 623 | } |
| 624 | 624 | } |
@@ -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->nomenclatureParticipant)); |
@@ -165,14 +165,14 @@ discard block |
||
| 165 | 165 | <ul style='margin:1px'> |
| 166 | 166 | <?php |
| 167 | 167 | foreach ($completeness as $missing_attrib) { |
| 168 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
| 168 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
| 169 | 169 | } |
| 170 | 170 | ?> |
| 171 | 171 | </ul> |
| 172 | 172 | </div> |
| 173 | 173 | <?php |
| 174 | 174 | } else { |
| 175 | - echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $profile_list->realm); |
|
| 175 | + echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $profile_list->realm); |
|
| 176 | 176 | } |
| 177 | 177 | ?> |
| 178 | 178 | <br/> |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | if ($readonly === FALSE) { |
| 182 | 182 | ?> |
| 183 | 183 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
| 184 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
| 184 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
| 185 | 185 | </form> |
| 186 | 186 | <?php |
| 187 | 187 | } |
@@ -206,21 +206,21 @@ discard block |
||
| 206 | 206 | $has_overrides = TRUE; |
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
| 209 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
| 210 | 210 | $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
| 211 | 211 | $allcomplete = TRUE; |
| 212 | 212 | foreach ($typelist as $eaptype) { |
| 213 | 213 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
| 214 | 214 | $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
| 215 | 215 | if ($completeness === true) { |
| 216 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
| 216 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
| 217 | 217 | } else { |
| 218 | 218 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
| 219 | 219 | $buffer_eaptypediv .= _("Information needed!"); |
| 220 | 220 | if (is_array($completeness)) { |
| 221 | 221 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
| 222 | 222 | foreach ($completeness as $missing_attrib) { |
| 223 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
| 223 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
| 224 | 224 | } |
| 225 | 225 | $buffer_eaptypediv .= "</ul>"; |
| 226 | 226 | } |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | foreach ($attribs as $attrib) { |
| 233 | 233 | if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
| 234 | 234 | $justOnce = TRUE; |
| 235 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
| 235 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | $buffer_eaptypediv .= "<br/>"; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
| 271 | 271 | $diagUrl = "../diag/"; |
| 272 | 272 | } else { |
| 273 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
| 273 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
| 274 | 274 | } |
| 275 | 275 | ?> |
| 276 | 276 | <form action='<?php echo $diagUrl; ?>action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
@@ -307,9 +307,9 @@ discard block |
||
| 307 | 307 | ?> |
| 308 | 308 | <div style='display: flex;'> |
| 309 | 309 | <?php |
| 310 | - $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
| 311 | - $displayurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
| 312 | - $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
| 310 | + $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier; |
|
| 311 | + $displayurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
| 312 | + $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
| 313 | 313 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
| 314 | 314 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
| 315 | 315 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -321,9 +321,9 @@ discard block |
||
| 321 | 321 | if (empty($rawQr)) { |
| 322 | 322 | throw new Exception("Something went seriously wrong during QR code generation!"); |
| 323 | 323 | } |
| 324 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
| 324 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
| 325 | 325 | $size = getimagesize($uri); |
| 326 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
| 326 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
| 327 | 327 | |
| 328 | 328 | //echo "<nobr>$displayurl</nobr></a>"; |
| 329 | 329 | echo "<p>$displayurl</p></a>"; |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | <div> |
| 374 | 374 | <input type="hidden" name="consortium" value="eduroam"/> |
| 375 | 375 | <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'> |
| 376 | - <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?> |
|
| 376 | + <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?> |
|
| 377 | 377 | </button> |
| 378 | 378 | |
| 379 | 379 | </div> |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | <?php |
| 400 | 400 | $hotspotProfiles = $my_inst->listDeployments(); |
| 401 | 401 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
| 402 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
| 402 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | foreach ($hotspotProfiles as $counter => $deploymentObject) { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | default: |
| 429 | 429 | throw new Exception("We are supposed to operate on a roaming consortium we don't know."); |
| 430 | 430 | } |
| 431 | - echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
| 431 | + echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
| 432 | 432 | <table> |
| 433 | 433 | <caption><?php echo _("Deployment Details"); ?></caption> |
| 434 | 434 | <tr> |
@@ -441,13 +441,13 @@ discard block |
||
| 441 | 441 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
| 442 | 442 | <?php |
| 443 | 443 | if ($deploymentObject->host1_v4 !== NULL) { |
| 444 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
| 444 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
| 445 | 445 | } |
| 446 | 446 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
| 447 | 447 | echo "<br/>"; |
| 448 | 448 | } |
| 449 | 449 | if ($deploymentObject->host1_v6 !== NULL) { |
| 450 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
| 450 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
| 451 | 451 | } |
| 452 | 452 | ?> |
| 453 | 453 | </td> |
@@ -455,9 +455,9 @@ discard block |
||
| 455 | 455 | <td><?php echo $deploymentObject->port1; ?></td> |
| 456 | 456 | <td> |
| 457 | 457 | <?php |
| 458 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
| 459 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
| 460 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
| 458 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
| 459 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
| 460 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
| 461 | 461 | ?> |
| 462 | 462 | </td> |
| 463 | 463 | </tr> |
@@ -465,22 +465,22 @@ discard block |
||
| 465 | 465 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
| 466 | 466 | <?php |
| 467 | 467 | if ($deploymentObject->host2_v4 !== NULL) { |
| 468 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
| 468 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
| 469 | 469 | } |
| 470 | 470 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
| 471 | 471 | echo "<br/>"; |
| 472 | 472 | } |
| 473 | 473 | if ($deploymentObject->host2_v6 !== NULL) { |
| 474 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
| 474 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
| 475 | 475 | } |
| 476 | 476 | ?></td> |
| 477 | 477 | <td><?php echo _("RADIUS port number: ") ?></td> |
| 478 | 478 | <td><?php echo $deploymentObject->port2; ?></td> |
| 479 | 479 | <td> |
| 480 | 480 | <?php |
| 481 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
| 482 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
| 483 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
| 481 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
| 482 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
| 483 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
| 484 | 484 | ?> |
| 485 | 485 | </td> |
| 486 | 486 | </tr> |
@@ -532,12 +532,12 @@ discard block |
||
| 532 | 532 | if (isset($res['FAILURE']) && $res['FAILURE'] > 0) { |
| 533 | 533 | echo '<br>'; |
| 534 | 534 | if ($res['FAILURE'] == 2) { |
| 535 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
| 535 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
| 536 | 536 | } else { |
| 537 | 537 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
| 538 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
| 538 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
| 539 | 539 | } else { |
| 540 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
| 540 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
| 541 | 541 | } |
| 542 | 542 | } |
| 543 | 543 | } |
@@ -557,12 +557,12 @@ discard block |
||
| 557 | 557 | if ($res['FAILURE'] > 0) { |
| 558 | 558 | echo '<br>'; |
| 559 | 559 | if ($res['FAILURE'] == 2) { |
| 560 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
| 560 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
| 561 | 561 | } else { |
| 562 | 562 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
| 563 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
| 563 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
| 564 | 564 | } else { |
| 565 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
| 565 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
| 566 | 566 | } |
| 567 | 567 | } |
| 568 | 568 | } |
@@ -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 | if (!isset($_GET['deployment_id'])) { |
| 39 | 39 | if (isset($_POST['consortium']) && count($myfed->getAttributes("fed:openroaming")) > 0) { |
| 40 | 40 | $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']); |
| 41 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier); |
|
| 41 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier); |
|
| 42 | 42 | exit(0); |
| 43 | 43 | } else { |
| 44 | 44 | throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!"); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | if (in_array('OK', $response)) { |
| 54 | 54 | $deployment->deactivate(); |
| 55 | 55 | } |
| 56 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
| 56 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
| 57 | 57 | exit(0); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | if (in_array('OK', $response)) { |
| 63 | 63 | $deployment->activate(); |
| 64 | 64 | } |
| 65 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
| 65 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
| 66 | 66 | exit(0); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $deployment->status = core\DeploymentManaged::INACTIVE; |
| 84 | 84 | $response = $deployment->setRADIUSconfig(); |
| 85 | 85 | } |
| 86 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
| 86 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
| 87 | 87 | exit(0); |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | echo $uiElements->instLevelInfoBoxes($my_inst); |
| 112 | 112 | $deploymentOptions = $deployment->getAttributes(); |
| 113 | 113 | 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'> |
| 114 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
| 114 | + <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>"; |
|
| 115 | 115 | $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE); |
| 116 | 116 | ?> |
| 117 | 117 | <fieldset class='option_container' id='managedsp_override'> |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | <!-- input for VLAN identifier for home users--> |
| 144 | 144 | <td> |
| 145 | 145 | <span id='vlan_label'> |
| 146 | -<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?> |
|
| 146 | +<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?> |
|
| 147 | 147 | </span> |
| 148 | 148 | </td> |
| 149 | 149 | <td> |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | </fieldset> |
| 164 | 164 | |
| 165 | 165 | <?php |
| 166 | - 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>"; |
|
| 166 | + 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>"; |
|
| 167 | 167 | echo $deco->footer(); |
| 168 | 168 | |
| 169 | 169 | |
| 170 | 170 | \ No newline at end of file |