2019-02-11 10:44:20 -06:00
|
|
|
<?php
|
2019-02-13 20:43:32 -06:00
|
|
|
/* This file is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of version 3 of the GNU Affero General Public
|
|
|
|
License as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This file is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details. */
|
|
|
|
|
2019-02-23 01:15:14 -06:00
|
|
|
$title = "Control Panel";
|
2019-02-20 08:04:55 -06:00
|
|
|
$depth = "../";
|
|
|
|
$mark = "p_index";
|
2019-02-23 01:15:14 -06:00
|
|
|
include $depth . "res/lib/load.php";
|
2019-02-11 10:44:20 -06:00
|
|
|
|
2019-02-13 20:43:32 -06:00
|
|
|
// -------------------------------------
|
|
|
|
|
2019-02-20 08:04:55 -06:00
|
|
|
$id = $_GET['id'] ?? post_title_to_id($_GET['name']);
|
2019-02-18 23:24:07 -06:00
|
|
|
$name = post_title($id);
|
2019-02-13 20:43:32 -06:00
|
|
|
|
2019-02-20 08:04:55 -06:00
|
|
|
// -------------------------------------
|
|
|
|
|
2019-02-23 01:15:14 -06:00
|
|
|
if (empty($name)) {
|
|
|
|
root_redirect("p/list/");
|
2019-02-20 08:04:55 -06:00
|
|
|
}
|
|
|
|
|
2019-02-23 01:15:14 -06:00
|
|
|
$local_exports = array('post_id' => $id,
|
|
|
|
'post_title' => unscrub($name),
|
|
|
|
'post_author' => post_author($id),
|
|
|
|
'post_date' => post_date($id),
|
|
|
|
'post_text' => markdown(post_text($id)));
|
2019-02-18 23:24:07 -06:00
|
|
|
|
|
|
|
|
2019-02-23 01:15:14 -06:00
|
|
|
// --------------------------------------
|
2019-02-13 20:43:32 -06:00
|
|
|
|
2019-02-18 23:24:07 -06:00
|
|
|
display_page($mark, $depth, $title, $local_exports);
|
2019-02-11 10:44:20 -06:00
|
|
|
|
|
|
|
?>
|