logout.php (504B)
1 <?php 2 /* 3 UserCake Version: 2.0.2 4 http://usercake.com 5 */ 6 7 require_once("models/config.php"); 8 if (!securePage($_SERVER['PHP_SELF'])){die();} 9 10 //Log the user out 11 if(isUserLoggedIn()) 12 { 13 $loggedInUser->userLogOut(); 14 } 15 16 if(!empty($websiteUrl)) 17 { 18 $add_http = ""; 19 20 if(strpos($websiteUrl,"http://") === false) 21 { 22 $add_http = "http://"; 23 } 24 25 header("Location: ".$add_http.$websiteUrl); 26 die(); 27 } 28 else 29 { 30 header("Location: http://".$_SERVER['HTTP_HOST']); 31 die(); 32 } 33 34 ?> 35