国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7KB

  1. <?php
  2. /**
  3. * 内容统计
  4. *
  5. * @version $Id: content_tj.php 1 14:31 2010年7月12日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. CheckPurview('sys_ArcTj');
  13. $row1 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` ");
  14. $row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` ");
  15. $row3 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` ");
  16. /**
  17. * 获取文档
  18. *
  19. * @param object $dsql
  20. * @param string $ordertype 排序类型
  21. * @return string
  22. */
  23. function GetArchives($dsql, $ordertype)
  24. {
  25. $starttime = time() - (24 * 3600 * 30);
  26. if ($ordertype == 'monthFeedback' || $ordertype == 'monthHot') {
  27. $swhere = " where senddate>$starttime ";
  28. } else {
  29. $swhere = "";
  30. }
  31. if (preg_match("#feedback#", $ordertype)) {
  32. $ordersql = " ORDER BY scores DESC ";
  33. } else {
  34. $ordersql = " ORDER BY click DESC ";
  35. }
  36. $query = "SELECT id,title,click,scores FROM #@__archives $swhere $ordersql LIMIT 0,20 ";
  37. $dsql->SetQuery($query);
  38. $dsql->Execute('ga');
  39. while ($row = $dsql->GetObject('ga')) {
  40. if (preg_match("#feedback#i", $ordertype)) {
  41. $moreinfo = "[<a target='_blank' href='".$GLOBALS['cfg_phpurl']."/feedback.php?aid={$row->id}'>评论:{$row->scores}</a>]";
  42. } else {
  43. $moreinfo = "[点击:{$row->click}]";
  44. }
  45. echo "·<a href='archives_do.php?aid={$row->id}&dopost=viewArchives' target='_blank'>";
  46. echo cn_substr($row->title, 30)."</a>{$moreinfo}<br>\r\n";
  47. }
  48. }
  49. include DedeInclude('templets/content_tj.htm');