<?
/////////////////////////////////////////////////////
//  险情文章管理 1.0正式版本--php文本存储格式      //
//  作者：上海财经大学99国际工管    险情           //
//  email：indraw@sina.com                         //
//  qq：   30467826                                //
//  技术支持：http://shcj.51.net/wdb               //
//  最新演示：http://xqart.126.com                 //
//  2002/4/10                                      //
//  最新下载地址 http;//shcj.51.net/wdb            //
/////////////////////////////////////////////////////
include ("admin_log.php");
include ("../makepass.php");
if ($mod=="zs" and $act=="tg") {
  $user_array=file("../data/$user/user.mail");
  $file_count=count($user_array)-1;
  $wait_array=file("../data/$user/user.mailwait");
  $wait_count=count($user_array)-1;
  $yz=0;
    for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter==$id){
          $file_new_name=explode("|",$user_array[$counter]);
            for ($waitid=$wait_count;$waitid>=0;$waitid--) {
                 $wait_new_name=explode("|",$wait_array[$waitid]);
                 if  ($file_new_name[0]==$wait_new_name[0] and  $file_new_name[2]==$wait_new_name[2] )
                $yz=1;}
        if ($yz==0){
         $fp=fopen("../data/$user/user.mailwait", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
     }
    }
    echo "<html><head><title>添加文章</title><meta http-equiv=refresh content=3;URL='mailuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==订阅用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
}
if ($mod=="zs" and $act=="del") {
  $user_array=file("../data/$user/user.mail");
  $file_count=count($user_array)-1;
   $fp=fopen("../data/$user/user.mail", "w");
         flock($fp,3);
         fclose($fp);

  for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter!=$id){
           $fp=fopen("../data/$user/user.mail", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
      }

      echo "<html><head><title>添加文章</title><meta http-equiv=refresh content=3;URL='mailuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==订阅用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;

         }

if ($mod=="dd" and $act=="tg") {
  $user_array=file("../data/$user/user.mailwait");
  $file_count=count($user_array)-1;
  $wait_array=file("../data/$user/user.mail");
  $wait_count=count($user_array)-1;
  $yz=0;
    for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter==$id){
          $file_new_name=explode("|",$user_array[$counter]);
            for ($waitid=$wait_count;$waitid>=0;$waitid--) {
                 $wait_new_name=explode("|",$wait_array[$waitid]);
                 if  ($file_new_name[0]==$wait_new_name[0] and  $file_new_name[2]==$wait_new_name[2] )
                $yz=1;}
        if ($yz==0){
         $fp=fopen("../data/$user/user.mail", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
     }

    }
    echo "<html><head><title>添加文章</title><meta http-equiv=refresh content=3;URL='mailuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==订阅用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
    }
if ($mod=="dd" and $act=="del") {
  $user_array=file("../data/$user/user.mailwait");
  $file_count=count($user_array)-1;
   $fp=fopen("../data/$user/user.mailwait", "w");
         flock($fp,3);
         fclose($fp);

  for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter!=$id){
           $fp=fopen("../data/$user/user.mailwait", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
      }
        echo "<html><head><title>添加文章</title><meta http-equiv=refresh content=3;URL='mailuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==订阅用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
        }
/////////////////////////////////////////////////////////////////////////////
if ($mod=="postzs" and $act=="tg") {
  $user_array=file("../data/$user/user.pub");
  $file_count=count($user_array)-1;
  $wait_array=file("../data/$user/user.pubwait");
  $wait_count=count($user_array)-1;
  $yz=0;
    for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter==$id){
          $file_new_name=explode("|",$user_array[$counter]);
            for ($waitid=$wait_count;$waitid>=0;$waitid--) {
                 $wait_new_name=explode("|",$wait_array[$waitid]);
                 if  ($file_new_name[0]==$wait_new_name[0] and  $file_new_name[2]==$wait_new_name[2] )
                $yz=1;}
        if ($yz==0){
         $fp=fopen("../data/$user/user.pubwait", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
     }

    }
    echo "<html><head><title>注册用户</title><meta http-equiv=refresh content=3;URL='postuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==注册用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
}
if ($mod=="postzs" and $act=="del") {
  $user_array=file("../data/$user/user.pub");
  $file_count=count($user_array)-1;
   $fp=fopen("../data/$user/user.pub", "w");
         flock($fp,3);
         fclose($fp);

  for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter!=$id){
           $fp=fopen("../data/$user/user.pub", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
      }
        echo "<html><head><title>注册用户</title><meta http-equiv=refresh content=3;URL='postuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==注册用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
         }
if ($mod=="postdd" and $act=="tg") {
  $user_array=file("../data/$user/user.pubwait");
  $file_count=count($user_array)-1;
  $wait_array=file("../data/$user/user.pub");
  $wait_count=count($user_array)-1;
  $yz=0;
    for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter==$id){
          $file_new_name=explode("|",$user_array[$counter]);
            for ($waitid=$wait_count;$waitid>=0;$waitid--) {
                 $wait_new_name=explode("|",$wait_array[$waitid]);
                 if  ($file_new_name[0]==$wait_new_name[0] and  $file_new_name[2]==$wait_new_name[2] )
                $yz=1;}
        if ($yz==0){
         $fp=fopen("../data/$user/user.pub", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
     }

    }
     echo "<html><head><title>注册用户</title><meta http-equiv=refresh content=3;URL='postuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==注册用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
}
if ($mod=="postdd" and $act=="del") {
  $user_array=file("../data/$user/user.pubwait");
  $file_count=count($user_array)-1;
   $fp=fopen("../data/$user/user.pubwait", "w");
         flock($fp,3);
         fclose($fp);

  for ($counter=$file_count;$counter>=0;$counter--) {
    if ($counter!=$id){
           $fp=fopen("../data/$user/user.pubwait", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$counter]);
         fclose($fp);}
      }
         echo "<html><head><title>注册用户</title><meta http-equiv=refresh content=3;URL='postuser.php'></head><BODY BGCOLOR='EFEFEF'> <center><br><br><br><br><br><br><br><br><span style=font:11pt><font color=#336699>-==注册用户成功修改-程式2秒自动返回==-</font></span></body></html>";
exit;
        }
/////////////////////////////////////////////////////////////////////////
?>
