Jump to content
GIGN Forum

Help Ar Script


Recommended Posts

Lieta sekojoša man vajag dabūt, lai sms scriptā acc dodas tikai uz mēnesi, kā to dabūt gatavu, jo acc dodas uz neierobežotu laiku.

 <?

// KONEKTEJAM PIE MYSQL

$host = "localhost";
$db = "amxbans";
$mysql_user = "*****";
$mysql_pw = "*****";

mysql_connect ($host, $mysql_user, $mysql_pw)or die("neizdevas piekonekteeties: ".mysql_error());
mysql_select_db($db) or die(mysql_error());
// DB CONNECT
$cena = "0.95"; // CENA PAR NIKA REG
$nr = "157"; // NUMMURS ( DEF. 157 SOLAR-F )
$user_id = "979"; // SOLAR-F ID ( no http://stats.solarf.lv )
$code = "slr095"; // Ja 1,50 Ls tad 150.

?>
   <center><b>LMT/Tele2/Bite</b>
<br>
<b>SMS Numurs: <font color=red><? echo "$nr"; ?></font>
<br>
SMS Teksts: <font color=red><? echo "$code"; ?></font><br>
<b>Summa: <font color=red><? echo "$cena"; ?> Ls</font><br>

   <form action="" method="post">
<b>Niks:</b><br><input type="text" name="nickname"><br>

<b>Serveris:</b><br>
<select name='server_id'>

<?

$select = mysql_query("SELECT * FROM `amx_serverinfo`");
while($arr = mysql_fetch_array($select))
{
$serv_id = $arr["id"];
$serv_name = $arr["hostname"];
echo "

<option value='$serv_id' name='$serv_id'> $serv_name</option>

    ";
    }

    ?>

    </select><br>
<b>Parole:</b><br><input type="text" name="password"><br>
<b>Atkartot paroli:</b><br><input type="text" name="pw_coniform"><br>
<b>SMS KODS:</b><br><input type="text" name="slr"><br><br>
<input type="submit" name="submit" value="Registret">
</form>
</center>
<center> Acc registracija: Slots, kick, ban, slap, slay, xchat, vote </center>
<center> Atceries!!!Atceries acc vienmer var nonemt. Uzvedies un lieto to pareizi.Necito un nelauj to citiem darit. </center>
<center> Nepamatota banu liksana: warn un acc remove. </center>
<center> Doma divreiz pirms ko dari</center>


<?

if($_POST["submit"]){
$slr = mysql_escape_string($_POST["slr"]);
if (! is_numeric($_POST['slr'])) {
die ("<center><font color=green><b>TOD Niku reģistracijas sistema by DyC.Lv </b></font><br><br><br><br><br><br><br><br><b><font color=red>Kods nederigs!</font></b></center>");

}
$answer = join('', file("http://sms.solarf.lv/confirm.php?code=$slr&id=$user_id&price=$code"));
if ($answer != "key_ok" ) { 
die ("<div class=msg-error>Kļuda! Kods nav pareizs, meģini vēlāk.</div>");
}
if ($answer=="key_ok") { 

$nick = $_POST['nickname'];
$pass = $_POST['password'];
$pass2 = $_POST['pw_coniform'];
$access = "bcdeijm";
$flags = "ab";
$nickname = "smsreg";
$ip = $_SERVER['REMOTE_ADDR'];

if($pass == $pass2){
echo "";
}else{
die ("<script>alert('Paroles nesakrit!');window.back()</script>");
}

$check = mysql_query("SELECT username FROM amx_amxadmins WHERE username='$nick'");
$exist = mysql_num_rows($check);

if($exist > 0){
echo "<script>alert('Tads niks ir jau registrets!');window.back()</script>";
unset($nick);
exit();
}
if(empty($nick)){
die ("<script>alert('Ieraksti niku!'); window.back()</script>");
}
if(empty($pass)){
die ("<script>alert('Ieraksti paroli!'); window.back()</script>");
}

$register = "INSERT INTO amx_amxadmins ( username, password, access, flags, nickname)
VALUES('$nick', '$pass', '$access', '$flags', '$nickname')";
mysql_query($register) or die(mysql_error());
$id = mysql_insert_id();
mysql_query("INSERT INTO amx_admins_servers (admin_id, server_id) VALUES ($id, $server_id)");
mysql_close();
echo "<div class=msg-ok><br>Reģistrācija pagāja veiksmīgi!Access tev tiks piešķirts pēc mapes maiņas<br>
Konsolē ieraksti:<br>
<u>setinfo $pass</u></div>";

}
}
//header('location: index.php');
?>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...