created coach site

This commit is contained in:
Ricsi
2017-04-22 20:01:23 +02:00
parent acfa06e40a
commit 04beae7eca
16 changed files with 287 additions and 55 deletions

View File

@@ -1,16 +1,23 @@
<?php
if ($from == 'coach') {
if ($from == 'admin') {
$log_c = 'admin_logout';
$cookie = 'admin';
}
elseif ($from == 'parent') {
elseif ($from == 'view') {
$log_c = 'kid_logout';
$cookie = 'parent';
}
log::register($log_c, $_COOKIE['badminton_'.$from.'_user']);
elseif ($from == 'coach') {
$log_c = 'coach_logout';
$cookie = 'coach';
}
log::register($log_c, $_COOKIE['badminton_'.$cookie.'_user']);
setcookie('badminton_'.$from.'_user', 'null', time()-60*60*72, '/');
unset($_COOKIE['badminton_'.$from.'_user']);
header('Location: http://' . $_SERVER['HTTP_HOST']);
unset($_COOKIE['badminton_'.$cookie.'_user']);
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/' . $from);
?>