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

30 lines
1.1KB

  1. <?php
  2. /**
  3. * 通行证设置
  4. *
  5. * @version $Id: sys_passport.php 1 22:28 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. if(!isset($dopost)) $dopost = "";
  13. if($dopost=='save')
  14. {
  15. $ConfigFile = DEDEINC."/config_passport.php";
  16. $vars = array('cfg_pp_need','cfg_pp_encode','cfg_pp_login','cfg_pp_exit','cfg_pp_reg');
  17. $configstr = "";
  18. foreach($vars as $v)
  19. {
  20. ${$v} = str_replace("'", "", ${$v});
  21. $configstr .= "\${$v} = '".str_replace("'","",stripslashes(${'edit___'.$v}))."';\r\n";
  22. }
  23. $configstr = '<'.'?'."\r\n".$configstr.'?'.'>';
  24. $fp = fopen($ConfigFile, "w") or die("写入文件 $ConfigFile 失败,请检查权限!");
  25. fwrite($fp, $configstr);
  26. fclose($fp);
  27. echo "<script>alert('修改通行证配置成功!');window.location='sys_passport.php?".time()."';</script>\r\n";
  28. }
  29. include DedeInclude('templets/sys_passport.htm');