Php Code Konusunda Küçük Bir Yardıma İhtiyacım Var
-
arkadaşlar şimdi burda bir tablo içinde bir resim var boyutlarını büyülttüm ama resmin kenarında şehir , semt , metrekare , fiyat birde detaylı incele butonu var şimdi resmin kenarındaki bu bilgileri resmin altına bir satıra şehir , semt altına metre kare fiyat en altada detaylı incele butonunu koymak istiyorum yapamadım bi yardımcı olabilirmisiniz.
Şimdiden Teşekkürler.
<table width="600" height="47" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<?
$x=1;
$t = 1;
$z = 1;
$sql = "select count(*) as count_row from t_advert where Visible='1' and DisplayAdvert='1'";
$record_count = CountRow($sql);
if ($record_count > 0) {
$record_per_page = GetName("select * from t_count_page","DisplayCount");
$page_count = ceil($record_count/$record_per_page);
}
$sql = "select
t1.*, ".GetCurrency($_SESSION['LangCurrency'])."
t2.Name as estate_type,
t3.Name as estate_status,
t4.Name as estate_township,
t6.Currency as estate_rent_currency,
t7.Images as estate_images,
t8.Name as estate_city
from t_advert t1
inner join t_properties t2 on t2.PageType='EstateType'
inner join t_properties t3 on t3.PageType='EstateStatus'
inner join t_properties t4 on t4.PageType='TownShip'
inner join t_exchange t6 on t6.Currency=t1.RentCurrency
inner join t_advert_images t7 on t7.ParentID=t1.ID
inner join t_properties t8 on t8.PageType='City'
where
t2.ItemID = t1.EstateType and t2.PageLang='".$_SESSION['Lang']."' and
t3.ItemID = t1.EstateStatus and t3.PageLang='".$_SESSION['Lang']."' and
t4.ID = t1.TownShipID and
t6.Currency = t1.RentCurrency and
t7.ParentID = t1.ID and t7.Seq = (select min(Seq) from t_advert_images where Visible='1' and ParentID=t1.ID group by Seq LIMIT 0,1) and
t8.ID = t1.CityID and
t1.Visible='1' and t1.DisplayAdvert='1' order by ListPrice limit ".($_GET['page_no']*$record_per_page).",".$record_per_page;
$qrDisplay = mysql_query($sql);
while($rsDisplay = mysql_fetch_array($qrDisplay)) {
?>
<td>
<div class="ilanmodule mod-rounded mod-rounded-header mod-rounded-grey mod-rounded-header-<?=($MenuColor)?> ">
<div class="header-1">
<div class="header-2">
<div class="header-3"></div>
</div>
</div>
<h3 class="header"><a href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html" class="BlackLink"><b>
<?=($rsDisplay['estate_status'] . " - ". $rsDisplay['estate_type'])?>
</b></a></h3>
<div class="box-t1">
<div class="box-t2">
<div class="box-t3"></div>
</div>
</div>
<div class="box-1">
<div class="box-2 deepest">
<table width="350" height="220" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="19"><table width="100%" border="0" cellspacing="0" cellpadding="0">
</table></td>
</tr>
<tr>
<td height="7"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="145" valign="top"><a href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html">
<? if ($rsDisplay['AdvertType'] == 2) { ?>
<img src="sold.php?str=<?=($_SESSION['Sold'])?>&img=images/estate/<?=($rsDisplay['estate_images'])?>_normal.jpg" border="0">
<? } else { ?>
<center>
<img src="images/estate/<?=($rsDisplay['estate_images'])?>_normal.jpg" width="250" height="210" border="1" align="middle">
</center>
<? } ?>
</a></td>
<td width="10"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="443" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="55" height="19" class="BrownText10"><?=($_SESSION['CityName'])?></td>
<td width="8" class="BrownText10">:</td>
<td class="BrownTextRegular"><?=($rsDisplay['estate_city'])?></td>
</tr>
<tr>
<td height="19" class="BrownText10"><?=($_SESSION['TownShip'])?></td>
<td class="BrownText10">:</td>
<td class="BrownTextRegular"><?=($rsDisplay['estate_township'])?></td>
</tr>
<tr>
<td height="19" class="BrownText10"><?=($_SESSION['SquareMeter'])?></td>
<td class="BrownText10">:</td>
<td class="BrownTextRegular"><?=($rsDisplay['SquareMeter']. " m<sup>2</sup>")?></td>
</tr>
<tr>
<td height="19" class="BrownText10"><?=($_SESSION['Price'])?></td>
<td class="BrownText10">:</td>
<td class="BrownTextRegular"><?=(number_format($rsDisplay['RentPrice']) . " " . $rsDisplay['RentCurrency'])?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="74%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="22" align="center" style="cursor:pointer; cursor:hand;"> </td>
<td width="84"><p class="readmore"><a class="readmore" href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html">
<?=($_SESSION['DetailAdvertInfo'])?>
</a></p></td>
<td width="15" align="center" style="cursor:pointer; cursor:hand;"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table></td>
<? if($t != 1) { ?>
<td height="10" valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
<?
$t++;
} else {
$t = 1;
}
?>
<tr>
</table>
</div>
</div>
<div class="box-b1">
<div class="box-b2">
<div class="box-b3"></div>
</div>
</div>
</div>
<td height="1" valign="top"><img src="images/spacer.gif" width="3" height="1"></td>
<?
if(($x % 2) == 0) {
echo "</tr>\n";
echo "<tr>\n";
}
$x++;
$z++;
}
?></tr>
</table>
<? if ($page_count>1) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="6"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="CECCCC"><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="F2F1F1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" bgcolor="#FFFFFF" class="BrownTextRegular10"> <?
if ($page_count>1) {
echo $_SESSION['SearchPage']. " ";
echo $_GET['page_no'] + 1 . " / " . $page_count;
}
?>
</td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<td bgcolor="#FFFFFF" <?=($_GET['page_no']==0?"width=\"80\"":"")?>>
<? if ($_GET['page_no'] > 0) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"><img src="images/pre_ok.gif" width="15" height="16"></td>
<td class="BrownTextRegular10"><a href="index.php?page_no=<?=($_GET['page_no'] - 1);?>" class="BlackLink"><font color="#303030"><?=($_SESSION['SearchPreviousPage'])?></font></a></td>
</tr>
</table></td>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<? } ?>
</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<td bgcolor="#FFFFFF"><table width="100%" height="18" border="0" cellpadding="0" cellspacing="0">
<tr>
<?
if ($page_count>1) {
for ($m=1;$m<=$page_count;$m++) {
?>
<td width="16" align="center" class="BrownTextRegular10"><?
if($m-1==$_GET['page_no']) {
echo "<b>".$m."</b>";
} else {
echo "<a href='index.php?page_no=".($m-1)."' class='BlackLink'><u>".$m."</u></a>";
}
?></td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<?
} //for ($m=1;$m<=$page_count;$m++) {
} //if ($page_count>1) {
?>
</tr>
</table></td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table></td>
<? if ($_GET['page_no'] < $page_count - 1) { ?>
<td bgcolor="#FFFFFF">
<? } else { ?>
<td bgcolor="#FFFFFF" width="80">
<? } ?>
<? if ($_GET['page_no'] < $page_count - 1) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" class="BrownTextRegular10"><a href="index.php?page_no=<?=($_GET['page_no'] + 1)?>" class="BlackLink"><font color="#303030"><?=($_SESSION['SearchNextPage'])?></font></a></td>
<td width="15"><img src="images/ok_next.gif" width="15" height="16"></td>
</tr>
</table></td>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<? } ?>
</td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table></td>
<td width="100"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<? } ?>
-
resmin altina bu kodu oldugu gibi yerlestir
<br />
<div>
<table width="100%">
<tr><td><?=($rsDisplay['estate_city'])?></td><td><?=($rsDisplay['estate_township'])?></td></tr>
<tr><td><?=($rsDisplay['SquareMeter']. " m<sup>2</sup>")?></td><td><?=(number_format($rsDisplay['RentPrice']) . " " . $rsDisplay['RentCurrency'])?></td></tr>
<tr><td></td><td><p class="readmore"><a class="readmore" href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html">
<?=($_SESSION['DetailAdvertInfo'])?>
</a></p></td></tr>
</table>
</div> -
<table width="600" height="47" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<?
$x=1;
$t = 1;
$z = 1;
$sql = "select count(*) as count_row from t_advert where Visible='1' and DisplayAdvert='1'";
$record_count = CountRow($sql);
if ($record_count > 0) {
$record_per_page = GetName("select * from t_count_page","DisplayCount");
$page_count = ceil($record_count/$record_per_page);
}
$sql = "select
t1.*, ".GetCurrency($_SESSION['LangCurrency'])."
t2.Name as estate_type,
t3.Name as estate_status,
t4.Name as estate_township,
t6.Currency as estate_rent_currency,
t7.Images as estate_images,
t8.Name as estate_city
from t_advert t1
inner join t_properties t2 on t2.PageType='EstateType'
inner join t_properties t3 on t3.PageType='EstateStatus'
inner join t_properties t4 on t4.PageType='TownShip'
inner join t_exchange t6 on t6.Currency=t1.RentCurrency
inner join t_advert_images t7 on t7.ParentID=t1.ID
inner join t_properties t8 on t8.PageType='City'
where
t2.ItemID = t1.EstateType and t2.PageLang='".$_SESSION['Lang']."' and
t3.ItemID = t1.EstateStatus and t3.PageLang='".$_SESSION['Lang']."' and
t4.ID = t1.TownShipID and
t6.Currency = t1.RentCurrency and
t7.ParentID = t1.ID and t7.Seq = (select min(Seq) from t_advert_images where Visible='1' and ParentID=t1.ID group by Seq LIMIT 0,1) and
t8.ID = t1.CityID and
t1.Visible='1' and t1.DisplayAdvert='1' order by ListPrice limit ".($_GET['page_no']*$record_per_page).",".$record_per_page;
$qrDisplay = mysql_query($sql);
while($rsDisplay = mysql_fetch_array($qrDisplay)) {
?>
<td>
<div class="ilanmodule mod-rounded mod-rounded-header mod-rounded-grey mod-rounded-header-<?=($MenuColor)?> ">
<div class="header-1">
<div class="header-2">
<div class="header-3"></div>
</div>
</div>
<h3 class="header"><a href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html" class="BlackLink"><b>
<?=($rsDisplay['estate_status'] . " - ". $rsDisplay['estate_type'])?>
</b></a></h3>
<div class="box-t1">
<div class="box-t2">
<div class="box-t3"></div>
</div>
</div>
<div class="box-1">
<div class="box-2 deepest">
<table width="350" height="220" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="19"><table width="100%" border="0" cellspacing="0" cellpadding="0">
</table></td>
</tr>
<tr>
<td height="7"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="145" valign="top"><a href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html">
<? if ($rsDisplay['AdvertType'] == 2) { ?>
<img src="sold.php?str=<?=($_SESSION['Sold'])?>&img=images/estate/<?=($rsDisplay['estate_images'])?>_normal.jpg" border="0">
<? } else { ?>
<center>
<img src="images/estate/<?=($rsDisplay['estate_images'])?>_normal.jpg" width="250" height="210" border="1" align="middle">
</center>
<? } ?>
</a></td>
<td width="10"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="443" valign="top"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"><img src="images/spacer.gif" width="1" height="1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="55" height="19" class="BrownText10"><?=($_SESSION['CityName'])?></td>
<td width="8" class="BrownText10">:</td>
<td class="BrownTextRegular"><?=($rsDisplay['estate_city'])?></td>
</tr>
<tr>
<td height="19" class="BrownText10"><?=($_SESSION['TownShip'])?></td>
<td class="BrownText10">:</td>
<td class="BrownTextRegular"><?=($rsDisplay['estate_township'])?></td>
</tr>
<tr>
<td height="19" class="BrownText10"><?=($_SESSION['SquareMeter'])?></td>
<td class="BrownText10">:</td>
<td class="BrownTextRegular"><?=($rsDisplay['SquareMeter']. " m<sup>2</sup>")?></td>
</tr>
<tr>
<td height="19" class="BrownText10"><?=($_SESSION['Price'])?></td>
<td class="BrownText10">:</td>
<td class="BrownTextRegular"><?=(number_format($rsDisplay['RentPrice']) . " " . $rsDisplay['RentCurrency'])?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="74%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="22" align="center" style="cursor:pointer; cursor:hand;"> </td>
<td width="84"><p class="readmore"><a class="readmore" href="Detaylar-<?=dosya($rsDisplay['ID'])?>-<?=dosya($rsDisplay['Location'])?>-<?=dosya($rsDisplay['estate_city'])?>-<?=dosya($rsDisplay['estate_township'])?>-<?=dosya($rsDisplay['PageTitle'])?>.html">
<?=($_SESSION['DetailAdvertInfo'])?>
</a></p></td>
<td width="15" align="center" style="cursor:pointer; cursor:hand;"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<? if($t != 1) { ?>
<td height="10" valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
<?
$t++;
} else {
$t = 1;
}
?>
<tr>
</table>
</div>
</div>
<div class="box-b1">
<div class="box-b2">
<div class="box-b3"></div>
</div>
</div>
</div>
<td height="1" valign="top"><img src="images/spacer.gif" width="3" height="1"></td>
<?
if(($x % 2) == 0) {
echo "</tr>\n";
echo "<tr>\n";
}
$x++;
$z++;
}
?></tr>
</table>
<? if ($page_count>1) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="6"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="CECCCC"><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="F2F1F1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" bgcolor="#FFFFFF" class="BrownTextRegular10"> <?
if ($page_count>1) {
echo $_SESSION['SearchPage']. " ";
echo $_GET['page_no'] + 1 . " / " . $page_count;
}
?>
</td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<td bgcolor="#FFFFFF" <?=($_GET['page_no']==0?"width=\"80\"":"")?>>
<? if ($_GET['page_no'] > 0) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"><img src="images/pre_ok.gif" width="15" height="16"></td>
<td class="BrownTextRegular10"><a href="index.php?page_no=<?=($_GET['page_no'] - 1);?>" class="BlackLink"><font color="#303030"><?=($_SESSION['SearchPreviousPage'])?></font></a></td>
</tr>
</table></td>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<? } ?>
</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<td bgcolor="#FFFFFF"><table width="100%" height="18" border="0" cellpadding="0" cellspacing="0">
<tr>
<?
if ($page_count>1) {
for ($m=1;$m<=$page_count;$m++) {
?>
<td width="16" align="center" class="BrownTextRegular10"><?
if($m-1==$_GET['page_no']) {
echo "<b>".$m."</b>";
} else {
echo "<a href='index.php?page_no=".($m-1)."' class='BlackLink'><u>".$m."</u></a>";
}
?></td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
<?
} //for ($m=1;$m<=$page_count;$m++) {
} //if ($page_count>1) {
?>
</tr>
</table></td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table></td>
<? if ($_GET['page_no'] < $page_count - 1) { ?>
<td bgcolor="#FFFFFF">
<? } else { ?>
<td bgcolor="#FFFFFF" width="80">
<? } ?>
<? if ($_GET['page_no'] < $page_count - 1) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" class="BrownTextRegular10"><a href="index.php?page_no=<?=($_GET['page_no'] + 1)?>" class="BlackLink"><font color="#303030"><?=($_SESSION['SearchNextPage'])?></font></a></td>
<td width="15"><img src="images/ok_next.gif" width="15" height="16"></td>
</tr>
</table></td>
<td width="7"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<? } ?>
</td>
<td width="1" bgcolor="CECCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table></td>
<td width="100"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<? } ?>
