<?php  
//echo $_SESSION['ACGCompanyId'];
include('includes/Class_www_users.php');
include('CRM/functions.php');

$table='www_users';

//*************************Search********************************************************************

	$GetRecord = "Select * from $table  where companyid='".$_SESSION['ACGCompanyId']."' and vendorid !='0'";
  
//**************************************************************************************************  
 	
	?>
 <link href="css/pagnation.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/function-ajax.js"></script>
<link rel="stylesheet" href="css/new_mxerp.css">
<div class="body_contain">
<div class="tab_div">
<h1>Vendor User login</h1>


 

<table width="100%" border="1" cellspacing="0" cellpadding="3">
<tr class="row1"> 
	<td class="tabledata"><strong>Company </strong></td>
	<td class="tabledata"><strong>UserId</strong></td>
	<td class="tabledata"><strong>Department</strong></td>
	<td class="tabledata"><strong>Role</strong></td>
	<td class="tabledata"><strong>Name</strong></td>
	<td class="tabledata"><strong>Email</strong></td>
	<td class="tabledata"><strong>Status</strong></td>
</tr>
 
 
   <?php 
   $ResultData = DB_query($GetRecord,$db);
   $i=1;
   if(DB_num_rows($ResultData)==0)
   echo "<td colspan='3'>--No Record--</td>";
   
   while($RowData = DB_fetch_array($ResultData))
   {?> 
<tr class="row1"> 
   <td><?php  echo  $s->getField('companies','CompanyId',$RowData['companyid'],'CompanyName');
   
    ?>	  </td>
   <td><?php echo $RowData['userid']; ?>	  </td>
      <td><?php echo  $s->getField('deptmaster','id',$RowData['department'],'deptname'); ?>	
	  <?php //echo  $s->getField('desigmaster','id',$RowData['designation'],'designame');?>	    </td>

   <td><?php  echo  $s->getField('securityroles','secroleid',$RowData['rolepid'],'role_name');?></td>
   <td><?php echo $RowData['realname']; ?>	  </td>
   
  <td><?php echo $RowData['email']; ?>	  </td>
    <td><?php echo ($RowData['blocked']=='0'?'Active':'Inactive'); ?>	  </td>
  </tr>

<?php $i++;}  ?> 
