25/01/2009 18:33
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
quancuno mi puo dire dove è/sono gli errori di sintassi???
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'] > 0 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'] > 0 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'] > 0 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'] > 0 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'] > 0 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???