コード例 #1
0
ファイル: list.php プロジェクト: hshoghi/cms
<?php

unset($_SESSION['blog_article']);
if (!auth('admin', 'developer', 'blog_editor')) {
    $_GET['author_ide'] = $_SESSION['login']['person_ide'];
}
$title = 'Blog Article Overview';
template::inc('intranet', 'top');
if ($_SERVER['QUERY_STRING']) {
    $qs = '?' . $_SERVER['QUERY_STRING'];
}
$tabs = array('All' => '/admin/blog/article/list' . $qs, 'Published' => '/admin/blog/article/list/A' . $qs, 'Pending Review' => '/admin/blog/article/list/P' . $qs, 'Unpublished' => '/admin/blog/article/list/U' . $qs);
snippet::tab_redirect($tabs);
$condition = "";
$order_by = "order by post_time desc, blog_name asc";
$condition = '';
if ($_GET['blog_id']) {
    $condition .= "and blog_article.blog_id = {$_GET['blog_id']}";
}
$_GET['author_id'] = decrypt($_GET['author_ide'], 'person');
if (is_numeric($_GET['author_id'])) {
    $condition .= "and blog_article.author__person_id = {$_GET['author_id']}";
}
$_GET['cat_id'] = decrypt($_GET['cat_ide'], 'blog_category');
if (is_numeric($_GET['cat_id'])) {
    $condition .= "and blog_article.blog_category_id = {$_GET['cat_id']}";
}
if ($_POST['sky_ide'] == 'A' || $_POST['sky_ide'] == 'P' || $_POST['sky_ide'] == 'U') {
    $condition .= "and blog_article.status = '{$_POST['sky_ide']}'";
}
//if