Permalink
Browse files

Initial commit; LDAP home control

  • Loading branch information...
0 parents commit e0fcc41cb7357ee1f3f58a52a2f3e946b14aad88 @hermanbanken committed Dec 11, 2011
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,159 @@
+body {
+ margin:0;
+ padding:50px 0 0 0 !important;
+ background: url('banken-img/dark-wood-flooring.jpg') center top;
+}
+.clear {clear:both;}
+
+.topbar {
+ font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
+ letter-spacing:1pt;
+}
+
+ul.menu {
+ width:100%;
+}
+ul.menu > li {
+ position:relative;
+ width:140px;
+ height:140px;
+ margin:40px 10px 10px 10px;
+ float:left;
+ /*border:1px solid #333;
+ background: #eee;
+ box-shadow: 0 0 10px rgba(0, 0, 0, .7);
+ border-radius: 30px;
+ overflow:hidden;*/
+ font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
+ letter-spacing:1pt;
+}
+ul.menu > li > a > img {
+ width:100%;
+}
+
+ul.menu > li:hover {
+ /*top:1px;
+ left:1px;
+ box-shadow: 0 0 5px rgba(0, 0, 0, .9);*/
+}
+
+ul.menu > li > a {
+ border-radius: 30px;
+ overflow:hidden;
+ display:block;
+ text-decoration:none;
+}
+
+ul.menu > li > a > span {
+ position:absolute;
+ line-height: 30px;
+ padding:10px 0;
+ text-align:center;
+ display:block;
+ width:100%;
+ left:0px;
+ top:100%;
+ /*background:rgba(0, 0, 0, .7);
+ bottom:0;*/
+ color: white;
+}
+
+ul.users {
+ text-align:center;
+ margin-top:200px;
+}
+ul.users form {
+ margin: 8px 0 0 0;
+ opacity: 0;
+ -webkit-transition: opacity .5s linear;
+}
+
+ul.users .avatar {
+ -webkit-transition: all .5s linear;
+}
+
+ul.users.single .avatar { display:none; }
+ul.users.single .avatar.active { display:inline-block; }
+ul.users.single form { display:block; opacity: 1; }
+
+.avatar {
+ position:relative;
+ width: 110px;
+ height: 140px;
+ margin: 0 10px;
+ display: inline-block;
+}
+
+.avatar > span.uid {
+ display: block;
+ margin-top: 8px;
+ font-family: "Lucida Grande";
+ font-weight: lighter;
+ color: #FFF;
+ text-shadow: 0 0 1px #000;
+}
+
+.avatar > div {
+ position: relative;
+ display: block;
+
+ margin: 0;
+
+ width: 110px;
+ height: 110px;
+ background-color: #FFF;
+
+ border-radius: 55px;
+
+ box-shadow: #000 0px 0px 8px;
+ -moz-box-shadow: #000 0px 0px 8px;
+ -webkit-box-shadow: #000 0px 0px 8px;
+
+ background-image: -moz-linear-gradient(#EEE, #999);
+ background-image: -webkit-linear-gradient(#EEE, #999);
+ background-image: -o-linear-gradient(#EEE, #999);
+
+}
+
+.avatar > div > img {
+ margin: 5px;
+ width: 100px;
+ height: 100px;
+
+ border-radius: 50px;
+
+ box-shadow: #000 0px 0px 1px;
+ -moz-box-shadow: #000 0px 0px 1px;
+ -webkit-box-shadow: #000 0px 0px 1px;
+}
+
+.avatar > div > a {
+ position: absolute;
+ width: 16px;
+ height: 16px;
+ left: 0;
+ bottom: 0;
+}
+
+.avatar > div > a:hover {
+ cursor: pointer;
+}
+
+@font-face {
+ font-family: MixageITCStd;
+ src: url('MixageITCStd-Book.otf');
+}
+
+form#login input, form#login input:focus {
+ width: 170px;
+ padding: 5px;
+ font-size: 1.3em;
+ color: #333;
+ text-shadow: 0 0 1px white;
+ outline: none;
+ border: none;
+ border-radius: 3px;
+ box-shadow: #000 0px 0px 4px;
+ -moz-box-shadow: #000 0px 0px 4px;
+ -webkit-box-shadow: #000 0px 0px 4px;
+}
Submodule bootstrap added at 2dd0db
@@ -0,0 +1,35 @@
+<div class="topbar-wrapper" style="z-index: 5;">
+<div class="topbar" data-dropdown="dropdown">
+ <div class="topbar-inner">
+ <div class="container">
+ <h3><a href="#">Banken</a></h3>
+ <?php if($user) : ?>
+ <ul class="nav">
+ <?php
+ foreach($pages as $page => $title){
+ $class = $page == $_GET['page'] ? 'active' : '';
+ echo "<li class='$class'><a href='?page=$page'>$title</a></li>";
+ }
+ ?>
+ </ul>
+ <form class="pull-left" action="">
+ <input type="text" placeholder="Search">
+ </form>
+ <ul class="nav secondary-nav">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle">
+ <?php echo $user ? $user['sn'][0] : 'Account'; ?>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="#">Wijzig wachtwoord</a></li>
+ <li><a href="#">Pas gegevens aan</a></li>
+ <li class="divider"></li>
+ <li><a href="?logout=1">Uitloggen</a></li>
+ </ul>
+ </li>
+ </ul>
+ <?php endif; ?>
+ </div>
+ </div><!-- /topbar-inner -->
+</div><!-- /topbar -->
+</div>
@@ -0,0 +1,78 @@
+<?php if ( $_GET['page'] == 'home'){ ?>
+<ul class='menu' style='margin:0 auto; width:640px'>
+ <?php foreach($pages as $page => $title){ if($page != 'home'){ ?>
+ <li class=''><a href='?page=<?php echo $page ?>'>
+ <img src='banken-img/<?php echo $page ?>.png' />
+ <span><?php echo $title ?></span>
+ </a></li>
+ <?php }} ?>
+</ul>
+<?php
+}
+elseif ( array_key_exists($_GET['page'], $pages))
+{
+ $page = $_GET['page'];
+ $title = $pages[$page];
+?>
+ <div class="container-fluid">
+ <div class="sidebar">
+ <div class="well">
+ <img src='banken-img/<?php echo $page ?>.png' style='width:180px' />
+ <h5 style='text-align:center'><?php echo $title; ?></h5>
+ </div>
+ </div>
+ <div class="content">
+ <!-- Main hero unit for a primary marketing message or call to action -->
+ <div class="hero-unit">
+ <h1>Hello, world!</h1>
+ <p>Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
+ <p><a class="btn primary large">Learn more &raquo;</a></p>
+ </div>
+
+ <!-- Example row of columns -->
+ <div class="row">
+ <div class="span6">
+ <h2>Heading</h2>
+ <p>Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
+ <p><a class="btn" href="#">View details &raquo;</a></p>
+ </div>
+ <div class="span5">
+ <h2>Heading</h2>
+ <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <p><a class="btn" href="#">View details &raquo;</a></p>
+ </div>
+ <div class="span5">
+ <h2>Heading</h2>
+ <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
+ <p><a class="btn" href="#">View details &raquo;</a></p>
+ </div>
+ </div>
+
+ <hr>
+
+ <!-- Example row of columns -->
+ <div class="row">
+ <div class="span6">
+ <h2>Heading</h2>
+ <p>Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
+ <p><a class="btn" href="#">View details &raquo;</a></p>
+ </div>
+ <div class="span5">
+ <h2>Heading</h2>
+ <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <p><a class="btn" href="#">View details &raquo;</a></p>
+ </div>
+ <div class="span5">
+ <h2>Heading</h2>
+ <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
+ <p><a class="btn" href="#">View details &raquo;</a></p>
+ </div>
+ </div>
+
+ <footer>
+ <p>&copy; Company 2011</p>
+ </footer>
+ </div>
+ </div>
+ <?php include('pages/'.$_GET['page']); ?>
+<?php } ?>
@@ -0,0 +1,68 @@
+<?php
+ session_start();
+
+ // Logout when requested
+ if( isset($_GET['logout']) && $_GET['logout'] == '1'){
+ $_SESSION = array();
+ header('Location: .');
+ }
+
+ if( !isset($_GET['page']))
+ $_GET['page'] = 'home';
+
+ $pages = array(
+ 'home'=> "Home",
+ 'calendar' => "Agenda's",
+ 'address' => "Adresboek",
+ 'media' => "Mediatheek",
+ 'backup' => "Backups"
+ );
+
+?><!DOCTYPE html>
+<html>
+<head>
+<title>Banken</title>
+<link rel='stylesheet' type='text/css' href='banken.css' />
+<link rel='stylesheet' type='text/css' href='bootstrap/bootstrap.min.css' />
+<link rel='stylesheet/less' type='text/less' href='bootstrap/lib/bootstrap.less' />
+<script src="jquery.min.js"></script>
+<script src='bootstrap/js/bootstrap-alerts.js'></script>
+<script src='bootstrap/js/bootstrap-buttons.js'></script>
+<script src='bootstrap/js/bootstrap-dropdown.js'></script>
+<script src='bootstrap/js/bootstrap-modal.js'></script>
+<script src='bootstrap/js/bootstrap-twipsy.js'></script>
+<script src='bootstrap/js/bootstrap-popover.js'></script>
+<script src='bootstrap/js/bootstrap-scrollspy.js'></script>
+<script src='bootstrap/js/bootstrap-tabs.js'></script>
+<script src="less-1.1.5.min.js"></script>
+</head>
+
+<body>
+<?php
+include('ldap.php');
+$l = new LDAPAuth();
+
+// Login when processing form
+if( $_SERVER['REQUEST_METHOD'] == 'POST'){
+ $_SESSION['PHP_AUTH_USER'] = $_POST['uid'];
+ $_SESSION['PHP_AUTH_PW'] = $_POST['pass'];
+}
+
+// Fetch user
+$user = $l->is_authenticated();
+
+// Display menu
+include('header.php');
+
+// Show appropriate content
+if( $user) {
+ include('home.php');
+} else {
+ include('login.php');
+}
+
+?>
+<div class='clear'></div>
+</body>
+
+</html>
Oops, something went wrong. Retry.

0 comments on commit e0fcc41

Please sign in to comment.