예제 #1
0
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new KidSession();
     }
     return self::$instance;
 }
예제 #2
0
<!DOCTYPE html>
<?php 
KidSession::getInstance();
?>
<html>
<head>
<meta charset='utf-8'>
<title>Scalatetrack</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
	<header>
		<img src="img/scalatekidsLogocs.png" alt="">
		<h1>ScalateTrack</h1>
	</header>
	<div class="content">
		<nav>
			<ul>
				<li <?php 
if ($_SERVER['REQUEST_URI'] == '/scalatetrack') {
    echo 'class="active"';
}
?>
>
					<a href='/scalatetrack'><img src="img/scalatekidsLogocs.png" alt=""> Home</a>
				</li>
				<?php 
if (isset($_SESSION['logged'])) {
    ?>
				<li <?php 
    if (preg_match('/\\/\\?controller=requirements/i', $_SERVER['REQUEST_URI'])) {
예제 #3
0
 public function logout()
 {
     $session = KidSession::getInstance();
     $session->destroy();
     header('Location:/scalatetrack');
 }