start_time(); ?> Buy Polyester-Chips| POY| Viscose-Yarn| Acrylic| Naptha| Cotton "; //window.location = "i_want_tobuy.html?orderby=$orderby&asc=$asc"; } else { if($orderby != '') { $asc = "$asc"; $orderby = "$orderby"; } else { $asc = 'asc'; $orderby = flag; //$order_by = "$orderby $asc"; } } //............................pagination starts here ...............................// $query_total = "select id from $DATABASE1.`tz_postings` where `admin_status` = 'visible' AND `buyerseller` = 'sell' AND `posting_creation_date` > '2001-01-01'"; $result_total = @mysql_query($query_total); $count = @mysql_num_rows($result_total); $co_no = $count; // for generating the page numbers & the next button at the bottom $scriptpath ="i_want_to_buy.html"; if(!$hits_per_page) $hits_per_page = $limit; $pages_per_page = $limit; // paging if(!$from) ($from=0); if(!$to) ($to=$hits_per_page-1); if(!$nextpg_from) ($nextpg_from=0); if(!$nextpg_to) { if(($count/$hits_per_page)>$pages_per_page) ($nextpg_to = $pages_per_page); else { if($count>$hits_per_page) { $nextpg_to = intval($count/$hits_per_page); if($count%$hits_per_page)$nextpg_to += 1; } else $nextpg_to = 1; } } if($count<=$hits_per_page)$to = $count-1; //*** 'From' and 'To' values displayed ** $display_from=$from+1; $pgno = intval($display_from/$hits_per_page)+1; (($to <= ($count+1)) && ($display_to=$to+1)) || ($display_to=$count); $page_select_format=" >"; //*** previous page links ** if($nextpg_from>0) { $prevpg_from = $nextpg_from-$pages_per_page; $prevpg_to = $nextpg_from; $prev_from = $nextpg_from*$hits_per_page-$hits_per_page; $prev_to = $prev_from +$hits_per_page -1; $prev_url = $scriptpath."?". "hits_per_page=".r_($hits_per_page)."&". "orderby=$orderby&asc=$asc&from=$prev_from&to=$prev_to&nextpg_from=$prevpg_from&nextpg_to=$prevpg_to"; $page_select.="Previous "; } //*** Loop for printing the 1 2 3... Links ** for ($pageno=(1+$nextpg_from);$pageno <=($nextpg_to);$pageno++) { $temp=$page_select_format; $temp=ereg_replace("","$pageno","$temp"); $page_from=$pageno * $hits_per_page - $hits_per_page; $page_to= $page_from + $hits_per_page -1; if ($page_to >= ($count - 1)) { $page_to=$count - 1; } $page_path=$scriptpath."?". "hits_per_page=".r_($hits_per_page)."&". "orderby=$orderby&asc=$asc&from=$page_from&to=$page_to&nextpg_from=$nextpg_from&nextpg_to=$nextpg_to"; if($pageno==$pgno)$temp = " $pgno"; else $temp=ereg_replace("","$page_path",$temp); $page_select .=$temp; } $numofpages = intval($count/$hits_per_page); if($count%$hits_per_page)$numofpages += 1; //*** For generating [>>] link ** if($nextpg_to<$numofpages) { $page_from += $hits_per_page; //*** assign $page_to for displaying the next set of records ** if($page_to<($count-$hits_per_page)) $page_to += $hits_per_page; else $page_to += $count%$hits_per_page; $nextpg_from = $nextpg_to; //*** assign $nextpg_to for displaying the next set of pages ** if($nextpg_to< ($numofpages-($numofpages%$pages_per_page))) $nextpg_to += $pages_per_page; else $nextpg_to +=($numofpages%$pages_per_page); //*** generate the next url ** $next_url = $scriptpath."?". "hits_per_page=".r_($hits_per_page)."&". "sortby=".r_($sortby)."&". "sortorder=".r_($sortorder)."&". "orderby=$orderby&asc=$asc&from=$page_from&to=$page_to&nextpg_from=$nextpg_from&nextpg_to=$nextpg_to"; $page_select.=" Next"; } //........................... pagination ends here ...............................// ?> "; $calledframe = "I want to Buy"; include_once "../realestate/index.php3"; echo ""; include_once "../rssi/topbanner.php3"?>


"; ?>

 

"; echo " "; echo""; } } echo "

Search By >Reverse Order
*By default, priority is given to posting creation date. Use sort option to find your desired result.


"; if($orderby=='companyname') { $query_tz_postings="select a.* from tz_postings a where a.buyerseller='sell' and `admin_status` = 'visible' GROUP BY a.id order by a.posting_expdate DESC LIMIT $from, $hits_per_page"; } else { $query_tz_postings="select a.* from tz_postings a where a.buyerseller='sell' and `admin_status` = 'visible' GROUP BY a.id order by a.posting_creation_date DESC LIMIT $from, $hits_per_page"; } $res_tz_postings = mysql_query($query_tz_postings); $tz_postings = mysql_num_rows($res_tz_postings); if($tz_postings) { for($i=0;$i<$tz_postings;$i++) { $row = mysql_fetch_array($res_tz_postings); $posting_id=$row['id']; $product_table_id=$row['prod_table_id']; $memberlogin = $row['memberlogin']; $buyerseller = $row['buyerseller']; $pro_product_id = $row['product_id']; $price = $row['price']; $subject = $row['subject']; $comments = $row['comments']; $quantity = $row['quantity']; $category = $row['category']; $posting_creation_date = $row['posting_creation_date']; $showdate = $row['posting_expdate']; $mem_login = $login; $pro_id = explode("|", $pro_product_id); $pro_id_count = count($pro_id); //echo "
mem product id is : $mem_product_id ******************** old product id is : $pro_product_id"; if ($pro_id_count>1) { for($p=0;$p<$pro_id_count;$p++) { $new_product_id = $pro_id[$p]; $new_product_id = trim($new_product_id); //echo "
without in condition is $new_product_id"; if($mem_product_id == $new_product_id) { $product_id = $mem_product_id ; //echo "
mem product id is : $mem_product_id ******************** old product id is : $pro_product_id*********** new product_id is $product_id"; } } } else { $product_id=$row['product_id']; } $first_buyerseller = ucfirst($buyerseller); $all_buyerseller = strtoupper($buyerseller); if(($i%2)==0) {$bg_color='#EFEFEF';} else {$bg_color='#FFFFFF';}; echo "
 "; sell_buy_posting_info($DATABASE,$DATABASE1,$mem_login,$product_id,'sell',$category,$memberlogin,$showdate,'','0',$posting_id,$product_table_id); echo "
"; ?>
loading time for this page in ' .$totaltime. ' seconds. '; ?>