拔于博客吧!原因嘛!看见好多人想要他的博客导航就拔了!就代入了emlog!友情提示:新建一个页面板子直接全部放就去就可以用咯哦!

2.png

  1. ccs:修改了下-.-
  2. <style>
  3. .favbox,.favbox ul {overflow:hidden; clear:both;margin:0; padding:0;}
  4. .favbox h3 {font-size:1.125em; font-weight:normal; margin:10px 0; border-bottom:2px solid #eee; padding-bottom:5px; color:#555;}
  5. .favbox h3 span {border-bottom:2px solid #00ad35;padding-bottom:8px;}
  6. .favbox ul {width:101%;}
  7. .favbox ul li {float:left; width:22%; color:#777; font-size:0.75em; padding:10px 1%; margin:5px 1% 5px 0; height:100px; overflow:hidden; background-color:#f9f9f9; display:inline-block;}
  8. .favbox ul li a {display:block; width:100%; margin-bottom:5px; color:#00ad35; font-size:1.25em;}
  9. </style>
  10. emlog代码:
  11. <?php
  12. function sortLinks(){
  13. $db = Database::getInstance();
  14. global $CACHE;
  15. $sortlink_cache = $CACHE->readCache('sortlink');
  16. foreach($sortlink_cache as $value){
  17. $out .= '<div class="favbox"><h3><span>'.$sortlink_cache[$value['linksort_id']]['linksort_name'].'</span></h3>
  18. ';
  19. $links = $db->query ("SELECT * FROM ".DB_PREFIX."link WHERE linksortid='$value[linksort_id]' AND hide='n' order by id DESC");
  20. while ($row = $db->fetch_array($links)){
  21. $out .='<ul class="xoxo blogroll"><li><a href="'.$row['siteurl'].'" rel="nofollow" title="'.$row['description'].'" target="_blank">'.$row['sitename'].'</a>'.$row['description'].'</li>';
  22. }
  23. $out .='</ul></div>';
  24. }
  25. echo $out;
  26. }?>
  27. 调用代码:
  28. <?php echo sortLinks() ?>