国内流行的内容管理系统(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.

39 lines
1.1KB

  1. <?php
  2. /**
  3. * 生成标签
  4. *
  5. * @version $id:makehtml_taglist.php 11:17 2020年8月19日 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. $tagid = isset($tagid)? (int)$tagid : 0;
  13. $action = isset($action)? $action : '';
  14. $search = isset($search)? HtmlReplace($search, 0) : '';
  15. if ($action == "search") {
  16. if (!empty($search)) {
  17. $sql="SELECT * FROM `#@__tagindex` WHERE tag like '%$search%' ORDER BY id DESC";
  18. $dsql->Execute('al',$sql);
  19. $result = array();
  20. while($row=$dsql->GetObject('al')){
  21. $row->text= $row->tag;
  22. $result[] = $row;
  23. }
  24. $result = array(
  25. "code" => 200,
  26. "data" => $result,
  27. );
  28. echo json_encode($result);
  29. exit;
  30. }
  31. $result = array(
  32. "code" => 200,
  33. "data" => null,
  34. );
  35. echo json_encode($result);
  36. exit;
  37. }
  38. include DedeInclude('templets/makehtml_taglist.htm');
  39. ?>