243 lines
7.2 KiB
PHP
243 lines
7.2 KiB
PHP
<?php
|
|
include('top.php');
|
|
?>
|
|
<link rel="stylesheet" href="includes/css-js/admin.css">
|
|
<script language="javascript" src="includes/css-js/functions.js"></script>
|
|
<script language="javascript" src="includes/css-js/dynamic_css.js"></script>
|
|
<script language="javascript" src="includes/css-js/prototype.js"></script>
|
|
<script language="javascript" src="includes/css-js/ajaxrequest.js"></script>
|
|
<script language="javascript" src="includes/css-js/datetimepicker.js"></script>
|
|
<script language="javascript" src="includes/css-js/validations.js"></script>
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
|
|
</script>
|
|
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
|
<tr>
|
|
<td height="350" valign="top" style="padding:10px;"><p> </p>
|
|
<p> </p>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
<tr>
|
|
|
|
<td align="left"><fieldset class="bdr1" >
|
|
|
|
<legend class="heading1">User/Role Report</legend>
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bdr_table">
|
|
<tr>
|
|
<td colspan="2" align="center" class="bg2">
|
|
<span class="txt">
|
|
<?php
|
|
if($msg)
|
|
echo $msg;
|
|
?></span>
|
|
<td align="left" class="bdr_td" valign="top">
|
|
|
|
<table width="100%" border="1" cellspacing="0" cellpadding="4" class="bdr_table">
|
|
<?php
|
|
$pdf_firm ="<a href='pdf_firms.php? target='_blank'><img src='images/pdf.gif' border=\"0\" /></a>";
|
|
$pdf_user ="<a href='pdf_users.php? target='_blank'><img src='images/pdf.gif' border=\"0\" /></a>";
|
|
$pdf_client ="<a href='pdf_clients.php? target='_blank'><img src='images/pdf.gif' border=\"0\" /></a>";
|
|
$pdf_user_role ="<a href='pdf_user_roles.php? target='_blank'><img src='images/pdf.gif' border=\"0\" /></a>";
|
|
?>
|
|
|
|
|
|
|
|
<tr bgcolor="#eeeeee" valign="top">
|
|
<td width="5%" align="left"><strong>Sr. No</strong></td>
|
|
<td width="15%" align="left"><strong>Report</strong></td>
|
|
<td width="15%" align="left"><strong>Firm</strong><br><?php echo $pdf_firm?></td>
|
|
<td width="15%" align="left"><strong>User</strong><br><?php echo $pdf_user?></td>
|
|
<td width="15%" align="left"><strong>User Role</strong><br><?php echo $pdf_user_role?></td>
|
|
<td width="15%" align="left"><strong>Access</strong></td>
|
|
<td width="15%" align="left"><strong>Client</strong><br><?php echo $pdf_client?></td>
|
|
<td width="5%" ></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<form name="f1" method="get" action="pdf_firm_access_report.php" >
|
|
<td align="center" >1</td>
|
|
<td align="left">Firm Access Report</strong></td>
|
|
<td><span class="style34"><label>
|
|
<select class="selectbox" name="firm_id1" id="firm_id1" >
|
|
<option value="">--Select--</option>
|
|
|
|
<?php
|
|
$sql_firm ="select a.firm_id,firm_name from tbl_firms a, user_firms b where a.firm_id=b.firm_id and b.user_id= '".$_SESSION['user_id']."' ORDER BY firm_name ";
|
|
|
|
generate_options($sql_firm,$firm_id,'firm_id','firm_name','');
|
|
?>
|
|
</select></label></span>
|
|
</td>
|
|
<td align="left"></td>
|
|
<td align="left"></td>
|
|
<td align="left"></td>
|
|
<td align="left"></td>
|
|
<td align="left"> <?php echo""?><input type="image" src="images/pdf.gif" border="0" name="submit" onclick="this.form.target='_blank'; return firm_access();" /></td>
|
|
</form>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<form name="f2" method="get" action="pdf_user_access_report.php" >
|
|
<td align="center" >2</td>
|
|
<td align="left">User Access Report</strong></td>
|
|
<td align="left"></td>
|
|
<td><span class="style34"><label>
|
|
<select class="selectbox" name="user_id2" id="user_id2" >
|
|
<option value="">--Select--</option>
|
|
|
|
<?php
|
|
$sql_user ="select user_id,user_name from tbl_users ORDER BY user_name ";
|
|
|
|
generate_options($sql_user,$user_id,'user_id','user_name','');
|
|
?>
|
|
</select></label></span>
|
|
</td>
|
|
<td align="left"></td>
|
|
<td><span class="style34"><label>
|
|
<select class="selectbox" name="access_id2" id="access_id2" >
|
|
<option value="">--Select--</option>
|
|
<option value="A">ALL</option>
|
|
<option value="R">READ</option>
|
|
<option value="W">WRITE</option>
|
|
<option value="E">EXECUTE</option>
|
|
</select></label></span>
|
|
</td>
|
|
|
|
<td align="left"></td>
|
|
<td align="left"> <?php echo""?><input type="image" src="images/pdf.gif" border="0" name="submit" onclick="this.form.target='_blank'; return user_access();" /></td>
|
|
</form>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<form name="f3" method="get" action="pdf_user_role_report.php" >
|
|
<td align="center" >3</td>
|
|
<td align="left">User Role Report</strong></td>
|
|
<td align="left"></td>
|
|
<td align="left"></td>
|
|
<td><span class="style34"><label>
|
|
<select class="selectbox" name="role_id3" id="role_id3" >
|
|
<option value="">--Select--</option>
|
|
|
|
<?php
|
|
$sql_role ="select role_id,role_name from role_master ORDER BY role_name ";
|
|
|
|
generate_options($sql_role,$role_id,'role_id','role_name','');
|
|
?>
|
|
</select></label></span>
|
|
</td>
|
|
|
|
<td><span class="style34"><label>
|
|
<select class="selectbox" name="access_id3" id="access_id3" >
|
|
<option value="">--Select--</option>
|
|
<option value="A">ALL</option>
|
|
<option value="R">READ</option>
|
|
<option value="W">WRITE</option>
|
|
<option value="E">EXECUTE</option>
|
|
</select></label></span>
|
|
</td>
|
|
<td align="left"></td>
|
|
<td align="left"> <?php echo""?><input type="image" src="images/pdf.gif" border="0" name="submit" onclick="this.form.target='_blank'; return user_role();" /></td>
|
|
</form>
|
|
</tr>
|
|
|
|
<tr>
|
|
<form name="f4" method="get" action="pdf_client_access_report.php" >
|
|
<td align="center" >4</td>
|
|
<td align="left">Client Access Report</strong></td>
|
|
<td align="left"></td>
|
|
<td align="left"></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td ><span class="style34"><label>
|
|
<select class="selectbox" name="client_id4" id="client_id4" >
|
|
<option value="">--Select--</option>
|
|
<option value="ALL">ALL Client</option>
|
|
<?php
|
|
$sql_client ="select client_id,client_name from client_master where status='1'
|
|
and (client_id IN (select client_id from purchase_order_master ) OR client_id IN (select dd_client_id from final_dispatch)) ORDER BY client_name "; //echo $sql_firm;
|
|
generate_options($sql_client,$client_id,'client_id','client_name','');
|
|
?>
|
|
|
|
</select></label></span>
|
|
</td>
|
|
<td align="left"> <?php echo""?><input type="image" src="images/pdf.gif" border="0" name="submit" onclick="this.form.target='_blank'; return client_access();" /></td>
|
|
</form>
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
<script>
|
|
|
|
function firm_access()
|
|
{
|
|
|
|
if(document.getElementById('firm_id1').value=="")
|
|
{
|
|
alert('Please select Firm');
|
|
return false;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function user_access()
|
|
{
|
|
|
|
if(document.getElementById('user_id2').value=="")
|
|
{
|
|
alert('Please select User');
|
|
return false;
|
|
}
|
|
else if(document.getElementById('access_id2').value=="")
|
|
{
|
|
alert('Please select Access');
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
function user_role()
|
|
{
|
|
|
|
if(document.getElementById('role_id3').value=="")
|
|
{
|
|
alert('Please select Role');
|
|
return false;
|
|
}
|
|
else if(document.getElementById('access_id3').value=="")
|
|
{
|
|
alert('Please select Access');
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function client_access()
|
|
{
|
|
|
|
if(document.getElementById('client_id4').value=="")
|
|
{
|
|
alert('Please select Client');
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
</script>
|