Preview: pinuser-backp-26.php
Size: 9.62 KB
/home/jambtst2015/public_html/giraffeng.com/admin/pinuser-backp-26.php
<?php include("includes/head.php"); ?>
<?php include("includes/header.php"); ?>
<?php
if(empty($_REQUEST['delete'])){$_REQUEST['delete']='';}
if($_REQUEST['delete']=="del" && $_REQUEST['
']!='')
{
mysql_query("delete from sat_users where user_id='".$_REQUEST['delete_id']."'");
//mysql_query("delete from sat_users_history where user_id='".$_REQUEST['delete_id']."'");
$delmsg="User details deleted successfully";
}
?>
<script type="text/javascript" language="javascript">
function open_src()
{
if(document.getElementById("div_src").style.display=='none')
{
//document.getElementById("div_src").style.display='block';
$("#div_src").show("slow");
}
else
{
//document.getElementById("div_src").style.display='none';
$("#div_src").hide("slow");
}
}
$(document).ready(function(){
setTimeout(function(){
$(".mydiv").fadeOut("slow", function () {
$(".mydiv").remove("slow");
});
}, 4000);
});
</script>
<div class="container_bottom_section">
<?php if($delmsg!=''){ ?>
<p class="mydiv" style="color:#F00; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;"><?php echo $delmsg; ?></p>
<?php } ?>
<?php if($_REQUEST['success']=='1'){ ?>
<p class="mydiv" style="color:#090; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;">User Added Successfully</p>
<?php } ?>
<?php if($_REQUEST['success']=='2'){ ?>
<p class="mydiv" style="color:#090; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;">Details Updated Successfully</p>
<?php } ?>
<?php if($_REQUEST['success']=='4'){ ?>
<p class="mydiv" style="color:#090; float:left; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:left;">A/C Manager Transfered Successfully</p>
<?php } ?>
<a href="javascript:open_src();" class="require" style="margin-right:5px; margin-bottom:5px;"><i class="fa fa-search"></i> Search</a>
<?php if($level==1){ ?>
<?php /*?><a href="users_export_xls.php" class="require" style="margin-right:5px; margin-bottom:5px;">Export</a><?php */?>
<a href="userform.php" class="require org" style="margin-right:5px; margin-bottom:5px;"><i class="fa fa-plus"></i> Add User</a>
<?php } ?>
<div class="clear"></div>
<?php if(empty($_REQUEST['submit2'])){$_REQUEST['submit2']='';} ?>
<div class="search-box" style="padding:5px; <?php if($_REQUEST['submit2']=='') { ?>display:none;<?php } ?> border:1px solid #C4C4C4; margin-bottom:10px;" id="div_src">
<div class="require_add">
<h3 style="font-family:Arial, Helvetica, sans-serif; font-size:18px; float:left; color:#2597C9; padding-bottom:5px;"><i class="fa fa-search"></i> Search By</h3>
<div class="clear"></div>
</div>
<form name="myfrm" action="" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_search">
<tr>
<td colspan="8" height="10"></td>
</tr>
<tr>
<td width="10%" height="25" valign="top" class="require_table_search">Name:</td>
<td colspan="4" align="left" valign="top">
<input type="text" name="name" class="textfield require_field" value="<?php echo $_REQUEST['name']; ?>" />
</td>
<td width="3%"> </td>
</tr>
<tr>
<td height="25" valign="top" class="require_table_search">Email:</td>
<td colspan="4" align="left" valign="top">
<input type="text" name="email_id" class="textfield require_field" value="<?php echo $_REQUEST['email_id']; ?>" />
</td>
<td> </td>
</tr>
<tr>
<!--<td height="25" valign="top" class="require_table_search">User Initial:</td>-->
<!-- <td align="left" valign="top">
<input name="user_initial" id="user_initial" type="text" class="validate[required] textfield require_field" value="<?php echo $_REQUEST['user_initial']; ?>" />
</td> -->
<td colspan="12">
<span style="float:right;margin: 0px 22px 0px 0px;">
<input name="submit2" type="submit" value="Search" class="require sm" style="margin-top:0px !important;" />
<a href="user.php" style="text-decoration:none;" class="require org"> Show All
<!-- <input name="submit3" type="button" value="Show All" class="submit" style="margin-top:0px;" /> -->
</a>
</span>
</td>
</tr>
</table>
</form>
</div>
<table width="1100" border="1" cellspacing="0" cellpadding="0" bordercolor="#616161" style="border-collapse:collapse;" class="list-table">
<tr>
<td width="170" class="head_text">ID</td>
<td width="101" class="head_text">Name</td>
<td width="84" class="head_text">Email</td>
<!--<td width="200" class="head_text">Marks</td>-->
<td width="161" class="head_text">Status</td>
<!--<td width="161" class="head_text">Last Login</td>-->
<td width="62" class="head_text text-center">Mac Address</td>
<td width="62" class="head_text text-center">Action</td>
</tr>
<?php
if(empty($_REQUEST['order']))
{
$_REQUEST['order']='';
}
$qry_contact = "select * from user where pin_id=0";
if($_REQUEST['email_id']!=''|| $_REQUEST['name'])
{
$qry_contact = "select * from user";
if($_REQUEST['name']!='')
{
$qry_contact .= " where name like '%".$_REQUEST['name']."%'";
}
if($_REQUEST['email_id']!='')
{
$qry_contact .= " where email_id like '%".$_REQUEST['email_id']."%'";
}
}
if($_REQUEST['email_id']!=''&& $_REQUEST['name'])
{
$qry_contact = "select * from user";
if($_REQUEST['name']!='')
{
$qry_contact .= " where name like '%".$_REQUEST['name']."%'";
}
if($_REQUEST['email_id']!='')
{
$qry_contact .= " and email_id like '%".$_REQUEST['email_id']."%'";
}
}
$qry_contact .= " order by id ".$oredr; //sorting by id //
//echo $qry_contact;
$_SESSION['sqlUser']='';
//$_SESSION['sqlUser'] = $qry_contact;
$sel_events=mysql_query($qry_contact);
////////////////////////////////Start pagination////////////////////////////////////
if(empty($_REQUEST['page'])) { $_REQUEST['page']=''; }
$page=$_REQUEST['page'];
if($page=="")
{
$page = 1;
}
if($_REQUEST['submit2']!='' && $page!=1)
{
$page = $page;
}
$max_results = 500;
$prev = ($page - 1);
$next = ($page + 1);
$from = (($page * $max_results) - $max_results);
$total_results = mysql_num_rows($sel_events);
$total_pages = ceil($total_results / $max_results);
$pagination = '';
if($page > 1)
{
$pagination .= "<a href=\"user.php\" class=\"more_link_pagination_prev\">Previous</a>";
$pagination.=" ";
}
for($i = 1; $i <=$total_pages; $i++)
{
if(($page) == $i)
{
$pagination .= $i;
$pagination.=' ';
}
else
{
$pagination .= "<a href=\"user.php?page=$i\" class=\"more_link_pagination\">$i</a>";
$pagination.=' ';
}
}
if($page < $total_pages)
{
$pagination .= "<a href=\"user.php?page=$next\" class=\"more_link_pagination_prev\">Next</a>";
$pagination.=" ";
}
$qry_contact.=" limit $from,$max_results";
$qry_contact; //Limit print//
$result=mysql_query($qry_contact);
//print_r($qry_contact); //Display Result//
////////////////////////////////End pagination////////////////////////////////////
if(mysql_num_rows($result)>0)
{
$inc=1;
while($row_contact_details=mysql_fetch_array($result))
{
$id = $row_contact_details['id'];
$name = $row_contact_details['name'];
$email = $row_contact_details['email_id'];
$marks = $row_contact_details['marks'];
$status = $row_contact_details['status'];
$last_login = $row_contact_details['last_login'];
$macaddress = $row_contact_details['macaddress'];
?>
<tr>
<td class="head_text2">
<a href="view_user.php?userid=<?php echo $row_contact_details['id']; ?>&submit2=<?=$_REQUEST['submit2']?>" onClick="return view('<?php echo $row_contact_details['user_id'];?>');" style="color:#094A66; font-family:Arial, Helvetica, sans-serif;">
<?php echo $id; ?>
</a>
</td>
<td class="head_text2">
<?php echo $name; ?>
</td>
<td class="head_text2"><?php echo $email; ?></td>
<!--<td class="head_text2"><?php echo $marks; ?></td>-->
<td class="head_text2"><?php echo $status; ?></td>
<!--<td class="head_text2"><?php echo $last_login; ?></td>-->
<td class="head_text2"><?php echo $macaddress; ?></td>
<td class="head_text2 text-center">
<!--<a href="userform_edit.php?id=<?php echo $row_contact_details['id'];?>&page=<?php echo $page; ?>&name=<?=$_REQUEST['name']?>&email=<?=$_REQUEST['email']?>&username=<?=$_REQUEST['username']?>&order=<?=$_REQUEST['order']?>&userclass=<?=$_REQUEST['userclass']?>&status=<?=$_REQUEST['status']?>&rcv_reqs_email=<?=$_REQUEST['rcv_reqs_email']?>&submittals_emails=<?=$_REQUEST['submittals_emails']?>&rvc_hotlist_email=<?=$_REQUEST['rvc_hotlist_email']?>&submit2=<?=$_REQUEST['submit2']?>"><img src="images/edit.png" alt="Edit" userclass="Edit" /></a>-->
<a href="pinuser_set.php?id=<?php echo $row_contact_details['id'];?>&page=<?php echo $page; ?>&name=<?=$_REQUEST['name']?>&email=<?=$_REQUEST['email']?>&username=<?=$_REQUEST['username']?>&order=<?=$_REQUEST['order']?>&userclass=<?=$_REQUEST['userclass']?>&status=<?=$_REQUEST['status']?>&rcv_reqs_email=<?=$_REQUEST['rcv_reqs_email']?>&submittals_emails=<?=$_REQUEST['submittals_emails']?>&rvc_hotlist_email=<?=$_REQUEST['rvc_hotlist_email']?>&submit2=<?=$_REQUEST['submit2']?>"><img src="images/edit.png" alt="Edit" userclass="Edit" /></a>
</td>
</tr>
<?php } ?>
<tr>
<td colspan="11" class="tbl-footer pagination-nw" style="background-color:;"><?php echo $pagination; ?></td>
</tr>
<?php } else {?>
<tr>
<td colspan="11" class="head_text" style="background-color:#B2CEFC;">No user found</td>
</tr>
<?php } ?>
</table>
<div class="clear"></div>
</div>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180