Removed.
[Mod]Removed due to a hack. It makes himself a GM in your server.[/mod]
Put up a new version without the hack. Till then, closed.
Printable View
Removed.
[Mod]Removed due to a hack. It makes himself a GM in your server.[/mod]
Put up a new version without the hack. Till then, closed.
nice made sins im to lazy to make it my self
Lmao! I just made a clan rankings page. For v3.6 RC2.
k well these are just simple fixes i took the 2 min to do just using ur php code, switching things around to make it sumtin else =P
if u dont want me doing this just tell me, there just little fixes i use to make it a little better =P
got everything to work sept it wont select a DB to fetch from im not good at php so anyone help?
did u make sure to edit the config to ur sql?
Can you share the code you have so it says
Login:Online | Char:Online | World:Online
?
Edit* thanks btw
sure, see if u r using the one im using what he did was only include the world server status and made it say server status, so open index.php
Find;
replace with..Code:<td height="18" nowrap="nowrap" class="tlc"><span class="mainmenu1">Server Status: <span class="mainmenu1"><font color="#00FF00"><?php WorldStatus(); ?></font>
Code:<td height="18" nowrap="nowrap" class="tlc"><span class="mainmenu1">|World Server: <span class="mainmenu1"><font color="#00FF00"><?php WorldStatus(); ?></font><span class="mainmenu1">|Char Server: <span class="mainmenu1"><font color="#00FF00"><?php CharStatus(); ?></font><span class="mainmenu1">|Login Server: <span class="mainmenu1"><font color="#00FF00"><?php LoginStatus(); ?></font>|</td>
thanks! it works grate can i ask you something els?
Well if your a normal player and you click admin CP you get banned Is there a way from stopping peoplr from getting banned?
AND
is there a way that people do NOT have to login to see everything Sept UserCP and Admin CP
thanks so much man
Well the banned thing doesnt actually effect the player i dont think.. i dont think they actually get banned it just says they do. Just like how it says you must login u noob if they click the cp
and as for the cant see it unless they login.. im not sure on how to do that.
but to change the account banned thing, just open alogin or w/e page u r trying to change the text for and just replace it with anything..
but mine only says account does not exist.. so its just a matter of text.
so like open alogin.php;
find;
or w/eCode:else {
echo "<strong>Account Banned!</strong>";
}
and change to;
Code:else {
echo "<strong>What Ever text u want it to say</strong>";
}[
well first i dident know it was an edit to matts im usen dyeprey..more stable
anyways here
http://tempzrose.servebeer.com/clan_ranking.php
look and see
see thats why, ur using dyeprey... um no clue how to edit his junk..
what u could do is make like.. a folder in the www folder and name it CMS or sumtin, and put matts cms in there then just add the clan rankings that way and link it back to ur site..
Im sorry to bother you again just 2 more things if you could help me with.
1:How can i make it ask me to login only when i click user or admin CP instead of right when i go to the site.
2: How do i make/put a player online script into the website? like the one you got?
thanks once again for all your help
k.. well.. i dont quite get #1 and #2 do u mean how many ppl are on or the part showing who is online?
for a live demo of my edits to see them how they work, check,
Zomg Rose
How do i add the total online and online users
K the total online first
go to folder www/_inc and open functions.php
Find something like;
below it u might see sumtin like;Code:function totalchars() {
$result = mysql_query("SELECT * FROM characters");
$rows = mysql_num_rows($result);
echo $rows ;
}
blah blahCode:function totalon() {
replace everything in the function totalon() thing with;
Then close functions.php and go back to the www folder and open index.phpCode:function totalon() {
$result = mysql_query("SELECT online FROM accounts WHERE online = '1'");
$rows = mysql_num_rows($result);
echo $rows ;
}
find;
and below it add;Code:Total Characters:
<?php totalchars(); ?>
Code:Total Online:
<?php totalon(); ?>
Then for the onlineusers script i got it from a dif post located at:
http://forum.ragezone.com/f336/relea...rs-php-233331/
then linked it to the page.
u can get my functions.php from:
functions.php - FileFront.com
when i try adding total online i get
Fatal error: Cannot redeclare totalon() (previously declared in C:\wamp\www\website\_inc\functions.php:84) in C:\wamp\www\website\_inc\functions.php on line 93
Quote:
<?php
$online = '<img src="images/server_online.gif" alt="asd" width="20" height="20">';
include('config.php'); # Configuration Load.
function notice($text,$header='',$type='') {
if ($type == 'alert') {
return "$header";
} else {
$key= rand(0,5);
$key = str_pad($key+1, 2, 0, STR_PAD_LEFT);
return "$text";
}
}
function Connect() {
include('config.php'); # Configuration Load.
mysql_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']);
mysql_select_db($config['db']['name']);
}
function get_news() {
require('modules/home.php');
}
function LoginStatus() {
$result = @fsockopen('127.0.0.1', '29000', $ERRNO, $ERRSTR, .02);
if(!$result) {
echo notice('<font color=red>Offline</font>');
} else {
echo notice('<font color=green>Online</font>');
}
}
function WorldStatus() {
$result = @fsockopen('127.0.0.1', '29200', $ERRNO, $ERRSTR, .02);
if(!$result) {
echo notice('<font color=red>Offline</font>');
} else {
echo notice('<font color=green>Online</font>');
}
}
function CharStatus() {
$result = @fsockopen('127.0.0.1', '29100', $ERRNO, $ERRSTR, .02);
if(!$result) {
echo notice('<font color=red>Offline</font>');
} else {
echo notice('<font color=green>Online</font>');
}
}
function banUser() {
$user = addslashes($_POST['ban_username']);
$result = mysql_query("UPDATE accounts SET accesslevel = '-100' WHERE username = '$user'");
if(!$result) {
echo notice('User cannot be banned at the moment because he / she is online, or you entered an invalid user.');
} else {
echo notice('User has been banned successfully.');
}
}
function unbanUser() {
$user = addslashes($_POST['unban_username']);
$result = mysql_query("UPDATE accounts SET accesslevel = '100' WHERE username = '$user'");
if(!$result) {
echo notice('User cannot be unbanned at the moment because he / she is online, or you entered an invalid user.');
} else {
echo notice('User has been unbanned successfully.');
}
}
function totalACC() {
$result = mysql_query("SELECT * FROM accounts");
$rows = mysql_num_rows($result);
echo $rows ;
}
function totalon() {
$result = mysql_query("SELECT online FROM accounts WHERE online = '1'");
$rows = mysql_num_rows($result);
echo $rows ;
}
function totalon() {
$result = mysql_query("SELECT * FROM list_connected");
$rows = mysql_num_rows($result);
echo $rows ;
}
function getUserChars() {
$result = mysql_query("SELECT * FROM characters WHERE account_name = '".$_SESSION['account']."'");
$chars = mysql_fetch_array($result);
}
function userLevels() {
$levels = array(
'-100' => '<font color=red>Banned</font>',
'100' => '<font color=green>Member</font>',
'300' => '<b><font color=green>Administrator</font>',
);
}
function checkAdminLogin() {
$result = mysql_query("SELECT * FROM accounts WHERE username = '$U' and password = '$P' and accesslevel = '300'");
}
function checkUserLogin() {
$result = mysql_query("SELECT * FROM accounts WHERE username = '$U' and password = '$P' and accesslevel = '100'");
}
function errors() {
$reg = array(
'done' => 'Registration Complete!',
'fail' => 'Registration Failed',
'inUs' => 'Username is in use.',
'psM' => 'Passwords dont match!',
);
}
u have it twice
simple fix, delete this one;Code:function totalon() {
$result = mysql_query("SELECT online FROM accounts WHERE online = '1'");
$rows = mysql_num_rows($result);
echo $rows ;
}
function totalon() {
$result = mysql_query("SELECT * FROM list_connected");
$rows = mysql_num_rows($result);
echo $rows ;
}
it runs off old sql table.Code:function totalon() {
$result = mysql_query("SELECT * FROM list_connected");
$rows = mysql_num_rows($result);
echo $rows ;
}
how do u use matts its like got nothing working lol
if i need sumtin i make it or i do it the hard way
also all these updates that ive been posting i added to the main post.
Ok that errors gone now when i go to my website i get
| Total Accounts: 3 | Total Characters: 0
Fatal error: Call to undefined function totalchars() in C:\wamp\www\website\index.php on line 185
where the total player is supost to be
edit
i downloaded your function file and dident help i just get this when i goto site
Total Accounts: 3 | Total Characters: 0 1
k well here is my index too
----------------------------
dont know what u might have done wrong =P
Alright it works thanks so much.
last question. How do i take the popup out?
or maybe not
Oh sorry, lol 1 sec
here; index.php - FileFront.com
thanks sooooo much there was 1 more thing i was going to ask but nvm you have done alot more me thanks so much!
np, if u have anything to ask just do it, ill do my best to answer, also taking ideas, ill see what i can do =P
Alright well you know how on your website you dont need to login unless your going to use user CP or admin CP?
how did you do that?
uhm... i have no clue how i did that... thats just how it was lol
Hmm when i click online users it says page cant be found
did u add the online user php to the modules folder?
here put this in modules folder;
onlineplayers.php - FileFront.com
when i put that in my modules folder i getQuote:
Warning: include(config.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\website\modules\onlineplayers.php on line 2
Warning: include() [function.include]: Failed opening 'config.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\website\modules\onlineplayers.php on line 2
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\website\modules\onlineplayers.php on line 4
Could not connect to server database
yeah u didnt have the config for it;
put this in your modules folder, make sure u edit it to ur database
config.php - FileFront.com
that dont work for me gives me blank page...the online players that is
should work, works just fine for me; Is anybody actually online?
ok it all works grate now thanks for all your help
Np
need anything more just ask
here i edited mine a bit looks better :P and gives admins + banned + onlines maybe works..
Code:<?php
include("config.php");
// Connect to the database
$db = mysql_connect($dbhost, $dbuser, $dbpswd) or die("Could not connect to server database");
mysql_select_db($dbname, $db);
// Select all the banned users and display them
$result = mysql_query("SELECT * FROM accounts WHERE online = '1'", $db) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo '<strong><center>Online:<br>'.$row[lastchar].'</strong>';
}
$result = mysql_query("SELECT * FROM accounts WHERE accesslevel = '0'", $db) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo '<strong><center>------<br>Banned:<br>'.$row[username].'<BR>------</strong>';
}
$result = mysql_query("SELECT * FROM accounts WHERE accesslevel = '300'", $db) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo '<strong><center>------<br>Admins:<br>'.$row[username].'<BR>------</strong>';
}
?>
doesnt rly work... all it does for me is spilt admins.. looks like this..
http://img91.imageshack.us/img91/4854/lolfk8.th.png
ill see if i can get it to work for me..
been editing it.. but still not done..
edit: done, works;
The only prob is, it lists the admins as there last char they were on, doesnt say when they are on or not but it does say who they are, it will list banned users at the bottom.. and the users part will show users when they are online.Code:<?php
include("config.php");
// Connect to the database
$db = mysql_connect($dbhost, $dbuser, $dbpswd) or die("Could not connect to server database");
mysql_select_db($dbname, $db);
// Select all the Admins and lists the char they were last on
// I cant seem to make it toggle when they are on or off so... it always will say they are on just listing them.
$result = mysql_query("SELECT * FROM accounts WHERE accesslevel = '300'", $db) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo "<strong>Admins:".$row['lastchar']."<BR></strong>";
}
$result = mysql_query("SELECT * FROM accounts WHERE online = '1'", $db) or die(mysql_error());
echo "<strong><br><br>Users:</strong><br>";
while($row = mysql_fetch_array( $result )) {
echo "<strong>".$row['lastchar']."<BR></strong>";
}
// Select all the Banned and lists the char
// will also list them.
$result = mysql_query("SELECT * FROM accounts WHERE accesslevel = '0'", $db) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo "<strong><br><br>Banned:".$row['lastchar']."<BR></strong>";
}
mysql_close($db);
?>
so it shows like this;
Admins: (last char name)
(next admin name)
Users: (name of a user online)
(another user in game)
Banned: (Name of banned player)
(if another banned one it will go down here)
and thats how it lists it.
v(^o^)v
here would be a cool idea try adding the item mall matt released to this CMS
actually i have been attempting that for the past half hour to hour i think im getting close =P
thats sick man! Hope you get it.it would be really neat to see
im going to sleep rite now, then i have school, then about an hour after i get home from school i have to do maintenance on my server, then after all that i will resume working on it =P
maybe u can do something like
add this
with this?PHP Code:$result = mysql_query("SELECT * FROM accounts WHERE accesslevel = '300'", $db) or die(mysql_error());
together lol im not that php advanced tho lolPHP Code:("SELECT * FROM accounts WHERE online = '1'", $db)
workz :P i smartz lol
yeah i had that done already, just nobody asked and i didnt rly think it was important but meh it was an easy code too lol
im working on gettings gms out of the ranking, but see the only way i could do that is if all the users had something in characters.sql that i could change for gms and make it only show the thing for users, like... using access level on accounts.sql for example, if there was sumtin like that, i could make it show only the users with 100 access level and not the 300 (gms) but since characters.sql doesn't have anything like that, that is common between users and can be altered to be different from GMs its kinda hard xD
Edit -- Got it working, check main post for it.
mm suggestion, Adding Broadcasting to People in server without logging into the game.
thats like completely off cms ability's i think lol
viper67, can i put all the code included a html template ? n how to do this ? plz tell me ;)
wll the way the cms works is it uses the index in the www folder for a template, and pulls the php out of modules which grabs its information from the inc folder that has the functions php and config, so if u wanted like a completly new template all u needed to do is edit the index and images and crap then relink all the stuff.
i think thats what ur saying, but if not then i dont understand the Q
yeah i often find myself wanting to tell ppl that w/o having to log in but i don't think its possible
Hey are you still trying to add the item mall to the CMS?
i did but sorta failed... i couldent get the functions and config working... so yeah, i just use my own little make shift one, i have to manually put the items on the char but it doesnt take much
Yo your item mall on your website is cool viper how did you make it?
it doesn't work off a script or anything so it is completely manual, when sum 1 buys its set to a donation, each with its own unique donation number, when sum 1 clicks buy it takes them to they page in which the transaction is made via pay pal, they need to wait up to 24 hours for the transaction to complete, how i made it basically is just in html, added images, added the links and junk..
This prob seems pathetic but the way i learned html/css was neopets, from making the guilds to ur profile all of it took eather css/html so coding web pages like that are easy;
so yeah its in my modules folder so its linked to the site that way with ?op=itemmall
Cool i have no clue about html and stuff but ill try it
if u want i can give u the .php, all u have to do is put it in modules folder, link it to ur site, and go thru it and change the "put your link here" spots in it with links to paypal donations for the item =P
Sure Man if you want. thanks alot!
Oh and btw neopets where sick back in the day i still remember playing that game XD
itemmall.php - FileFront.com
yeah so there it is =P
my server is going down im going to join up with a dif server i dont like hosting my own, im going to be there webmaster and code there website and crap and make some gm commands in game for them and stuff (i know only a bit of c++)
on like the first items down to hawker gear i forgot to take out my paypal links so just replace them.
good job viper67, u help alot of ppl there !
I tried to put the php code to a html file, its not effect, how can i put the ranking register ... to a html file, can u try this or share us your full item mall :D
hmm.. not sure what uy mean by ranking register.. can u try to elaborate?
Viper if you want ill hire you if you want to work with my server
well lets stay on topic plz lol this isnt team recruitment, lol
but feel free to pm me, ill see if we can set something up
Thanks for this :)
i see AR-Rose using a roseweb like your yours
Can u tell me the way to add a register table in a html file, i use Dreamweaver MX to make my out web and its a HTML file so i want to put the register table in it. sbd tell me ?
it looks like u have a register table o_O
No wonder I dunno wat u guys talking about -.-" This is not for CMS 3.5 R1 , I thought it is for CMS 3.5 ( Didnt check the date , and i deleted everything because i thought something went wrong.)
my E is bad, its so hard to say what i mean >.<
Is there a way to put the REGISTER CODE( php ) to a HTML files ? do u known :-s
mmmm why do u need too?
besides the reason the register code is in php is so it can connect to the mysql
oh, i know, can i make a html file and in this, i make a table link to the register php code ?
uhm... not sure if i understand completely, but what i think ur saying is like make a page in html that has a link to the php code but the whole page isnt in php... u could.. but not sure how...
Also lots of new edits im going to add to the main post in a few min.
Ok, viper67, keep up your good work or u can release your own CMS n share us :D ( without itemmall ;) )
well... doubt i will make my own.
Anyways, call me default please =P
if i could change my name i would >.<
anyways, im also adding more as i go, today i have added,
-ban to admin cp
-unban to admin cp
-teleport to user cp
-class change to admin cp
-total banned
and now im adding make an account GM using admin cp so u dont have to go thru navicat, just do it on the site, by entering the account name.
still up for suggestions =P
O.O YAY!!!!! thanks!!!!! Default many many many thanks
Code:------------------------------------------------------------------------------------------------------------------------------------
--17.)Reset char level on Admin CP.
------------------------------------------------------------------------------------------------------------------------------------
First off need to link it to admin cp, so open admin.php, if u added my make a gm char then find;
PHP Code:
<a href="?op=make_gm">Make a GM</a><br />
below it add;
PHP Code:
<a href="?op=reset_level">Reset Char Level</a><br />
save and close, open notepad.exe
copy and paste;
PHP Code:
<?php if(session_is_registered(Admin)) {
die('Access Denied');
}
?>
<form id="form1" name="form1" method="post" action="?op=reset_level">
<table width="275" border="0" align="center">
<tr>
<td width="98">Character Name: </td>
<td width="167"><label>
<input type="text" name="textfield">
</label></td>
</tr>
<tr>
<td>Are you sure? </td>
<td><label>
<input name="sure" type="checkbox" id="sure" value="checkbox">
</label></td>
</tr>
</table>
<p align="center">
<input name="submit" type="submit" id="submit" />
<br />
<br />
<?php
if(isset($_POST['sure'])) {
mysql_query("UPDATE characters SET level = '1' WHERE char_name = '".$_POST['textfield']."'");
echo 'Reset Successfull.';
} else {
echo 'If you want to reset this user, then click the box!';
}
?></p>
</form>
save as reset_level.php in www/modules
lol thats for admins to reset users lvls, im working on one to put in user cp so users can reset there char when they reach lvl 250
almost got it working just need to test it =]
--edit--
working and i added it to the first list so now users can reset there lvl at 250
what im workin on now;
http://img120.imageshack.us/img120/5093/statsji8.th.png
ok good job DefaulT :D, release it more faster n share us :D
oh, can u make a reset page for players? it likes a char level 250 can be reset to lv 1 with bonus stat point and skill point
more faster? xD
been workin my tail off =3
u guys tell me what u want ill try to make it
I Like a RESET PAGE for MEMBER,
Any char lv 250 can be Reset to LV1 ( pay the donate point or Zulys )with BONUS SKILL POINT and STAT POINT, do u know me ?
o_O
u sayin u want the reset page to require the person pay zulys or donate points and they get bonus skill points and stat points?
Yes and they come back to lv 1
ill work on it, see if i can get it working
well i cant get it to subtract a certain amount of money, but i can get it to reset there zuly to a certain amount.
but its also 5:44 am here so let me try again tomorrow.
k man ;) i'll wait for it, but note : only char lv 250 can be reset, char with level lower than 250 cant be reset, do u know me
sry for my bad E
yeah thats how it is now, u have to be lvl 250, not higher or lower.
i like the reset page because we can give the hight rate in our server, someone get lv 250, they nerver play more, so now, they can reset and go on playing :D
anyway, to edit item mall, to add more items?
just put ur own image, link, and info in.
Ah ok, it works, a bit all over the place but it works
keep up to make your own CMS, DefaulT, i'll wait for it
lol kay..
my latest update is adding a delete clan section in admin cp
DefaulT, u make a page reset char lv 250 to lv 1, but will they keep thier stat point and skill point ? or come back to lv 1 with some bonus skill point and stat point ?
How can i add 1 more table Email in resgiter.php ?
i havent done they bonus skill and stats yet.
DedaulT, i have a question, how can i remove GM from Ranking ?
i posted on the first post how to.
its true, you are the one and only, how nice you are !
lol ty, its not a very good edit but it does work
some people know how to make these things but noone tell us, only u help me and a lot of ppl there, in your reset.php, i tried to give some bonus stat and skill point but it doesnt work , my point is a (-point) ( exp : -100 stat point ), sry for my bad grammar :D
lol u tried to add a bonus skill point thing but it made u go in to the negative digitz
Can u add there some code to make bonus stat point and skill point ?