[Tool/Web/Other] Website Template (Displays Server Stats and Players Online!)
#1

WARNING: I suggest you to not use this as it is very outdated. I will not be supporting this anymore, although it might be updated one day.


Introduction

This is a old website I had when I used to run my server. It was a page where my server would be displayed. I found it lying around and I thought I'd release it. The template was made back in late 2014, but I've made some little changes to make it better.

I thought this would come in handy for newbies who don't know much about web designing or general coding.


Features
  • Displays your servers information.
  • Displays all players online on your server.
  • Simple error page. The user will be redirected to this page if the server is offline.
  • Easy to configure and setup.
Configuring

Everything must be configured in the 'settings.php' file. To simply display your server, open up settings.php and add your server IP into $serverIP = "";. Eg: $serverIP = "123.4.1.6";. You will also need to change the port, if you need to.

You may also change the defines. These will change the Server name, Owner, Server IP and Server Slogan texts. You will not need to change them manually in the index.php file. Once you save settings.php, upload everything to a webserver and everything should run fine and you should notice all changes.


Download

PHP Version:
http://www.mediafire.com/download/8elna38ry5tnp08/web-template-php.rar

Special Thanks

Woet - PHP Query - https://sampforum.blast.hk/showthread.php?tid=99649
Bootstrap - http://getbootstrap.com/


NOTES:


Everything was tested on a local XAMPP server. Everything was working fine and as usual.
Reply
#2

Well done!
Reply
#3

Exactly what I wanted, thanks a lot mate
+REPed
Reply
#4

Quote:
Originally Posted by SecretBoss
View Post
Exactly what I wanted, thanks a lot mate
+REPed
Thanks, if you need any help let me know .
Reply
#5

Quote:
Originally Posted by FreAkeD
View Post
Thanks, if you need any help let me know .
No problem, but if you could make a template with more info like score, admin level, cash etc. based on MySQL that would be very nice

You can make another topic so players who are not using MySQL won't use MySQL version that gets data from database, I think that there are a lot of people who need this also the top list thingy
Reply
#6

Very nice, I like it. It's cool that you used bootstrap for it.
+1
Reply
#7

Quote:
Originally Posted by SecretBoss
View Post
No problem, but if you could make a template with more info like score, admin level, cash etc. based on MySQL that would be very nice

You can make another topic so players who are not using MySQL won't use MySQL version that gets data from database, I think that there are a lot of people who need this also the top list thingy
I'm working on a MYSQL one.
Reply
#8

Updated with an MYSQL version where you can display your servers top players or anything you'd like to straight from your MYSQL database!
Reply
#9

Quote:
Originally Posted by FreAkeD
View Post
Updated with an MYSQL version where you can display your servers top players or anything you'd like to straight from your MYSQL database!
Great release I will may add it on sbAdmin as an example on using it on their servers (I will credit you of course)

Thanks again
Reply
#10

Quote:
Originally Posted by SecretBoss
View Post
Great release I will may add it on sbAdmin as an example on using it on their servers (I will credit you of course)

Thanks again
No problem, feel free to use it for that pupose.
Reply
#11

Awesome!
Reply
#12

21 queries in one page? Thanks, but I'll never use it.
Reply
#13

Quote:
Originally Posted by FreAkeD
View Post
No problem, feel free to use it for that pupose.
Just one thing more how can I display all staff?
Reply
#14

Quote:
Originally Posted by SecretBoss
View Post
Just one thing more how can I display all staff?
Will all of the staff members be saved into the database?
Reply
#15

Quote:
Originally Posted by FreAkeD
View Post
Will all of the staff members be saved into the database?
For example there is a column with level that gets player's admin level in-game for example and the website will display all the player who got that column > 0 and each level will have a different name for ex if column is 1 it will be trial admin
Reply
#16

You are forgot to add demo.php in files....
PHP Code:
<li class="active"><a href="demo.php">Server</a></li
Reply
#17

Quote:
Originally Posted by ZaBraNjeNi
View Post
You are forgot to add demo.php in files....
PHP Code:
<li class="active"><a href="demo.php">Server</a></li
The demo.php files are just examples.
Reply
#18

Can u upload on github?
Reply
#19

Possible for a fresh demo? Current links are broken
Reply
#20

Wouldn't use this. The code is truly horrible. It sends a new query for each item, seriously misusing the limit keyword at that. Table rows should be created within a loop by PHP, not by sending multiple separate queries for each row. The entire page can be generated with just two or three queries.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)