<?
//被风吹倒的男子修改了本页的部分代码

include("config.php");

$check=0;
if($news_user!=$username){$username=$news_user;$password=$news_password;}
if($adminpw==$password)$check=1; 



if($news_content!="")
  {if($check==1)
     {$temp=fopen($datapath,'a' );
      $news_day=date("z");
      $news_date=date("Y-m-d");
      $news=$news_user."|".$news_date."|".$news_content."|".$news_color."|".$news_link."|".$news_day;
      fwrite($temp,$news."\n");
      fclose($temp);
      header("location:$path");


      }else {echo "用户名或密码错误";echo "<script>document.location.href='add.php'</script>";}
   }else {echo "新闻内容不能为空";echo "<script>document.location.href='add.php'</script>";}
?>