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

53 lines
1.9KB

  1. <?php
  2. /**
  3. * @version $Id: article_select_sw.php 1 8:26 2010年7月12日Z tianya $
  4. * @package DedeCMS.Administrator
  5. * @copyright Copyright (c) 2007 - 2019, DesDev, Inc.
  6. * @license http://help.dedecms.com/usersguide/license.html
  7. * @link http://www.dedecms.com
  8. */
  9. require(dirname(__FILE__)."/config.php");
  10. header("Pragma:no-cache");
  11. header("Cache-Control:no-cache");
  12. header("Expires:0");
  13. //来源列表
  14. if($t=='source')
  15. {
  16. $m_file = DEDEDATA."/admin/source.txt";
  17. $allsources = file($m_file);
  18. echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_source_edit.php');ClearDivCt('mysource');\">设置</a>]&nbsp;";
  19. echo "[<a href='#' onclick='javascript:HideObj(\"mysource\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n";
  20. foreach($allsources as $v)
  21. {
  22. $v = trim($v);
  23. if($v!="")
  24. {
  25. echo "<a href='#' onclick='javascript:PutSource(\"$v\")'>$v</a> | \r\n";
  26. }
  27. }
  28. echo "</div><div class='coolbg5'>&nbsp;</div>";
  29. }
  30. else
  31. {
  32. //作者列表
  33. $m_file = DEDEDATA."/admin/writer.txt";
  34. echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_writer_edit.php');ClearDivCt('mywriter');\">设置</a>]&nbsp;";
  35. echo "[<a href='#' onclick='javascript:HideObj(\"mywriter\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n";
  36. if(filesize($m_file)>0)
  37. {
  38. $fp = fopen($m_file,'r');
  39. $str = fread($fp,filesize($m_file));
  40. fclose($fp);
  41. $strs = explode(',',$str);
  42. foreach($strs as $str)
  43. {
  44. $str = trim($str);
  45. if($str!="")
  46. {
  47. echo "<a href='#' onclick='javascript:PutWriter(\"$str\")'>$str</a> | ";
  48. }
  49. }
  50. }
  51. echo "</div><div class='coolbg5'>&nbsp;</div>\r\n";
  52. }