Download
Download
Download
php
/* config */
if (!file_exists("config.php")) { die("<br><hr>-- config.php file missing!
Please copy default config file `config.dist.php` to `config.php` and set
configuration! --<hr><br>phpipam installation documentation: <a
href='http://phpipam.net/documents/installation/'>http://phpipam.net/documents/
installation/</a>"); }
/* site functions */
require_once( 'functions/functions.php' );
# initialize objects
$Result = new Result;
$User = new User ($Database);
$Sections = new Sections ($Database);
$Subnets = new Subnets ($Database);
$Tools = new Tools ($Database);
$Addresses = new Addresses ($Database);
$Log = new Logging ($Database);
<head>
<base href="<?php print $url.BASE; ?>">
<!-- js -->
<script src="js/jquery-3.5.1.min.js?v=<?php print SCRIPT_PREFIX; ?
>"></script>
<script src="js/jclock.jquery.js?v=<?php print SCRIPT_PREFIX;
?>"></script>
<?php if($_GET['page']=="login" || $_GET['page']=="request_ip") { ?>
<script src="js/login.js?v=<?php print SCRIPT_PREFIX; ?>"></script>
<?php } ?>
<script src="js/magic.js?v=<?php print SCRIPT_PREFIX; ?>"></script>
<script src="js/bootstrap.min.js?v=<?php print SCRIPT_PREFIX;
?>"></script>
<script src="js/bootstrap-switch.min.js?v=<?php print SCRIPT_PREFIX; ?
>"></script>
<!--[if lt IE 9]>
<script src="js/dieIE.js"></script>
<![endif]-->
<?php if ($User->settings->enableLocations=="1") { ?>
<link rel="stylesheet" href="css/leaflet.css"/>
<script src="js/leaflet.js"></script>
<link rel="stylesheet" href="css/leaflet.fullscreen.css"/>
<script src="js/leaflet.fullscreen.min.js"></script>
<?php } ?>
<!-- jQuery UI -->
<script src="js/jquery-ui-1.12.1.custom.min.js?v=<?php print
SCRIPT_PREFIX; ?>"></script>
</head>
}
# content
print "<td id='subnetsContent'>";
print "<div class='row menu-$_GET[page]' id='content'>";
# subnets
if ($_GET['page']=="subnets") {
if(@$_GET['sPage'] == "address-details")
{ include("app/subnets/addresses/address-details-
index.php"); }
elseif(!isset($_GET['subnetId']))
{ include("app/sections/section-
subnets.php"); }
else
{ include("app/subnets/index.php");
}
}
# vrf
elseif ($_GET['page']=="vrf")
{ include("app/tools/vrf/index.php"); }
# vlan
elseif ($_GET['page']=="vlan")
{ include("app/vlan/index.php"); }
# folder
elseif ($_GET['page']=="folder")
{ include("app/folder/index.php"); }
# tools
elseif ($_GET['page']=="tools") {
if (!isset($_GET['section']))
{ include("app/tools/index.php"); }
else {
if (!isset($tools_menu_items[$_GET['section']]))
{ header("Location: ".create_link("error","400")); die(); }
elseif
(!file_exists("app/tools/$_GET[section]/index.php") &&
!file_exists("app/tools/custom/$_GET[section]/index.php"))
{ header("Location: ".create_link("error","404")); die(); }
else
{
if(file_exists("app/tools/$_GET[section]/index.php")) {
include("app/tools/$_GET[section]/index.php");
}
else {
include("app/tools/custom/$_GET[section]/index.php");
}
}
}
}
# admin
elseif ($_GET['page']=="administration") {
# Admin object
$Admin = new Admin ($Database);
if (!isset($_GET['section']))
{ include("app/admin/index.php"); }
elseif (@$_GET['subnetId']=="section-
changelog") { include("app/sections/section-
changelog.php"); }
else {
if (!isset($admin_menu_items[$_GET['section']]))
{ header("Location: ".create_link("error","400")); die(); }
elseif(!file_exists("app/admin/$_GET[section]/index.php"))
{ header("Location: ".create_link("error","404")); die(); }
else
{
include("app/admin/$_GET[section]/index.php"); }
}
}
# default - error
else {
{ header("Location:
".create_link("error","400")); die(); }
}
print "</div>";
print "</td>";
print "</tr>";
print "</table>";
}
?>
</div>
</div>