- Joined
- Apr 16, 2007
- Messages
- 441
- Reaction score
- 204
your welcome thought i should add a register script that supports the launcher.
Last edited:
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!Goodday Aznkidd235 why don't update your launcher with your new source? then release it as V3? I don't have any space for MS Visual Basic to install my computer anyway thanks. but if you can make it here will be niceyour welcome thought i should add a register script that supports the launcher.
Hopefully you have 5mb...Goodday Aznkidd235 why don't update your launcher with your new source? then release it as V3? I don't have any space for MS Visual Basic to install my computer anyway thanks. but if you can make it here will be nice
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'RZ_ACCOUNTDB'., SQL state S0002 in SQLExecDirect in C:\AppServ\www\RaiderZ\register.php on line 13
Fatal error: Call to undefined function num_rows() in C:\AppServ\www\RaiderZ\register.php on line 14
<?php
require_once('db.config.php');
$username = isset($_POST['username']) ? mssql_escape_string(trim($_POST['username'])) : '';
$password = isset($_POST['password']) ? mssql_escape_string(trim($_POST['password'])) : '';
$loginarg = md5($_POST['username'].time().$_POST['password']);
$errors = array();
$success = false;
if(isset($_POST) && !empty($_POST)){
require_once('db.php');
// Validate user name.
$result = @mssql_query("SELECT USER_ID FROM RZ_ACCOUNT WHERE USER_ID = '{$username}'") or die('Failed to verify if the provided user named already exists.');
if(empty($username)){
$errors[] = 'Please provide a user name.';
}else if(strlen($username) < 3 || strlen($username) > 16){
$errors[] = 'User name must be between 3 and 16 characters in length.';
}else if(ctype_alnum($username) === false){
$errors[] = 'User name must consist of numbers and letters only.';
}else if(mssql_num_rows($result)){
$errors[] = 'User name already exists, please choose a different user name.';
}
// Validate user password.
if(empty($password)){
$errors[] = 'Please provide a password.';
}else if(strlen($password) < 3 || strlen($password) > 16){
$errors[] = 'Password must be between 3 and 16 characters in length.';
}
// Persist the new account to the database if no previous errors occured.
if(count($errors) == 0){
$sql = "DECLARE @ACCN_ID BIGINT;
EXEC dbo.USP_RZ_GLOBAL_ID @ACCN_ID OUTPUT;
INSERT INTO dbo.RZ_ACCOUNT
(ACCN_ID,USER_ID,SITE_CODE,SITE_USER_ID,PWD,ACC_PTM)
VALUES (@ACCN_ID,'{$username}','{$loginarg}','{$username}','',0)";
// Remove the @ symbol here to see what the SQL error message is when running the above query in $sql.
if($result = mssql_query($sql)){
$success = "Account {$username} successfully created!";
}else{
// This means the insert statement is probably not valid for your database. Fix the query or fix your database, your choice ;)
$errors[] = 'Failed to create a new account, please try again later';
}
}
}
// Determine which view to show.
if($success === false){
require_once('register.view.php');
}else{
require_once('success.view.php');
}
?>
I'm sure that's what I did, but I added the time in the md5 salting.guys, do not tell glostey, a variant of Cain (http://forum.ragezone.com/f697/idea-secure-way-launch-game-759982/) - is the best (work - 5 minutes)
Thanks, and what do you need done to your script?
Alright, let me see what I can do
Also, I'm trying to register MSINET.OCX file, but it is giving me errors.
"The module MSINET.OCX was loaded but the call to DLLRegisterServer failed with error code 0x8002801c."
EDIT: Never mind, damn Vista. Everything has to be "Run As Administrator"
USE [RZ_ACCOUNTDB]
GO
/****** Object: Table [dbo].[RZ_ACCOUNT] Script Date: 07/02/2011 03:25:35 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RZ_ACCOUNT]') AND type in (N'U'))
DROP TABLE [dbo].[RZ_ACCOUNT]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RZ_ACCOUNT](
[ACCN_ID] [int] IDENTITY(639,1) NOT NULL,
[USER_ID] [nvarchar](32) NULL,
[SITE_CODE] [nvarchar](32) NOT NULL,
[SITE_USER_ID] [nvarchar](32) NOT NULL,
[PWD] [nvarchar](32) NOT NULL,
[ACC_PTM] [int] NOT NULL,
[REG_DATE] [datetime] NULL,
[UNREG_DATE] [datetime] NULL,
CONSTRAINT [PK_RZ_ACCOUNT_ACCN_ID] PRIMARY KEY CLUSTERED
(
[ACCN_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UK_RZ_ACCOUNT_SITE_CODE_SITE_USER_ID] UNIQUE NONCLUSTERED
(
[SITE_CODE] ASC,
[SITE_USER_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RZ_ACCOUNT] ADD DEFAULT ((0)) FOR [ACC_PTM]
GO
Here is a SQL Script that will fix that, but you will lose all account data.
PHP:USE [RZ_ACCOUNTDB] GO /****** Object: Table [dbo].[RZ_ACCOUNT] Script Date: 07/02/2011 03:25:35 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RZ_ACCOUNT]') AND type in (N'U')) DROP TABLE [dbo].[RZ_ACCOUNT] SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[RZ_ACCOUNT]( [ACCN_ID] [int] IDENTITY(639,1) NOT NULL, [USER_ID] [nvarchar](32) NULL, [SITE_CODE] [nvarchar](32) NOT NULL, [SITE_USER_ID] [nvarchar](32) NOT NULL, [PWD] [nvarchar](32) NOT NULL, [ACC_PTM] [int] NOT NULL, [REG_DATE] [datetime] NULL, [UNREG_DATE] [datetime] NULL, CONSTRAINT [PK_RZ_ACCOUNT_ACCN_ID] PRIMARY KEY CLUSTERED ( [ACCN_ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], CONSTRAINT [UK_RZ_ACCOUNT_SITE_CODE_SITE_USER_ID] UNIQUE NONCLUSTERED ( [SITE_CODE] ASC, [SITE_USER_ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[RZ_ACCOUNT] ADD DEFAULT ((0)) FOR [ACC_PTM] GO