Anunturi imobiliare CaseSiGradini.ro, judetul $judet - vanzare garsoniere si apartamente, anunturi de vanzare case, vanzari terenuri, inchirieri garsoniere, apartamente, case
?>
Anunturi imobiliare agentia }
//else{
if ($urlarr[2]=='vanzare'){
$f_vanz_inc2=' de vanzare';
}
elseif ($urlarr[2]=='inchiriere'){
$f_vanz_inc2=' de inchiriat';
}
else{
$f_vanz_inc2=' de vanzare sau de inchiriat';
}
$found_imob_categ_db=" ".str_replace("_"," ",strtolower($found_imob_categ_db));
if ($found_imob_pret){
if (substr($found_imob_pret,5,3)!='sub' && substr($found_imob_pret,5,5)!='peste'){
$found_imob_pret_title=str_replace("pret_","pret intre ",$found_imob_pret);
$found_imob_pret_title=str_replace("_euro"," euro",$found_imob_pret_title);
$found_imob_pret_title=str_replace("_"," si ",$found_imob_pret_title);
}
else{
$found_imob_pret_title=str_replace("pret_","pret ",$found_imob_pret);
$found_imob_pret_title=str_replace("_euro"," euro",$found_imob_pret_title);
$found_imob_pret_title=str_replace("_"," ",$found_imob_pret_title);
}
$found_imob_pret_title=", ".$found_imob_pret_title;
}
else{
$found_imob_pret_title='';
}
if ($found_imob_prop){
$found_imob_prop_title=", oferte de la ".str_replace("_"," ",$found_imob_prop).", ";
$found_imob_prop_description=", oferte de la ".str_replace("_"," ",$found_imob_prop);
}
else
$found_imob_prop_title="";
if ($found_imob_cam)
$found_imob_cam_title=" cu ".str_replace("_"," ",$found_imob_cam);
else
$found_imob_cam_title="";
if ($found_imob_etaj)
$found_imob_etaj_title=", ".str_replace("_"," ",$found_imob_etaj);
else
$found_imob_etaj_title="";
$txt_title="Anunturile agentiei ".$n_agentie." - ".$found_imob_categ_db.$found_imob_cam_title.$f_vanz_inc2.$found_imob_etaj_title.$found_imob_prop_title." in ".$loca_agentie.$found_imob_pret_title;
echo $txt_title;
//}
?>
}
else{?>
}
if (empty($idcateg)){
$keyw1=strtolower($found_imob_categ_db).$f_vanz_inc2;
}
else{
$keyw1="anunturi imobiliare, ".strtolower($found_imob_categ_db).$f_vanz_inc2;
if ($found_imob_etaj)
$found_imob_etaj_description=", ".strtolower($found_imob_categ_db)." ".str_replace("_"," ",$found_imob_etaj);
else
$found_imob_etaj_description="";
}
if ($found_imob_prop){
$keyw2=", oferte imobiliare ".str_replace('_',' ',$found_imob_prop);
}
else{
$keyw2="";
} //echo "fff=".$found_imob_cam_title;
if ($found_imob_cam_title)
$keyw3=", ".strtolower($found_imob_categ_db).$found_imob_cam_title;
else
$keyw3="";
$txt_keyw=$keyw1.", ".strtolower($found_imob_categ_db).' in '.$loca_agentie.$keyw2.$found_imob_etaj_description.$keyw3;
?>
$stmt_part="";
$where="";
if ($idcateg==1 || $idcateg==3 || $idcateg==6 || $idcateg==7){
$stmt_part=",nr_cam,";
}
if ($idcateg==1 || $idcateg==2){ //pt apartament si garsoniera
$stmt_part=",sup_util,etaj,etaj_max,an_constr,";
$tip_propriet=1;
}
if ($idcateg==3 || $idcateg==6 || $idcateg==7 || $idcateg==9){
$stmt_part=",sup_util,nivel_txt,sup_teren,front_str,an_constr,";
$tip_propriet=2;
}
if ($idcateg==4 || $idcateg==5){ //pt terenuri
$stmt_part=",sup_teren,front_str,";
$tip_propriet=3;
}
if ($idcateg)
$where .=" and idcateg=".$idcateg;
if ($found_vanz_inc){
if($found_vanz_inc=='-vanzare')
$tip_tranz=1;
if($found_vanz_inc=='-inchiriere')
$tip_tranz=2;
$where .=" and tip_tranz=".$tip_tranz;
}
if ($found_id_prop) //oferta de la
$where .=" and imob_proprietar=".$found_id_prop;
if ($found_id_pret) //oferta de la
$where .=" and imob_pret=".$found_id_pret;
if ($found_id_cam) //oferta de la
$where .=" and nr_cam=".$found_id_cam;
if ($found_id_etaj){ //oferta de la
if ($found_id_etaj<=112) //intra etajele 1-4 si demisolul, parterul, mansarda
$where .=" and etaj=".$found_id_etaj;
elseif ($found_id_etaj==113) //intra Etaj 1, 2 sau 3
$where .=" and etaj between 1 and 3 ";
elseif ($found_id_etaj==114) //intra Etaj 1 - 9
$where .=" and etaj between 1 and 9 ";
elseif ($found_id_etaj==115) //intra ultimul etaj
$where .=" and etaj=etaj_max ";
elseif ($found_id_etaj==116) //exlud ultimul etaj si parterul 11 e id-ul de la parter
$where .=" and (etaj<>11 and etaj<>etaj_max)";
}
//ordonare ==============================================
if ($ord0_gas){ //in left_oras.php am cautat sirul ordonare si in ord0 am pozitia dupa ordonare_
//$pord=strlen($url);$pord=$pord-$ord0_gas; echo $pord;
//$urlord=substr($url,0,$ord0_gas);//am facut +9 pt ca initial nu are ordonare url-ul ord00_gas
//$urlord=str_replace($id_loca_,"",$urlord); //elimin id_loca, il concatez dupa aia in selectul de ordonare
//echo $urlord;
//$ord00_gas=$ord0_gas-1;$urlord0=substr($url,0,$ord00_gas); //$urlord0 imi tb pt ordonarea "aleator"
}
else
$urlord=$url."-";
$orderby="";
if ($ordonare=="data" && $asc_desc=="asc") $orderby=" order by data_anunt asc ";
if ($ordonare=="data" && $asc_desc=="desc") $orderby=" order by data_anunt desc ";
if ($ordonare=="pret" && $asc_desc=="asc") $orderby=" order by pret asc ";
if ($ordonare=="pret" && $asc_desc=="desc") $orderby=" order by pret desc ";
if ($idcateg==1 || $idcateg==3 || $idcateg==6){
if ($ordonare=="camere" && $asc_desc=="asc") $orderby=" order by nr_cam asc ";
if ($ordonare=="camere" && $asc_desc=="desc") $orderby=" order by nr_cam desc ";
}
if ($ordonare=="suprafata" && $asc_desc=="asc") $orderby=" order by sup_util asc ";
if ($ordonare=="suprafata" && $asc_desc=="desc") $orderby=" order by sup_util desc ";
if ($idcateg==3 || $idcateg==6 || $idcateg==7 || $idcateg==8 || $idcateg==9){
if ($ordonare=="an_constructie" && $asc_desc=="asc") $orderby=" order by an_constr asc ";
if ($ordonare=="an_constructie" && $asc_desc=="desc") $orderby=" order by an_constr desc ";
}
//end ord===========================================
if($pagina)
$lim=$pagina*10; //3 insemana cate anunturi sunt pe pagina. E de proba. Vor fi mai multe
else
$lim="";
if ($lim){
$lim0=$lim-10;
$lim_trimis=$lim;
}
else{
$lim0=0;$lim=10;
$lim_trimis=0;
}
if (empty($id_judet))
$loca_jud=" id_loca=".$id_loca;
else
$loca_jud=" id_judet=".$id_judet;
//echo "select SQL_CALC_FOUND_ROWS id,(select nume from imob_categ where id=ia.idcateg) categ,userid,id_agentie,registerDate data_anunt,imob_proprietar,imagini,nr_cam, titlu,strada,id_loca id_loca_db,(select localitate from localitati where id=ia.id_loca) localit,zona, pret ".$stmt_part." moneda,tip_tranz from imob_anunturi ia where id_agentie=".$id_agentie." and publicat=1 ".$where.$orderby." limit ".$lim0.",10 ";
$result_o = mysql_query("select SQL_CALC_FOUND_ROWS id,(select nume from imob_categ where id=ia.idcateg) categ,userid,id_agentie,registerDate data_anunt,imob_proprietar,imagini,nr_cam, titlu,strada,id_loca id_loca_db,(select localitate from localitati where id=ia.id_loca) localit,zona, pret ".$stmt_part." moneda,tip_tranz from imob_anunturi ia where id_agentie=".$id_agentie." and publicat=1 ".$where.$orderby." limit ".$lim0.",10 ");
//echo "select SQL_CALC_FOUND_ROWS id,(select nume from imob_categ where id=ia.idcateg) categ,userid,id_agentie,registerDate data,imob_proprietar,imagini,nr_cam, titlu,strada,(select localitate from localitati where id=ia.id_loca) localit, pret ".$stmt_part." moneda from imob_anunturi ia where publicat=1 ".$where.$orderby." limit ".$lim0.",3 ";
$res = mysql_query("SELECT FOUND_ROWS()");
list($total) = mysql_fetch_array($res);
if ($lim_trimis==0) $lim_trimis=10;
$pagini=round($total/10);
$pag_curr=$lim_trimis/10;
$i=0;
$i_afis=0;
//if ($idcateg0)
?>
Anunturi imobiliare din ( anunturi)
}
else{
/*if ($urlarr[1]=='vanzare'){
$f_vanz_inc2=' de vanzare';
}
if ($urlarr[1]=='inchiriere'){
$f_vanz_inc2=' de inchiriat';
} */
$found_imob_categ_db=str_replace("_"," ",$found_imob_categ_db);
?>
( anunturi)
}?>
//echo '
';
echo '
';
echo 'Pagina ';
for($i = 0; $i < $total; $i++){
if ($i==0 || $i%10==0){
$i_afis=$i_afis+1;
$lim=$i_afis*10; //echo $lim_trimis.'|'; echo $lim;
if($i_afis>1) //la prima pagina nu mai pun in url pag_1
$nr_pag_txt='-pag_'.$i_afis;
else
$nr_pag_txt='';
if ($lim_trimis==$lim)
echo ' '.$i_afis.' ';
else{
if ($pagini<=7 || $i_afis==1 || $i_afis==$pagini || ($pag_curr-$i_afis<=10 && $pag_curr-$i_afis>0) || ($i_afis-$pag_curr<=10 && $i_afis-$pag_curr>0) ) {
echo $lnk_pag.$sir_ordonare.$nr_pag_txt.$id_loca_.'" title="Anunturi imobiliare- pagina '.$i_afis.'"> '.$i_afis.' ';}
else{
if ($i_afis==2 || $i_afis==$pagini-1)
echo "...";
}
}
}
}
echo '
';
if ($row["strada"]) //satele de ex pot sa nu aiba strada
echo '
Str. '.$row["strada"].', ';
if (empty($id_judet))
echo $row["localit"].'
';
else{
$lik_loca= 'http://imobiliare.casesigradini.ro/categ_localit.php?'.$row["localit"].$found_vanz_inc.$found_imob_categ_.$found_imob_prop_.$found_imob_pret_.$found_imob_cam_.$found_imob_etaj_.'-'.$row["id_loca_db"];
echo ''.$row["localit"].'';
}
if ($row["nr_cam"]==1)
$camere='o camera, ';
else
$camere=$row["nr_cam"].' camere, ';
if ($tip_propriet==1 || $tip_propriet==2) //daca nu e teren
echo '
'.$camere.'suprafata '.$row["sup_util"].' mp, ';
if ($tip_propriet==1){ //daca e apartament sau garsoniera
if ($row["etaj"] && $row["etaj_max"])
echo 'etaj '.$row["etaj"].' din '.$row["etaj_max"].'
';
if ($row["etaj"] && empty($row["etaj_max"]))
echo 'etaj '.$row["etaj"].'';
if (empty($row["etaj"]) && $row["etaj_max"])
echo 'imobil cu '.$row["etaj_max"].' etaje';
}
if ($tip_propriet==2) //daca e casa, pensiune, spatiu birou, spatiu industrial nivel_txt,sup_teren,front_str
echo $row["nivel_txt"].'';
if ($tip_propriet==2 || $tip_propriet==3){ //daca e casa, pensiune, spatiu birou, spatiu industrial sau teren
echo '
'.'teren '.$row["sup_teren"].' mp';
if ($row["front_str"])
echo ', front stradal '.$row["front_str"].' m';
echo '
';
}
if ($row["imob_proprietar"]==2)
$tip_prop='Vanzare prin agentie imobiliara';
if ($row["imob_proprietar"]==1)
$tip_prop='Vanzare directa de catre proprietar';
echo '