Exemplo n.º 1
0
	$include_filename = 'dashboard.php';
}

// if a login needs doing, do it
$login_message = "Log In";
if (isset($_POST['login'])) {
	$login_request = new CASHRequest(
		array(
			'cash_request_type' => 'system', 
			'cash_action' => 'validateadminlogin',
			'address' => $_POST['address'], 
			'password' => $_POST['password']
		)
	);
	if ($login_request->response['payload'] !== false) {
		$admin_primary_cash_request->sessionSetPersistent('cash_actual_user',$login_request->response['payload']);
		$admin_primary_cash_request->sessionSetPersistent('cash_effective_user',$login_request->response['payload']);
		$admin_primary_cash_request->sessionSetPersistent('cash_effective_user_email',$_POST['address']);
		if ($include_filename == 'logout.php') {
			header('Location: ' . ADMIN_WWW_BASE_PATH);
			exit;
		}
	} else {
		$admin_primary_cash_request->sessionClearAllPersistent();
		$login_message = "Try Again";
	}
}

// finally, output the template and page-specific markup (checking for current login)
if ($admin_primary_cash_request->sessionGetPersistent('cash_actual_user')) {
	include_once(ADMIN_BASE_PATH.'/components/helpers.php');