<?php
	$topdir = '..';
	require $topdir."/dacode.php3";

	$session = LoadClass('Session');
	$html = LoadClass('Html');
	$user = LoadClass('User');
	$sidebox = LoadClass('Sidebox');

	$a = (isset($HTTP_GET_VARS['a'])?$HTTP_GET_VARS['a']:"");
	$user_id = (isset($HTTP_GET_VARS["user_id"])?$HTTP_GET_VARS["user_id"]:"");
	$table = (isset($HTTP_POST_VARS['table'])?$HTTP_POST_VARS['table']:"");
	switch($a) {
		case "cs":
			$title = lecho("Close your Session");
			$text = $session->close($a);
			break;
		case "rp":
			$title = lecho("Receive Password");
			$text = $user->show_forget();
			break;
		case "mu":
			$title = lecho("Preferences");
			$text = $user->print_setting();
			break;
		case "na":
			$title = lecho("New Account");
			$text = $user->create_account($table);
			break;
		case "vu":
			$title = lecho("User Informations");
			$text = $user->get_info($user_id);
			break;
		default:
			$title = "";
			break;
	}
	
    $html->parsetemplate('users.tmpl');

?>
