在functions.php第582行下面加上: ----------------------------------------------------- //下一篇 if (strstr($downtempstr, '[!--info.next--]')) { $next_r = $empire->fetch1("select softid,softname,filename,titleurl,classid from {$dbtbpre}down where softid>$add[softid] and classid='$add[classid]' and checked=1 order by softid limit 1"); if (empty($next_r[softid])) { $infonext = "<a href='" . EDReturnClassUrl($add[classid]) . "'>返回目录</a>"; } else { //链接 $nexttitleurl = EDReturnSoftPageUrl($next_r[filename], $next_r[titleurl]); $infonext = "<a href='" . $nexttitleurl . "'>" . $next_r[softname] . "</a>"; } $downtempstr = str_replace('[!--info.next--]', $infonext, $downtempstr); } //上一篇 if (strstr($downtempstr, '[!--info.pre--]')) { $next_r = $empire->fetch1("select softid,softname,filename,titleurl,classid from {$dbtbpre}down where softid<$add[softid] and classid='$add[classid]' and checked=1 order by softid desc limit 1"); if (empty($next_r[softid])) { $infonext = "<a href='" . EDReturnClassUrl($add[classid]) . "'>返回目录</a>"; } else { //链接 $nexttitleurl = EDReturnSoftPageUrl($next_r[filename], $next_r[titleurl]); $infonext = "<a href='" . $nexttitleurl . "'>" . $next_r[softname] . "</a>"; } $downtempstr = str_replace('[!--info.pre--]', $infonext, $downtempstr); } 第二步: 打开infofun.php找到294行添加 //生成上一篇 if($add[checked]) { $prer=$empire->fetch1("select * from {$dbtbpre}down where softid<$lastid and classid='$add[classid]' and checked=1 order by softid desc limit 1"); GetHtml($prer,$softtemp_r); }
第365行添加 //生成上一篇 if($add[checked]) { $prer=$empire->fetch1("select * from {$dbtbpre}down where softid<$softid and classid='$add[classid]' and checked=1 order by softid desc limit 1"); GetHtml($prer,$softtemp_r); } 第413行下面添加 //生成上一篇 if($add[checked]) { $prer=$empire->fetch1("select * from {$dbtbpre}down where softid<$softid and classid='$add[classid]' and checked=1 order by softid desc limit 1"); GetHtml($prer,''); $nextr=$empire->fetch1("select * from {$dbtbpre}down where softid>$softid and classid='$classid' and checked=1 order by softid limit 1"); if($nextr['id']) { GetHtml($nextr,''); } }
|