<?php
function yes_get_menu_link($access_type){
	global $YES_USER_PERMISSIONS;
	$link = '<a ';
	if(isset($YES_USER_PERMISSIONS[$access_type])){
		// entry exists
		if($YES_USER_PERMISSIONS[$access_type] == 1){
			$link .= "href=\"".xtc_href_link($access_type.'.php')."\"";
		}else{
			$link .= "href=\"".yes_draw_js_alert_href(MENU_ACCESS_NOT_ALLOWED)."\"";
		}
	}else{
		// entry not exists
		$link .= "href=\"".yes_draw_js_alert_href(MENU_ACCESS_NOT_EXISTS)."\"";
	}
	$link .= '>'.constant( 'MENU_'.strtoupper($access_type) ).'</a>';
	return $link;
}
