[Release]UserCP Beta

Elite Diviner
Joined
Feb 28, 2007
Messages
446
Reaction score
5
Credits to Emisands and his AdminCP which I based the USERCP off of.

How to use?

Step 1 - Go into config.php and change this to your Info

Code:
$mssql_user = "sa";    //Enter here the MSSQL User for your Gunz Database
                    //If the MSSQL Server is in the same server as the web, leave it blank

$mssql_pass = "yourpass";    //Enter here the MSSQL Password for your Gunz Database
                    //If the MSSQL Server is in the same server as the web, leave it blank

$mssql_database = 'DB'; //Enter here the Name of your Gunz Database

//Host. IP If working remotely
$mssql_host = 'SOMETHING\SQLEXPRESS'; //Enter here the name of your SQL Server

$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass); //Don't touch this
mssql_select_db($mssql_database);
Step 2 - Go into changepass.php
And edit this Info
Code:
<?php
$srvip = "ip";
$srvport = "6000";
$mssql_user = "sa";
$mssql_pass = "pass";
$mssql_database = "db";
$mssql_host = "something\SQLEXPRESS";
$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass);
mssql_select_db($mssql_database);
?>
Step 3 Go into clear.php and change this info Also
Code:
<?php
$mssql_user = "sa";
$mssql_pass = "pass";
$mssql_database = "db";
$mssql_host = "something\SQLEXPRESS";
$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass) or die("Cannot connect host.");
mssql_select_db($mssql_database) or die("Cannot connect database.");
?>
Step 4 Go into newupdate.php read this!
Code:
/* How to use?

$update = current update
$newupdate = next update 
$newupdateurl = the url to the new update!

how to configure.

on my server  I have it as 
$update = 1;
$newupdate = 2;
$newupdateurl = "www.pbgunz.eclipse-rose.com";

The next time there is a new update I will change $update to 2
and new update to 3
and if there are no new updates I would make both update and newupdate Equal!
*/
<?php 
$update = 1;
$newupdate = 1;
$newupdateurl = "";

if ($newupdate > $update){
echo " <a href='http://$newupdateurl'><h2>New Launcher</a> | Version $newupdate</h2> ";
} else {
echo " <h2>no new version</h2>";
}
?>
You can change the New Launcher Text in here to What ever you Updated in your server
Code:
echo " <a href='http://$newupdateurl'><h2>New Launcher</a> | Version $newupdate</h2> "

Step 5 Go into Server.php and change this

Code:
<?php $srvip = "serverip";
Step 6 Go into index.php and change this
Code:
<title>USERCP BY AMANDA </title>
<?php 
$logourl ="yourlogoimageurl";

echo "<center><img src='$logourl'></center>";?>
<center><h2>USERCP BY AMANDA</h2></center>
only change
Code:
$logourl ="yourlogoimageurl";
and
Code:
USERCP BY AMANDA
Step 7 - Go Enjoy your new UserCP
Download
 
Quick update

Issue :
Code:
    include "config.php";
    $aid = $_SESSION['AID'];
 $q1 = mssql_query("SELECT * FROM Account(nolock) WHERE AID = $aid");
    $q2 = mssql_fetch_assoc($q1);
    $UGradeID = $q2['UGradeID'];
    if( $UGradeID != 252 and $UGradeID != 255 and $UGradeID != 254 and $UGradeID != 250){
    unset($_SESSION['AID']);
    die("Access Denied");}
?>

Which caused some user's to get Access denied when they made a new account !

To fix that either Change it to this
Code:
include "config.php";
    $aid = $_SESSION['AID'];
    $q1 = mssql_query("SELECT * FROM Account(nolock) WHERE AID = $aid");
    $q2 = mssql_fetch_assoc($q1);
    $UGradeID = $q2['UGradeID'];
    if( $UGradeID == 253 ){
    unset($_SESSION['AID']);
    die("Access Denied");}
?>

Or download this new index.php

 
Amanda...

if you put...

Code:
include "config.php";
    $aid = $_SESSION['AID'];
    $q1 = mssql_query("SELECT * FROM Account(nolock) WHERE AID = $aid");
    $q2 = mssql_fetch_assoc($q1);
    $UGradeID = $q2['UGradeID'];
    if( $UGradeID == 253 ){
    unset($_SESSION['AID']);
    die("Access Denied");}
?>

it will let normal users in... you have to block one for 0.

so it maybe goes like this.

Code:
include "config.php";
    $aid = $_SESSION['AID'];
    $q1 = mssql_query("SELECT * FROM Account(nolock) WHERE AID = $aid");
    $q2 = mssql_fetch_assoc($q1);
    $UGradeID = $q2['UGradeID'];
    if( $UGradeID == 253 ){
    unset($_SESSION['AID']);
    die("Access Denied");}
    if( $UGradeID == 0 ){
    unset($_SESSION['AID']);
    die("Access Denied");}
?>
 
Nope it works Ive tested it Emisand said , that $UGradeID == 253 will Stop Any Banned GradeID from logging , where as if it was $UGradeID != 253 , it would allow them to enter it
 
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\CP\index.php:3) in C:\AppServ\www\CP\index.php on line 4

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\CP\index.php:3) in C:\AppServ\www\CP\index.php on line 4


USERCP BY AMANDA
/* How to use? $update = current update $newupdate = next update $newupdateurl = the url to the new update! how to configure. on my server I have it as $update = 1; $newupdate = 2; $newupdateurl = "www.pbgunz.eclipse-rose.com"; The next time there is a new update I will change $update to 2 and new update to 3 and if there are no new updates I would make both update and newupdate Equal! */
no new version

Problem in my DB??? o.o
 
hope? i think the word your looking for is wished

and this is old post check the date before posting...
 
I got a lot of errors
I use XAMPP and Kekku DB

Errors picture:

Amandy - [Release]UserCP Beta - RaGEZONE Forums
 
Back