Topic: How to Setting Web Registration PvPGN one Ip one Id
Help me please harpywar...
how to setting Web Registration PvPGN one ip One Id.
thanks you..
PvPGN Community Forums |
forums.pvpgn.pro → 3d Party Tools → How to Setting Web Registration PvPGN one Ip one Id
Help me please harpywar...
how to setting Web Registration PvPGN one ip One Id.
thanks you..
1. Add to config.inc.php new variable
$one_acct_per_ip = true;
2. Open index.php and find code block:
if ($one_acct_per_email) {
if (@mysql_fetch_row(@mysql_query("SELECT * FROM `pvpgn_BNET` WHERE acct_email = \"" . trim($_POST['acct_email']) . "\";",$dbh))) {
error(0,$language['oneemailonly'],"");
}
}
After the found code add this:
if ($one_acct_per_ip) {
if (@mysql_fetch_row(@mysql_query("SELECT * FROM `pvpgn_BNET` WHERE acct_lastlogin_ip = \"" . $_SERVER['REMOTE_ADDR'] . "\";",$dbh))) {
error(0,"","");
}
}
3. If you use admin activation, you need to do step 2 in activate.php
okay thanks.
sorry I forgot, I mean one day can only make the id 1 time in 1 ip
what's the problem?
You may to create a new table in the database.
For instance `ip_match_day` with fields `day` int(2) and `ip` varchar(15).
On each attempt for account create, you should check current IP for exists in that table and compare day numbers.
You may to create a new table in the database.
For instance `ip_match_day` with fields `day` int(2) and `ip` varchar(15).
On each attempt for account create, you should check current IP for exists in that table and compare day numbers.
напиши на русском языке пожжжж
Это из разряда do it yourself. Если не знаешь PHP, перевод не поможет.
одному ID рег 5 account в 1 ден нужен мне! как эта сделается?
Добавлено: 01.11.2011 18:12
кто ни буд скажет а ?
Could you share the function to add display ip address in admin activation panel for web register? (using same default webregister0.4 forums.pvpgn.pro/viewtopic.php?pid=4578#p4578 )
Function should add column Ip Address in web prntscr.com/dr29yy and mysql datable prntscr.com/dr2aby and display the address of the account who register.
Could you share the function to add display ip address in admin activation panel for web register? (using same default webregister0.4 forums.pvpgn.pro/viewtopic.php?pid=4578#p4578 )
Function should add column Ip Address in web prntscr.com/dr29yy and mysql datable prntscr.com/dr2aby and display the address of the account who register.
You can see user ip in `acct_lastlogin_ip` of pvpgn table `bnet`. Is it not enough?
You can see that only if user logs in game but I want to see it before accepting account activation.
If you find a string of function name "InsertData" inside all files of the script (for example, using notepad++) you will see several results:
I suppose it should be enough to add a new line with ip address in includes/activation.php > immediately before line 43:
...
$data['webacct_ip'] = $_SERVER['REMOTE_ADDR']; // user ip
InsertData($data,"awaiting_activation"); // <--- line 43
Surely, you have to add the appropriate column with a name `webacct_ip` in your `awaiting_activation` table.
Added $data['webacct_ip'] = $_SERVER['REMOTE_ADDR']; before line 43 in includes/activation.php
Added webacct_ip column in awaiting_activation table (varchar,32) however there is nothing there, only null value prntscr.com/dr46on
Maybe you done something wrong, because it's exactly the place where a new row is inserted in that table when the first activation email is sent to a user.
I don't know, may be you don't use activation by email, but manual activation by admin. It will be another place (line 89).
Yes, you are right and I said that in first post. line 89 is correct, thanks a lot HarpyWar.
Could you help me with the last part so the result ip is displayed in admin panel? I suppose I need to edit admin.php
You can put a variable $webacct_ip somewhere in admin.php > function buildusertable() > $output
Works, thank you.
forums.pvpgn.pro → 3d Party Tools → How to Setting Web Registration PvPGN one Ip one Id