Location: PHPKode > scripts > Create Your Own Directory > cms/HRAS/users/userlisting.php
<?php
include "../login/A-header.php";
include "../login/authheader.php";


if($block != true)
{
?>
<html>
<?php
$home="../../";
?>		
	     <a href="addcontent.php" style="text-decoration: none; color:black;"><div align=right style="text-decoration:none;"><strong>[ADD NEW LISTING]</strong></a></div><br>
           </td></tr><tr><td valign=top colspan=2>
           <?php 
			
			$name=$_GET['name'];
			$match=$_GET['match'];
			$order=$_POST['order'];
			$url=$_SERVER['REQUEST_URI'];
    			 $urll =$url;


				if($sno=="")
				 $sno=0;
			    	$start = $_GET['start'];
			    	if($start == "")
					$start = 0;

		?>
		<?php



			$str="select cntid,UserName,contents,UserId,tid,dat,rid,adddate,coalesce(rateval,0)as rateval,
			coalesce(referral,0)as referral, coalesce(view,0) as view from cnt left join (SELECT rid, sum(rateval) as rateval,dat from rating group by rid) A ON (cnt.cntid = A.rid)left join (select crid,sum(referral)  as
			referral,refdate from referral group by crid) C on (cnt.cntid=C.crid) left join (select  UserName,UserId from user )D on (cnt.usrid=D.UserId)where D.UserName='$name' and status !='TBR'limit $start,5 ";		     	
			//echo"$str";
                 
			$result = mysql_query($str);
$pr="";
 $sno = $sno+$start;
			while($row = @mysql_fetch_array($result,MYSQL_ASSOC)){
				$contents=$row['contents'];
$cntid=$row['cntid'];
$tid=$row['tid'];

$view=$row['view'];
$arr=split('####',$contents);
    
     $y="<table border=0 align=center width=90% cellpadding=0 cellspacing=0 align=center style='border: 1px solid lightblue; background-color: #ffffff;'>";
	if($typ[18]=="updated"){
	    		$y=$y."<tr width=100%><td width=16% align=left background=".$home."includes/print.php?cnt=".$id[18]." width=".$width[18]." height=".$height[18]." border=0 >&nbsp;&nbsp;&nbsp;<a href='$arr[0]-$cntid.html' class=cathead>$arr[0]</a></td><td width=16% align=right background=".$home."includes/print.php?cnt=".$id[18]." width=".$width[18]." height=".$height[18]." border=0 >Views: $view</span></td></tr>";
		}else{
	   		$y=$y."<tr ><td width=16% align=left background=".$home."image/img18.gif  width=".$width[18]." height=".$height[18]." border=0 width=16%>&nbsp;&nbsp;&nbsp;<a href='$arr[0]-$cntid.html' class=cathead>$arr[0]</a></td><td width=16% align=right background=".$home."image/img18.gif  width=".$width[18]." height=".$height[18]." border=0 width=16%>Views: $view</span></td></tr>";
      	}


$i=0;
$st="select fname,contentpg from cntfields where catid=$tid";
$res=mysql_query($st);
//echo"$st";
while($rr= @mysql_fetch_array($res,MYSQL_ASSOC))
{
  $fname[$i]=$rr['fname'];
  $contentpg[$i]=$rr['contentpg'];
$i++;
}
	  

for($j=1;$j<count($arr);$j++)
{
if($contentpg[$j]==1)
{
$tmp=$tmp."<tr><td ><div style='padding: 5px 15px;' align=left >$fname[$j]</div></td><td colspan=2><div style='padding: 5px 15px;' align=left >$arr[$j]</div></td></tr>";
}
}

	$pr=$pr.$y.$tmp."<tr bgcolor=#eeeeee><td style=\"padding: 5px 15px; \" >Date: $adddate </td><td><div align=right style=\"padding-right:20px;\"> Added by:$name</div></tr></table><br>";
	$sno = $sno+1;
 $y="";
$tmp="";

}
?>
<td></tr><tr><td style="font-size: 14px; padding: 10px;" valign=top align=right>
<?php
$start1=$start+5;
$start2=$start-5;
$url1=$urll."&"."start=".$start1;
$url2=$urll."&"."start=".$start2;

echo"<div align=right style='margin-right:10px;'>";
  if($sno > 5)
{

if($typ[21]=="updated")
      	{
$str1="<a href=\"$url2\" style='text-decoration:none'><image style='border:0;' SRC=".$home."includes/print.php?cnt=".$id[21]."></a>";

      		
      	}else{
$str1="<a href=\"$url2\" style='text-decoration:none'><image style='border:0;' SRC=".$home."image/img21.gif></a>";
      		
   		}
echo"$str1";
}
echo"	&nbsp;"; 
if($sno == ($start+5)){

if($typ[20]=="updated")
      	{
$str2="<a href=\"$url1\" style='text-decoration:none'><image style='border:0;' SRC=".$home."includes/print.php?cnt=".$id[20]."></a>";
      		
      	}else{
$str2="<a href=\"$url1\" style='text-decoration:none'><image style='border:0;' SRC=".$home."image/img20.gif></a>";

      		
   		}

echo"$str2";
}
echo"</div><br>";
echo"$pr";

 if($sno > 5)
{
echo"$str1";
}
echo"	&nbsp;"; 
if($sno == ($start+5)){
echo"$str2";
}
echo"</div>";

?>



<?php
	include '../login/A-footer.php';
}
?>


Return current item: Create Your Own Directory