<?php 
/*echo '<pre>';
print_r($this->session->userdata('loggedinadmin'));
exit;*/
if($this->session->userdata('loggedinadmin')==true && $this->session->userdata('adminloginid')) 
	{?>
   <?php
   $user_id=$this->session->userdata('adminloginid');
   $sel_user_group=mysql_query("select * from  njobn_users where user_id='".$user_id."'");
   $fetch_user_group=mysql_fetch_array($sel_user_group);
   $group_id=$fetch_user_group['group_id'];
   //code for inner jion
   $query_inner=mysql_query("SELECT privilege_name FROM njobn_assigne_privilege_group LEFT JOIN njobn_privileges ON njobn_assigne_privilege_group.privilege_id=njobn_privileges.privilege_id where group_id='".$group_id."' And privilege_name='".$this->uri->segment(2)."'");
  if(mysql_num_rows($query_inner)<=0)
  {
  redirect('manage/admin_dashboard');
}
}?>
    	
