<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<%
if request("action")="save" then
 dim username,password,repassword,sex,email,question,answer
 dim oicq,icq,msn,homepage,tel,zipcode,address,remark
 
 username=checkstr(trim(request.form("username")))
 password=checkstr(trim(request.form("password")))
 repassword=checkstr(trim(request.form("repassword")))
 sex=request.form("sex")
 email=checkstr(trim(request.form("email")))
 question=checkstr(trim(request.form("question")))
 answer=checkstr(trim(request.form("answer")))
 
 oicq=checkstr(trim(request.form("oicq")))
 icq=checkstr(trim(request.form("icq")))
 msn=checkstr(trim(request.form("msn")))
 homepage=checkstr(trim(request.form("homepage")))
 tel=checkstr(trim(request.form("tel")))
 zipcode=checkstr(trim(request.form("zipcode")))
 address=checkstr(trim(request.form("address")))
 remark=checkstr(trim(request.form("remark")))
 
 '数据检查
 if username="" or strlength(username)>30 then
   call mb("帐号不能为空或大于15个汉字！","",0)
 end if
 
 if password="" or strlength(password)>30 then
   call mb("密码不能为空或大于30字长！","",0)
 end if
 
 if repassword<>password then
   call mb("密码与确认密码不符，请重新输入！","",0)
 end if
 
 if sex="" then
   sex="男"
 end if
 
 if not isemail(email) then
   call mb("请正确输入电子邮件地址！","",0)
 end if
 
 if question="" or answer="" then
   call mb("请完整输入密码问题与答案！","",0)
 end if
 
 '保存数据
 set rs=server.createobject("adodb.recordset")
 sql="select * from author where username='"&username&"'"
 rs.open sql,conn,1,3
 
 if rs.bof and rs.eof then
   rs.addnew()
   rs("username")=username
   rs("password")=password
   rs("sex")=sex
   rs("email")=email
   rs("question")=question
   rs("answer")=answer
   rs("oicq")=oicq
   rs("icq")=icq
   rs("msn")=msn
   rs("tel")=tel
   rs("homepage")=homepage
   rs("zipcode")=zipcode
   rs("address")=address
   rs("remark")=remark
   rs.update
 else
   call mb("对不起，您要注册的帐号已经有人使用了！","",0)
 end if
 rs.close
 set rs=nothing 
%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="border">
  <tr> 
    <td width="190" valign="top"> 
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="20" align="center"><img src="images/left_reg.gif" alt="作者加盟" width="190" height="34" border="0"></td>
        </tr>
        <tr>
          <td height="20" align="center">&nbsp;</td>
        </tr>
        <tr> 
          <td height="20" align="center">√　填写个人资料</td>
        </tr>
        <tr> 
          <td height="20" align="center">↓</td>
        </tr>
        <tr> 
          <td height="20" align="center">→　<font color="#FF0000">作者加盟成功</font></td>
        </tr>
        <tr> 
          <td height="20" align="center">&nbsp;</td>
        </tr>
        <tr> 
          <td height="20" align="center">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td width="1" valign="top" background="images/bg_vline.gif"></td>
    <td valign="top"> &nbsp
      <TABLE align=center 
      background="images/line01.gif" 
      border=0 cellPadding=0 cellSpacing=0 height=24 width="100%">
        <TR> 
          <TD height=21 width="53%">&nbsp;<IMG height=12 src="images/A3.gif" width=12> 
            当前位置：<A href="index.asp" title="联盟首页">Flash联盟</A> -&gt; 作者加盟</TD>
          <TD height=21 width="47%">&nbsp;</TD>
        </TR>
      </TABLE>
      : 
      <TABLE align=center border=0 borderColor=#000000 cellPadding=0 
      cellSpacing=0 width="99%">
        <TR> 
          <TD 
          background="images/T_back.gif" 
          width="18%"><IMG src="images/T_1.gif" width=90 height=24 border="0"></TD>
          <TD 
          background="images/T_back.gif" 
          width="77%">　<font color="#993300">作 者 加 盟 - 注 册 成 功</font></TD>
          <TD width="5%"><IMG height=24 src="images/T_2.gif" width=29></TD>
        </TR>
      </TABLE>
      <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <tr> 
          <td height="77" align="center" bgcolor="#FFFFFF"><font color="#FF0000">恭 
            喜 您 ， 成 功 的 注 册 成 为 本 站 的 作 者 ！</font></td>
        </tr>
        <tr> 
          <td height="60" align="center" bgcolor="#FFFFFF">请登陆系统，发布您的个人作品...　　　<a href="login.asp">点这里登陆</a></td>
        </tr>
      </table></td>
  </tr>
</table>
<%else%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="border">
  <tr> 
    <td width="190" valign="top"> 
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="20" align="center"><img src="images/left_reg.gif" alt="作者加盟" width="190" height="34" border="0"></td>
        </tr>
        <tr>
          <td height="20" align="center">&nbsp;</td>
        </tr>
        <tr> 
          <td height="20" align="center">→　<font color="#FF0000">填写个人资料</font></td>
        </tr>
        <tr> 
          <td height="20" align="center">↓</td>
        </tr>
        <tr> 
          <td height="20" align="center">作者加盟成功</td>
        </tr>
        <tr> 
          <td height="20" align="center">&nbsp;</td>
        </tr>
        <tr> 
          <td height="20" align="center">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td width="1" valign="top" background="images/bg_vline.gif"></td>
    <td valign="top"> <form action="?action=save" method="post" name="reg" id="reg">
        <TABLE align=center 
      background="images/line01.gif" 
      border=0 cellPadding=0 cellSpacing=0 height=24 width="100%">
          <TR> 
            <TD height=21 width="53%">&nbsp;<IMG height=12 src="images/A3.gif" width=12> 
              当前位置：<A href="index.asp" title="联盟首页">Flash联盟</A> -&gt; 作者加盟</TD>
            <TD height=21 width="47%">&nbsp;</TD>
          </TR>
        </TABLE>
        <br>
        <TABLE align=center border=0 borderColor=#000000 cellPadding=0 
      cellSpacing=0 width="99%">
          <TR> 
            <TD 
          background="images/T_back.gif" 
          width="18%"><IMG src="images/T_1.gif" width=90 height=24 border="0"></TD>
            <TD 
          background="images/T_back.gif" 
          width="77%">　<font color="#993300">作 者 加 盟 - 填 写 资 料</font></TD>
            <TD width="5%"><IMG height=24 src="images/T_2.gif" width=29></TD>
          </TR>
        </TABLE>
        <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#FFFFFF"> 
            <td width="122" height="25" align="center">帐　　号：</td>
            <td width="378" height="25"> 
              <input name="username" type="text" class="input" id="username" size="30">
              *</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">密　　码：</td>
            <td height="25"> 
              <input name="password" type="password" class="input" id="password" size="30">
              *</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">确认密码：</td>
            <td height="25"> 
              <input name="repassword" type="password" class="input" id="repassword" size="30">
              *</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">性　　别：</td>
            <td height="25"> 
              <input name="sex" type="radio" value="男" checked>
              阳光男孩　 
              <input type="radio" name="sex" value="女">
              青春女孩 </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">电子邮件：</td>
            <td height="25"> 
              <input name="email" type="text" class="input" id="email" size="30">
              *</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">密码问题：</td>
            <td height="25"> 
              <input name="question" type="text" class="input" id="question" size="30">
              *</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">密码答案：</td>
            <td height="25"> 
              <input name="answer" type="text" class="input" id="answer" size="30">
              *</td>
          </tr>
          <tr bgcolor="#FFFBFF"> 
            <td height="25" colspan="2" align="center">以下为可选项</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">Oicq：</td>
            <td height="25"> 
              <input name="oicq" type="text" class="input" id="oicq" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">Icq：</td>
            <td height="25"> 
              <input name="icq" type="text" class="input" id="icq" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">Msn：</td>
            <td height="25"> 
              <input name="msn" type="text" class="input" id="msn" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">个人主页：</td>
            <td height="25"> 
              <input name="homepage" type="text" class="input" id="homepage" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">联系电话：</td>
            <td height="25"> 
              <input name="tel" type="text" class="input" id="tel" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">邮政编码：</td>
            <td height="25"> 
              <input name="zipcode" type="text" class="input" id="zipcode" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">详细地址：</td>
            <td height="25"> 
              <input name="address" type="text" class="input" id="address" size="40"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">个人简介：</td>
            <td height="25"> 
              <textarea name="remark" cols="40" rows="10" class="input" id="remark"></textarea></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" colspan="2" align="center"> 
              <input name="Submit" type="submit" class="button" value=" 注 册 ">
              　 
              <input name="Submit2" type="reset" class="button" value=" 清 除 "></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
<%end if%>
<!--#include file="bottom.asp"-->
</DIV>
</BODY></HTML>
