Script PaymentWall
#62

Any1 knows about that one?

 

<?phperror_reporting(E_ALL);

ini_set('display_errors', '1');

 

include '../Site_Settings/configuration.php';

 

$ip = $_SERVER['REMOTE_ADDR'];

 

$allowIP[0] = '174.36.92.186';

$allowIP[1] = '174.36.96.66';

$allowIP[2] = '174.36.92.187';

$allowIP[3] = '174.36.92.192';

$allowIP[4] = ''174.37.14.28;

 

 

if( in_array($ip, $allowIP) )

{

 

function Sanitize($data)

{

 

// remove whitespaces (not a must though)

$data = trim($data);

 

// apply stripslashes if magic_quotes_gpc is enabled

if(get_magic_quotes_gpc())

{

$data = stripslashes($data);

}

 

// a mySQL connection is required before using this function

$data = mysql_real_escape_string($data);

 

return $data;

}

 

function BanUser($uid, $reason)

{

include '../site_settings/configuration.php';

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("UPDATE t_users SET a_enable = 0 WHERE a_portal_index = '". $uid ."'") or die( mysql_error() );

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("INSERT INTO t_banlist (a_user_index, a_timestamp, a_reason, a_admin_name, a_action)

VALUES ('". $uid ."','". time() ."','". $reason ."','Paymentwall','BAN')") or die( mysql_error() );

}

 

function AddCash($uid, $amount, $ref)

{

include '../site_settings/configuration.php';

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("UPDATE newproject_db_auth.bg_user SET cash = cash + ". $amount ." WHERE user_code = '". $uid ."'") or die( mysql_error() );

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("INSERT INTO t_donate_log (a_user_index, a_timestamp, a_points, a_gm, a_ref)

VALUES('". $uid ."','".time()."','". $amount ."','Paymentwall','". $ref ."')") or die( mysql_error() );

}

 

function RemCash($uid, $amount, $ref)

{

include '../site_settings/configuration.php';

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("UPDATE bg_user SET cash = cash + ". addslashes( $amount )." WHERE user_code = '". addslashes( $uid ) ."'") or die( mysql_error() );

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("INSERT INTO t_donate_log (a_user_index, a_timestamp, a_points, a_gm, a_ref)

VALUES('". $uid ."','".time()."','". $amount ."','Paymentwall','". $ref ."')") or die( mysql_error() );

}

 

 

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result22 = mysql_query("SELECT a_secretkey from t_settings WHERE a_index = 1");

$key = mysql_fetch_array( $result22 );

 

$secretKey = $key['a_secretkey'];

 

$uid = Sanitize( $_GET['uid'] );

$currency = Sanitize( $_GET['currency'] );

$type = Sanitize( $_GET['type'] );

$ref = Sanitize( $_GET['ref'] );

$sig = Sanitize( $_GET['sig'] );

 

$pingback = 1;

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$query = sprintf("SELECT count(*) FROM bg_user WHERE user_code = '%s';", $uid);

$result = mysql_query($query) or die( mysql_error() );

$r = mysql_fetch_row( $result );

 

if( $r[0] == 1 )

{

 

 

if( $type == 0 || $type == 1 ) // Add cash

{

AddCash($uid, $currency, $ref);

echo 'OK';

}

 

 

// --> Chargeback

elseif( $type == 2 )

{

 

$reason = $_GET['reason'];

 

switch( $reason )

{

case 1:

BanUser($uid,'Chargeback',$ref);

break;

case 2:

BanUser($uid,'Credit Card fraud',$ref);

break;

case 3:

BanUser($uid,'Order fraud',$ref);

break;

case 4:

BanUser($uid,'Bad data entry',$ref);

break;

case 5:

BanUser($uid,'Fake / proxy user',$ref);

break;

case 6:

BanUser($uid,'Rejected by advertiser',$ref);

break;

case 7:

BanUser($uid,'Duplicate conversions',$ref);

break;

case 8:

BanUser($uid,'Goodwill credit taken back',$ref);

break;

case 9:

BanUser($uid,'Cancelled order',$ref);

break;

case 10:

BanUser($uid,'Partially reversed transaction',$ref);

break;

 

 

 

}

 

RemCash($uid, $currency);

echo 'OK';

 

 

}

// <---

 

 

 

}

else

{

echo 'Not found user '. $uid;

}

 

 

}

else

{

echo 'NO Access : ' . $_SERVER['REMOTE_ADDR'];

}

 

?>

 

well this it what happens:

Pingback wasn't successful. Reason: HTTP status code is different from 200

 

HTTP/1.0 500 Internal Server Error

Content-type: text/html

Server: Microsoft-IIS/7.5

X-powered-by: ASP.NET

X-powered-by-plesk: PleskWin

Date: Fri, 24 Aug 2012 12:57:13 GMT

Content-length: 1410

Connection: close

 

<HTML>

<HEAD>

<TITLE>500 Internal Server Error</TITLE>

</HEAD><BODY>

<H1>Internal Server Error</H1>

The server encountered an internal error or

misconfiguration and was unable to complete

your request.<P>

Please contact the server administrator to inform of the time the error occurred

and of anything you might have done that may have

caused the error.<P>

More information about this error may be available

in the server error log.<P>

<HR>

<ADDRESS>

Web Server at ******

</ADDRESS>

</BODY>

</HTML>

 

<!--

- Unfortunately, Microsoft has added a clever new

- "feature" to Internet Explorer. If the text of

- an error's message is "too small", specifically

- less than 512 bytes, Internet Explorer returns

- its own error message. You can turn that off,

- but it's pretty tricky to find switch called

- "smart error messages". That means, of course,

- that short error messages are censored by default.

- IIS always returns error messages that are long

- enough to make Internet Explorer happy. The

- workaround is pretty simple: pad the error

- message with a big comment like this to push it

- over the five hundred and twelve bytes minimum.

- Of course, that's exactly what you're reading

- right now.

-->



Messages In This Thread
[No subject] - by Kotetsu - 07-13-2012, 06:57 PM
[No subject] - by Wizatek - 07-13-2012, 07:20 PM
[No subject] - by Kotetsu - 07-13-2012, 07:23 PM
[No subject] - by Kotetsu - 07-13-2012, 07:30 PM
[No subject] - by Wizatek - 07-13-2012, 07:57 PM
[No subject] - by Kotetsu - 07-13-2012, 08:10 PM
[No subject] - by Wizatek - 07-13-2012, 08:49 PM
[No subject] - by Sutz - 07-14-2012, 12:46 AM
[No subject] - by fonsy84 - 07-14-2012, 07:37 PM
[No subject] - by Dungedragon - 07-14-2012, 07:43 PM
[No subject] - by Wizatek - 07-14-2012, 08:01 PM
[No subject] - by fonsy84 - 07-14-2012, 08:21 PM
[No subject] - by fonsy84 - 07-14-2012, 08:48 PM
[No subject] - by Wizatek - 07-14-2012, 09:12 PM
[No subject] - by Wizatek - 07-14-2012, 09:19 PM
[No subject] - by Kotetsu - 07-14-2012, 09:25 PM
[No subject] - by Wizatek - 07-14-2012, 09:28 PM
[No subject] - by Kotetsu - 07-14-2012, 09:29 PM
[No subject] - by Wizatek - 07-14-2012, 09:34 PM
[No subject] - by Kotetsu - 07-14-2012, 09:35 PM
[No subject] - by fonsy84 - 07-14-2012, 09:41 PM
[No subject] - by fonsy84 - 07-14-2012, 09:44 PM
[No subject] - by Wizatek - 07-14-2012, 09:56 PM
[No subject] - by fonsy84 - 07-14-2012, 09:58 PM
[No subject] - by fonsy84 - 07-14-2012, 10:01 PM
[No subject] - by Wizatek - 07-14-2012, 10:47 PM
[No subject] - by fonsy84 - 07-14-2012, 11:59 PM
[No subject] - by barroso - 07-27-2012, 05:49 PM
[No subject] - by Wizatek - 07-27-2012, 05:57 PM
[No subject] - by barroso - 07-27-2012, 06:01 PM
[No subject] - by barroso - 07-27-2012, 06:13 PM
[No subject] - by Wizatek - 07-27-2012, 06:53 PM
[No subject] - by barroso - 07-27-2012, 07:16 PM
[No subject] - by barroso - 07-27-2012, 07:34 PM
[No subject] - by Wizatek - 07-27-2012, 10:16 PM
[No subject] - by barroso - 07-27-2012, 10:56 PM
[No subject] - by Wizatek - 07-27-2012, 11:04 PM
[No subject] - by barroso - 07-27-2012, 11:22 PM
[No subject] - by Wizatek - 07-28-2012, 12:14 AM
[No subject] - by barroso - 07-28-2012, 12:24 AM
[No subject] - by SibaN - 07-28-2012, 06:57 AM
[No subject] - by Wizatek - 07-28-2012, 01:12 PM
[No subject] - by barroso - 07-28-2012, 04:42 PM
[No subject] - by Wizatek - 07-28-2012, 05:17 PM
[No subject] - by barroso - 07-28-2012, 05:43 PM
[No subject] - by barroso - 07-28-2012, 05:50 PM
[No subject] - by Wizatek - 07-28-2012, 07:09 PM
[No subject] - by Creep - 07-28-2012, 07:42 PM
[No subject] - by barroso - 07-28-2012, 07:52 PM
[No subject] - by Wizatek - 07-28-2012, 10:18 PM
[No subject] - by barroso - 07-28-2012, 11:56 PM
[No subject] - by Wizatek - 07-29-2012, 01:40 AM
[No subject] - by barroso - 07-29-2012, 02:00 AM
[No subject] - by barroso - 08-02-2012, 11:56 PM
[No subject] - by Creep - 08-05-2012, 10:29 AM
[No subject] - by fonsy84 - 08-10-2012, 05:32 PM
[No subject] - by Creep - 08-12-2012, 06:03 PM
[No subject] - by olo3007 - 08-12-2012, 07:23 PM
[No subject] - by barroso - 08-21-2012, 04:06 PM
[No subject] - by Creep - 08-23-2012, 10:26 AM
[No subject] - by Creep - 08-24-2012, 11:59 AM
[No subject] - by Creep - 08-24-2012, 01:01 PM
[No subject] - by Nikolee - 08-24-2012, 08:38 PM
[No subject] - by blacknelly - 08-25-2012, 01:07 AM
[No subject] - by Creep - 08-25-2012, 06:11 PM
[No subject] - by Creep - 09-08-2012, 07:00 PM
[No subject] - by Bradox - 09-10-2012, 03:27 PM
[No subject] - by xNiceEinzx - 09-12-2012, 03:19 PM
[No subject] - by HalloKitty - 09-15-2012, 06:41 PM
[No subject] - by Black191 - 09-16-2012, 04:40 PM
[No subject] - by Creep - 09-21-2012, 03:02 PM
[No subject] - by Sutz - 10-03-2012, 06:52 PM
[No subject] - by Creep - 10-05-2012, 12:28 PM
[No subject] - by Creep - 10-15-2012, 06:17 PM
[No subject] - by TheQE - 02-21-2013, 05:45 PM
[No subject] - by SibaN - 08-17-2013, 05:31 PM
[No subject] - by Sutz - 08-17-2013, 08:39 PM
[No subject] - by SibaN - 08-18-2013, 02:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)