133 lines
3.6 KiB
PHP
133 lines
3.6 KiB
PHP
<?php
|
|
require('php/connect.php');
|
|
SESSION_START();
|
|
|
|
if($_SESSION['login']==0){header("Location: /login/"); }
|
|
if($_SESSION['mail']==1){header("Location: /mail/"); }
|
|
if($_SESSION['confirm']==1){header("Location: /mail/confirm/"); }
|
|
if($_SESSION['pass']==1){ header("Location: ../login/forgot/reset"); }
|
|
if($_SESSION['login']==1){ $admin = false; }
|
|
if($_SESSION['login']==2){ $admin = true; }
|
|
?>
|
|
|
|
<html>
|
|
<head>
|
|
<title>Rooster</title>
|
|
<link rel='stylesheet' id='css' href="css/grey.css"/>
|
|
<link rel='stylesheet' href="css/style.css" />
|
|
<link rel="icon" href="images/RoosterLogo.png" type="image/png" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id='top'>
|
|
<div id='top_rel'>
|
|
<div id='top_abs'>
|
|
|
|
<table cellspacing='0' cellpadding='0'>
|
|
<tr>
|
|
<td>
|
|
|
|
<a href='php/logout.php' class='uitloggen' title='Uitloggen'>Uitloggen</a>
|
|
|
|
</td>
|
|
|
|
<td><a id='account_knop' onclick="setPageValue('account/<?php echo $_SESSION['name']; ?>');" href='javascript:return false;' class='button_top_first' title='Account'> <img src='images/RoosterLogo.png' height='30px' /> </a></td>
|
|
|
|
<?php if(!$admin){ ?>
|
|
<td><a id='leerling_knop' onclick="setPageValue('leerling/<?php echo $_SESSION['name']; ?>');" href='javascript:return false;' class='button_top' title='Leerlingen Rooster'>Leerlingen</a></td>
|
|
|
|
<?php } if($admin){ ?>
|
|
<td><a id='leerling_knop' onclick="changePage('leerling');" href='javascript:return false;' class='button_top' title='Leerlingen Rooster'>Leerlingen</a></td>
|
|
<td><a id='docent_knop' onclick="setPageValue('docent/<?php echo $_SESSION['name']; ?>');" href='javascript:return false;' class='button_top' title='Docent Rooster'>Docenten</a></td>
|
|
<?php } ?>
|
|
<td><a id='lokaal_knop' onclick="changePage('lokaal');" href='javascript:return false;' class='button_top' title='Lokalen Rooster'>Lokalen</a></td>
|
|
<td><a id='leeglokaal_knop' onclick="changePage('leeglokaal');" href='javascript:return false;' class='button_top' title='Lege Lokalen Rooster'>Lege Lokalen</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id='wrapper'>
|
|
|
|
<div id='main_top'>
|
|
<div id='main_top_content'>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id='main'>
|
|
<div id='main_content'>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if($admin){ ?>
|
|
<div id='sidebar'>
|
|
<div id='sidebarcontent'>
|
|
<div id='sideheader'>
|
|
|
|
<h1>Zoeken</h1>
|
|
<form id='form'>
|
|
<input type='search' name='input' id='input' placeholder='Zoek rooster' size='55'>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div id='sideresult'>
|
|
|
|
</div>
|
|
|
|
<div id='sidecontrol'>
|
|
<hr size='1px' color='#999' width='398px' align='left'>
|
|
<table>
|
|
<tr>
|
|
<td>  <a href='javascript: return false' onclick="changePage('bericht'); toggle();">Bericht Sturen</a></td>
|
|
<td>   </td>
|
|
<td><a href='javascript: return false' onclick="setPageValue('log/'); toggle();">Log bekijken</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>  <a href='javascript: return false' onclick="setPageValue('verzondenbericht/'); toggle();">Verzonden Berichten</a></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a href='javascript:return false;' onclick='toggle()' id='toggler'>
|
|
<div id='sidebarToggle'>
|
|
Docent
|
|
</div>
|
|
</a>
|
|
|
|
<?php } ?>
|
|
|
|
<script src="javascript/jquery.js"></script>
|
|
<script src="javascript/scripts.js"></script>
|
|
<script>
|
|
|
|
var admin = '<?php echo $admin; ?>';
|
|
|
|
<?php if(!isset($_GET['page'])){
|
|
if($admin){
|
|
$_GET['page']= 'docent/' . $_SESSION['name'];
|
|
}
|
|
else{
|
|
$_GET['page']= 'leerling/' . $_SESSION['name'];
|
|
}
|
|
}
|
|
?>
|
|
|
|
$(document).ready(function(){
|
|
setPageValue("<?php echo $_GET['page']; ?>")
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|