<?
	$admin="select * from genaralsettings where set_id=3";
	$admin_res=mysql_query($admin);
	$admin_row=mysql_fetch_array($admin_res);
	$mailfrom=$admin_row[set_value];

	$admin="select * from genaralsettings where set_id=5";
	$admin_res=mysql_query($admin);
	$admin_row=mysql_fetch_array($admin_res);
	$mysitename=$admin_row[set_value];

//welcome mail
$welcome["mail_from"] = "$mailfrom";
$welcome["mail_subject"] = "Welcome to $mysitename";
$welcome["mail_message1"] = "Dear <username>,<br>

Thank you for choosing $mysitename.<br>
Please Note :<br>
Your Registration Process is not completed yet<a href=<url>/verify.php?userid=<userid>> :
Click here to Confirm your Registration.</a> <br>
Your Username is :<username> <br>
Your Password is :<password> <br>
Your Verfication Code is : <vcode> <br>
Regards<BR>
Admin<BR>
$mysitename";

$welcome["mail_message2"] = "Dear <username>,<br>

Thank you for choosing us.<br>
Please Note :<br>
Your Username is :<username> <br>
Your Password is :<password> <br>
Regards <BR>
Admin<BR>
$mysitename";




//email to  friend mail
$email_to_friend["mail_from"] = "<user_mail>";
$email_to_friend["mail_subject"] = "<username>sent you this $mysitename item : <producttitle>(# <productid>)";
$email_to_friend["mail_message"] = "<table bgcolor=#F8F8FA style=border-top:2px solid #979BB3;border-bottom:2px solid #979BB3; cellpadding=5 cellspacing=2 width=50%>
<tr bgcolor=#EEEEF8><td>
<b><font size=2><username> Sent You This $mysitename
 Item.</font></b>
</td></tr>
<tr><td><b>Personal Message:</b><msg></td></tr>
<tr><td>
<a href=<page>>Click Here to View this Item.</a></td></tr></table>";




//mail to seller(reserve price met)
$reserve_price_met["mail_from"] = "$mailfrom";
$reserve_price_met["mail_subject"] = "Reserve Price Met";
$reserve_price_met["mail_message"] = "<table  bgcolor=#F8F8FA style=border-top:2px solid #979BB3;border-bottom:2px solid #979BB3; cellpadding=5 cellspacing=2 width=50% >
<tr bgcolor=#EEEEF8><td colspan=2 align=center >Reserve Price Has Been Met</td></tr>
<tr><td colspan=2> Dear <sellername>,</td></tr>
<tr><td colspan=2>Your Selling Item <b><itemname></b> (Id:<itemid>) has met the reserve price.  </td></tr>
<tr><td>
<table width=80%>
<tr> <td>Item Id  </td><td><itemid></td></tr>
<tr> <td>Item Title </td><td><itemname></td></tr>
<tr> <td>Sale Price </td><td><SALE_PRICE> </td></tr>
<tr> <td>Reserve Price </td><td><RESERVE_PRICE> </td></tr>
<tr><td></td><td><Buyer Details> </td></tr>
</table>
</td></tr>
<tr><td><BR>
Admin<BR>
$mysitename</td></tr>
</table>";




// mail to buyer(outbid)
$mail_to_buyer["mail_from"] = "$mailfrom";
$mail_to_buyer["mail_subject"] = "Another user placed a bid";
$mail_to_buyer["mail_message"] = "<table><tr><td>Hi,</td></tr>
<tr><td>Your Opponent user has bidded more than yours Product ID: <productid>.so proceed your bid further.
</td></tr><tr><td>Regards,<BR>
Admin<br>
$mysitename </td></tr></table>";




// A Bidder Win an Item
$bidder_win["mail_from"] = "$mailfrom";
$bidder_win["mail_subject"] = "You have won an Auction";
$bidder_win["mail_message"] = "Dear NAME, <br><br>
Congratulations! You have won the following item:<br>
<br>

Item Title: <a href=<GET_VIEW_ITEM>><PRODUCTTITLE></a><br><br>

To view the auction please visit <a href= <GET_VIEW_ITEM> >click here</a>.<br> <br>

To pay for the item:<br>

1. Log into your $mysitename account <br>

2. Got to My Auction<br>

3. Under the header All Buying click on Won<br>

4. You will see all items that you won, click on Pay Now to see the sellers preferred payment methods.<p>



Thank you,<BR>
Admin<BR>
$mysitename";




//mail to seller(Reserve Price Has not been Met )
$reserve_price_nmet["mail_from"] = "$mailfrom";
$reserve_price_nmet["mail_subject"] = "Reserve Price Has not been Met";
$reserve_price_nmet["mail_message"] = "Dear <username><br><br>\r\nReserve Price Has not been Met for this
<itemname>(# <itemid>). Feel free to relist your auction.
<br><br>Thank You<br>\r\n$mysitename";

//mail to buyer(Reserve Price Has not been Met )
$reserve_price_bmet["mail_from"] = "$mailfrom";
$reserve_price_bmet["mail_subject"] = "Reserve Price Has not been Met";
$reserve_price_bmet["mail_message"] = "Dear <username>,<br><br>\r\nReserve Price Has not been Met for this <itemname>(# <itemid>).<br><br>\r\n\r\nThank You\r\nBidsinn.com";


//ask question to a seller
$ask_seller["mail_from"] = "<buyer_email_id>";
$ask_seller["mail_subject"] = "$mysitename";
$ask_seller["mail_message"] = "Dear <seller_name>,<br>
<buyer_name> has ask this question regarding your product (<product_name> ).<br> 
<question> 
<br>
Best Regards,<BR>
Admin<BR>
$mysitename";


//A Bidder Win an Item
$bidder_win["mail_from"] = "$mailfrom";
$bidder_win["mail_subject"] = "You have won an Auction";
$bidder_win["mail_message"] = "Dear NAME, <br><br>
Congratulations! You have won the following item:<br>
<br>

Item Title: <a href=<GET_VIEW_ITEM>><PRODUCTTITLE></a><br><br>

To view the auction please visit <a href= <GET_VIEW_ITEM> >click here</a>.<br> <br>

To pay for the item:<br>

1. Log into your $mysitename account <br>

2. Got to My Auction<br>

3. Under the header All Buying click on Won<br>

4. You will see all items that you won, click on Pay Now to see the sellers preferred payment methods.<p>



Thank you,<br><BR>
Admin<BR>
$mysitename";




//mail to seller
$mail_seller["mail_from"] = "$mailfrom";
$mail_seller["mail_subject"] = "A Buyer brougt Your Item";
$mail_seller["mail_message"] = "<table  bgcolor=#F8F8FA style=border-top:2px solid #979BB3;border-bottom:2px solid #979BB3; cellpadding=5 cellspacing=2 width=50%>
<tr bgcolor=#EEEEF8><td colspan=2 align=center >Fixed Sale Announcement</td></tr>

<tr><td colspan=2> Dear <sellername>,</td></tr>

<tr><td colspan=2>Your Selling Item <b><itemname></b> (Id:<itemid>) is brought in Fixed Sale Method  </td></tr>


<Buyer Details>

<tr><td>Regards,<BR>
$mysitename</td></tr></table>
";



//Out Bids Remainder
$outbid_query_res["mail_from"] = "$mailfrom";
$outbid_query_res["mail_subject"] = "Another user placed a bid";
$outbid_query_res["mail_message"] = "<table><tr><td>Dear <user>,</td></tr><tr><td>Your opponent user has bidded more than yours.so proceed your bid further.</td></tr><tr><td>Regards,<BR>
Admin<BR>
$mysitename</td></tr></table>";





//Winner mail to seller
$win_mail_seller["mail_from"] = "$mailfrom";
$win_mail_seller["mail_subject"] = "Your Auction Sold";
$win_mail_seller["mail_message"] = "Dear SELLER, <br><br>
Congratulations! You have sold the following item:<br>
<br>

Item Title: <a href=GET_VIEW_ITEM>PRODUCTTITLE</a><br><br>

To view the buyers detail and the details on this auction please <a href=GET_VIEW_ITEM>click here</a>.<br> <br>

Thank you,<br><BR>
$mysitename";



//No Bid Placed for Your Auction
$no_bid_placed["mail_from"] = "$mailfrom";
$no_bid_placed["mail_subject"] = "Your Auction Closed";
$no_bid_placed["mail_message"] = "Dear <username>,<br><br>
Auction <item_name>(# <itemid>) did not sell.  Feel free to relist your auction.<br><br>
Thank You<<BR>
$mysitename";


//You got answer
$your_ans["mail_from"] = "<sender's email>";
$your_ans["mail_subject"] = "You got an answer";
$your_ans["mail_message"] = "Dear <username>,<br>

Your Question was :<question> <br>
Your Answer is :<answere> <br>
Regards <BR>
Admin<BR>
$mysitename";
?>