This commit is contained in:
Ryan Prather 2019-01-15 13:12:35 -05:00
parent bb9e2f4adb
commit 5d65d6294f
No known key found for this signature in database
GPG Key ID: 66FDE2B4E8AB87A7

View File

@ -33,119 +33,117 @@ $report = '';
$script_name = filter_input(INPUT_SERVER, 'SCRIPT_NAME', FILTER_SANITIZE_STRING); $script_name = filter_input(INPUT_SERVER, 'SCRIPT_NAME', FILTER_SANITIZE_STRING);
if (preg_match('/ste|proc/', $script_name)) { if (preg_match('/ste|proc/', $script_name)) {
$ops = " class='active'"; $ops = " class='active'";
} } elseif (preg_match('/results/', $script_name)) {
elseif (preg_match('/results/', $script_name)) { $results = " class='active'";
$results = " class='active'"; } elseif (preg_match('/data/', $script_name)) {
} $data = " class='active'";
elseif (preg_match('/data/', $script_name)) { } elseif (preg_match('/report/', $script_name)) {
$data = " class='active'"; $report = " class='active'";
}
elseif (preg_match('/report/', $script_name)) {
$report = " class='active'";
} }
?> ?>
<script type='text/javascript'> <script type='text/javascript'>
$(function () { $(function () {
window.onload = montre; window.onload = montre;
}); });
function montre(id) { function montre(id) {
$("dd[id^='smenu']").hide(); $("dd[id^='smenu']").hide();
if (id && typeof id == 'string') { if (id && typeof id == 'string') {
$('#' + id).show(); $('#' + id).show();
var ele = $('#' + id).parent().children('dt');
$('#' + id).css('left', ele.position().left + ele.width());
$('#' + id).css('top', ele.position().top + ele.height());
} }
var ele = $('#' + id).parent().children('dt'); }
$('#' + id).css('left', ele.position().left + ele.width());
$('#' + id).css('top', ele.position().top + ele.height());
}
</script> </script>
<style type="text/css"> <style type="text/css">
dl, dt, dd, ul, li { dl, dt, dd, ul, li {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style-type: none; list-style-type: none;
z-index: 100; z-index: 100;
} }
#menu {
width: 25px;
display: table-cell;
}
#menu dt { #menu {
cursor: pointer; width: 25px;
text-align: center; display: table-cell;
font-weight: bold; }
}
#menu dd { #menu dt {
position: fixed; cursor: pointer;
z-index: 100; text-align: center;
width: 10em; font-weight: bold;
background: #B4B2B2; }
border: 1px solid gray;
}
#menu ul { #menu dd {
padding: 2px; position: fixed;
} z-index: 100;
#menu li { width: 10em;
text-align: center; background: #B4B2B2;
font-size: 85%; border: 1px solid gray;
height: 18px; }
line-height: 18px;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
}
#menu li a:hover { #menu ul {
text-decoration: underline; padding: 2px;
} }
#menu li {
text-align: center;
font-size: 85%;
height: 18px;
line-height: 18px;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
}
#menu li a:hover {
text-decoration: underline;
}
</style> </style>
<ul id="menu-bar"> <ul id="menu-bar">
<li<?php print $ops; ?>><a href="javascript:void(0);">Operations</a> <li <?php print $ops; ?>><a href="javascript:void(0);">Operations</a>
<ul> <ul>
<li><a href="/ste">ST&amp;E Operations</a></li> <li><a href="/ste">ST&amp;E Operations</a></li>
<li><a href='/ste/stats.php'>Stats</a></li> <li><a href='/ste/stats.php'>Stats</a></li>
<?php if (file_exists(DOC_ROOT . "/proc")) { ?> <?php if (file_exists(DOC_ROOT . "/proc")) { ?>
<li><a href = "/proc">Procedural Operations</a></li> <li><a href="/proc">Procedural Operations</a></li>
<?php } ?> <?php } ?>
</ul> </ul></li>
</li> <li <?php print $results; ?>><a href="javascript:void(0);">Scans</a>
<li<?php print $results; ?>><a href="javascript:void(0);">Scans</a> <ul>
<ul> <li><a href="/results">Results</a></li>
<li><a href="/results">Results</a></li> <li><a href="/results/?add_scan=1">Add Scan</a></li>
<li><a href="/results/?add_scan=1">Add Scan</a></li> </ul></li>
</ul>
</li>
<?php if (file_exists(DOC_ROOT . "/report")) { ?> <?php if (file_exists(DOC_ROOT . "/report")) { ?>
<li<?php print $report; ?>><a href="javascript:void(0);">Report</a> <li <?php print $report; ?>><a href="javascript:void(0);">Report</a>
<ul> <ul>
<li><a href="/report/sanity.php?step=1">Sanity Check</a></li> <li><a href="/report/sanity.php?step=1">Sanity Check</a></li>
<li><a href="/report/create.php">Create Risk Assessment</a></li> <li><a href="/report/create.php">Create Risk Assessment</a></li>
</ul> </ul></li>
</li>
<?php } ?> <?php } ?>
<li<?php print $data; ?>><a href="javascript:void(0);">Management</a> <li <?php print $data; ?>><a href="javascript:void(0);">Management</a>
<ul> <ul>
<li><a href="/data/?p=MSMgmt">Systems</a></li> <li><a href="/data/?p=MSMgmt">Systems</a></li>
<li><a href="/data/?p=SiteMgmt">Sites</a></li> <li><a href="/data/?p=SiteMgmt">Sites</a></li>
<li><a href="/data/?p=STEMgmt">ST&amp;E</a></li> <li><a href="/data/?p=STEMgmt">ST&amp;E</a></li>
<li><a href="/data/?p=CatMgmt">Catalog</a></li> <li><a href="/data/?p=CatMgmt">Catalog</a></li>
<li><a href="/data/?p=Settings">Settings</a></li> <li><a href="/data/?p=Settings">Settings</a></li>
<li><a href="/data/?p=Search">Search</a></li> <li><a href="/data/?p=Search">Search</a></li>
<li><a href="/data/?p=TgtSearch">Target Search</a></li> <li><a href="/data/?p=TgtSearch">Target Search</a></li>
</ul> </ul></li>
</li> <li>
<li> <form method="post" action="/data/?p=Search" target="_blank"
<form method="post" action="/data/?p=Search" target="_blank" style="display:inline-block;"> style="display: inline-block;">
<input type="text" style="vertical-align:text-bottom;" name="q" placeholder="Search..." /> <input type="text" style="vertical-align: text-bottom;" name="q"
</form> placeholder="Search..." />
</li> </form>
</li>
</ul> </ul>