... |
|
Ik zou graag willen controleren of een session al bestaat of niet.
Als deze nog niet bestaat, dan moet de redirect in werking treden.
Ik heb het volgende al, maar dat doet niets.
<?php
if(isset($SESSION['security_session'])){
echo "<script language=JavaScript>alert('Je bent nog niet ingelogd.\nLog je eerst in op de site aub.');</script>";
header('Location: http://www.chat2me.be/');
exit();
}
?>
<?php if(isset($SESSION['security_session'])){ echo "<script language=JavaScript>alert('Je bent nog niet ingelogd.\nLog je eerst in op de site aub.');</script>"; header('Location: http://www.chat2me.be/'); } ?>
Dit is de volledige pagina:
<?php
if(isset($SESSION['security_session'])){
echo "<script language=JavaScript>alert('Je bent nog niet ingelogd.\nLog je eerst in op de site aub.');</script>";
header('Location: http://www.chat2me.be/');
exit();
}
?>
<?php
require_once '../../../common/server/php/settings.php';
require_once '../../../common/server/php/core/core.php';
$roomId = (isset($_GET["roomId"])) ? $_GET["roomId"] : "";
$uid = (isset($_GET["uid"])) ? $_GET["uid"] : "";
$langId = (isset($_GET["langId"])) ? $_GET["langId"] : "";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CHAT2ME - De Nederlandstalige Community</title>
<script language="javascript" src="<?php echo FLASHCOMS_HTTP_ROOT; ?>common/js/flashcoms.js"></script>
</head>
<body style="margin:0px;">
<?php
renderApplication("videochat", array("roomId"=> $roomId, "uid" => $uid, "langId" => $langId));
?>
</body>
</html>
<?php if(isset($SESSION['security_session'])){ echo "<script language=JavaScript>alert('Je bent nog niet ingelogd.\nLog je eerst in op de site aub.');</script>"; header('Location: http://www.chat2me.be/'); } ?> <?php require_once '../../../common/server/php/settings.php'; require_once '../../../common/server/php/core/core.php'; $roomId = (isset($_GET["roomId"])) ? $_GET["roomId"] : ""; $uid = (isset($_GET["uid"])) ? $_GET["uid"] : ""; $langId = (isset($_GET["langId"])) ? $_GET["langId"] : ""; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>CHAT2ME - De Nederlandstalige Community</title> <script language="javascript" src=" <?php echo FLASHCOMS_HTTP_ROOT ; ?>common/js/flashcoms.js"></script> </head> <body style="margin:0px;"> <?php renderApplication ("videochat", array("roomId"=> $roomId, "uid" => $uid, "langId" => $langId));?> </body> </html>
|