Example #1
0
<?php

error_reporting(E_ALL);
require __DIR__ . '/autoload.php';
$cateId1 = htmlentities($_GET["cateId1"]);
$cateId2 = htmlentities($_GET["cateId2"]);
$cate = new Category(2114);
$cateName1 = $cate->getCateNameById($cateId1);
$cateName2 = $cate->getCateNameById($cateId2);
$pageIndex = intval($_GET["p"]);
if (empty($pageIndex)) {
    $pageIndex = 1;
}
$pageSize = 12;
$post = new Post(2114);
$search = new PostSearch();
$search->CategoryId = $cateId1;
$search->CategoryRoot = 1001;
$search->Orderby = "orderasc";
$search->PageIndex = $pageIndex;
$search->PageSize = $pageSize;
$search->Status = 1;
$posts = $post->getPosts($search);
$target = "list.php?cateId1=" . $cateId1 . "&cateId2=" . $cateId2 . "&p=";
$totalCount = $post->getPostsCount($search);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>钛铂新媒体-信息列表</title>