⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xydw.php

📁 PHP整站程序
💻 PHP
字号:
<?php
/// 写文件
require "function.php";
$cookie_user = $HTTP_COOKIE_VARS[$cookie_name.'_user'];
$cookie_pass = $HTTP_COOKIE_VARS[$cookie_name.'_pass'];

// check cookie
islogin($cookie_user,$cookie_pass);

if (!is_file("../xydw.php")) { 
	
	
	$file="";
	$cancel="javascript:self.close()";
	$type="新公告";
	}

else {
$file=explode("※",str_replace("<br>","\n",str_replace(" ","&nbsp;",join("",file("../xydw.php")))));
	$cancel="javascript:history.back()";
	$type="编辑公告";
	}

if ($action=="post") {
	if ($content!="") {
		$fp=fopen("../xydw.php","w+");
		$newfile=$content;
                $newfile=str_replace("\n","<br>","$newfile");
		$newfile=str_replace(" ","&nbsp;","$newfile");
		$newfile=StripSlashes("$newfile");
		fwrite($fp,"$newfile");
		fclose($fp);
	        echo "<meta http-equiv='Refresh' content='0; URL=xydw.php'>";
		}
	}
?>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="1.css" type=text/css rel=stylesheet>
</head>
<body style="background-attachment : fixed">
<center>
  <p align="center">&nbsp;
  <p>
<table border="1" cellspacing="0" width="70%" bordercolorlight="#405028" bordercolordark="#FFFFFF">
  <tr>
    <td align="center"><?php echo "$type"; ?></td>
  </tr>
</table>
<table border="1" width="70%" cellspacing="0" bordercolorlight="#405028" bordercolordark="#FFFFFF" bordercolor="#FFFFFF">
  <tr>
    <td align="center">
	 <form method="post" action="xydw.php?action=post">
      
     <br><br>公告内容:<br>
      <textarea rows="20" name="content" cols="66" style="border: 1 dashed #496EB5"><?php echo "$file[0]"; ?></textarea><br><br>
      <input type="submit" value="提 交" style="background-color:#FFFFFF; border:0">  <input type="reset" value="复 原" style="background-color:#FFFFFF; border:0">  <input type="reset" value="取 消" style="background-color:#FFFFFF; border:0" onclick="<?php echo "$cancel"; ?>">
     </form>
    </td>
  </tr>
</table>

</center>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -