PHP - Problemas con codigo

 
Vista:

Problemas con codigo

Publicado por Arlex (1 intervención) el 27/05/2007 12:17:09
Tengo problemas con la funcion GetTextCode, por que no devuelve correctamente $okurl. concretamente el $ID cuando el servidor de devuelve a la pagina del vendedor.
Si alguien pueda echarme una mano, se lo agradeceré
enormemente, si es muy complicado pero lo puedes resolver, escríbeme y llegamos a un acuerdo.
El siguiente es el código:
<function>0) {
$par=$res[0][0];
$res=RunSql("select * from user where UID='$par'");
}
}
if ($level==2)
{
$res=RunSql("select parent2 from user where UID='$ref'");
if (count($res)>0) {
$par=$res[0][0];
$res=RunSql("select * from user where UID='$par'");

}
}
return $res;
}

function GetEmail($ref, $level)
{
global $admin_paypal_emails, $email_owner;
$sp=GetSponsor($ref, $level);
if (count($sp)>0) {
$email = $sp[0][3];
}
else {
if ($level==0) $email=$admin_paypal_emails[0];
if ($level==1) $email=$admin_paypal_emails[1];
if ($level==2) $email=$admin_paypal_emails[2];
if ($level==3) $email=$email_owner;
}
return $email;
}

function GetFormCode($ID)
{
global $pay_to_owner;
$res=RunSql("select payed,ref from tmp where sessid='$ID'");
$payed=$res[0][0];
$ref=$res[0][1];
//echo $ID111;
$to=$payed+1;
if (($pay_to_owner==0) and ($payed==2))
{
$to++;
}
//echo "--$to--";
return GetTextCode($ID,$payed,$ref,$to);
}

function GetTextCode($ID,$payed,$ref,$to)
{
global $SiteUrl, $payment_systems;
$okurl=$SiteUrl."accept$to.php?ID=$ID";
$badurl=$SiteUrl."decline.php?ID=$ID";
$str="<p>";
$price=GetPrice($payed+1);
$email=GetEmail($ref,$payed);
foreach ($payment_systems as $ps) {
include ($ps.'.php');
$str.='<br>';
}
$str.="</p>";
return $str;
}
?>

Muchas gracias por tu valioso tiempo.
Un saludo
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder