mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-02-13 03:32:16 +00:00
Massive import web manager
This commit is contained in:
parent
88b8d7a818
commit
951853fd34
3 changed files with 178 additions and 0 deletions
13
code/web/www/index.html
Executable file
13
code/web/www/index.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;url=pages/index.html">
|
||||
<title>SB Admin 2</title>
|
||||
<script language="javascript">
|
||||
window.location.href = "pages/index.php"
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
Go to <a href="pages/index.php">/pages/index.php</a>
|
||||
</body>
|
||||
</html>
|
113
code/web/www/pages/login.php
Normal file
113
code/web/www/pages/login.php
Normal file
|
@ -0,0 +1,113 @@
|
|||
<?php
|
||||
require("connectors/ldap.php");
|
||||
|
||||
|
||||
// check to see if login form has been submitted
|
||||
if(isset($_POST['username'])){
|
||||
// run information through authenticator
|
||||
if(ldaplogin($_POST['username'], $_POST['password']))
|
||||
{
|
||||
session_start();
|
||||
$_SESSION['uid'] = $_POST['username'];
|
||||
// authentication passed
|
||||
header("Location: index.php");
|
||||
die();
|
||||
} else {
|
||||
// authentication failed
|
||||
$error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$message = "";
|
||||
|
||||
// output error to user
|
||||
if(isset($error)) $message = '<div class="alert alert-warning">Login failed: Incorrect user name or password</div>';
|
||||
|
||||
// output logout success
|
||||
if(isset($_GET['logout']))
|
||||
{
|
||||
session_start();
|
||||
$message = '<div class="alert alert-info">Logout successful</div>';
|
||||
session_destroy();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Proxmox Viewer</title>
|
||||
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- MetisMenu CSS -->
|
||||
<link href="../vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link href="../dist/css/sb-admin-2.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<link href="../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Please Sign In with your LDAP authentication</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form method="post" action="login.php" role="form">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<input class="form-control" placeholder="Username" name="username" type="text" autofocus>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control" placeholder="Password" name="password" type="password" value="">
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input name="remember" type="checkbox" value="Remember Me">Remember Me
|
||||
</label>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-lg btn-success btn-block" name="submit" value="Login" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<br />
|
||||
<?php echo $message ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="../vendor/jquery/jquery.min.js"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script src="../vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Metis Menu Plugin JavaScript -->
|
||||
<script src="../vendor/metisMenu/metisMenu.min.js"></script>
|
||||
|
||||
<!-- Custom Theme JavaScript -->
|
||||
<script src="../dist/js/sb-admin-2.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
52
code/web/www/pages/storages.php
Executable file
52
code/web/www/pages/storages.php
Executable file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
include(dirname(__DIR__).'/pages/includes/header.php');
|
||||
|
||||
// GEN HTML LIST Dates
|
||||
$html = new API_Gen_HTML;
|
||||
|
||||
$html_sto = $html->List_STO($lastdate);
|
||||
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Storages</h1>
|
||||
</div>
|
||||
<div class="col-lg-12" id="List_Dates">
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.col-lg-12 -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
|
||||
<!-- /.panel-heading -->
|
||||
<div class="panel-body" >
|
||||
|
||||
<table width="100%" class="display nowrap table table-striped table-bordered table-hover" id="dataTables-storages" >
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th data-priority="1">Node</th>
|
||||
<th data-priority="1">Name</th>
|
||||
<th data-priority="1">Total</th>
|
||||
<th data-priority="1">Allocate</th>
|
||||
<th data-priority="1">Available</th>
|
||||
<th data-priority="1">Used </th>
|
||||
<th class="none">Disks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php echo $html_sto; ?>
|
||||
</table>
|
||||
</div>
|
||||
<div id="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /#wrapper -->
|
||||
<?php
|
||||
include(dirname(__DIR__).'/pages/includes/footer.php');
|
||||
?>
|
Loading…
Reference in a new issue