<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<!--#include file="../c_Public/Intro_Cookies.asp" -->
<% 
'地区分站参数
Dim c_City,c_Name
If Session("c_City") = "" Then 
 Response.Redirect "../Index.asp"
 Response.End()
End if
c_City = Session("c_City")
c_Name = Session("c_Name")

Dim Corid,Username,Tmp
Dim Cmd,Rs,Action
Dim PhoneKeep,EmailKeep,PublishCount,Publish_Flag,EndDate

Action = Request.QueryString("action")
If Action = "edit" Then Call Edit_Submit() '//调用保存数据的函数

'//获取会员登陆的标记
Username  = Session("Intro")(0)
Corid     = Session("Intro")(2)

'//调用存储过程
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Inr_Account"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Corid",200,1,30)
Cmd.Parameters("@Corid") = Corid
Set Rs = Cmd.Execute
If Rs.Eof Then
 Rs.Close
 Set Cmd = Nothing
 CloseDB
 Response.write "没有找到会员资料！"
 Response.End()
End if

Tmp = Rs.GetRows() '//将数据填充到数组
'//关闭数据库对象
Rs.Close
Set Cmd = Nothing
'//功能代码
CorpName	   = Tmp(0,0)

'判断会员是否通过审核
Flag		   = Tmp(1,0)
If Flag = False Then 
 Response.redirect "../Public/Error.asp?Param=2003"
 Response.End()
End if
'//判断该会员能否发布信息
Set Rs = Conn.Execute("Select p_Job From [pH_Intro_Purview] Where Ncid=1")
p_Job = Rs(0)
Rs.Close
If Session("Nc_Vip") <> 1 And p_Job = False Then 
 Response.redirect "../Public/Error.asp?param=2001"
End if

 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName&" | "&c_Name&"站" %> -- 中介用户管理中心 -- 发布职位</title>
</head>
<script language="JavaScript" src="../js/intro_jobpublish.js"></script>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#FFFFFF">
      <!--#include file="../c_Header/Intro_User.asp" -->
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
          <td height="4"></td>
        </tr>
        <tr> 
          <td height="1" bgcolor="#eeeeee"></td>
        </tr>
      </table>
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
          <td width="175" valign="top"><!--#include file="../Lefter/Intro_All.asp" --></td>
          <td width="5">&nbsp;</td>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25"><img src="../Images/icon.gif" width="11" height="11" align="absmiddle"> 
                  尊敬的<%= Cls_WebName %>用户：<font color=#ff0000><%= CorpName %></font>，欢迎您进入中介管理中心</td>
              </tr>
            </table>
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <form action="?action=edit" name="reg" method="post" onSubmit="return reg_check()">
                <tr> 
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="dddddd">
                      <tr> 
                        <td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                            <tr> 
                              <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;发布招聘职位</font></b></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1">
                            <tr bgcolor="f9f9f9"> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 单位名称：</td>
                              <td height="25"> 
                                <input name="com_name" type="text" id="com_name" size="30" maxlength="50">
                                <font color="#666666">(请输入招聘单位的名称</font>)</td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 单位性质：</td>
                              <td height="25"> 
                                <select name="com_property" id="com_property" style="width:120px;">
							      <option value="">-请选择-</option>
                                  <option value="1">国有企业</option>
                                  <option value="2">外资企业</option>
                                  <option value="3">合资企业</option>
                                  <option value="4">私营企业</option>
                                  <option value="5">民营企业</option>
                                  <option value="6">股份制企业</option>
                                  <option value="7">集体企业</option>
                                  <option value="8">集体事业</option>
                                  <option value="9">乡镇企业</option>
                                  <option value="10">行政机关</option>
                                  <option value="11">社会团体</option>
                                  <option value="12">事业单位</option>
                                  <option value="13">跨国企业</option>
                                  <option value="14">其他</option>
                                </select>
                                <font color="#666666">(请选择单位的性质</font>) </td>
                            </tr>
                            <tr bgcolor="f9f9f9"> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 职位名称：</td>
                              <td height="25"> 
                                <input name="jobname" type="text" id="jobname" size="30" maxlength="50">
                                <font color="#666666">(请输入招聘职位的名称</font>)</td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td height="25" align="right">招聘人数：</td>
                              <td height="25"> 
                                <input name="number" type="text" id="number" value="0" size="4" maxlength="6">
                                人 <font color="#666666">(默认为0,表示若干人</font>)</td>
                            </tr>
                            <tr bgcolor="f9f9f9"> 
                              <td height="25" align="right">有效期：</td>
                              <td height="25"> 
                                <select name="valids" id="valids">
                                  <option value="3">3天</option>
                                  <option value="7">一周</option>
                                  <option value="14">两周</option>
                                  <option value="30" selected>一个月</option>
                                  <option value="60">两个月</option>
                                  <option value="90">三个月</option>
                                  <option value="180">半年</option>
                                  <option value="365">一年</option>
                                  <option value="0">长期有效</option>
                                </SELECT>
							  </td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td height="25" align="right">单位介绍：</td>
                              <td height="25"> 
                                <textarea name="com_memo" cols="45" rows="5" id="com_memo"></textarea></td>
                            </tr>
                            <tr bgcolor="f9f9f9"> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 具体要求：</td>
                              <td height="25"> 
                                <textarea name="require" cols="45" rows="5" id="require"></textarea> 
                              </td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td height="25" align="right">薪资待遇：</td>
                              <td height="25"> 
                                <input name="deal" type="text" id="deal" size="20" maxlength="25">
                                <font color="#666666">(请输入职位的待遇,默认为面议</font>)</td>
                            </tr>
                            <tr bgcolor="f9f9f9"> 
                              <td height="25" align="right">吃住说明：</td>
                              <td height="25"> 
                                <input name="life" type="text" id="life" size="20" maxlength="25">
                                <font color="#666666">(请职位的吃住方面的备注</font>)</td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td height="25" align="right">其他说明：</td>
                              <td height="25"> 
                                <input name="other" type="text" id="jobname23" size="30" maxlength="50"> 
                              </td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td height="40" align="center"><input type="submit" name="submit" value=" 确 认 发 布 " style="height:30px;"> 
                  </td>
                </tr>
              </form>
            </table></td>
        </tr>
      </table> 
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="1" bgcolor="#eeeeee"></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" bgcolor="#FFFFFF">
      <!--#include file="../c_Include/Footer.asp" -->
    </td>
  </tr>
</table>
</body>
</html>
<% 
Sub Edit_Submit()

 Corid     = Session("Intro")(2)
 'Corid,Com_Property,Com_Name,JobName,Valids,Number,Com_Memo,Require,Deal,Life,Other
 Com_Property		= Replace_Text(Request.Form("Com_Property"))
 Com_Name			= Replace_Text(Request.Form("Com_Name"))
 JobName			= Replace_Text(Request.Form("JobName"))
 Valids				= Replace_Text(Request.Form("Valids"))
 Number				= Replace_Text(Request.Form("Number"))
 Com_Memo			= Replace_Text(Request.Form("Com_Memo"))
 Require			= Replace_Text(Request.Form("Require"))
 Deal				= Replace_Text(Request.Form("Deal"))
 Life				= Replace_Text(Request.Form("Life"))
 Other				= Replace_Text(Request.Form("Other"))
  
 If Com_Memo <> "" Then Com_Memo = Replace(Com_Memo,chr(13),"<br>")
 If Require <> "" Then Require = Replace(Require,chr(13),"<br>")
 
 If Session("Nc_Vip") = 1 Then
  Flag = 1
 Else
  Flag = 0
 End if
 
 SQL = "Insert Into [pH_Intro_Job] (Corid,Com_Property,Com_Name,JobName,Valids,Number,Com_Memo,Require,Deal,Life,Other,Flag,AddDate) Values ('"&Corid&"',"&Com_Property&",'"&Com_Name&"','"&JobName&"',"&Valids&","&Number&",'"&Com_Memo&"','"&Require&"','"&Deal&"','"&Life&"','"&Other&"',"&Flag&",Getdate())"
 Conn.Execute(SQL)
 
 '更新资料
 SQL = "Update [pH_Intro_Base] Set LastUpdate_Time=getdate() Where Corid='"&Corid&"'"
 Conn.Execute(SQL)
 
 Response.write "<script>alert('您的职位已发布成功!');location.href='Cor_Job_Manage.asp';</script>"
 Response.End()
End Sub


'//关闭数据库连接
CloseDB
 %>
