File size: 1.36Kb
<?php
/*
Регистрация через БМ.
Автор: Denvas
*/
include_once("config.php");
include_once("session.php");
$fd=fopen($path_log."/bm.log","ab");
if($fd){
fwrite($fd,date("Y-m-d H:i:s", time())."|".$_SERVER["REQUEST_URI"]."|".strtr(var_export($_POST,true),array("\n"=>" ","\r"=>"","\0"=>"\\0"))."|".(isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:"")."|".$_SERVER['REMOTE_ADDR']."|".(isset($_SERVER['HTTP_COOKIE'])?$_SERVER['HTTP_COOKIE']:"")."|".(isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:"")."\n");
fclose($fd);
};
if(empty($_GET["amount"]))exit;
if(empty($_GET["quantity"]))exit;
if(empty($_GET["secret"]))exit;
if(strcmp($_GET["secret"],$bmatrix_key)!=0)exit;
if(!empty($_GET["ses"])){
$data["session"]=$_GET["ses"];
$ses=GetSession($data["session"]);
if(!is_array($ses))$data["session"]="";
}
if(isset($_GET["check"])){print "Ok\n";exit;};
$data["amount"]=$_GET["amount"]*$bmatrix_balance/$bmatrix_price;
if(empty($data["session"])){
$data["session"]=GenSession();
NewSession($data["session"],0);
};
$ses=GetSession($data["session"],$data["amount"]);
print "Ok\nТеперь Вы можете качать на ".$data["amount"]." ".$namecurrency[1].". <a href='".$shopsite."?ses=".$data["session"]."'>Качать</a>\n";
?>