• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux modern acc - dotpay script

report

New Member
Joined
May 21, 2010
Messages
211
Reaction score
2
can someone help me with this script?

Code:
<?PHP
### CREDITS ###
/* 
	dotpay-buypoints fixed on ModernAAC
	by SunShine/SunnShine
	feel free to donate -> [email protected]
	respect the credits and my work, please
*/
###############

### NIE RUSZAC! ###
require("config.php"); 
$ots = POT::getInstance(); 
$ots->connect(POT::DB_MYSQL, connection()); 
$SQL = $ots->getDBHandle(); 
$config['dotpay'] = array();
#################

### KONFIGURACJA ###

## sms ##

# smsy aktywne? true/false
$config['dotpay_active_sms'] = true; 

	#1
		$config['dotpay'][0]['id'] = 18829;       # numer ID zarejestrowanego klienta
		$config['dotpay'][0]['code'] = "ZSE8"; # identyfikator uslug SMS
		$config['dotpay'][0]['type'] = "sms";   # typ konta: C1 - 8 znakowy kod bezobslugowy, sms - dla sprawdzania SMSow
		$config['dotpay'][0]['addpoints'] = 100; # ile premium punktow daje dany sms
		$config['dotpay'][0]['sms_number'] = 73068; # numer na jaki nalezy wyslac kod
		$config['dotpay'][0]['sms_text'] = "AP.ZSE8"; # tresc jaka ma byc w SMSie
		$config['dotpay'][0]['sms_cost'] = "3,66 zl brutto"; # cena za wyslanie sms

	#2
		$config['dotpay'][1]['id'] = 18829;       # numer ID zarejestrowanego klienta
		$config['dotpay'][1]['code'] = "ZSE9"; # identyfikator uslug SMS
		$config['dotpay'][1]['type'] = "sms";   # typ konta: C1 - 8 znakowy kod bezobslugowy, sms - dla sprawdzania SMSow
		$config['dotpay'][1]['addpoints'] = 250; # ile premium punktow daje dany sms
		$config['dotpay'][1]['sms_number'] = "76068"; # numer na jaki nalezy wyslac kod
		$config['dotpay'][1]['sms_text'] = "AP.ZSE9"; # tresc jaka ma byc w SMSie
		$config['dotpay'][1]['sms_cost'] = "7,32 zl brutto"; # cena za wyslanie sms

	#3
		$config['dotpay'][2]['id'] = 18829;       # numer ID zarejestrowanego klienta
		$config['dotpay'][2]['code'] = "ZSE10"; # identyfikator uslug SMS
		$config['dotpay'][2]['type'] = "sms";   # typ konta: C1 - 8 znakowy kod bezobslugowy, sms - dla sprawdzania SMSow
		$config['dotpay'][2]['addpoints'] = 500; # ile premium punktow daje dany sms
		$config['dotpay'][2]['sms_number'] = "79068"; # numer na jaki nalezy wyslac kod
		$config['dotpay'][2]['sms_text'] = "AP.ZSE10"; # tresc jaka ma byc w SMSie
		$config['dotpay'][2]['sms_cost'] = "10,98 zl brutto"; # cena za wyslanie sms


## przelewy ##

# przelewy aktywne? true/false
$config['dotpay_active_transfer'] = false; 


####NIE RUSZAC NIZEJ JESLI NIE WIESZ CO ROBISZ

##funkcje
function save_trans($file, $acc, $code)
{
	$hak = fopen($file, "a");
	fwrite($hak, $code.'='.$acc.'');
	fclose($hak);
}

function save_nick($file, $acc)
{
	$hak = fopen($file, "a");
	if(fwrite($hak, $acc)==FALSE)
		$errors[] = 'Cos zjebales xD';
	fclose($hak);
}

function check_code_dotpay($code, $posted_code, $user_id, $type)
{
	if(ereg('[^0-9A-Za-z]',$code) || ereg('[^0-9A-Za-z]',$posted_code) || ereg('[^0-9A-Za-z]',$user_id) || ereg('[^0-9A-Za-z]',$type))  
	{
		die("");
    	}
	$handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=0", 'r');
    	$status = fgets($handle, 8);
    	$czas_zycia = fgets($handle, 24);
    	fclose($handle);
    	$czas_zycia = rtrim($czas_zycia);
	return array($status, $czas_zycia);
}

function delete_code_dotpay($code, $posted_code, $user_id, $type)
{
	$handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=1", 'r');
	fclose($handle);
}

function add_points(OTS_Account $account, $number_of_points)
{
	if($account->isLoaded())
	{
		$account->setCustomField('premium_points', ($account->getCustomField('premium_points')+$number_of_points));
		return true;
	}
	else
		return false;
}


##reszta
$sms_type = (int) $_POST['sms_type'];
$posted_code = trim($_POST['code']);
$to_user = trim($_POST['to_user']);
$verify_code = trim(isset($_POST['verify_code']));

if(!empty($to_user))
{
	if(is_numeric($to_user))
	{
		$account = new OTS_Account();
		$account->find($to_user);
	}
	else
	{
		$player = new OTS_Player();
		$player->find($to_user);
		if($player->isLoaded())
			$account = $player->getAccount();
		else
			$account = new OTS_Account();
	}
	$errors = array();
	if(empty($posted_code))
		$errors[] = 'Prosze wpisac kod z SMSa/przelewu.';
		
	if(!$account->isLoaded())
		$errors[] = 'Konto/konto postaci o podanym nicku nie istnieje.';
		
	if(count($errors) == 0 || !isset($errors))
	{
		if(count($errors) == 0)
		{
			$code_info = check_code_dotpay($config['dotpay'][$sms_type]['code'], $posted_code, $config['dotpay'][$sms_type]['id'], $config['dotpay'][$sms_type]['type']);
			if($code_info[0] == 0 && $posted_code != "REALOTNET")
				$errors[] = 'Podany kod z SMSa/przelewu jest niepoprawny lub wybrano zla opcje SMSa/przelewu.';
			else
			{
				if($posted_code == "REALOTNET")
				{
				 	$lista = fopen('config/users.log', "r+");
					$users = fread($lista, filesize('config/users.log'));
					$user = explode(" ", $users);
					for($i = 0; $i<count($user); $i++)
					{
						if($user[$i] == $account)
							$errors[] = 'Juz wykorzystales kod bonusowy =(';
					}
					if(count($errors) == 0)
					{
						save_nick('config/users.log', "$account ");
						$config['dotpay'][$sms_type]['addpoints'] = 50;
					}
				}
				if(count($errors) == 0)
				{
				if(add_points($account, $config['dotpay'][$sms_type]['addpoints']))
				{
					save_trans('config/dotpay.log', $account->getId(), $posted_code);
					$code_info = delete_code_dotpay($config['dotpay'][$sms_type]['code'], $posted_code, $config['dotpay'][$sms_type]['id'], $config['dotpay'][$sms_type]['type']);
					echo '<h1><font color="red">Dodano '.$config['dotpay'][$sms_type]['addpoints'].' punktow premium do konta: '.$to_user.' !</font></h1>';
				}
				else
					$errors[] = 'Wystapil blad podczas dodawania punktow do konta, sproboj ponownie.';
				}
			}
		}
	}
}

if($errors)
{
	echo 'Wystapily bledy:';
	foreach($errors as $error)
	echo '<br />* '.$error;
	echo '<hr /><hr />';
}

if($config['dotpay_active_sms'])
{
	echo '<h2><fieldset><font color="gold">Kup Punkty</font><br><br> <center>Kup punkty premium, mozesz je wymienic w sklepie OTSa na PACC/przedmioty w grze, aby zakupic punkty premium wyslij SMSa:<br><br></center></h2>';



	foreach($config['dotpay'] as $sms)
		if($sms['type'] == 'sms')
			echo '<br /><b><fieldset> Na numer <font color="red">'.$sms['sms_number'].'</font> o tresci <font color="red"><b>'.$sms['sms_text'].'</b></font> za <font color="red"><b>'.$sms['sms_cost'].'</b></font>, a za kod dostaniesz <font color="red"><b>'.$sms['addpoints'].'</b></font> punktow premium.</fieldset><br></b>';
	echo '
	<p style="margin:10px 0 10px 0;">
	<fieldset>Serwis SMS obslugiwany przez: <a href="http://www.dotpay.pl" target="_blank">Dotpay.pl</a><br />
	Regulamin: <a href="http://www.dotpay.pl/regulaminsms" target="_blank">Dotpay.pl/regulaminsms</a><br />
Reklamacje Skladamy Tutaj : <a href="http://www.dotpay.pl/reklamacje" target="_blank">Dotpay.pl/reklamacje</a><br>
	Usluga dostepna w sieciach: Orange, Plus GSM, Era.<br />
	<b>'.isset($config['server']['serverName']).'</b> nie odpowiedamy za zle wpisane tresci SMS.</fieldset><br><br /><br><br><br><hr />';
}
if($config['dotpay_active_transfer'])
{
	echo '<br><h2>Przelew/karta kredytowa</h2>Kup punkty premium, mozesz je wymienic w sklepie OTSa na PACC/przedmioty w grze, aby zakupic punkty premium wejdz na jeden z adresow i wypelnij formularz:';
	foreach($config['dotpay'] as $przelew)
		if($przelew['type'] == 'C1')
			echo '<br /><b>* Adres - <a href="https://ssl.allpay.pl/?id='.$przelew['id'].'&code;='.isset($przelew['code']).'"><font color="red">https://ssl.allpay.pl/?id='.$przelew['id'].'&code;='.$przelew['code'].'</font></a> - koszt <font color="red"><b>'.$przelew['sms_cost'].'</b></font>, a za kod dostaniesz <font color="red"><b>'.$przelew['addpoints'].'</b></font> punktow premium.</b>';
	echo '<br><br>Kiedy Twoj przelew dojdzie (z kart kredytowych i bankow internetowych z listy jest to kwestia paru sekund) na e-mail ktory podales w formularzu otrzymasz kod. Kod ten mozesz wymienic na tej stronie na punkty premium w formularzu ponizej.<hr /><br />';
}
echo '<form action="?subtopic=buypoints&system=dotpay" method="POST"><table>';
echo '<tr><td><b>Nazwa postaci: </b></td><td><input type="text" size="20" value="'.$to_user.'" name="to_user" /></td></tr>
<tr><td><b>Kod z SMSa: </b></td<td><input type="text" size="20" value="'.$posted_code.'" name="code" /></td></tr><tr><td><b>Typ wyslanego SMSa: </b></td><td><select name="sms_type">';
foreach($config['dotpay'] as $id => $sms)
	if($sms['type'] == 'sms')
		echo '<option value="'.$id.'">numer '.$sms['sms_number'].' - kod '.$sms['sms_text'].' - SMS za '.$sms['sms_cost'].'</option>';
	elseif($przelew['type'] == 'C1')
		echo '<option value="'.$id.'">przelew - kod '.$sms['sms_text'].' - za '.$sms['sms_cost'].'</option>';
echo '</select></td></tr>';
echo '<tr><td></td><td><input type="submit" value="Sprawdz" /></td></tr></table></form>';


?>


1dotpay.jpg
 
anyone know how to fix it ?
its working ( adding points to account for sms ) but its look bad
do u know maybe how to hide this erros ? :p or fix it
 
Back
Top