http://api.zabijaka.pl/sms
Edytowałem plik buy.php sklepu tak:
Spoiler
<?if(!defined('IN_SHOP')) die("Acces deined");
/* ------------------------------------------ */
/* ----------- Shop by Gh0st ---------------- */
/* ------------------------------------------ */
class Buy
{
private $_id_serwera;
private $_flaga;
private $_flaga_dostepu;
private $_dni;
private $_time;
public function __construct($id_serwera, $flaga, $flaga_dostepu, $dni, $time)
{
$this->_id_serwera = $id_serwera;
$this->_flaga = $flaga;
$this->_flaga_dostepu = $flaga_dostepu;
$this->_dni = $dni;
$this->_time = $time;
}
public function sprawdz($usluga, $kod_sms)
{
$identyfikator = $this->_identyfikator;
$type = 'sms';
$del = 1;
if(!empty($kod_sms))
{
$b = file_get_contents("http://api.zabijaka.pl/1.1/0b231d6821b9de094b53a1bcccf3fc7d/sms/9/$kod_sms/sms.html/add");
$b = explode(" ", $;
if($b[0] != 1) return false;
else return true;
}
}
public function zakoncz($nick, $haslo)
{
if(!empty($nick) and !empty($haslo))
{
$koniec = $this->_time + ($this->_dni * 86400);
$haslo = md5($haslo);
$sql = "INSERT INTO `amx_amxadmins` VALUES (NULL, '$nick', '$haslo', '".$this->_flaga."', '".$this->_flaga_dostepu."', 'Zakupiono na Nick', '$nick', 0, 0, '".$this->_time."', $koniec, ".$this->_dni.");";
mysql_query($sql);
$sql = "SELECT `id` FROM `amx_amxadmins` WHERE `created` = '".$this->_time."' LIMIT 1";
$query = mysql_query($sql);
$id = mysql_fetch_array($query);
$id = $id['id'];
$sql = "INSERT INTO `amx_admins_servers` VALUES('$id', '".$this->_id_serwera."', '', 'no')";
mysql_query($sql);
}
}
}
?>
1. Czy to będzie działać?
2. Czy coś jeszcze wymaga edycji?
3. Proszę o ewentualną poprawę.