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

54 lines
1.8KB

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