예제 #1
0
    $postDate = gmdate('Y-m-d H:i:s', $localtime);
    include View::getView('header');
    require_once View::getView('add_log');
    include View::getView('footer');
    View::output();
}
//显示编辑文章页面
if ($action == 'edit') {
    $Log_Model = new Log_Model();
    $Tag_Model = new Tag_Model();
    $Sort_Model = new Sort_Model();
    $logid = isset($_GET['gid']) ? intval($_GET['gid']) : '';
    $blogData = $Log_Model->getOneLogForAdmin($logid);
    extract($blogData);
    $orig_date = $date - Option::get('timezone') * 3600;
    $sorts = $CACHE->readCache('sort');
    //log tag
    $tags = array();
    foreach ($Tag_Model->getTag($logid) as $val) {
        $tags[] = $val['tagname'];
    }
    $tagStr = implode(',', $tags);
    //old tag
    $tags = $Tag_Model->getTag();
    $is_top = $top == 'y' ? 'checked="checked"' : '';
    $is_allow_remark = $allow_remark == 'y' ? 'checked="checked"' : '';
    include View::getView('header');
    require_once View::getView('edit_log');
    include View::getView('footer');
    View::output();
}
예제 #2
0
    }
    $hide_state = $pid ? 'y' : 'n';
    if ($pid == 'draft') {
        $hide_stae = 'y';
        $sorturl = '&pid=draft';
        $pwd = '草稿箱';
    } else {
        $hide_stae = 'n';
        $sorturl = '';
        $pwd = '文章管理';
    }
    $logNum = $Log_Model->getLogNum($hide_state, $sqlSegment, 'blog', 1);
    $logs = $Log_Model->getLogsForAdmin($sqlSegment, $hide_state, $page);
    $sorts = $CACHE->readCache('sort');
    $log_cache_tags = $CACHE->readCache('logtags');
    $tags = $Tag_Model->getTag();
    $subPage = '';
    foreach ($_GET as $key => $val) {
        $subPage .= $key != 'page' ? "&{$key}={$val}" : '';
    }
    $pageurl = pagination($logNum, Option::get('admin_perpage_num'), $page, "admin_log.php?{$subPage}&page=");
    include View::getView('header');
    require_once View::getView('admin_log');
    include View::getView('footer');
    View::output();
}
//操作文章
if ($action == 'operate_log') {
    $operate = isset($_REQUEST['operate']) ? $_REQUEST['operate'] : '';
    $pid = isset($_POST['pid']) ? $_POST['pid'] : '';
    $logs = isset($_POST['blog']) ? array_map('intval', $_POST['blog']) : array();
예제 #3
0
파일: index.php 프로젝트: LockGit/emlog
    include View::getView('header');
    include View::getView('single');
    include View::getView('footer');
    View::output();
}
if (ISLOGIN === true && $action == 'write') {
    $logid = isset($_GET['id']) ? intval($_GET['id']) : '';
    $Sort_Model = new Sort_Model();
    $sorts = $Sort_Model->getSorts();
    if ($logid) {
        $Log_Model = new Log_Model();
        $Tag_Model = new Tag_Model();
        $blogData = $Log_Model->getOneLogForAdmin($logid);
        extract($blogData);
        $tags = array();
        foreach ($Tag_Model->getTag($logid) as $val) {
            $tags[] = $val['tagname'];
        }
        $tagStr = implode(',', $tags);
    } else {
        $title = '';
        $sortid = -1;
        $content = '';
        $excerpt = '';
        $tagStr = '';
        $logid = -1;
        $author = UID;
        $date = '';
    }
    include View::getView('header');
    include View::getView('write');