@@ -20,7 +20,7 @@ |
||
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 | $languageInstance = new \core\common\Language(); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | return $this->counter; |
127 | 127 | } |
128 | 128 | |
129 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
129 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
130 | 130 | if ($cachedNumber !== FALSE) { |
131 | 131 | $numberData = unserialize($cachedNumber); |
132 | 132 | $now = new \DateTime(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } else { // data in cache is too old or doesn't exist. We really need to ask the database |
140 | 140 | $list = $this->listAllServiceProviders(); |
141 | 141 | $this->counter = count($list); |
142 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
142 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
143 | 143 | return $this->counter; |
144 | 144 | } |
145 | 145 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $returnarray = []; |
189 | 189 | $query = "SELECT id_institution AS id, country, inst_realm as realmlist, name AS collapsed_name, contact AS collapsed_contact, type FROM view_active_institution WHERE country = ?"; |
190 | 190 | if ($eduroamDbType !== NULL) { |
191 | - $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')"; |
|
191 | + $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')"; |
|
192 | 192 | } |
193 | 193 | $externals = $this->db->exec($query, "s", $tld); |
194 | 194 | // was a SELECT query, so a resource and not a boolean |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $instServerTransaction = $this->db->exec($query, "s", $tld); |
292 | 292 | while ($instServerResponses = mysqli_fetch_object(/** @scrutinizer ignore-type */ $instServerTransaction)) { |
293 | 293 | $contactList = $this->dissectCollapsedContacts($instServerResponses->contacts); |
294 | - $retval[$instServerResponses->ROid . $instServerResponses->instid] = [ |
|
294 | + $retval[$instServerResponses->ROid.$instServerResponses->instid] = [ |
|
295 | 295 | "names" => $this->splitNames($instServerResponses->inst_name), |
296 | 296 | "type" => $instServerResponses->type, |
297 | 297 | "servers" => $instServerResponses->servers, |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $uiElements = new web\lib\admin\UIElements(); |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | <div class="infobox"> |
51 | 51 | <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2> |
52 | 52 | <table> |
53 | - <caption><?php echo $tablecaption;?></caption> |
|
53 | + <caption><?php echo $tablecaption; ?></caption> |
|
54 | 54 | <tr> |
55 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
56 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
57 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
55 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
56 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
57 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
58 | 58 | </tr> |
59 | 59 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
60 | 60 | <tr> |
61 | 61 | <td> |
62 | - <?php echo "" . _("Unique Identifier") ?> |
|
62 | + <?php echo ""._("Unique Identifier") ?> |
|
63 | 63 | </td> |
64 | 64 | <td> |
65 | 65 | </td> |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | </div> |
72 | 72 | |
73 | 73 | <form action='overview_certificates.php' method='GET' accept-charset='UTF-8'> |
74 | - <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management'));?></button> |
|
74 | + <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management')); ?></button> |
|
75 | 75 | </form> |
76 | 76 | |
77 | 77 | <?php |
78 | 78 | $mgmt = new \core\UserManagement(); |
79 | 79 | |
80 | 80 | if (!$user->isFederationAdmin()) { |
81 | - echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>"; |
|
81 | + echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>"; |
|
82 | 82 | echo $deco->footer(); |
83 | 83 | exit(0); |
84 | 84 | } |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?> |
93 | 93 | </h2> |
94 | 94 | <table> |
95 | - <caption><?php echo $tablecaption2;?></caption> |
|
95 | + <caption><?php echo $tablecaption2; ?></caption> |
|
96 | 96 | <tr> |
97 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
98 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
99 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
97 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
98 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
99 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
100 | 100 | </tr> |
101 | 101 | <!-- fed properties --> |
102 | 102 | <tr> |
103 | 103 | <td> |
104 | - <?php echo "" . _("Country") ?> |
|
104 | + <?php echo ""._("Country") ?> |
|
105 | 105 | </td> |
106 | 106 | <td> |
107 | 107 | </td> |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | default: |
183 | 183 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
184 | 184 | } |
185 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
185 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
186 | 186 | break; |
187 | 187 | case "FAILURE": |
188 | 188 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | default: |
203 | 203 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
204 | 204 | } |
205 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
205 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
206 | 206 | break; |
207 | 207 | case "INVALIDSYNTAX": |
208 | 208 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -218,27 +218,27 @@ discard block |
||
218 | 218 | } else { |
219 | 219 | $link = 'http://'; |
220 | 220 | } |
221 | - $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
221 | + $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
222 | 222 | $link = htmlspecialchars($link); |
223 | 223 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') { |
224 | 224 | echo "<table><tr> |
225 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP) . "</td> |
|
225 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP)."</td> |
|
226 | 226 | <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'> |
227 | 227 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
228 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
228 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
229 | 229 | </form> |
230 | 230 | </td> |
231 | 231 | </tr> |
232 | 232 | </table>"; |
233 | 233 | } |
234 | 234 | if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') { |
235 | - $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>"; |
|
235 | + $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>"; |
|
236 | 236 | } else { |
237 | 237 | $helptext = ""; |
238 | 238 | } |
239 | 239 | ?> |
240 | 240 | <table class='user_overview' style='border:0px; width:unset'> |
241 | - <caption><?php echo _("Participant Details");?></caption> |
|
241 | + <caption><?php echo _("Participant Details"); ?></caption> |
|
242 | 242 | <tr> |
243 | 243 | <th scope='col' style="width:13em"><?php echo _("Configured / Visible / OpenRoaming"); ?></th> |
244 | 244 | <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureParticipant); ?></th> |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $pending_invites = $mgmt->listPendingInvitations(); |
248 | 248 | |
249 | 249 | if (\config\Master::DB['enforce-external-sync']) { |
250 | - echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>"; |
|
250 | + echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>"; |
|
251 | 251 | } |
252 | 252 | ?> |
253 | 253 | <th scope='col'> |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | foreach ($feds as $onefed) { |
263 | 263 | $thefed = new \core\Federation(strtoupper($onefed['value'])); |
264 | 264 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' |
265 | - echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>"; |
|
265 | + echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; |
|
266 | 266 | |
267 | 267 | // extract only pending invitations for *this* fed |
268 | 268 | $display_pendings = FALSE; |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | // deployment status; need to dive into profiles for this |
288 | 288 | // show happy eyeballs if at least one profile is configured/showtime |
289 | 289 | echo "<td>"; |
290 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) |
|
290 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-") |
|
291 | 291 | . " " |
292 | - . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) |
|
292 | + . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-") |
|
293 | 293 | . " " |
294 | 294 | . "<span style='color:"; |
295 | 295 | switch ($idp_instance->maxOpenRoamingStatus()) { |
@@ -324,23 +324,23 @@ discard block |
||
324 | 324 | } |
325 | 325 | } |
326 | 326 | echo "<td style='vertical-align:top;'> |
327 | - <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . " |
|
327 | + <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")." |
|
328 | 328 | </td>"; |
329 | 329 | // external DB sync, if configured as being necessary |
330 | 330 | if (\config\Master::DB['enforce-external-sync']) { |
331 | 331 | echo "<td style='display: ruby;'>"; |
332 | 332 | if ($readonly === FALSE) { |
333 | - echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
334 | - <button type='submit'>" . _("Manage DB Link") . "</button></form> "; |
|
333 | + echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
334 | + <button type='submit'>" . _("Manage DB Link")."</button></form> "; |
|
335 | 335 | } |
336 | 336 | switch ($idp_instance->getExternalDBSyncState()) { |
337 | 337 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING: |
338 | 338 | break; |
339 | 339 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
340 | - echo "<div class='acceptable'>" . _("Linked") . "</div>"; |
|
340 | + echo "<div class='acceptable'>"._("Linked")."</div>"; |
|
341 | 341 | break; |
342 | 342 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
343 | - echo "<div class='notacceptable'>" . _("NOT linked") . "</div>"; |
|
343 | + echo "<div class='notacceptable'>"._("NOT linked")."</div>"; |
|
344 | 344 | |
345 | 345 | |
346 | 346 | break; |
@@ -353,9 +353,9 @@ discard block |
||
353 | 353 | echo "<td style='vertical-align: top;'>"; |
354 | 354 | if ($readonly === FALSE) { |
355 | 355 | echo "<div style='white-space: nowrap;'> |
356 | - <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
356 | + <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
357 | 357 | <button type='submit'>" . |
358 | - _("Add/Remove Administrators") . " |
|
358 | + _("Add/Remove Administrators")." |
|
359 | 359 | </button> |
360 | 360 | </form> |
361 | 361 | </div>"; |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | echo "<tr> |
369 | 369 | <td colspan='2'> |
370 | 370 | <strong>" . |
371 | - sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " |
|
371 | + sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)." |
|
372 | 372 | </strong> |
373 | 373 | </td> |
374 | 374 | </tr>"; |
@@ -376,16 +376,16 @@ discard block |
||
376 | 376 | if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { |
377 | 377 | echo "<tr> |
378 | 378 | <td>" . |
379 | - $oneinvite['name'] . " |
|
379 | + $oneinvite['name']." |
|
380 | 380 | </td> |
381 | 381 | <td>" . |
382 | - $oneinvite['mail'] . " |
|
382 | + $oneinvite['mail']." |
|
383 | 383 | </td> |
384 | 384 | <td colspan=2>"; |
385 | 385 | if ($readonly === FALSE) { |
386 | 386 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> |
387 | - <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/> |
|
388 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> " |
|
387 | + <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/> |
|
388 | + <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " |
|
389 | 389 | . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
390 | 390 | . "</form>"; |
391 | 391 | } |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | #private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
25 | 25 | |
26 | 26 | |
27 | - private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
28 | - private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
29 | - private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
27 | + private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
28 | + private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
29 | + private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
30 | 30 | private const EDUPKI_RA_ID = 700; |
31 | 31 | private const EDUPKI_CERT_PROFILE = "Radius Server SOAP"; |
32 | 32 | private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | parent::__construct(); |
43 | 43 | |
44 | 44 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_CERT) === FALSE) { |
45 | - throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
45 | + throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
46 | 46 | } |
47 | 47 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_KEY) === FALSE) { |
48 | - throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
48 | + throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
49 | 49 | } |
50 | 50 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_WEBROOT) === FALSE) { |
51 | - throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
51 | + throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
@@ -106,22 +106,22 @@ discard block |
||
106 | 106 | // initialise connection to eduPKI CA / eduroam RA and send the request to them |
107 | 107 | try { |
108 | 108 | $altArray = [# Array mit den Subject Alternative Names |
109 | - "email:" . $csr["USERMAIL"] |
|
109 | + "email:".$csr["USERMAIL"] |
|
110 | 110 | ]; |
111 | 111 | foreach ($csr["ALTNAMES"] as $oneAltName) { |
112 | - $altArray[] = "DNS:" . $oneAltName; |
|
112 | + $altArray[] = "DNS:".$oneAltName; |
|
113 | 113 | } |
114 | 114 | $soapPub = $this->initEduPKISoapSession("PUBLIC"); |
115 | 115 | $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n"); |
116 | - $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPkiServer::EDUPKI_RA_ID . "\n"); |
|
117 | - $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR_STRING"] . "\n"); |
|
116 | + $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPkiServer::EDUPKI_RA_ID."\n"); |
|
117 | + $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR_STRING"]."\n"); |
|
118 | 118 | $this->loggerInstance->debug(5, "PARAM_3: "); |
119 | 119 | $this->loggerInstance->debug(5, $altArray); |
120 | - $this->loggerInstance->debug(5, "PARAM_4: " . CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE . "\n"); |
|
121 | - $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n"); |
|
122 | - $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n"); |
|
123 | - $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERMAIL"] . "\n"); |
|
124 | - $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n"); |
|
120 | + $this->loggerInstance->debug(5, "PARAM_4: ".CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE."\n"); |
|
121 | + $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n"); |
|
122 | + $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n"); |
|
123 | + $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERMAIL"]."\n"); |
|
124 | + $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n"); |
|
125 | 125 | $this->loggerInstance->debug(5, "PARAM_9: false\n"); |
126 | 126 | $soapNewRequest = $soapPub->newRequest( |
127 | 127 | CertificationAuthorityEduPkiServer::EDUPKI_RA_ID, # RA-ID |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | } catch (Exception $e) { |
144 | 144 | // PHP 7.1 can do this much better |
145 | 145 | if (is_soap_fault($e)) { |
146 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: { |
|
146 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: { |
|
147 | 147 | $e->faultstring |
148 | 148 | }\n"); |
149 | 149 | } |
150 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
150 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
151 | 151 | } |
152 | 152 | try { |
153 | 153 | $soap = $this->initEduPKISoapSession("RA"); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
182 | 182 | // rather than just using the string. Grr. |
183 | 183 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
184 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext); |
|
184 | + file_put_contents($tempdir['dir']."/content.txt", $soapCleartext); |
|
185 | 185 | // retrieve our RA cert from filesystem |
186 | 186 | // the RA certificates are not needed right now because we |
187 | 187 | // have resorted to S/MIME signatures with openssl command-line |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
194 | 194 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
195 | 195 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n $soapCleartext\n"); |
196 | - $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
196 | + $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
197 | 197 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
198 | 198 | $output = []; |
199 | 199 | $return = 999; |
@@ -202,21 +202,21 @@ discard block |
||
202 | 202 | throw new Exception("Non-zero return value from openssl smime!"); |
203 | 203 | } |
204 | 204 | // and get the signature blob back from the filesystem |
205 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
205 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
206 | 206 | $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n"); |
207 | - $this->loggerInstance->debug(5, $soapReqnum . "\n"); |
|
208 | - $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending! |
|
209 | - $this->loggerInstance->debug(5, $detachedSig . "\n"); |
|
207 | + $this->loggerInstance->debug(5, $soapReqnum."\n"); |
|
208 | + $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending! |
|
209 | + $this->loggerInstance->debug(5, $detachedSig."\n"); |
|
210 | 210 | $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig); |
211 | - $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest()); |
|
212 | - $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse()); |
|
211 | + $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest()); |
|
212 | + $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse()); |
|
213 | 213 | if ($soapIssueCert === FALSE) { |
214 | 214 | throw new Exception("The locally approved request was NOT processed by the CA."); |
215 | 215 | } |
216 | 216 | } catch (SoapFault $e) { |
217 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
217 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
218 | 218 | } catch (Exception $e) { |
219 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
219 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
220 | 220 | } |
221 | 221 | return $soapReqnum; |
222 | 222 | } |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | throw new Exception("CAInfo has no root certificate for us!"); |
269 | 269 | } |
270 | 270 | } catch (SoapFault $e) { |
271 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
271 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
272 | 272 | } catch (Exception $e) { |
273 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
273 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
274 | 274 | } |
275 | 275 | return [ |
276 | 276 | "CERT" => openssl_x509_read($parsedCert['pem']), |
@@ -303,12 +303,12 @@ discard block |
||
303 | 303 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
304 | 304 | // rather than just using the string. Grr. |
305 | 305 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
306 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest); |
|
306 | + file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest); |
|
307 | 307 | // retrieve our RA cert from filesystem |
308 | 308 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
309 | 309 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
310 | 310 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n"); |
311 | - $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
311 | + $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
312 | 312 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
313 | 313 | $output = []; |
314 | 314 | $return = 999; |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | throw new Exception("Non-zero return value from openssl smime!"); |
318 | 318 | } |
319 | 319 | // and get the signature blob back from the filesystem |
320 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
320 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
321 | 321 | $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig); |
322 | 322 | if ($soapIssueRev === FALSE) { |
323 | 323 | throw new Exception("The locally approved revocation request was NOT processed by the CA."); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | } catch (Exception $e) { |
326 | 326 | // PHP 7.1 can do this much better |
327 | 327 | if (is_soap_fault($e)) { |
328 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n"); |
|
328 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n"); |
|
329 | 329 | } |
330 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
330 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | |
@@ -427,9 +427,9 @@ discard block |
||
427 | 427 | */ |
428 | 428 | public function soapToXmlInteger($x) |
429 | 429 | { |
430 | - return '<' . $x[0] . '>' |
|
430 | + return '<'.$x[0].'>' |
|
431 | 431 | . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1) |
432 | - . '</' . $x[0] . '>'; |
|
432 | + . '</'.$x[0].'>'; |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | /** |
@@ -448,9 +448,9 @@ discard block |
||
448 | 448 | // dump private key into directory |
449 | 449 | $outstring = ""; |
450 | 450 | openssl_pkey_export($privateKey, $outstring); |
451 | - file_put_contents($tempdir . "/pkey.pem", $outstring); |
|
451 | + file_put_contents($tempdir."/pkey.pem", $outstring); |
|
452 | 452 | // PHP can only do one DC in the Subject. But we need three. |
453 | - $execCmd = \config\Master::PATHS['openssl'] . " req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$fed/CN=$username/emailAddress=$username"; |
|
453 | + $execCmd = \config\Master::PATHS['openssl']." req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$fed/CN=$username/emailAddress=$username"; |
|
454 | 454 | $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n"); |
455 | 455 | $output = []; |
456 | 456 | $return = 999; |
@@ -61,10 +61,10 @@ |
||
61 | 61 | header("Content-Type:text/html;charset=utf-8"); |
62 | 62 | ?> |
63 | 63 | <!DOCTYPE html> |
64 | - <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale;?>' <?php echo ($direction ? "dir='rtl'" : "");?>> |
|
65 | - <head lang='<?php echo $ourlocale;?>'> |
|
64 | + <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale; ?>' <?php echo ($direction ? "dir='rtl'" : ""); ?>> |
|
65 | + <head lang='<?php echo $ourlocale; ?>'> |
|
66 | 66 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> |
67 | - <title><?php echo htmlspecialchars($pagetitle);?></title> |
|
67 | + <title><?php echo htmlspecialchars($pagetitle); ?></title> |
|
68 | 68 | <script type="text/javascript">ie_version = 0;</script> |
69 | 69 | <!--[if IE]> |
70 | 70 | <script type="text/javascript">ie_version=1;</script> |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $optionClass = \core\Options::instance(); |
102 | 102 | $optionProps = $optionClass->optionType($optiontype); |
103 | 103 | $allowedValues = explode(',', substr($optionProps["flags"], 7)); |
104 | - if (in_array($incomingBinary,$allowedValues)) { |
|
104 | + if (in_array($incomingBinary, $allowedValues)) { |
|
105 | 105 | return TRUE; |
106 | 106 | } |
107 | 107 | return FALSE; |
@@ -347,14 +347,14 @@ discard block |
||
347 | 347 | case \core\Options::TYPECODE_TEXT: |
348 | 348 | case \core\Options::TYPECODE_COORDINATES: |
349 | 349 | case \core\Options::TYPECODE_INTEGER: |
350 | - $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
350 | + $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
351 | 351 | if (!empty($varName)) { |
352 | 352 | $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg'])); |
353 | 353 | break; |
354 | 354 | } |
355 | 355 | continue 2; |
356 | 356 | case \core\Options::TYPECODE_BOOLEAN: |
357 | - $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN]; |
|
357 | + $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN]; |
|
358 | 358 | if (!empty($varName)) { |
359 | 359 | $contentValid = $this->validator->boolean($varName); |
360 | 360 | if ($contentValid) { |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | } |
368 | 368 | continue 2; |
369 | 369 | case \core\Options::TYPECODE_STRING: |
370 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
370 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
371 | 371 | if (!empty(trim($previsionalContent))) { |
372 | 372 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
373 | 373 | if ($content === FALSE) { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | continue 2; |
379 | 379 | |
380 | 380 | case \core\Options::TYPECODE_ENUM_OPENROAMING: |
381 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
381 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
382 | 382 | if (!empty($previsionalContent)) { |
383 | 383 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
384 | 384 | if ($content === FALSE) { |
@@ -389,15 +389,15 @@ discard block |
||
389 | 389 | continue 2; |
390 | 390 | case \core\Options::TYPECODE_FILE: |
391 | 391 | // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file |
392 | - $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
392 | + $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
393 | 393 | if (!empty($reference)) { // was already in, by ROWID reference, extract |
394 | 394 | // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace) |
395 | 395 | $content = $this->validator->string(urldecode($reference), TRUE); |
396 | 396 | break; |
397 | 397 | } |
398 | - $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? ""; |
|
398 | + $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? ""; |
|
399 | 399 | if ($fileName != "") { // let's do the download |
400 | - $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName); |
|
400 | + $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName); |
|
401 | 401 | |
402 | 402 | if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) { |
403 | 403 | $bad[] = $objValue; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | } |
409 | 409 | continue 2; |
410 | 410 | default: |
411 | - throw new Exception("Internal Error: Unknown option type " . $objValue . "!"); |
|
411 | + throw new Exception("Internal Error: Unknown option type ".$objValue."!"); |
|
412 | 412 | } |
413 | 413 | // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that. |
414 | 414 | $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]]; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | $colour1 = \config\Master::APPEARANCE['colour1']; |
24 | 24 | $colour2 = \config\Master::APPEARANCE['colour2']; |
25 | 25 | // we need to know if we are serving a RTL language so we can flip some heading |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | body { |
37 | - background: <?php echo $colour1;?>; |
|
37 | + background: <?php echo $colour1; ?>; |
|
38 | 38 | color: #000000; |
39 | 39 | font-family:Verdana, Arial, Helvetica, sans-serif; |
40 | 40 | font-size:11px; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | button { |
60 | - background: <?php echo $colour2;?>; |
|
60 | + background: <?php echo $colour2; ?>; |
|
61 | 61 | color: #FFFFFF; |
62 | 62 | min-height: 23px; |
63 | 63 | border-start-style: outset; |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | background:#095e80; |
79 | 79 | border-style:inset; |
80 | 80 | position: relative; |
81 | - <?php echo $start;?>: 3px; |
|
81 | + <?php echo $start; ?>: 3px; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | button.pressedDisabled { |
85 | 85 | background:#999; |
86 | 86 | border-style:inset; |
87 | 87 | position: relative; |
88 | - <?php echo $start;?>: 3px; |
|
88 | + <?php echo $start; ?>: 3px; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | button.delete { |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | div.profilemodulebuttons { |
168 | 168 | position: inherit; |
169 | 169 | bottom: 5px; |
170 | - <?php echo $end;?>: 5px; |
|
171 | - text-align: <?php echo $end;?>; |
|
170 | + <?php echo $end; ?>: 5px; |
|
171 | + text-align: <?php echo $end; ?>; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | div.profilebox { |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | display: block; |
190 | 190 | position: absolute; |
191 | 191 | top:0; |
192 | - <?php echo $end;?>:0; |
|
192 | + <?php echo $end; ?>:0; |
|
193 | 193 | padding-end:20px; |
194 | 194 | padding-top:7px; |
195 | 195 | } |
196 | 196 | |
197 | 197 | div.sidebar { |
198 | 198 | display: inline; |
199 | - float: <?php echo $end;?>; |
|
199 | + float: <?php echo $end; ?>; |
|
200 | 200 | padding-end: 20px; |
201 | 201 | } |
202 | 202 | div.sidebar a { |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | |
242 | 242 | div.footer { |
243 | 243 | width: 100%; |
244 | - <?php echo $start;?>: 0; |
|
245 | - <?php echo $end;?>: 0; |
|
244 | + <?php echo $start; ?>: 0; |
|
245 | + <?php echo $end; ?>: 0; |
|
246 | 246 | bottom: 0; |
247 | 247 | position: absolute; |
248 | 248 | background: white; |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | position: fixed; |
289 | 289 | top: 0; |
290 | 290 | bottom: 0; |
291 | - <?php echo $start;?>: 0; |
|
292 | - <?php echo $end;?>: 0; |
|
291 | + <?php echo $start; ?>: 0; |
|
292 | + <?php echo $end; ?>: 0; |
|
293 | 293 | background-color: #000000; |
294 | 294 | opacity: 0.5; |
295 | 295 | z-index: 90; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | padding: 15px; |
316 | 316 | text-align: start; |
317 | 317 | width: 850px; |
318 | - <?php echo $start;?>: 100px; |
|
318 | + <?php echo $start; ?>: 100px; |
|
319 | 319 | top: 50px; |
320 | 320 | z-index: 100; |
321 | 321 | } |
@@ -324,15 +324,15 @@ discard block |
||
324 | 324 | position: absolute; |
325 | 325 | top: 0; |
326 | 326 | bottom: 0; |
327 | - <?php echo $start;?>: 0; |
|
328 | - <?php echo $end;?>: 0; |
|
327 | + <?php echo $start; ?>: 0; |
|
328 | + <?php echo $end; ?>: 0; |
|
329 | 329 | z-index: 100; |
330 | 330 | } |
331 | 331 | |
332 | 332 | div#msgbox div { |
333 | 333 | position: fixed; |
334 | - <?php echo $start;?>: 0; |
|
335 | - <?php echo $end;?>: 0; |
|
334 | + <?php echo $start; ?>: 0; |
|
335 | + <?php echo $end; ?>: 0; |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | div#msgbox div div.graybox { |
@@ -346,12 +346,12 @@ discard block |
||
346 | 346 | div.graybox img { |
347 | 347 | display: block; |
348 | 348 | cursor: pointer; |
349 | - float: <?php echo $end;?>; |
|
349 | + float: <?php echo $end; ?>; |
|
350 | 350 | margin: 0px 0px 10px 10px; |
351 | 351 | } |
352 | 352 | |
353 | 353 | img.icon { |
354 | - float: <?php echo $start;?>; |
|
354 | + float: <?php echo $start; ?>; |
|
355 | 355 | margin-end: 5px; |
356 | 356 | margin-top: 3px; |
357 | 357 | } |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | |
409 | 409 | span.edu_cat { |
410 | 410 | font-weight: bold; |
411 | - color: <?php echo $colour2;?>; |
|
411 | + color: <?php echo $colour2; ?>; |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | span.tooltip { |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | border-bottom-style:solid; |
517 | 517 | border-top-width:5px; |
518 | 518 | border-bottom-width:5px; |
519 | - border-color: <?php echo $colour1;?>; |
|
519 | + border-color: <?php echo $colour1; ?>; |
|
520 | 520 | padding-start:30px; |
521 | 521 | } |
522 | 522 | |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | } |
587 | 587 | |
588 | 588 | #close_button { |
589 | - background: <?php echo $colour2;?>; |
|
589 | + background: <?php echo $colour2; ?>; |
|
590 | 590 | color: #FFFFFF; |
591 | 591 | height: 23px; |
592 | 592 | border-start-style: inset; |
@@ -606,14 +606,14 @@ discard block |
||
606 | 606 | padding-top: 1px; |
607 | 607 | padding-bottom: 1px; |
608 | 608 | position: relative; |
609 | - <?php echo $start;?>: 640px; |
|
609 | + <?php echo $start; ?>: 640px; |
|
610 | 610 | cursor:pointer; |
611 | 611 | } |
612 | 612 | |
613 | 613 | #loading_ico { |
614 | 614 | display: none; |
615 | 615 | position: absolute; |
616 | - <?php echo $start;?>: 200px; |
|
616 | + <?php echo $start; ?>: 200px; |
|
617 | 617 | top: 220px; |
618 | 618 | z-index: 200; |
619 | 619 | text-align: center; |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | z-index: 100; |
628 | 628 | position: absolute; |
629 | 629 | width: 700px; |
630 | - <?php echo $start;?>: 200px; |
|
630 | + <?php echo $start; ?>: 200px; |
|
631 | 631 | text-align: justify; |
632 | 632 | top: 200px; |
633 | 633 | box-shadow: 5px 5px 5px #666666; |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | width: 30em; |
662 | 662 | padding-start: 10px; |
663 | 663 | padding-end: 0px; |
664 | - background: <?php echo $colour2;?>; |
|
664 | + background: <?php echo $colour2; ?>; |
|
665 | 665 | color: white; |
666 | 666 | box-shadow: 10px 10px 5px #888888; |
667 | 667 | } |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | padding-top: 4px; |
709 | 709 | padding-bottom: 12px; |
710 | 710 | padding-start: 30px; |
711 | - background: <?php echo $colour1;?>; |
|
711 | + background: <?php echo $colour1; ?>; |
|
712 | 712 | text-align: start; |
713 | 713 | text-shadow: 10px 10px 5px #888888; |
714 | 714 | } |
@@ -718,9 +718,9 @@ discard block |
||
718 | 718 | border-bottom-style:solid; |
719 | 719 | border-top-width:5px; |
720 | 720 | border-bottom-width:5px; |
721 | - border-color: <?php echo $colour1;?>; |
|
721 | + border-color: <?php echo $colour1; ?>; |
|
722 | 722 | padding-start:30px; |
723 | - color: <?php echo $colour2;?>; |
|
723 | + color: <?php echo $colour2; ?>; |
|
724 | 724 | } |
725 | 725 | |
726 | 726 | #heading h1 { |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | text-align: justify; |
740 | 740 | border-bottom-style:solid; |
741 | 741 | border-bottom-width:5px; |
742 | - border-color: <?php echo $colour1;?>; |
|
742 | + border-color: <?php echo $colour1; ?>; |
|
743 | 743 | font-size: 11px; |
744 | 744 | font-weight: normal; |
745 | 745 | } |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | #main_menu_info { |
749 | 749 | position: relative; |
750 | 750 | top: 15px; |
751 | - <?php echo $start;?>: 0px; |
|
751 | + <?php echo $start; ?>: 0px; |
|
752 | 752 | padding:10px; padding-start:20px; padding-end:20px; |
753 | 753 | background: #f0f0f0; |
754 | 754 | border: 1px solid #dddddd; |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | |
787 | 787 | #faq { |
788 | 788 | padding: 20px; |
789 | - color: <?php echo $colour2;?>; |
|
789 | + color: <?php echo $colour2; ?>; |
|
790 | 790 | background: #ffffff; |
791 | 791 | } |
792 | 792 | |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | #idp_logo { |
805 | 805 | display:none; |
806 | 806 | position:absolute; |
807 | - <?php echo $end;?>:30px; |
|
807 | + <?php echo $end; ?>:30px; |
|
808 | 808 | max-height:150px; |
809 | 809 | max-width:150px; |
810 | 810 | padding-top:10px; |
@@ -827,18 +827,18 @@ discard block |
||
827 | 827 | #slides img { |
828 | 828 | position: absolute; |
829 | 829 | top: 145px; |
830 | - <?php echo $end;?>: 60px; |
|
830 | + <?php echo $end; ?>: 60px; |
|
831 | 831 | } |
832 | 832 | |
833 | 833 | #slides span { |
834 | 834 | position: absolute; |
835 | - <?php echo $start;?>: 180px; |
|
835 | + <?php echo $start; ?>: 180px; |
|
836 | 836 | z-index: 20; |
837 | 837 | } |
838 | 838 | |
839 | 839 | #line1 { |
840 | 840 | top:145px; |
841 | - color: <?php echo $colour2;?>; |
|
841 | + color: <?php echo $colour2; ?>; |
|
842 | 842 | font-size:20px; |
843 | 843 | } |
844 | 844 | |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | |
851 | 851 | #line3 { |
852 | 852 | top:245px; |
853 | - <?php echo $start;?>: 200px; |
|
853 | + <?php echo $start; ?>: 200px; |
|
854 | 854 | color: maroon; |
855 | 855 | font-size:25px; |
856 | 856 | } |
@@ -885,7 +885,7 @@ discard block |
||
885 | 885 | |
886 | 886 | #front_page_leftmenu { |
887 | 887 | border-end:solid; |
888 | - border-color: <?php echo $colour1;?>; |
|
888 | + border-color: <?php echo $colour1; ?>; |
|
889 | 889 | border-width:5px; |
890 | 890 | min-height:400px; |
891 | 891 | padding-start: 10px; |
@@ -910,11 +910,11 @@ discard block |
||
910 | 910 | } |
911 | 911 | |
912 | 912 | a:link { |
913 | - color:<?php echo $colour2;?>; |
|
913 | + color:<?php echo $colour2; ?>; |
|
914 | 914 | } |
915 | 915 | |
916 | 916 | a:visited { |
917 | - color:<?php echo $colour2;?>; |
|
917 | + color:<?php echo $colour2; ?>; |
|
918 | 918 | } |
919 | 919 | |
920 | 920 | a:hover { |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | } |
923 | 923 | |
924 | 924 | a:active { |
925 | - color:<?php echo $colour2;?>; |
|
925 | + color:<?php echo $colour2; ?>; |
|
926 | 926 | } |
927 | 927 | |
928 | 928 | .comment { |
@@ -972,7 +972,7 @@ discard block |
||
972 | 972 | .download_button_text { |
973 | 973 | width: 380px; |
974 | 974 | position:absolute; |
975 | - <?php echo $end;?>: 5px; |
|
975 | + <?php echo $end; ?>: 5px; |
|
976 | 976 | padding-top:0px; |
977 | 977 | } |
978 | 978 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * License: see the web/copyright.inc.php file in the file structure or |
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | -require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/config/_config.php"; |
|
21 | +require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))."/config/_config.php"; |
|
22 | 22 | $langInstance = new core\common\Language(); |
23 | 23 | $start = $langInstance->rtl ? "right" : "left"; |
24 | 24 | $end = $langInstance->rtl ? "left" : "right"; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $Gui->loggerInstance->debug(4, $operatingSystem); |
48 | 48 | $uiElements = new web\lib\admin\UIElements(); |
49 | 49 | if ($operatingSystem) { |
50 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
50 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
51 | 51 | } |
52 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
52 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
53 | 53 | $cssUrl = $Gui->skinObject->findResourceUrl("CSS", "cat-user.css.php"); |
54 | 54 | ?> |
55 | 55 | </script> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | <?php |
64 | 64 | echo $divs->divHeading($visibility); |
65 | 65 | $Gui->languageInstance->setTextDomain("diagnostics"); |
66 | -require dirname(__DIR__) . '/diag/js/diag_js.php'; |
|
66 | +require dirname(__DIR__).'/diag/js/diag_js.php'; |
|
67 | 67 | ?> |
68 | 68 | <div id="main_page"> |
69 | 69 | <div id="loading_ico"> |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | </div> |
80 | 80 | <div id="main_body"> |
81 | 81 | <div id="user_page"> |
82 | - <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?> |
|
82 | + <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?> |
|
83 | 83 | <div id="user_info" style='padding-top: 10px;'> |
84 | 84 | <div id='diagnostic_choice'> |
85 | - <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?> |
|
86 | - <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?> |
|
87 | - <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?> |
|
85 | + <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?> |
|
86 | + <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?> |
|
87 | + <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?> |
|
88 | 88 | </div> |
89 | 89 | <div id='diagnostic_enduser' style='display: none;'> |
90 | 90 | <h2><?php echo _("Tools for End Users"); ?></h2> |
@@ -94,24 +94,24 @@ discard block |
||
94 | 94 | ?> |
95 | 95 | </p> |
96 | 96 | <?php |
97 | - echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>'; |
|
97 | + echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>'; |
|
98 | 98 | echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<strong>realm.tld</strong>'):"); |
99 | 99 | ?> |
100 | 100 | <input type='text' name='user_realm' id='user_realm' value=''> |
101 | 101 | <?php |
102 | - echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>'; |
|
103 | - echo _("You can select your home institution from the following list") . '<br/>'; |
|
102 | + echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>'; |
|
103 | + echo _("You can select your home institution from the following list").'<br/>'; |
|
104 | 104 | echo '<div id="select_idp_country"><a href="" id="idp_countries_list">'; |
105 | - echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>'; |
|
105 | + echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>'; |
|
106 | 106 | ?> |
107 | 107 | <div id="select_idp_area" style="display:none;"> |
108 | 108 | </div> |
109 | 109 | </div> |
110 | 110 | <div id="position_info"> |
111 | 111 | <?php |
112 | - echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>'; |
|
112 | + echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>'; |
|
113 | 113 | echo '<div id="select_sp_country"><a href="" id="sp_countries_list">'; |
114 | - echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>'; |
|
114 | + echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>'; |
|
115 | 115 | ?> |
116 | 116 | <div id="select_sp_area" style="display:none;"> |
117 | 117 | </div> |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | echo 'none'; |
145 | 145 | } |
146 | 146 | echo ";'>"; |
147 | - echo '<h3>' . _("What is the nature of the problem?") . '</h3>'; |
|
148 | - echo '<input type="radio" name="problem_type" value="0"' . (($sp==1)? ' checked' : '') . '>'; |
|
149 | - echo _("I suspect a technical problem at a particular IdP") . '<br>'; |
|
147 | + echo '<h3>'._("What is the nature of the problem?").'</h3>'; |
|
148 | + echo '<input type="radio" name="problem_type" value="0"'.(($sp == 1) ? ' checked' : '').'>'; |
|
149 | + echo _("I suspect a technical problem at a particular IdP").'<br>'; |
|
150 | 150 | echo '<input type="radio" name="problem_type" value="1">'; |
151 | - echo _("I want to report abuse of network resources by a roaming user") . '<br>'; |
|
151 | + echo _("I want to report abuse of network resources by a roaming user").'<br>'; |
|
152 | 152 | echo '<input type="radio" name="problem_type" value="2">'; |
153 | 153 | echo _("I suspect a technical problem for one of my users at a particular SP"); |
154 | 154 | echo "<div id='idp_contact_area'></div>"; |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | echo "</div>"; |
158 | 158 | } else { |
159 | 159 | echo "0\">"; |
160 | - echo _("This service is for authenticated admins only.") . '<br>'; |
|
161 | - echo "<a href=\"diag.php?admin=1\">" . |
|
162 | - _("eduroam® admin access is needed") . "</a>"; |
|
160 | + echo _("This service is for authenticated admins only.").'<br>'; |
|
161 | + echo "<a href=\"diag.php?admin=1\">". |
|
162 | + _("eduroam® admin access is needed")."</a>"; |
|
163 | 163 | } |
164 | 164 | ?> |
165 | 165 | <div id="realm_problem"> |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | return false; |
238 | 238 | }); |
239 | 239 | $(document).on('change', '#idp_country' , function() { |
240 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
240 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
241 | 241 | var id = $(this).attr('id'); |
242 | 242 | var k = id.indexOf('_'); |
243 | 243 | var type = id.substr(0,k); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | var shtml = ''; |
256 | 256 | var select = ''; |
257 | 257 | if (type !== 'asp') { |
258 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
258 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
259 | 259 | } |
260 | 260 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
261 | 261 | for (var i in institutions) { |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } else { |
277 | 277 | if (data.status === 0) { |
278 | 278 | inProgress(0); |
279 | - var msg = <?php echo '"' . _("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.") . '"'; ?>; |
|
279 | + var msg = <?php echo '"'._("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.").'"'; ?>; |
|
280 | 280 | alert(msg); |
281 | 281 | $('#select_idp_country').show(); |
282 | 282 | $('#select_idp_area').hide(); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | }, |
286 | 286 | error:function() { |
287 | 287 | inProgress(0); |
288 | - var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>; |
|
288 | + var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>; |
|
289 | 289 | alert(msg); |
290 | 290 | $('#select_idp_country').show(); |
291 | 291 | $('#select_idp_area').hide(); |
@@ -301,9 +301,9 @@ discard block |
||
301 | 301 | }); |
302 | 302 | $(document).on('change', '#select_sp_problem' , function() { |
303 | 303 | if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') { |
304 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>); |
|
304 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>); |
|
305 | 305 | } else { |
306 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>); |
|
306 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>); |
|
307 | 307 | } |
308 | 308 | $('#realm_in_db_admin').hide(); |
309 | 309 | $('#admin_realm').val(''); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | clear_sp_question(); |
312 | 312 | }); |
313 | 313 | $(document).on('change', '#sp_country, #asp_country' , function() { |
314 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
314 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
315 | 315 | var id = $(this).attr('id'); |
316 | 316 | var k = id.indexOf('_'); |
317 | 317 | var type = id.substr(0,k); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | var shtml = ''; |
330 | 330 | var select = ''; |
331 | 331 | if (type !== 'asp') { |
332 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
332 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
333 | 333 | } |
334 | 334 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
335 | 335 | for (var i in hotspots) { |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | inProgress(0); |
353 | 353 | var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">'; |
354 | 354 | var shtml = '<td></td><td>'; |
355 | - select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>'; |
|
355 | + select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>'; |
|
356 | 356 | if (type !== 'asp') { |
357 | 357 | $('#row_' + type + '_institution').html(''); |
358 | 358 | $('#row_' + type + '_institution').append(shtml + select); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $('#start_test_area').hide(); |
387 | 387 | return false; |
388 | 388 | } |
389 | - var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>; |
|
389 | + var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>; |
|
390 | 390 | inProgress(1, comment); |
391 | 391 | $.ajax({ |
392 | 392 | url: "findRealm.php", |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | var realms = data.realms; |
399 | 399 | var realmselect = ''; |
400 | 400 | if (realms.length > 1) { |
401 | - realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>; |
|
401 | + realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>; |
|
402 | 402 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
403 | 403 | for (var i in realms) { |
404 | 404 | realmselect = realmselect + '<input type="radio" name="realm" '; |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | } |
411 | 411 | realmselect = realmselect + '</span></td>'; |
412 | 412 | } else { |
413 | - realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>; |
|
413 | + realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>; |
|
414 | 414 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
415 | 415 | realmselect = realmselect + realms[0] + '</span>'; |
416 | 416 | realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">'; |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | clear_sp_question(); |
463 | 463 | t = 1; |
464 | 464 | } |
465 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
465 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
466 | 466 | inProgress(1, comment); |
467 | 467 | /*waiting(comment);*/ |
468 | 468 | $.ajax({ |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | testSociopath('', answer); |
524 | 524 | }); |
525 | 525 | $('#realmtest').click(function(event){ |
526 | - var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>; |
|
526 | + var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>; |
|
527 | 527 | inProgress(1, comment); |
528 | 528 | $('#start_test_area').hide(); |
529 | 529 | if ($('#select_sp_area').is(':hidden')) { |
@@ -571,13 +571,13 @@ discard block |
||
571 | 571 | reset_footer(); |
572 | 572 | testSociopath(realm, 0); |
573 | 573 | } else { |
574 | - var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>; |
|
575 | - result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>; |
|
574 | + var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>; |
|
575 | + result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>; |
|
576 | 576 | result = result + '</h3>' |
577 | 577 | if (r.length == 1) { |
578 | - result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>; |
|
578 | + result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>; |
|
579 | 579 | } else { |
580 | - result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>; |
|
580 | + result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>; |
|
581 | 581 | } |
582 | 582 | result = result + ': ' |
583 | 583 | for (var i=0; i < r.length; i++) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | result = result + r[i]; |
588 | 588 | } |
589 | 589 | result = result + '.<br>'; |
590 | - result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
590 | + result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
591 | 591 | result = result + '</div>'; |
592 | 592 | $('#after_stage_1').hide(); |
593 | 593 | $('#before_stage_1').show(); |
@@ -655,43 +655,43 @@ discard block |
||
655 | 655 | success:function(data) { |
656 | 656 | if (data.status === 1) { |
657 | 657 | var result = ''; |
658 | - var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>; |
|
658 | + var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>; |
|
659 | 659 | result = '<div class="padding">'; |
660 | 660 | if (type == 'idp_send') { |
661 | - result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
661 | + result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
662 | 662 | result = result + '<table>'; |
663 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
664 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
665 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
666 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
667 | - result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
668 | - result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>'; |
|
663 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
664 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
665 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
666 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
667 | + result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
668 | + result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>'; |
|
669 | 669 | if (data.tests_result == 1) { |
670 | - result = result + <?php echo '"' . _("failure") . '"'; ?>; |
|
670 | + result = result + <?php echo '"'._("failure").'"'; ?>; |
|
671 | 671 | } else { |
672 | - result = result + <?php echo '"' . _("success") . '"'; ?>; |
|
672 | + result = result + <?php echo '"'._("success").'"'; ?>; |
|
673 | 673 | } |
674 | 674 | result = result + '</td></tr>'; |
675 | - result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
676 | - result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' '; |
|
675 | + result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
676 | + result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' '; |
|
677 | 677 | if (data.emailsent == 1) { |
678 | - result = result + <?php echo '"' . _("send successfully") . '"'; ?>; |
|
678 | + result = result + <?php echo '"'._("send successfully").'"'; ?>; |
|
679 | 679 | } else { |
680 | - result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>; |
|
680 | + result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>; |
|
681 | 681 | } |
682 | 682 | result = result + '</td><td></td></tr>'; |
683 | 683 | } |
684 | 684 | if (type == 'sp_send') { |
685 | - result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
685 | + result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
686 | 686 | result = result + '<table>'; |
687 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
688 | - result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
689 | - result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
690 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
691 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
692 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
693 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
694 | - result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
687 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
688 | + result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
689 | + result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
690 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
691 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
692 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
693 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
694 | + result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
695 | 695 | } |
696 | 696 | result = result + '</div>'; |
697 | 697 | showInfo(result, title); |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | $(this).removeClass('visible_row').addClass('hidden_row'); |
718 | 718 | } |
719 | 719 | }); |
720 | - $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>); |
|
720 | + $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>); |
|
721 | 721 | } else { |
722 | 722 | $('#admin_realm').removeClass('error_input'); |
723 | 723 | $('#admin_realm').attr('title', ''); |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | $(document).on('keyup change', '#email' , function() { |
728 | 728 | if ($(this).val().length == 0 || !isEmail($(this).val())) { |
729 | 729 | $('#email').addClass('error_input'); |
730 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
730 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
731 | 731 | } else { |
732 | 732 | $('#email').removeClass('error_input'); |
733 | 733 | $('#email').attr('title', ''); |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | if ($('#mac').val().length > 0) { |
741 | 741 | if ($('#mac').val().length != 17) { |
742 | 742 | $('#mac').addClass('error_input'); |
743 | - $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>); |
|
743 | + $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>); |
|
744 | 744 | } else { |
745 | 745 | $('#mac').removeClass('error_input'); |
746 | 746 | $('#mac').attr('title', ''); |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | if ($(this).attr('id') == 'email' && $(this).val().length > 0) { |
750 | 750 | if (!isEmail($(this).val())) { |
751 | 751 | $('#email').addClass('error_input'); |
752 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
752 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
753 | 753 | } else { |
754 | 754 | $('#email').removeClass('error_input'); |
755 | 755 | $('#email').attr('title', ''); |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | if ($(this).attr('id') == 'outer_id' && $(this).val().length > 0) { |
759 | 759 | if (!isEmail($(this).val(), true)) { |
760 | 760 | $('#outer_id').addClass('error_input'); |
761 | - $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>); |
|
761 | + $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>); |
|
762 | 762 | } else { |
763 | 763 | $('#outer_id').removeClass('error_input'); |
764 | 764 | $('#outer_id').attr('title', ''); |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) { |
768 | 768 | if (!isOperatorName($(this).val())) { |
769 | 769 | $('#opname').addClass('error_input'); |
770 | - $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>); |
|
770 | + $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>); |
|
771 | 771 | $('#spmanually').show(); |
772 | 772 | } else { |
773 | 773 | $('#opname').removeClass('error_input'); |