Valutazione discussione:
  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5
Erroe di parsing nell'esecuzione di uno script
#1
Ho modificato uno script php, ma adesso quando viene eseguito mi da questo errore: "Parse error: syntax error, unexpected $end in /home/centbd13/public_html/themes/default/cashout.php on line 170". Posto l'intero script

Codice PHP:
<?php
if(!defined('GEN2_PROCESS')) { exit(); }

if(
$loggedin)
{

include_once(
'menu.php');

 
$contents .= "$menu_text<br />";

$ref_title "Cashout Funds";
$tp .= "<h3><center>Cashout Funds</center></h3>";

if(isset(
$_GET['alertpay']))
{
if(
$set['ap_automated'] and $do->is_curl_installed() and (($set['upg_automated'] > and $ir['upgraded'] > time()) or $set['upg_automated'] == 0))
{
include 
"modules/autopay/alertpay.php";
    
$alertpay = new CYsAlertPayAutoPay($set['ap_username'], $set['ap_password'], $set['ap_transpin']);
    switch(
$alertpay->pay($ir['alertpay_email'], $ir['balance'], "1"0$set['ap_note']))
    {
        default: case 
0: echo("Payment not sent due to unexpected error."); break;
        case 
1: echo("Payment sent successfully."); $ap_p_sent=1; break;
        case 
2: echo("Recipient's email missing."); break;
        case 
3: echo("Invalid payment amount."); break;
        case 
4: echo("Insufficient funds."); break;
        case 
5: echo("Invalid payment reason."); break;
        case 
6: echo("Sending funds to your own account is not allowed."); break;
        case 
7: echo("The format for login email is invalid."); break;
        case 
8: echo("The password is invalid."); break;
        case 
9: echo("Recipient's email must be in the correct format."); break;
        case 
10: echo("The transaction PIN is invalid."); break;
    }
if(
$ap_p_sent)
{
mysql_query("UPDATE users SET balance='0', withdrew=withdrew+'{$ir['balance']}' WHERE username='{$ir['username']}' LIMIT 1;");
mysql_query("UPDATE settings SET set_value=set_value+'{$ir['balance']}' WHERE set_name='total_paid' LIMIT 1;");
} else {
echo 
"Sorry, we couldn't send your payment - try again later.<br />
<a href='javascript:history.back()'>Back</a><br />"
;
}
$do->refresh_sess(); //vital
} else {
if(
$ir['pcashout'] > 0)
{
$contents .= "<h3><center>You have a payment pending.</center></h3>
<p>You cannot cashout while you have a payment which needs to be sent - Please wait until you have been paid your previous requests first.</p>"
;
} else {
mysql_query("UPDATE users SET balance='0', pcashout=pcashout+'{$ir['balance']}', pmethod='2' WHERE username='{$ir['username']}' LIMIT 1;");
$contents .= "<h3><center>Payment Requested</center></h3>
<p>Your payment has been requested, We'll check the request and then send it via AlertPay - If you wish to change your payment email, simply check your account.</p>"
;
$do->refresh_sess(); //vital
}
}
} elseif(isset(
$_GET['paypal']))
{
if(
$set['pp_automated'] and $do->is_curl_installed() and (($set['upg_automated'] > and $ir['upgraded'] > time()) or $set['upg_automated'] == 0))
{
//Configure the variables.
$pp_email $set['pp_username'];
$pp_pass $set['pp_password'];
$payment_name $set['pp_subject'];
$payment_to $ir['paypal_email'];
$payment_amnt $ir['balance'];
$pp_msg $set['pp_message'];
$pp_personal "Thanks!";
$pp_subject $set['pp_subject'];

include 
"modules/autopay/paypal.php";
if(
$paypalExist)
{
$contents .= "<h3><center>Payment Not Sent</center></h3>
<p>When processing your payment PayPal could not find an account with you're email - please check that you have a valid e-mail address registered with PayPal.</p>"
;
} elseif(!
$moneySent)
{
$contents .= "<h3>Payment Corrupted</h3>
<p>While trying to send your payment a connection with PayPal restarted and a connection timeout occured - please try again later. It may just be some PayPal maintenance.</p>"
;
} else {
$contents .= "<h3><center>Payment Sent!</center></h3>
<p>We've sent <b>\$
{$ir['balance']}</b> to <b>{$ir['paypal_email']}</b> automatically - please check your inbox.</p>";
mysql_query("UPDATE users SET balance='0', withdrew=withdrew+'{$ir['balance']}' WHERE username='{$ir['username']}' LIMIT 1;");
mysql_query("UPDATE settings SET set_value=set_value+'{$ir['balance']}' WHERE set_name='total_paid' LIMIT 1;");
$do->refresh_sess(); //vital
}
} else {
if(
$ir['pcashout'] > 0)
{
$contents .= "<h3><center>You have a payment pending.</center></h3>
<p>You cannot cashout while you have a payment which needs to be sent - Please wait until you have been paid your previous requests first.</p>"
;
} else {
mysql_query("UPDATE users SET balance='0', pcashout=pcashout+'{$ir['balance']}', pmethod='1' WHERE username='{$ir['username']}' LIMIT 1;") or die(mysql_error());
$contents .= "<h3><center>Payment Requested</center></h3>
<p>Your payment has been requested, We'll check the request and then send it via PayPal - If you wish to change your payment email, simply check your account.</p>"
;
$do->refresh_sess(); //vital
}
}
} else {
if(
$set['pp_enabled'])
$contents .= "<br />";
if(
$_POST['exch'] > and is_numeric($_POST['exch']))
{

if(
$_POST['exch'] > $set['min_cashout'])
{
$contents .= "<p>You don't that much balance to request payout.</p>";
} else {
mysql_query("UPDATE users SET  balance=balance-'{$_POST['exch']}' WHERE username='{$ir['username']}' LIMIT 1;");
$contents .= "You've successfully request  \${$_POST['exch']}.";
}
$do->refresh_sess();

{
$contents .= "<p><b>Cashout your Balance</b></p>
You currently have \$
{$ir['balance']} in your balance.<br />
<form method='post'>
Cashout to request: \$<input type='text' name='exch' size='5' value='
{$ir['balance']}'><br />
<input type='submit' value='Request'>
</form>"
;
if(
$set['pp_automated'] and (($set['upg_automated'] > and $ir['upgraded'] > time()) or $set['upg_automated'] == 0))
{
$tp .= "<p>Your funds will be sent <b>INSTANTLY</b> via PayPal, So you should recieve your funds on average 30 seconds after you've requested it.</p></div>";
} else {
$tp .= "<p>Your funds will be audited and screened by our professional anti-fraud department - Your funds should be dispatched within 5-7 days.</p></div>";
}
}
$tp .= "<br /><br />";
if(
$set['ap_enabled'])
if(
$_POST['exch'] > $set['min_cashout'])
{
$contents .= "<p>You don't that much balance to request payout.</p>";
} else {
mysql_query("UPDATE users SET  balance=balance-'{$_POST['exch']}' WHERE username='{$ir['username']}' LIMIT 1;");
$contents .= "You've successfully request  \${$_POST['exch']}.";
}
$do->refresh_sess();

{
$contents .= "<p><b>Cashout your Balance</b></p>
You currently have \$
{$ir['balance']} in your balance.<br />
<form method='post'>
Cashout to request: \$<input type='text' name='exch' size='5' value='
{$ir['balance']}'><br />
<input type='submit' value='Request'>
</form>"
;
if(
$set['ap_automated']  and (($set['upg_automated'] > and $ir['upgraded'] > time()) or $set['upg_automated'] == 0))
{
$tp .= "<p>Your funds will be sent <b>INSTANTLY</b> via AlertPay, So you should recieve your funds on average 30 seconds after you've requested it.</p></div>";
} else {
$tp .= "<p>Your funds will be audited and screened by our professional anti-fraud department - Your funds should be dispatched within 5-7 days.</p></div>";
}
}
if(
$ir['balance'] < $set['min_cashout'])
{
$tp "<h3><center>Insufficient Funds</center></h3>
<p><center>You don't currently have enough funds to cash out - You need \$
{$set['min_cashout']} to cashout.</center></p>";
} elseif (
$ir['totalclicks']<150)
{
$tp "<h3><center>You haven't clicked 150 ads</center></h3>
<p>You clicked 
{$ir['totalclicks']} ads.You still need to click some ads before you can request the payout. </p>";
}
if(!
$set['pp_enabled'] and !$set['ap_enabled'])
{
$tp "<h3><center>Cashout Disabled</center></h3>
<p>There are currently no methods to cashout - but should resume shortly.</p>"
;
}
$contents .="$tp";

} else {
 
$do->login_return();
}
?>

quancuno mi puo dire dove è/sono gli errori di sintassi???
Cita messaggio
#2
Alla riga 100 c'è una parentesi graffa aperto in mezzo al codice (non è di un if, di un while, ecc.).
Se lo script continua a non funzionare, indenta il testo e controlla se ci sono parentesi graffe aperte e non chiuse e altre cose del genere.
Mattia!
Cita messaggio


Discussioni simili
Discussione Autore Risposte Letto Ultimo messaggio
  Script PHP per testare sicurezza Wifi Chandler 112 224.351 23/04/2018 18:18
Ultimo messaggio: Mattia
  shortlink con script di riconoscimento device Chandler 7 10.028 01/02/2017 16:09
Ultimo messaggio: Chandler
  script per generazione immagine da template Chandler 135 278.522 18/07/2015 08:19
Ultimo messaggio: Mattia
  estrarre script Chandler 4 11.705 22/01/2015 20:06
Ultimo messaggio: Chandler
  Script traduttore Chandler 75 171.754 21/10/2012 16:53
Ultimo messaggio: Chandler
  Problemo con script per importare dati di una tabella su un altro hosting filippo9639 7 20.506 27/12/2008 17:43
Ultimo messaggio: Mattia
  Script Upload Chandler 43 102.375 10/12/2008 16:22
Ultimo messaggio: Mattia
  Errore parziale su script PHP filippo9639 12 47.391 30/11/2008 16:17
Ultimo messaggio: filippo9639
  Problema con script PHP per trasferimento tabelle dati filippo9639 10 32.058 23/11/2008 18:08
Ultimo messaggio: filippo9639
  porzione di Codice PH che invalida script filippo9639 2 6.997 25/10/2008 18:49
Ultimo messaggio: filippo9639

Vai al forum:


Utenti che stanno guardando questa discussione: 1 Ospite(i)