@@ -5,7 +5,7 @@ |
||
5 | 5 | */ |
6 | 6 | |
7 | 7 | # verify that user is logged in |
8 | -$User->check_user_session(); |
|
8 | +$User->check_user_session (); |
|
9 | 9 | |
10 | 10 | // set popup |
11 | 11 | $popup = false; |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | # print all domains or show records |
3 | -if (@$_GET['sPage']=="page") { include("domains-print.php"); } |
|
4 | -elseif (@$_GET['sPage']=="search") { include("domains-print.php"); } |
|
5 | -elseif (isset($_GET['sPage'])) { include("domain-records.php"); } |
|
6 | -else { include("domains-print.php"); } |
|
3 | +if (@$_GET['sPage'] == "page") { include("domains-print.php"); } |
|
4 | +elseif (@$_GET['sPage'] == "search") { include("domains-print.php"); } |
|
5 | +elseif (isset($_GET['sPage'])) { include("domain-records.php"); } |
|
6 | +else { include("domains-print.php"); } |
|
7 | 7 | ?> |
8 | 8 | \ No newline at end of file |
@@ -5,21 +5,21 @@ |
||
5 | 5 | ***************************/ |
6 | 6 | |
7 | 7 | # verify that user is logged in |
8 | -$User->check_user_session(); |
|
8 | +$User->check_user_session (); |
|
9 | 9 | |
10 | 10 | # fetch custom fields |
11 | -$custom = $Tools->fetch_custom_fields('racks'); |
|
11 | +$custom = $Tools->fetch_custom_fields ('racks'); |
|
12 | 12 | |
13 | 13 | # get hidden fields |
14 | -$hidden_custom_fields = json_decode($User->settings->hiddenCustomFields, true); |
|
15 | -$hidden_custom_fields = is_array(@$hidden_custom_fields['racks']) ? $hidden_custom_fields['racks'] : array(); |
|
14 | +$hidden_custom_fields = json_decode ($User->settings->hiddenCustomFields, true); |
|
15 | +$hidden_custom_fields = is_array (@$hidden_custom_fields['racks']) ? $hidden_custom_fields['racks'] : array (); |
|
16 | 16 | |
17 | 17 | # create csrf token |
18 | 18 | $csrf = $User->create_csrf_cookie (); |
19 | 19 | |
20 | 20 | |
21 | 21 | # all racks or one ? |
22 | -if (isset($_GET['subnetId'])) { include("print-single-rack.php"); } |
|
23 | -else { include("print-racks.php"); } |
|
22 | +if (isset($_GET['subnetId'])) { include("print-single-rack.php"); } |
|
23 | +else { include("print-racks.php"); } |
|
24 | 24 | |
25 | 25 | ?> |
26 | 26 | \ No newline at end of file |
@@ -4,38 +4,38 @@ |
||
4 | 4 | ?> |
5 | 5 | |
6 | 6 | <div class="col-xs-12 col-md-6 col-md-offset-3" style="margin-top:50px;"> |
7 | - <h4><?php print _("Password change required"); ?></h4> |
|
7 | + <h4><?php print _ ("Password change required"); ?></h4> |
|
8 | 8 | <hr> |
9 | 9 | |
10 | 10 | <div class="text-muted"> |
11 | - <?php print _("You are required to change your password before you can access phpipam."); ?> |
|
11 | + <?php print _ ("You are required to change your password before you can access phpipam."); ?> |
|
12 | 12 | </div> |
13 | 13 | </div> |
14 | 14 | <div class="clearfix"></div> |
15 | 15 | |
16 | 16 | <div class="widget-dash col-xs-12 col-md-6 col-md-offset-3" style="margin-top:20px;"> |
17 | 17 | <div class="inner" style="min-height:auto;"> |
18 | - <h4><?php print _("Password change"); ?></h4> |
|
18 | + <h4><?php print _ ("Password change"); ?></h4> |
|
19 | 19 | <div class="hContent"> |
20 | 20 | |
21 | 21 | <form name="changePassRequired" id="changePassRequiredForm" class="form-inline" method="post"> |
22 | 22 | <div class="row" style="margin-top:30px;"> |
23 | 23 | |
24 | 24 | <!-- new password --> |
25 | - <div class="col-xs-12 col-md-4"><strong><?php print _('Password'); ?></strong></div> |
|
25 | + <div class="col-xs-12 col-md-4"><strong><?php print _ ('Password'); ?></strong></div> |
|
26 | 26 | <div class="col-xs-12 col-md-8"> |
27 | 27 | <input type="password" style="width:100%;" id="ipampassword1" name="ipampassword1" class="form-control" autofocus="autofocus" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input> |
28 | 28 | </div> |
29 | 29 | |
30 | 30 | <!-- new password repeat --> |
31 | - <div class="col-xs-12 col-md-4" style="margin-top:10px;"><strong><?php print _('Password repeat'); ?></strong></div> |
|
31 | + <div class="col-xs-12 col-md-4" style="margin-top:10px;"><strong><?php print _ ('Password repeat'); ?></strong></div> |
|
32 | 32 | <div class="col-xs-12 col-md-8" style="margin-top:10px;"> |
33 | 33 | <input type="password" style="width:100%;" id="ipampassword2" name="ipampassword2" class="form-control" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input> |
34 | 34 | </div> |
35 | 35 | |
36 | 36 | <!-- submit --> |
37 | 37 | <div class="col-xs-12" style="margin-top:10px;"> |
38 | - <input type="submit" value="<?php print _('Save password'); ?>" class="btn btn-sm btn-default pull-right"></input> |
|
38 | + <input type="submit" value="<?php print _ ('Save password'); ?>" class="btn btn-sm btn-default pull-right"></input> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | </div> |
@@ -4,17 +4,17 @@ |
||
4 | 4 | require_once('../../../functions/functions.php'); |
5 | 5 | |
6 | 6 | # Classes |
7 | -$Database = new Database_PDO; |
|
8 | -$User = new User ($Database); |
|
7 | +$Database = new Database_PDO; |
|
8 | +$User = new User ($Database); |
|
9 | 9 | $Result = new Result; |
10 | 10 | |
11 | 11 | # user must be authenticated |
12 | 12 | $User->check_user_session (); |
13 | 13 | |
14 | 14 | # checks |
15 | -if(strlen($_POST['ipampassword1'])<8) { $Result->show("danger", _("Invalid password"), true); } |
|
16 | -if($_POST['ipampassword1']!=$_POST['ipampassword2']) { $Result->show("danger", _("Passwords do not match"), true); } |
|
15 | +if (strlen ($_POST['ipampassword1']) < 8) { $Result->show ("danger", _ ("Invalid password"), true); } |
|
16 | +if ($_POST['ipampassword1'] != $_POST['ipampassword2']) { $Result->show ("danger", _ ("Passwords do not match"), true); } |
|
17 | 17 | |
18 | 18 | # update pass |
19 | -$User->update_user_pass($_POST['ipampassword1']); |
|
19 | +$User->update_user_pass ($_POST['ipampassword1']); |
|
20 | 20 | ?> |
21 | 21 | \ No newline at end of file |
@@ -5,23 +5,23 @@ |
||
5 | 5 | */ |
6 | 6 | |
7 | 7 | # verify that user is logged in |
8 | -$User->check_user_session(); |
|
8 | +$User->check_user_session (); |
|
9 | 9 | |
10 | 10 | # fetch all l2 domains |
11 | -$vlan_domains = $Tools->fetch_all_objects("vlanDomains", "id"); |
|
11 | +$vlan_domains = $Tools->fetch_all_objects ("vlanDomains", "id"); |
|
12 | 12 | |
13 | 13 | # set default domain |
14 | -if(sizeof($vlan_domains)==1) { $_GET['subnetId'] = 1; } |
|
14 | +if (sizeof ($vlan_domains) == 1) { $_GET['subnetId'] = 1; } |
|
15 | 15 | |
16 | 16 | # search vlan requested |
17 | -if(@$_GET['subnetId']=="all") { include("domain-vlans-all.php"); } |
|
17 | +if (@$_GET['subnetId'] == "all") { include("domain-vlans-all.php"); } |
|
18 | 18 | # vlan requested |
19 | -elseif(isset($_GET['sPage'])) { include("vlan-details.php"); } |
|
19 | +elseif (isset($_GET['sPage'])) { include("vlan-details.php"); } |
|
20 | 20 | # print all domains |
21 | -elseif(@$_GET['subnetId']=="all") { include("domain-vlans-all.php"); } |
|
21 | +elseif (@$_GET['subnetId'] == "all") { include("domain-vlans-all.php"); } |
|
22 | 22 | # we have more domains |
23 | -elseif(sizeof($vlan_domains)>1 && !isset($_GET['subnetId'])) { include("domains.php"); } |
|
23 | +elseif (sizeof ($vlan_domains) > 1 && !isset($_GET['subnetId'])) { include("domains.php"); } |
|
24 | 24 | # only 1 domain, print vlans |
25 | -else { include("domain-vlans.php"); } |
|
25 | +else { include("domain-vlans.php"); } |
|
26 | 26 | |
27 | 27 | ?> |
28 | 28 | \ No newline at end of file |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | # verify that user is logged in |
3 | -$User->check_user_session(); |
|
3 | +$User->check_user_session (); |
|
4 | 4 | ?> |
5 | 5 | |
6 | -<h4><?php print _('IPv4v6 calculator');?></h4> |
|
6 | +<h4><?php print _ ('IPv4v6 calculator'); ?></h4> |
|
7 | 7 | <hr> |
8 | 8 | |
9 | 9 | <!-- ipCalc form --> |
@@ -12,12 +12,12 @@ discard block |
||
12 | 12 | |
13 | 13 | <!-- IP address input --> |
14 | 14 | <tr> |
15 | - <td><?php print _('IP address');?> / <?php print _('mask');?></td> |
|
15 | + <td><?php print _ ('IP address'); ?> / <?php print _ ('mask'); ?></td> |
|
16 | 16 | <td> |
17 | 17 | <input type="text" class="form-control" name="cidr" size="40" autofocus="autofocus"> |
18 | 18 | </td> |
19 | 19 | <td> |
20 | - <div class="info2" style="margin-bottom:0px;"><?php print _('Please enter IP address and mask in CIDR format');?></div> |
|
20 | + <div class="info2" style="margin-bottom:0px;"><?php print _ ('Please enter IP address and mask in CIDR format'); ?></div> |
|
21 | 21 | </td> |
22 | 22 | </tr> |
23 | 23 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | <td></td> |
27 | 27 | <td> |
28 | 28 | <div class="btn-group"> |
29 | - <button type="submit" class="btn btn-sm btn-default"><i class="fa fa-check"></i> <?php print _('Calculate');?></button> |
|
30 | - <input type="button" class="btn btn-sm btn-default reset" value="<?php print _('Reset');?>"> |
|
29 | + <button type="submit" class="btn btn-sm btn-default"><i class="fa fa-check"></i> <?php print _ ('Calculate'); ?></button> |
|
30 | + <input type="button" class="btn btn-sm btn-default reset" value="<?php print _ ('Reset'); ?>"> |
|
31 | 31 | </div> |
32 | 32 | </td> |
33 | 33 | <td></td> |
@@ -6,42 +6,42 @@ |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | # icons |
9 | -$tools_menu_icons['Tools'] = "fa-wrench"; |
|
10 | -$tools_menu_icons['Subnets'] = "fa-sitemap"; |
|
11 | -$tools_menu_icons['User Menu'] = "fa-user"; |
|
9 | +$tools_menu_icons['Tools'] = "fa-wrench"; |
|
10 | +$tools_menu_icons['Subnets'] = "fa-sitemap"; |
|
11 | +$tools_menu_icons['User Menu'] = "fa-user"; |
|
12 | 12 | |
13 | 13 | # Tools |
14 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-search", "name"=>"Search", "href"=>"search", "description"=>"Search database Addresses, subnets and VLANs"); |
|
15 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-calculator", "name"=>"IP calculator", "href"=>"ip-calculator","description"=>"IPv4v6 calculator for subnet calculations"); |
|
16 | -if($User->settings->enableChangelog == 1) |
|
17 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-clock-o", "name"=>"Changelog", "href"=>"changelog", "description"=>"Show changelog for all network objects"); |
|
18 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-list", "name"=>"Log files", "href"=>"logs", "description"=>"Browse phpipam log files"); |
|
19 | -if($User->settings->enableIPrequests==1) { |
|
20 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-plus", "name"=>"IP requests", "href"=>"requests", "description"=>"Manage IP requests"); |
|
14 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-search", "name"=>"Search", "href"=>"search", "description"=>"Search database Addresses, subnets and VLANs"); |
|
15 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-calculator", "name"=>"IP calculator", "href"=>"ip-calculator", "description"=>"IPv4v6 calculator for subnet calculations"); |
|
16 | +if ($User->settings->enableChangelog == 1) |
|
17 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-clock-o", "name"=>"Changelog", "href"=>"changelog", "description"=>"Show changelog for all network objects"); |
|
18 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-list", "name"=>"Log files", "href"=>"logs", "description"=>"Browse phpipam log files"); |
|
19 | +if ($User->settings->enableIPrequests == 1) { |
|
20 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-plus", "name"=>"IP requests", "href"=>"requests", "description"=>"Manage IP requests"); |
|
21 | 21 | } |
22 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-info", "name"=>"Instructions", "href"=>"instructions", "description"=>"Instructions for managing IP addresses"); |
|
23 | -if($User->settings->enablePowerDNS==1) |
|
24 | -$tools_menu['Tools'][] = array("show"=>true, "icon"=>"fa-database", "name"=>"PowerDNS", "href"=>"powerDNS", "description"=>"PowerDNS settings"); |
|
22 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-info", "name"=>"Instructions", "href"=>"instructions", "description"=>"Instructions for managing IP addresses"); |
|
23 | +if ($User->settings->enablePowerDNS == 1) |
|
24 | +$tools_menu['Tools'][] = array ("show"=>true, "icon"=>"fa-database", "name"=>"PowerDNS", "href"=>"powerDNS", "description"=>"PowerDNS settings"); |
|
25 | 25 | |
26 | 26 | # Subnets |
27 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-star", "name"=>"Favourite networks", "href"=>"favourites", "description"=>"Show favourite networks"); |
|
28 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-sitemap", "name"=>"Subnets", "href"=>"subnets", "description"=>"Show all subnets"); |
|
29 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-cloud", "name"=>"VLAN", "href"=>"vlan", "description"=>"Show VLANs and belonging subnets"); |
|
30 | -if($User->settings->enableVRF == 1) |
|
31 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-cloud", "name"=>"VRF", "href"=>"vrf", "description"=>"Show VRFs and belonging networks"); |
|
32 | -if($User->settings->enableRACK == 1) |
|
33 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-bars", "name"=>"Racks", "href"=>"racks", "description"=>"Show racks"); |
|
34 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-desktop", "name"=>"Devices", "href"=>"devices", "description"=>"Show all configured devices"); |
|
35 | -if($User->settings->enableMulticast == 1) |
|
36 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-map-o", "name"=>"Multicast networks", "href"=>"multicast-networks", "description"=>"Show multicast subnets and mapping"); |
|
37 | -if($User->settings->enableFirewallZones == 1) |
|
38 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-fire", "name"=>"Firewall Zones", "href"=>"firewall-zones", "description"=>"Display firewall zone to device mappings"); |
|
39 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-eye", "name"=>"Scanned networks", "href"=>"scanned-networks", "description"=>"List of subnets to be scanned for online hosts and detect new hosts"); |
|
40 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-th-large", "name"=>"Subnet masks", "href"=>"subnet-masks", "description"=>"Table of all subnet masks with different representations"); |
|
27 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-star", "name"=>"Favourite networks", "href"=>"favourites", "description"=>"Show favourite networks"); |
|
28 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-sitemap", "name"=>"Subnets", "href"=>"subnets", "description"=>"Show all subnets"); |
|
29 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-cloud", "name"=>"VLAN", "href"=>"vlan", "description"=>"Show VLANs and belonging subnets"); |
|
30 | +if ($User->settings->enableVRF == 1) |
|
31 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-cloud", "name"=>"VRF", "href"=>"vrf", "description"=>"Show VRFs and belonging networks"); |
|
32 | +if ($User->settings->enableRACK == 1) |
|
33 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-bars", "name"=>"Racks", "href"=>"racks", "description"=>"Show racks"); |
|
34 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-desktop", "name"=>"Devices", "href"=>"devices", "description"=>"Show all configured devices"); |
|
35 | +if ($User->settings->enableMulticast == 1) |
|
36 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-map-o", "name"=>"Multicast networks", "href"=>"multicast-networks", "description"=>"Show multicast subnets and mapping"); |
|
37 | +if ($User->settings->enableFirewallZones == 1) |
|
38 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-fire", "name"=>"Firewall Zones", "href"=>"firewall-zones", "description"=>"Display firewall zone to device mappings"); |
|
39 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-eye", "name"=>"Scanned networks", "href"=>"scanned-networks", "description"=>"List of subnets to be scanned for online hosts and detect new hosts"); |
|
40 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-th-large", "name"=>"Subnet masks", "href"=>"subnet-masks", "description"=>"Table of all subnet masks with different representations"); |
|
41 | 41 | // temp shares |
42 | -if($User->settings->tempShare==1) |
|
43 | -$tools_menu['Subnets'][] = array("show"=>true, "icon"=>"fa-share-alt", "name"=>"Temporary shares", "href"=>"temp-shares", "description"=>"List of temporary shared objects"); |
|
42 | +if ($User->settings->tempShare == 1) |
|
43 | +$tools_menu['Subnets'][] = array ("show"=>true, "icon"=>"fa-share-alt", "name"=>"Temporary shares", "href"=>"temp-shares", "description"=>"List of temporary shared objects"); |
|
44 | 44 | |
45 | 45 | # user menu |
46 | -$tools_menu['User Menu'][] = array("show"=>true, "icon"=>"fa-user", "name"=>"My account", "href"=>"user-menu", "description"=>"Manage your account"); |
|
46 | +$tools_menu['User Menu'][] = array ("show"=>true, "icon"=>"fa-user", "name"=>"My account", "href"=>"user-menu", "description"=>"Manage your account"); |
|
47 | 47 | ?> |
48 | 48 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | include 'captcha.php'; |
3 | -$img = new securimage(); |
|
3 | +$img = new securimage (); |
|
4 | 4 | //show image |
5 | -$img->show(); |
|
5 | +$img->show (); |
|
6 | 6 | ?> |