예제 #1
0
파일: put.php 프로젝트: hhz1084/YObject
 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()))));
 }
예제 #2
0
파일: d.php 프로젝트: hhz1084/YObject
<?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';