$RecCount=0;
$pageid=0;
$psize=6;
$pcount=0;
$pageid=$_GET['pageid'];
if (strlen($pageid)==0)
{
$pageid=1;
}
$TempPSize=6 * $pageid;
$connGallyPotsAll=mysqli_connect("localhost", "realtyinfagrourp_realtUr", "9KhW1h018XQq", "realtyinfagrourp_realtyinfagrourpDB");
//mysql_select_db("realtyinfagrourp_realtyinfagrourpDB",$sqlGallyPotsAll);
$TempSStatus="Active";
if ($GallyCategoryid!="")
{
$sqlGallyPotsAll="select * from GallyPots where GallyCategoryid=".$GallyCategoryid." and SStatus='$TempSStatus' order by PPriority";
}
else
{
$sqlGallyPotsAll="select * from GallyPots SStatus='$TempSStatus' order by PPriority";
}
$resultGallyPotsAll=mysqli_query($connGallyPotsAll,$sqlGallyPotsAll) or die(mysql_error());
$number_of_rowsGallyPotsAll=mysqli_num_rows($resultGallyPotsAll);
while ($newarrayGallyPotsAll=mysqli_fetch_assoc($resultGallyPotsAll))
{
$pcount=$pcount+1;
$RecCount=$RecCount+1;
$TempPSizeCount=$TempPSizeCount+1;
if ($TempPSize >= $TempPSizeCount and $TempPSize-5 <= $TempPSizeCount)
{
$GallyPotsid=$newarrayGallyPotsAll['GallyPotsid'];
$TTitle=$newarrayGallyPotsAll['TTitle'];
$imagename=$newarrayGallyPotsAll['imagename'];
?>