[Tool/Web/Other] [PHP]RPanel - A SA-MP Control Panel
#1

RPanel - A SA-MP Control Panel
ABOUT
RPanel is a free San Andreas Multiplayer control panel. You can easily manage your SA-MP server from your web browser and get some basic information.

Author
This project was developped by Rafael 'R@f' Keramidas <rafael [AT] keramid [DOT] as>.

Donations
If you like this project or make a commercial use for it, please donate via paypal at rafael.keramidas [AT] gmail [DOT] com. Of course you don't have to but it would be nice if you do

FEATURES
- Start, restart or stop your SA-MP Server.
- Real time query of your SA-MP Server.
- RCON Console.
- Read logs.

SCREENSHOTS
http://rafael.keramid.as/rpanel/Screenshot_1.png
http://rafael.keramid.as/rpanel/Screenshot_2.png
http://rafael.keramid.as/rpanel/Screenshot_3.png
http://rafael.keramid.as/rpanel/Screenshot_4.png

DOWNLOAD
You can get the project on Github : https://github.com/RafaelKeramidas/RPanel
Don't hesitate to use the classes for your own projects

How to download the zip archive ?
Take a look at this screenshot : http://rafael.keramid.as/rpanel/howtodl.png

LICENCE
This project is released under GPLv3. Read the GPLv3.txt for more information.

REQUIRED
To use RPanel, you need :
- A web host with PHP, sockets and LibSSH installed (apt-get install libssh2-php on Debian).
- A SA-MP Server hosted on a GNU/Linux machine with an SSH service running (password authentication only).

INSTALL
Read the requirement (above) before reading the following steps.

1. Extract all files on your web host.
2. Edit the config.inc.php file located in "includes".
3. Save your modifications on config.inc.php.
4. The panel is ready.

SUPPORT
I don't give ANY support for the installation or managing of this panel, so please don't contact me for that !!
If you found a bug or a security issue, write me at rafael [AT] keramid [DOT] as and don't forget to put "RPanel" in the subject.

CHANGELOG
@ V1.0.0 - 20.05.2012
- Initial release.

TODO
@ V1.0.1
- Bug fixes ?
Reply
#2

good job
Reply
#3

Looks nice, I'll give you +rep
Reply
#4

Merci R@f
Reply
#5

I've just found a mistake on your code, i've done it, but already fixed.
You're using short tags on the "html" side.
Why don't you just use the "echo" or "print" to show up the website?
Reply
#6

Quote:
Originally Posted by kikito
Посмотреть сообщение
I've just found a mistake on your code, i've done it, but already fixed.
You're using short tags on the "html" side.
Why don't you just use the "echo" or "print" to show up the website?
I don't see where the mistake is and I don't really got your question. Could you be more specific ?

---

Thanks for the comments
Reply
#7

i mean this:
PHP код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title><?php echo $mainconfig['paneltitle']; ?> - RPanel</title>
        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div id="page">
            <div id="header">
                <div id="logo">
                    <img src="images/logo.png" alt="Logo" />
                </div>
                <div id="srvstatus">
                    <?php
                        
if($sampQuery->isOnline()) {
                            
$sinfos $sampQuery->getInfo();
                            echo 
'<p class="srvon">' $sinfos['players'] . '/' $sinfos['maxplayers'] . ' Players</p>';
                        }
                        else {
                            echo 
'<p class="srvoff">Server off</p>';
                        }
                    
?>
                </div>
            </div>
            <div id="main">
                <div id="menu">
                    <ul>
                        <li><a href="<?php echo $panelFunc->rewriteURL($mainconfig['urlrewrite'], 'index'); ?>">Home</a></li>
                        <li><a href="<?php echo $panelFunc->rewriteURL($mainconfig['urlrewrite'], 'stats'); ?>">Stats</a></li>
                        <li><a href="<?php echo $panelFunc->rewriteURL($mainconfig['urlrewrite'], 'rcon'); ?>">RCON</a></li>
                        <li><a href="<?php echo $panelFunc->rewriteURL($mainconfig['urlrewrite'], 'logs'); ?>">Logs</a></li>
                        <li><a href="<?php echo $panelFunc->rewriteURL($mainconfig['urlrewrite'], 'logout'); ?>">Disconnect</a></li>
                    </ul>
                </div>
                <div id="content">
                    <?php
                        
if(!isset($_GET['p'])) 
                            
$_GET['p'] = 'index';

                        if(!
file_exists('pages/'.$_GET['p'].'.php')) 
                            
$_GET['p'] = '404';

                        include(
'pages/'.$_GET['p'].'.php');
                    
?>
                </div>
                <div id="footer">
                    <p id="copy">RPanel - Designed and developped by <a href="http://rafael.keramid.as" target="_blank">Rafael Keramidas</a>.</p>
                </div>
        </div>
            </div>
            
    </body>
</html>
You can do all on php, with echo or print.
like:
PHP код:
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title>'
.$mainconfig['paneltitle'];.' - RPanel</title>
        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div id="page">
            <div id="header">
                <div id="logo">
                    <img src="images/logo.png" alt="Logo" />
                </div>
                <div id="srvstatus">'
;
                        if(
$sampQuery->isOnline()) {
                            
$sinfos $sampQuery->getInfo();
                            echo 
'<p class="srvon">' $sinfos['players'] . '/' $sinfos['maxplayers'] . ' Players</p>';
                        }
                        else {
                            echo 
'<p class="srvoff">Server off</p>';
                        }
                echo 
'
                </div>
            </div>
            <div id="main">
                <div id="menu">
                    <ul>
                        <li><a href="'
.$panelFunc->rewriteURL($mainconfig['urlrewrite'], 'index');.'">Home</a></li>
                        <li><a href="'
.$panelFunc->rewriteURL($mainconfig['urlrewrite'], 'stats');.'">Stats</a></li>
                        <li><a href="'
.$panelFunc->rewriteURL($mainconfig['urlrewrite'], 'rcon');.'">RCON</a></li>
                        <li><a href="'
.$panelFunc->rewriteURL($mainconfig['urlrewrite'], 'logs');.'">Logs</a></li>
                        <li><a href="'
.$panelFunc->rewriteURL($mainconfig['urlrewrite'], 'logout');.'">Disconnect</a></li>
                    </ul>
                </div>
                <div id="content">'
;
                        if(!isset(
$_GET['p'])) 
                            
$_GET['p'] = 'index';

                        if(!
file_exists('pages/'.$_GET['p'].'.php')) 
                            
$_GET['p'] = '404';

                        include(
'pages/'.$_GET['p'].'.php');
                echo 
'
                </div>
                <div id="footer">
                    <p id="copy">RPanel - Designed and developped by <a href="http://rafael.keramid.as" target="_blank">Rafael Keramidas</a>.</p>
                </div>
        </div>
            </div>
            
    </body>
</html>'

*** not tested.
I'm currently using like this on my php jobs, less <?php ?> and don't have short tags.
Reply
#8

I prefer the way I used, the code is clearer and the result is the same (display and maybe a very small difference with the execution time).
Reply
#9

Is it for Widnows or Linux servers?
Reply
#10

cool i like it
Reply
#11

lol login fails everytiime i try
Reply
#12

Quote:
Originally Posted by R@f
Посмотреть сообщение
I prefer the way I used, the code is clearer and the result is the same (display and maybe a very small difference with the execution time).
Your original code is slightly faster for the PHP processor and much easier to read - stick with it!
Reply
#13

Great work!
Reply
#14

Useful!
Reply
#15

Can U Plzzz Show How To Make It
Reply
#16

What is the password and user name?
Reply
#17

Can't login.

EDIT ~ Fixed that, understood why after reading.

New problem, panel is slow as fuck when it loads
Reply
#18

Remember,I can't login
What Is Problem ?
Reply
#19

This is really needed for some VPS owners.
And also for some server owners.
Well done and I might use this.
Reply
#20

Why is it so slow??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)