Change config folder

Change config folder for later developments. A few style improvements.
This commit is contained in:
Danang Probo Sayekti 2014-01-25 08:04:51 +07:00
commit 5358f21d50
23 changed files with 208 additions and 28 deletions

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_POST['submit'])) {

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_POST['submit'])) {

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_SESSION['user'])) {

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {
@ -21,7 +21,7 @@
$post_url = rtrim($post_url, ',\.\-');
$post_content = $_POST['content'];
}
if(!empty($post_content)) {
if(!empty($post_url) && !empty($post_content)) {
if(get_magic_quotes_gpc()) {
$post_content = stripslashes($post_content);
}

View file

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {
@ -27,7 +27,7 @@
$post_url = rtrim($post_url, ',\.\-');
$post_content = $_POST['content'];
}
if(!empty($post_content)) {
if(!empty($post_tag) && !empty($post_url) && !empty($post_content)) {
if(get_magic_quotes_gpc()) {
$post_content = stripslashes($post_content);
}

View file

@ -6,7 +6,7 @@
$user = $_REQUEST['user'];
$pass = $_REQUEST['password'];
$user_file = '../../admin/users/' . $user . '.ini';
$user_file = '../../config/users/' . $user . '.ini';
$user_pass = user('password', $user);
if(file_exists($user_file)) {

View file

@ -9,9 +9,9 @@ blockquote {
}
.wmd-panel{
width: 46%;
width: 44%;
float:left;
padding:2%;
padding-right:20px;
}
.wmd-button-bar {
@ -127,6 +127,11 @@ pre code {
@media all and (max-width: 980px) {
.nav {
width: 100%;
padding: 2%;
}
.wmd-panel, .wmd-preview {
width: 96%;
float:left;

View file

@ -1,6 +1,6 @@
<?php
date_default_timezone_set('Asia/Jakarta');
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
// Get static page path. Unsorted.
function admin_get_static(){

View file

@ -1,7 +1,7 @@
<?php
date_default_timezone_set('Asia/Jakarta');
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
// Get blog post with more info about the path. Sorted by filename.
function admin_get_post(){

View file

@ -1,7 +1,7 @@
<?php
function user($key, $user=null) {
$value = '../../admin/users/' . $user . '.ini';
$value = '../../config/users/' . $user . '.ini';
static $_config = array();
if (file_exists($value)) {
$_config = parse_ini_file($value, true);

View file

@ -1,7 +1,7 @@
<?php
date_default_timezone_set('Asia/Jakarta');
require '../system/includes/dispatch.php';
config('source', '../admin/config.ini');
config('source', '../config/config.ini');
include 'includes/session.php';
include 'includes/post_list.php';
include 'includes/page_list.php';

View file

@ -11,6 +11,7 @@ body {
float:left;
position:relative;
width:100%;
padding-bottom: 30px;
}
.wrapper-inner {
@ -20,16 +21,71 @@ body {
.nav {
width: 96%;
padding:2%;
padding:2% 0;
border-bottom: 4px solid #cccccc;
margin-bottom: 30px;
}
/*-------------------------
Link
--------------------------*/
a, a:visited {
outline:none;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
/*-------------------------
Table
--------------------------*/
table {
border: 1px solid #ccc;
font-size:14px;
border: none;
color:#333333;
border: 1px solid #E3E3E3;
margin: 1em 0;
}
table td {
border: 1px solid #ccc;
background: #ddd;
table h2.title {
margin:5px 0;
}
th, td {
padding: 5px 10px;
border: none;
}
th.title {
margin:5px 0;
font-family: Arial,sans-serif;
font-size:18px;
font-weight:normal;
}
td.title {
font-weight:normal;
background-color: #eeeeee;
font-family: Arial,sans-serif;
}
th {
background-color: #eeeeee;
border-bottom: 1px solid #E3E3E3;
border-right: 1px solid #E3E3E3;
font-family: Arial,sans-serif;
font-size:18px;
}
td {
background-color: #eeeeee;
border: 1px solid #E3E3E3;
border-top: none;
border-left:none;
}
@media all and (max-width: 980px) {

View file

@ -10,7 +10,7 @@ require 'system/includes/functions.php';
require 'system/includes/opml.php';
// Load the configuration file
config('source', 'admin/config.ini');
config('source', 'config/config.ini');
// The front page of the blog.
// This will match the root url

View file

@ -1135,7 +1135,7 @@ function welcome_page() {
echo <<<EOF
<div style="font-size:20px;text-align:center;padding:50px 20px;">
<h1>Welcome to your new HTMLy-powered blog.</h1>
<p>The next thing you will need to do is creating the first account. Please create <strong><em>YourUsername.ini</em></strong> inside <strong><em>admin/users</em></strong> folder and write down your password there:</p>
<p>The next thing you will need to do is creating the first account. Please create <strong><em>YourUsername.ini</em></strong> inside <strong><em>config/users</em></strong> folder and write down your password there:</p>
<pre><code>password = YourPassword</code></pre>
<p>Login to your blog admin panel at <strong><em>www.example.com/admin</em></strong> to creating your first post.</p>
<p>This welcome message will disappear after your first post published.</p>

View file

@ -208,6 +208,14 @@ pre {
background: #F1F1FF;
}
code {
color: #333333;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
font-size: 15px;
padding: 5px 10px;
background: #F1F1FF;
}
pre code {
color: #333333;
display: block;
@ -276,9 +284,8 @@ blockquote:after {
vertical-align: -0.45em;
}
blockquote {
font-style: italic;
margin: 1em 0 1em 1em;
blockquote p {
display:inline;
}
.credit {
@ -287,6 +294,56 @@ blockquote {
padding: 10px 0;
}
/*-------------------------
Table
--------------------------*/
table {
font-size:12px;
border: none;
width:100%;
color:#333333;
border: 1px solid #E3E3E3;
margin: 1em 0;
}
table h2.title {
margin:5px 0;
}
th, td {
padding: 5px 10px;
border: none;
}
th.title {
margin:5px 0;
font-family: 'Open Sans Condensed', sans-serif;
font-size:18px;
font-weight:normal;
}
td.title {
font-weight:normal;
background-color: #f6f6f6;
font-family: 'Open Sans Condensed', sans-serif;
}
th {
background-color: #f6f6f6;
border-bottom: 1px solid #E3E3E3;
border-right: 1px solid #E3E3E3;
font-family: 'Open Sans Condensed', sans-serif;
font-size:18px;
}
td {
background-color: #fafafa;
border: 1px solid #E3E3E3;
border-top: none;
border-left:none;
}
/*----------------------------
The left bar
-----------------------------*/

View file

@ -20,7 +20,7 @@
$i++;
?>
<li>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><a href="<?php echo $p->tagurl ?>"><?php echo $p->tag ?></a></span>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><?php echo $p->tag ?></span>
</li>
<?php endforeach;?>
</ul>

View file

@ -151,12 +151,24 @@ blockquote {
margin: 1em 0 1em 1em;
}
blockquote p {
display:inline;
}
pre {
margin: 1em 0;
overflow: auto;
background: #F1F1FF;
}
code {
color: #333333;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
font-size: 15px;
padding: 5px 10px;
background: #F1F1FF;
}
pre code {
color: #333333;
display: block;
@ -186,6 +198,56 @@ ul li, ol li{
margin: 0.25em 0;
}
/*-------------------------
Table
--------------------------*/
table {
font-size:12px;
border: none;
width:100%;
color:#333333;
border: 1px solid #E3E3E3;
margin: 1em 0;
}
table h2.title {
margin:5px 0;
}
th, td {
padding: 5px 10px;
border: none;
}
th.title {
margin:5px 0;
font-family: 'Open Sans',sans-serif;
font-size:18px;
font-weight:normal;
}
td.title {
font-weight:normal;
background-color: #f6f6f6;
font-family: 'Open Sans',sans-serif;
}
th {
background-color: #f6f6f6;
border-bottom: 1px solid #E3E3E3;
border-right: 1px solid #E3E3E3;
font-family: 'Open Sans',sans-serif;
font-size:18px;
}
td {
background-color: #fafafa;
border: 1px solid #E3E3E3;
border-top: none;
border-left:none;
}
/*-------------------------
Menu
--------------------------*/

View file

@ -20,7 +20,7 @@
$i++;
?>
<li>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><a href="<?php echo $p->tagurl ?>"><?php echo $p->tag ?></a></span>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><?php echo $p->tag ?></span>
</li>
<?php endforeach;?>
</ul>