<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_Writer');
if(empty($dopost)) $dopost = "";
if(empty($allwriter)) $allwriter = "";
else $allwriter = stripslashes($allwriter);
$m_file = dirname(__FILE__)."/inc/writer.txt";
//±£´æ
if($dopost=="save")
{
   $fp = fopen($m_file,'w');
   flock($fp,3);
   fwrite($fp,$allwriter);
   fclose($fp);
   echo "<script>alert('Save OK!');</script>";
}
//¶Á³ö
if(empty($allwriter)&&filesize($m_file)>0){
   $fp = fopen($m_file,'r');
   $allwriter = fread($fp,filesize($m_file));
   fclose($fp);
}
require_once(dirname(__FILE__)."/templets/article_writer_edit.htm");
?>
