Ver Mensaje Individual
  #11 (permalink)  
Antiguo 06/04/2011, 12:35
dplis
(Desactivado)
 
Fecha de Ingreso: septiembre-2010
Mensajes: 7
Antigüedad: 14 años, 2 meses
Puntos: 0
Respuesta: Cambiar moneda en sitio echo en php

os dejo el archivo PAYMENT.PHP , es este:

<?
require_once("conn.php");
require_once("includes.php");

if(empty($_GET[SelectedPackage]))
{
header("location:$_SERVER[HTTP_REFERER]?e=1&PaymentGateway=$_GET[PaymentGateway]");
exit();
}
elseif(empty($_GET[PaymentGateway]))
{
header("location:$_SERVER[HTTP_REFERER]?e=2&SelectedPackage=$_GET[SelectedPackage]");
exit();
}
else
{
if(!empty($_SESSION[AgentID]))
{
$MyID = $_SESSION[AgentID];
}

if(!empty($_SESSION[MemberID]))
{
$MyID = $_SESSION[MemberID];
}

//get the agent details
$q1 = "select * from class_members where MemberID = '$MyID' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);

//get the price details
$q2 = "select * from class_prices where PriceID = '$_GET[SelectedPackage]' ";
$r2 = mysql_query($q2) or die(mysql_error());
$a2 = mysql_fetch_array($r2);

/*

flags:

r -> renew

n -> new

m -> more

*/

if(ereg("renew.php", $_SERVER[HTTP_REFERER]))
{
$flag = "r";
$action = "Renewal";
}
elseif(ereg("more.php", $_SERVER[HTTP_REFERER]))
{
$flag = "m";
$action = "Upgrade";
}
else
{
$flag = "n";
$action = "Activation";
}

if($_GET[PaymentGateway] == "paypal")
{
header("location:https://www.paypal.com/xclick?business=$aset[PayPalEmail]&item_name=$a2[ads] anuncios por $a2[days] dias&first_name=$a1[FirstName]&last_name=$a1[LastName]&email=$a1[email]&item_number=1&custom=$MyID|$_GET[SelectedPackage]|$flag&amount=$a2[price]&notify_url=http://$_SERVER[HTTP_HOST]".dirname($_SERVER[PHP_SELF])."/notify.php&return=http://$_SERVER[HTTP_HOST]".dirname($_SERVER[PHP_SELF])."/login.php");

exit();

}

}

?>

y el archivo PAYPA.PHP


<br><br>

<form method=get action="payment.php" name=PricesForm>

<table align=center width=400 cellspacing=0>
<caption align=center>
<br>
<font color=red size=2 face=verdana><b><?=$error?></b></font>

</caption>

<tr style="background-color:D3D4E8; color:black; font-family:verdana; font-size:11; font-weight:bold">
<td width=20>&nbsp;</td>
<td width=270>Plan</td>
<td width=100 align=right>Precio</td>
</tr>

<?=$Prices?>

<tr>
<td colspan=3 align=center style="padding-top:20">
Forma de pago:
<select name="PaymentGateway">
<option value="paypal">PayPal</option>
</select>

<input type=submit name=s1 value=Enviar>
</td>
</tr>

</table>

</form>

gRACIAS DE ANTEMANO