Location: PHPKode > scripts > Create Your Own Directory > cms/admin/usrrevlist.php
<?php
include "authheader.php";
?>
<!-- Welcome to the scripts database of HIOX INDIA      -->
<!-- This tool is developed and a copyright             -->
<!-- product of HIOX INDIA.				        -->
<!-- For more information visit http://www.hscripts.com -->
<html>
<head>
<style>
.rad{color:red; font-weight:bold; background-color: ffff44;}
.head{font-size: 17px; color: white; font-family: verdana, arial, san-serif;}
.links{font-size: 13px; color: white; font-family: verdana, arial, san-serif; text-decoration:none;}
.maintext{font-size: 13px; color: #fefefe; font-family: verdana, arial, san-serif; padding:20px; }
.sat{font-size: 13px; color: black; font-family: verdana, arial, san-serif; padding:20px;align:center; }

</style>
</head>
<body style="margin: 0px;">
<?php include "heade.php" ?>

<br>
<table align=center border=0 bgcolor=#f8f8ff  width=80%>
<tr><td align=center>
<!-- content row -->

<tr height=95%><td valign=top>
<?php
	$start = $_GET['start'];
	$sub = $_POST['sub'];
	$ref = $_POST['ref'];
	if($sno=="")
		$sno=0;
	if($start == "")
		$start = 0;
	$cstatus=$_POST['cstatus'];
	$usrname=$_POST['usrname'];
	$country=$_POST['country'];
?>
<div align=center style="color: green;">
	<form name=sform method=post>
	<table border=0><tr><td colspan=2 height=20></td></tr><tr><td >User Name</td><td >Status</td></tr>
<tr height=10>
<td align=center><select name=usrname>
		<?php
			echo "<option value=%%>ALL</option>";
			$str="select distinct(UserName) as aaa from user order by UserName";
			$res2 = mysql_query($str,$link);
			while ($line = mysql_fetch_array($res2, MYSQL_ASSOC))
			{
				$aau = $line['aaa'];
				if($usrname==$aau)
				{
					echo "<option value=\"$aau\" selected>$aau</option>";
				}
				else
				{
					echo "<option value=\"$aau\" >$aau</option>";
				
				}

			}
			echo "</select>";
		?>
	</td>
		<td align=center ><select name=cstatus>
		<?php
			echo"<option value=%%>ALL</option>";
			if($cstatus == "activate"){
			  	$revd = "selected";
			}else if($cstatus == "deactivate"){
			  $tbr = "selected";
			}
			echo "<option value=deactivate $tbr>deactivate</option>";
			echo "<option value=NICE $activate>activate</option>";
			echo "</select>";
		?>
		<input type=hidden name=sub value=yes>
		<input type=hidden name=start value=0>
		<input type=hidden name=ref value=1>
		<input type=submit value=go>
		<input type=submit value=Refresh onclick=reset()>				
	</td></tr>
	</table>
	</form>

<?php
	if($sub != "yes")
	$str="select UserId,UserName,Address,ContactNo,status from user limit $start,20";
	else
	$str = "select UserId,UserName,Address,ContactNo,status from user where status like '$cstatus' && UserName like '$usrname' limit $start,20";
	//echo"$str";
	$result = mysql_query($str,$link);
	echo "<table border=0 cellpadding=2 style=\"font-size: 14px; color: #000000;\" width=80% align=center border=0 bgcolor=#b0e2ff>";
	echo "<tr align=center height=15 ><td>S.no</td><td>Id</td><td>User Name</td><td>Address</td><td>&nbsp; </td><td>&nbsp; </td><tr>";
	$sno = $sno+$start;
	while ($line = @mysql_fetch_array($result, MYSQL_ASSOC))
	{	
		if($sno%2 == 0)
			$col = "#fffafa";
		else
			$col = "#f0ffff";


		$id = $line['UserId'];
		$name = $line['UserName'];
		$address = $line['Address'];
		$status = $line['status'];
		$type = $line['type'];
		echo "<tr align=center style='font-size:12px; color:#453377;' bgcolor=$col><td> $sno </td><td> $id </td><td> $name </td>
			<td> $address</td>
			<td><a href=\"usrrev.php?id=$id&sub=yes\"><img src=../image/write.gif border=0  ></a> </td>
			<td> <a style=\"color:red;\" href=\"delcnt.php?id=$id&sub=deluser\"><img src=../image/Trash.gif border=0></a> </td></tr>\n";
	$sno = $sno+1;
	}
	echo "</table>";
?>
</td></tr>
<tr><td style="font-size: 14px; padding: 10px;" valign=top align=right>
<?php
$start1=$start+20;
$start2=$start-20;
  if($sno > 20)
{
echo "<a href=usrrevlist.php?char=$char&start=$start2> &lt;&lt;Prev</a>";
}
echo"	&nbsp; &nbsp; &nbsp"; 
if($sno == ($start+20)){
echo"<a href=usrrevlist.php?sub=$yes&start=$start1> Next&gt;&gt;</a>";
}
?>
</td></tr>
<!-- content row -->
<tr><td width=100% align=right>
a product by &copy; <a href="http://www.hscripts.com" 
style="font-size: 14px; color: 347777; text-decoration:none;">hscripts.com</a> 
&nbsp; &nbsp; &nbsp; &nbsp;
</td></tr>
</table>
<!-- main table -->
</td></tr>
</table>
</body>
</html>
<!-- Welcome to the scripts database of HIOX INDIA      -->
<!-- This tool is developed and a copyright             -->
<!-- product of HIOX INDIA.				        -->
<!-- For more information visit http://www.hscripts.com -->


Return current item: Create Your Own Directory