<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<!--#include file="../inc/CommonFunction.asp"-->
<%SQLin
link="company_service.asp"%>
<!--#include file="checkcmember.asp" -->
<!--#include file="flagandexpend.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>服务申请--<%=SiteTitle%></title>
<script src="../js/main.js" language="javascript"></script>
<script type="text/javascript" src="../js/input.js"></script>
<link href="../member/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="memmenul">
<%step=trim(request("step"))
Select Case step
	Case "apply"
		Call apply()
	Case Else
		Call main()
End Select%>
<%Sub main()%>
<div class="leftmenutit"><span>服务申请</span></div>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="mtable" >
  <tr>
    <td colspan="8" class="tdcolor">请您从以下列表中选择您需要的招聘服务。申请选中的服务后，<%=sitename%>的客户服务人员会尽快与您联系。</td>
    </tr>
  <tr>
    <td width="16%" align="center"><strong>产品</strong></td>
    <td width="12%" align="center"><strong>可发布职位数</strong></td>
    <td width="12%" align="center"><strong>可下载简历数</strong></td>
    <td width="12%" align="center"><strong>面试邀请数</strong></td>
    <td width="12%" align="center"><strong>人才库容量</strong></td>
    <td width="12%" align="center"><strong>可发送短信数</strong></td>
    <td width="12%" align="center"><strong>服务期限</strong></td>
    <td width="12%" align="center"><strong>服务费用</strong></td>
  </tr>
<form action="company_service.asp?step=apply" method="post">
<%set rs=server.createobject("ADODB.Recordset")
sql="select * from JOB_Group where Group_membertype=2 order by Group_id"
rs.open sql,conn,1,1
if not rs.eof then%>
<%
i=0
do while not rs.eof
i=i+1
Group_Climits=split(rs("Group_Climit"),",")
%>
  <tr>
    <td align="center"><input type="radio" name="Groupid" value="<%=rs("Group_id")%>" <%if rs("Group_id")=Cmgroupid then Response.Write("disabled")%> /><%=rs("Group_name")%></td>
    <td align="center"><input type="hidden" name="Groupname<%=rs("Group_id")%>" value="<%=rs("Group_name")%>" />
	<%if Group_Climits(0)=1 then%><%if Group_Climits(1)=0 then%>无限制<%else%><%=Group_Climits(1)%><%end if%><%else%>0<%end if%></td>
    <td align="center">
	<%if Group_Climits(8)=1 then%><%if Group_Climits(9)=0 then%>无限制<%else%><%=Group_Climits(9)%><%end if%><%else%>0<%end if%></td>
    <td align="center">
	<%if Group_Climits(4)=1 then%><%if Group_Climits(5)=0 then%>无限制<%else%><%=Group_Climits(5)%><%end if%><%else%>0<%end if%></td>
    <td align="center">
	<%if Group_Climits(2)=1 then%><%if Group_Climits(3)=0 then%>无限制<%else%><%=Group_Climits(3)%><%end if%><%else%>0<%end if%></td>
    <td align="center">
	<%if Group_Climits(12)=1 then%><%if Group_Climits(13)=0 then%>无限制<%else%><%=Group_Climits(13)%><%end if%><%else%>0<%end if%></td>
    <td align="center"><%=rs("Group_term")%><%=rs("Group_unit")%></td>
    <td align="center"><%=rs("Group_outlay")%>元</td>
  </tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
  <tr>
    <td colspan="8" class="tdcolor">您可以将具体的要求填写在这里，我们的客服将和您联系确认。</td>
    </tr>
  <tr>
  	<td></td>
    <td colspan="7"><textarea name="content" cols="60" rows="8"></textarea></td>
    </tr>
  <tr>
    <td colspan="8"> &nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;      &nbsp;          &nbsp;        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input name="Submit" type="submit" class="inputs" value="提交申请"></td>
    </tr>
</form>
</table>
<%End Sub%>
</div>
<%CloseConn%>
<%Sub apply()
content=CheckStr(trim(request("content")))
 if content="" then
  Response.Write ("<script language=JavaScript>{alert('错误：请填写申请内容!');location.href = 'javascript:history.go(-1)';}</script>")
  Response.End
 end if
Groupid=request("Groupid")
 If Groupid="" Then
  Response.Write ("<script language=JavaScript>{alert('错误：请选择服务项目!');location.href = 'javascript:history.go(-1)';}</script>")
  Response.End
 End If
Groupname=request("Groupname"&Groupid&"")
'生成合同随机码
randomize timer
regjm=left(int(rnd*9998)+1000,4)
if len(regjm)>4 then regjm=len(regjm&9999,4)
pactnum=FormatDate(now(),7)&regjm
set rs=Server.CreateObject(FR_HR_RS)
	sql="select * from JOB_orderservice"
	rs.open sql,conn,1,3
	rs.AddNew
	rs("Order_groupid")=Groupid
	rs("Order_groupname")=Groupname
	rs("Order_content")=content
	rs("Order_member")=cmember_login
	rs("Order_datetime")=now()
	rs("Order_pactnum")=pactnum
	rs("Order_result")=0
	rs.update
	rs.close
	set rs=nothing
	Response.Write ("<script language=JavaScript>{alert('提交申请成功!');location.href = 'company_service.asp';}</script>")
	response.End()
End Sub%>