';
echo get_module_title("Users",' Role Information', true);
global $adb;
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once($theme_path.'layout_utils.php');
$roleid= $_REQUEST['roleid'];
$xtpl=new XTemplate ('modules/Users/RoleDetailView.html');
$sql = "select * from role where roleid=".$roleid;
$roleResult = $adb->query($sql);
$standCustFld = getStdOutput($roleResult,$roleid);
//Standard PickList Fields
function getStdOutput($roleResult, $roleid)
{
	global $adb;
	//retreiving the associated Profileid
	$sql1 = "select profile.* from role2profile inner join profile on profile.profileid=role2profile.profileid where roleid=".$roleid;
	$result1 = $adb->query($sql1);
	$profilename = $adb->query_result($result1,0,'profilename');
	$rolename = $adb->query_result($roleResult,0,"name");
	global $adb;
	//echo get_form_header("Profiles", "", false );
	$standCustFld= '';
        $standCustFld .= '';
        $standCustFld .= '';
        $standCustFld .= '';
        $standCustFld .= '';
	$standCustFld .= '
  ';
	//Check for Current User
	global $current_user;
	$current_role = fetchUserRole($current_user->id);
	if($roleid != 1 && $roleid != 2 && $roleid != $current_role)
	{
        	$standCustFld .= '';
	}
        
        $standCustFld .= '
'; 
	$standCustFld .= '
| Role Information'; $standCustFld .= ' | |
| Role Name:'; $standCustFld .= ' | '.$rolename.''; $standCustFld .= ' | 
| Associated Profile Name:'; $standCustFld .= ' | '.$profilename.''; $standCustFld .= ' |