<?
#############################################################
#  XYListmail Version 多用户4.0版  ( 星原邮件列表程序 )
#
#  版权所有: 星原商务网络
#
#  制作人  : cxrich   (星原浪子)
#
#  主页地址: http://www.exyweb.com/      星原商务网络
#
####################任何人不得删除此版权部分####################
require("config.php");

$id=$_REQUEST['id'];
$method=$_REQUEST['method'];
$managemail=$_REQUEST['managemail'];
$page=$_REQUEST['page'];
$managealldata=$_REQUEST['managealldata'];
$select=$_REQUEST['select'];
$admend=$_REQUEST['admend'];
$topage=$_REQUEST['topage'];
$notemail=$_REQUEST['notemail'];
$noteall=$_REQUEST['noteall'];
$type=$_REQUEST['type'];
$mailadd=$_REQUEST['mailadd'];

function checkEmail($mail)
{
return (ereg( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int)$",$mail));
}

function showerror($errormsg)  {
	echo"<script LANGUAGE=JavaScript >
	alert('$errormsg');
	history.back();
	</script>";
}

global $name;
global $set_list;
global $set_name;
global $set_list_name;
global $set_user_file;
global $set_user_count;
global $set_data_name;
global $set_data_file;
global $set_data_count;
global $set_listuser;
global $set_datauser;
global $validata_name;
global $validata_data;
global $validata_filename;
global $validata_file;
global $set_msg_name;
global $set_msg_filepath;
global $set_msg_file;
global $set_mail_name;
global $set_mail_filepath;
global $set_mail_file;

@$name=$id;

@$set_list="$name/list.php";
@$set_name="$name.php";
@$set_listuser="$cataloguser/$set_list";
@$set_datauser="$cataloguser/$set_name";

@$set_list_name="$catalogdata/$name/list.php";

@$set_user_file=file($set_datauser);
@$set_user_count=count($set_user_file);

@$set_data_name="$catalogdata/$name/$set_name";
@$set_data_file=file($set_data_name);
@$set_data_count=count($set_data_file);

@$validata_name="take.php";
@$validata_data="$catalogdata/$name/";
@$validata_filename=$validata_data.$validata_name;
@$validata_file=file($validata_filename);

@$set_msg_name="xymsg.php";
@$set_msg_filepath="$catalogdata/$name/$set_msg_name";
@$set_msg_file=file($set_msg_filepath);
@$set_msg_count=count($set_msg_file);
if ($set_msg_count>0)
{
	$msginfo=split(' ‖‖ ',$set_msg_file[0]);
}
$msginfo_1=$msginfo[0];
$msginfo_2=$msginfo[1];

if ($set_user_count>0)
  {
     $infouser=split(' ‖‖ ',$set_user_file[0]);
  }
@$infouser_1=$infouser[1];
@$infouser_2=$infouser[2];

@$set_mail_name="xymail.php";
@$set_mail_filepath="$catalogdata/$name/$set_mail_name";
@$set_mail_file=file($set_mail_filepath);
@$set_mail_count=count($set_mail_file);
if ($set_mail_count>0)
{
	$mail_info=split(' ‖‖ ',$set_mail_file[0]);
}
$mail_info_1=$mail_info[0];
$mail_info_2=$mail_info[1];

@$set_takemsg_name="takemsg.php";
@$set_takemsg_filepath="$catalogdata/$name/$set_takemsg_name";
@$set_takemsg_file=file($set_takemsg_filepath);
@$set_takemsg_count=count($set_takemsg_file);
if ($set_takemsg_count>0)
{
	$takemsg_info=split(' ‖‖ ',$set_takemsg_file[0]);
}
$takemsg_info_1=$takemsg_info[0];
$takemsg_info_2=$takemsg_info[1];

@$mailtemp_name="mailtemp.php";
@$mailtemp_filepath="$catalogdata/$name/$mailtemp_name";
@$mailtemp_file=file($mailtemp_filepath);
@$mailtemp_count=count($mailtemp_file);

$take_link_add="<a href=$filepath/$setupname?id=$name&method=take_link&type=add&mailadd=$mail target=_blank>点击确认加入邮件列表</a>";
$take_link_del="<a href=$filepath/$setupname?id=$name&method=take_link&type=del&mailadd=$mail target=_blank>点击确认退出邮件列表</a>";

$titleurl="<a href=$weburl target=_blank>$titlename</a>";
$mail_copy="<a href=http://www.exyweb.com target=_top><font color=red>星原商务网络</a></font>";

function  showview($viewmsg){
echo "<html><head><OBJECT id=closes type=application/x-oleobject classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11><param name=Command value=Close></object></head><body onload=top.resizeTo(400,300);><br><br><center>$viewmsg<p><a href=# onclick=closes.Click();>关闭窗口</a></center><br></body></heml>";
}

function  showviewtop($viewtop){
echo "<html><head></head><body><br><br><center>$viewtop<p><a href=# onclick=history.back();>返回</a></center><br></body></heml>";
}

$set_return="<p>&nbsp;<p>&nbsp;<center>还没记录</center>";

//根据是否允许注册显示申请链接
$concentname_set="concent.php";
$concentdata_set="$catalogdata/";
$concentfile_set=$concentdata_set.$concentname_set;
if(!file_exists($concentfile_set)){
$fpconcent_set="1";
$fp_set=fopen("$concentfile_set","w");
fwrite($fp_set,"$fpconcent_set");
fclose($fp_set);
chmod("$concentfile_set", 0777);
system("chmod 0777 $concentfile_set");
}
$concentarr_set=file($concentfile_set);
if($concentarr_set[0]==1){
$mail_top="<html>
<head>
<title>$infouser[0] 邮件列表</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">
<link rel=\"stylesheet\" href=\"main.css\" type=\"text/css\">
</head>
<body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\">
<table width=\"750\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\" align=\"center\">
  <tr> 
    <td valign=\"top\"> 
      <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
        <tr> 
          <td> 
            <div align=\"center\">$infouser[7]</div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td height=\"5\" bgcolor=\"#DBDBDB\"></td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\"><b><font style=\"font-size: 13pt\"> 
        $infouser[0]
        <font color=red>邮件列表</font></font></b></div>
    </td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\"> 
        $infouser[6]
      </div>
    </td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\"> 
		<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
		<td width=\"40%\"> 
		    <div align=\"center\">邮件列表共有订户数：<font color=red>$set_data_count</fonr><img src=\"$imagesurl/friend.gif\" width=\"16\" height=\"16\" border=\"0\"></div>
	    </td>
		<td width=\"15%\"> 
		    <div align=\"center\"><a href=\"$filepath/view.php\"><img src=\"$imagesurl/replay.gif\" width=\"16\" height=\"16\" border=\"0\">用户列表</a></div>
	    </td>
		<td width=\"15%\"> 
		    <div align=\"center\"><a href=\"$filepath/reg.php\">免费申请</a></div>
	    </td>
	    <td width=\"15%\">
		    <div align=\"center\"><a href=mailto:$infouser[3]><img src=\"$imagesurl/mail.gif\" width=\"15\" height=\"15\" border=\"0\">管理者信箱</a></div>
	    </td>
	    <td width=\"15%\">
		    <div align=\"center\"><a href=$filepath/$setupname?id=$name&method=setup><img src=\"$imagesurl/openfold.gif\" width=\"14\" height=\"14\" border=\"0\">管理登录</a></div>
	    </td>
		</tr>
		</table>
      </div>
    </td>
  </tr>
  <tr> 
    <td>";
}else{
$mail_top="<html>
<head>
<title>$infouser[0] 邮件列表</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">
<link rel=\"stylesheet\" href=\"main.css\" type=\"text/css\">
</head>
<body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\">
<table width=\"750\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\" align=\"center\">
  <tr> 
    <td valign=\"top\"> 
      <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
        <tr> 
          <td> 
            <div align=\"center\">$infouser[7]</div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td height=\"5\" bgcolor=\"#DBDBDB\"></td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\"><b><font style=\"font-size: 13pt\"> 
        $infouser[0]
        <font color=red>邮件列表</font></font></b></div>
    </td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\"> 
        $infouser[6]
      </div>
    </td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\"> 
		<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
		<td width=\"40%\"> 
		    <div align=\"center\">邮件列表共有订户数：<font color=red>$set_data_count</fonr><img src=\"$imagesurl/friend.gif\" width=\"16\" height=\"16\" border=\"0\"></div>
	    </td>
		<td width=\"20%\"> 
		    <div align=\"center\"><a href=\"$filepath/view.php\"><img src=\"$imagesurl/replay.gif\" width=\"16\" height=\"16\" border=\"0\">用户列表</a></div>
	    </td>
	    <td width=\"20%\">
		    <div align=\"center\"><a href=mailto:$infouser[3]><img src=\"$imagesurl/mail.gif\" width=\"15\" height=\"15\" border=\"0\">管理者信箱</a></div>
	    </td>
	    <td width=\"20%\">
		    <div align=\"center\"><a href=$filepath/$setupname?id=$name&method=setup><img src=\"$imagesurl/openfold.gif\" width=\"14\" height=\"14\" border=\"0\">管理登录</a></div>
	    </td>
		</tr>
		</table>
      </div>
    </td>
  </tr>
  <tr> 
    <td>";
}

$mail_bottom="    </td>
  </tr>
  <tr> 
    <td> 
      <div align=\"center\">邮件列表服务由 <b> 
        $titleurl
        </b> 提供　程序制作 <b><font color=red> 
        $mail_copy
        </font></b></div>
    </td>
  </tr>
  <tr>
    <td height=\"5\" bgcolor=\"#DBDBDB\"></td>
  </tr>
  <tr> 
    <td valign=\"top\"> 
      <div align=\"center\"> 
        <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
          <tr> 
            <td> 
              <div align=\"center\">$infouser[8]</div>
            </td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>
</body>
</html>";

$mail_setup_menu="<html>
<head>
<title>$infouser[0] 邮件列表</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">
<link rel=\"stylesheet\" href=\"main.css\" type=\"text/css\">
</head>
<body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\">
    <table width=\"750\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
      <tr>
        <td>
          <div align=\"center\"><b><font style=\"font-size: 13pt\">$infouser[0]<font color=red>邮件列表</font></font></b></div>
        </td>
      </tr>
      <tr>
        <td>
          <div align=\"center\">$infouser[6]</div>
        </td>
      </tr>
      <tr>
        <td bgcolor=\"dbdbdb\" height=\"5\"></td>
      </tr>
      <tr>
        <td>
          <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
            <tr>
              <td width=\"19%\" valign=\"top\">
                <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">
                  <tr> 
                    <td bgcolor=\"FFEEEE\"> 
                      <div align=\"center\">管理选项</div>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <a href=$filepath/$setupname?id=$name&method=note&topage=1><img src=\"$imagesurl/openfold.gif\" width=\"14\" height=\"14\" border=\"0\">历史记录</a>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <a href=$filepath/$setupname?id=$name&method=sendmailto target=_balnk><img src=\"img/mail.gif\" width=\"15\" height=\"15\" border=\"0\">发送邮件</a>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <a href=$filepath/$setupname?id=$name&method=manage&page=1><img src=\"$imagesurl/replay.gif\" width=\"16\" height=\"16\" border=\"0\">列表管理</a>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <a href=$filepath/$setupname?id=$name&method=validata><img src=\"$imagesurl/exe.gif\" width=\"16\" height=\"15\" border=\"0\">订/退设置</a>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <a href=$filepath/$setupname?id=$name&method=admend><img src=\"$imagesurl/edit.gif\" width=\"16\" height=\"15\" border=\"0\">资料修改</a>
                    </td>
                  </tr>
                  <tr> 
                    <td>
					<a href=$filepath/$setupname?id=$name&method=input><img src=\"$imagesurl/hwp.gif\" width=\"16\" height=\"15\" border=\"0\">批量输入</a>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <img src=\"$imagesurl/friend.gif\" width=\"16\" height=\"15\" border=\"0\">订户数：<font color=red>$set_data_count</fonr>
                    </td>
                  </tr>
                  <tr> 
                    <td>
					<a href=$filepath/$setupname?id=$name&method=loginout><img src=\"$imagesurl/top.gif\" width=\"16\" height=\"15\" border=\"0\">退出管理</a>
                    </td>
                  </tr>
                  <tr> 
                    <td>
					<p>&nbsp;</p>
                    </td>
                  </tr>
                  <tr> 
                    <td> 
                      <a href=mailto:$masteremail><img src=\"$imagesurl/mail.gif\" width=\"15\" height=\"15\" border=\"0\">超级管理员信箱</a>
                    </td>
                  </tr>
                </table>
              </td>
              <td width=\"81%\" valign=\"top\">";

$mail_setup_bottom="</td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td bgcolor=\"dbdbdb\" height=\"5\"></td>
      </tr>
      <tr>
        <td>
          <div align=\"center\">邮件列表服务由 <b> $titleurl </b> 提供　程序制作 <b><font color=red> 
            $mail_copy</font></b></div>
        </td>
      </tr>
    </table>
  </body>
</html>";
####################星原商务网络--版权所有#####################
?>