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

56 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 DedeCMS.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. {
  27. $attlist .= " type='";
  28. foreach($types as $v)
  29. {
  30. $attlist .= $v.'.';
  31. }
  32. $attlist .= "'";
  33. }
  34. $innertext = stripslashes($innertext);
  35. if($keyword!="")
  36. {
  37. $attlist .= " keyword='$keyword'";
  38. }
  39. $fulltag = "{dede:arclist$attlist}
  40. $innertext
  41. {/dede:arclist}\r\n";
  42. if($dopost=='savetag')
  43. {
  44. $fulltag = addslashes($fulltag);
  45. $tagname = "auto";
  46. $inQuery = "INSERT INTO `#@__mytag`(typeid,tagname,timeset,starttime,endtime,normbody,expbody)
  47. VALUES('0','$tagname','0','0','0','$fulltag','');
  48. ";
  49. $dsql->ExecuteNoneQuery($inQuery);
  50. $id = $dsql->GetLastID();
  51. $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'");
  52. $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}";
  53. }
  54. include DedeInclude('templets/mytag_tag_guide_ok.htm');