- Function LoggedIn() { // TRUE or FALSE method for checking is person exists and is active.
- $Query = @Mysql_Query("SELECT User,Password FROM `members` WHERE User='".$_SESSION['User']."' AND password='".$_SESSION['Password']."' LIMIT 1");
- $dbQ = mysql_fetch_object($Query);
- // For ipcheck
- $ip = $_SERVER["REMOTE_ADDR"];
- $ipc = $_SESSION['IP'];
- If(Mysql_Num_Rows($Query) == 1){
- return TRUE;
- } ElseIf($ip == $ipc) {
- return TRUE;
- } Else {
- return FALSE;
- }
- }
- Function LogInCheck() { // Put LogInCheck(); on every page that you want to close for members (like signup, activate)
- If(LoggedIn() != TRUE){
- Top("Error");
- echo "U bent al ingelogd. U wordt teruggestuurd naar de index pagina.";
- Bottom();
- echo '<meta http-equiv="refresh" content="5;url=index.php">';
- exit();
- }
- }
- Function LogInCheckElse() {
- If(LoggedIn()){
- Top("Error");
- echo "U bent al ingelogd. U wordt teruggestuurd naar de index pagina.";
- Bottom();
- echo '<meta http-equiv="refresh" content="5;url=index.php">';
- exit();
- }
- }
Sletjes
By: Hoer | Date: Aug 1 2007 19:20 | Format: None | Expires: never | Size: 1.09 KB | Hits: 1282
Latest pastes
1 days ago
1 days ago
11 months ago
13 months ago
17 months ago