c5_labsci/web/wwpage/index.php
2026-01-27 00:52:00 +08:00

59 lines
1.8 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Ciyon - 众产全栈开发框架</title>
<meta name="keywords" content="全栈开发框架,Golang开发框架,PHP开发框架,移动端开发框架,Vue3开发框架" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no" />
<link rel="stylesheet" href="/jscss/web.css" />
<script src="/jscss/theme.js"></script>
</head>
<body>
<div class="title">
<?php
$cate = 2;
$pageno = getint('pageno');
$pagecount = 5;
$current_page = '/wwpage/';
if ($pageno > 1)
$current_page = '/wwpage/?pageno=2';
include_once("www/_header.php");
?>
</div>
<div class="vtitle">/web/wwpage/index.php</div>
<div>
<?php
$csql = new \ciy\sql('www_list_cate');
$csql->where('id', $cate);
$row = $db->getone($csql);
clog($row);
$csql = new \ciy\sql('www_list_art');
$csql->where('cateid', $cate);
$csql->where('bshow', 1);
$csql->limit($pageno, $pagecount);
$csql->order('id desc');
$csql->column('id,name');
$count = -1;
$rows = $db->get($csql, $count);
foreach ($rows as $row) {
echo '  <a href="/wwpage/art?id=' . $row['id'] . '">' . $row['name'] . '</a><br>';
}
clog('总条数: ' . $count);
?>
</div>
<div class="vpage">
<?php
\web\cwebcomon::www_showpage($count, $pageno, $pagecount, '/wwpage/', function ($pageno) {
if ($pageno < 2)
return '';
return '?pageno=' . $pageno;
});
?>
</div>
<?php include_once("www/_footer.php"); ?>
</body>
</html>