Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 05:29

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP]Logging System for MSSQL

Discussion on [PHP]Logging System for MSSQL within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2009
Posts: 53
Received Thanks: 9
[PHP]Logging System for MSSQL

Hi I could be someone from that system cms do a separate login system, which is there. I need this system to log to mssql server of its own. Please help.

Download CMS:


This to script system login and not work:
Quote:
<?php

if(isset($_SESSION['id'])){
echo "
<table border='0' width='135' align='center'>
<tr>
<td>
<div class='regtext'>
<h3>Welcome, ".$_SESSION['id']."</h3>
</div>
</td>
</tr>
<tr>
<td>
<div class='menulink'>
<a href='?dkcms=ucp'>Control Panel</a>
</div>
</td>
</tr>";
if(isset($_SESSION['admin'])){
echo "
<tr>
<td>
<div class='menulink'>
<a href='?dkcms=admin'>Admin Panel</a>
</div>
</td>
</tr>";
}
echo "
<tr>
<td>
<div class='menulink'>
<a href='?dkcms=ucp&page=accset'>Account Settings</a>
</div>
</td>
</tr>
<tr>
<td>
<div class='menulink'>
<a href='?dkcms=misc&script=logout'>Log Out</a>
</div>
</td>
</tr>
</table>
<br />";
} else {
if(isset($_POST['login'])) {
$u = $_POST['username'];
$p = $_POST['password'];
$crypt_p = md5($p);
$s = mssql_query("SELECT * FROM account.dbo.USER_PROFILE WHERE user_id = '".$u."'");
$i = mssql_fetch_array($s);

if($i['user_pwd'] == $crypt_p ){
$userz = mssql_query("SELECT * FROM account.dbo.USER_PROFILE WHERE user_id = '".$i['user_id']."' AND user_pwd = '".$i['user_pwd']."'");
$auser = mssql_fetch_array($userz);
$_SESSION['id'] = $auser['user_id'];
$_SESSION['name'] = $auser['name'];


$userz2 = mssql_query("SELECT * FROM account.dbo.tbl_user WHERE user_id='".$u."'");
$auser2 = mssql_fetch_array($userz2);
if($auser2['webadmin'] == "1"){
$_SESSION['admin'] = $auser2['webadmin'];
}

if($auser2['gm'] == "1"){
$_SESSION['gm'] = $auser2['gm'];
}
$return = "<meta http-equiv=refresh content='0; url=?dkcms=misc&script=redir'>";
} else {
$return = "<p><center>Invalid username or password.</center>";
}
}
echo "
<div class='regtext'>
<h3>Welcome to $servername</h3>
</div>
<p><b>Register now!</b></p>
<div class='regtext'>
<form method='post' action=''>
<center>
<table border='0' width='135'>
<tr>
<td align='left' width='125'>
<div class='h5'><b>Username:</b></div>
</td>
</tr>
<tr>
<td>
<input type='text' name='username' maxlength='12' />
</td>
</tr>
<tr>
<td align='left' width='125'>
<div class='h5'><b>Password:</b></div>
</td>
</tr>
<tr>
<td>
<input type='password' name='password' maxlength='12' />
</td>
</tr>
<tr>
<td align='center'>
<input type='submit' style='width:48%;' name='login' value='Login' />
<input type='button' style='width:48%;' value='Register' ?dkcms=main&page=register';' />
".$return."
</td>
</tr>
</table>
</center>
</form>
</div>
<br />";
}
?>
Please edit this script to works and need check system to login.

janvier123 please help me this u dkcms system
pajurpl is offline  
Old 04/24/2011, 01:13   #2
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
use OSDS V4, search on dku or epvp
janvier123 is offline  
Old 04/24/2011, 07:36   #3
 
4the's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 231
Received Thanks: 57
DKCMS normaly worked.
Still...
4the is offline  
Old 04/24/2011, 15:01   #4
 
elite*gold: 0
Join Date: Nov 2009
Posts: 53
Received Thanks: 9
But I need the same login panel with separate options for the user and admin and check the log on the page.
pajurpl is offline  
Reply


Similar Threads Similar Threads
[HOWTO] Logging ALL Queries on a MSSQL Database?
12/25/2010 - Dekaron Private Server - 8 Replies
Hi, after ALLOT of googling in found a very sweet function in mssql If you have "Profiler" install here is how you can track almost everything that is going on in the DB after creating the topic and result from http://www.elitepvpers.com/forum/dekaron-private-se rver/895715-test-response-time-db.html ive found out that it will take months (YES! months) to analyze all the data that is send from dekaronserver.exe so here is how you can trace it: Open SQL Server Profiler or Profiler



All times are GMT +1. The time now is 05:29.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.