<!--#include file="conn.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="check.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	useflag=3
%>
<!--#include file="flag.asp"-->
<%
	Response.Expires = 0
	Response.Expiresabsolute = Now() - 1
	Response.AddHeader "pragma","no-cache"
	Response.AddHeader "cache-control","private"
	Response.CacheControl = "no-cache"

	Method=Trim(Request.QueryString("Method"))
	if Method="save" then
	password=Trim(Request.Form("password"))
	email=Trim(Request.Form("email"))
	address=Trim(Request.Form("address"))
	phone=Trim(Request.Form("phone"))
	lock1=Trim(Request.Form("lock"))
	cname=Trim(Request.Form("cname"))
	open1=Trim(Request.Form("open"))
	jianj=Trim(Request.Form("jianj"))
	jobnum=Trim(Request.Form("jobnum"))
	usercheck=Trim(Request.Form("usercheck"))
	changepay=Trim(Request.Form("changepay"))
	set rs=server.createobject("adodb.recordset")
	sql="select * from company where id="&Trim(Request.Form("AdminID"))
	rs.open sql,conn,2,3
	if password<>"" then rs("pwd")=mistake(password)
	rs("email")=email
	rs("address")=address
	rs("phone")=phone
	rs("lock")=lock1
	rs("cname")=cname
	rs("open")=open1
	rs("jianj")=jianj
	rs("usercheck")=usercheck
	rs("changepay")=changepay
	rs("jobnum")=jobnum
	rs.update
	rs.close
	set rs=nothing
	response.write"<SCRIPT language=JavaScript>alert('资料更新成功，系统将关闭页面!');"
	response.write"javascript:window.close();</SCRIPT>"
	response.end 
	end if

	set rs=server.createobject("adodb.recordset")
	sql="select * from company where id="&Trim(Request.QueryString("id"))
	rs.open sql,conn,1,1
	if rs.eof then
	response.Write "<div align=center><font size=12 color=red><b>没有该用户，请查询后再重试</b></font></div>"
	response.End
	else
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Include/ModeWindow.css" rel="stylesheet">
<title>用户资料修改</title>
<script language="JavaScript" src="Include/Common.js"></script>
<script language="JavaScript" type="text/javascript" src="../inc/keyfilter.js"></script>
<script language="JavaScript" src="Include/CheckPassWord.js"></script>
<style>
.cssPWD{
background-color:#EBEBEB;
border-right:solid 1px #BEBEBE;
border-bottom:solid 1px #BEBEBE;
}
.cssWeak{
background-color:#FF4545;
border-right:solid 1px #BB2B2B;
border-bottom:solid 1px #BB2B2B;
}
.cssMedium{
background-color:#FFD35E;
border-right:solid 1px #E9AE10;
border-bottom:solid 1px #E9AE10;
}
.cssStrong{
background-color:#3ABB1C;
border-right:solid 1px #267A12;
border-bottom:solid 1px #267A12;
}
.cssPWT{width:132px;}
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form action="?Method=save" name="AdminForm" method="post">
<input name="AdminID" type="hidden" value="<%= Trim(Request.QueryString("id")) %>">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><FIELDSET align=center><LEGEND align=left>修改资料</LEGEND>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="179" height="25" align="center"><div align="center">用户名</div></td>
<td width="542" height="25"><input name="uname" Readonly value="<%= rs("uname") %>" type="text" id="uname" size="30" class="textbox">
企业用户登陆的用户名称</td>
</tr>
<tr>
<td width="179" height="25" align="center"><div align="center">密　码</div></td>
<td width="542" height="25"><input name="password" value="" type="password" id="password" size="30" class="textbox">
  不修改请留空白</td>
</tr>
<% If changepay=1 Then %>
<tr>
<td width="179" height="25" align="center"><div align="center">金　钱</div></td>
<td width="542" height="25">M币：<%=rs("dian")%>
	  积分：<%=rs("fen")%>	  帐户余额：<%=rs("mmoney")%> 元</td>
</tr>
<% Else %>
<tr>
<td width="179" height="25" align="center"><div align="center">会员级别</div></td>
<td width="542" height="25"><% If rs("grade")=0 Then%><% Response.Write("初级用户") %><% End If %><% If rs("grade")=1 Then%><% Response.Write("中级用户") %><% End If %><% If rs("grade")=2 Then%><% Response.Write("高级用户") %><% End If %></td>
</tr>
<tr>
<td width="179" height="25" align="center"><div align="center">会 员 期</div></td>
<td width="542" height="25">开始时间：<%=rs("begintime")%>
	  到期时间：<%=rs("endtime")%>	  帐户余额：<%=rs("mmoney")%> 元</td>
</tr>
<% End If %>
<tr>
<td height="25" align="center">职位数量</td>
<td width="542" height="25"><input name="jobnum" value="<%=rs("jobnum")%>" type="text" id="jobnum" size="30" class="textbox" onKeyPress="keyFilter('1234567890')" style="IME-MODE: disabled"> 
      <font color="#ff0033">说明：企业能发布职位的数量</font></td>
</tr>
<tr>
<td height="25" align="center">企业状态</td>
<td height="25"><SELECT size=1 name=open>
          <OPTION value="2">请选择</OPTION>
          <OPTION value="1" <%if rs("open") =1 then Response.Write "selected"%>>已审核</OPTION>
          <OPTION value="2" <%if rs("open") =2 then Response.Write "selected"%>>未审核</OPTION>
      </SELECT> 
      <font color="#ff0033">说明：验证后才可以发布招聘</font></td>
</tr>
<tr>
<td height="25" align="center">风险评估</td>
<td height="25"><SELECT size=1 name="usercheck">
          <OPTION value="2">请选择</OPTION>
          <OPTION value="1" <%if rs("usercheck") =1 then Response.Write "selected"%>>通过</OPTION>
          <OPTION value="0" <%if rs("usercheck") =0 then Response.Write "selected"%>>未通过</OPTION>
      </SELECT> 
      <font color="#ff0033">说明：如果确认了企业的信用状态，请通过此企业的风险评估</font></td>
</tr>
<tr>
<td height="25" align="center">公司名称</td>
<td height="25"><input type="text" name="cname" size="30" value="<%=rs("cname")%>" class="textbox"></td>
</tr>
<tr>
<td height="25" align="center">电子邮件</td>
<td height="25"><input name="email" type="text" class="textbox" value="<%= rs("email") %>" id="email" size="30"></td>
</tr>
<tr>
<td height="25" align="center">地　　址</td>
<td height="25"><input name="address" type="text" class="textbox" value="<%= rs("address") %>" id="address" size="30"></td>
</tr>
<tr>
<td height="25" align="center">电　　话</td>
<td height="25"><input name="phone" type="text" class="textbox" value="<%= rs("phone") %>" id="phone" size="30"></td>
</tr>
<tr>
<td height="25" align="center">状　　态</td>
<td height="25">
  <input name="lock" type="radio" value="1" <% if rs("lock")=1 then %>checked <% end if %>>
锁定
  <input type="radio" name="lock" value="0" <% if rs("lock")=0 then %>checked<% end if %>>
正常
<font color="#FF0000">锁定的用户不能登录后台管理</font></td>
</tr>
<tr>
<td height="25" align="center">用户收费方式</td>
<td height="25">
  <input name="changepay" type="radio" value="0" <% if rs("changepay")=0 then %>checked <% end if %>>
M币与积分
  <input type="radio" name="changepay" value="1" <% if rs("changepay")=1 then %>checked<% end if %>>
级别与时间
<font color="#FF0000">用户在前台操作的收费方式</font></td>
</tr>
<tr>
<td height="25" align="center">上次登陆IP</td>
<td height="25"><% If rs("ip")&"a"="a" Then Response.Write("未登陆") else Response.Write(rs("ip"))%></td>
</tr>
<tr>
<td height="25" align="center">上次登陆时间</td>
<td height="25"><%=rs("ltime")%></td>
</tr>
<tr>
<td height="25" align="center"><div align="center">备　　注</div></td>
<td height="25"><textarea class='textbox' name="jianj" rows="5" id="Description" style="width:80%;border-style: solid; border-width: 1"><% if rs("jianj")&"a"="a" then Response.Write("暂无资料") else Response.Write(rs("jianj"))%></textarea></td>
</tr>
</table>
</FIELDSET>
</td>
</tr>
</table>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" align="center"><input type="button" class='textbox' name="Submit" Onclick="CheckForm()" value=" 确 定 ">
<input type="button" class='textbox' name="Submit2" onClick="window.close()" value=" 取 消 "></td>
</tr>
</table>
</form>
</body>
</html>
<%
	End If
	rs.close
	set rs=nothing
%>
<Script Language="javascript">
<!--
function CheckForm()
{ var form=document.AdminForm;
   if (form.uname.value=='')
    {     alert("请输入用户名!");     form.uname.focus();     return false;
    }
   if (form.address.value=='')
    {
     alert("请输入地址");
     form.address.focus();
     return false;
    }
   if (form.email.value!='')
   if(is_email(form.email.value)==false)
      { alert('非法电子邮箱!');
        form.email.focus();
        return false;
     }    form.submit();
    return true;
}
//-->
</Script>