<script language="javascript" type="text/javascript">

function add_account_year(url)
	{
	onmouseover1= window.open(url,'onmouseover1','height=630,width=920,scrollbars=yes,resizable=no,left=300,top=150,toolbar=no,location=no,directories=no,status=no,menubar=no');
	}



function user_rights_print(url)
	{
	onmouseover= window.open(url,'onmouseover','height=600,width=1200,scrollbars=yes,resizable=no,left=50,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no');
	}
</script>
<?php  error_reporting(0);
/***************************** PREVIOUS NEXT CODING ****************************************/
include ("../../include/db.php");

$show = 20;
$num_links = 19;
$from = $_GET['from'];
//echo "test".$from;
if (empty($from))
	 {
		$from = "0";
	 } 
else 
	{
	$html_query = $html_query. "&from=$from";
	}

$login_user_name=$_SESSION['login_user_name'];

 $sql="select * from  user_permission_main  ";

$html_query = "main_fram.php?file=user_permission";
$result=mysql_query($sql);
$num_results=mysql_num_rows($result);
if ($num_results == 0) 
{
 $confirmation = "No Records!";
} 
elseif ($num_results == 1) 
{
$confirmation = "Found 1 Records.";
} 
else 
{
$confirmation = "Found $num_results Records.";
} 
?>
<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<div class="CSSTableGenerator">  

<table border="0" width="100%"  align="center" cellpadding="0" cellspacing="0" >
<!--<a href="javascript:user_rights_print('master_entry/admin/user_rights_print.php?')" style="float:right"><img src="img/print_32.png" width="30" height="25" border="0"></a>-->
    <tr>
      <th scope="col" width="78">S.No</th>
      <th scope="col" align="left">User Name</th>
            <th scope="col" width="116">Edit</th>
      <th scope="col" width="116">Delete</th>
    </tr>
  <?php
 include ("../../include/db.php");
 $login_user_name=$_SESSION['login_user_name'];
 
 $sql="select distinct user_name,main_id from  user_permission_main  order by user_name ASC LIMIT $from,20 ";
 $rs=mysql_query($sql);
			  while($rsdata=mysql_fetch_object($rs))
			  {   $from=$from+1;

			     $main_id=$rsdata->main_id;
				 $user_name=$rsdata->user_name;
 ?>
  <tr >
    <td width="78"  align="center"><?php echo $from; ?></td>
    <td width="470" align="left" ><?php echo $user_name;?></td>
    <td align="center"><img src="img/edit.png" width="17" height="20" title="EDIT" onclick="javascript:add_account_year('admin/user_permission/user_type_entry.php?user_name=<?php echo $user_name;?>&edit_id=<?php echo $main_id;?>')"/></td>
    <td align="center"><a href="#" onClick="user_permission_delete_row('<?php echo $main_id;?>');"><img src="img/cross_deletes.png" width="25" height="25" title="Delete" /></a></td>
  </tr>
  <?php } ?>
</table>
</div>
<table border="0" width="99%"  align="center" cellpadding="0" cellspacing="0" >

 <tr>
    <th height="19" align="left" style="font-size:12px; font-family:sans-serif; padding-top:10px;" scope="col"><?php echo $confirmation;?></th>
	<th scope="cols" width="8%" align="right"><?php  
			  if ($num_results > $show) 
			  {
			  $show;
			include("include/footer_links.php");
			  }
	?></th>
 </tr>
</table>
</div>
</div>
</div>
