<?php
	$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');

$file = Array(
		array('text'  => 'New Person',
			'url' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.add_person')),
			
		array('text'  => 'New Org',
			'url' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.add_org')),
			
		array('text'  => '_NewLine_'),

		array('text'  => 'Add VCard',
			'url' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uivcard.in')),

		array('text'  => 'Categorize Persons',
			'url' =>  $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uicategorize_contacts.index')),
		array('text'  => 'Import Contacts',
			'url' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import')),

		array('text'  => 'Import CSV',
			'url' => $GLOBALS['phpgw']->link('/addressbook/csv_import.php')),

		array('text'  => 'Export Contacts',
			'url' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export')),

		array('text'  => '_NewLine_') // give a newline
	);

display_sidebox($appname,$menu_title,$file);

	if($GLOBALS['phpgw_info']['user']['apps']['preferences'])
	{
		$menu_title = lang('Preferences') /*. ' ' . lang('Menu')*/;
		$file = Array(
			array('text'	=> 'Preference',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook_prefs.index')),
			array('text'	=> 'Grant Access',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=addressbook')),
			array('text'	=> 'Edit Categories',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=addressbook&cats_level=True&global_cats=True'))
		);
		display_sidebox($appname,$menu_title,$file);
	}
	if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
	{
		$menu_title = lang('Administration') /*. ' ' . lang('Menu')*/;
		$file = Array(
			array('text'	=> 'Site Configuration',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=addressbook')),
			array('text'	=> 'Custom Fields',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index')),
			array('text'	=> 'Global Categories',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook'))
		);
		display_sidebox($appname,$menu_title,$file);
	}
?>
