@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | if (!isset($_GET['deployment_id'])) { |
38 | 38 | $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED); |
39 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier); |
|
39 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier); |
|
40 | 40 | exit(0); |
41 | 41 | } |
42 | 42 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | if (in_array('OK', $response)) { |
51 | 51 | $deployment->deactivate(); |
52 | 52 | } |
53 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
53 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
54 | 54 | exit(0); |
55 | 55 | } |
56 | 56 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (in_array('OK', $response)) { |
60 | 60 | $deployment->activate(); |
61 | 61 | } |
62 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
62 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
63 | 63 | exit(0); |
64 | 64 | } |
65 | 65 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | if ($deployment->status == core\DeploymentManaged::ACTIVE) { |
80 | 80 | $response = $deployment->setRADIUSconfig(); |
81 | 81 | } |
82 | - header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
82 | + header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
83 | 83 | exit(0); |
84 | 84 | } |
85 | 85 | } |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | echo $uiElements->instLevelInfoBoxes($my_inst); |
108 | 108 | $deploymentOptions = $deployment->getAttributes(); |
109 | 109 | echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'> |
110 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
110 | + <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>"; |
|
111 | 111 | $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, "Profile"); |
112 | 112 | ?> |
113 | 113 | <?php |
114 | 114 | echo "<fieldset class='option_container' id='managedsp_override'> |
115 | - <legend><strong>" . _("Options for this deployment") . "</strong></legend>"; |
|
115 | + <legend><strong>" . _("Options for this deployment")."</strong></legend>"; |
|
116 | 116 | ?> |
117 | 117 | <table> |
118 | 118 | <tr> |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | <!-- input for VLAN identifier for home users--> |
131 | 131 | <td> |
132 | 132 | <span id='vlan_label'> |
133 | - <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?> |
|
133 | + <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?> |
|
134 | 134 | </span> |
135 | 135 | </td> |
136 | 136 | <td> |
@@ -145,10 +145,10 @@ discard block |
||
145 | 145 | </table> |
146 | 146 | <?php |
147 | 147 | echo $optionDisplay->prefilledOptionTable("managedsp"); |
148 | - echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>" . _("Add new option") . "</button>"; |
|
148 | + echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>"._("Add new option")."</button>"; |
|
149 | 149 | echo "</fieldset>"; |
150 | 150 | |
151 | 151 | |
152 | - echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_sp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
152 | + echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_sp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
153 | 153 | echo $deco->footer(); |
154 | 154 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | $link = 'http://'; |
40 | 40 | } |
41 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
41 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
42 | 42 | $link = htmlspecialchars($link); |
43 | 43 | |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot)); |
@@ -93,21 +93,21 @@ discard block |
||
93 | 93 | <?php |
94 | 94 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
95 | 95 | echo "<tr> |
96 | - <td>" . _("Check another realm's reachability") . "</td> |
|
96 | + <td>" . _("Check another realm's reachability")."</td> |
|
97 | 97 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
98 | 98 | <input type='text' name='realm' id='realm'> |
99 | 99 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
100 | - <button type='submit'>" . _("Go!") . "</button> |
|
100 | + <button type='submit'>"._("Go!")."</button> |
|
101 | 101 | </form> |
102 | 102 | </td> |
103 | 103 | </tr>"; |
104 | 104 | } |
105 | 105 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED |
106 | 106 | echo "<tr> |
107 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
107 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
108 | 108 | <td> |
109 | 109 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
110 | - <button type='submit'>" . _("Go!") . "</button> |
|
110 | + <button type='submit'>" . _("Go!")."</button> |
|
111 | 111 | </form> |
112 | 112 | </td> |
113 | 113 | </tr>"; |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | <?php |
119 | 119 | $hotspotProfiles = $my_inst->listDeployments(); |
120 | 120 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
121 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
121 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
122 | 122 | } |
123 | 123 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
124 | - echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
124 | + echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>"; |
|
125 | 125 | // display an info box with the connection data |
126 | 126 | } |
127 | 127 | |
@@ -141,19 +141,19 @@ discard block |
||
141 | 141 | ?> |
142 | 142 | <div style='display: table-row; margin-bottom: 20px;'> |
143 | 143 | <div class='profilebox' style='display: table-cell;'> |
144 | - <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
144 | + <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
145 | 145 | <table> |
146 | 146 | <tr> |
147 | 147 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
148 | 148 | <?php |
149 | 149 | if ($deploymentObject->host1_v4 !== NULL) { |
150 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
150 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
151 | 151 | } |
152 | 152 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
153 | 153 | echo "<br/>"; |
154 | 154 | } |
155 | 155 | if ($deploymentObject->host1_v6 !== NULL) { |
156 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
156 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
157 | 157 | } |
158 | 158 | ?> |
159 | 159 | </td> |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | <td><?php echo $deploymentObject->port1; ?></td> |
162 | 162 | <td> |
163 | 163 | <?php |
164 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
165 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
166 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
164 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
165 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
166 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
167 | 167 | ?> |
168 | 168 | </td> |
169 | 169 | </tr> |
@@ -171,22 +171,22 @@ discard block |
||
171 | 171 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
172 | 172 | <?php |
173 | 173 | if ($deploymentObject->host2_v4 !== NULL) { |
174 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
174 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
175 | 175 | } |
176 | 176 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
177 | 177 | echo "<br/>"; |
178 | 178 | } |
179 | 179 | if ($deploymentObject->host2_v6 !== NULL) { |
180 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
180 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
181 | 181 | } |
182 | 182 | ?></td> |
183 | 183 | <td><?php echo _("RADIUS port number: ") ?></td> |
184 | 184 | <td><?php echo $deploymentObject->port2; ?></td> |
185 | 185 | <td> |
186 | 186 | <?php |
187 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
188 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
189 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
187 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
188 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
189 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
190 | 190 | ?> |
191 | 191 | </td> |
192 | 192 | </tr> |
@@ -237,12 +237,12 @@ discard block |
||
237 | 237 | if (isset($res['FAILURE']) && $res['FAILURE'] > 0) { |
238 | 238 | echo '<br>'; |
239 | 239 | if ($res['FAILURE'] == 2) { |
240 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
240 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
241 | 241 | } else { |
242 | 242 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
243 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
243 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
244 | 244 | } else { |
245 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
245 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
246 | 246 | } |
247 | 247 | } |
248 | 248 | } |
@@ -262,12 +262,12 @@ discard block |
||
262 | 262 | if ($res['FAILURE'] > 0) { |
263 | 263 | echo '<br>'; |
264 | 264 | if ($res['FAILURE'] == 2) { |
265 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
265 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
266 | 266 | } else { |
267 | 267 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
268 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
268 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
269 | 269 | } else { |
270 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
270 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | } |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
2 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
3 | 3 | /** |
4 | 4 | * check if URL responds with 200 |
5 | 5 | * |
6 | 6 | * @param string $srv server name |
7 | 7 | * @return integer or NULL |
8 | 8 | */ |
9 | -function checkConfigRADIUSDaemon ($srv) { |
|
9 | +function checkConfigRADIUSDaemon($srv) { |
|
10 | 10 | $ch = curl_init(); |
11 | 11 | if ($ch === FALSE) { |
12 | 12 | return NULL; |
13 | 13 | } |
14 | 14 | $timeout = 10; |
15 | - curl_setopt ( $ch, CURLOPT_URL, $srv ); |
|
16 | - curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); |
|
17 | - curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout ); |
|
15 | + curl_setopt($ch, CURLOPT_URL, $srv); |
|
16 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
17 | + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
|
18 | 18 | curl_exec($ch); |
19 | - $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); |
|
19 | + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
|
20 | 20 | if ($http_code == 200) { |
21 | 21 | return 1; |
22 | 22 | } |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | } |
53 | 53 | $siteStatus = array(); |
54 | 54 | foreach (array_keys($brokenDeployments) as $server_id) { |
55 | - print "check $server_id " . $radiusSite[$server_id] . "\n"; |
|
56 | - $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://' . $radiusSite[$server_id]); |
|
55 | + print "check $server_id ".$radiusSite[$server_id]."\n"; |
|
56 | + $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://'.$radiusSite[$server_id]); |
|
57 | 57 | if ($siteStatus[$server_id]) { |
58 | 58 | echo "\ncheck radius\n"; |
59 | 59 | echo \config\Diagnostics::RADIUSSPTEST['port']."\n"; |