tag.func.php
来自「phpcms2007很好的cms内容管理系统,操作方便」· PHP 代码 · 共 30 行
PHP
30 行
<?php
function link_list($templateid = '', $typeid = '', $linktype = 0, $linknum = 100, $cols = 6, $showhits = 0)
{
global $db,$PHP_SITEURL,$MOD;
$showhits = intval($showhits);
$cols = intval($cols);
$linknum = intval($linknum);
$linktype = intval($linktype);
$showhits = intval($showhits);
$condition = '';
$condition .= " AND linktype=$linktype ";
if($typeid)
$condition .= "AND typeid IN ($typeid) ";
$result = $db->query("SELECT * FROM ".TABLE_LINK." WHERE passed=1 $condition ORDER BY elite DESC,listorder ASC LIMIT $linknum " );
if($db->affected_rows()>0)
{
while($r=$db->fetch_array($result))
{
if(!preg_match('/http:\/\//',$r['logo']))
{
$r['logo'] = $PHP_SITEURL.$r['logo'];
}
$links[]=$r;
}
$width = ceil(100/$cols).'%';
$templateid = $templateid ? $templateid : "tag_link_list";
include template('link',$templateid);
}
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?