<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

include_once('auth.php');

include_once('functions.inc.php');

$menu = array();

$general_open = false;
$op_block = 'ftp';
$op_item = 'refresh';

if(array_key_exists('op_block', $_GET) && array_key_exists('op_item', $_GET))
{
	$general_open = true;
	$op_block = $_GET['op_block'];
	$op_item = $_GET['op_item'];
}

if(isSUserLogged($PHP_AUTH_USER) == USERTYPE_FTPUSER)
{
	$c_general = array(
		$gui->make_menu_item('changepw', 
			ltext('ma_changepw'), 
			$gui->make_menu_target_int("allgemein_pwaendern.php", "alpw_descr1")
		),
		$gui->make_menu_item('select_language', 
			ltext('ma_selectlanguage'), 
			$gui->make_menu_target_int("allgemein_sprache.php", "alsp_title1", "alsp_descr1")
		),
	);
	$menu[] = $gui->make_menu_block('general', ltext('m_general'), 'overview', $c_general, $general_open);
}

$c_email = array(
	$gui->make_menu_item('refresh',
		ltext("m_wftp_refresh"),
		$gui->make_menu_target_int("ftp_index.php")
	),
	$gui->make_menu_item('editnew',
		ltext("m_wftp_new"),
		$gui->make_menu_target_int("ftp_editnew.php?edit=new")
	),
	$gui->make_menu_item('upload',
		ltext("m_wftp_upload"),
		$gui->make_menu_target_int("ftp_upload.php")
	),
	$gui->make_menu_item('mkdir',
		ltext("m_wftp_mkdir"),
		$gui->make_menu_target_int("ftp_newdir.php")
	),
);

$menu[] = $gui->make_menu_block('ftp', ltext('m_ftp'), 'overview', $c_email, true);

$nav_tree = $gui->make_navigation_container($menu);

$page = $gui->make_left_menu(array(
	$nav_tree, 
	$gui->make_action_button('logout', ltext('m_logout'), $gui->make_menu_target_top('logout.php?user=' . $PHP_AUTH_USER))
	)
);
$page->set_default($op_block, $op_item);				// active
$page->draw();
db_close();
?>
