Jump to content
GIGN Forum

[skripts]nika Regošana Caur Amxbans


Recommended Posts

blin, atradu veelvienu probleemu....

kad pieregistreeju niku CHAUCHAU caur web, viss itka kartiba. ieeju amxbans, paskatos.. viss staav. ir ok.

bet kad ieeju cs'aa. un speciali uzlieku setinfo _pw askdlhas kaut arii parole ir setinfo _pw CHAUCHAU, tad serverii laizh tik un taa.... neraata, ka You don't have entry in this server. kas vaareetu buut par probleemu?

EDIT: Atvainojiet par postu! VIssu esmu izlabojis :) Nenjemiet veeraa....

paliidziiet luudzu ar tiem miikstinaajumiem/garumziimeem. :[

Edited by razery
Link to comment
Share on other sites

Iespējams daudziem nepatīk šis:

post-12731-1201382851_thumb.jpg

tāpēc izveidoju normālu izskatu:

post-12731-1201382838_thumb.jpg

1. Izveidojam amxbans direktorijā failu reg.php un iekopējam iekšā:

<?php

/*
*
*  AMXBans, managing bans for Half-Life modifications
*  Copyright (C) 2003, 2004  Ronald Renes / Jeroen de Rover
*
*    web        : http://www.xs4all.nl/~yomama/amxbans/
*    mail    : [email protected]
*    ICQ        : 104115504
*   
*    This file is part of AMXBans.
*
*  AMXBans is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  AMXBans is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with AMXBans; if not, write to the Free Software
*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*/

// Start session
session_start();

// Require basic site files
require("include/config.inc.php");

if ($config->error_handler == "enabled") {
    include("$config->error_handler_path");
}
require("$config->path_root/include/functions.lang.php");
require("$config->path_root/include/functions.inc.php");

// Header
$title = lang("_REG");

// Section
$section = "reg";

// Parsing
$smarty = new dynamicPage;

$smarty->assign("meta","");
$smarty->assign("title",$title);
$smarty->assign("section",$section);
$smarty->assign("dir",$config->document_root);
$smarty->assign("this",$_SERVER['PHP_SELF']);

//$smarty->assign("servers",$server_array);
//$smarty->assign("players",$player_array);
//$smarty->assign("empty_result",$empty_result);
//$smarty->assign("post",$_POST);

$smarty->display('main_header.tpl');
$smarty->display('reg.tpl');
$smarty->display('main_footer.tpl');

?>

2. Atveram failu lang.english.php un iekopējam vienalga kur:

define("_RE","Reģistrēties");
define("_REGNICK","Reģistrēt niku");
define("_REG","Reģistrēt niku");

3. Izveidojam mapē templates failu ar nosaukumu reg.tpl.

Šajā failā iekopējam sekojošo tekstu:

        <table cellspacing='1' class='listtable' width='100%'>
          <tr>
            <td height='16' colspan='3' class='listtable_top'><b>Reģistrēt niku</b></td>
          </tr>
                    <form name="Reģistrēt niku" method="post" action="add.php">
                    <input type='hidden' name='action' value='insert'>
          <tr bgcolor="#D3D8DC">
            <td height='16' width='30%' class='listtable_1'>Niks</td>
            <td height='16' width='70%' class='listtable_1'><input type='text' name='nickname' style='font-family: verdana, tahoma, arial; font-size: 10px; width: 250px'></td>
          </tr>
          <tr bgcolor="#D3D8DC">
            <td height='16' width='30%' class='listtable_1'>Parole</td>
            <td height='16' width='70%' class='listtable_1'><input type='password' name='password' 'style='font-family: verdana, tahoma, arial; font-size: 10px; width: 250px'></td>
          </tr>
          <tr bgcolor="#D3D8DC">
            <td height='16' width='30%' class='listtable_1'>Parole vēlreiz</td>
            <td height='16' width='70%' class='listtable_1'><input type='password' name='pw_coniform' 'style='font-family: verdana, tahoma, arial; font-size: 10px; width: 250px'></td>
          </tr>
          </tr>
    <tr bgcolor="#D3D8DC">
        <td height='16' width='100%' colspan='2' class='listtable_1' align='right'><input type='submit' name='submit' value=' {"_RE"|lang} ' style='font-family: verdana, tahoma, arial; font-size: 10px;'></td>
          </tr>
        </form>
        </table>

4. Atveram failu main_header.tpl un aiz:

<option value='{$dir}' {if $section != "banlist"}selected{/if}>{"_HOME"|lang}</option>[/quote]
iekopējam:
[quote]<option value='{$dir}/reg.php' {if $section != "topadmin"}selected{/if}>{"_REGNICK"|lang}</option>

5. Visas garumzīmes un mīkstinājuma zīmes lang un reg failos aizstājam ar kodiem no šīs lapas.

6. Failus add.php, config.php izveidojam pēc lazdas pamācības!

7. Failu server_admins.php rediģējam pēc lazdas pamācības!

8. 6.un7. punktā minētajiem failiem ir jāatrodas amxbans mapē!

? z@r1n$

Link to comment
Share on other sites

Scorpions tava pamācība laba un Lazda2 arī normāla pamācība!

Bet vai nevarētu tā, ka tikai REĢISTRĒT NIKU sadaļai varētu piekļūt tie, kas ir pasūtījuši sms?

Tas ir: Spēlētājs aizsūtu SMS, viņam atnāk kaut kāds kods (kodiem visu laiku vajadzētu mainīties) un vienkārši viņš ievada kodu, tikai tad var piekļūt "REĢISTRĒT NIKU" un reģistrē savu niku, bet nika reģistrācija MAX = 3 mēn., ik pēc 3 mēn. jāpasūta jauns SMS pa 0,35 Ls u.t.t

Es arī meklēju skripteri, kurš māk labi ar kaut ko appieties! :)

Protams arī laba samaksa ;)

Link to comment
Share on other sites

  • 2 weeks later...

gamerxnet kad REG uzreiz nebus PW

PW bus tikaj tad kad bus restart vai nomainisies mape

checked vel var ielikt sada veida

$id = mysql_insert_id();

mysql_query("INSERT INTO amx_admins_servers (admin_id, server_id) VALUES ($id, 1)");

man reg istas sads :)

1231hn3.jpg

Edited by Drumais
Link to comment
Share on other sites

Vienkarsi panem ieliec zem sita

$register = "INSERT INTO amx_amxadmins ( username, password, access, flags, nickname)
VALUES('$nick', '$pass', '$access', '$flags', '$nickname')";
mysql_query($register) or die(mysql_error());
mysql_close();

sito

$id = mysql_insert_id();
mysql_query("INSERT INTO amx_admins_servers (admin_id, server_id) VALUES ($id, 1)");

Edited by Drumais
Link to comment
Share on other sites

paldies :) pats būtu vēlāk atradis vnk nebiju iedziļinājies tekstā

EDIT: gribēju tikai piebilst tiem kas nejēdz ka tas id jāliek pirms mysql_close

jaizskatās šitā

$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, 1)");
mysql_close();

un servera id var nomainīt šajā vietā

($id, 1)

nomainot ciparu :)

Edited by lazda2
Link to comment
Share on other sites

  • 1 month later...

Es uztaisu visu. Eju http://manswebs.oo.lv/reg

 $this_var =<html>
<head>
<title>Nick Registration</title>
</head>
<body>
<center>
<form method="post" action="add.php">
    <table border="1">
      <tr><td>Niks</td><td><input type="text" name="nickname"></td></tr>
      <tr><td>Parole</td><td><input type="text" name="password"></td></tr>
      <tr><td>Apstiprini Paroli</td><td><input type="text" name="pw_coniform"></td></tr>
      <tr><td></td><td><input type="submit" value="Registret"></td></tr>
    </table>
</form>
</center>
</body>
</html> "!";

Parada sito.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...