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

article_allowurl_edit.php 1.3KB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 允许的站内链接
  4. *
  5. * @version $id:article_allowurl_edit.php 11:36 2010年10月8日 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. require_once(DEDEINC."/libraries/oxwindow.class.php");
  13. CheckPurview('sys_Source');
  14. if (empty($dopost)) $dopost = '';
  15. if (empty($allurls)) $allsource = '';
  16. else $allurls = stripslashes($allurls);
  17. $m_file = DEDEDATA."/admin/allowurl.txt";
  18. //保存
  19. if ($dopost == 'save') {
  20. $fp = fopen($m_file, 'w');
  21. flock($fp, 3);
  22. fwrite($fp, $allurls);
  23. fclose($fp);
  24. echo "<script>alert('Save OK!');</script>";
  25. }
  26. //读出
  27. if (empty($allurls) && filesize($m_file) > 0) {
  28. $fp = fopen($m_file, 'r');
  29. $allurls = fread($fp, filesize($m_file));
  30. fclose($fp);
  31. }
  32. $wintitle = "";
  33. $wecome_info = "允许的超链接";
  34. $win = new OxWindow();
  35. $win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST');
  36. $win->AddHidden('dopost', 'save');
  37. $win->AddTitle("每行保存一个超链接");
  38. $win->AddMsgItem("<textarea name='allurls' id='allurls' class='admin-textarea-xl'>$allurls</textarea>");
  39. $winform = $win->GetWindow('ok');
  40. $win->Display();
  41. ?>