@@ -174,7 +174,10 @@ |
||
174 | 174 | <div class="pFooter"> |
175 | 175 | <div class="btn-group"> |
176 | 176 | <button class="btn btn-sm btn-default hidePopups"><?php print _('Cancel'); ?></button> |
177 | - <button class="btn btn-sm btn-default <?php if($_POST['action']=="delete") { print "btn-danger"; } else { print "btn-success"; } ?>" id="editAuthMethodSubmit"><i class="fa <?php if($_POST['action']=="add") { print "fa-plus"; } else if ($_POST['action']=="delete") { print "fa-trash-o"; } else { print "fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button> |
|
177 | + <button class="btn btn-sm btn-default <?php if($_POST['action']=="delete") { print "btn-danger"; } |
|
178 | +else { print "btn-success"; } ?>" id="editAuthMethodSubmit"><i class="fa <?php if($_POST['action']=="add") { print "fa-plus"; } |
|
179 | +else if ($_POST['action']=="delete") { print "fa-trash-o"; } |
|
180 | +else { print "fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button> |
|
178 | 181 | </div> |
179 | 182 | |
180 | 183 | <?php |
@@ -39,12 +39,16 @@ |
||
39 | 39 | if(!is_numeric($_POST['vlanMax'])) { $Result->show("danger", _("Invalid value for Max VLAN number"), true); } |
40 | 40 | |
41 | 41 | //verify snmp support |
42 | -if ($Admin->verify_checkbox(@$_POST['enableSNMP'])==1) |
|
43 | -if (!in_array("snmp", get_loaded_extensions())) { $Result->show("danger", _("Missing snmp support in php"), true); } |
|
42 | +if ($Admin->verify_checkbox(@$_POST['enableSNMP'])==1) { |
|
43 | + if (!in_array("snmp", get_loaded_extensions())) { $Result->show("danger", _("Missing snmp support in php"), true); |
|
44 | +} |
|
45 | +} |
|
44 | 46 | |
45 | 47 | //verify racktables gd support |
46 | -if ($Admin->verify_checkbox(@$_POST['enableRACK'])==1) |
|
47 | -if (!in_array("gd", get_loaded_extensions())) { $Result->show("danger", _("Missing gd support in php"), true); } |
|
48 | +if ($Admin->verify_checkbox(@$_POST['enableRACK'])==1) { |
|
49 | + if (!in_array("gd", get_loaded_extensions())) { $Result->show("danger", _("Missing gd support in php"), true); |
|
50 | +} |
|
51 | +} |
|
48 | 52 | |
49 | 53 | # set update values |
50 | 54 | $values = array("id"=>1, |
@@ -186,7 +186,10 @@ discard block |
||
186 | 186 | <tr> |
187 | 187 | <td class="title"><?php print _('API'); ?></td> |
188 | 188 | <td> |
189 | - <input type="checkbox" class="input-switch" value="1" name="api" <?php if($settings['api'] == 1) print 'checked'; ?>> |
|
189 | + <input type="checkbox" class="input-switch" value="1" name="api" <?php if($settings['api'] == 1) { |
|
190 | + print 'checked'; |
|
191 | +} |
|
192 | +?>> |
|
190 | 193 | </td> |
191 | 194 | <td class="info2"> |
192 | 195 | <?php print _('Enable or disable API server module'); ?> |
@@ -197,7 +200,10 @@ discard block |
||
197 | 200 | <tr> |
198 | 201 | <td class="title"><?php print _('IP request module'); ?></td> |
199 | 202 | <td> |
200 | - <input type="checkbox" class="input-switch" value="1" name="enableIPrequests" <?php if($settings['enableIPrequests'] == 1) print 'checked'; ?>> |
|
203 | + <input type="checkbox" class="input-switch" value="1" name="enableIPrequests" <?php if($settings['enableIPrequests'] == 1) { |
|
204 | + print 'checked'; |
|
205 | +} |
|
206 | +?>> |
|
201 | 207 | </td> |
202 | 208 | <td class="info2"> |
203 | 209 | <?php print _('Enable or disable IP request module'); ?> |
@@ -208,7 +214,10 @@ discard block |
||
208 | 214 | <tr> |
209 | 215 | <td class="title"><?php print _('Enable VRF support'); ?></td> |
210 | 216 | <td> |
211 | - <input type="checkbox" class="input-switch" value="1" name="enableVRF" <?php if($settings['enableVRF'] == 1) print 'checked'; ?>> |
|
217 | + <input type="checkbox" class="input-switch" value="1" name="enableVRF" <?php if($settings['enableVRF'] == 1) { |
|
218 | + print 'checked'; |
|
219 | +} |
|
220 | +?>> |
|
212 | 221 | </td> |
213 | 222 | <td class="info2"> |
214 | 223 | <?php print _('Enable or disable VRF module'); ?> |
@@ -219,7 +228,10 @@ discard block |
||
219 | 228 | <tr> |
220 | 229 | <td class="title"><?php print _('Enable PowerDNS'); ?></td> |
221 | 230 | <td> |
222 | - <input type="checkbox" class="input-switch" value="1" name="enablePowerDNS" <?php if($settings['enablePowerDNS'] == 1) print 'checked'; ?>> |
|
231 | + <input type="checkbox" class="input-switch" value="1" name="enablePowerDNS" <?php if($settings['enablePowerDNS'] == 1) { |
|
232 | + print 'checked'; |
|
233 | +} |
|
234 | +?>> |
|
223 | 235 | </td> |
224 | 236 | <td class="info2"> |
225 | 237 | <?php print _('Enable or disable PowerDNS module'); ?> |
@@ -230,7 +242,10 @@ discard block |
||
230 | 242 | <tr> |
231 | 243 | <td class="title"><?php print _('Enable Firewall Zones'); ?></td> |
232 | 244 | <td> |
233 | - <input type="checkbox" class="input-switch" value="1" name="enableFirewallZones" <?php if($settings['enableFirewallZones'] == 1) print 'checked'; ?>> |
|
245 | + <input type="checkbox" class="input-switch" value="1" name="enableFirewallZones" <?php if($settings['enableFirewallZones'] == 1) { |
|
246 | + print 'checked'; |
|
247 | +} |
|
248 | +?>> |
|
234 | 249 | </td> |
235 | 250 | <td class="info2"> |
236 | 251 | <?php print _('Enable or disable firewall zone management module'); ?> |
@@ -241,7 +256,10 @@ discard block |
||
241 | 256 | <tr> |
242 | 257 | <td class="title"><?php print _('Resolve DNS names'); ?></td> |
243 | 258 | <td> |
244 | - <input type="checkbox" value="1" class="input-switch" name="enableDNSresolving" <?php if($settings['enableDNSresolving'] == 1) print 'checked'; ?>> |
|
259 | + <input type="checkbox" value="1" class="input-switch" name="enableDNSresolving" <?php if($settings['enableDNSresolving'] == 1) { |
|
260 | + print 'checked'; |
|
261 | +} |
|
262 | +?>> |
|
245 | 263 | </td> |
246 | 264 | <td class="info2"> |
247 | 265 | <?php print _('Check reverse dns lookups for IP addresses that do not have hostname in database. (Activating this feature can significantly increase ip address pages loading time!)'); ?> |
@@ -252,7 +270,13 @@ discard block |
||
252 | 270 | <tr> |
253 | 271 | <td class="title"><?php print _('Temporary shares'); ?></td> |
254 | 272 | <td> |
255 | - <input type="checkbox" value="1" class="input-switch" name="tempShare" <?php if($settings['tempShare'] == 0) print ''; else print 'checked'; ?>> |
|
273 | + <input type="checkbox" value="1" class="input-switch" name="tempShare" <?php if($settings['tempShare'] == 0) { |
|
274 | + print ''; |
|
275 | +} |
|
276 | +else { |
|
277 | + print 'checked'; |
|
278 | +} |
|
279 | +?>> |
|
256 | 280 | </td> |
257 | 281 | <td class="info2"> |
258 | 282 | <?php print _('Allow temporary subnet sharing'); ?> |
@@ -263,7 +287,13 @@ discard block |
||
263 | 287 | <tr> |
264 | 288 | <td class="title"><?php print _('Changelog'); ?></td> |
265 | 289 | <td> |
266 | - <input type="checkbox" value="1" class="input-switch" name="enableChangelog" <?php if($settings['enableChangelog'] == 0) print ''; else print 'checked'; ?>> |
|
290 | + <input type="checkbox" value="1" class="input-switch" name="enableChangelog" <?php if($settings['enableChangelog'] == 0) { |
|
291 | + print ''; |
|
292 | +} |
|
293 | +else { |
|
294 | + print 'checked'; |
|
295 | +} |
|
296 | +?>> |
|
267 | 297 | </td> |
268 | 298 | <td class="info2"> |
269 | 299 | <?php print _('Enable changelog module'); ?> |
@@ -274,7 +304,10 @@ discard block |
||
274 | 304 | <tr> |
275 | 305 | <td class="title"><?php print _('Multicast module'); ?></td> |
276 | 306 | <td> |
277 | - <input type="checkbox" class="input-switch" value="1" name="enableMulticast" <?php if($settings['enableMulticast'] == 1) print 'checked'; ?>> |
|
307 | + <input type="checkbox" class="input-switch" value="1" name="enableMulticast" <?php if($settings['enableMulticast'] == 1) { |
|
308 | + print 'checked'; |
|
309 | +} |
|
310 | +?>> |
|
278 | 311 | </td> |
279 | 312 | <td class="info2"> |
280 | 313 | <?php print _('Enable or disable multicast module'); ?> |
@@ -285,7 +318,10 @@ discard block |
||
285 | 318 | <tr> |
286 | 319 | <td class="title"><?php print _('Threshold module'); ?></td> |
287 | 320 | <td> |
288 | - <input type="checkbox" class="input-switch" value="1" name="enableThreshold" <?php if($settings['enableThreshold'] == 1) print 'checked'; ?>> |
|
321 | + <input type="checkbox" class="input-switch" value="1" name="enableThreshold" <?php if($settings['enableThreshold'] == 1) { |
|
322 | + print 'checked'; |
|
323 | +} |
|
324 | +?>> |
|
289 | 325 | </td> |
290 | 326 | <td class="info2"> |
291 | 327 | <?php print _('Enable or disable threshold module'); ?> |
@@ -296,7 +332,10 @@ discard block |
||
296 | 332 | <tr> |
297 | 333 | <td class="title"><?php print _('Rack module'); ?></td> |
298 | 334 | <td> |
299 | - <input type="checkbox" class="input-switch" value="1" name="enableRACK" <?php if($settings['enableRACK'] == 1) print 'checked'; ?>> |
|
335 | + <input type="checkbox" class="input-switch" value="1" name="enableRACK" <?php if($settings['enableRACK'] == 1) { |
|
336 | + print 'checked'; |
|
337 | +} |
|
338 | +?>> |
|
300 | 339 | </td> |
301 | 340 | <td class="info2"> |
302 | 341 | <?php print _('Enable or disable rack drawing module'); ?> |
@@ -307,7 +346,10 @@ discard block |
||
307 | 346 | <tr> |
308 | 347 | <td class="title"><?php print _('SNMP module'); ?></td> |
309 | 348 | <td> |
310 | - <input type="checkbox" class="input-switch" value="1" name="enableSNMP" <?php if($settings['enableSNMP'] == 1) print 'checked'; ?>> |
|
349 | + <input type="checkbox" class="input-switch" value="1" name="enableSNMP" <?php if($settings['enableSNMP'] == 1) { |
|
350 | + print 'checked'; |
|
351 | +} |
|
352 | +?>> |
|
311 | 353 | </td> |
312 | 354 | <td class="info2"> |
313 | 355 | <?php print _('Enable or disable SNMP module for devices'); ?> |
@@ -428,7 +470,10 @@ discard block |
||
428 | 470 | <tr> |
429 | 471 | <td class="title"><?php print _('Hide donation button'); ?></td> |
430 | 472 | <td> |
431 | - <input type="checkbox" value="1" class="input-switch" name="donate" <?php if($settings['donate'] == 1) print 'checked'; ?>> |
|
473 | + <input type="checkbox" value="1" class="input-switch" name="donate" <?php if($settings['donate'] == 1) { |
|
474 | + print 'checked'; |
|
475 | +} |
|
476 | +?>> |
|
432 | 477 | </td> |
433 | 478 | <td class="info2"> |
434 | 479 | <?php print _('Hide donation button'); ?> |
@@ -71,7 +71,8 @@ |
||
71 | 71 | </table> |
72 | 72 | </form> |
73 | 73 | |
74 | - <?php } else { $Result->show("info", _('No users in this group'), false); } ?> |
|
74 | + <?php } |
|
75 | +else { $Result->show("info", _('No users in this group'), false); } ?> |
|
75 | 76 | </div> |
76 | 77 | |
77 | 78 |
@@ -22,7 +22,8 @@ discard block |
||
22 | 22 | # fetch group and set title |
23 | 23 | if($_POST['action']=="add") { |
24 | 24 | $title = _('Add new group'); |
25 | -} else { |
|
25 | +} |
|
26 | +else { |
|
26 | 27 | //fetch all group details |
27 | 28 | $group = (array) $Admin->fetch_object("userGroups", "g_id", $_POST['id']); |
28 | 29 | //false die |
@@ -44,7 +45,10 @@ discard block |
||
44 | 45 | <!-- name --> |
45 | 46 | <tr> |
46 | 47 | <td><?php print _('Group name'); ?></td> |
47 | - <td><input type="text" name="g_name" class="form-control input-sm" value="<?php print @$group['g_name']; ?>" <?php if($_POST['action'] == "delete") print "readonly"; ?>></td> |
|
48 | + <td><input type="text" name="g_name" class="form-control input-sm" value="<?php print @$group['g_name']; ?>" <?php if($_POST['action'] == "delete") { |
|
49 | + print "readonly"; |
|
50 | +} |
|
51 | +?>></td> |
|
48 | 52 | <td class="info2"> |
49 | 53 | <?php print _('Enter group name'); ?> |
50 | 54 | </td> |
@@ -54,7 +58,10 @@ discard block |
||
54 | 58 | <tr> |
55 | 59 | <td><?php print _('Description'); ?></td> |
56 | 60 | <td> |
57 | - <input type="text" name="g_desc" class="form-control input-sm" value="<?php print @$group['g_desc']; ?>" <?php if($_POST['action'] == "delete") print "readonly"; ?>> |
|
61 | + <input type="text" name="g_desc" class="form-control input-sm" value="<?php print @$group['g_desc']; ?>" <?php if($_POST['action'] == "delete") { |
|
62 | + print "readonly"; |
|
63 | +} |
|
64 | +?>> |
|
58 | 65 | |
59 | 66 | <input type="hidden" name="g_id" value="<?php print $_POST['id']; ?>"> |
60 | 67 | <input type="hidden" name="action" value="<?php print $_POST['action']; ?>"> |
@@ -73,7 +80,10 @@ discard block |
||
73 | 80 | <div class="pFooter"> |
74 | 81 | <div class="btn-group"> |
75 | 82 | <button class="btn btn-sm btn-default hidePopups"><?php print _('Cancel'); ?></button> |
76 | - <button class="btn btn-sm btn-default <?php if($_POST['action']=="delete") { print "btn-danger"; } else { print "btn-success"; } ?>" id="editGroupSubmit"><i class="fa <?php if($_POST['action']=="add") { print "fa-plus"; } else if ($_POST['action']=="delete") { print "fa-trash-o"; } else { print "fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button> |
|
83 | + <button class="btn btn-sm btn-default <?php if($_POST['action']=="delete") { print "btn-danger"; } |
|
84 | +else { print "btn-success"; } ?>" id="editGroupSubmit"><i class="fa <?php if($_POST['action']=="add") { print "fa-plus"; } |
|
85 | +else if ($_POST['action']=="delete") { print "fa-trash-o"; } |
|
86 | +else { print "fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button> |
|
77 | 87 | </div> |
78 | 88 | |
79 | 89 | <!-- Result --> |
@@ -69,8 +69,7 @@ discard block |
||
69 | 69 | $groups = $adldap->group()->search(adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP,true,"*$_POST[dfilter]*"); |
70 | 70 | |
71 | 71 | //echo $adldap->getLastError(); |
72 | -} |
|
73 | -catch (adLDAPException $e) { |
|
72 | +} catch (adLDAPException $e) { |
|
74 | 73 | $Result->show("danger", $adldap->getLastError(), false); |
75 | 74 | $Result->show("danger", $e->getMessage(), true); |
76 | 75 | } |
@@ -85,7 +84,8 @@ discard block |
||
85 | 84 | print "<li>"._('Invalid baseDN setting for ' . $server->type)."</li>"; |
86 | 85 | print "<li>"._($server->type . ' account does not have enough privileges for search')."</li>"; |
87 | 86 | print "</div>"; |
88 | -} else { |
|
87 | +} |
|
88 | +else { |
|
89 | 89 | print _(" Following groups were found").": (".sizeof($groups)."):<hr>"; |
90 | 90 | |
91 | 91 | print "<table class='table table-top table-td-top table-striped'>"; |
@@ -113,8 +113,9 @@ discard block |
||
113 | 113 | print "<span class='muted'>$m</span><br>"; |
114 | 114 | $members[] = $m; |
115 | 115 | } |
116 | - if(isset($members)) |
|
117 | - $members = implode(";", $members); |
|
116 | + if(isset($members)) { |
|
117 | + $members = implode(";", $members); |
|
118 | + } |
|
118 | 119 | } |
119 | 120 | else { |
120 | 121 | $members = ""; |
@@ -71,7 +71,8 @@ |
||
71 | 71 | </table> |
72 | 72 | </form> |
73 | 73 | |
74 | - <?php } else { $Result->show("info", _('No available users to add to group'), false); } ?> |
|
74 | + <?php } |
|
75 | +else { $Result->show("info", _('No available users to add to group'), false); } ?> |
|
75 | 76 | </div> |
76 | 77 | |
77 | 78 |
@@ -250,7 +250,15 @@ |
||
250 | 250 | print "<button class='btn btn-sm btn-default btn-danger editFolderSubmitDelete' data-action='delete' data-subnetId='$folder_old_details[id]'><i class='fa fa-trash-o'></i> "._('Delete folder')."</button>"; |
251 | 251 | } |
252 | 252 | ?> |
253 | - <button class="btn btn-sm btn-default editFolderSubmit <?php if($_POST['action']=="delete") print "btn-danger"; else print "btn-success"; ?>"><i class="<?php if($_POST['action']=="add") { print "fa fa-plus"; } else if ($_POST['action']=="delete") { print "fa fa-trash-o"; } else { print "fa fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button> |
|
253 | + <button class="btn btn-sm btn-default editFolderSubmit <?php if($_POST['action']=="delete") { |
|
254 | + print "btn-danger"; |
|
255 | +} |
|
256 | +else { |
|
257 | + print "btn-success"; |
|
258 | +} |
|
259 | +?>"><i class="<?php if($_POST['action']=="add") { print "fa fa-plus"; } |
|
260 | +else if ($_POST['action']=="delete") { print "fa fa-trash-o"; } |
|
261 | +else { print "fa fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button> |
|
254 | 262 | </div> |
255 | 263 | |
256 | 264 | <div class="manageFolderEditResult"></div> |
@@ -67,7 +67,9 @@ |
||
67 | 67 | if (sizeof($custom_fields>0)) { |
68 | 68 | foreach ($custom_fields as $f) { |
69 | 69 | // replace descr with description |
70 | - if ($k=="descr") $k = "description"; |
|
70 | + if ($k=="descr") { |
|
71 | + $k = "description"; |
|
72 | + } |
|
71 | 73 | |
72 | 74 | if (strtolower($f['name'])==strtolower($k)) { print "<option values='$f[name]' selected='selected'>$f[name]</option>"; } |
73 | 75 | else { print "<option values='$f[name]'>$f[name]</option>"; } |