Mini php VSRO panel ( useful ) !

Socius Decennalis
Decennium
Joined
Jun 28, 2008
Messages
193
Reaction score
220
Super Simple "mini" vsro website panel
Features:
Login (using session)
Logout
Password change
Add Silk (prem silk by using stored procedure)
Retrieve silk data for logged in user



Password:
Code:
silkroad.ragezone

For getting add silk thing to work you'll need to edit your stored procedure - CGI.CGI_WebPurchaseSilk
Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER OFF
GO

ALTER PROCEDURE [CGI].[CGI_WebPurchaseSilk]
	@OrderID VARCHAR(25),
	@UserID   VARCHAR(25),
	@PkgID   INT,
	@NumSilk INT,
	@Price INT
as
	DECLARE @UserJID INT
	DECLARE @SilkRemain INT
	SET @UserJID = CGI.getUserJID(@UserID)
	IF( @UserJID >= 0)
	    BEGIN
		IF( not exists( SELECT OrderNumber from SK_SilkBuyList where OrderNumber = @OrderID))
		BEGIN
			BEGIN TRANSACTION
				IF( not exists( SELECT * from SK_Silk where JID = @UserJID))
				BEGIN
					INSERT SK_Silk(JID,silk_own,silk_gift,silk_Point)VALUES(@UserJID,0,@NumSilk,0)
				END
			    ELSE
				BEGIN
					SET @SilkRemain = CGI.getSilkOwn(@UserJID)
					UPDATE SK_Silk SET silk_gift = silk_gift + @NumSilk WHERE JID = @UserJID
				END
			IF (@@error <> 0 or @@rowcount = 0)
				BEGIN
					SELECT Result = "FAIL"
					ROLLBACK TRANSACTION
					RETURN
				END
			SELECT Result = "SUCCESS"
			COMMIT TRANSACTION	
			RETURN
		   END
		ELSE
		   BEGIN
			SELECT Result = "ORDEREXIST"
		   END    
	    END
	ELSE
		BEGIN
			SELECT Result = "NOUSER"
			RETURN
		END

SET QUOTED_IDENTIFIER OFF
- Simply replace all the code from the old one with this one and press execute.


DB connection settings in file: sqlConn.php at include folder.

That's all folks.

Here's the download link:
 
Re: [release] Mini php VSRO panel ( useful ) !

hi where to find CGI.CGI WebPurchaseSilk ?? i just finded silk change by web
 
Re: [release] Mini php VSRO panel ( useful ) !

hi where to find CGI.CGI WebPurchaseSilk ?? i just finded silk change by web
CGI.CGI WebPurchaseSilk is in your MSSQL Server Stored Procedure :cool:
 
Re: [release] Mini php VSRO panel ( useful ) !

i get error


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampplite\htdocs\include\Security.php:1) in C:\xampplite\htdocs\login.php on line 5

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampplite\htdocs\include\Security.php:1) in C:\xampplite\htdocs\login.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\include\Security.php:1) in C:\xampplite\htdocs\login.php on line 32
 
Re: [release] Mini php VSRO panel ( useful ) !

eRROR...

PHP:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: PC127,15779 in C:\AppServ\www\include\sqlConn.php on line 8

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\AppServ\www\include\sqlConn.php on line 9

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\include\Security.php:1) in C:\AppServ\www\login.php on line 5

Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'TB_User'. (severity 16) in C:\AppServ\www\login.php on line 26

Warning: mssql_query() [function.mssql-query]: Query failed in C:\AppServ\www\login.php on line 26

Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in C:\AppServ\www\login.php on line 26
Username/Password is incorrect!
 
Re: [release] Mini php VSRO panel ( useful ) !

eRROR...

PHP:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: PC127,15779 in C:\AppServ\www\include\sqlConn.php on line 8

lol PC127,15779
MSSQL server port, not Game port.
Depending on your database configuration, but by default is 1433.
 
Re: [release] Mini php VSRO panel ( useful ) !

lol PC127,15779
MSSQL server port, not Game port.
Depending on your database configuration, but by default is 1433.
sqlConn.php
PHP:
<?php
	//----------------- Database Config ----------------------//
	$serverIp = "PC127"; //server ip and port (if using remote maching, if local - use server-name\SQLEXPRESS or whatever.
	$userName = "sa"; // username
	$password = "1234"; // password
	$dbName   = "SRO_VT_ACCOUNT"; // database (by default SRO_VT_ACCOUNT)
	//----------------- Database Connection ------------------//
	$dbConn = mssql_connect($serverIp, $userName, $password); 
	mssql_select_db($dbName, $dbConn);
?>

now error

PHP:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\include\Security.php:1) in C:\AppServ\www\login.php on line 5

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\include\Security.php:1) in C:\AppServ\www\login.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\include\Security.php:1) in C:\AppServ\www\login.php on line 32
 
Re: [release] Mini php VSRO panel ( useful ) !

You ppl r noobs.. suggest using my released WAMP u can find it at release section.. it's configured - all u gotta do is redo all teh config for the directories of extension etc..
 
Re: [release] Mini php VSRO panel ( useful ) !

You ppl r noobs.. suggest using my released WAMP u can find it at release section.. it's configured - all u gotta do is redo all teh config for the directories of extension etc..

lol why i have to use WAMP?
why i dont use xamp?
 
Re: [release] Mini php VSRO panel ( useful ) !

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\include\Security.php:1) in C:\xampp\htdocs\login.php on line 5

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\include\Security.php:1) in C:\xampp\htdocs\login.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\include\Security.php:1) in C:\xampp\htdocs\login.php on line 32
 
Last edited:
Re: [release] Mini php VSRO panel ( useful ) !

Yes u can, keep the post method and just add the html code before this statement. Add the css link in the head tag.
Code:
<html>
<head>
<title> Page Tittle </title>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form action='login.php' method='POST'>
        <table border='1'>
            <tr>
                <td>Username</td>
                <td><input type='text' name='username'></td>
            </tr>
            <tr>
                <td>Password:</td>
                <td><input type='password' name='password'></td>
            </tr>
            <tr>
                <td></td>
                <td><input type='submit' name='submit' value='Login'></td>
            </tr>
        </table>
    </form>
";
?>
</body>
</html>

This is just a example how to do it. U have to have a file named layout.css with all ur styles and u need to specify the style class for each element. But i wont post everything here.
 
Re: [release] Mini php VSRO panel ( useful ) !

Yes u can, keep the post method and just add the html code before this statement. Add the css link in the head tag.
Code:
<html>
<head>
<title> Page Tittle </title>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form action='login.php' method='POST'>
        <table border='1'>
            <tr>
                <td>Username</td>
                <td><input type='text' name='username'></td>
            </tr>
            <tr>
                <td>Password:</td>
                <td><input type='password' name='password'></td>
            </tr>
            <tr>
                <td></td>
                <td><input type='submit' name='submit' value='Login'></td>
            </tr>
        </table>
    </form>
";
?>
</body>
</html>

This is just a example how to do it. U have to have a file named layout.css with all ur styles and u need to specify the style class for each element. But i wont post everything here.

yeah, I got it ty.


now i have this error
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\include\Security.php:1) in C:\xampp\htdocs\login.php on line 5

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\include\Security.php:1) in C:\xampp\htdocs\login.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\include\Security.php:1) in C:\xampp\htdocs\login.php on line 32
 
Re: [release] Mini php VSRO panel ( useful ) !

Well, i had a working usercp but reinstalled my pc and lost the source, but i can recode it if someone is interested :] Had session logins etc

Arturo, why is there a session unset, only a session destroy will work just fine.

BTW: I'm searching for a nice site template. If someone has one please contact me
 
Back