$cond="";
if(isset($_GET['c'])){ $cond.=" and p_country='".$_GET['c']."' and p_logo!=''" ;}
$csel1="select * from pf_portfolio where p_status=1 ".$cond." order by p_id desc";
$csel="select * from pf_portfolio where p_status=1 and find_in_set(1,p_sitetype) or find_in_set(2,p_sitetype) or find_in_set(3,p_sitetype) and p_logo!='' order by p_id desc";
$cres=mysql_query($csel);
$total=mysql_num_rows($cres);
$sql=$csel1." limit $start,$len";
$res=mysql_query($sql);
$num=mysql_num_rows($res);
?>
$i=0;$k=5;
while ($drow=mysql_fetch_array($res,MYSQL_BOTH)) {
if( ($i%4)==0 ) { echo '