Exemplo n.º 1
0
<!DOCTYPE html>
<html lang="en">
<head>
    <title>SimpleCMS</title>
</head>

<body>

<?php 
include_once '_class/simpleCMS.php';
$obj = new simpleCMS();
$obj->host = 'database.host.net';
$obj->username = '******';
$obj->password = '******';
$obj->table = 'DB1234567';
$obj->connect();
if ($_POST) {
    $obj->write($_POST);
}
echo $_GET['admin'] == 1 ? $obj->display_admin() : $obj->display_public();
?>

</body>
</html>
Exemplo n.º 2
0
</head>
<body>
 <div id="tytul"><center>♔ ♕KRÓLEWSKI CMS♕ ♔ </center></div><div id="content">
<?php 
include_once 'simpleCMS.php';
$obj = new simpleCMS();
//polaczenie z baza
$obj->host = 'localhost';
$obj->username = '******';
$obj->password = '';
$obj->table = 'cms';
$obj->connect();
if ($_POST) {
    $obj->write($_POST);
}
//switch dla .php?admin=
switch ($_GET['admin']) {
    case 1:
        echo $obj->display_login();
        break;
    case 2:
        echo $obj->display_admin();
        break;
    default:
        echo $obj->display_public();
        break;
}
?>
</body>
</html>