}
else
{
include_once "login.php3";
echo " ";
?>
echo total_sell_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
/*$r = mysql_fetch_array($res_member_type);
$login = $r['login'];
$mem_product_id = $r['product_id'];
$prod_table_id = $r['prod_table_id'];
$plan = $r['plan'];
$expdate = $r['expdate'];
$flag = $r['flag'];
$date = date('Y-m-d');*/
echo "";
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 " | ";
echo "| | ";
sell_buy_posting_info($DATABASE,$DATABASE1,$mem_login,$product_id,'sell',$category,$memberlogin,$showdate,'','0',$posting_id,$product_table_id);
echo " | ";
echo" | ";
}
}
echo " ";
?>
| |