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

50 lines
1.6KB

  1. <?php
  2. /**
  3. * 防采集混淆字符串管理
  4. *
  5. * @version $Id: article_string_mix.php 1 14:31 2010年7月12日Z tianya $
  6. * @package DedeCMS.Administrator
  7. * @copyright Copyright (c) 2007 - 2018, DesDev, Inc.
  8. * @copyright Copyright (c) 2020, DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license/v6
  10. * @link https://www.dedebiz.com
  11. */
  12. require_once(dirname(__FILE__).'/config.php');
  13. require_once(DEDEINC.'/oxwindow.class.php');
  14. CheckPurview('sys_StringMix');
  15. if(empty($dopost)) $dopost = '';
  16. if(empty($allsource)) $allsource = '';
  17. else $allsource = stripslashes($allsource);
  18. $m_file = DEDEDATA."/downmix.data.php";
  19. //保存
  20. if($dopost=="save")
  21. {
  22. CheckCSRF();
  23. $fp = fopen($m_file,'w');
  24. flock($fp,3);
  25. fwrite($fp,$allsource);
  26. fclose($fp);
  27. echo "<script>alert('Save OK!');</script>";
  28. }
  29. //读出
  30. if(empty($allsource) && filesize($m_file)>0)
  31. {
  32. $fp = fopen($m_file,'r');
  33. $allsource = fread($fp,filesize($m_file));
  34. fclose($fp);
  35. }
  36. make_hash();
  37. $wintitle = "防采集混淆字符串管理";
  38. $wecome_info = "防采集混淆字符串管理";
  39. $win = new OxWindow();
  40. $win->Init('article_string_mix.php','js/blank.js','POST');
  41. $win->AddHidden('dopost','save');
  42. $win->AddHidden('token',$_SESSION['token']);
  43. $win->AddTitle("如果你要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}。");
  44. $win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>");
  45. $winform = $win->GetWindow('ok');
  46. $win->Display();