<?
function gateways($amount, $failure, $success, $payid, $gatewayno, $gatewayname, $itemname, $default_cur_code, $yoursite, $username, $tr_id)
{
if($payid==3)
{
//WorldPay
					echo "<form action=https://select.worldpay.com/wcc/purchase method=post>";
					echo "<input type=hidden name=amount value=$amount>";
					echo "<input type=hidden name=currency value = $default_cur_code>";
					echo "<input type=hidden name=instId value=$gatewayno>";
					echo "<input type=hidden name=desc value=$itemname>";
					echo "<input type=hidden name=cartId value=$tr_id>";
					echo "<input type=hidden name=MC_callback value=$yoursite/payments/worldpay.php>";
					echo "<input type=image src=$yoursite/payments/logo/worldpay_logo.gif>";
					echo "</form>";	

}
if($payid==2)
{
//2Checkout
					echo "<form action=https://www2.2checkout.com/2co/buyer/purchase target=_blank method=GET>";
					echo "<input type=hidden name=sid value=$gatewayno>";
					echo "<input type=hidden name=total value=$amount>";
					echo "<input type=hidden name=cart_order_id value=$tr_id>";
					echo "<input type=hidden name=c_name value=$itemname>";
					echo "<input type=hidden name=c_description value=$itemname>";
					echo "<input type=hidden name=c_price value=$amount>";
					echo "<input type=hidden name=c_prod value=CO_$tr_id>";
					echo "<input type=image src=$yoursite/payments/logo/checkout_logo.gif>";
					echo "</form>";
}
if($payid==1)
{
//Paypal
					echo "<form action=https://www.paypal.com/cgi-bin/webscr method=post>";
					echo "<input type=hidden name=cmd value=_xclick>";
					echo "<input type=hidden name=business value=$gatewayno>";
					echo "<input type=hidden name=item_name value=$itemname>";
					echo "<input type=hidden name=amount value=$amount>";
					echo "<input type=hidden name=no_note value=1>";
					echo "<input type=hidden name=currency_code value=$default_cur_code>";
					echo "<input type=hidden name=rm value=2>";
					echo "<input type=hidden name=custom value=$tr_id>";
					echo "<input type=hidden name=return value=$yoursite>";
					echo "<input type=hidden name=cancel_return value=$yoursite/$failure.php>";
					echo "<input type=hidden name=notify_url value=$yoursite/payments/paypal.php>";
					echo "<input type=image src=$yoursite/payments/logo/paypal_logo.gif>";
					echo "</form>";
}
if($payid==4)
{
//Money Bookers
					echo "<form action=https://www.moneybookers.com/app/payment.pl target=_blank>";					echo "<input type=hidden name=generic value=1>";					echo "<input type=hidden name=pay_to_email value=$gatewayno >";					echo "<input type=hidden name=user_id value=1>";					echo "<input type=hidden name=amount value=$amount>";					echo "<input type=hidden name=language value=EN>";					echo "<input type=hidden name=currency value=$default_cur_code>";					echo "<input type=hidden name=return_url value=$yoursite/payments/moneybookers.php>";					echo "<input type=hidden name=cancel_url value=$yoursite/$failure>";					echo "<input type=hidden name=trans_id value=$tr_id>";					echo "<input type=image src=$yoursite/payments/logo/mb_logo.gif>";					echo "</form>";
}
if($payid==5)
{
//Nochex
					echo "<form name=atip method=post action=https://www.nochex.com/nochex.dll/checkout>";
					echo "<input type=hidden name=email value=$gatewayno >";
					echo "<input type=hidden name=amount value=$amount>";
					echo "<input type=hidden name=currency value=$default_cur_code>";
					echo "<input type=hidden name=responderurl value=$yoursite/payments/nochex.php>";
					echo "<input type=hidden name=returnurl value=$yoursite/payments/nochex.php>";
					echo "<input type=hidden name=cancelurl value=$yoursite/$failure>";
					echo "<input type=hidden name=ordernumber value=$tr_id>";
					echo "<input type=image src=$yoursite/payments/logo/nochex_logo.gif>";
					echo "</form>";
}
if($payid==6)
{
//ITechBids
					echo "<form action=$yoursite/payments/itechbids.php method=post>";
					echo "<input type=hidden name=amount value=$amount>";
					echo "<input type=hidden name=trans_id value=$tr_id>";
					echo "<input type=hidden name=currency value=$default_cur_code>";
					echo "<input type=image src=$yoursite/payments/logo/itech_logo.gif>";
					echo "</form>";
					
}
if($payid==7)
{
//Bank Transfer
					echo "<form action=offline.php method=post>";
					echo "<input type=hidden name=business value=$gatewayno>";
					echo "<input type=hidden name=item_name value=$itemname>";
                                        echo "<input type=hidden name=poster value=$username>";
					echo "<input type=hidden name=trans_id value=$tr_id>";
					echo "<input type=hidden name=amount value=$amount>";
					echo "<input type=hidden name=currency_code value=$default_cur_code>";
					echo "<input type=submit name=Pay value=Pay>";
					echo "</form>";
					
}}	
?>