<!--#include file="conn.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%= homename %></title>
<link href="../images/public.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<%
	id=Trim(Request("id"))
	action=Trim(Request("action"))
	
	if id="" then
		response.write"<SCRIPT language=JavaScript>alert('对不起，非法操作！');"
		response.write"javascript:window.close();</SCRIPT>"
		response.end
	end if
	
	if action="save" then
		qq=Trim(Request.Form("qq"))
		address=Trim(Request.Form("address"))
		if qq="" then qq="未填写"
		if address="" then address="未填写"
		set rs=server.createobject("adodb.recordset")
		sql="select * from jianzhi where id="&id&" order by id asc"
		rs.open sql,conn,2,3
		rs("lxname")=Trim(Request.Form("name"))
		rs("sex")=int(Trim(Request.Form("sex")))
		rs("tel")=Trim(Request.Form("contact"))
		rs("qq")=qq
		rs("address")=address
		rs("lasttime")=Trim(Request.Form("vdate"))
		rs("notice")=Trim(Request.Form("content"))
		rs("title")=Trim(Request.Form("title"))
		rs("ttype")=Trim(Request.Form("ttype"))
		rs("num")=1
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=JavaScript>" &  "alert('兼职信息修改成功');" & "window.close()" & "</script>"
		response.end
	end if
	
	set rs=server.createobject("adodb.recordset")
	sql="select * from jianzhi where id="&id&"" 
	rs.open sql,conn,2,3
	if rs.bof and rs.eof then
		response.write"<SCRIPT language=JavaScript>alert('对不起，非法操作！');"
		response.write"javascript:window.close();</SCRIPT>"
		response.end
	else
%>
    <form name="form1" method="post" action="?action=save&id=<%=id%>">
<table width="52%" height="341" border="0">
  <tr>
    <td align="center" valign="top">
	<table width="500" height="51" border="0" cellpadding="0" cellspacing="0">
      <tr>
   <td height="38" align="center" valign="middle" background="../images/jianzhi/jz_01.gif"><font color="#006CC6">详细信息</font></td>
      </tr>
    </table>
      <table width="500" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#5A9AD6">
        <tr>
          <td height="31" align="center" bgcolor="#D6F3FF">类型</td>
          <td height="31" align="left" bgcolor="#FFFFFF"><input type="radio" name="usertype" value="1" alt="radio" <% If rs("usertype")=1 Then Response.Write("checked")%>//>
            做兼职
            <input type="radio" name="usertype" value="0" <% If rs("usertype")=0 Then Response.Write("checked")%>/>
          请兼职 <font color="#FF0000">*</font></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">联系人</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><input name="name" type="text" value="<%=rs("lxname")%>" size="33"></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">性别</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><input type="radio" name="sex" value="1" <% If rs("sex")=1 Then Response.Write("checked")%> />
              男 
  <input type="radio" name="sex" value="0" <% If rs("sex")=0 Then Response.Write("checked")%> />
              女</td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">联系电话</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><input type="text" name="contact" value="<%=rs("tel")%>" size="33"></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">QQ/MSN</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><input type="text" name="qq" value="<%=rs("qq")%>" size="33"></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">联系地址</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><input type="text" name="address" value="<%=rs("address")%>" size="33"></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">信息有效期</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><select name="vdate">
                <option value="一个星期" <% If rs("lasttime")="一个星期" Then Response.Write("selected")%>>一个星期</option>
                <option value="半个月" <% If rs("lasttime")="半个月" Then Response.Write("selected")%>>半个月</option>
                <option value="一个月" <% If rs("lasttime")="一个月" Then Response.Write("selected")%>>一个月</option>
                <option value="三个月" <% If rs("lasttime")="三个月" Then Response.Write("selected")%>>三个月</option>
                <option value="六个月" <% If rs("lasttime")="六个月" Then Response.Write("selected")%>>六个月</option>
                <option value="永久有效" <% If rs("lasttime")="永久有效" Then Response.Write("selected")%>>永久有效</option>
                </select></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">标题</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><input type="text" name="title" value="<%=rs("title")%>" size="33"></td>
        </tr>
        <tr>
          <td height="20" align="center" bgcolor="#D6F3FF">内容</td>
          <td height="20" align="left" bgcolor="#FFFFFF"><textarea name="content" cols="32" rows="5" class="jz_text2" ><% = rs("notice") %></textarea></td>
        </tr>
      </table>
     <br><input type="submit" name="Submit" value="提交">&nbsp;&nbsp;&nbsp;&nbsp;
   <input type="reset" name="Submit2" value="重置">
   </td>
  </tr>
</table>
</form>
<%
	end if
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
</body>
</html>
