UserPage and AdminPage for 0.99.62 with md5

Newbie Spellweaver
Joined
Apr 17, 2005
Messages
15
Reaction score
0
Maybe someone need it?
This is user page with admin menu.
Install:
[1]
Open query analizer and execute:
1)
use muonline;
CREATE FUNCTION [dbo].[fn_md5] (@data VARCHAR(10), @data2 VARCHAR(10))
RETURNS BINARY(16) AS
BEGIN
DECLARE @hash BINARY(16)
EXEC master.dbo.XP_MD5_EncodeKeyVal @data, @data2, @hash OUT
RETURN @hash
END
2)CREATE PROCEDURE Encript
@btInStr VARCHAR(10),
@btInStrIndex VARCHAR(10)
AS
BEGIN
DECLARE @btOutVal BINARY(16)
EXEC master..XP_MD5_EncodeKeyVal @btInStr, @btInStrIndex, @btOutVal OUT
UPDATE MEMB_INFO SET memb__pwd = @btOutVal WHERE memb___id = @btInStrIndex
END
GO
[2]Open Enterprise Manager and open DataBase MuOnline.
Click "Design Table" at MEMB_INFO like at image:

Add "is_admin" field:
char,1,yes
like at image:

[3]Create folder "user" in your web-site
[4]Download my script and UnRar it in user folder
[5]Open index.php and select language which you want. (rus or eng);
[6]Don't forget to change path to config.php =)
In menu.php and admin_menu.php present links.
You can edit menu for admin and users.
If you want to use this with your own modules, use $_SESSION['username'] for login variable.
Don't forget use if(isset($_SESSION['username']) in your scripts.
Test it script =)
With great respect, Asafchik
View attachment user.rar
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Apr 17, 2005
Messages
15
Reaction score
0
This release is only tool, that can you use for your site.
Soon i will add GM menu and some things for user =)
 
Newbie Spellweaver
Joined
Apr 17, 2005
Messages
15
Reaction score
0
2 GameX
683993
 
Last edited:
Newbie Spellweaver
Joined
Jun 18, 2006
Messages
48
Reaction score
0
Show screen of adnim panel of site
 
Junior Spellweaver
Joined
Jun 27, 2006
Messages
108
Reaction score
0
Asafchik, nobody needs it?... I need it! It seems to be very nice since everyone started to release new and new wothless sites... I really needed it (to learn how to makwe login system, also Admin panel ) Thx again man

p.s. waiting for GM panel

p.s.2 can you make guide or something working under login system (php side)?
 
Last edited:
Newbie Spellweaver
Joined
Apr 17, 2005
Messages
15
Reaction score
0
ok...
This is an example of login system.
In other scripts use: $_SESSION['username'] for your functions and other things.
don't forget session_start(); in the start of script.
Code:
<?
require_once('../config.php');
session_start();
$action = $_GET['action'];
$username = $_POST['username'];
$password = $_POST['password'];
$username = stripslashes($username);
$username = str_replace("'","",$username);
$username = str_replace("\"","",$username);
$username = str_replace(";","",$username);
$username = str_replace("$","",$username);
$username = str_replace("#","",$username);
$username = str_replace("&","",$username);
$username = str_replace("%","",$username);
$password = stripslashes($password);
$password = str_replace("'","",$password);
$password = str_replace("\"","",$password);
$password = str_replace(";","",$password);
$password = str_replace("$","",$password);
$password = str_replace("#","",$password);
$password = str_replace("&","",$password);
$password = str_replace("%","",$password);
//if defined - execure code
if  ((isset($username)) && (isset($password)))
{
//start
$validate = "SELECT * FROM   dbo.MEMB_INFO WHERE  memb___id = '$username' AND   memb__pwd = [dbo].[fn_md5]('$password','$username')";
$result = mssql_query($validate);
$login = mssql_num_rows($result);
if ($login>0)
{
$_SESSION['username'] = $username;
}
echo $_SESSION['username'];
}
//if not session not defined - show form
if (!isset($_SESSION['username']))
{
echo "<form action=index.php method=post>";
echo "<input name=username type=text><br>";
echo "<input name=password type=text><br>";
echo "<input name=submit type=submit><br>";
echo "</form>";
}
//if we want to exit - gonna exit =)
if ($action=="exit")
{
session_unset();
unset($_SESSION['username']);
echo "<script language='javascript'>";
echo "location.href='index.php'";
echo "</script>";
}
?>
 
Last edited:
Initiate Mage
Joined
Jun 15, 2004
Messages
4
Reaction score
0
can i use it on 99.6xt ?...this web site have md5 encryption?

tnx! u web site is very beautifull!!
 
Newbie Spellweaver
Joined
Apr 17, 2005
Messages
15
Reaction score
0
It isn't site.
It's just login system EXAMPLE for 0.99.62 with md5.
 
Newbie Spellweaver
Joined
Jan 5, 2006
Messages
62
Reaction score
0
good. But if you use
fn_md5 Function
you don't need to use encript.
 
Joined
May 12, 2005
Messages
249
Reaction score
8
Re: [Release] UserPage and AdminPage for 0.99.62 with md5

Warning: include(user) [function.include]: failed to open stream: Permission denied in C:\AppServ\www\php\index.php on line 30
;S