www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

locations.inc (720B)


      1 <?php
      2 
      3 $location_list['download'] = "download.php";
      4 $location_list['index'] = "index.php";
      5 $location_list['contact'] = "contact.php";
      6 $location_list['createGame'] = "createGame.php";
      7 $location_list['login'] = "login.php";
      8 $location_list['signup'] = "signup.php";
      9 $location_list['createGame'] = 'createGame.php';
     10 
     11 function return_to($location, $params = "") {
     12 	global $location_list;
     13 
     14 	if (array_key_exists($location,$location_list))
     15 		header("location:".$location_list[$location].$params);
     16 	else
     17 		header("location:index.php?showmsg=err_index_redirect");
     18 }
     19 
     20 function get_location() {
     21 	if(isset($_GET['return']) && preg_match('/^[a-zA-Z0-9_]*$/', $_GET['return']))
     22 		return $_GET['return'];
     23 	else
     24 		return "index";
     25 }
     26 
     27 ?>