include "logincheck.php";
include_once "myconnect.php";
function main()
{
$subject="";
$msg="";
$label="回复";
$tid=0;
if(isset($_REQUEST["tid"]))
{
$tid=$_REQUEST["tid"];
}
elseif(isset($_REQUEST["sb_id"]))
{
$label="询价";
$sb_id=$_REQUEST["sb_id"];
switch($_REQUEST["sb_type"])
{
case 1:
$offer=mysql_fetch_array(mysql_query("select * from b2b_offers where sb_id=$sb_id"));
$tid=$offer["sb_uid"];
break;
case 2:
$offer=mysql_fetch_array(mysql_query("select * from b2b_offers_buy where sb_id=$sb_id"));
$tid=$offer["sb_uid"];
break;
case 3:
$offer=mysql_fetch_array(mysql_query("select * from b2b_products where sb_id=$sb_id"));
$tid=$offer["sb_uid"];
break;
case 4:
$offer=mysql_fetch_array(mysql_query("select * from b2b_companyprofiles where sb_id=$sb_id"));
$tid=$offer["sb_uid"];
break;
default: $tid=0;
}
}
if(isset($_REQUEST["type"])&&($_REQUEST["type"]=="contact"))
{
$label="Send Inquiries";
}
if(isset($_REQUEST["mid"]))
{
$mid=$_REQUEST["mid"];
$rst0=mysql_fetch_array(mysql_query("select * from b2b_messages where sb_id=$mid"));
$subject="Re:".$rst0["sb_subject"];
$msg="MESSAGE:: ".$rst0["sb_message"];
}
?>
if($tid==0)
{ echo "Reciever not found"; }
else
{
?>
}
?> |
|
}// end main
if(isset($_REQUEST["sb_type"]))
{include "template.php";}
else
{include "template1.php";}
?>