-
SW Administration Panel
Hey,
In case you don't know, i've coded an administration panel made in PHP/AJAX.
The design has been made by Ironic.
Preview:
http://i54.tinypic.com/n69ws3.png
The functions:
Character:
Change Name
Change Level
Change Gender
Change Hair
Change Face
Change XP
Change BP
Change Kill Count
Change Death Count
Change PlayTime
Go to account of character
Delete Character
Ban Character
Send item to inventory of character
Send item to storage of character
Kick character of his clan (in case he's not the leader)
Account:
Change UserID
Change UGradeID
Change PGradeID
Change Email
Change Password
Change Coins
Send item to storage
Clan:
Change Name
Change Points
Change Wins
Change Losses
Delete Clan
Disable Emblem
Kick everyone except the leader of the clan.
Admin:
Change admin message
View the log entries
Search:
Search account(s) by UserID, AID, UGradeID, PGradeID, Email or Last IP.
Search character(s) by Name, CID or AID.
Search clan(s) by Name, CLID, MasterCID or leader name.
Other:
Accounts Made
Characters Made
Clans Made
Server status + player count
Admin message on the homepage.
Notes from staff, staff can leave a message here & admins can delete messages.
Ajax search + changing values works with ajax.
Possibility to allow certain accounts or certain UGradeID's to the panel.
XP & levels are stored in inc/xptable.xml so easy to edit it.
Once you pressed on an account,character or clan it will show you another screen with input fields with the values in it.
Once you changed a value you can click somewhere else on the website and it will be updated.
The account names defined in the $_CONFIG['admins'] array will see a link below the server status to the admin functions.
How to setup:
1) Download & unpack in a folder in your htdocs.
2) Open sql.txt and execute it in your MsSQL database.
3) open class_config.php in the inc folder and edit it.
4) Open settings.php in the inc folder and edit it.
5) Check if it works.
6) Thank me.
Tested on Firefox 4.0/5.0, Google Chrome & IE9.
This administration panel was more to improve my AJAX skills a bit so don't expect very neat and clean code, it should be readable though. :)
F.A.Q:
Q: I'm getting the error: "Fatal error: Call to undefined function mssql_connect()".
A: Enable the php_mssql.dll extension in your php.ini. Remove the ; in front of the line and restart your Apache.
Download Link V1.2: http://www.sendspace.com/file/hm9p2y
-
Re: SW Administration Panel
First Reply!!
It is sexy, it is cool, it is simple but functional!!
In short!! I fucking like it.
Question, what coins are you talking about? Donor coins or event?
-
Re: SW Administration Panel
I'm talking about donation coins. :)
In case you don't got the coins column in the table "Account", you will have to edit some lines in the PHP scripts but that's explained in the settings.php.
-
Re: SW Administration Panel
EDIT: NauticaL's question got answered.
Going to see the panel....
-
Re: SW Administration Panel
If someone can make the CSS look better (such as at the search function) feel free to edit it and I'll update it if it looks better.
-
Re: SW Administration Panel
Quote:
Originally Posted by
SuperWaffle
If someone can make the CSS look better (such as at the search function) feel free to edit it and I'll update it if it looks better.
i was thinking of doing my own redesign but i got no mssql on my pc too much work lol.
But when i got time i will download mssql and apache.
Thanks for the release.
-
Re: SW Administration Panel
Thanks a lot man, it looks sleek & organized.
cough cough:* Designed by Ironic, and logo by Me(Dylan)
-
Re: SW Administration Panel
If you guys didn't know by now, I'm Ironic. :3
Looks sexy mens.
Edit: Problem found, my UGrade in the database is 255 and I still can't seem to access the ACP; it says "You have no access to the panel!". Help?
-
Re: SW Administration Panel
It keeps saying Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (I CUT THIS OUT)in C:\wamp\www\inc\class_config.php on line 21
Failed to connect to the database!
I have eveything perfect
-
Re: SW Administration Panel
^ First thingy majigy of a server, nothing is perfect and won't be perfect. PERFECT isn't even a word when it comes to many things...
This looks really nice, good job girls!
-
Re: SW Administration Panel
Quote:
Originally Posted by
Horrifical
It keeps saying Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (I CUT THIS OUT)in C:\wamp\www\inc\class_config.php on line 21
Failed to connect to the database!
I have eveything perfect
You need to configure your wamp with MSSQL.
-
Re: SW Administration Panel
Love you, i will use it :D!
-
Re: SW Administration Panel
Linkdoesn't work for me ;(
-
Re: SW Administration Panel
Quote:
Originally Posted by
Khristian20
Linkdoesn't work for me ;(
Yea the link seemed to be down for a few hours this morning.
It's up to me again.
-
Re: SW Administration Panel
-
Re: SW Administration Panel
-
Re: SW Administration Panel
Can you help The admin Panel say: You have no access to the admin panel!
I have eveything perfect
Someone can help me
-
Re: SW Administration Panel
Quote:
Originally Posted by
Echoki
Can you help The admin Panel say: You have no access to the admin panel!
I have eveything perfect
Someone can help me
Then change $accopt to 1 in the settings.php file.
If your $accopt is 0 then you have to add your account name in the $accs array in the settings.php file.
-
Re: SW Administration Panel
Nice, I really love the design and it is a very nice panel.
For the people who are having trouble with the mssql_connect function, I don't mean to take away SuperWaffle's help part of the release, but there is the condition where it might be the .dll problem. How to fix that and where to get it is in my thread Unofficial Fix Thread.
-
Re: SW Administration Panel
Wow, thanks for sharing this with us :O
9.9/10 -0.1 for the design ;p its not my style but that doesnt matter.
People will definatly use this.
-
Re: SW Administration Panel
Quote:
Originally Posted by
ExelcysPrime
Wow, thanks for sharing this with us :O
9.9/10 -0.1 for the design ;p its not my style but that doesnt matter.
People will definatly use this.
you're welcome for designing it
-
Re: SW Administration Panel
Tested it out, it's awesome but..
Issues/Bugs that need fixing:
- Make the Name hyperlink more obvious in the panel's results. (I thought nothing was click-able when I first tested it =P)
- Search does not work that well. (e.g. Try typing 252, select account, UGradeID. Nothing shows up and when you click search, it refreshes with nothing. You need to select account, UGradeID and then type 252, to make Search work.)
- Use session_unset() before session_destroy() to unset all session variables in the panel. In some cases while doing an action on the panel, you might randomly get an error message "Login first", and when you try to relogin, it repeats that message over and over again.
- Last Login Date issue. Some users who last logged in over a year ago are seen in the Last 20 Online on Accounts and Characters.
- convertgrade() does not have a default return value for custom UGradeIDs due to hard-coded returns? (View the code all the way below)
Last Login Date Issue (template_account.php, template_character.php)
Do not use:
template_character.php
PHP Code:
SELECT TOP(20)* FROM Account WHERE LastLoginTime > LastLogoutTime
instead, use
template_character.php
PHP Code:
SELECT TOP(20)* FROM Login ORDER BY LastConnDate DESC
The same can be done to template_account.php by doing an INNER JOIN on the query, and not using LastLoginTime from the Account table in the query result as it is inaccurate:
PHP Code:
SELECT TOP(20) a.AID, a.UserID, a.UGradeID, l.LastConnDate, a.Email FROM Account a INNER JOIN Login l ON a.AID = l.AID ORDER BY l.LastConnDate DESC
Things you can add:
- Add an advanced configuration section.
Allow the customization of UGradeIDs in a variable so that it can be used in the "Account" UGradeID tab without editing the hard-coded definitions, if the user has custom UGradeIDs. Then, you can list each element with its sub-element in the array in convertgrade(). (Example below) - Add a $coinstable variable in settings.php for users with "Coins" on a different table.
- Add a "Previous / Next 50" to select the previous/next 50 results in Search.
- Add an [x] beside the name in Notes From Staff, if the user is in $admins at settings.php, to allow the removal of messages.
PHP Code:
// Configuration
$config_UGID = array(0 => "Normal Member",
255 => "Administrator");
// Listing at convertgrade()
public function convertgrade($grade)
{
$parsed = "";
$found = 0;
foreach ($config_UGID as $uid => $value)
{
if ($grade == $uid)
{
$found = 1;
$parsed .= '<option value="' . $uid . '" SELECTED>' . $value . '(' . $uid . ')</option>';
}
else
$parsed .= '<option value="' . $uid . '">' . $value . '(' . $uid . ')</option>';
}
if ($found == 0)
$parsed .= '<option value="' . $uid . '" SELECTED>Unknown (' . $grade . ')</option>';
return $parsed;
}
Just whipped up that code - it's pretty much pseudo, so pardon me if I have any errors/syntax errors.
:)
-
Re: SW Administration Panel
@Linear
Thanks, once I've installed all my shit on my SSD I will add/fix some things and change how some of the functions work.
-
Re: SW Administration Panel
I didnt mean that it isnt fcking awesome xD its just to square like for me, i know your other work and your great.
-
Re: SW Administration Panel
Another admin panel?. . .
-
Re: SW Administration Panel
err.. how do I Execute sql.txt to my mssql @.@
?
-
Re: SW Administration Panel
Quote:
Originally Posted by
[+]Python
Another admin panel?. . .
Problem, officer?
-
Re: SW Administration Panel
Updated the admin panel to V1.1
Changes:
- Account/character/clan names are now the color Maroon at the search function so it's obvious you can click on it.
- Added session_unset(); before all session_destroy();.
- Fixed last login date issue at account and character.
- Configuration settings are now stored in the $_CONFIG array.
- Added $_CONFIG['coinstable'] variable. I guess I don't need to explain what it does.
- In case you got custom UGradeID's you can add them with ease in the $_CONFIG['uids'] array.
- Admins can now delete messages in the notice box by pressing the X behind the name.
- At the admin part at the view log entries function you can change the url &amount= to a number to show a specific amount.
- Fixed the sql.txt so you can execute it without problems.
Thanks to Linear for suggestions.
Next version will have some -non important- changes in functions.
@bajay0124
Simply connect to your GunzDB, press "New Query" and paste it all there and press the red !.
-
Re: SW Administration Panel
Thanks for considering my suggestions. :)
There's a frustrating issue: Search - select the option Character and Name, type something, erase/add text.
It doesn't return any result in some cases and when you click "Search" on the nav bar again, it gives an error "Login first", and when you Login, you might get "Login IP and current IP do not match".
Another bug:
- Character gender - convertgender2()
- The values were filled wrongly.
Fixed code below: (fixed options, added support for Unknown gender in it)
PHP Code:
public function convertgender2($gender)
{
if($gender == 1)
{
return '<option value="1" SELECTED>Female</option><option value="0">Male</option>';
}
elseif($gender == 0)
{
return '<option value="1">Female</option><option value="0" SELECTED>Male</option>';
}
else
{
return '<option value="' . $gender . '">UNKNOWN ("' . $gender . '")</option><option value="0">Female</option><option value="1">Male</option>';
}
}
EDIT: More bugs.
- Login IP checking is inaccurate, sometimes, $_SERVER['REMOTE_ADDR'] returns a wrong IP, invalidating the session.
- Logging off will produce a blank page.
-
Re: SW Administration Panel
- Yea $_SERVER['REMOTE_ADDR'] sometimes doesn't give the correct IP, since that's the only way I know to get an IP in PHP, I will remove the IP check function.
- Logout function works normally to me. Can't reproduce the problem. (It redirects you to index.php after logging out.)
- Can't reproduce the problem with the search function either. I will remove the "Search" button since it's not needed and doesn't work anyways.
-
Re: SW Administration Panel
Quote:
Originally Posted by
SuperWaffle
- Yea $_SERVER['REMOTE_ADDR'] sometimes doesn't give the correct IP, since that's the only way I know to get an IP in PHP, I will remove the IP check function.
- Logout function works normally to me. Can't reproduce the problem. (It redirects you to index.php after logging out.)
- Can't reproduce the problem with the search function either. I will remove the "Search" button since it's not needed and doesn't work anyways.
Search works, but random errors sometimes.
-
Re: SW Administration Panel
Quick few changes, changed the download link.
Changes:
- Changed convert gender function. Thanks to Linear.
- Removed IP check function since it doesn't grab the correct IP sometimes.
- Removed the "Search" button at the search page since it's not needed and didn't work.
-
Re: SW Administration Panel
How to execute the notepad file SQL in MSSQL?
;S
-
Re: SW Administration Panel
I got a suggestion Dave , instead of it sending items to one user you can make it send one item to all users.
-
Re: SW Administration Panel
Quote:
Originally Posted by
Northants
How to execute the notepad file SQL in MSSQL?
;S
Copy the content and paste it on a new query in the MSSQL then just hit Run and that's all.
-
Re: SW Administration Panel
-
Re: SW Administration Panel
its pretty nice i like it 10/10
-
Re: SW Administration Panel
This is amazing, great release.:)
-
Re: SW Administration Panel
"search" is not work please help me...
-
Re: SW Administration Panel
More details could be useful.
-
Re: SW Administration Panel
i Ugrade and Pgrade is 255
and still cant connect to the panel!
-
Re: SW Administration Panel
-Liked.
This is useful towards my server , Thanks
-
Re: SW Administration Panel
Quote:
Originally Posted by
gausho
i Ugrade and Pgrade is 255
and still cant connect to the panel!
$_CONFIG['accopt'] should be 0.
Also once again, more details could be useful... what does it say?
-
Quote:
Originally Posted by
SuperWaffle
$_CONFIG['accopt'] should be 0.
Also once again, more details could be useful... what does it say?
I he this when I try logging in "You have no access to the admin panel" , also have 255 grade!!!! And in setting.php that confit or w.e is set to 0, I tried didn't work. Then tried setting to 1, didn't work. Also tried adding the username or w.e, same goddam message!!! You have no access to the admin panel......
Posted via Mobile Device
-
Re: SW Administration Panel
Quote:
Originally Posted by
yurij13
I he this when I try logging in "You have no access to the admin panel" , also have 255 grade!!!! And in setting.php that confit or w.e is set to 0, I tried didn't work. Then tried setting to 1, didn't work. Also tried adding the username or w.e, same goddam message!!! You have no access to the admin panel......
Posted via Mobile Device
$_CONFIG['accs'] is CaSe SeNsItIvE.
-
Quote:
Originally Posted by
SuperWaffle
$_CONFIG['accs'] is CaSe SeNsItIvE.
I don't get it >.<
Posted via Mobile Device
-
Re: SW Administration Panel
^This means if you edit 'accs' with 'Accs' it wouldn't work.
-
Re: SW Administration Panel
Quote:
Originally Posted by
yurij13
I don't get it >.<
Posted via Mobile Device
I mean if you login with "RoFlcopter" but the account name in the array $_CONFIG['accs'] is "roflcopter" then that's not correct.
-
Quote:
Originally Posted by
SuperWaffle
I mean if you login with "RoFlcopter" but the account name in the array $_CONFIG['accs'] is "roflcopter" then that's not correct.
Yeah, it still doesn't work. Ahh well :/
Posted via Mobile Device
-
Re: SW Administration Panel
( ! ) Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\inc\class_config.php on line 21
Call Stack
# Time Memory Function Location
1 0.0015 383960 {main}( ) ..\index.php:0
2 0.0023 391312 require( 'C:\wamp\www\inc\class_config.php' ) ..\index.php:2
3 0.0036 395496 config->__construct( ) ..\class_config.php:25
Did what he said, to do in php.ini, idk how to enable, but i removed the ;
-
Re: SW Administration Panel
Remove the ; in front of the mssql.dll and restart your Apache.
-
Re: SW Administration Panel
idk if its a bug or if its been mentioned but when i log in every time it says the server is offline when it is online and logging it doesn't work unless i changed it to use the names "account1" so i've been doing that.. just keep adding names in there lol any ideas on how to fix it? when i try to log in i don't get any errors but the page will just refresh
-
Re: SW Administration Panel
Quote:
Originally Posted by
daniel131605
idk if its a bug or if its been mentioned but when i log in every time it says the server is offline when it is online and logging it doesn't work unless i changed it to use the names "account1" so i've been doing that.. just keep adding names in there lol any ideas on how to fix it? when i try to log in i don't get any errors but the page will just refresh
It should work.
Be sure the port and IP is right in the settings.php.
Also, the account names array is case sensitive.
Even 1 letter wrong will stop you from logging in.
-
Re: SW Administration Panel
Code:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'SWAdminMsg'. (severity 16) in C:\xampp\htdocs\inc\templates\template_home.php on line 7
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\inc\templates\template_home.php on line 7
Warning: mssql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\templates\template_home.php on line 8
?
-
Re: SW Administration Panel
Quote:
Originally Posted by
flyffhelper
Code:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'SWAdminMsg'. (severity 16) in C:\xampp\htdocs\inc\templates\template_home.php on line 7
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\inc\templates\template_home.php on line 7
Warning: mssql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\templates\template_home.php on line 8
?
Did you even execute what's inside the sql.txt in the database?
The error means the table does not exist.
-
Re: SW Administration Panel
-
Re: SW Administration Panel
Quote:
Originally Posted by
flyffhelper
I excuted it/
Did you check in MSSQL if those tables exist?
-
Re: SW Administration Panel
It says SWadminMsg already exist.
-
Re: SW Administration Panel
-
Re: SW Administration Panel
I got some trouble when i go to accounts
Code:
Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'FROM'. (severity 15) in C:\xampp\htdocs\inc\templates\template_account.php on line 14
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\inc\templates\template_account.php on line 14
Warning: mssql_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\templates\template_account.php on line 15
-
Re: SW Administration Panel
Quote:
Originally Posted by
flyffhelper
I got some trouble when i go to accounts
Code:
Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'FROM'. (severity 15) in C:\xampp\htdocs\inc\templates\template_account.php on line 14
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\inc\templates\template_account.php on line 14
Warning: mssql_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\templates\template_account.php on line 15
That's this line:
PHP Code:
$coins = mssql_query("SELECT ".$_CONFIG['coinscolumn']." FROM ".$_CONFIG['coinstable']." WHERE AID = '".$aid."'");
Check if $_CONFIG['coinscolumn'] and $_CONFIG['coinstable'] are an existing table and column in inc/settings.php.
-
Re: SW Administration Panel
Code:
/ The name of the column/table where your coins are stored in.
$_CONFIG['coinscolumn'] = "coins";
$_CONFIG['coinstable'] = "Account";
-
Re: SW Administration Panel
Hello all, i have an question, how do i execute the sql.txt in the db?
-
Re: SW Administration Panel
Quote:
Originally Posted by
going208
Hello all, i have an question, how do i execute the sql.txt in the db?
Open a new query and copy and paste the text from the file into that and execute it.
(Might be wrong but, been a long time since I actually used databases and stuff)
StroopWaffle is on vacation so he won't be helping out for a week.
-
Re: SW Administration Panel
I am having this Usergrade not correct problem.. How do I solve this?
-
Re: SW Administration Panel
Quote:
Originally Posted by
gago117
I am having this Usergrade not correct problem.. How do I solve this?
What's the full error you are getting?
If it's "Your UGradeID does not have access!" then it means your UGradeID is not in the array of $_CONFIG['accessuid'].
-
Re: SW Administration Panel
-
Re: SW Administration Panel
-
Re: SW Administration Panel
-
Re: SW Administration Panel
Quote:
Originally Posted by
SuperWaffle
What's the full error you are getting?
If it's "Your UGradeID does not have access!" then it means your UGradeID is not in the array of $_CONFIG['accessuid'].
I tried to add a usergrade at the settings.php.
Then when I test it, by selecting the new usergrade at the dropdown box, it says "UGrade not correct"
How do I solve this?
-
Re: SW Administration Panel
Looking good n.n
Although I don't really like the grungy textures behind the buttons and content.
-
Re: SW Administration Panel
:*:
arum like this: You can not access the Admin Panel, my account is now with the ugraid: 255,
please help as quickly
-
Re: SW Administration Panel
Quote:
Originally Posted by
facafeia
:*:
arum like this: You can not access the Admin Panel, my account is now with the ugraid: 255,
please help as quickly
settings.php
Code:
// If $accopt is 1, define the accounts here. CASE SENSITIVE.
$_CONFIG['accs'] = array("Account1", "Account2");
// Who are the admins? Those users will have access to the admin message and view log function.
$_CONFIG['admins'] = array("Account1", "Account2");
add your own account name..
or it will not acces.
-
Re: SW Administration Panel
Thank you ... love you =)
-
Re: SW Administration Panel
SuperWaffle i got the blue web you made. bud i dont know howt o set it up always get error in include/config/line 18
and i dont know how this panel works
and this error to
Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\Panel\inc\class_config.php on line 21
the line 21 fixed bud i get this error when i log in
Fatal error: Call to undefined function mssql_query() in C:\AppServ\www\Panel\index.php on line 27
and there stands in the folder : $q = mssql_query("SELECT * FROM Login WHERE UserID = '".$user."' AND Password = '".$pass."'");
-
Re: SW Administration Panel
Quote:
Originally Posted by
hugofunky
SuperWaffle i got the blue web you made. bud i dont know howt o set it up always get error in include/config/line 18
and i dont know how this panel works
and this error to
Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\Panel\inc\class_config.php on line 21
the line 21 fixed bud i get this error when i log in
Fatal error: Call to undefined function mssql_query() in C:\AppServ\www\Panel\index.php on line 27
and there stands in the folder : $q = mssql_query("SELECT * FROM Login WHERE UserID = '".$user."' AND Password = '".$pass."'");
----- Look at the quote below. -----
Quote:
Originally Posted by SuperWaffle
F.A.Q:
Q: I'm getting the error: "Fatal error: Call to undefined function mssql_connect()".
A: Enable the php_mssql.dll extension in your php.ini. Remove the ; in front of the line and restart your Apache.