<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<!--#include file="../manage/makehtml/index/temp_inc.asp"-->
<title><%=webname%>个人求职</title>
<LINK href="../js/style_full.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript1.2 src="../js/DateSelect.js" 
type=text/javascript></SCRIPT>
<script>
function checkJobwill()
{
	if(document.jobwill.workdatefrom.value=="")
	{
		alert("您忘记填写工作开始时间了。");
		document.jobwill.workdatefrom.focus();
		return false;
	}
	if(document.jobwill.workdateto.value=="")
	{
		alert("您忘记填写工作结束时间了。");
		document.jobwill.workdateto.focus();
		return false;
	}
	if(document.jobwill.corp.value=="")
	{
		alert("您忘记填写所在公司了。");
		document.jobwill.corp.focus();
		return false;
	}
	if(document.jobwill.dept.value=="")
	{
		alert("您忘记填写所在部门了。");
		document.jobwill.dept.focus();
		return false;
	}
	if(document.jobwill.jobpost.value=="")
	{
		alert("您忘记填写担任职位了。");
		document.jobwill.jobpost.focus();
		return false;
	}
	if(document.jobwill.jobdesc.value=="")
	{
		alert("您忘记填写工作描述了。");
		document.jobwill.jobdesc.focus();
		return false;
	}
	if(document.jobwill.jobdesc.value.length>500)
	{
		alert("相关描述至多只能录入500字。");
		document.jobwill.jobdesc.focus();
		return false;
	}
return true
}
</script>
  <style type="text/css">
  .bgc{ 
	filter:	progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr=#FFFFFF, EndColorStr=#E6E6E6);
 }
  .STYLE1 {color: #0099CC}
  /*列表*/
.tabls{width:100%; margin-top:5px; border-bottom:1px solid #ddd;border-right:1px solid #ddd;}
.tabls .tabls_head{text-align:center;}
.tabls .tabls_head td{border-top:1px solid #ddd; padding:5px 0px; background-color:#F8F8F8; font-weight:bold;}
.tabls .tabls_tr_1{background-color:#f6f6f6;}
.tabls .tabls_tr_1 td,.tabls .tabls_tr_2 td{padding:5px;}
.tabls td{border-left:1px solid #ddd;border-top:1px solid #ddd;}
.tabls  td td{border:none; padding:0px; }
.tabls_1{border:1px #ddd solid;}

/*表格*/
.tab1{border-left:1px solid #dddddd; border-top:1px solid #dddddd;}
.tab1 td,.tab1 th{border-right:1px solid #dddddd; border-bottom:1px solid #dddddd; padding:3px 10px;}
.tab1 th{font-size:14px; background-color:#F6F6F6; text-align:right; color:#5A5A5A; }
.tab1 td{ background-color:#F4FBFF;}
/**/
  </style>
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<body>
<%
'------------------------------------
  if isSession=0 then
 	  if Replace_Text(Request.Cookies("jobuser"))=""  or Replace_Text(Request.Cookies("jobuserid"))="" then
	   response.Redirect(HOPE_InstallDir&"job/")
	  end if
	  jobid=Replace_Text(Request.Cookies("jobuserid"))
	  else
	  if session("jobid")="" or  session("jobuser")="" then
	   response.Redirect(HOPE_InstallDir&"job/")
	  end if  
	  jobid=session("jobid")
  end if
 action=Replace_Text(Request("action"))
 select case action
 	case "add" :
		call add()
	case "edit" :
		call edit()
	case "del" :
		call del()
 end select
 '添加工作经验
 sub add()
 set rs=server.createobject("adodb.recordset")
 rs.open "select * from YiXiang_Subject",conn,1,3
 rs.addnew
 rs("projectname")=Replace_Text(Request("projectname"))
 rs("projectpart")=Replace_Text(Request("projectpart"))
 rs("projecttime")=Replace_Text(Request("projecttime"))
 rs("projectdesc")=Replace_Text(Request("projectdesc"))
 rs("userid")=Replace_Text(Request("userid"))
 rs("dateandtime")=date()
 rs.update
 rs.close
 set rs=nothing
 response.write("<script>alert('添加主要作品成功');location='PersonSubjectexp.asp';</script>")
 response.end()
 end sub
 '修改工作经验
 sub edit()
 info_id=Replace_Text(Request("info_id"))
	 if info_id<>"" then
		 set rs=server.createobject("adodb.recordset")
		 rs.open "select * from YiXiang_Subject where info_id="&info_id,conn,1,3
		 rs("projectname")=Replace_Text(Request("projectname"))
		 rs("projectpart")=Replace_Text(Request("projectpart"))
		 rs("projecttime")=Replace_Text(Request("projecttime"))
		 rs("projectdesc")=Replace_Text(Request("projectdesc"))
		 rs("dateandtime")=date()
		 rs.update
		 rs.close
		 set rs=nothing
	 end if
	response.write("<script>alert('修改主要作品成功');location='PersonSubjectexp.asp';</script>")
	response.end()
 end sub
 '删除工作经验
 sub del()
 	joblistid=Replace_Text(Request("joblistid"))
 	conn.execute("delete from YiXiang_Subject where info_id in ("&joblistid&")")
	response.write("<script>alert('删除主要作品成功');location='PersonSubjectexp.asp';</script>")
	response.end()
 end sub
%>
<!--#include file="person_top.asp"-->
<table width="988" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:5px;">
  <tr>
    <td valign="top"><!--#include file="person.asp"--></td>
    <td width="264" rowspan="2" valign="top">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="jobTable_top">
  <tr>
    <td width="23" height="29"><img src="../images/ico.gif" style="padding-left:5px;" /></td>
    <td width="239"><font class="title">招聘职位类别</font></td>
  </tr>
  <tr>
    <td colspan="2"><%=HOPE_JobKind(1,1,4,14)%></td>
  </tr>
</table>	</td>
  </tr>
  <tr>
    <td valign="top">
<%
info_id=Replace_Text(Request("info_id"))
if info_id<>"" then
set GetRs=conn.execute("select * from YiXiang_Subject where info_id="&info_id&" and userid="&jobid)
if not GetRs.eof then
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="jobTable_top">
      <tr>
        <td width="25" height="29"><img src="../images/ico.gif" style="padding-left:5px;" /></td>
        <td width="699"><font class="title">修改主要作品</font></td>
      </tr>
      <tr>
        <td colspan="2" align="center">
<FORM id=jobwill name=jobwill onSubmit="return checkJobwill();" action="?action=edit" method=post>
        <table width="593" border="0" cellpadding="3" cellspacing="0" style="margin:0 auto;">
            <tr>
              <td align="right"><span class="fontred">*</span> 项目名称：</td>
              <td align="left"><input name="projectname" type="text" class="input1" id="projectname" style="width:300px;" value="<%=GetRs("projectname")%>" maxlength="50" />
                <input name="info_id" type="hidden" id="info_id" value="<%=GetRs("info_id")%>" /></td>
            </tr>
            <tr>
              <td align="right"><span class="fontred">*</span> 责任范围：</td>
              <td align="left" ><input name="projectpart" type="text" class="input1" id="projectpart" style="width:300px;" value="<%=GetRs("projectpart")%>" maxlength="50" />              </td>
            </tr>
            <tr>
              <td align="right"><span class="fontred">*</span> 时间范围：</td>
              <td align="left"><input name="projecttime" type="text" class="input1" id="projecttime" style="width:300px;" value="<%=GetRs("projecttime")%>" maxlength="50" />
                (如：3个月) </td>
            </tr>
            <tr>
              <td align="right"><span class="fontred">*</span> 项目描述：</td>
              <td align="left"><textarea name="projectdesc" rows="2" cols="20" id="projectdesc" class="input1" style="height:100px;width:500px;"><%=GetRs("projectdesc")%></textarea>              </td>
            </tr>
          </table>
		<table height="42" border="0" cellpadding="3" cellspacing="0" style="margin:0 auto;">
          <tr>
            <td>
            <input type="submit" id="the_submit" class="button2" value="提 交" /></td>
            <td><input name="the_reset" type="reset" class="button2" value="重 填" /></td>
          </tr>
        </table> 
		</FORM>		</td>
      </tr>
    </table>	</td>
  </tr>
</table>
<%
else
	showmsg("你要查看的项目信息不存在或已删除")
end if
else
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="jobTable_top">
      <tr>
        <td width="25" height="29"><img src="../images/ico.gif" style="padding-left:5px;" /></td>
        <td width="699"><font class="title">设置主要作品</font></td>
      </tr>
      <tr>
        <td colspan="2" align="center">
<%
set userRs=conn.execute("select * from YiXiang_Subject where userid="&jobid)
if not userRs.eof then
	call UserWorkList()
else
	call showmsg("您还没有添加主要作品!")
end if
sub UserWorkList()
%>
<form id="form1" name="form1" method="post" action="?action=del">
<table width="98%" border="0" cellpadding="0" cellspacing="0"  class="tabls" id="tabls">
        <tr class="tabls_head">
                    <td width="42">选项</td>
                    <td width="56" ><strong>编号</strong></td>
                    <td width="485" ><strong>项目名称</strong></td>
                              <td width="183" ><strong>责任范围</strong></td>
                    
         
          <td width="165" align="center"><strong>时间范围</strong></td>
              <td width="45" align="center"><strong>编辑</strong></td>
<%
i=1
do while not userRs.eof
%>
        </tr>
      	        <tr class="tabls_tr_2">
                    <td align="center"><input name="joblistid" type="checkbox" id="joblistid" value="<%=userRs("info_id")%>" /></td>
                    <td align="center"><%=i%></td>
          			<td align="center"><%=userRs("projectname")%></td>
                  <td align="center"><%=userRs("projectpart")%></td>
          
                  <td align="center"><%=userRs("projecttime")%></td>        
                  <td align="center"><a style="text-decoration: none" href="PersonSubjectexp.asp?info_id=<%=userRs("info_id")%>">编辑</a></td>
   	          </tr>
<%
i=i+1
userRs.movenext
loop
userRs.close
set userRs=nothing
%>
      	        <tr class="tabls_tr_2">
      	          <td colspan="6" align="center">
      	            <input type="submit" name="Submit" value="删除所选内容" />      	          </td>
   	          </tr>
</table>
</form>
<%
end sub
%>
<hr size="0" noshade="noshade" />
		<FORM id=jobwill name=jobwill onSubmit="return checkJobwill();" action="?action=add" method=post>
		  <table width="593" border="0" cellpadding="3" cellspacing="0" style="margin:0 auto;">
            <tr>
              <td align="right"><span class="fontred">*</span> 项目名称：</td>
              <td align="left"><input name="projectname" type="text" maxlength="50" id="projectname" class="input1" style="width:300px;" />
                <input name="userid" type="hidden" id="userid" value="<%=jobid%>" /></td>
            </tr>
            <tr>
              <td align="right"><span class="fontred">*</span> 责任范围：</td>
              <td align="left" ><input name="projectpart" type="text" maxlength="50" id="projectpart" class="input1" style="width:300px;" />
              </td>
            </tr>
            <tr>
              <td align="right"><span class="fontred">*</span> 时间范围：</td>
              <td align="left"><input name="projecttime" type="text" maxlength="50" id="projecttime" class="input1" style="width:300px;" />
                (如：3个月) </td>
            </tr>
            <tr>
              <td align="right"><span class="fontred">*</span> 项目描述：</td>
              <td align="left"><textarea name="projectdesc" rows="2" cols="20" id="projectdesc" class="input1" style="height:100px;width:500px;"></textarea>
              </td>
            </tr>
          </table>
		  <table height="42" border="0" cellpadding="3" cellspacing="0" style="margin:0 auto;">
          <tr>
            <td>
            <input type="submit" id="the_submit" class="button2" value="提 交" /></td>
            <td><input name="the_reset" type="reset" class="button2" value="重 填" /></td>
          </tr>
        </table> 
		</FORM>
		</td>
      </tr>
    </table>
<%
end if
sub showmsg(msgtitle)
response.write "<table width=""98%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" style=""border:1px solid #DDDDDD;margin-top:5px;"">"
response.write "  <tr>"
response.write "    <td height=""77"" align=""center""><font style=""color:#FF6F02;font-size:15px;font-weight:bold;"">"&msgtitle&"</font></td>"
response.write "  </tr>"
response.write "</table>"
end sub
%>
</td>
  </tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>