<?php class RoleMaster
	{
 		public function RoleMaster()  
		{
		 
		}
		   function  Role($groupid='')
		   { 
 					global $db;
					
					$sql_state=DB_query("SELECT secroleid , secrolename FROM  securityroles where rolestatus ='Y' ",$db);		
					if(!$sql_state)
					{
					   die('Error.'.DB_error_msg($db));
					}
					echo "<select name='groupid[]' style='width:150px;'  onchange=ShowDiv(this.value,'hid-Roleid','get_RoleUsers.php') >";
					echo "<option value='000'>---</option>";
					while($row=DB_fetch_array($sql_state))
					{
					   $p='';
					   if($row['secroleid']==$groupid)
					   $p='selected';
					  echo "<option value='".$row['secroleid']."' $p >".$row['secrolename']."</option>";
					}
					echo "</select>";
			}
			
			
			
		 
	
	}
	
	$ClassRole=new RoleMaster();
	?>
