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

UCC git Repository :: git.ucc.asn.au