include "header.php"; ?> |
include "menu.php"; ?>
|
|
 |
if(isset($_SESSION[member_login])){ ?>
}else if(isset($_SESSION[tent_login])){ ?>
}else{ ?>
} ?> |
|
|
รูป |
ประเภท |
รายละเอียด |
ราคา |
$strSQL2="SELECT classified_post_img.picshow, classified_type.type, classified_post.id, classified_post.type, classified_post.post_title, ";
$strSQL2.="classified_post_contact.name, classified_post_contact.tel, classified_post_contact.province_id, province.PROVINCE_NAME, ";
$strSQL2.="classified_post.post_date, classified_post.post_price_type, classified_post.post_price, classified_post.post_view ";
$strSQL2.="FROM `classified_post` ";
$strSQL2.="INNER JOIN classified_post_img ON classified_post.id=classified_post_img.post_id ";
$strSQL2.="INNER JOIN classified_type ON classified_post.post_type=classified_type.id ";
$strSQL2.="INNER JOIN classified_post_contact ON classified_post.id=classified_post_contact.post_id ";
$strSQL2.="INNER JOIN province ON classified_post_contact.province_id=province.PROVINCE_ID ";
$strSQL2.="INNER JOIN category ON classified_post.cate_id=category.id ";
$strSQL2.="INNER JOIN sub_category ON classified_post.sub_cate_id=sub_category.id ";
$strSQL2.="WHERE classified_post.post_sticky=1 ORDER BY classified_post.post_update DESC";
$objQuery2=mysql_query($strSQL2) or die("ERROR $strSQL2");;
while($objResult2 = mysql_fetch_row($objQuery2)){
$posturl2=rewrite($objResult2[4]);
?>
|
|
|
ติดต่อ :
โทร.
จ.
$postDate = $objResult2[9];
echo DateThai($postDate);
?>
|
|
if($objResult2[10]==1){
echo "ราคา ไม่ระบุ";
}else if($objResult2[10]==2){
$p_number=$objResult2[11];
$p_price= number_format($p_number);
echo "ราคา $p_price บาท";
}
?>
|
|
เข้าชม
ครั้ง |
|
if($objResult2[3]!=1){?>
} ?> |
|
|
} ?>
|
|
|
|
รูป |
ประเภท |
รายละเอียด |
ราคา |
|
$strSQL="SELECT classified_post_img.picshow, classified_type.type, classified_post.id, classified_post.type, classified_post.post_title, ";
$strSQL.="classified_post_contact.name, classified_post_contact.tel, classified_post_contact.province_id, province.PROVINCE_NAME, ";
$strSQL.="classified_post.post_date, classified_post.post_price_type, classified_post.post_price, classified_post.post_view ";
$strSQL.="FROM `classified_post` ";
$strSQL.="INNER JOIN classified_post_img ON classified_post.id=classified_post_img.post_id ";
$strSQL.="INNER JOIN classified_type ON classified_post.post_type=classified_type.id ";
$strSQL.="INNER JOIN classified_post_contact ON classified_post.id=classified_post_contact.post_id ";
$strSQL.="INNER JOIN province ON classified_post_contact.province_id=province.PROVINCE_ID ";
$strSQL.="INNER JOIN category ON classified_post.cate_id=category.id ";
$strSQL.="INNER JOIN sub_category ON classified_post.sub_cate_id=sub_category.id WHERE classified_post.post_sticky=0 ";
/*$strSQL1="SELECT category.*, sub_category.sub_cate_name FROM category ";
$strSQL1.="INNER JOIN sub_category ON category.id=sub_category.cate_id";*/
$objQuery = mysql_query($strSQL) or die("ERROR $strSQ1 บรรทัด 240-248");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 50; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$strSQL .=" ORDER BY classified_post.post_update DESC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
$i=0;
while($objResult = mysql_fetch_row($objQuery)){
$posturl=rewrite($objResult[4]);
$i++;
if($i%2==0)
{
$bgjob="#EAEAEA";
}
else
{
$bgjob="#FFFFFF";
}
?>
|
|
|
ติดต่อ :
โทร.
จ.
$postDate = $objResult[9];
echo DateThai($postDate);
?>
|
|
if($objResult[10]==1){
echo "ราคา ไม่ระบุ";
}else if($objResult[10]==2){
$p_number=$objResult[11];
$p_price= number_format($p_number);
echo "ราคา $p_price บาท";
}
?>
|
|
เข้าชม
ครั้ง |
|
if($objResult[3]!=1){?>
} ?> |
|
|
|
} ?>
|
|
$pages = new Paginator;
$pages->items_total = $Num_Rows;
$pages->mid_range = 10;
$pages->current_page = $Page;
$pages->default_ipp = $Per_Page;
$pages->url_next = $_SERVER["PHP_SELF"]."?QueryString=value&Page=";
$pages->paginate();
echo $pages->display_pages()
?> |
|
|
|
include "footer.php"; ?> |
|