@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $uiElements = new \web\lib\admin\UIElements(); |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | <?php |
58 | 58 | echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst); |
59 | 59 | if (\config\Master::DB['enforce-external-sync']) { |
60 | - echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</p>"; |
|
61 | - echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
60 | + echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</p>"; |
|
61 | + echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
62 | 62 | } |
63 | 63 | ?> |
64 | 64 | <hr/> |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | <?php |
69 | 69 | if (\config\Master::DB['enforce-external-sync']) { |
70 | 70 | echo "<tr><td> |
71 | - <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant) . "</input> |
|
71 | + <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant)."</input> |
|
72 | 72 | </td>"; |
73 | 73 | |
74 | 74 | echo "<td colspan='4'> |
75 | 75 | <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'> |
76 | - <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"),$uiElements->nomenclatureParticipant) . "</option>"; |
|
76 | + <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"), $uiElements->nomenclatureParticipant)."</option>"; |
|
77 | 77 | |
78 | 78 | foreach ($feds as $fed_value) { |
79 | 79 | $thefed = new \core\Federation(strtoupper($fed_value['value'])); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $entities = $thefed->listExternalEntities(TRUE, NULL); |
83 | 83 | |
84 | 84 | foreach ($entities as $v) { |
85 | - echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>"; |
|
85 | + echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>"; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
@@ -91,16 +91,16 @@ discard block |
||
91 | 91 | ?> |
92 | 92 | <tr> |
93 | 93 | <td> |
94 | - <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"),$uiElements->nomenclatureParticipant); ?></input> |
|
94 | + <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"), $uiElements->nomenclatureParticipant); ?></input> |
|
95 | 95 | </td> |
96 | 96 | <td> |
97 | 97 | <?php echo _("Name"); ?><input type='text' size='30' id='name' name='name' onchange='document.sendinvite.creation[1].checked = true'/> |
98 | 98 | </td> |
99 | 99 | <td> |
100 | 100 | <select name="participant_type"> |
101 | - <option value="IdPSP" selected><?php printf(_("%s and %s"),$uiElements->nomenclatureInst, $uiElements->nomenclatureHotspot)?></option> |
|
102 | - <option value="IdP"><?php printf(_("%s"),$uiElements->nomenclatureInst)?></option> |
|
103 | - <option value="SP"><?php printf(_("%s"),$uiElements->nomenclatureHotspot)?></option> |
|
101 | + <option value="IdPSP" selected><?php printf(_("%s and %s"), $uiElements->nomenclatureInst, $uiElements->nomenclatureHotspot)?></option> |
|
102 | + <option value="IdP"><?php printf(_("%s"), $uiElements->nomenclatureInst)?></option> |
|
103 | + <option value="SP"><?php printf(_("%s"), $uiElements->nomenclatureHotspot)?></option> |
|
104 | 104 | </select> |
105 | 105 | </td> |
106 | 106 | <td><?php echo $uiElements->nomenclatureFed; ?> |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | \config\ConfAssistant::CONSORTIUM['display_name'], |
43 | 43 | \config\Master::APPEARANCE['productname'], |
44 | 44 | \config\Master::APPEARANCE['productname']); |
45 | -$out .= "<p>" . sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname']) . "</p>"; |
|
46 | -$out .= "<table><tr><th>" . _("Device Group") . "</th><th>" . _("Device") . "</th>"; |
|
45 | +$out .= "<p>".sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname'])."</p>"; |
|
46 | +$out .= "<table><tr><th>"._("Device Group")."</th><th>"._("Device")."</th>"; |
|
47 | 47 | foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) { |
48 | - $out .= "<th style='min-width: 80px;'>" . $oneeap->getPrintableRep() . "</th>"; |
|
48 | + $out .= "<th style='min-width: 80px;'>".$oneeap->getPrintableRep()."</th>"; |
|
49 | 49 | } |
50 | 50 | $out .= "</tr>"; |
51 | 51 | foreach (\devices\Devices::listDevices() as $index => $onedevice) { |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | continue; |
55 | 55 | } |
56 | 56 | } |
57 | - $vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/" . $onedevice['group'] . ".png"); |
|
57 | + $vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/".$onedevice['group'].".png"); |
|
58 | 58 | $vendorImg = ""; |
59 | 59 | if ($vendor !== FALSE) { |
60 | 60 | $vendorImg = "<img src='$vendor' alt='logo'>"; |
61 | 61 | } |
62 | - $out .= "<tr><td class='vendor'>$vendorImg</td><td>" . $onedevice['display'] . "</td>"; |
|
62 | + $out .= "<tr><td class='vendor'>$vendorImg</td><td>".$onedevice['display']."</td>"; |
|
63 | 63 | $device_instance = new \core\DeviceFactory($index); |
64 | 64 | foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) { |
65 | 65 | $out .= "<td>"; |
@@ -19,13 +19,13 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -$out = "<h3>" . _("Access the sources") . "</h3>" . |
|
23 | - sprintf(_("%s is an opensource project. If you are interested in the details of the implementation, please visit <a href='%s'>GitHub</a>."), \config\Master::APPEARANCE['productname'], "https://github.com/GEANT/CAT" ) . |
|
24 | - "<h3>" . _("Join the developers mailing list.") . "</h3>" . |
|
25 | - sprintf(_("The list is available at: %s"), \config\Master::APPEARANCE['support-contact']['display']) . |
|
26 | - "<h3>" . _("Add a translation") . "</h3>" . |
|
27 | - _("If you would like to add a new language to CAT then please contact us ...") . |
|
28 | - "<h3><a href='" . \core\CAT::getRootUrlPath() . "/apidoc' target='_blank'>". _("Documentation") . "</a></h3>" ; |
|
22 | +$out = "<h3>"._("Access the sources")."</h3>". |
|
23 | + sprintf(_("%s is an opensource project. If you are interested in the details of the implementation, please visit <a href='%s'>GitHub</a>."), \config\Master::APPEARANCE['productname'], "https://github.com/GEANT/CAT"). |
|
24 | + "<h3>"._("Join the developers mailing list.")."</h3>". |
|
25 | + sprintf(_("The list is available at: %s"), \config\Master::APPEARANCE['support-contact']['display']). |
|
26 | + "<h3>"._("Add a translation")."</h3>". |
|
27 | + _("If you would like to add a new language to CAT then please contact us ..."). |
|
28 | + "<h3><a href='".\core\CAT::getRootUrlPath()."/apidoc' target='_blank'>"._("Documentation")."</a></h3>"; |
|
29 | 29 | |
30 | 30 | |
31 | 31 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @package UserGUI |
27 | 27 | */ |
28 | 28 | error_reporting(E_ALL | E_STRICT); |
29 | -require dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
29 | +require dirname(dirname(__FILE__))."/config/_config.php"; |
|
30 | 30 | $langObject = new \core\common\Language(); |
31 | 31 | $langObject->setTextDomain("web_user"); |
32 | 32 | |
@@ -38,25 +38,25 @@ discard block |
||
38 | 38 | <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'> |
39 | 39 | <div id="heading"> |
40 | 40 | <?php |
41 | - print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>'; |
|
42 | - print '<div id="motd">' . ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ' ) . '</div>'; |
|
43 | - print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']) . '</h1> |
|
44 | -<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Master::APPEARANCE['productname_long'] . '</h2>'; |
|
41 | + print '<img src="'.dirname($_SERVER['SCRIPT_NAME']).'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>'; |
|
42 | + print '<div id="motd">'.(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ').'</div>'; |
|
43 | + print '<h1 style="padding-bottom:0px; height:1em;">'.sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']).'</h1> |
|
44 | +<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Master::APPEARANCE['productname_long'].'</h2>'; |
|
45 | 45 | echo '<table id="lang_select"><tr><td>'; |
46 | 46 | echo _("View this page in"); |
47 | 47 | ?> |
48 | 48 | <?php |
49 | 49 | foreach (\config\Master::LANGUAGES as $lang => $value) { |
50 | - echo "<a href='javascript:changeLang(\"$lang\")'>" . $value['display'] . "</a> "; |
|
50 | + echo "<a href='javascript:changeLang(\"$lang\")'>".$value['display']."</a> "; |
|
51 | 51 | } |
52 | - echo '</td><td style="text-align:right;padding-right:20px"><a href="' . dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang() . '">' . _("Start page") . '</a></td></tr></table>'; |
|
52 | + echo '</td><td style="text-align:right;padding-right:20px"><a href="'.dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang().'">'._("Start page").'</a></td></tr></table>'; |
|
53 | 53 | ?> |
54 | 54 | </div> <!-- id="heading" --> |
55 | 55 | <div id="main_body" style='padding:20px;'> |
56 | - <h1><?php echo _("This is not the CAT you are looking for.");?></h1> |
|
57 | - <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number");?></p> |
|
56 | + <h1><?php echo _("This is not the CAT you are looking for."); ?></h1> |
|
57 | + <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number"); ?></p> |
|
58 | 58 | <h2>404</h2> |
59 | - <p><?php echo sprintf(_("staring at you. Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang());?></p> |
|
59 | + <p><?php echo sprintf(_("staring at you. Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang()); ?></p> |
|
60 | 60 | </div> <!-- id="main_body" --> |
61 | 61 | |
62 | 62 | <?php echo $deco->footer(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @author Stefan Winter <[email protected]> |
27 | 27 | * @package Core |
28 | 28 | */ |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $cleanToken = FALSE; |
32 | 32 | $invitationObject = new core\SilverbulletInvitation("INVALID"); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $statusInfo = ["token" => $cleanToken, |
75 | 75 | "invitation_object" => $invitationObject, |
76 | - "OS" => $Gui->operatingSystem,]; |
|
76 | + "OS" => $Gui->operatingSystem, ]; |
|
77 | 77 | |
78 | 78 | if ($profile !== NULL) { |
79 | 79 | $attributes = $Gui->profileAttributes($profile->identifier); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $caAndSerial = filter_input(INPUT_GET, 'serial', FILTER_SANITIZE_STRING); |
87 | 87 | |
88 | 88 | if ($action !== NULL && $action !== FALSE && $action === \web\lib\common\FormElements::BUTTON_DELETE && $caAndSerial !== NULL && $caAndSerial !== FALSE) { |
89 | - $tuple = explode(':',$caAndSerial); |
|
89 | + $tuple = explode(':', $caAndSerial); |
|
90 | 90 | $ca_type = $tuple[0]; |
91 | 91 | $serial = $tuple[1]; |
92 | 92 | if ($statusInfo['invitation_object']->invitationTokenStatus != \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID) { |
@@ -101,12 +101,12 @@ discard block |
||
101 | 101 | print "//REVOKING\n"; |
102 | 102 | $certObject = new \core\SilverbulletCertificate($serial, $ca_type); |
103 | 103 | $certObject->revokeCertificate(); |
104 | - header("Location: accountstatus.php?token=" . $statusInfo['token']); |
|
104 | + header("Location: accountstatus.php?token=".$statusInfo['token']); |
|
105 | 105 | exit; |
106 | 106 | } |
107 | 107 | } |
108 | 108 | } |
109 | - header("Location: accountstatus.php?token=" . $statusInfo['token']); |
|
109 | + header("Location: accountstatus.php?token=".$statusInfo['token']); |
|
110 | 110 | exit; |
111 | 111 | } |
112 | 112 | |
@@ -131,4 +131,4 @@ discard block |
||
131 | 131 | $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]); |
132 | 132 | |
133 | 133 | // and now, serve actual data |
134 | -require "../skins/" . $skinObject->skin . "/accountstatus/accountstatus.php"; |
|
134 | +require "../skins/".$skinObject->skin."/accountstatus/accountstatus.php"; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @package UserGUI |
28 | 28 | * |
29 | 29 | */ |
30 | -require dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
30 | +require dirname(dirname(__FILE__))."/config/_config.php"; |
|
31 | 31 | $loggerInstance = new \core\common\Logging(); |
32 | 32 | $langObject = new \core\common\Language(); |
33 | 33 | $cat = new \core\CAT(); |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'> |
52 | 52 | <img src="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/images/consortium_logo.png" style="padding-right:20px; padding-top:20px; float:right" alt="logo" /> |
53 | 53 | |
54 | - <div id="motd"><?php print ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' '); ?></div> |
|
54 | + <div id="motd"><?php print (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' '); ?></div> |
|
55 | 55 | |
56 | - <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1> |
|
56 | + <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1> |
|
57 | 57 | <div id="tou"> |
58 | 58 | <?php |
59 | 59 | require "user/tou.php"; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | </td> |
68 | 68 | <?php |
69 | 69 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
70 | - $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['name']) . "</a></td>"; |
|
70 | + $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['name'])."</a></td>"; |
|
71 | 71 | } |
72 | 72 | ?> |
73 | 73 | <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @package UserGUI |
27 | 27 | */ |
28 | 28 | error_reporting(E_ALL | E_STRICT); |
29 | -require dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
29 | +require dirname(dirname(__FILE__))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $langObject = new \core\common\Language(); |
32 | 32 | $langObject->setTextDomain("web_user"); |
@@ -39,24 +39,24 @@ discard block |
||
39 | 39 | <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'> |
40 | 40 | <div id="heading"> |
41 | 41 | <?php |
42 | - print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>'; |
|
43 | - print '<div id="motd">' . ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ' ) . '</div>'; |
|
44 | - print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']) . '</h1> |
|
45 | -<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Master::APPEARANCE['productname_long'] . '</h2>'; |
|
42 | + print '<img src="'.dirname($_SERVER['SCRIPT_NAME']).'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>'; |
|
43 | + print '<div id="motd">'.(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ').'</div>'; |
|
44 | + print '<h1 style="padding-bottom:0px; height:1em;">'.sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']).'</h1> |
|
45 | +<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Master::APPEARANCE['productname_long'].'</h2>'; |
|
46 | 46 | echo '<table id="lang_select"><tr><td>'; |
47 | 47 | echo _("View this page in"); |
48 | 48 | ?> |
49 | 49 | <?php |
50 | 50 | foreach (\config\Master::LANGUAGES as $lang => $value) { |
51 | - echo "<a href='javascript:changeLang(\"$lang\")'>" . $value['display'] . "</a> "; |
|
51 | + echo "<a href='javascript:changeLang(\"$lang\")'>".$value['display']."</a> "; |
|
52 | 52 | } |
53 | - echo '</td><td style="text-align:right;padding-right:20px"><a href="' . dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang() . '">' . _("Start page") . '</a></td></tr></table>'; |
|
53 | + echo '</td><td style="text-align:right;padding-right:20px"><a href="'.dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang().'">'._("Start page").'</a></td></tr></table>'; |
|
54 | 54 | ?> |
55 | 55 | </div> <!-- id="heading" --> |
56 | 56 | <div id="main_body" style='padding:20px;'> |
57 | - <h1><?php echo _("Maybe this is the CAT you are looking for...");?></h1> |
|
58 | - <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as");?></p> |
|
57 | + <h1><?php echo _("Maybe this is the CAT you are looking for..."); ?></h1> |
|
58 | + <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as"); ?></p> |
|
59 | 59 | <h2>401/403</h2> |
60 | - <p><?php echo sprintf(_("Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang())?></p> |
|
60 | + <p><?php echo sprintf(_("Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang())?></p> |
|
61 | 61 | </div> |
62 | 62 | <?php echo $deco->footer(); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function htmlHeadCode() { |
48 | 48 | $cat = new \core\CAT(); |
49 | 49 | \core\common\Entity::intoThePotatoes(); |
50 | - $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" . \config\Master::APPEARANCE['google_maps_api_key'] . "'></script> |
|
50 | + $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=".\config\Master::APPEARANCE['google_maps_api_key']."'></script> |
|
51 | 51 | <script type='text/javascript'> |
52 | 52 | // some global variables; |
53 | 53 | var center_lat=49.6114885608729; |
@@ -103,19 +103,19 @@ discard block |
||
103 | 103 | * |
104 | 104 | */ |
105 | 105 | function locator_magic() { |
106 | - geocoder.geocode({'address':\"" . preg_replace("/\"/", """, $this->instName) . "\", 'region':\"" . strtolower($this->fedName) . "\"}, |
|
106 | + geocoder.geocode({'address':\"" . preg_replace("/\"/", """, $this->instName)."\", 'region':\"".strtolower($this->fedName)."\"}, |
|
107 | 107 | function(r,status) { |
108 | 108 | if(status != google.maps.GeocoderStatus.OK) { |
109 | - locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\"); |
|
109 | + locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\"); |
|
110 | 110 | } else { |
111 | 111 | var i; |
112 | 112 | for(i = 0; i < r.length; i++) { |
113 | 113 | Addr = getAddressElements(r[i].address_components); |
114 | - if(Addr.country == \"" . strtoupper($this->fedName) . "\") |
|
114 | + if(Addr.country == \"" . strtoupper($this->fedName)."\") |
|
115 | 115 | break; |
116 | 116 | } |
117 | - if(Addr.country != \"" . strtoupper($this->fedName) . "\") |
|
118 | - locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\"); |
|
117 | + if(Addr.country != \"" . strtoupper($this->fedName)."\") |
|
118 | + locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\"); |
|
119 | 119 | else { |
120 | 120 | addMarker(r[i].geometry.location,15,null); |
121 | 121 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | function markerClicked(m) { |
130 | 130 | info_window.close(); |
131 | - var t = \"" . _("This is location ") . "\"+m.info; |
|
131 | + var t = \"" . _("This is location ")."\"+m.info; |
|
132 | 132 | info_window.setContent(t); |
133 | 133 | info_window.setPosition(m.getPosition()); |
134 | 134 | info_window.open(map,m); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | function getAddressLocation() { |
208 | 208 | var city = $('#address').val(); |
209 | 209 | if(city == '') { |
210 | - alert(\"" . _("nothing entered in the address field") . "\"); |
|
210 | + alert(\"" . _("nothing entered in the address field")."\"); |
|
211 | 211 | return false; |
212 | 212 | } |
213 | 213 | geocoder.geocode( { 'address': city}, function(results, status) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | * trigger geolocation |
228 | 228 | */ |
229 | 229 | function locateMe() { |
230 | - $('#address').val(\"" . _("locating") . "\"); |
|
230 | + $('#address').val(\"" . _("locating")."\"); |
|
231 | 231 | navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000}); |
232 | 232 | } |
233 | 233 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | if ($this->readOnly) { |
346 | 346 | return "<div id='map' class='googlemap'></div>"; |
347 | 347 | } else { |
348 | - return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<div id='map' class='googlemap'></div>" . $this->htmlPostEdit(FALSE); |
|
348 | + return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<div id='map' class='googlemap'></div>".$this->htmlPostEdit(FALSE); |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | // quiesce warnings about unused variable |
361 | 361 | sprintf("%s", $coords); |
362 | 362 | \core\common\Entity::intoThePotatoes(); |
363 | - $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>"; |
|
363 | + $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>"; |
|
364 | 364 | \core\common\Entity::outOfThePotatoes(); |
365 | 365 | return $retval; |
366 | 366 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | * @return string |
372 | 372 | */ |
373 | 373 | public function bodyTagCode() { |
374 | - return "onload='load(" . ($this->readOnly ? "0" : "1") . ")'"; |
|
374 | + return "onload='load(".($this->readOnly ? "0" : "1").")'"; |
|
375 | 375 | } |
376 | 376 | |
377 | 377 | /** |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | */ |
382 | 382 | private function findLocationHtml() { |
383 | 383 | \core\common\Entity::intoThePotatoes(); |
384 | - $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>"; |
|
384 | + $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>"; |
|
385 | 385 | \core\common\Entity::outOfThePotatoes(); |
386 | 386 | return $retval; |
387 | 387 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @return string HTML code <table> |
86 | 86 | */ |
87 | 87 | public function prefilledOptionTable(string $attributePrefix) { |
88 | - $retval = "<table id='expandable_$attributePrefix" . "_options'>"; |
|
88 | + $retval = "<table id='expandable_$attributePrefix"."_options'>"; |
|
89 | 89 | |
90 | 90 | $prepopulate = []; |
91 | 91 | foreach ($this->listOfOptions as $existingAttribute) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $prepopulate[] = $existingAttribute; |
94 | 94 | } |
95 | 95 | } |
96 | - if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values |
|
96 | + if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values |
|
97 | 97 | $retval .= $this->addOptionEdit($attributePrefix, $prepopulate); |
98 | 98 | } else { |
99 | 99 | $retval .= $this->addOptionNew($attributePrefix); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $optiontypearray = $optioninfo->optionType($option['name']); |
126 | 126 | $loggerInstance = new \core\common\Logging(); |
127 | 127 | $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n"); |
128 | - $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']); |
|
128 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | return $retval; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | if (!isset($descriptions[$input])) { |
198 | 198 | return ""; |
199 | 199 | } |
200 | - return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>"; |
|
200 | + return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>"; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
@@ -210,18 +210,18 @@ discard block |
||
210 | 210 | */ |
211 | 211 | private function selectElement($rowid, $list) { |
212 | 212 | $jsmagic = "onchange=' |
213 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
213 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
214 | 214 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
215 | 215 | } else { |
216 | 216 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
217 | 217 | }"; |
218 | 218 | foreach (array_keys(OptionDisplay::HTML_DATATYPE_TEXTS) as $key) { |
219 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
220 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
221 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
222 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
223 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
224 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
219 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
220 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
221 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
222 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
223 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
224 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
225 | 225 | } |
226 | 226 | "; |
227 | 227 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $value = array_shift($list); |
253 | 253 | $listtype = $optioninfo->optionType($value); |
254 | 254 | $retval .= $uiElements->displayName($value); |
255 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
255 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
256 | 256 | $activelisttype = $listtype; |
257 | 257 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
258 | 258 | break; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>"; |
261 | 261 | foreach ($list as $value) { |
262 | 262 | $listtype = $optioninfo->optionType($value); |
263 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
263 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
264 | 264 | if ($iterator == $this->optionIterator) { |
265 | 265 | $retval .= "selected='selected'"; |
266 | 266 | $activelisttype = $listtype; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } else { |
269 | 269 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
270 | 270 | } |
271 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
271 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
272 | 272 | $iterator++; |
273 | 273 | } |
274 | 274 | |
@@ -293,9 +293,9 @@ discard block |
||
293 | 293 | */ |
294 | 294 | private function selectLanguage($rowid, $makeVisible) { |
295 | 295 | \core\common\Entity::intoThePotatoes(); |
296 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
297 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
298 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
296 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
297 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
298 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
299 | 299 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
300 | 300 | $thislang = $possibleLang['display']; |
301 | 301 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | private function inputFields($rowid, $activetype) { |
324 | 324 | $retval = ""; |
325 | 325 | foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) { |
326 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
326 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
327 | 327 | } |
328 | 328 | return $retval; |
329 | 329 | } |
@@ -338,11 +338,11 @@ discard block |
||
338 | 338 | private function noPrefillText(int $rowid, array $list) { |
339 | 339 | // first column: the <select> element with the names of options and their field-toggling JS magic |
340 | 340 | $selectorInfo = $this->selectElement($rowid, $list); |
341 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
341 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
342 | 342 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
343 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
343 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
344 | 344 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
345 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
345 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
346 | 346 | return $retval; |
347 | 347 | } |
348 | 348 | |
@@ -365,20 +365,20 @@ discard block |
||
365 | 365 | $retval .= "<td>"; |
366 | 366 | $uiElements = new UIElements(); |
367 | 367 | $listtype = $optioninfo->optionType($optionName); |
368 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
369 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
370 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
368 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
369 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
370 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
371 | 371 | |
372 | 372 | // language tag if any |
373 | 373 | $retval .= "<td>"; |
374 | 374 | if ($listtype["flag"] == "ML") { |
375 | 375 | |
376 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
376 | + $language = "(".strtoupper($optionLang).")"; |
|
377 | 377 | if ($optionLang == 'C') { |
378 | 378 | $language = _("(default/other languages)"); |
379 | 379 | } |
380 | 380 | $retval .= $language; |
381 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
381 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
382 | 382 | } |
383 | 383 | $retval .= "</td>"; |
384 | 384 | // attribute content |
@@ -388,12 +388,12 @@ discard block |
||
388 | 388 | case \core\Options::TYPECODE_COORDINATES: |
389 | 389 | $this->allLocationCount = $this->allLocationCount + 1; |
390 | 390 | // display of the locations varies by map provider |
391 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
391 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
392 | 392 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
393 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
393 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
394 | 394 | break; |
395 | 395 | case \core\Options::TYPECODE_FILE: |
396 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
396 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
397 | 397 | $uiElements = new UIElements(); |
398 | 398 | switch ($optionName) { |
399 | 399 | case "eap:ca_file": |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | if ($listtype['type'] == \core\Options::TYPECODE_BOOLEAN) {// only modify in this one case |
424 | 424 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
425 | 425 | } |
426 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
426 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
427 | 427 | break; |
428 | 428 | default: |
429 | 429 | // this should never happen! |
@@ -468,10 +468,10 @@ discard block |
||
468 | 468 | <td> |
469 | 469 | <button type='button' class='delete' onclick='"; |
470 | 470 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
471 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
472 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
471 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
472 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
473 | 473 | } |
474 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
474 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
475 | 475 | $retval .= "'>-</button> |
476 | 476 | </td> |
477 | 477 | </tr>"; |