<?Lassoscript
// Last modified 7/23/09 by ECL, Landmann InterActive

// FUNCTIONALITY
// Setup delete functions

// CHANGE NOTES
// 11/23/07
// Recoded for CMS v. 3.0
// 11/29/07
// Moving login check to kill session before navbar is displayed
// 4/30/08
// Added LI_CMSatend at bottom of page to set focus to login box
// 5/20/08
// Recoded URL Links
// 7/23/09
// Added Robot Check

Include:'/siteconfig.lasso';

// Robot check
Include:($svLibsPath)'robotcheck.inc';

// Start the Admin session
Session_Start: -Name=$svSessionAdminName, -Expires=$svSessionTimeout;

// Convert action_params
Var:'vDataType' = (Action_Param:'DataType');

// Page head
Include:($svLibsPath)'page_header_admin.inc';

// Debugging
// Var:'svDebug' = 'Y';

If: $svDebug == 'Y';
	'<p class="debug"><strong>/admin/setup_deleteresponse</strong><br>\n';
	'39: vDataType = ' ($vDataType) '</p>\n';
/If;
?>
<table width="780">
	<tr>
		<td width="170">
			[Include:($svLibsPath)'navbar_main.inc']
		</td>
		<td>
			<div class="contentcontainerwhite">
<?Lassoscript
// Security check
// If privs wrong, display generate error 6004 "Access Restricted" and login form
If: (Var:'svUserPrivs_Priv') == 'Superadmin' || (Var:'svUserPrivs_Priv') == 'Admin';

	If: $vDataType == 'User';
		Include:'/admin/setup_deleteresponse.inc';

	// If wrong parameter passed, end the session, set error to 6004 "Access Restricted" redirect to login
	Else;

		Session_End: -Name=$svSessionAdminName;
		Var:'svUser_ID' = '';
		Var:'svUserLoginID' = '';
		Var:'svUserPrivs_Priv' = '';

		Var:'vError' = '6004';
		LI_URLRedirect: -Page='login.lasso',-UseError='Y',-Error=$vError;
	/If;

Else;

	// Set error to 6003 "Session Expired", redirect to login
	Var:'vError' = '6003';
	LI_URLRedirect: -Page='login.lasso',-UseError='Y',-Error=$vError;

/If;
?>
			</div>
		</td>
	</tr>
</table>
[Include:($svIncludesPath)'build_footer.inc']
[OutputFooter]
</body>
[LI_CMSatend]
</html>
