<?php
// Persists a variable accross multiple page
// refresh instances, used when you create
// a stand-along builder update detail page

// #RETURNS#
// Variable: $id
// Token: ${id} 

session_start ();

// VARS - Fill in to match your page

 // the name of the variable as in detail.php?id=
$get_var_name = 'id';

// The page to go to if the var is not set
$fail_page = 'index.php';

// DO NOT EDIT BELOW
if (! isset ( $_GET ["{$get_var_name}"] ) && ! isset ( $_SESSION ["{$get_var_name}"] )) {
	header ( "Location: {$fail_page}" );
} else {
	
	if (isset ( $_GET ["{$get_var_name}"] )) {
		$id = $_GET ["{$get_var_name}"];
		
		$_SESSION ["{$get_var_name}"] = $id;
	}
	if (isset ( $_SESSION [$get_var_name] )) {
		$id = $_SESSION ["{$get_var_name}"];
	}
}
?>