<!--#include file="../Include/Head.asp"-->
<script src="<%=web_root%>/Common/Laydate/laydate.js"></script>

<%call getValidform("jobsform",1,0,1)%>
<%'call Ueditor("Content")%>
<%Call Kindeditormini("editor","Content","Article",1)%>
<%Call Kindeditormini("editor","Descriptions","Article",1)%>
<%Call KindeditorPic("editorPic","Article",1,"upload","Pic")%>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    <li><a href="#">发布招聘</a></li>
    </ul>
    </div>
    
    
  	<div id="tab1" class="tabson">
    <%
	sysID=replace(trim(Request.QueryString("id")) ,"'","")
	Action=replace(trim(Request.QueryString("Action")) ,"'","")
	If action="edit" then
		Set Rs=server.createobject("adodb.recordSet")
		Sql="select * from Jin_Jobs where sysID="&sysID
		Rs.Open Sql,Conn,1,1
		Pid=Rs("Pid")
		Position=Rs("Position")
		Hiring=Rs("Hiring")
		Location=Rs("Location")
		Educational=Rs("Educational")
		Salary=Rs("Salary")
		EndDate=Rs("EndDate")
		Descriptions=Rs("Descriptions")
		Content=Rs("Content")
		Remark=Rs("Remark")
		Rs.close
		Set Rs=nothing
	End If
	%>
    <ul class="forminfo">
    <%If action="edit" then%>
    <form name="form1" class="jobsform" action="?Action=editgo&id=<%=sysID%>" method="post" onsubmit="checkSubmit()">
    <%else%>
    <form name="form1" class="jobsform" action="?Action=add" method="post">
    <%end if%>
        
        <li><label>职位名称<b>*</b></label><input name="Position" type="text" class="newinput450" value="<%=Position%>" datatype="*" nullmsg="职位名称不能为空！" />
        <i class="Validform_checktip"></i><i><a href="javascript:;" onClick="ShowMore('wzSet','symbol')"><font id="symbol">+</font> <font color="red">详细内容</font></a></i>
        </li>  
    
          
        <li>
        <label class="left">分类<b>*</b></label>  
        <div class="vocation">
		<%call getclass(Web_ModuleID,"Pid",Pid,"Jobs","s152")%>
        </div>
        </li>
	
	
		<div id="wzSet" style="display:none;">
	
        <li>
        <label>招聘人数<b></b></label><input name="Hiring" type="text" class="newinput450" value="<%=Hiring%>" />
        </li>
        
        <li>
        <label>工作地点<b></b></label><input name="Location" type="text" class="newinput450" value="<%=Location%>" />
        </li>
        
        <li>
        <label>学历要求<b></b></label><input name="Educational" type="text" class="newinput450" value="<%=Educational%>" />
        </li>
        
        <li>
        <label>薪资待遇<b></b></label><input name="Salary" type="text" class="newinput450" value="<%=Salary%>" />
        </li>
		
		</div>
        
        <li>
        <label>截止日期<b>*</b></label><input name="EndDate" id="EndDate" type="text" class="newinput450" value="<%=EndDate%>" datatype="*" nullmsg="截止日期不能为空！"/><i>日期格式:2015-01-01</i>
        </li>
        
        <li>
        <label class="left">职位描述<b>*</b></label><textarea name="Descriptions" id="Descriptions" cols="" rows="" class="textinput" style="width:700px;height:200px; float:none"><%=Descriptions%></textarea>
        </li>
        
        <li><label class="left">职位要求<b>*</b></label><textarea name="Content" id="Content" cols="" rows="" class="left" style="width:700px;height:200px;"  ><%=Content%></textarea>
        </li>
		
        <li><label>&nbsp;</label><input name="submit" type="submit" class="btn" id="send" value="<%If action="edit" then%>提交修改<%else%>确认添加<%end if%>"/>
        <input name="submit" type="button" class="btn" onClick="location.href='<%=session("ArticlePage")%>'"  value="返回列表"/>
        <span id="msgdemo" style="margin-left:30px;"></span>

        </li>
        
    </form>
    </ul>
    </div> 
    </div> 
	<style>
	.s152{z-index:1000 !important;}
    #Content{z-index:1 !important;}
    </style>
        
    <script type="text/javascript">
        //实例化编辑器
        var ue = UE.getEditor('Content');
    </script>
	<script>
	laydate({
		elem: '#EndDate',
		min: laydate.now(+1), //-1代表昨天，-2代表前天，以此类推
		max: laydate.now(+365) //+1代表明天，+2代表后天，以此类推
	});
	</script>

<%
'添加文章
If Action="add" then
	If request_Form("Hiring")="" or isnull(request_Form("Hiring")) or request_Form("Hiring")=0 THen Hiring="若干" Else Hiring=request_Form("Hiring")
	Set Rs=server.createobject("adodb.recordSet")
	Sql="select * from Jin_Jobs"
	Rs.open Sql,conn,1,3
	Rs.Addnew
	Rs("Pid")=request_Form("Pid")
	Rs("Position")=request_Form("Position")
	Rs("Hiring")=Hiring
	Rs("Location")=request_Form("Location")
	Rs("Educational")=request_Form("Educational")
	Rs("Salary")=request_Form("Salary")
	Rs("EndDate")=request_Form("EndDate")
	Rs("Descriptions")=request_Form("Descriptions")
	Rs("Content")=request_Form("Content")
	Rs("Addtime")=getDate(Now(),"Y-M-D H:M:S")
	Rs("Edittime")=getDate(Now(),"Y-M-D H:M:S")
	Rs.Update
	Rs.close
	Set Rs=nothing
	response.Redirect session("ListPage")	'返回列表页
End If
'修改文章
If Action="editgo" then
	Set Rs=server.createobject("adodb.recordSet")
	Sql="select * from Jin_Jobs where sysID="&request_QueryString("id")
	Rs.open Sql,conn,1,3
	Rs("Pid")=request_Form("Pid")
	Rs("Position")=request_Form("Position")
	Rs("Hiring")=request_Form("Hiring")
	Rs("Location")=request_Form("Location")
	Rs("Educational")=request_Form("Educational")
	Rs("Salary")=request_Form("Salary")
	Rs("EndDate")=request_Form("EndDate")
	Rs("Descriptions")=request_Form("Descriptions")
	Rs("Content")=request_Form("Content")
	Rs("Edittime")=getDate(Now(),"Y-M-D H:M:S")
	Rs.Update
	Rs.close
	Set Rs=nothing
	response.Redirect session("ListPage")	'返回列表页
End If
%>

<%Call BackFoot()%>