private static function data() { $title = Http::getParam('title'); $content = Http::getParam('content'); $title = Crypt::EnCrypt($title, uniqid()); Article::putArticle(self::getIndex(), json_encode(array('title' => $title, 'content' => Crypt::EnCrypt($content, uniqid())))); }
<?php include_once 'App.php'; $id = Http::getParam('id'); if (intval($id) <= 0) { header('location:/index.php'); exit; } $id = intval($id); $article = Article::getArticleById($id); if ($article === false) { header('location:/index.php'); exit; } require_once 'tpl/d.php';