Parašė Poker· 2008 Kov. 4 18:03:42
#244
Sveiki,norejau paklaust ka cia reikia rasyt,nes niekad nesinaudojau mokejimai.lt teikiamomis paslaugomis.
<?php
error_reporting(0);
require_once "../../maincore.php";
$ex = explode(" ", $_GET[sms], 2);
$ex[1] = strtolower($ex[1]);
$numeris = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_numbers WHERE smsraktas = '".$ex[0]."' and salis = '".$_GET[country]."' and numeris = '".$_GET[to]."'"));
$your_mokejimai_pass = $numeris[mokejimailtpass];
if ( TestTransaction( $_GET['transaction'], $your_mokejimai_pass, $_GET['id'] ) ){
$result = dbquery("UPDATE ".$db_prefix."money_users SET `pinigai` = `pinigai`+'".$numeris[pinigaiisaskaita]."' WHERE `userid` = '".$ex[1]."' LIMIT 1 ;");
$sndyra = mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
$result = dbquery("INSERT INTO ".$db_prefix."money_sms (`sms`, `inumeri`, `isnumerio`, `operatorius`, `smskaina`, `smsid`, `transaction`, `smsdata`, `smstxt`) VALUES('".$_GET[sms]."', '".$_GET[to]."', '".$_GET[from]."', '".$_GET[operator]."', '".$_GET[amount]."', '".$_GET[id]."', '".$_GET[transaction]."', '".$sndyra."', '".$ex[1]."')");
if(dbcount("(*)", "users", "user_id='".$ex[1]."'") > 0){
$user = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id = '".$ex[1]."'"));
$goldsettings = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_settings"));
$numeris[pinigaiisaskaitalt] = $numeris[pinigaiisaskaita]/100;
echo "Sveikiname ".$user[user_name].", jusu saskaita papildyta ".$numeris[pinigaiisaskaitalt]." ".$goldsettings[valiuta].". Aciu, jog naudojatës musu paslaugomis!";
}else{
echo "Jusu zinute gauta. nesvarb.lt! Vartotojas kurio id ".$ex[1]." nerastas arba jus nesate prisiregistrave!";
}
}else{
echo "Ivyko klaida!";
}
function TestTransaction( $transaction, $userPassword, $ordeID, $test = 0, $status = 1 ){
return ( $transaction == md5("{$userPassword}|{$_SERVER['REMOTE_ADDR']}|{$ordeID}|{$test}|{$status}") );
}
?>
Ar mano mokejimai.lt anketos pass rasyt?.