您当前的位置:网站首页>>建站资讯>>网站建设知识网站建设知识

doccms产品详情页上一篇下一篇功能

点击数:53532012-03-10 11:54:17 来源: www.essj.cn



content/product/index.php


73行 $tag['data.row']=(array)$product; 下面加入:


unset($product);
$tag['pager.data.up']=$db->get_row('SELECT * FROM '.TB_PREFIX.'product WHERE channelId='.$params['id'].' && id<'.$params['args'].' ORDER BY id DESC LIMIT 0,1',ARRAY_A);
$tag['pager.data.down']=$db->get_row('SELECT * FROM '.TB_PREFIX.'product WHERE channelId='.$params['id'].' && id>'.$params['args'].' ORDER BY id ASC  LIMIT 0,1',ARRAY_A);




产品详情页中加入:


/*
产品上下篇功能
*/
$is_up=$tag['pager.data.up'];
$is_down=$tag['pager.data.down'];
if(is_array($is_down))
{
?>

}
if(is_array($is_up))
{
?>

}
unset($is_up);
unset($is_down);
?>
  
【文章如需转载请注明:转载自临朐天宇网络:http://www.essj.cn】
本文地址:http://www.essj.cn/web/n18.html
【作者:临朐网站建设】 返回顶端

工作日:9:00-21:00

邮箱498777887@qq.com