}
else
{
include_once "login.php3";
?>
//include_once "../rssi/register_upgrade_homepg_new_tz.php3";
echo " ";
echo total_buy_postings($DATABASE1);
}
?>
|
|
*By default, priority is given to posting creation date. Use sort option to find your desired result.
if($login){ ?>
} ?>
//Pratiksha's code started from here
if($orderby=='companyname')
{
$query_tz_postings="select a.* from tz_postings a where a.buyerseller='buy' and a.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='buy' and a.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);
/*$pro_id = explode("|", $product_id);
$pro_id_count = count($pro_id);
for($p=0;$p<$pro_id_count;$p++) {
//echo "$pro_id[$p] ";
$product_id = $pro_id[$p];*/
if($category=='fabric')
{$tab_name='tz_fabric_prod'; $field_name='fabric_id';}
$cat_id_qury="select $field_name from $DATABASE1.$tab_name where memberlogin='$login'";
if(($i%2)==0) {$bg_color='#EFEFEF';} else {$bg_color='#FFFFFF';};
?>
> | >| |
sell_buy_posting_info($DATABASE,$DATABASE1,$login,$product_id,$buyerseller,$category,$memberlogin,$showdate,'','0',$posting_id,$product_table_id);
?>
|
> |
}
}
echo " ";
?>
|