<!--#include file="conn1.asp"-->
<!--#include file="session2.asp"-->
<%dim action
action=request.QueryString("action")
select case action
case "save"%>
<%

 if request.QueryString("action")="save" then
 
 
  set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from member where UserEmail='"&trim(request("UserEmail"))&"' or UserName='"&trim(request("username"))&"'",conn,1,1
if rs2.recordcount>0 then
	Response.Write "<script language=javascript>window.alert('您输入的用户名或e-mail地址已存在，请返回重新输入！');window.history.go(-1);</script>"
	response.End
end if



set rs=server.CreateObject("adodb.recordset")
rs.open "select * from member",conn,1,3
rs.addnew
rs("username")=trim(request("username"))

rs("Password")=trim(request("Password"))


rs("truename")=trim(request.form("truename"))
rs("touxiang")=trim(request.form("a"))
rs("leixing")=1
rs("UserEmail")=trim(request.form("UserEmail"))
rs("sex")=trim(request.form("sex"))
rs("contact")=trim(request.form("contact"))
rs("shouji")=trim(request.form("shouji"))
rs("qicq")=trim(request.form("qicq"))
rs("zhengxiang")=int(request.form("zhengxiang"))
rs("yanfeng")=int(request.form("yanfeng"))
rs("zhuhui")=int(request.form("zhuhui"))
rs("shigu")=int(request.form("shigu"))
rs("baisha")=int(request.form("baisha"))
rs("huaxin")=int(request.form("huaxin"))
rs("lixin")=int(request.form("lixin"))
rs.update
rs.close
set rs=nothing
session("content")=""
response.write "<script language=javascript>alert('添加成功！');window.location.href='jjren.asp';</script>"
response.End
end if
%>
<%case ""%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="skins/css/main.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function checkdata()
{





if (document.pic.username.value=="")
	{
	  alert("对不起，请输入登陆用户名！")
	  document.pic.username.focus()
	  return false
	 }

if (document.pic.password.value=="")
	{
	  alert("对不起，请输入登陆密码！")
	  document.pic.password.focus()
	  return false
	 }


if (document.pic.truename.value=="")
	{
	  alert("对不起，请输入经济人名字！")
	  document.pic.truename.focus()
	  return false
	 }


if (document.pic.a.value=="")
	{
	  alert("对不起，请上传照片！")
	  //document.pic.truename.focus()
	  return false
	 }



if (document.pic.UserEmail.value=="")
	{
	  alert("对不起，请输入电子邮箱！")
	  document.pic.UserEmail.focus()
	  return false
	 }


if (document.pic.shouji.value=="")
	{
	  alert("对不起，请输入手机号码！")
	  document.pic.shouji.focus()
	  return false
	 }
	 
	 
if (document.pic.qicq.value=="")
	{
	  alert("对不起，请输入QQ号码！")
	  document.pic.qicq.focus()
	  return false
	 }
	 
	 
	 

}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>




</head>
<body>
<form id="pic" name="pic"   method="post" action="addjjren.asp?action=save" onSubmit="return checkdata()" >
  <table cellpadding="3" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
    <tr> 
      <th class="td_title"  colspan=6 height=25>添加经济人</th>
    </tr>
	
	
	    <tr> 
      <td width="9%" class="td_content" align=right>用户名：</td>
      <td width="91%" class="td_content">
	  <input name="username" type="text" id="username" size="25">	</td>
    </tr>
	
	    <tr> 
      <td width="9%" class="td_content" align=right>密&nbsp;&nbsp;码：</td>
      <td width="91%" class="td_content">
	  <input name="password" type="text" id="password" size="25">	</td>
    </tr>
	
	
    <tr> 
      <td width="9%" class="td_content" align=right>经济人名字：</td>
      <td width="91%" class="td_content">
	  <input name="truename" type="text" id="truename" size="25">	</td>
    </tr>
	
	
	
	  
	    <tr>
          <td width="15%"  align="right" valign="middle" height="30" class="td_content" >照&nbsp;&nbsp;片：</td>
          <td width="85%" align="left" valign="middle" class="td_content"><table width="628" border="0" cellspacing="0" cellpadding="0">
<tr>
      <td width="72%" align="left"><IFRAME name=ad src="/up4.htm" frameBorder=0 width="100%" scrolling=no height=30></IFRAME></td>
      <td width="28%" align="left" ><INPUT type="hidden" id=a title=可直接输入网上图片的地址，或由上传程序自动产生图片地址 style="WIDTH: 200px" value="" name=a  size="20"><INPUT id=f type="hidden" title=可直接输入网上图片的地址，或由上传程序自动产生图片地址 style="WIDTH: 200px" value="" name=f size="20"><span id="tupian" class="BlackS12"></span>
        </td>
    </tr>
   </table></td>
        </tr>
	
	
	

	
	
  <tr> 
      <td  class="td_content"align=right>电子邮箱：</td>
      <td class="td_content"><input name="UserEmail" type="text" id="UserEmail" size="30">      </td>
    </tr>
		
	
	
    <tr> 
      <td  class="td_content"align=right>性别：</td>
      <td class="td_content"><input name="sex" type="radio" value="男"  />
    男
    <input name="sex" type="radio" value="女"  >
  女   <input name="sex" type="radio" value="未选择"   />
  未选择      </td>
    </tr>
	
	
	    <tr> 
      <td  class="td_content"align=right>手机：</td>
      <td class="td_content"><input name="shouji" type="text" id="shouji" size="30">      </td>
    </tr>
	
	    <tr> 
      <td  class="td_content"align=right>Q&nbsp;&nbsp;Q：</td>
      <td class="td_content"><input name="qicq" type="text" id="qicq" size="30">      </td>
    </tr>
	
	    <tr> 
      <td  class="td_content"align=right>管理区域：</td>
      <td class="td_content" ><select name="zhengxiang" id="zhengxiang">
                   <option value="" >选择</option>
			         <option value="1">蒸湘区管理</option>
					        <option value="0" > 蒸湘区不管理</option>
            </select>
			
			<select name="yanfeng" id="yanfeng">
                   <option value="" >选择</option>
			         <option value="1">雁峰区管理</option>
					        <option value="0"> 雁峰区不管理</option>
            </select>
			
			<select name="zhuhui" id="zhuhui">
			
                <option value="" >选择</option>
				
				
			         <option value="1">珠晖区管理</option>
<option value="0"> 珠晖区不管理</option>
            </select>
			
			<select name="shigu" id="shigu">
			      <option value="" >选择</option>
         <option value="1">石鼓区管理</option>
		 <option value="0" > 石鼓区不管理</option>
            </select>
			<br>
			<br>
		
			<select name="baisha" id="baisha">
			      <option value="" >选择</option>
             
			         <option value="1" >白沙洲管理</option>
					        <option value="0"> 白沙洲不管理</option>
            </select>
			<select name="huaxin" id="huaxin">
                   <option value="" >选择</option>
			         <option value="1">华新开发区管理</option>
					        <option value="0"> 华新开发区不管理</option>
            </select>
			<select name="lixin" id="lixin">
                   <option value="" selected="selected" >选择</option>
			         <option value="1" >立新开发区管理</option>
					        <option value="0"> 立新开发区不管理</option>
            </select>
          </label>      </td>
    </tr>
	
	
	

    <tr> 
      <td colspan="2" bgcolor="#EEF7FD"  align="center">
          <input class="button" type="submit" name="Submit" value="添加经济人"  style="width:80px; height:25px;">
        
      </td>
    </tr>
  </table>
</form>
<br>
<%end select%>
</body>
</html>
