Upload
This commit is contained in:
42 files changed
+4036
No files matched your search
Binary file not shown.
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
$_LANG = [
|
||||
'prev_page' => 'later',
|
||||
'next_page' => 'earlier',
|
||||
|
||||
'categories' => 'Categories',
|
||||
'without_cat' => 'Without category',
|
||||
'all_posts' => 'All posts',
|
||||
'comments' => 'Comments',
|
||||
'add_comment' => 'Add a comment',
|
||||
|
||||
'comment_text' => 'Comment text. Markdown is supported.',
|
||||
'by_guest' => 'by Guest',
|
||||
'by_admin' => 'by Administrator',
|
||||
|
||||
'input_captcha' => 'Enter captcha',
|
||||
|
||||
'submit' => 'Submit',
|
||||
|
||||
'empty_category' => 'There\'s nothing here',
|
||||
|
||||
'post_title' => 'Title',
|
||||
'post_desc' => 'Short description',
|
||||
'post_text' => 'Full text',
|
||||
'post_tags' => 'Tags separated by spaces',
|
||||
'tags' => 'Tags',
|
||||
|
||||
'error_404' => 'Page not found',
|
||||
'error_404_text' => '<h1>The server could not find page.</h1>Alternatively, you can visit the <a href="'.URL.'">home page</a>.',
|
||||
'error_sign_in' => 'Invalid captcha or password.',
|
||||
'flood_err' => 'You can add comments no more than once every '.ANTIFLOOD.' sec.',
|
||||
'comment_err' => 'Invalid captcha or empty comment form.',
|
||||
|
||||
'admin' => 'Admin panel',
|
||||
'input_pass' => 'Enter password',
|
||||
'sign_in' => 'Sign in',
|
||||
'sign_out' => 'Sign out',
|
||||
'add_post' => 'Add post',
|
||||
'edit_post' => 'Edit post',
|
||||
|
||||
'add_category' => 'New category',
|
||||
'sort_category' => 'Sort ID (integer, default: 0)',
|
||||
'category_name' => 'Category name',
|
||||
|
||||
'edit' => 'edit',
|
||||
'delete' => 'delete',
|
||||
'goto_post' => 'goto',
|
||||
|
||||
'stats' => 'Statistics',
|
||||
'all_posts_count' => 'Posts count',
|
||||
'all_comm_count' => 'Comments count',
|
||||
];
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
$_LANG = [
|
||||
'prev_page' => 'позже',
|
||||
'next_page' => 'ранее',
|
||||
|
||||
'categories' => 'Категории',
|
||||
'without_cat' => 'Без категории',
|
||||
'all_posts' => 'Все сообщения',
|
||||
'comments' => 'Комментарии',
|
||||
'add_comment' => 'Добавить комментарий',
|
||||
|
||||
'comment_text' => 'Текст комментраия. Поддерживается markdown.',
|
||||
'by_guest' => 'Гость',
|
||||
'by_admin' => 'Администратор',
|
||||
|
||||
'input_captcha' => 'Введите капчу',
|
||||
|
||||
'submit' => 'Отправить',
|
||||
|
||||
'empty_category' => 'Здесь ничего нет.',
|
||||
|
||||
'post_title' => 'Заголовок',
|
||||
'post_desc' => 'Краткое описание',
|
||||
'post_text' => 'Полный текст',
|
||||
'post_tags' => 'Тэги через пробел',
|
||||
'tags' => 'Тэги',
|
||||
|
||||
'error_404' => 'Страница не найдена',
|
||||
'error_404_text' => '<h1>Сервер не нашел страницу.</h1>Попробуйте посетить <a href="'.URL.'">домашнюю страницу</a>.',
|
||||
'error_sign_in' => 'Неверная капча или пароль.',
|
||||
'flood_err' => 'Выможете добавлять сообщения раз в '.ANTIFLOOD.' сек.',
|
||||
'comment_err' => 'Неверная капча или пустое сообщение.',
|
||||
|
||||
'admin' => 'Админ панель',
|
||||
'input_pass' => 'Ввведите пароль',
|
||||
'sign_in' => 'Войти',
|
||||
'sign_out' => 'Выйти',
|
||||
'add_post' => 'Добавить сообщение',
|
||||
'edit_post' => 'Редактировать сообщение',
|
||||
'edit' => 'изменить',
|
||||
|
||||
'add_category' => 'Новая категория',
|
||||
'sort_category' => 'ID сортировки (число, по умолчанию: 0)',
|
||||
'category_name' => 'Название категории',
|
||||
|
||||
'delete' => 'удалить',
|
||||
'goto_post' => 'перейти',
|
||||
|
||||
'stats' => 'Статистика',
|
||||
'all_posts_count' => 'Всего сообщений',
|
||||
'all_comm_count' => 'Всего комментариев',
|
||||
];
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
function parser ($string)
|
||||
{
|
||||
global $parser;
|
||||
|
||||
$string = preg_replace('!\t!', ' ', $string);
|
||||
$string = $parser -> text($string);
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
|
||||
function category_name($category)
|
||||
{
|
||||
global $sqlite;
|
||||
|
||||
$query = 'SELECT `name` FROM `categories` WHERE id = '.$category;
|
||||
$name = $sqlite -> querySingle($query);
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
function select_categories($result)
|
||||
{
|
||||
while ($cat = $result -> fetchArray())
|
||||
{
|
||||
$return.= '<option value="'.$cat['id'].'">'.$cat['name'].'</option>
|
||||
';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
function view_categories($result)
|
||||
{
|
||||
while ($cat = $result -> fetchArray())
|
||||
{
|
||||
$return.= '<a href="index.php?category='.$cat['id'].'">'.$cat['name'].'</a>
|
||||
';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
function view_edit_categories($result)
|
||||
{
|
||||
global $_LANG, $_TPL;
|
||||
while ($cat = $result -> fetchArray())
|
||||
{
|
||||
$_TPL['id'] = $cat['id'];
|
||||
$_TPL['sort'] = $cat['sort'];
|
||||
$_TPL['name'] = $cat['name'];
|
||||
|
||||
include_template('edit_category');
|
||||
}
|
||||
}
|
||||
|
||||
function view_posts($result)
|
||||
{
|
||||
global $_LANG, $_TPL, $parser;
|
||||
while ($row = $result -> fetchArray())
|
||||
{
|
||||
if(!$row['time']) return 0;
|
||||
|
||||
$_TPL['id'] = $row['id'];
|
||||
$_TPL['time'] = date("d.m.y", $row['time']);
|
||||
$_TPL['title'] = $row['title'];
|
||||
$_TPL['desc'] = parser($row['desc']);
|
||||
$_TPL['text'] = parser($row['text']);
|
||||
$_TPL['tags'] = separate_tags($row['tags']);
|
||||
$_TPL['comments'] = $row['comments'];
|
||||
|
||||
include_template('post_short');
|
||||
}
|
||||
}
|
||||
|
||||
function separate_tags($string)
|
||||
{
|
||||
$tags = explode(' ', $string);
|
||||
foreach ($tags as &$tag)
|
||||
if(!empty($tag))
|
||||
$return.= '<a href="index.php?tag='.$tag.'">@'.$tag.'</a> ';
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
function view_comments($result)
|
||||
{
|
||||
global $_LANG, $_TPL, $parser;
|
||||
while ($row = $result -> fetchArray())
|
||||
{
|
||||
if(!$row['time']) return 0;
|
||||
|
||||
$_TPL['post_id'] = 0;
|
||||
|
||||
if($_TPL['id'] != $row['id']) $_TPL['post_id'] = $row['id'];
|
||||
$_TPL['pid'] = $row['id'];
|
||||
$_TPL['cid'] = $row['cid'];
|
||||
$_TPL['time'] = date("d.m.y h:i", $row['time']);
|
||||
$_TPL['text'] = parser($row['text']);
|
||||
$_TPL['admin'] = $row['admin'];
|
||||
|
||||
include_template('comment');
|
||||
}
|
||||
}
|
||||
|
||||
function gen_captcha()
|
||||
{
|
||||
$letters = '23456789abcdefghjkmnpqrstvwxyz';
|
||||
$return = substr(str_shuffle($letters), 0, 6);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
function include_template($template)
|
||||
{
|
||||
global $_LANG, $_TPL, $parser;
|
||||
include 'private/templates/'.$template.'.php';
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
$_TPL['title'] = $_LANG['error_404'].' | '.TITLE;
|
||||
|
||||
include_template('header');
|
||||
include_template('404');
|
||||
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
/*-- Admin panel auth -----------------------------------------------------*/
|
||||
if($_GET['auth'] == 'sign_in')
|
||||
{
|
||||
if($_POST['pass'] == PASS and $_POST['captcha'] == $_SESSION['captcha'])
|
||||
$_SESSION['admin'] = 1;
|
||||
else
|
||||
$_TPL['error'] = $_LANG['error_sign_in'];
|
||||
}
|
||||
if($_GET['auth'] == 'sign_out')
|
||||
$_SESSION['admin'] = 0;
|
||||
|
||||
/*-- Admin panel actions --------------------------------------------------*/
|
||||
if($_GET['action'] == 'add_post' and $_SESSION['admin']) // Add post
|
||||
{
|
||||
$query = 'INSERT INTO `posts`
|
||||
(time, category, title, desc, text, tags)
|
||||
VALUES
|
||||
(:time, :cat, :title, :desc, :text, :tags)';
|
||||
|
||||
$stmt = $sqlite -> prepare($query);
|
||||
|
||||
$stmt -> bindValue(':time', time(), SQLITE3_INTEGER);
|
||||
$stmt -> bindValue(':cat', $_POST['category'], SQLITE3_INTEGER);
|
||||
$stmt -> bindValue(':title', $_POST['title'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':desc', $_POST['desc'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':text', $_POST['text'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':tags', $_POST['tags'], SQLITE3_TEXT);
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
header('Location:'.URL); exit;
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'edit_post' and $_SESSION['admin']) // Edit post
|
||||
{
|
||||
$query = 'SELECT COUNT(*) FROM `comments` WHERE id = '.$_GET['post'];
|
||||
$count = $sqlite -> querySingle($query);
|
||||
|
||||
$query = 'UPDATE `posts` SET
|
||||
category = :cat,
|
||||
title = :title,
|
||||
desc = :desc,
|
||||
text = :text,
|
||||
tags = :tags,
|
||||
comments = :count
|
||||
WHERE id = :id';
|
||||
|
||||
$stmt = $sqlite -> prepare($query);
|
||||
|
||||
$stmt -> bindValue(':cat', $_POST['category'], SQLITE3_INTEGER);
|
||||
$stmt -> bindValue(':title', $_POST['title'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':desc', $_POST['desc'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':text', $_POST['text'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':tags', $_POST['tags'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':count', $count, SQLITE3_INTEGER);
|
||||
$stmt -> bindValue(':id', $_GET['post'], SQLITE3_INTEGER);
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
header('Location:'.URL.'/index.php?view=post&id='.$_GET['post']); exit;
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'delete_post' and $_SESSION['admin']) // Del post
|
||||
{
|
||||
$query = 'DELETE FROM `posts` WHERE id = '.$_GET['id'];
|
||||
$sqlite -> exec($query);
|
||||
|
||||
$query = 'DELETE FROM `comments` WHERE id = '.$_GET['id'];
|
||||
$sqlite -> exec($query);
|
||||
|
||||
header('Location:'.URL); exit;
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'add_category' and $_SESSION['admin']) // Add category
|
||||
{
|
||||
if (!$_POST['sort']) $_POST['sort'] = 0;
|
||||
$query = 'INSERT INTO `categories`
|
||||
(sort, name)
|
||||
VALUES
|
||||
('.$_POST['sort'].',
|
||||
"'.$_POST['name'].'")';
|
||||
|
||||
$sqlite -> exec($query);
|
||||
header('Location:'.URL.'index.php?view=admin&page=categories'); exit;
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'edit_category' and $_SESSION['admin']) // Edit category
|
||||
{
|
||||
if($_POST['delete'])
|
||||
{
|
||||
$query = 'DELETE FROM `categories` WHERE id = '.$_GET['id'];
|
||||
$sqlite -> exec($query);
|
||||
|
||||
header('Location:'.URL.'index.php?view=admin&page=categories'); exit;
|
||||
}
|
||||
$query = 'UPDATE `categories` SET
|
||||
sort = '.$_POST['sort'].',
|
||||
name = "'.$_POST['name'].'"
|
||||
WHERE id = '.$_GET['id'];
|
||||
$sqlite -> exec($query);
|
||||
|
||||
header('Location:'.URL.'index.php?view=admin&page=categories'); exit;
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'delete_comment' and $_SESSION['admin']) // Del comment
|
||||
{
|
||||
$query = 'DELETE FROM `comments` WHERE cid = '.$_GET['id'];
|
||||
$sqlite -> exec($query);
|
||||
|
||||
$query = 'SELECT COUNT(*) FROM `comments` WHERE id = '.$_GET['post'];
|
||||
$count = $sqlite -> querySingle($query);
|
||||
|
||||
$query = 'UPDATE `posts` SET comments = '.$count.'
|
||||
WHERE id = '.$_GET['post'];
|
||||
$sqlite -> exec($query);
|
||||
|
||||
header('Location:'.$_SERVER['HTTP_REFERER']); exit;
|
||||
}
|
||||
|
||||
/*-- Pages ----------------------------------------------------------------*/
|
||||
$_TPL['title'] = $_LANG['admin'].' | '.TITLE;
|
||||
include_template('header');
|
||||
|
||||
if(!$_SESSION['admin']) // Login
|
||||
{
|
||||
$_SESSION['captcha'] = gen_captcha();
|
||||
include_template('sign_in');
|
||||
}
|
||||
else if($_GET['page'] == 'add_post') // Add post
|
||||
{
|
||||
$_TPL['category_select'] = select_categories($category_dump);
|
||||
|
||||
include_template('admin_header');
|
||||
include_template('add_post');
|
||||
}
|
||||
else if($_GET['page'] == 'categories') // Categories
|
||||
{
|
||||
include_template('admin_header');
|
||||
include_template('categories_header');
|
||||
|
||||
view_edit_categories($category_dump);
|
||||
|
||||
include_template('categories');
|
||||
}
|
||||
else if($_GET['page'] == 'comments') // Comments
|
||||
{
|
||||
$parser = new Parsedown();
|
||||
$parser -> setSafeMode(true);
|
||||
|
||||
$query = 'SELECT * FROM `comments` LIMIT 50';
|
||||
$result = $sqlite -> query($query);
|
||||
|
||||
include_template('admin_header');
|
||||
include_template('comments');
|
||||
view_comments($result);
|
||||
}
|
||||
else if($_GET['page'] == 'edit_post') // Edit post
|
||||
{
|
||||
$result = $sqlite -> query('SELECT * FROM `posts` WHERE id='.$_GET['id']);
|
||||
$post_data = $result -> fetchArray(SQLITE3_ASSOC);
|
||||
|
||||
$_TPL['id'] = $post_data['id'];
|
||||
$_TPL['category'] = $post_data['category'];
|
||||
$_TPL['title'] = $post_data['title'];
|
||||
$_TPL['title'] = $post_data['title'];
|
||||
$_TPL['desc'] = $post_data['desc'];
|
||||
$_TPL['text'] = $post_data['text'];
|
||||
$_TPL['tags'] = $post_data['tags'];
|
||||
|
||||
if($post_data['category'])
|
||||
$_TPL['category_name'] = category_name($post_data['category']);
|
||||
else $_TPL['category_name'] = $_LANG['without_cat'];
|
||||
|
||||
$_TPL['category_select'] = select_categories($category_dump);
|
||||
|
||||
include_template('admin_header');
|
||||
include_template('edit_post');
|
||||
}
|
||||
else // Admin inddex
|
||||
{
|
||||
$query = 'SELECT COUNT(*) FROM `posts`';
|
||||
$_TPL['posts'] = $sqlite -> querySingle($query);
|
||||
|
||||
$query = 'SELECT COUNT(*) FROM `comments`';
|
||||
$_TPL['comments'] = $sqlite -> querySingle($query);
|
||||
|
||||
include_template('admin_header');
|
||||
include_template('admin_index');
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
/*-- Posts count ----------------------------------------------------------*/
|
||||
if(!isset($_GET['category']) and !isset($_GET['tag']))
|
||||
{
|
||||
$query = 'SELECT COUNT(*) FROM `posts`';
|
||||
}
|
||||
else if(isset($_GET['category']))
|
||||
{
|
||||
$cat = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_NUMBER_INT);
|
||||
if ($cat < 0) $cat = 0;
|
||||
$query = 'SELECT COUNT(*) FROM `posts` WHERE category = '.$cat;
|
||||
|
||||
$name = category_name($cat);
|
||||
}
|
||||
else if($_GET['tag'])
|
||||
{
|
||||
$tag = preg_replace ("/[^a-zA-Zа-яА-ЯёЁ_\-\d]/ui","",$_GET['tag']);
|
||||
$query = 'SELECT COUNT(*) FROM `posts` WHERE tags LIKE "%'.$tag.'%"';
|
||||
}
|
||||
$count = $sqlite -> querySingle($query);
|
||||
|
||||
/*-- Pagination -----------------------------------------------------------*/
|
||||
if($count)
|
||||
{
|
||||
if(!$_GET['page']) $page = 0;
|
||||
else $page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_NUMBER_INT);
|
||||
|
||||
$start = $page * MAXPOSTS;
|
||||
|
||||
if($page < 0 or ($page * MAXPOSTS) >= $count )
|
||||
{
|
||||
header('Location:'.URL.'index.php?view=404'); exit;
|
||||
}
|
||||
}
|
||||
/*-- Get posts and set pagination links -----------------------------------*/
|
||||
if(!isset($_GET['category']) and !isset($_GET['tag']))
|
||||
{
|
||||
$query = 'SELECT * FROM `posts`
|
||||
ORDER BY `time` DESC
|
||||
LIMIT '.$start.', '.MAXPOSTS;
|
||||
|
||||
$_TPL['title'] = TITLE;
|
||||
|
||||
if(($page - 1) >= 0)
|
||||
$_TPL['prev_page'] = 'index.php?page='.($page - 1);
|
||||
if((($page + 1) * MAXPOSTS) < $count)
|
||||
$_TPL['next_page'] = 'index.php?page='.($page + 1);
|
||||
}
|
||||
else if(isset($cat)) // Categories
|
||||
{
|
||||
$query = 'SELECT * FROM `posts` WHERE category = '.$cat.'
|
||||
ORDER BY `time` DESC LIMIT '.$start.', '.MAXPOSTS;
|
||||
|
||||
$_TPL['title'] = $name.' | '.TITLE;
|
||||
if($cat == 0) $_TPL['title'] = $_LANG['without_cat'].' | '.TITLE;
|
||||
|
||||
if(($page - 1) >= 0)
|
||||
$_TPL['prev_page'] = 'index.php?category='.$cat.'&page='.($page - 1);
|
||||
if((($page + 1) * MAXPOSTS) < $count)
|
||||
$_TPL['next_page'] = 'index.php?category='.$cat.'&page='.($page + 1);
|
||||
}
|
||||
else if(isset($tag)) // Tags
|
||||
{
|
||||
$query = 'SELECT * FROM `posts` WHERE tags LIKE "%'.$tag.'%"
|
||||
ORDER BY `time` DESC LIMIT '.$start.', '.MAXPOSTS;
|
||||
|
||||
$_TPL['title'] = '@'.$tag.' | '.TITLE;
|
||||
|
||||
if(($page - 1) >= 0)
|
||||
$_TPL['prev_page'] = 'index.php?tag='.$tag.'&page='.($page - 1);
|
||||
if((($page + 1) * MAXPOSTS) < $count)
|
||||
$_TPL['next_page'] = 'index.php?tag='.$tag.'&page='.($page + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location:'.URL.'index.php'); exit;
|
||||
}
|
||||
|
||||
$result = $sqlite -> query($query);
|
||||
|
||||
/*-- View posts -----------------------------------------------------------*/
|
||||
$parser = new Parsedown();
|
||||
|
||||
include_template('header');
|
||||
|
||||
if($count) view_posts($result);
|
||||
else include_template('index_empty');
|
||||
|
||||
include_template('index_footer');
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
|
||||
|
||||
/*-- Get post contents -----------------------------------------------------*/
|
||||
if($id <= 0)
|
||||
{
|
||||
header('Location:'.URL.'index.php?view=404'); exit;
|
||||
}
|
||||
|
||||
$result = $sqlite -> query('SELECT * FROM `posts` WHERE id='.$id);
|
||||
$post_data = $result -> fetchArray(SQLITE3_ASSOC);
|
||||
|
||||
if(!$post_data['time'])
|
||||
{
|
||||
header('Location:'.URL.'index.php?view=404'); exit;
|
||||
}
|
||||
|
||||
$_TPL['title'] = $post_data['title'].' | '.TITLE;
|
||||
|
||||
include_template('header');
|
||||
|
||||
/*-- View post contents ----------------------------------------------------*/
|
||||
$parser = new Parsedown();
|
||||
|
||||
$_TPL['id'] = $id;
|
||||
$_TPL['time'] = date("d.m.y", $post_data['time']);
|
||||
$_TPL['title'] = $post_data['title'];
|
||||
$_TPL['desc'] = parser($post_data['desc']);
|
||||
$_TPL['text'] = parser($post_data['text']);
|
||||
$_TPL['tags'] = separate_tags($post_data['tags']);
|
||||
$_TPL['comments'] = $post_data['comments'];
|
||||
|
||||
include_template('post');
|
||||
|
||||
/*-- Add a comment --------------------------------------------------------*/
|
||||
if($_GET['action'] == 'add_comment' && COMMENTS)
|
||||
{
|
||||
$post_url = URL.'index.php?view=post&id='.$_TPL['id'];
|
||||
|
||||
if(empty($_POST['text']) or $_POST['captcha'] != $_SESSION['captcha'])
|
||||
{
|
||||
header('Location:'.$post_url.'&error=comment_err#add'); exit;
|
||||
}
|
||||
|
||||
if($_SESSION['flood'] and (time() - $_SESSION['flood']) < ANTIFLOOD)
|
||||
{
|
||||
header('Location:'.$post_url.'&error=antiflood#add'); exit;
|
||||
}
|
||||
|
||||
$_SESSION['flood'] = time();
|
||||
|
||||
$query = 'INSERT INTO `comments` (id, time, text, admin)
|
||||
VALUES (:id, :time, :text, :admin)';
|
||||
|
||||
$stmt = $sqlite -> prepare($query);
|
||||
|
||||
$stmt -> bindValue(':id', $id, SQLITE3_INTEGER);
|
||||
$stmt -> bindValue(':time', time(), SQLITE3_INTEGER);
|
||||
$stmt -> bindValue(':text', $_POST['text'], SQLITE3_TEXT);
|
||||
$stmt -> bindValue(':admin', $_SESSION['admin'], SQLITE3_INTEGER);
|
||||
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$query = 'UPDATE `posts` SET comments = '.($post_data['comments']+1).'
|
||||
WHERE id = '.$id;
|
||||
$sqlite -> exec($query);
|
||||
}
|
||||
/*-- View comments --------------------------------------------------------*/
|
||||
|
||||
$parser -> setSafeMode(true);
|
||||
|
||||
$query = 'SELECT * FROM `comments` WHERE id='.$id;
|
||||
$result = $sqlite -> query($query);
|
||||
|
||||
view_comments($result);
|
||||
|
||||
/*-- Comment form ---------------------------------------------------------*/
|
||||
if(COMMENTS)
|
||||
{
|
||||
$_SESSION['captcha'] = gen_captcha();
|
||||
|
||||
if ($_GET['error'] == "comment_err") $_TPL['error'] = $_LANG['comment_err'];
|
||||
if ($_GET['error'] == "antiflood") $_TPL['error'] = $_LANG['flood_err'];
|
||||
|
||||
include_template('comment_form');
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
header("Content-Type: application/xml; charset=UTF-8");
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title><?=TITLE?></title>
|
||||
<link><?=URL?></link>
|
||||
|
||||
<?php
|
||||
|
||||
$query = 'SELECT COUNT(*) FROM `posts`';
|
||||
$count = $sqlite -> querySingle($query);
|
||||
$query = 'SELECT * FROM `posts` ORDER BY `time` DESC LIMIT 0, '.MAXPOSTS;
|
||||
$result = $sqlite -> query($query);
|
||||
|
||||
if($count)
|
||||
{
|
||||
$parser = new Parsedown();
|
||||
$parser -> setSafeMode(true);
|
||||
|
||||
while ($row = $result -> fetchArray())
|
||||
{
|
||||
if(!$row['time']) exit;
|
||||
|
||||
$_TPL['id'] = $row['id'];
|
||||
$_TPL['title'] = $row['title'];
|
||||
$_TPL['desc'] = parser($row['desc']);
|
||||
|
||||
include_template('rss');
|
||||
}
|
||||
}
|
||||
?>
|
||||
</channel>
|
||||
</rss>
|
||||
<?php exit;
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_LANG['error_404']?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
<?=$_LANG['error_404_text']?>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<h1><?=$_LANG['add_post']?></h1>
|
||||
<form action="index.php?view=admin&action=add_post" method="post">
|
||||
<input type="text" name="title" class="editor" placeholder="<?=$_LANG['post_title']?>">
|
||||
<select name="category" class="editor">
|
||||
<option value="0"><?=$_LANG['without_cat']?></option>
|
||||
<?=$_TPL['category_select']?>
|
||||
</select>
|
||||
<textarea name="desc" class="editor" rows="5" placeholder="<?=$_LANG['post_desc']?>"></textarea>
|
||||
<textarea name="text" class="editor" rows="20" placeholder="<?=$_LANG['post_text']?>"></textarea>
|
||||
<input type="text" name="tags" class="editor" placeholder="<?=$_LANG['post_tags']?>">
|
||||
<input type="submit" class="button" value="<?=$_LANG['submit']?>">
|
||||
</form>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_LANG['admin']?>
|
||||
</div>
|
||||
<div class="title_etc">
|
||||
<a href="index.php?view=admin&auth=sign_out"><?=$_LANG['sign_out']?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
<div class="center">
|
||||
<a href="index.php?view=admin&page=add_post"><?=$_LANG['add_post']?></a> |
|
||||
<a href="index.php?view=admin&page=categories"><?=$_LANG['categories']?></a> |
|
||||
<a href="index.php?view=admin&page=comments"><?=$_LANG['comments']?></a>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<h1><?=$_LANG['stats']?></h1>
|
||||
<ul>
|
||||
<li><?=$_LANG['all_posts_count']?> : <?=$_TPL['posts']?></li>
|
||||
<li><?=$_LANG['all_comm_count']?> : <?=$_TPL['comments']?></li>
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<br>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_LANG['add_category']?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form action="index.php?view=admin&action=add_category" method="post">
|
||||
<input type="text" class="editor" name="sort" placeholder="<?=$_LANG['sort_category']?>">
|
||||
<input type="text" class="editor" name="name" placeholder="<?=$_LANG['category_name']?>">
|
||||
<input type="submit" class="button" value="<?=$_LANG['submit']?>">
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<h1><?=$_LANG['categories']?></h1>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_TPL['time']?>
|
||||
</div>
|
||||
<div class="title_etc">
|
||||
<?php if(!$_TPL['admin']) { ?>
|
||||
<?=$_LANG['by_guest']?>
|
||||
<?php }else{ ?>
|
||||
<?=$_LANG['by_admin']?>
|
||||
<?php } ?>
|
||||
<?php if($_TPL['post_id']) { ?>
|
||||
[ <a href="index.php?view=post&id=<?=$_TPL['post_id']?>"><?=$_LANG['goto_post']?></a> ]
|
||||
<?php } ?>
|
||||
<?php if($_SESSION['admin']) { ?>
|
||||
[ <a href="index.php?view=admin&page=comments&action=delete_comment&id=<?=$_TPL['cid']?>&post=<?=$_TPL['pid']?>"><?=$_LANG['delete']?></a> ]
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="comment_content">
|
||||
<?=$_TPL['text']?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<h1 id="add"><?=$_LANG['add_comment']?></h1>
|
||||
<?php if($_TPL['error']) { ?>
|
||||
<div class="error">
|
||||
<?=$_TPL['error']?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form action="index.php?view=post&id=<?=$_TPL['id']?>&action=add_comment" method="post">
|
||||
<textarea name="text" class="editor" rows="4" placeholder="<?=$_LANG['comment_text']?>"></textarea>
|
||||
<img src="captcha.php" alt="captcha" class="captcha"><br>
|
||||
<input type="text" name="captcha" class="editor" placeholder="<?=$_LANG['input_captcha']?>">
|
||||
<input type="submit" class="button" value="<?=$_LANG['submit']?>">
|
||||
</form>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<h1><?=$_LANG['comments']?></h1>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<form action="index.php?view=admin&action=edit_category&id=<?=$_TPL['id']?>" method="post">
|
||||
<input type="text" class="editor input_id" name="sort" placeholder="ID" value="<?=$_TPL['sort']?>">
|
||||
<input type="text" class="editor input_name" name="name" placeholder="<?=$_LANG['category_name']?>" value="<?=$_TPL['name']?>">
|
||||
<input type="submit" class="button editor input_button" value="⟳">
|
||||
<input type="submit" class="button editor input_button" value="✕" name="delete">
|
||||
</form>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<h1><?=$_LANG['edit_post']?></h1>
|
||||
<form action="index.php?view=admin&action=edit_post&post=<?=$_TPL['id']?>" method="post">
|
||||
<input type="text" name="title" class="editor" value="<?=$_TPL['title']?>">
|
||||
<select name="category" class="editor">
|
||||
<option value=" <?=$_TPL['category']?>"><?=$_TPL['category_name']?></option>
|
||||
<option value="0"></option>
|
||||
<?=$_TPL['category_select']?>
|
||||
<option value="0"><?=$_LANG['without_cat']?></option>
|
||||
</select>
|
||||
<textarea name="desc" class="editor" rows="5"><?=$_TPL['desc']?></textarea>
|
||||
<textarea name="text" class="editor" rows="20"><?=$_TPL['text']?></textarea>
|
||||
<input type="text" name="tags" class="editor" value="<?=$_TPL['tags']?>">
|
||||
<input type="submit" class="button" value="<?=$_LANG['submit']?>" style="float:left">
|
||||
</form>
|
||||
<a href="index.php?view=admin&action=delete_post&id=<?=$_TPL['id']?>" class="title_etc"><?=$_LANG['delete']?></a>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
<section class="sidebar">
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_LANG['categories']?>
|
||||
</div>
|
||||
<div class="title_etc">
|
||||
<a href="index.php?view=rss">RSS</a>
|
||||
<?php if($_SESSION['admin']) { ?>
|
||||
[ <a href="index.php?view=admin"><?=$_LANG['admin']?></a> ]
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<nav class="categories">
|
||||
<?=$_TPL['category_list']?>
|
||||
|
||||
<a href="index.php?category=0"><?=$_LANG['without_cat']?></a>
|
||||
<a href="index.php"><?=$_LANG['all_posts']?></a>
|
||||
</nav>
|
||||
</section>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<footer>
|
||||
<div class="body">
|
||||
<div class="footer_copy">
|
||||
© <?=COPY?>
|
||||
</div>
|
||||
<div class="footer_text">
|
||||
Powered by <a href="https://git.runx.zip/chicory/orblog-legacy" title="Simple blog for hidden networks.">orblog</a>.
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?=LANG?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="public/style/main.css">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta name="description" content="<?=$_TPL['desc']?>">
|
||||
<title><?=$_TPL['title']?></title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="body">
|
||||
<div class="header_logo">
|
||||
<a href="<?=URL?>"><?=TEXTLOGO?></a>
|
||||
</div>
|
||||
<div class="header_desc">
|
||||
<div class="heder_block">
|
||||
<?=H_DESC?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="body">
|
||||
<section class="main">
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<div class="content"><br>
|
||||
<div class="center">
|
||||
<h1><?=$_LANG['empty_category']?></h1>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="content">
|
||||
<div class="center">
|
||||
<?php if($_TPL['prev_page']) { ?>
|
||||
<a href="<?=$_TPL['prev_page']?>">⤽ <?=$_LANG['prev_page']?></a>
|
||||
<?php } ?>
|
||||
<?php if($_TPL['next_page']) { ?>
|
||||
<a href="<?=$_TPL['next_page']?>"><?=$_LANG['next_page']?> ⤼</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_TPL['time']?>
|
||||
</div>
|
||||
<div class="title_etc">
|
||||
<?php if($_SESSION['admin']) { ?>
|
||||
[ <a href="index.php?view=admin&page=edit_post&id=<?=$_TPL['id']?>"><?=$_LANG['edit']?></a> ]
|
||||
<?php } ?>
|
||||
<a href="index.php?view=post&id=<?=$_TPL['id']?>#comments"><?=$_LANG['comments']?> ( <?=$_TPL['comments']?> )</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
<h1><?=$_TPL['title']?></h1>
|
||||
<?=$_TPL['text']?>
|
||||
<br>
|
||||
<?php if($_TPL['tags']) { ?>
|
||||
<?=$_LANG['tags']?>: <?=$_TPL['tags']?><br>
|
||||
<?php } ?>
|
||||
<br>
|
||||
<div class="clear" id="comments"></div>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_TPL['time']?>
|
||||
</div>
|
||||
<div class="title_etc">
|
||||
<?php if($_SESSION['admin']) { ?>
|
||||
[ <a href="index.php?view=admin&page=edit_post&id=<?=$_TPL['id']?>"><?=$_LANG['edit']?></a> ]
|
||||
<?php } ?>
|
||||
<a href="index.php?view=post&id=<?=$_TPL['id']?>#comments"><?=$_LANG['comments']?> ( <?=$_TPL['comments']?> )</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
<h1><a href="index.php?view=post&id=<?=$_TPL['id']?>" class="post_title"><?=$_TPL['title']?></a></h1>
|
||||
<?=$_TPL['desc']?>
|
||||
<?php if($_TPL['tags']) { ?>
|
||||
<?=$_LANG['tags']?>: <?=$_TPL['tags']?><br>
|
||||
<?php } ?>
|
||||
<br>
|
||||
</div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<item>
|
||||
<title><?=$_TPL['title']?></title>
|
||||
<link><?=URL?>index.php?view=post&id=<?=$_TPL['id']?></link>
|
||||
<description>
|
||||
<![CDATA[<?=$_TPL['desc']?>]]>
|
||||
</description>
|
||||
</item>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
orblog - Simple blog for hidden networks.
|
||||
|
||||
Version: 0.1
|
||||
Git: https://git.runx.zip/chicory/orblog-legacy
|
||||
Copyright: chicory@runx.zip 2020
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
?>
|
||||
<div class="title">
|
||||
<div class="title_tab">
|
||||
<?=$_LANG['admin']?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
<div class="center">
|
||||
<h1><?=$_LANG['sign_in']?></h1>
|
||||
<?php if($_TPL['error']) { ?>
|
||||
<div class="error">
|
||||
<?=$_TPL['error']?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form action="index.php?view=admin&auth=sign_in" method="post">
|
||||
<input type="password" name="pass" placeholder="<?=$_LANG['input_pass']?>"><br>
|
||||
<img src="captcha.php" alt="captcha" class="captcha"><br>
|
||||
<input type="text" name="captcha" placeholder="<?=$_LANG['input_captcha']?>"><br>
|
||||
<input type="submit" value="<?=$_LANG['sign_in']?>" class="button"><br>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user