Exemplo n.º 1
0
<html>
<head>
<title>♔Królewski CMS♕</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css">
</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;
Exemplo n.º 2
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.º 3
0
Arquivo: edit.php Projeto: jacho29/CMS
<html>
<head>
<title>Edytuj zawartość newsa</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="tytul"><center>KRÓLEWSKI CMS</center></div><div id="content">
<?php 
include_once 'simpleCMS.php';
$obj = new simpleCMS();
$obj->host = 'localhost';
$obj->username = '******';
$obj->password = '';
$obj->table = 'cms';
$obj->connect();
if ($_POST) {
    $obj->update($_POST);
}
?>
<form action="edit.php" method="post">
<label for="id">ID:</label><br />
<input name="id" id="id" type="text" maxlength="150" />
<div class="clear"></div>
<label for="title">TYTUŁ:</label><br />
<input name="title" id="title" type="text" maxlength="150" />
<div class="clear"></div>
<label for="bodytext">ZAWARTOŚĆ NEWSA:</label><br />
<textarea name="bodytext" id="bodytext"></textarea>
<div class="clear"></div>
<input type="submit" value="UAKTUALNIJ WPIS" ;/>