|
You last visited: Today at 08:53
Advertisement
Reg Page Need
Discussion on Reg Page Need within the SRO Private Server forum part of the Silkroad Online category.
09/12/2011, 18:47
|
#1
|
elite*gold: 61
Join Date: Sep 2011
Posts: 341
Received Thanks: 57
|
Reg Page Need
İ need reg page who have vsro for ?
|
|
|
09/12/2011, 18:47
|
#2
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,392
Received Thanks: 6,508
|
check cherno's first post, is there
|
|
|
09/12/2011, 18:49
|
#3
|
elite*gold: 0
Join Date: Jan 2011
Posts: 340
Received Thanks: 80
|
Quote:
<?php
/* Simple registration page for silkroad server, by Chernobyl
* Settings are at _inc/config.php
* If you get an mssql connection error, while defining totally correct data
* Just use older ntwdblib.dll for your webserver
*/
require_once('_inc/security.class.php');
require_once('_inc/config.php');
if(!isset($_POST['submit']))
{
echo "<table border='1'>
<form method='post'>
<td>Username</td><td><input type='text' name='username' maxlength='16'></td><tr/>
<td>Password[1]</td><td><input type='password' name='pw1' maxlength='32'></td><tr/>
<td>Password[2]</td><td><input type='password' name='pw2' maxlength='32'></td><tr/>
<td></td><td><input type='submit' name='submit' value='Register'></td>
</form>
</table>";
}
else
{
if(strlen($_POST['username']) < 3) $msg[] = "Username too short";
if(strlen($_POST['username']) > 16)$msg[] = "Username too long";
if(strlen($_POST['pw1']) < 6) $msg[] = "Password [1] too short";
if(strlen($_POST['pw1']) > 32)$msg[] = "Password [1] too long";
if(strlen($_POST['pw2']) < 6) $msg[] = "Password [2] too short";
if(strlen($_POST['pw']) > 32) $msg[] = "Password [2] too long";
if($_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";
$sec = new security();
if($sec->is_secure($_POST['username']) == false) $msg[] = "Username contains forbidden symbols";
if($sec->is_secure($_POST['pw1']) == false) $msg[] = "Password [1] contains forbidden symbols";
if($sec->is_secure($_POST['pw2']) == false) $msg[] = "Password [2] contains forbidden symbols";
if(count($msg) > 0)
{
for($i = 0; $i < count($msg); $i++)
{
echo $msg[$i]."<br/>";
}
return;
}
else
{
//checking damn mssql stuff
$accountExists = mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));
if($accountExists > 0) echo "Account with such username already exists<br/>";
else
{
$pwd = md5($_POST['pw1']);
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_seconda ry) values('$_POST[username]','$pwd','3','3')");
echo "Account successfully created<br/>";
}
}
}
|
_inc/security.class.php
Quote:
<?php
class security
{
function is_secure($string)
{
$pattern = "#[^a-zA-Z0-9_\-]#";
if(preg_match($pattern,$string)==true)return false;
else
return true;
}
}
?>
|
_inc/config.php
Quote:
<?php
$cfg['sql_host'] = ".\SQLEXPRESS";
$cfg['sql_user'] = "sa";
$cfg['sql_pass'] = "1234";
$cfg['sql_db'] = "SRO_VT_ACCOUNT";
$sqlLink = mssql_connect($cfg[sql_host],$cfg[sql_user],$cfg[sql_pass]);
if(!$sqlLink) die("MSSQL server is not accessable, why should we try to select database ?");
else
{
mssql_select_db($cfg[sql_db],$sqlLink);
}
?>
|
|
|
|
09/12/2011, 18:59
|
#4
|
elite*gold: 61
Join Date: Sep 2011
Posts: 341
Received Thanks: 57
|
.rar upload plz..
|
|
|
09/12/2011, 19:01
|
#5
|
elite*gold: 0
Join Date: Apr 2011
Posts: 190
Received Thanks: 15
|
lol just copy the text and make it .php...
|
|
|
09/12/2011, 19:10
|
#6
|
elite*gold: 0
Join Date: Dec 2009
Posts: 594
Received Thanks: 358
|
Quote:
Originally Posted by ByMnkn
.rar upload plz..
|
bloodynin clientle çalışıyrmuymuş ? ve yeni video gelecekmi bro ?
|
|
|
09/12/2011, 19:10
|
#7
|
elite*gold: 0
Join Date: Jan 2010
Posts: 149
Received Thanks: 27
|
huh i can make 1 from 0 safe and got all erros.
just if u want pm me here
|
|
|
09/12/2011, 19:44
|
#8
|
elite*gold: 0
Join Date: Mar 2009
Posts: 448
Received Thanks: 42
|
how i can make something in php ? where i must copy that ? in php the programm cmd ?
|
|
|
09/12/2011, 20:39
|
#9
|
elite*gold: 0
Join Date: Jan 2010
Posts: 149
Received Thanks: 27
|
Quote:
Originally Posted by Gol.D.Roger
how i can make something in php ? where i must copy that ? in php the programm cmd ?
|
|
|
|
09/12/2011, 20:41
|
#10
|
elite*gold: 0
Join Date: Mar 2009
Posts: 448
Received Thanks: 42
|
bahaa stfu i dont know anything about php yeah youre right iam a noob in it and so ? its a question from a noob in php so why you always come with youre noob facepalm and think youre in all ways better then the others ? i have skills from that you can dream and you skills that i can dream of so this is a community or maybe it was one years ago but asking something is alowed and learning so pls facepalm yourself
|
|
|
Similar Threads
|
Us Page?
03/27/2010 - Metin2 - 2 Replies
Ist die Hp von Metin us down?
Mir wird nur gesagt das bald ne neue kommt und bei nem Kilck auf Die Page werd ich nur auf die Hp von Subagames weitergeleitet.
Hoffe auf Antwort.
Mfg .Rave
|
Reg-Page
12/19/2009 - Metin2 Private Server - 12 Replies
Morgen, mein Server läuft über Hamachi undso, nur ich möchte keine Accounts manuell über die Database machen. Also hab ich mir gedacht:
Machste eine Registrierungspage !
Diese funktioniert aber nicht, da Apache in Xampp nicht starten will.
Kann sich das jemand per Teamviewer genauer anschauen?
Wäre sehr nett.
Wer nur im Thread posten will, für den hab ich hier das Problem :
http://1click-image.de/user/image/810179726.jpg
|
All times are GMT +1. The time now is 08:54.
|
|