Store in GIT
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
De meegeleverde bestanden zijn aangepast en werkend gemaakt voor de USBWebserver.
|
||||||
|
|
||||||
|
Installatie:
|
||||||
|
============
|
||||||
|
|
||||||
|
1. Zet alle bestanden in de root van de webserver.
|
||||||
|
|
||||||
|
2. Kopieer de meegeleverde [php.ini] naar de settings folder van de webserver.
|
||||||
|
|
||||||
|
2. Start de webserver.
|
||||||
|
|
||||||
|
3. Importeer de SQL database [localhost.sql].
|
||||||
|
|
||||||
|
4. Pas zo nodig de connectie met de database aan.
|
||||||
|
- De database waarmee verbonden wordt heet "kennyboy_school"
|
||||||
|
- De verbinding voor alle bestanden kan gevonden worden in [php/connect.php].
|
||||||
|
|
||||||
|
5. Open het bestand [reset_all.php] via de webserver [http://localhost:8080/READ%20ME/reset_all.php].
|
||||||
|
|
||||||
|
6. Ga naar [http://localhost:8080] om de site te bekijken.
|
||||||
|
|
||||||
|
|
||||||
|
Opmerkingen:
|
||||||
|
============
|
||||||
|
De site is gemaakt en bedoeld voor een webserver draaiend op PHP 5.4, hierdoor is deze offline versie niet helemaal hetzelfde.
|
||||||
|
Het kan zijn dat ik sommige dingen ben vergeten om te zetten, een volledig werkende versie (zover ik weet) kan gevonden worden op [http://school.kennyboy.nl].
|
||||||
|
|
||||||
|
Om de bestanden te bekijken van de online webserver kunt u verbinden via FTP:
|
||||||
|
|
||||||
|
FTP Server: ftp.kennyboy.nl
|
||||||
|
FTP Poort: 21
|
||||||
|
Username: haperen@kennyboy.nl
|
||||||
|
Wachtwoord: 2kAbxlc6mi
|
||||||
|
|
||||||
|
Er is ook nog een oudere versie van de site te vinden op [http://old.kennyboy.nl/school2]. Maar die doet het niet meer echt sinds ik hem verplaatst heb. Deze werkt(e) zonder XMLHttp.
|
||||||
|
|
||||||
|
|
||||||
|
Veranderingen ten opzichte van online versie:
|
||||||
|
=============================================
|
||||||
|
mysqli --> mysql
|
||||||
|
bcrypt --> crypt
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
|
||||||
|
|
||||||
|
$succes_llr = 0;
|
||||||
|
$mislukt_llr = 0;
|
||||||
|
|
||||||
|
$succes_doc = 0;
|
||||||
|
$mislukt_doc = 0;
|
||||||
|
|
||||||
|
//Hij heeft wel ff nodig
|
||||||
|
ini_set('max_execution_time', 0);
|
||||||
|
|
||||||
|
|
||||||
|
//Leerlingen
|
||||||
|
echo str_repeat(' ', 4096) . "<br><h2 style='display: inline;'><font color='#696A7A'>Updating leerlingen...</font></h2><br>";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$query_llr = "SELECT `name`, `pass` FROM `login` WHERE `perms`=1";
|
||||||
|
$result_temp_llr = mysql_query($query_llr, $connection);
|
||||||
|
while($result_llr = mysql_fetch_assoc($result_temp_llr)){
|
||||||
|
$name = $result_llr['name'];
|
||||||
|
$salt = sprintf('$2a$%02d$%s', 10, strtr(str_replace('=', '', base64_encode(mt_rand(16, 16))),'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/','./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'));
|
||||||
|
$hash = crypt($name, $salt);
|
||||||
|
$query_update = "UPDATE `login` SET `pass`='$hash' WHERE name='$name'";
|
||||||
|
if(mysql_query($query_update, $connection)){
|
||||||
|
$succes_llr++;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$mislukt_llr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "$succes_llr leerlingen <font color='#30D13E'>succesvol</font> geupdate.<br>";
|
||||||
|
echo "$mislukt_llr leerlingen <font color='#DB3232'>niet</font> geupdate.<br><br>";
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
|
||||||
|
//Docenten
|
||||||
|
echo "<h2 style='display: inline;'><font color='#696A7A' >Updating docenten...</font></h2><br>";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$query_doc = "SELECT `name`, `pass` FROM `login` WHERE `perms`=2";
|
||||||
|
$result_temp_doc = mysql_query($query_doc, $connection);
|
||||||
|
while($result_doc = mysql_fetch_assoc($result_temp_doc)){
|
||||||
|
$name = $result_doc['name'];
|
||||||
|
$salt = sprintf('$2a$%02d$%s', 10, strtr(str_replace('=', '', base64_encode(mt_rand(16, 16))),'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/','./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'));
|
||||||
|
$hash = crypt($name, $salt);
|
||||||
|
$query_update = "UPDATE `login` SET `pass`='$hash' WHERE name='$name'";
|
||||||
|
if(mysql_query($query_update, $connection)){
|
||||||
|
$succes_doc++;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$mislukt_doc++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "$succes_doc docenten <font color='#30D13E'>succesvol</font> geupdate.<br>";
|
||||||
|
echo "$mislukt_doc docenten <font color='#DB3232'>niet</font> geupdate.<br><br>";
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Alle email adressen verwijderen en de tabel resetten
|
||||||
|
echo "<h2 style='display: inline;'><font color='#696A7A' >Resetting pass_forgot...</font></h2><br>";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$query_res = "UPDATE `pass_forgot` SET `mail`=NULL, `mail_new`=NULL, `confirm_mail`=NULL, `pass_forgot`=0 WHERE 1";
|
||||||
|
if(mysql_query($query_res, $connection)){
|
||||||
|
echo "Alle cellen <font color='#30D13E'>succesvol</font> gereset.<br><br>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Alle cellen <font color='#30D13E'>niet</font> gereset.<br><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
|
||||||
|
//Last Login en IP adressen verwijderen
|
||||||
|
echo "<h2 style='display: inline;'><font color='#696A7A' >Resetting log...</font></h2><br>";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$query_res = "UPDATE `login` SET `last_login`='0000-00-00 00:00', `last_login_ip`=NULL WHERE 1";
|
||||||
|
if(mysql_query($query_res, $connection)){
|
||||||
|
echo "Alle cellen <font color='#30D13E'>succesvol</font> gereset.<br><br>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Alle cellen <font color='#30D13E'>niet</font> gereset.<br><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
|
||||||
|
//Verstuurde berichten verwijderen
|
||||||
|
echo "<h2 style='display: inline;'><font color='#696A7A' >Resetting bericht...</font></h2><br>";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$query_del = "TRUNCATE TABLE `bericht`";
|
||||||
|
if(mysql_query($query_del, $connection)){
|
||||||
|
echo "Table <font color='#30D13E'>succesvol</font> geleegd.<br>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Table <font color='#30D13E'>niet</font> geleegd.<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$query_del = "ALTER TABLE `bericht` AUTO_INCREMENT =1";
|
||||||
|
if(mysql_query($query_del, $connection)){
|
||||||
|
echo "Auto Increment <font color='#30D13E'>succesvol</font> gereset.<br><br>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Auto Increment <font color='#30D13E'>niet</font> gereset.<br><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<h2 style='display: inline;'><font color='#696A7A' >Reset Compleet...</font></h2><br>";
|
||||||
|
?>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
body {
|
||||||
|
background-color: #B2B2B2;
|
||||||
|
background-image: url('../images/bg_grey.png');
|
||||||
|
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-attachment:fixed;
|
||||||
|
font-family: "Levenim", "Arial";
|
||||||
|
color: #E9E9E9;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main_top {
|
||||||
|
background-color: #A2A2A2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login {
|
||||||
|
background-color: #A2A2A2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button_top,
|
||||||
|
a.button_top:visited {
|
||||||
|
border-color: #B2B2B2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button_top:hover,
|
||||||
|
a.button_top_first:hover {
|
||||||
|
background-color: #B2B2B2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button_top:active,
|
||||||
|
a.button_top_first:active,
|
||||||
|
a.button_login:active,
|
||||||
|
a.uitloggen:active{
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.current {
|
||||||
|
background-color: #B2B2B2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.uitloggen {
|
||||||
|
border-color: #B2B2B2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.uitloggen:hover {
|
||||||
|
background-color: #B2B2B2;
|
||||||
|
}
|
||||||
Binary file not shown.
+520
@@ -0,0 +1,520 @@
|
|||||||
|
@font-face
|
||||||
|
{
|
||||||
|
font-family: "Levenim";
|
||||||
|
src: url('lvnm.ttf')
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Main Components */
|
||||||
|
|
||||||
|
#wrapper {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
top: 40px;
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Top Bar */
|
||||||
|
#top {
|
||||||
|
position: fixed;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
z-index: 100;
|
||||||
|
-webkit-box-shadow: 0px 1px 5px #555;
|
||||||
|
-moz-box-shadow: 0px 1px 5px #555;
|
||||||
|
box-shadow: 0px 1px 5px #555;
|
||||||
|
background-color: #D2D2D2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#top_rel {
|
||||||
|
position: relative;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
#top_abs {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -410px;
|
||||||
|
display: block;
|
||||||
|
width: 700px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Content Container (Backdrop) */
|
||||||
|
#main_top {
|
||||||
|
width: 100%;
|
||||||
|
height: 170px;
|
||||||
|
top: 40px;
|
||||||
|
left: 0px;
|
||||||
|
display:none;
|
||||||
|
-webkit-box-shadow:inset 0px -1px 6px 0px #555;
|
||||||
|
-moz-box-shadow:inset 0px -1px 6px #555;
|
||||||
|
box-shadow:inset 0px -1px 6px #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main_top_content {
|
||||||
|
position: absolute;
|
||||||
|
width: 600px;
|
||||||
|
height: 170px;
|
||||||
|
display:none;
|
||||||
|
top: 0px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -300px;
|
||||||
|
z-index: 75;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main content */
|
||||||
|
#main {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display:block;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main_content {
|
||||||
|
position: absolute;
|
||||||
|
width: 600px;
|
||||||
|
min-height: 80%;
|
||||||
|
display:block;
|
||||||
|
top: 0px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -300px;
|
||||||
|
z-index: 50;
|
||||||
|
padding: 20 0 5 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overlay {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #D1D1D1;
|
||||||
|
z-index: 150;
|
||||||
|
font-size: 25px;
|
||||||
|
text-align: center;
|
||||||
|
color: #5F5F5F;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login {
|
||||||
|
position: absolute;
|
||||||
|
top: 40%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -175px;
|
||||||
|
margin-top: -120px;
|
||||||
|
width: 310px;
|
||||||
|
min-height: 140px;
|
||||||
|
padding: 20 20 0 20;
|
||||||
|
z-index: 10;
|
||||||
|
-webkit-box-shadow: 2px 2px 10px 3px #666;
|
||||||
|
-moz-box-shadow: 2px 2px 10px 3px #666;
|
||||||
|
box-shadow: 2px 2px 10px 3px #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
#load {
|
||||||
|
position: absolute;
|
||||||
|
top: 36%;
|
||||||
|
left: 47%;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
a.button_top,
|
||||||
|
a.button_top:visited {
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 16px;
|
||||||
|
display: block;
|
||||||
|
height: 30px;
|
||||||
|
width: 180px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10 0 0 0;
|
||||||
|
border-color: #B2B2B2 !important;
|
||||||
|
border-left-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
color: #5F5F5F;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button_top_first,
|
||||||
|
a.button_top_first:visited {
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 16px;
|
||||||
|
display: block;
|
||||||
|
height: 35px;
|
||||||
|
width: 40px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5 0 0 0;
|
||||||
|
color: #5F5F5F;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button_top:hover,
|
||||||
|
a.button_top_first:hover {
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button_top:active,
|
||||||
|
a.button_top_first:active,
|
||||||
|
a.button_login:active{
|
||||||
|
-webkit-transition: all 0.1s ease-in;
|
||||||
|
-moz-transition: all 0.1s ease-in;
|
||||||
|
transition: all 0.1s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.current {
|
||||||
|
-webkit-transition: all 0.8s ease-in;
|
||||||
|
-moz-transition: all 0.8s ease-in;
|
||||||
|
transition: all 0.8s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.uitloggen {
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
height: 27px;
|
||||||
|
width: 120px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 13px 0px 0px 0px;
|
||||||
|
border-color: #B2B2B2 !important;
|
||||||
|
border-style: none solid none none;
|
||||||
|
border-width: 1px;
|
||||||
|
color: #9F9F9F;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.uitloggen:hover {
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
color: #5F5F5F;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: none;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
width: 150px;
|
||||||
|
border='0';
|
||||||
|
background-color: #DDD;
|
||||||
|
|
||||||
|
-webkit-box-shadow: 2px 2px 10px 3px #666;
|
||||||
|
-moz-box-shadow: 2px 2px 10px 3px #666;
|
||||||
|
box-shadow: 2px 2px 10px 3px #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
td, th {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
.label {
|
||||||
|
text-align: none;
|
||||||
|
font-size: 10px;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster {
|
||||||
|
-webkit-box-shadow: 0px 1px 5px #555;
|
||||||
|
-moz-box-shadow: 0px 1px 5px #555;
|
||||||
|
box-shadow: 0px 1px 5px #555;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.content {
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #333;
|
||||||
|
border-width: 1px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 4px;
|
||||||
|
margin: 0px;
|
||||||
|
height: 60px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.header {
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #333;
|
||||||
|
border-width: 1px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 4px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.uur {
|
||||||
|
display: block;
|
||||||
|
background-color: #C2C2C2;
|
||||||
|
text-align: center;
|
||||||
|
border-style: none solid solid solid;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.dag {
|
||||||
|
display: block;
|
||||||
|
border-style: solid solid solid none;
|
||||||
|
background-color: #C2C2C2;
|
||||||
|
text-align: center;
|
||||||
|
padding: 1 4 0 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.vrij {
|
||||||
|
display: block;
|
||||||
|
border-style: none solid solid none;
|
||||||
|
background-color: #979797;
|
||||||
|
background-image: url('../images/vrij.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.les {
|
||||||
|
display: block;
|
||||||
|
border-style: none solid solid none;
|
||||||
|
background-color: #A3A3A3;
|
||||||
|
padding: 0 0 0 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.les:hover {
|
||||||
|
background-color: #838383;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rooster td.corner {
|
||||||
|
display: block;
|
||||||
|
border-style: solid none none solid;
|
||||||
|
background-color: #C2C2C2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input[type="text"],
|
||||||
|
input[type="text"]:hover,
|
||||||
|
input[type="password"],
|
||||||
|
input[type="password"]:hover,
|
||||||
|
input[type="email"],
|
||||||
|
input[type="email"]:hover {
|
||||||
|
width: 160px;
|
||||||
|
border: none;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #BBB;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="search"]:hover,
|
||||||
|
input[type="search"] {
|
||||||
|
border: none;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #BBB;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]:focus,
|
||||||
|
input[type="password"]:focus,
|
||||||
|
input[type="email"]:focus,
|
||||||
|
input[type="search"]:focus {
|
||||||
|
outline-color:#777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_but {
|
||||||
|
color: #E2E2E2;
|
||||||
|
font-size: 15px;
|
||||||
|
width: 120px;
|
||||||
|
height: 30px;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 1px;
|
||||||
|
background-color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_but:hover {
|
||||||
|
color: #F0F0F0;
|
||||||
|
font-size: 15px;
|
||||||
|
width: 120px;
|
||||||
|
height: 30px;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 1px;
|
||||||
|
background-color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_but:active {
|
||||||
|
color: #C2C2C2;
|
||||||
|
font-size: 15px;
|
||||||
|
width: 120px;
|
||||||
|
height: 30px;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 1px;
|
||||||
|
background-color: #AAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.stijl,
|
||||||
|
li.stijl {
|
||||||
|
display: inline;
|
||||||
|
margin: none;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: none;
|
||||||
|
-webkit-padding-start: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.stijl {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.stijl:hover {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.current {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.lokaal {
|
||||||
|
display: inline;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.mailcontainer {
|
||||||
|
-webkit-transition: all 0.2s ease-in;
|
||||||
|
-moz-transition: all 0.2s ease-in;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* SIDEBAR */
|
||||||
|
|
||||||
|
#sidebar {
|
||||||
|
position: absolute;
|
||||||
|
display:none;
|
||||||
|
top: 0px;
|
||||||
|
left: 0;
|
||||||
|
width: 0px;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #A9A9A9;
|
||||||
|
opacity: 0.8;
|
||||||
|
|
||||||
|
-webkit-box-shadow: 0px 1px 5px #555;
|
||||||
|
-moz-box-shadow: 0px 1px 5px #555;
|
||||||
|
box-shadow: 0px 1px 5px #555;
|
||||||
|
z-index:250;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebarcontent {
|
||||||
|
position: absolute;
|
||||||
|
display:none;
|
||||||
|
top: 0px;
|
||||||
|
left: 0;
|
||||||
|
width: 380px;
|
||||||
|
padding: 10px 10px 0px 10px;
|
||||||
|
height: 100%;
|
||||||
|
z-index:251;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebarToggle {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
bottom: 100px;
|
||||||
|
left: -57px;
|
||||||
|
width: 140px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #797979;
|
||||||
|
opacity: 0.9;
|
||||||
|
text-align: center;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
-webkit-transform: rotate(90deg);
|
||||||
|
z-index:200;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.toggler,
|
||||||
|
a.toggler:visited {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #9A9A9A;
|
||||||
|
z-index:201;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideheader {
|
||||||
|
position: relative;
|
||||||
|
top: 40px;
|
||||||
|
left: 0px;
|
||||||
|
width: auto;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideresult {
|
||||||
|
position: relative;
|
||||||
|
top: 80px;
|
||||||
|
left: 0px;
|
||||||
|
width:auto;
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidecontrol {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0px;
|
||||||
|
left: 0px;
|
||||||
|
width:auto;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.bericht th,
|
||||||
|
table.bericht td {
|
||||||
|
border-bottom-style: solid;
|
||||||
|
border-width:1px;
|
||||||
|
border-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.bericht th.leftline,
|
||||||
|
table.bericht td.leftline {
|
||||||
|
border-left-style: solid;
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 719 B |
@@ -0,0 +1,133 @@
|
|||||||
|
<?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>
|
||||||
Vendored
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,286 @@
|
|||||||
|
function getRooster(form, id, val) {
|
||||||
|
var formData = new FormData(form);
|
||||||
|
|
||||||
|
r_xmlhttp=new XMLHttpRequest();
|
||||||
|
r_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (r_xmlhttp.readyState==4 && r_xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#main_content').animate({opacity: "0"}, 300, function(){
|
||||||
|
document.getElementById("main_content").innerHTML=r_xmlhttp.responseText;
|
||||||
|
$('#main_content').animate({opacity: "1", top: "0px"}, 400);
|
||||||
|
$('#main_content').fadeIn('fast');
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
history.pushState("", document.title, window.location.pathname + '?page=' + id + "/" + val);
|
||||||
|
$('#main_content').animate({opacity: "0", top: "15px"}, 400, function(){
|
||||||
|
$('#main_content').html('<center><img src="images/loading.gif" height="100px" /></center>');
|
||||||
|
$('#main_content').animate({opacity: "1"}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
if(id=='account'){
|
||||||
|
r_xmlhttp.open("POST","php/getAccount.php",true);
|
||||||
|
}
|
||||||
|
else if(id=='log'){
|
||||||
|
r_xmlhttp.open("POST","php/getLog.php",true);
|
||||||
|
}
|
||||||
|
else if(id=='bericht'){
|
||||||
|
r_xmlhttp.open("POST","php/getBericht.php",true);
|
||||||
|
}
|
||||||
|
else if(id=='verzondenbericht'){
|
||||||
|
r_xmlhttp.open("POST","php/getVerBericht.php",true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
r_xmlhttp.open("POST","php/getRooster.php",true);
|
||||||
|
}
|
||||||
|
r_xmlhttp.send(formData);
|
||||||
|
}, 700);
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearSelect(id){
|
||||||
|
document.getElementById(id).value = [' '];
|
||||||
|
}
|
||||||
|
|
||||||
|
var lastPage = '';
|
||||||
|
var button = '';
|
||||||
|
|
||||||
|
function changePage(page, fade){
|
||||||
|
if(typeof(fade)==='undefined') fade = true;
|
||||||
|
|
||||||
|
if(lastPage==page){return true;}
|
||||||
|
else{
|
||||||
|
p_xmlhttp=new XMLHttpRequest();
|
||||||
|
p_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (p_xmlhttp.readyState==4 && p_xmlhttp.status==200 && p_xmlhttp.responseText != false)
|
||||||
|
{
|
||||||
|
var lastPage = page;
|
||||||
|
$('#main_top').slideDown('fast', function(){
|
||||||
|
if(fade){$('#main_content').fadeIn('fast'); }
|
||||||
|
$('#main_top_content').fadeIn('fast');
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById("main_top_content").innerHTML=p_xmlhttp.responseText;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
button = '#' + page + '_knop';
|
||||||
|
$('a.button_top, a.button_top_first').removeClass('current');
|
||||||
|
$(button).addClass('current');
|
||||||
|
|
||||||
|
history.pushState("", document.title, window.location.pathname + '?page=' + page);
|
||||||
|
|
||||||
|
if(fade){$('#main_content').fadeOut('fast'); }
|
||||||
|
$('#main_top_content').fadeOut('fast',function(){
|
||||||
|
$('#main_top').slideUp('fast');
|
||||||
|
document.getElementById("main_content").innerHTML="";
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
p_xmlhttp.open("POST","pages/" + page + "_header.php",true);
|
||||||
|
p_xmlhttp.send(null);
|
||||||
|
}, 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setPageValue(variable){
|
||||||
|
var array = variable.split('/');
|
||||||
|
var page = array[0];
|
||||||
|
var value = array[1];
|
||||||
|
|
||||||
|
changePage(page, false);
|
||||||
|
|
||||||
|
if(variable.indexOf('/') >= 0){
|
||||||
|
|
||||||
|
form = document.createElement('form');
|
||||||
|
input = document.createElement('input');
|
||||||
|
input.setAttribute('name', page);
|
||||||
|
input.setAttribute('type', 'text');
|
||||||
|
input.setAttribute('value', value);
|
||||||
|
form.appendChild(input);
|
||||||
|
getRooster(form, page, value);
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
$("#" + page).val([value]);
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateMail(name){
|
||||||
|
var form = document.getElementById('mailform');
|
||||||
|
var formData = new FormData(form);
|
||||||
|
|
||||||
|
um_xmlhttp=new XMLHttpRequest();
|
||||||
|
um_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (um_xmlhttp.readyState==4 && um_xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
document.getElementById("mailcontainer").innerHTML=um_xmlhttp.responseText;
|
||||||
|
setTimeout(function(){
|
||||||
|
$('#mailcontainer').fadeIn('fast');
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#mailcontainer').fadeOut('fast', function(){
|
||||||
|
um_xmlhttp.open("POST","php/updateMail.php",true);
|
||||||
|
um_xmlhttp.send(formData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmMail(){
|
||||||
|
var form = document.getElementById('confirmmailform');
|
||||||
|
var formData = new FormData(form);
|
||||||
|
|
||||||
|
cm_xmlhttp=new XMLHttpRequest();
|
||||||
|
cm_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (cm_xmlhttp.readyState==4 && cm_xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
var array = cm_xmlhttp.responseText.split('#');
|
||||||
|
var response = array[0];
|
||||||
|
var mail = array[1];
|
||||||
|
document.getElementById("mailcontainer").innerHTML=response;
|
||||||
|
document.getElementById("mailholder").innerHTML=mail;
|
||||||
|
setTimeout(function(){
|
||||||
|
$('#mailcontainer').fadeIn('fast');
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#mailcontainer').fadeOut('fast', function(){
|
||||||
|
cm_xmlhttp.open("POST","php/confirmMail2.php",true);
|
||||||
|
cm_xmlhttp.send(formData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatePass(){
|
||||||
|
var form = document.getElementById('passform');
|
||||||
|
var formData = new FormData(form);
|
||||||
|
|
||||||
|
up_xmlhttp=new XMLHttpRequest();
|
||||||
|
up_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (up_xmlhttp.readyState==4 && up_xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
document.getElementById("passcontainer").innerHTML=up_xmlhttp.responseText;
|
||||||
|
$('#passcontainer').fadeIn('fast');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#passcontainer').fadeOut('fast', function(){
|
||||||
|
up_xmlhttp.open("POST","php/updatePass.php",true);
|
||||||
|
up_xmlhttp.send(formData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetPass(name){
|
||||||
|
rp_xmlhttp=new XMLHttpRequest();
|
||||||
|
rp_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (rp_xmlhttp.readyState==4 && rp_xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
document.getElementById("passcontainer").innerHTML=rp_xmlhttp.responseText;
|
||||||
|
$('#passcontainer').fadeIn('fast');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#passcontainer').fadeOut('fast', function(){
|
||||||
|
form = document.createElement('form');
|
||||||
|
input = document.createElement('input');
|
||||||
|
input.setAttribute('name', 'naam');
|
||||||
|
input.setAttribute('type', 'text');
|
||||||
|
input.setAttribute('value', name);
|
||||||
|
form.appendChild(input);
|
||||||
|
var formData = new FormData(form);
|
||||||
|
rp_xmlhttp.open("POST","php/setPass2.php",true);
|
||||||
|
rp_xmlhttp.send(formData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('input').bind('input propertychange', function() {
|
||||||
|
var form = document.getElementById('form');
|
||||||
|
var formData = new FormData(form);
|
||||||
|
|
||||||
|
xmlhttp=new XMLHttpRequest();
|
||||||
|
xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (xmlhttp.readyState==4 && xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
document.getElementById("sideresult").innerHTML=xmlhttp.responseText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlhttp.open("POST","php/search.php",true);
|
||||||
|
xmlhttp.send(formData);
|
||||||
|
});
|
||||||
|
|
||||||
|
var i = true;
|
||||||
|
function toggle(){
|
||||||
|
if(i){
|
||||||
|
$('#sidebar').show();
|
||||||
|
$('#sidebar').animate({width: '400px'}, 200, function(){
|
||||||
|
$('#sidebarcontent').fadeIn('fast');
|
||||||
|
});
|
||||||
|
$('#sidebarToggle').animate({left: '343px'}, 200);
|
||||||
|
i = false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#sidebarcontent').fadeOut('fast', function(){
|
||||||
|
$('#sidebar').animate({width: '0px'}, 200, function(){
|
||||||
|
$('#sidebar').hide();
|
||||||
|
});
|
||||||
|
$('#sidebarToggle').animate({left: '-57px'}, 200);
|
||||||
|
});
|
||||||
|
|
||||||
|
i=true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#input').keydown(function(event){
|
||||||
|
if(event.keyCode == 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function sendMail() {
|
||||||
|
var form = document.getElementById('berichtform')
|
||||||
|
var formData = new FormData(form);
|
||||||
|
|
||||||
|
sm_xmlhttp=new XMLHttpRequest();
|
||||||
|
sm_xmlhttp.onreadystatechange=function()
|
||||||
|
{
|
||||||
|
if (sm_xmlhttp.readyState==4 && sm_xmlhttp.status==200)
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#main_content').animate({opacity: "0"}, 300, function(){
|
||||||
|
document.getElementById("main_content").innerHTML=sm_xmlhttp.responseText;
|
||||||
|
$('#main_content').animate({opacity: "1", top: "0px"}, 400);
|
||||||
|
$('#main_content').fadeIn('fast');
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#main_content').animate({opacity: "0", top: "15px"}, 400, function(){
|
||||||
|
$('#main_content').html('<center><img src="images/loading.gif" height="100px" /></center>');
|
||||||
|
$('#main_content').animate({opacity: "1"}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
sm_xmlhttp.open("POST","php/sendMail.php",true);
|
||||||
|
sm_xmlhttp.send(formData);
|
||||||
|
}, 700);
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
require('../../php/connect.php');
|
||||||
|
SESSION_START();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Rooster - Forgot</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>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($_GET['nouser']==1){ $uf = "style='border-color: #FCC; outline-color: #F88;'";}
|
||||||
|
if($_GET['nomail']==1){ $nm = true; }
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id='login'>
|
||||||
|
<img src="../../images/RoosterLogo.png" height='25px'>
|
||||||
|
   <h3 style='display:inline;'>Wachtwoord Vergeten</h3>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<form action='../../php/setPass.php' method='POST' id='form' onsubmit='loading()'>
|
||||||
|
<tr><td colspan=2>
|
||||||
|
<?php if($nm){ ?></form>Er is geen email adres bekent bij deze gebruikersnaam. Neem contact op met een docent. </td></tr>
|
||||||
|
<tr><td></td><td><form id='back' action='../'><button form='back' class='login_but' type='submit'>Terug</button></form></td></tr>
|
||||||
|
|
||||||
|
<?php } else { ?>Vul hier uw gebruikersnaam in. Er zal dan een email verstuurd worden naar het door u opgegeven email adres. <font color='#9E0000'>Let op: Deze mail bevind zich waarschijnlijk in uw junk folder!</font> In de email kunt u uw nieuw tijdelijk wachtwoord vinden. </td></tr>
|
||||||
|
<tr><td align='right' width='120px'>Gebruikersnaam:</td><td><input <?php echo $uf; ?> type='text' name='name'></td></tr>
|
||||||
|
<tr><td><img src='../../images/loading.gif' width='0px'></td><td><input type='submit' value='Wijzigen' class='login_but'></td></tr></form><?php } ?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id='load'>
|
||||||
|
<img src='../../images/loading.gif' width='100px'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../../javascript/jquery.js"></script>
|
||||||
|
<script>
|
||||||
|
function loading() {
|
||||||
|
$('#login').fadeOut('fast');
|
||||||
|
$('#load').fadeIn('fast');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
require('../../../php/connect.php');
|
||||||
|
SESSION_START();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Rooster - Forgot</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>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($_GET['nomatch']==1){ $nomatch = "style='border-color: #FCC; outline-color: #F88;'";}
|
||||||
|
|
||||||
|
if($_SESSION['login']==0){ header("Location: ../../../"); }
|
||||||
|
if($_SESSION['pass']==0){ header("Location: ../"); }
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id='login'>
|
||||||
|
<img src="../../../images/RoosterLogo.png" height='25px'>
|
||||||
|
   <h3 style='display:inline;'>Wachtwoord Wijzigen</h3>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form action='../../../php/updatePass2.php' method='POST' onsubmit='loading()'>
|
||||||
|
<table>
|
||||||
|
<tr><td colspan=2>Vul hier je nieuwe wachtwoord in.</td></tr>
|
||||||
|
<tr><td align='right' width='120px'>Wachtwoord:</td><td><input <?php echo $nomatch; ?> type='password' name='pass1'></td></tr>
|
||||||
|
<tr><td align='right' width='120px'>Herhaal Wachtwoord:</td><td><input <?php echo $nomatch; ?> type='password' name='pass2'></td></tr>
|
||||||
|
<tr><td><img src='../../../images/loading.gif' width='0px'></td><td><input type='submit' value='Wijzigen' class='login_but'></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id='load'>
|
||||||
|
<img src='../../../images/loading.gif' width='100px'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../../../javascript/jquery.js"></script>
|
||||||
|
<script>
|
||||||
|
function loading() {
|
||||||
|
$('#login').fadeOut('fast');
|
||||||
|
$('#load').fadeIn('fast');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
SESSION_START();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Rooster - Login</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>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($_SESSION['login']>=1){ header("Location: ../"); }
|
||||||
|
|
||||||
|
if($_GET['nf']==1){ $nf = "style='border-color: #FCC; outline-color: #F88;'";}
|
||||||
|
if($_GET['pf']==1){ $pf = "style='border-color: #FCC; outline-color: #F88;'";}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id='login'>
|
||||||
|
<img src="../images/RoosterLogo.png" height='25px'>
|
||||||
|
   <h1 style='display:inline;'>Login</h1>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form action='../php/login.php' method='POST' onsubmit='loading()'>
|
||||||
|
<table>
|
||||||
|
<tr><td align='right'>Gebruikersnaam:</td><td><input type='text' name='name' <?php echo $nf; ?> value="<?php echo $_GET['username']; ?>"></td></tr>
|
||||||
|
<tr><td align='right'><a tabindex = "-1" href='forgot/' title='Wachtwoord vergeten'><img src='/images/forgot.png' height='13px'></a> Wachtwoord:</td><td><input type='password' name='pass' <?php echo $pf; ?> ></td></tr>
|
||||||
|
<tr><td><img src='../images/loading.gif' width='0px'></td><td><input type='submit' value='Inloggen' class='login_but'></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id='load'>
|
||||||
|
<img src='../images/loading.gif' width='100px'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../javascript/jquery.js"></script>
|
||||||
|
<script>
|
||||||
|
function loading() {
|
||||||
|
$('#login').fadeOut('fast', function(){
|
||||||
|
$('#load').fadeIn('fast');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
require('../../php/connect.php');
|
||||||
|
SESSION_START();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Rooster - Mail</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>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($_SESSION['mail']==0 && $_SESSION['confirm']==0){ header("Location: ../"); }
|
||||||
|
if($_SESSION['mail']==1){ header("Location: ../"); }
|
||||||
|
|
||||||
|
if($_GET['code']==1){ $cf = "style='border-color: #FCC; outline-color: #F88;'";}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id='login'>
|
||||||
|
<img src="../../images/RoosterLogo.png" height='25px'>
|
||||||
|
   <h3 style='display:inline;'>E-Mail bevestigen</h3>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form action='../../php/confirmMail.php' method='GET' onsubmit='loading()'>
|
||||||
|
<table>
|
||||||
|
<tr><td colspan=2>Er is een mail gestuurd naar het opgegeven e-mail adres. <font color='#9E0000'>Let op: Deze mail bevind zich waarschijnlijk in uw junk folder!</font> Klink op de link in de mail of vul de code hier in.</td></tr>
|
||||||
|
<tr><td align='right' width='120px'>Code:</td><td><input <?php echo $cf; ?> type='text' name='code'></td></tr>
|
||||||
|
<tr><td><img src='../../images/loading.gif' width='0px'></td><td><input type='submit' value='Bevestigen' class='login_but'></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id='load'>
|
||||||
|
<img src='../../images/loading.gif' width='100px'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../../javascript/jquery.js"></script>
|
||||||
|
<script>
|
||||||
|
function loading() {
|
||||||
|
$('#login').fadeOut('fast');
|
||||||
|
$('#load').fadeIn('fast');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
SESSION_START();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Rooster - Mail</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>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($_SESSION['mail']==0 && $_SESSION['confirm']==0){ header("Location: ../"); }
|
||||||
|
if($_SESSION['confirm']==1){ header("Location: /confirm/"); }
|
||||||
|
|
||||||
|
if($_GET['mf']==1){ $mf = "style='border-color: #FCC; outline-color: #F88;'";}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id='login'>
|
||||||
|
<img src="../images/RoosterLogo.png" height='25px'>
|
||||||
|
   <h3 style='display:inline;'>E-Mail adres instellen</h3>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form action='../php/setMail.php' method='POST' onsubmit='loading()'>
|
||||||
|
<table>
|
||||||
|
<tr><td colspan=2>Vul hier je e-mail adres in. Deze zal gebruikt worden in het geval dat je je wachtwoord bent vergeten.</td></tr>
|
||||||
|
<tr><td align='right'>E-Mail adres:</td><td><input type='email' <?php echo $mf; ?> name='mail'></td></tr>
|
||||||
|
<tr><td><img src='../images/loading.gif' width='0px'></td><td><input type='submit' value='Doorgaan' class='login_but'></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id='load'>
|
||||||
|
<img src='../images/loading.gif' width='100px'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../javascript/jquery.js"></script>
|
||||||
|
<script>
|
||||||
|
function loading() {
|
||||||
|
$('#login').fadeOut('fast');
|
||||||
|
$('#load').fadeIn('fast');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
if ($_SESSION['login']>1) {
|
||||||
|
|
||||||
|
$query_pass = "SELECT `name` FROM `pass_forgot` WHERE `pass_forgot`=1";
|
||||||
|
$result_array_pass = mysql_query($query_pass, $connection);
|
||||||
|
if(mysql_num_rows($result_array_pass)==0){
|
||||||
|
echo false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<table cellpadding='0' cellspacing='5' width='600px'>
|
||||||
|
|
||||||
|
<tr><td width='200px' align='center'></td><td width='200px' align='center'><br>Wachtwoord Vergeten</td><td width='200px' align='center'></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- LEERLING -->
|
||||||
|
<td align='center'> <select id='account' multiple size='5' name='account' onchange="getRooster(this.form, this.id, this.value); ">
|
||||||
|
<?php while($result_pass = mysql_fetch_assoc($result_array_pass)) { ?>
|
||||||
|
|
||||||
|
<option> <?php echo $result_pass['name']; ?> </option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php } } else { echo false; } ?>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
if ($_SESSION['login']>1) {
|
||||||
|
|
||||||
|
$query = "SELECT DISTINCT (`name`) FROM `pass_forgot` WHERE LENGTH(`mail`)>0";
|
||||||
|
$result_array = mysql_query($query, $connection);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<table cellpadding='0' cellspacing='5' width='600px'>
|
||||||
|
|
||||||
|
<tr><td width='200px' align='center'></td><td width='200px' align='center'><br>Gebruiker</td><td width='200px' align='center'></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- LEERLING -->
|
||||||
|
<td align='center'> <select id='bericht' multiple size='5' name='bericht' onchange="getRooster(this.form, this.id, this.value); ">
|
||||||
|
<?php while($result = mysql_fetch_assoc($result_array)) { ?>
|
||||||
|
|
||||||
|
<option> <?php echo $result['name']; ?> </option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php } else { echo false; } ?>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
|
||||||
|
SESSION_START();
|
||||||
|
if($_SESSION['login']>1){
|
||||||
|
|
||||||
|
$query_docent = "SELECT DISTINCT (`docent`) FROM `lessen`";
|
||||||
|
$result_array_docent = mysql_query($query_docent, $connection);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<table cellpadding='0' cellspacing='5' width='600px'>
|
||||||
|
|
||||||
|
<tr><td width='200px' align='center'></td><td width='200px' align='center'><br>Docent</td><td width='200px' align='center'></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- DOCENT -->
|
||||||
|
<td align='center'> <select id='docent' multiple size='5' name='docent' onchange="getRooster(this.form, this.id, this.value); ">
|
||||||
|
<?php while($result_docent = mysql_fetch_assoc($result_array_docent)) { ?>
|
||||||
|
|
||||||
|
<option> <?php echo $result_docent['docent']; ?> </option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php } else { echo false; } ?>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<form>
|
||||||
|
|
||||||
|
<table cellpadding='0' cellspacing='5' width='525px' style='margin-left:75px;'>
|
||||||
|
|
||||||
|
<tr><td width='175px' align='center'><br>Dag</td><td width='175px' align='center'><br>Uur</td></tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<!-- DAG -->
|
||||||
|
<td align='center'>
|
||||||
|
|
||||||
|
<select id='dag' multiple size='5' name='dag' onchange="clearSelect('leeglokaal')">
|
||||||
|
<option> Ma </option>
|
||||||
|
<option> Di </option>
|
||||||
|
<option> Wo </option>
|
||||||
|
<option> Do </option>
|
||||||
|
<option> Vr </option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
|
||||||
|
<select id='leeglokaal' multiple size='5' name='uur' onchange="getRooster(this.form, this.id, document.getElementById('dag').value + this.value); ">
|
||||||
|
<option> 1 </option>
|
||||||
|
<option> 2 </option>
|
||||||
|
<option> 3 </option>
|
||||||
|
<option> 4 </option>
|
||||||
|
<option> 5 </option>
|
||||||
|
<option> 6 </option>
|
||||||
|
<option> 7 </option>
|
||||||
|
<option> 8 </option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
if ($_SESSION['login']>1) {
|
||||||
|
|
||||||
|
$query_leerling = "SELECT DISTINCT (`adminnr`) FROM `adminnr_naam`";
|
||||||
|
$result_array_leerling = mysql_query($query_leerling, $connection);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<table cellpadding='0' cellspacing='5' width='600px'>
|
||||||
|
|
||||||
|
<tr><td width='200px' align='center'></td><td width='200px' align='center'><br>Leerling</td><td width='200px' align='center'></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- LEERLING -->
|
||||||
|
<td align='center'> <select id='leerling' multiple size='5' name='leerling' onchange="getRooster(this.form, this.id, this.value); ">
|
||||||
|
<?php while($result_leerling = mysql_fetch_assoc($result_array_leerling)) { ?>
|
||||||
|
|
||||||
|
<option> <?php echo $result_leerling['adminnr']; ?> </option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php } else { echo false; } ?>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
echo false;
|
||||||
|
?>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
require('../php/connect.php');
|
||||||
|
|
||||||
|
$query_lokaal = "SELECT DISTINCT (`lokaal`) FROM `lessen`";
|
||||||
|
$result_array_lokaal = mysql_query($query_lokaal, $connection);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<table cellpadding='0' cellspacing='5' width='600px'>
|
||||||
|
|
||||||
|
<tr><td width='200px' align='center'></td><td width='200px' align='center'><br>Lokaal</td><td width='200px' align='center'></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- LOKAAL -->
|
||||||
|
<td align='center'> <select id='lokaal' multiple size='5' name='lokaal' onchange="getRooster(this.form, this.id, this.value); ">
|
||||||
|
<?php while($result_lokaal = mysql_fetch_assoc($result_array_lokaal)) { ?>
|
||||||
|
|
||||||
|
<option> <?php echo $result_lokaal['lokaal']; ?> </option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td align='center'>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
echo false;
|
||||||
|
?>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$code = $_GET['code'];
|
||||||
|
$code = urldecode($code);
|
||||||
|
|
||||||
|
$query = "SELECT * FROM `pass_forgot` WHERE `confirm_mail`='$code'";
|
||||||
|
$result = mysql_query($query, $connection);
|
||||||
|
if(mysql_num_rows($result)==1){
|
||||||
|
$query = "UPDATE `pass_forgot` SET `confirm_mail`=NULL, `mail`=`mail_new`, `mail_new`=NULL WHERE `confirm_mail`='$code'";
|
||||||
|
mysql_query($query, $connection);
|
||||||
|
$_SESSION['confirm']=0;
|
||||||
|
|
||||||
|
$result_rows = mysql_fetch_assoc($result);
|
||||||
|
$name=$result_rows['name'];
|
||||||
|
if(strlen($name)>2){
|
||||||
|
header("Location: ../?page=leerling/$name");
|
||||||
|
}
|
||||||
|
if(strlen($name)==2){
|
||||||
|
header("Location: ../?page=docent/$name");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header("Location: ../mail/confirm/?code=1");
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$code = $_POST['code'];
|
||||||
|
$code = urldecode($code);
|
||||||
|
|
||||||
|
$query = "SELECT * FROM `pass_forgot` WHERE `confirm_mail`='$code'";
|
||||||
|
$result = mysql_query($query, $connection);
|
||||||
|
$result_rows = mysql_fetch_assoc($result);
|
||||||
|
$mail=$result_rows['mail_new'];
|
||||||
|
|
||||||
|
if(mysql_num_rows($result)==1){
|
||||||
|
$query = "UPDATE `pass_forgot` SET `confirm_mail`=NULL, `mail`=`mail_new`, `mail_new`=NULL WHERE `confirm_mail`='$code'";
|
||||||
|
mysql_query($query, $connection);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<table width='400px' id='table_mail'>
|
||||||
|
<tr>
|
||||||
|
<th align='left' colspan='2'><h2>Email Adres bevestigen</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<td colspan='2'>Uw email adres is succesvol gewijzigd.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php echo "#" . $mail;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo 'Deze code klopt niet!';
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
$connection=mysql_connect("localhost", "root", "usbw") or die("Connection Failed: " . mysql_error());
|
||||||
|
mysql_select_db("kennyboy_school", $connection) or die("Connection Failed: " . mysql_error());
|
||||||
|
?>
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
require('connect.php');
|
||||||
|
SESSION_START();
|
||||||
|
|
||||||
|
$login = $_SESSION['login'];
|
||||||
|
$name = $_POST['account'];
|
||||||
|
|
||||||
|
if($login==1 || ($login==2 && strlen($_POST['account'])>2) ){
|
||||||
|
$query = "SELECT voornaam, tussenvoegsel, achternaam, mail, confirm_mail FROM `adminnr_naam`, `pass_forgot` WHERE adminnr_naam.adminnr=pass_forgot.name AND adminnr='$name'";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
$result = mysql_fetch_assoc($result_temp);
|
||||||
|
$voornaam = $result['voornaam'];
|
||||||
|
$mail = $result['mail'];
|
||||||
|
if($result['confirm_mail']==null){ $change = true; } else { $change = false; }
|
||||||
|
if ($result['tussenvoegsel'] != NULL){
|
||||||
|
$tussenvoegsel = $result['tussenvoegsel'] . ' ';
|
||||||
|
}
|
||||||
|
$achternaam = $result['achternaam'];
|
||||||
|
$name =$voornaam . ' ' . $tussenvoegsel . $achternaam . ' (' . $_POST['account'] . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($login==2 && strlen($_POST['account'])==2){
|
||||||
|
$query = "SELECT mail, confirm_mail FROM `pass_forgot` WHERE name='$name'";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
$result = mysql_fetch_assoc($result_temp);
|
||||||
|
$mail = $result['mail'];
|
||||||
|
if($result['confirm_mail']==null){ $change = true; } else { $change = false; }
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<table width='400px'>
|
||||||
|
<tr>
|
||||||
|
<th align='left'><h2>Informatie</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left'>Ingelogd als:</td><td align='left'><?php echo $name; ?></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left'>Email:</td><td align='left' id='mailholder'><?php echo $mail; ?></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left'>Bevoegdheid:</td><td align='left'><?php if(strlen($_POST['account'])>2){echo 'Leerling';} elseif(strlen($_POST['account'])==2){echo 'Docent';} ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr size='1px' color='#999' width='600px' align='left'>
|
||||||
|
|
||||||
|
<?php if($_SESSION['name']==$_POST['account']){ ?>
|
||||||
|
|
||||||
|
<span id='mailcontainer'>
|
||||||
|
|
||||||
|
<?php if ($change){ ?>
|
||||||
|
<table width='400px' id='table_mail'>
|
||||||
|
<tr>
|
||||||
|
<th align='left' colspan='2'><h2>Email Adres wijzigen</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left' width='200px'>Email Adres:</td><td><form id='mailform' style='display:inline;'><input type='email' name='mail'></form></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th></th><td><button onclick='updateMail();'>Aanpassen</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<table width='400px' id='table_mail'>
|
||||||
|
<tr>
|
||||||
|
<th align='left' colspan='2'><h2>Email Adres bevestigen</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left' colspan='2'>Er is een mail gestuurd naar het opgegeven e-mail adres. <font color='#9E0000'>Let op: Deze mail bevind zich waarschijnlijk in uw junk folder!</font> Klink op de link in de mail of vul de code hier in.</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left' width='200px'>Code:</td><td><form id='confirmmailform' style='display:inline;'><input type='text' name='code' ></form></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th></th><td><button onclick='confirmMail();'>Bevestigen</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<hr size='1px' color='#999' width='600px' align='left'>
|
||||||
|
|
||||||
|
<span id='passcontainer'>
|
||||||
|
|
||||||
|
<table width='400px' id='table_pass'>
|
||||||
|
<tr>
|
||||||
|
<th align='left' colspan='2'><h2>Wachtwoord wijzigen</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left' width='200px'>Oud Wachtwood:</td><td><form id='passform' style='display:inline;'><input type='password' name='oldpass' ></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left'>Nieuw Wachtwoord:</td><td><input type='password' name='pass1' ></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left'>Herhaal Wachtwood:</td><td><input type='password' name='pass2' ></form></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th></th><td><button onclick='updatePass();'>Bevestigen</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<?php } else { ?>
|
||||||
|
<span id='passcontainer'>
|
||||||
|
|
||||||
|
<table width='400px' id='table_pass'>
|
||||||
|
<tr>
|
||||||
|
<th align='left' colspan='2'><h2>Wachtwoord resetten</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<th></th><td><button onclick="resetPass('<?php echo $_POST['account']; ?>')">Reset</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<?php } ?>
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
if ($_SESSION['login']>1) {
|
||||||
|
|
||||||
|
$name = $_POST['bericht'];
|
||||||
|
$query = "SELECT `mail` FROM `pass_forgot` WHERE `name`='$name'";
|
||||||
|
$result_array = mysql_query($query, $connection);
|
||||||
|
$result = mysql_fetch_assoc($result_array);
|
||||||
|
$mail = $result['mail']; ?>
|
||||||
|
|
||||||
|
<form id='berichtform'>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Stuur een bericht naar <input type='text' disabled='disabled' name='mail' value="<?php echo $mail; ?>"> voor <input type='text' disabled='disabled' name='name' value="<?php echo $name; ?>">.</td>
|
||||||
|
</tr>
|
||||||
|
<input type='hidden' name='mail' value="<?php echo $mail; ?>">
|
||||||
|
<input type='hidden' name='name' value="<?php echo $name; ?>">
|
||||||
|
<tr>
|
||||||
|
<td><textarea name='msg' for='berichtform' wrap='soft' cols='70' rows='30' id='textformbericht'>Beste <?php echo $name; ?>,
|
||||||
|
|
||||||
|
[Bericht]
|
||||||
|
|
||||||
|
Groeten,
|
||||||
|
<?php echo $_SESSION['name']; ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align='right'><button type='button' onclick="sendMail()">Versturen</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php } else { echo false; } ?>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
if($_SESSION['login']>1){
|
||||||
|
|
||||||
|
$query = "SELECT `name`, `last_login_ip`, `last_login` FROM `login` WHERE `last_login`!='0000-00-00 00:00:00' ORDER BY `last_login` DESC LIMIT 0,20";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
$table = "<table cellpadding=2 class='bericht'><tr><th width='180' align='left'>Gebruiker</th><th width='220' align='left' class='leftline'>Datum</th><th width='200' align='left' class='leftline'>IP Adres</th></tr>";
|
||||||
|
|
||||||
|
while($result = mysql_fetch_assoc($result_temp)){
|
||||||
|
$table .= "<tr><td>" . $result['name'] . "</td><td class='leftline'>" . $result['last_login'] . "</td><td class='leftline'>" . $result['last_login_ip'] . "</td><tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$table .= "</table>";
|
||||||
|
echo $table;
|
||||||
|
}
|
||||||
|
else { echo false; }
|
||||||
|
?>
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
if($_SESSION['login']<1) {
|
||||||
|
echo false;
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif(isset($_POST['docent']) && $_SESSION['login']>1){
|
||||||
|
|
||||||
|
$soort = 1;
|
||||||
|
$name = reset(explode(',', $_POST['docent']));
|
||||||
|
$query = "SELECT LNR.lesuurnr, LNR.lesuur, vak, lokaal, LES.groep
|
||||||
|
FROM `lessen` AS LES, `lesuurnr` AS LNR
|
||||||
|
WHERE LES.lesuur=LNR.lesuur AND LES.docent = '$name'
|
||||||
|
GROUP BY LNR.lesuur
|
||||||
|
ORDER BY LNR.lesuurnr";
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif(isset($_POST['leerling']) && $_SESSION['login']>0){
|
||||||
|
|
||||||
|
$soort = 2;
|
||||||
|
if($_SESSION['login']==2){
|
||||||
|
$name = reset(explode(',', $_POST['leerling']));
|
||||||
|
}
|
||||||
|
elseif($_SESSION['login']==1){
|
||||||
|
$name = $_SESSION['name'];
|
||||||
|
}
|
||||||
|
$query = "SELECT LNR.lesuurnr, LNR.lesuur, vak, docent, lokaal
|
||||||
|
FROM `adminnr_groep` AS GR, `lessen` AS LES, `lesuurnr` AS LNR
|
||||||
|
WHERE GR.groep=LES.groep AND LES.lesuur=LNR.lesuur AND GR.adminnr = $name
|
||||||
|
GROUP BY LES.lesuur
|
||||||
|
ORDER BY LNR.lesuurnr";
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif(isset($_POST['lokaal']) && $_SESSION['login']>0){
|
||||||
|
|
||||||
|
$soort = 3;
|
||||||
|
$name = reset(explode(',', $_POST['lokaal']));
|
||||||
|
$query = "SELECT LNR.lesuurnr, LNR.lesuur, vak, docent, LES.groep
|
||||||
|
FROM `lessen` AS LES, `lesuurnr` AS LNR
|
||||||
|
WHERE LES.lesuur=LNR.lesuur AND lokaal = '$name'
|
||||||
|
GROUP BY LES.lesuur
|
||||||
|
ORDER BY LNR.lesuurnr";
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif(isset($_POST['groep']) && $_SESSION['login']>1){
|
||||||
|
|
||||||
|
$soort = 4;
|
||||||
|
$name = reset(explode(',', $_POST['groep']));
|
||||||
|
$query = "SELECT LNR.lesuurnr, LNR.lesuur, vak, docent, LES.lokaal
|
||||||
|
FROM `lessen` AS LES, `lesuurnr` AS LNR
|
||||||
|
WHERE LES.lesuur=LNR.lesuur AND groep = '$name'
|
||||||
|
GROUP BY LES.lesuur
|
||||||
|
ORDER BY LNR.lesuurnr";
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif( ( isset($_POST['uur']) || isset($_POST['leeglokaal']) ) && $_SESSION['login']>0){
|
||||||
|
|
||||||
|
$soort = 5;
|
||||||
|
if(isset($_POST['uur'])){
|
||||||
|
$uur = reset(explode(',', $_POST['uur']));
|
||||||
|
$dag = reset(explode(',', $_POST['dag']));
|
||||||
|
$name = $dag . $uur;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dag = substr($_POST['leeglokaal'], 0, 2);
|
||||||
|
$uur = substr($_POST['leeglokaal'], 2, 1);
|
||||||
|
$name = $_POST['leeglokaal'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT DISTINCT (`lokaal`)
|
||||||
|
FROM `lessen` AS LES
|
||||||
|
WHERE LES.lesuur = '$name'";
|
||||||
|
|
||||||
|
$query2 = "SELECT DISTINCT (`lokaal`)
|
||||||
|
FROM `lessen`";
|
||||||
|
|
||||||
|
mysql_query("SET SQL_BIG_SELECTS=1", $connection) or die("An Error Occured 1");
|
||||||
|
$result_temp = mysql_query($query, $connection) or die("An Error Occured 2");
|
||||||
|
$result_temp2 = mysql_query($query2, $connection) or die("An Error Occured 3");
|
||||||
|
|
||||||
|
while($result2 = mysql_fetch_array($result_temp2)){
|
||||||
|
$lok_alle[] = $result2['lokaal'];
|
||||||
|
}
|
||||||
|
|
||||||
|
while($result = mysql_fetch_array($result_temp)){
|
||||||
|
$lok_vrij[] = $result['lokaal'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$lokalen_temp = array_diff($lok_alle, $lok_vrij);
|
||||||
|
$lokalen = array_filter($lokalen_temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
echo false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( $soort>=1 && $soort <=4 ){
|
||||||
|
|
||||||
|
mysql_query("SET SQL_BIG_SELECTS=1", $connection) or die("Er is een fout opgetreden bij het ophalen van het rooster (q1)");
|
||||||
|
$result_temp = mysql_query($query, $connection) or die("Er is een fout opgetreden bij het ophalen van het rooster (q2)");
|
||||||
|
|
||||||
|
$uur = 1;
|
||||||
|
while($result = mysql_fetch_array($result_temp)){
|
||||||
|
while ($uur < $result['lesuurnr']){
|
||||||
|
$rooster[$uur] = '<td class="vrij content"> </td>';
|
||||||
|
$uur++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($soort==1){
|
||||||
|
$rooster[$uur] = '<td class="les content">' . $result['vak'] . '<br><a href="javascript:setPageValue(\'lokaal/' . $result['lokaal'] . '\')">' . $result['lokaal'] . '</a><br><a href="javascript:setPageValue(\'groep/' . $result['groep'] . '\')">' . $result['groep'] . '</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($soort==2){
|
||||||
|
$rooster[$uur] = '<td class="les content">' . $result['vak'] . '<br><a href="javascript:setPageValue(\'lokaal/' . $result['lokaal'] . '\')">' . $result['lokaal'] . '</a><br><a href="javascript:setPageValue(\'docent/' . $result['docent'] . '\')">' . $result['docent'] . '</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($soort==3){
|
||||||
|
$rooster[$uur] = '<td class="les content">' . $result['vak'] . '<br><a href="javascript:setPageValue(\'groep/' . $result['groep'] . '\')">' . $result['groep'] . '</a><br><a href="javascript:setPageValue(\'docent/' . $result['docent'] . '\')">' . $result['docent'] . '</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($soort==4){
|
||||||
|
$rooster[$uur] = '<td class="les content">' . $result['vak'] . '<br><a href="javascript:setPageValue(\'lokaal/' . $result['lokaal'] . '\')">' . $result['lokaal'] . '</a><br><a href="javascript:setPageValue(\'docent/' . $result['docent'] . '\')">' . $result['docent'] . '</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$uur++;
|
||||||
|
}
|
||||||
|
while($uur <= 40){
|
||||||
|
$rooster[$uur] = '<td class="vrij content"> </td>';
|
||||||
|
$uur++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(($soort==1 || $soort==2) && $_SESSION['login']>1){
|
||||||
|
echo "Het rooster voor <a href='javascript: return false;' onclick=setPageValue('account/$name')>" . $name . "</a>";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo 'Het rooster voor ' . $name;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table class='rooster' cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td class='corner header'></td><td class='dag header'>Maandag</td><td class='dag header'>Dinsdag</td><td class='dag header'>Woensdag</td><td class='dag header'>Donderdag</td><td class='dag header'>Vrijdag</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>1</td>
|
||||||
|
<?php echo $rooster[1] . $rooster[9] . $rooster[17] . $rooster[25] . $rooster[33]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>2</td>
|
||||||
|
<?php echo $rooster[2] . $rooster[10] . $rooster[18] . $rooster[26] . $rooster[34]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>3</td>
|
||||||
|
<?php echo $rooster[3] . $rooster[11] . $rooster[19] . $rooster[27] . $rooster[35]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>4</td>
|
||||||
|
<?php echo $rooster[4] . $rooster[12] . $rooster[20] . $rooster[28] . $rooster[36]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>5</td>
|
||||||
|
<?php echo $rooster[5] . $rooster[13] . $rooster[21] . $rooster[29] . $rooster[37]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>6</td>
|
||||||
|
<?php echo $rooster[6] . $rooster[14] . $rooster[22] . $rooster[30] . $rooster[38]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>7</td>
|
||||||
|
<?php echo $rooster[7] . $rooster[15] . $rooster[23] . $rooster[31] . $rooster[39]; ?>
|
||||||
|
</tr><tr>
|
||||||
|
<td class='uur header'>8</td>
|
||||||
|
<?php echo $rooster[8] . $rooster[16] . $rooster[24] . $rooster[32] . $rooster[40]; ?>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
elseif($soort == 5){ ?>
|
||||||
|
<h3>De volgende lokalen zijn op <?php echo $dag; ?> het <?php echo $uur; ?>e uur vrij:</h3><br>
|
||||||
|
|
||||||
|
<table width='600px'>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$i = 1;
|
||||||
|
foreach ($lokalen as $key => $value) {
|
||||||
|
echo '<td><a href="javascript:setPageValue(\'lokaal/' . $value . '\')">' . $value . '</a></td>';
|
||||||
|
if($i%8==0){echo "</tr><tr>"; }
|
||||||
|
$i++;
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
</tr></table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo false;
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$name = $_SESSION['name'];
|
||||||
|
|
||||||
|
if($_SESSION['login']>1){
|
||||||
|
|
||||||
|
$query = "SELECT * FROM `bericht` WHERE `sender`='$name' ORDER BY id DESC LIMIT 0,20";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
$table = "<table cellpadding=2 class='bericht'><tr><th width='100' align='left'>Ontvanger</th><th width='300' align='left' class='leftline'>Bericht</th><th width='200' align='left' class='leftline'>Datum</th></tr>";
|
||||||
|
|
||||||
|
while($result = mysql_fetch_assoc($result_temp)){
|
||||||
|
$table .= "<tr><td>" . $result['receiver'] . "</td><td class='leftline'>" . $result['msg'] . "</td><td class='leftline'>" . $result['send_time'] . "</td><tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$table .= "</table>";
|
||||||
|
echo $table;
|
||||||
|
}
|
||||||
|
else { echo false; }
|
||||||
|
?>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$name = $_POST['name'];
|
||||||
|
$pass = $_POST['pass'];
|
||||||
|
|
||||||
|
//Create error link
|
||||||
|
$error = 0;
|
||||||
|
$link = '../login/?username=' . $name;
|
||||||
|
if($name==''){ $link .= '&nf=1'; $error=1; }
|
||||||
|
if($pass==''){ $link .= '&pf=1'; $error=1;}
|
||||||
|
if($error==1){ header("Location: $link"); }
|
||||||
|
|
||||||
|
$query = "SELECT * FROM login AS L, pass_forgot AS P WHERE P.name=L.name AND L.name='$name'";
|
||||||
|
$result_query = mysql_query($query, $connection);
|
||||||
|
if(mysql_num_rows($result_query) != 1){ $link .= '&nf=1'; header("Location: $link"); }
|
||||||
|
|
||||||
|
while($result = mysql_fetch_assoc($result_query)){
|
||||||
|
$hash = $result['pass'];
|
||||||
|
if (crypt($pass, $hash) == $hash) {
|
||||||
|
$_SESSION['login'] = $result['perms'];
|
||||||
|
$_SESSION['name'] = $name;
|
||||||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
$query2 = "UPDATE `login` SET last_login = NOW() + INTERVAL 6 HOUR, last_login_ip = '$ip' WHERE name='$name'";
|
||||||
|
mysql_query($query2, $connection) or die("Error database update");
|
||||||
|
|
||||||
|
if($result['pass_forgot']==1){header("Location: ../login/forgot/reset"); $_SESSION['pass']=1;}
|
||||||
|
if($result['mail']==NULL && $result['mail_new']==NULL){header("Location: ../mail"); $_SESSION['mail']=1;}
|
||||||
|
elseif($result['confirm_mail']!=NULL){header("Location: ../mail/confirm"); $_SESSION['confirm']=1;}
|
||||||
|
|
||||||
|
else{
|
||||||
|
if($result['perms']==1){
|
||||||
|
header("Location: ../?page=leerling/$name");
|
||||||
|
}
|
||||||
|
elseif($result['perms']==2) {
|
||||||
|
header("Location: ../?page=docent/$name");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$link .= '&pf=1';
|
||||||
|
header("Location: $link");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
if(SESSION_DESTROY()){
|
||||||
|
header('Location: /login/');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
header('Location: /');
|
||||||
|
}
|
||||||
|
?>
|
||||||
+122
@@ -0,0 +1,122 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$name = $_POST['input'];
|
||||||
|
$return = null;
|
||||||
|
|
||||||
|
//Te Kort
|
||||||
|
if(strlen($name)<1){
|
||||||
|
die("Type om te zoeken");
|
||||||
|
}
|
||||||
|
|
||||||
|
//Leerling Nummer
|
||||||
|
elseif(is_numeric($name)){
|
||||||
|
if($_SESSION['login']==2){
|
||||||
|
$query = "SELECT DISTINCT `adminnr`, `voornaam`, `tussenvoegsel`, `achternaam` FROM `adminnr_naam` WHERE `adminnr` LIKE '%$name%' ORDER BY `adminnr` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('leerling/" . $result['adminnr'] . "');toggle();> <font color='#31314D'>Leerling</font> - " . $result['voornaam'] . " " . $result['tussenvoegsel'] . " " . $result['achternaam'] . " (" . $result['adminnr'] . ")</a><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($name)<=6){
|
||||||
|
$query = "SELECT DISTINCT `groep` FROM `adminnr_groep` WHERE `groep` LIKE '%$name%' ORDER BY `groep` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('groep/" . $result['groep'] . "');toggle();> <font color='#3A4D31'>Groep</font> - " . $result['groep'] . "</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($name)<=3){
|
||||||
|
$query = "SELECT DISTINCT `lokaal` FROM `lessen` WHERE `lokaal` LIKE '%$name' ORDER BY `lokaal` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('lokaal/" . $result['lokaal'] . "');toggle();> <font color='#4C314D'>Lokaal</font> - " . $result['lokaal'] . "</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Voornaam, Achternaam of Docentnaam
|
||||||
|
else{
|
||||||
|
|
||||||
|
//Docentnaam
|
||||||
|
if(strlen($name)<=2 && $_SESSION['login']==2){
|
||||||
|
$query = "SELECT DISTINCT `docent` FROM `lessen` WHERE `docent` LIKE '$name%' ORDER BY `docent` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('docent/" . $result['docent'] . "');toggle();><font color='#4D3131'>Docent</font> - " . $result['docent'] . "</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Lokaal
|
||||||
|
if (strlen($name)<=3){
|
||||||
|
$query = "SELECT DISTINCT `lokaal` FROM `lessen` WHERE `lokaal` LIKE '$name%' ORDER BY `lokaal` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('lokaal/" . $result['lokaal'] . "');toggle();> <font color='#4C314D'>Lokaal</font> - " . $result['lokaal'] . "</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Voornaam of achternaam
|
||||||
|
if(!strpos($name, ' ') && $_SESSION['login']==2){
|
||||||
|
$query = "SELECT DISTINCT `adminnr`, `voornaam`, `tussenvoegsel`, `achternaam` FROM `adminnr_naam` WHERE `voornaam` LIKE '$name%' OR `achternaam` LIKE '$name%' ORDER BY `adminnr` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('leerling/" . $result['adminnr'] . "');toggle();> <font color='#31314D'>Leerling</font> - " . $result['voornaam'] . " " . $result['tussenvoegsel'] . " " . $result['achternaam'] . " (" . $result['adminnr'] . ")</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Voornaam en achternaam
|
||||||
|
elseif(strpos($name, ' ') && $_SESSION['login']==2){
|
||||||
|
$array = explode(' ', $name);
|
||||||
|
$voornaam = $array[0];
|
||||||
|
if(count($array)==2){
|
||||||
|
$achternaam = $array[1];
|
||||||
|
$tussenvoegsel = $array[1];
|
||||||
|
}
|
||||||
|
elseif(count($array)==3){
|
||||||
|
$achternaam = $array[2];
|
||||||
|
$tussenvoegsel = $array[1];
|
||||||
|
}
|
||||||
|
elseif(count($array)==4){
|
||||||
|
$achternaam = $array[3];
|
||||||
|
$tussenvoegsel = $array[1] . ' ' . $array[2];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$achternaam = end($array);
|
||||||
|
$tussenvoegsel = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT DISTINCT `adminnr`, `voornaam`, `tussenvoegsel`, `achternaam` FROM `adminnr_naam` WHERE `voornaam` LIKE '$voornaam%' AND (`achternaam` LIKE '$achternaam%' OR `tussenvoegsel` LIKE '$tussenvoegsel%') ORDER BY `adminnr` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('leerling/" . $result['adminnr'] . "');toggle();> <font color='#31314D'>Leerling</font> - " . $result['voornaam'] . " " . $result['tussenvoegsel'] . " " . $result['achternaam'] . " (" . $result['adminnr'] . ")</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($name)<=6 && $_SESSION['login']==2){
|
||||||
|
$query = "SELECT DISTINCT `groep` FROM `adminnr_groep` WHERE `groep` LIKE '%$name%' ORDER BY `groep` LIMIT 0,10";
|
||||||
|
$result_temp = mysql_query($query, $connection);
|
||||||
|
|
||||||
|
while ($result = mysql_fetch_assoc($result_temp)) {
|
||||||
|
$return .= "<a href='javascript:return false;' onclick=setPageValue('groep/" . $result['groep'] . "');toggle();> <font color='#3A4D31'>Groep</font> - " . $result['groep'] . "</a><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_null($return)){
|
||||||
|
echo "Er zijn helaas geen resultaten gevonden.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
if($_SESSION['login']>1){
|
||||||
|
$receiver = $_POST['name'];
|
||||||
|
$sender = $_SESSION['name'];
|
||||||
|
$mail = $_POST['mail'];
|
||||||
|
$msg = $_POST['msg'];
|
||||||
|
|
||||||
|
$msg2 = mysql_real_escape_string($msg, $connection);
|
||||||
|
|
||||||
|
$query = "INSERT INTO `bericht` (`sender`, `receiver`, `msg`, `send_time`) VALUES ('$sender', '$receiver', '$msg2', NOW() + INTERVAL 6 HOUR)";
|
||||||
|
mysql_query($query, $connection) or die('Error 1');
|
||||||
|
|
||||||
|
$headers = "From: Sondervick College <docent@kennyboy.nl>";
|
||||||
|
$msg .= "\n\n___________________________________\nOp dit bericht kan niet gereageerd worden.";
|
||||||
|
|
||||||
|
mail($mail, 'Sondervick Bericht', $msg, $headers) or die("Error 2");
|
||||||
|
|
||||||
|
echo "Het bericht is succesvol verzonden";
|
||||||
|
}
|
||||||
|
else { echo false; }
|
||||||
|
?>
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
$name = $_SESSION['name'];
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$mail = $_POST['mail'];
|
||||||
|
|
||||||
|
if(!filter_var($mail, FILTER_VALIDATE_EMAIL)){
|
||||||
|
header("Location: ../mail/?mf=1");
|
||||||
|
}
|
||||||
|
|
||||||
|
$characters = '123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ?!';
|
||||||
|
$code = '';
|
||||||
|
for ($i = 0; $i < 12; $i++) {
|
||||||
|
$code .= $characters[rand(0, strlen($characters) - 1)];
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "UPDATE `pass_forgot` SET `mail_new`='$mail', `confirm_mail`='$code' WHERE `name`='$name'";
|
||||||
|
mysql_query($query, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
$headers = "From: Sondervick College <rooster@kennyboy.nl>\r\n";
|
||||||
|
$headers .= "Content-Type: text/html";
|
||||||
|
|
||||||
|
$message = "<html><body>Beste $name,<br><br>Om uw e-mail adres te activeren klikt u op de onderstaande link:<br><a href='http://localhost:8080/php/confirmMail.php?code=$code'>Bevestigen</a>";
|
||||||
|
$message .= "<br><br> of u vult deze code in op de website:<br><h3>$code</h3></body></html>";
|
||||||
|
|
||||||
|
mail($mail, 'Sondervick Bevestiging', $message, $headers) or die("Error");
|
||||||
|
|
||||||
|
$_SESSION['mail']=0;
|
||||||
|
$_SESSION['confirm']=1;
|
||||||
|
header("Location: ../mail/confirm/");
|
||||||
|
?>
|
||||||
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
require('connect.php');
|
||||||
|
require('pass.php');
|
||||||
|
|
||||||
|
$name = $_POST['name'];
|
||||||
|
|
||||||
|
$query = "SELECT * FROM `pass_forgot` WHERE `name`='$name'";
|
||||||
|
$result_temp = mysql_query($query, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
if(mysql_num_rows($result_temp)<1){ header("Location: ../login/forgot/?nouser=1"); }
|
||||||
|
else{
|
||||||
|
$result = mysql_fetch_assoc($result_temp);
|
||||||
|
$mail = $result['mail'];
|
||||||
|
|
||||||
|
if(!strlen($mail)>0){
|
||||||
|
$query = "UPDATE `pass_forgot` SET `pass_forgot`='1' WHERE `name`='$name'";
|
||||||
|
mysql_query($query, $connection) or die('Er is een fout opgetreden');
|
||||||
|
header("Location: ../login/forgot/?nomail=1");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$characters = '123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ';
|
||||||
|
$pass = '';
|
||||||
|
for ($i = 0; $i < 10; $i++) {
|
||||||
|
$pass .= $characters[rand(0, strlen($characters) - 1)];
|
||||||
|
}
|
||||||
|
$pass_hash = password_hash($pass, PASSWORD_BCRYPT);
|
||||||
|
|
||||||
|
$query = "UPDATE `login` SET pass='$pass_hash' WHERE `name`='$name'";
|
||||||
|
mysql_query($query, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
$query2 = "UPDATE `pass_forgot` SET `pass_forgot`='1' WHERE `name`='$name'";
|
||||||
|
mysql_query($query2, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
$headers = "From: Sondervick College <rooster@kennyboy.nl>\r\n";
|
||||||
|
$headers .= "Content-Type: text/html";
|
||||||
|
|
||||||
|
$message = "<html><body>Beste $name,<br><br>Uw wachtwoord is gewijzigd.<br>Uw nieuwe wachtwoord is nu:<h3>$pass</h3><br><br>De eerst volgende keer dat u inlogt zal u gevraagd worden uw wachtwoord te wijzigen.</body></html>";
|
||||||
|
|
||||||
|
mail($mail, 'Sondervick Wachtwoord', $message, $headers) or die("Error");
|
||||||
|
header("Location: ../login/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require('connect.php');
|
||||||
|
require('pass.php');
|
||||||
|
|
||||||
|
if($_SESSION['login']<2){
|
||||||
|
die('Geen toegang');
|
||||||
|
}
|
||||||
|
|
||||||
|
$name = $_POST['naam'];
|
||||||
|
|
||||||
|
$characters = '123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ';
|
||||||
|
$pass = '';
|
||||||
|
for ($i = 0; $i < 6; $i++) {
|
||||||
|
$pass .= $characters[rand(0, strlen($characters) - 1)];
|
||||||
|
}
|
||||||
|
|
||||||
|
$pass_hash = password_hash($pass, PASSWORD_BCRYPT);
|
||||||
|
|
||||||
|
$query = "UPDATE `login` SET pass='$pass_hash' WHERE `name`='$name'";
|
||||||
|
mysql_query($query, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
$query2 = "UPDATE `pass_forgot` SET `pass_forgot`=1 WHERE `name`='$name'";
|
||||||
|
mysql_query($query2, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
echo "Het nieuwe tijdelijke wachtwoord is <b>$pass</b>";
|
||||||
|
?>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
SESSION_START();
|
||||||
|
require('connect.php');
|
||||||
|
|
||||||
|
$name = $_SESSION['name'];
|
||||||
|
$mail = $_POST['mail'];
|
||||||
|
|
||||||
|
if(!filter_var($mail, FILTER_VALIDATE_EMAIL)){
|
||||||
|
die("Er is een fout opgetreden, herlaad de pagina aub.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$characters = '123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ?!';
|
||||||
|
$code = '';
|
||||||
|
for ($i = 0; $i < 12; $i++) {
|
||||||
|
$code .= $characters[rand(0, strlen($characters) - 1)];
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "UPDATE `pass_forgot` SET `mail_new`='$mail', `confirm_mail`='$code' WHERE `name`='$name'";
|
||||||
|
mysql_query($query, $connection) or die('Er is een fout opgetreden');
|
||||||
|
|
||||||
|
$headers = "From: Sondervick College <rooster@kennyboy.nl>\r\n";
|
||||||
|
$headers .= "Content-Type: text/html";
|
||||||
|
|
||||||
|
$message = "<html><body>Beste $name,<br><br>Om uw e-mail adres te bevestigen klikt u op de onderstaande link:<br><a href='http://localhost:8080/php/confirmMail.php?code=$code'>Bevestigen</a>";
|
||||||
|
$message .= "<br><br> of u vult deze code in op de website:<br><h3>$code</h3></body></html>";
|
||||||
|
|
||||||
|
mail($mail, 'Sondervick Bevestiging', $message, $headers) or die("Error");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table width='400px' id='table_mail'>
|
||||||
|
<tr>
|
||||||
|
<th align='left' colspan='2'><h2>Email Adres bevestigen</h2></th>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left' colspan='2'>Er is een mail gestuurd naar het opgegeven e-mail adres. <font color='#9E0000'>Let op: Deze mail bevind zich waarschijnlijk in uw junk folder!</font> Klink op de link in de mail of vul de code hier in.</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align='left' width='200px'>Code:</td><td><form id='confirmmailform' style='display:inline;'><input type='text' name='code' ></form></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th></th><td><button onclick='confirmMail();'>Bevestigen</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require('connect.php');
|
||||||
|
require('pass.php');
|
||||||
|
|
||||||
|
$oldpass = $_POST['oldpass'];
|
||||||
|
$pass1 = $_POST['pass1'];
|
||||||
|
$pass2 = $_POST['pass2'];
|
||||||
|
$name = $_SESSION['name'];
|
||||||
|
|
||||||
|
|
||||||
|
if($oldpass=='' || $pass1=='' || $pass2==''){
|
||||||
|
die('Vul all velden in');
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT * FROM login WHERE name='$name'";
|
||||||
|
$result_query = mysql_query($query, $connection) or die("Er is een fout opgetreden");
|
||||||
|
|
||||||
|
while($result = mysql_fetch_assoc($result_query)){
|
||||||
|
$hash = $result['pass'];
|
||||||
|
if (password_verify($oldpass, $hash)) {
|
||||||
|
if ($pass1 === $pass2){
|
||||||
|
$pass = password_hash($pass1, PASSWORD_BCRYPT);
|
||||||
|
mysql_query("UPDATE login SET pass='$pass' WHERE name='$name'", $connection);
|
||||||
|
echo 'Uw wachtwoord is succesvol gewijzigd';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
die('Wachtwoorden komen niet overeen');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
die('Wachtwoord fout');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require('connect.php');
|
||||||
|
require('pass.php');
|
||||||
|
|
||||||
|
if($_SESSION['pass']==0){
|
||||||
|
header('Location: ../');
|
||||||
|
}
|
||||||
|
|
||||||
|
$pass1 = $_POST['pass1'];
|
||||||
|
$pass2 = $_POST['pass2'];
|
||||||
|
$name = $_SESSION['name'];
|
||||||
|
|
||||||
|
if($pass1=='' || $pass2==''){
|
||||||
|
header('Location: ../login/forgot/reset?nomatch=1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pass1 === $pass2){
|
||||||
|
$pass = password_hash($pass1, PASSWORD_BCRYPT);
|
||||||
|
mysql_query("UPDATE login SET pass='$pass' WHERE name='$name'", $connection);
|
||||||
|
mysql_query("UPDATE pass_forgot SET pass_forgot='0' WHERE name='$name'", $connection);
|
||||||
|
$_SESSION['pass']=0;
|
||||||
|
if(strlen($name)==2){
|
||||||
|
header("Location: ../?page=docent/$name");
|
||||||
|
}
|
||||||
|
elseif(strlen($name)>2){
|
||||||
|
header("Location: ../?page=leerling/$name");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header('Location: ../login/forgot/reset?nomatch=1');
|
||||||
|
}
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user