Location: PHPKode > scripts > Open4Listing > subcateg.php
<?php

$rowsPerPage =20;
if(trim($_GET['page']))
{
$pageNum=$_GET['page'];
}
else
{
$pageNum=1;
}
$offset = ($pageNum - 1) * $rowsPerPage;



$categ=$_GET["categ"];
$categ2=str_replace(" ", "+", $categ);

$subcateg=$_GET["subcateg"];
$subcateg2=str_replace(" ", "+", $subcateg);

include("setari.php");
$cxn = @ConnectToDb($dbServer, $dbUser9, $dbPass9, $dbName9);
$check = mysql_query("SELECT * FROM clienti limit 1")or die(mysql_error()); 
while($myrow = mysql_fetch_array( $check )) 
{
$keywords0=str_replace(" ", ", ", $categ);
$keywords1=str_replace(" ", ", ", $myrow[nume]);
$keywords2=str_replace(" ", ", ", $subcateg);
$nume=$myrow[nume];
$companie=$myrow[companie];
$fax=$myrow[fax];
}

?>









<html>
<head>
<title><?php echo $subcateg.": ".$categ;?></title>
<meta name=description content="<?php echo $subcateg.": ".$categ." - ".$nume;?>">
<meta name=keywords content="<?php echo $keywords0.", ".$keywords2.", ".$keywords1;?>">
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<body>
<div align="center">
<?php include "elements/header.php";?>
<table border="0" width="900" cellspacing="0" cellpadding="0">
<tr><br><td width="200" valign="top">
<div align="center">
<?php include "elements/menu.php";?>	
</div>
<p>&nbsp;</p>
</td>
<td valign="top" align=center>
<div align="left">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF">
		
<div align=right><b><font face="Arial" size="2" color="#666666"><i><?php echo $fax;?></i></font></b>&nbsp;&nbsp;&nbsp;</div><br>



<table border="0" width="94%" align=center>
	<tr>
	
		<td>
		<font face="arial" size="3" color="#888888"><?php echo $categ;?></td></tr>
		<tr><td>
		
		<h1>
<font face="verdana" size="5" color="#888888"><b><?php echo $subcateg;?></b></h1></td>
	</tr>
</table>


<?php

$query00 = "SELECT idoferta FROM oferte where judet='$categ' and tranzactie='$subcateg' ORDER BY idoferta DESC";
$result00 = mysql_query($query00) or die("Query failed");
$numrows = mysql_numrows($result00);
$maxPage = ceil($numrows/$rowsPerPage);


$check999 = mysql_query("SELECT * FROM oferte where judet='$categ' and tranzactie='$subcateg' ORDER BY idoferta DESC LIMIT $offset, $rowsPerPage")or die(mysql_error()); 
while($mzrow999 = mysql_fetch_array( $check999))
{
$judetlnk=str_replace(" ", "+",$mzrow999["judet"]);
$tranzlnk=str_replace(" ", "+",$mzrow999["tranzactie"]);


if(!trim($mzrow999[suprafata]))
{$suprafata="";}else{$suprafata="<font face=verdana>$mzrow999[suprafata]</font>";}


if(!trim($mzrow999[pret]))
{$pret="";}else{$pret="<font face=verdana>$mzrow999[pret] $mzrow999[moneda]</font>";}

echo "<table width=94% align=center border=0 cellpadding=0 cellspacing=0 bgcolor=#F8F8F8>
<tr><td><br><a href=list.php?id=".$mzrow999[idoferta]."><font size=3 color=#777777 face=arial><b><u>".$mzrow999[titlu]."</a></b></u>
<br><font size=1 color=#666666 face=verdana>".$suprafata."    ".$pret."<br><a href=categ.php?categ=".$judetlnk."><font color=#777777>
".$mzrow999["judet"]."</a> > <a href=subcateg.php?subcateg=".$tranzlnk."&categ=".$judetlnk."><font color=#777777>
".$mzrow999["tranzactie"]."</a>
</td><td width=120>";

if($mzrow999["poza1"]==da)
{
echo"<img border=1 src=poze/".$mzrow999[idoferta]."_1_mic.jpeg>";
}


echo"</td></tr></table><br>";
}

?>
<div align=right>
 <?php include("navig2.php");?>
</div><br>	
</td>
</tr>
<tr>
<td bgcolor="#000000" align=right><?php include "elements/footer.php";?>
</td></tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
 
&nbsp;
Return current item: Open4Listing