index.inc.php
来自「Phpcms2008 是一款基于 PHP+Mysql 架构的网站内容管理系统」· PHP 代码 · 共 28 行
PHP
28 行
<?php
defined('IN_PHPCMS') or exit('Access Denied');
$cats = array();
$cats['news'] = submodelcats();
$cats['info'] = submodelcats(4);
$html = menus();
foreach($cats['news'] as $key=>$val)
{
$html .= "$val[catname]<br/>";
$r = $db->query("SELECT title, contentid FROM ".DB_PRE."content WHERE catid = '$val[catid]' AND status = 99 ORDER BY contentid DESC LIMIT 5");
while($s = $db->fetch_array($r))
{
$html .= "<a href=\"?action=show_news&contentid=$s[contentid]\">$s[title]</a><br/>";
}
}
foreach($cats['info'] as $key=>$val)
{
$html .= "$val[catname]<br/>";
$r = $db->query("SELECT title, contentid FROM ".DB_PRE."content WHERE catid = '$val[catid]' AND status = 99 ORDER BY contentid DESC LIMIT 5");
while($s = $db->fetch_array($r))
{
$html .= "<a href=\"?action=show_info&contentid=$s[contentid]\">$s[title]</a><br/>";
}
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?