[Tool/Web/Other] [PHP]RPanel - A SA-MP Control Panel
#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


Messages In This Thread
[PHP]RPanel - A simple SA-MP Control Panel - by R@f - 20.05.2012, 12:20
Re: [PHP]RPanel - A SA-MP Control Panel - by catamarg1 - 20.05.2012, 13:45
Re: [PHP]RPanel - A SA-MP Control Panel - by TheDominator - 20.05.2012, 13:47
Re : [PHP]RPanel - A SA-MP Control Panel - by darreugne - 20.05.2012, 17:29
Re: [PHP]RPanel - A SA-MP Control Panel - by kikito - 20.05.2012, 17:33
Re: [PHP]RPanel - A SA-MP Control Panel - by R@f - 20.05.2012, 20:05
Re: [PHP]RPanel - A SA-MP Control Panel - by kikito - 20.05.2012, 21:40
Re: [PHP]RPanel - A SA-MP Control Panel - by R@f - 20.05.2012, 21:53
Re: [PHP]RPanel - A SA-MP Control Panel - by ikey07 - 20.05.2012, 21:58
Re: [PHP]RPanel - A SA-MP Control Panel - by Derek_Westbrook - 23.05.2012, 17:21
Re: [PHP]RPanel - A SA-MP Control Panel - by lsfmd - 13.06.2012, 04:59
Re: [PHP]RPanel - A SA-MP Control Panel - by Blacklite - 13.06.2012, 05:49
Re: [PHP]RPanel - A SA-MP Control Panel - by G6X - 17.06.2012, 08:26
Re: [PHP]RPanel - A SA-MP Control Panel - by [RB]Akshay - 17.06.2012, 08:40
Re: [PHP]RPanel - A SA-MP Control Panel - by misho1 - 21.06.2012, 05:25
Re: [PHP]RPanel - A SA-MP Control Panel - by CoppeR`Tr - 21.06.2012, 14:08
Re: [PHP]RPanel - A SA-MP Control Panel - by lsfmd - 03.08.2012, 02:38
Re: [PHP]RPanel - A SA-MP Control Panel - by Ahmet37100 - 30.08.2012, 11:39
Re: [PHP]RPanel - A SA-MP Control Panel - by Lordzy - 30.08.2012, 16:39
Re: [PHP]RPanel - A SA-MP Control Panel - by ThomWeb - 31.08.2012, 06:22

Forum Jump:


Users browsing this thread: 5 Guest(s)