Commit 6724e07b authored by Nico Schallehn's avatar Nico Schallehn

test

parent 8009d2b3
<?php include("./api.class.php");
<?php
if(isset($_POST["anmelden"])){
include ("./api.class.php");
if (isset ( $_POST ["anmelden"] )) {
$API = new MediaDBAPI();
$API = new MediaDBAPI ();
if($API->APIinit($_POST["api-key"])){
$ErrorBox = '<div class="alert alert-success">'.PHP_EOL.
'<strong>Fehler!</strong> Alles Gut!'.PHP_EOL.
'</div>'.PHP_EOL;
if ($API->APIinit ( $_POST ["api-key"] )) {
$ErrorBox = '<div class="alert alert-success">' . PHP_EOL . '<strong>Fehler!</strong> Alles Gut!' . PHP_EOL . '</div>' . PHP_EOL;
// Session Start bzw. Cookie setzen!!
}
else {
$FehlerArray = $API->error(1002);
$ErrorBox = '<div class="alert alert-danger">'.PHP_EOL.
'<strong>Fehler '.$FehlerArray["FehlerID"].'!</strong> '.$FehlerArray["FehlerText"].PHP_EOL.
'</div>'.PHP_EOL;
} else {
$FehlerArray = $API->error ( 1002 );
$ErrorBox = '<div class="alert alert-danger">' . PHP_EOL . '<strong>Fehler ' . $FehlerArray ["FehlerID"] . '!</strong> ' . $FehlerArray ["FehlerText"] . PHP_EOL . '</div>' . PHP_EOL;
}
}
?>
<!DOCTYPE html>
<html lang="de"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<html lang="de">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="MediaDB Webfrontend">
<meta name="author" content="">
<title>MediaDB-Anmeldung</title>
<!-- Bootstrap core CSS -->
<link href="files/bootstrap.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="files/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="files/starter-template.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="files/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target="#navbar" aria-expanded="false"
aria-controls="navbar">
<span class="sr-only">Toggle navigation</span> <span
class="icon-bar"></span> <span class="icon-bar"></span> <span
class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">MediaDB</a>
</div>
......@@ -72,7 +61,8 @@ if(isset($_POST["anmelden"])){
<!--<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>-->
</ul>
</div><!--/.nav-collapse -->
</div>
<!--/.nav-collapse -->
</div>
</nav>
......@@ -81,28 +71,34 @@ if(isset($_POST["anmelden"])){
<h1>Anmeldung</h1>
<?php echo $ErrorBox;?>
<form role="form" method="post">
<form role="form" method="post" action="">
<div class="form-group">
<label for="email">API-Schlüssel:</label>
<input type="text" maxlength="10" class="form-control" id="api-key" name="api-key" value="<?php echo $_POST['api-key']; ?>">
<label for="email">API-Schlüssel:</label> <input type="text"
maxlength="10" class="form-control" id="api-key" name="api-key"
<?php echo 'value="'.$_POST['api-key'].'"'; ?>>
</div>
<div class="checkbox">
<label><input type="checkbox" name="angemeldetbleiben" <?php echo (isset($_POST['angemeldetbleiben'])?"checked":"");?>> Länger angemeldet bleiben (via Cookies)</label>
<label><input type="checkbox" name="angemeldetbleiben"
<?php echo (isset($_POST['angemeldetbleiben'])?"checked":"");?>>
Länger angemeldet bleiben (via Cookies)</label>
</div>
<button type="submit" class="btn btn-default" name="anmelden">Anmelden</button>
</form>
</div>
</div><!-- /.container -->
</div>
<!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="files/jquery.js"></script>
<script src="files/jquery.js" type="text/javascript"></script>
<!--<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>-->
<script src="files/bootstrap.js"></script>
<script src="files/bootstrap.js" type="text/javascript"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="files/ie10-viewport-bug-workaround.js"></script>
<script src="files/ie10-viewport-bug-workaround.js"
type="text/javascript"></script>
</body></html>
\ No newline at end of file
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment