Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: sms_get.php | Klaida, zinute netikra!

Parašė arvydas17· 2011 Kov. 18 18:03:51
#1

Del kokios priezasties galetu rasyti "Klaida, zinute netikra!" sistema sujungta su mokejimai.lt issiunciu sms pinigus paima bet kodo neatsiuncia.





<?php
 
require_once("config.php");
 
$sms_id = $_GET['id'];
$transaction = $_GET['transaction'];
$amount = $_GET['amount'];
$time = date("Y/m/d H:i:s");
$sms = mysql_escape_string(htmlspecialchars($_GET['sms'], ENT_QUOTES));
$from_nr = $_GET['from'];
$operator = $_GET['operator'];
$key = $_GET['key'];
 
$category = explode(" ", $sms);
 
if(TestTransaction($transaction, $mokejimai_pass, $id)){
 
	$sms = ereg_replace("".$category[0]." ".$category[1]." ", "", $sms);
 
	if( strtolower($category[1]) == 'kodas' ){
 
 
			$kodas = substr(uniqid(mt_rand(), TRUE), 0, 5);
 
			mysql_query("INSERT INTO `kodai` (`kodas`,`nr`,`operator`,`amount`, `sms_id`) VALUES ('$kodas', '$from_nr', '$operator', '$amount', '$sms_id')");
 
			echo 'Jusu kodas: '.$kodas.'.'.$web_adress;
 
 
			/*
			$row_next = mysql_fetch_array(mysql_query("SHOW TABLE STATUS LIKE 'sms'"));
			$category = $category[1];
			*/
 
 
			/*
			mysql_query("INSERT INTO sms SET sms_id='$sms_id', transaction='$transaction', amount='$amount', time='$time', sms='$sms', from_nr='$from_nr', operator='$operator', category='$category'");
 
 
			echo "Skelbimas patalpintas.\n Skelbimo adresas: ".$web_adress."skelbimas-".$row_next["Auto_increment"]."\n Saugos kodas: ".substr($transaction, 0, 3)."".$sms_id."";
			*/
		}elseif( ( $category[1]=="m" || $category[1]=="v" || $category[1]=="k" || $category[1]=="M" || $category[1]=="V" || $category[1]=="K" ) AND $category[2] == NULL ){
 
 
			$random_row = mysql_fetch_row(mysql_query("SELECT * FROM sms WHERE category='".$category[1]."' ORDER BY RAND() LIMIT 1"));
			if($random_row['0']!=NULL){
				@mysql_query("INSERT INTO sms_nr SET sms_id='$sms_id', transaction='$transaction', amount='$amount', time='$time', sms='$sms', from_nr='$from_nr', operator='$operator', skelbimo_id='".$random_row['0']."'");
				echo "Atsitiktinio skelbimo adresas: ".$web_adress."skelbimas-".$random_row['0']."\n Autoriaus(-es) telefono numeris: ".$random_row['5']."";
 
			}else{
				echo "Klaida, siuo metu skelbimu nera!";
			}
		}elseif(is_numeric($category[1]) && $category[1]>"" && $category[1]>0){
		$total = mysql_fetch_array(mysql_query("SELECT count(id) FROM sms WHERE id='".$category[1]."'"));
		$total = $total[0];
 
		if($total==1){
			$row = mysql_fetch_array(mysql_query("SELECT * FROM sms WHERE id='".$category[1]."' LIMIT 1"));
			$skelbimo_id = $category[1];
			mysql_query("INSERT INTO sms_nr SET sms_id='$sms_id', transaction='$transaction', amount='$amount', time='$time', sms='$sms', from_nr='$from_nr', operator='$operator', skelbimo_id='$skelbimo_id'");
			echo "Skelbimo adresas: ".$web_adress."skelbimas-".$category[1]."\n Autoriaus(-es) telefono numeris: ".$row['from_nr']."";
		}else{
			echo "Klaida, blogas skelbimo ID!";
		}
	}elseif($category[1]=="meile" || $category[1]=="MEILE"){
 
			$love = "".$category[2]." myli ".$category[3]." ".rand(60,100)."%";
 
			echo "$love\n Nepamirsk stebinti maloniomis staigmenomis savo mylimo zmogaus!";
			mysql_query("INSERT INTO sms_nr SET sms_id='$sms_id', transaction='$transaction', amount='$amount', time='$time', sms='$sms', from_nr='$from_nr', operator='$operator', meiles_sk='$love'");
 
	}else{
		echo "Klaida, paslauga neteikiama!";
	}
 
}else{
	echo "Klaida, zinute netikra!";
}
 
function TestTransaction( $transaction, $userPassword, $ordeID, $test = 0, $status = 1 ){
	return ( $transaction == md5("{$userPassword}|{$_SERVER['REMOTE_ADDR']}|{$ordeID}|{$test}|{$status}") );
}
 
?>


Justas. - Draudžiama rašyti visą pranešimą paryškintai.