2010-06-16 18:21:58 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Load page
|
|
|
|
*
|
|
|
|
* @param Nothing
|
|
|
|
* @return Nothing
|
|
|
|
*/
|
|
|
|
function loadPage(){
|
|
|
|
// Include CSS and Javascripts
|
|
|
|
echo
|
|
|
|
'<html>
|
|
|
|
<head>
|
|
|
|
<title>xCAT Console</title>
|
2010-11-17 18:53:40 +00:00
|
|
|
<link rel="shortcut icon" href="images/favicon.ico">
|
2010-06-16 18:21:58 +00:00
|
|
|
<link href="css/jquery.autocomplete.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/jquery-ui-1.8.custom.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/jquery.dataTables.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/superfish.css" rel=stylesheet type="text/css">
|
2010-11-04 19:30:39 +00:00
|
|
|
<link href="css/jstree.css" rel=stylesheet type="text/css">
|
2010-06-16 18:21:58 +00:00
|
|
|
<link href="css/style.css" rel=stylesheet type="text/css">
|
2010-07-14 18:06:01 +00:00
|
|
|
<script type="text/javascript" src="js/jquery/jquery-1.4.2.min.js"></script>
|
|
|
|
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.custom.min.js"></script>
|
2010-06-16 18:21:58 +00:00
|
|
|
<script type="text/javascript" src="js/ui.js"></script>
|
|
|
|
</head>';
|
|
|
|
|
|
|
|
// Header menu
|
|
|
|
echo
|
|
|
|
'<body>
|
|
|
|
<div id="header">
|
|
|
|
<ul>
|
|
|
|
<li><img src="images/logo.gif" height="100%"/></li>
|
|
|
|
<li><a href="index.php" class="top_link">Nodes</a></li>
|
|
|
|
<li><a href="configure.php" class="top_link">Configure</a></li>
|
|
|
|
<li><a href="provision.php" class="top_link">Provision</a></li>
|
|
|
|
<li><a href="monitor.php" class="top_link">Monitor</a></li>
|
2010-11-24 06:10:07 +00:00
|
|
|
<li><a href="discover.php" class="top_link">Wizard</a></li>
|
2010-09-14 02:33:16 +00:00
|
|
|
</ul>';
|
|
|
|
|
2010-09-16 16:13:08 +00:00
|
|
|
// User name and log out section
|
|
|
|
if (isset($_SESSION['username'])){
|
|
|
|
echo
|
|
|
|
"<div>
|
|
|
|
<span>User: {$_SESSION['username']}</span>
|
|
|
|
<a href='lib/logout.php'>Log out</a>
|
|
|
|
</div>";
|
|
|
|
}
|
2010-06-16 18:21:58 +00:00
|
|
|
|
2010-09-14 02:33:16 +00:00
|
|
|
echo '</div>';
|
2010-07-14 20:11:07 +00:00
|
|
|
// Content
|
|
|
|
echo '<div class="content" id="content"></div>';
|
2010-06-16 18:21:58 +00:00
|
|
|
|
|
|
|
// End of page
|
|
|
|
echo
|
|
|
|
'</body>
|
|
|
|
</html>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Load page content
|
|
|
|
*
|
|
|
|
* @param Nothing
|
|
|
|
* @return Nothing
|
|
|
|
*/
|
|
|
|
function loadContent() {
|
|
|
|
// Initialize page
|
|
|
|
echo
|
|
|
|
'<script language="JavaScript" type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
initPage();
|
|
|
|
});
|
|
|
|
</script>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Login user into a new session
|
|
|
|
*
|
|
|
|
* @param Nothing
|
|
|
|
* @return Nothing
|
|
|
|
*/
|
|
|
|
function login() {
|
|
|
|
// xcatauth.js will open a dialog box
|
|
|
|
// asking for the user name and password
|
|
|
|
echo
|
|
|
|
'<script src="js/xcatauth.js" type="text/javascript"></script>
|
|
|
|
<div id=logdialog>
|
2010-07-14 18:06:01 +00:00
|
|
|
<p>Give the user name and password for the xCAT management node</p>
|
2010-06-16 18:21:58 +00:00
|
|
|
<form id=loginform>
|
|
|
|
<table cellspacing=3>
|
|
|
|
<tr><td align=right><label for=username>User name:</label></td><td align=left><input id=username type=text name=username></td></tr>
|
|
|
|
<tr><td align=right><label for=password>Password:</label></td><td align=left><input id=password type=password name=password></td></tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
<p><span id=logstatus></span></p>
|
|
|
|
</div>';
|
|
|
|
}
|
|
|
|
?>
|