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

52 lines
1.8KB

  1. <?php
  2. /**
  3. * 根据条件生成标记
  4. *
  5. * @version $id:mytag_tag_guide_ok.php 15:39 2010年7月20日 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. if (DEDEBIZ_SAFE_MODE) {
  13. die(DedeAlert("系统已启用安全模式,无法使用当前功能",ALERT_DANGER));
  14. }
  15. CheckPurview('temp_Other');
  16. //根据条件生成标记
  17. $attlist = "";
  18. $attlist .= " row='".$row."'";
  19. $attlist .= " titlelen='".$titlelen."'";
  20. if ($orderby != 'senddate') $attlist .= " orderby='".$orderby."'";
  21. if ($order != 'desc') $attlist .= " order='".$order."'";
  22. if ($typeid > 0) $attlist .= " typeid='".$typeid."'";
  23. if (isset($arcid)) $attlist .= " idlist='".$arcid."'";
  24. if ($channel > 0) $attlist .= " channelid='".$channel."'";
  25. if ($att > 0) $attlist .= " att='".$att."'";
  26. if ($col > 1) $attlist .= " col='".$col."'";
  27. if ($subday > 0) $attlist .= " subday='".$subday."'";
  28. if (!empty($types)) {
  29. $attlist .= " type='";
  30. foreach ($types as $v) {
  31. $attlist .= $v.'.';
  32. }
  33. $attlist .= "'";
  34. }
  35. $innertext = stripslashes($innertext);
  36. if ($keyword != "") {
  37. $attlist .= " keyword='$keyword'";
  38. }
  39. $fulltag = "{dede:arclist$attlist}
  40. $innertext
  41. {/dede:arclist}\r\n";
  42. if ($dopost == 'savetag') {
  43. $fulltag = addslashes($fulltag);
  44. $tagname = "auto";
  45. $inQuery = "INSERT INTO `#@__mytag` (typeid,tagname,timeset,starttime,endtime,normbody,expbody) VALUES ('0','$tagname','0','0','0','$fulltag','');";
  46. $dsql->ExecuteNoneQuery($inQuery);
  47. $id = $dsql->GetLastID();
  48. $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'");
  49. $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}";
  50. }
  51. include DedeInclude('templets/mytag_tag_guide_ok.htm');
  52. ?>