<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<% 
Dim SQL,Rs,i,CompanyName,Comid
Dim RealName,Phone,UserEmail,Address,Locus_Area,Locus_City,ZipCode

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

 RealName = ""
 Phone = ""
 UserEmail = ""
 Address = ""
 Locus_Area = ""
 Locus_City = ""
 ZipCode = ""
 CompanyFax = ""
'判断会员是否登陆
If IsArray(Session("Person")) Then '个人会员
 Type1 = "Person"
 Userid = Session("Person")(2)
 SQL = "Select RealName,PersonPhone,UserEmail,Address,Locus_Area,Locus_City,ZipCode From [pH_Person_Info] As i Inner Join [pH_Person_Base] As b On i.Perid=b.Perid Where i.Perid='"&Userid&"'"
 Set Rs = Conn.Execute(SQL)
 If Not Rs.eof Then
  RealName = Rs("RealName")
  Phone = Rs("PersonPhone")
  UserEmail = Rs("UserEmail")
  Address = Rs("Address")
  Locus_Area = Rs("Locus_Area")
  Locus_City = Rs("Locus_City")
  ZipCode = Rs("ZipCode")
 End if
 Rs.Close
Elseif IsArray(Session("Company")) Then '企业会员
 Type1 = "Company"
 Userid = Session("Company")(2)
 
 SQL = "Select ContactPerson,Phone,Email,Address,Locus_Area,Locus_City,ZipCode,CompanyFax From [pH_Company_Base] Where Comid='"&Userid&"'"
 Set Rs = Conn.Execute(SQL)
 If Not Rs.eof Then
  RealName = Rs("ContactPerson")
  Phone = Rs("Phone")
  UserEmail = Rs("Email")
  Address = Rs("Address")
  Locus_Area = Rs("Locus_Area")
  Locus_City = Rs("Locus_City")
  ZipCode = Rs("ZipCode")
  CompanyFax = Rs("CompanyFax")
 End if
 Rs.Close

Else
 Response.Redirect "../Public/MemberLogin.asp?Prevurl=../Educate/Demand_Add.asp"
 Response.End()
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 %> -- 发布培训需求</title>
</head>
<script language="JavaScript" src="../js/jsdate.js"></script>
<script language="JavaScript" src="../js/Educate_demandadd.js"></script>
<script language="JavaScript">
 function login_check()
 {

 if (document.login.username.value==""){
  alert("-请输入用户名-");
  document.login.username.focus();
  return false;
 }
  if (document.login.password.value==""){
  alert("-请输入登陆密码-");
  document.login.password.focus();
  return false;
 }
 }
 function search_check(){
 if (document.theForm.key.value=="请输入高校/培训机构名称"){
  alert("-请输入高校/培训机构名称-");
  document.theForm.key.focus();
  return false;
 }
 }
</script>

<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><!--#include file="../Header/Educate_Index.asp" --></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
	<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="4"></td>
        </tr>
      </table>
	  <table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="180" valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25" align="left" valign="bottom" background="../Images/Educate/left10_bg.jpg" style="padding-left:10px;"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="65" height="20" align="center" valign="bottom" bgcolor="#FFFFFF"><strong>会员登录</strong></td>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td style="BORDER-RIGHT: #418D8B 1px solid; BORDER-LEFT: #418D8B 1px solid;BORDER-bottom: #418D8B 1px solid;padding-top:2px;padding-bottom:2px;"> 
                  <!--#include file="../Public/Educate_MemberSession.asp" -->
                </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25" align="left" valign="bottom" background="../Images/Educate/left10_bg.jpg" style="padding-left:10px;"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="65" height="20" align="center" valign="bottom" bgcolor="#FFFFFF"><strong>需求搜索</strong></td>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td style="BORDER-RIGHT: #418D8B 1px solid; BORDER-LEFT: #418D8B 1px solid;BORDER-bottom: #418D8B 1px solid;padding-top:2px;padding-bottom:2px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <form action="../Educate/Demand_Search.asp" method="post" target="_blank" name="theForm">
                      <tr> 
                        <td height="5" align="center"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="center"> <SELECT name=properity class=txtfield id="properity" style="width:140px;">
                            <OPTION value=""  selected>--选择需求领域--</OPTION>
                            <OPTION value="企业内训">企业内训</OPTION>
                            <OPTION value="资格认证">资格认证</OPTION>
                            <OPTION value="IT培训">IT培训</OPTION>
                            <OPTION value="语言培训">语言培训</OPTION>
                            <OPTION value="学历招生">学历招生</OPTION>
                            <OPTION value="公开课">公开课</OPTION>
                          </SELECT> </td>
                      </tr>
                      <tr> 
                        <td height="25" align="center"> <input 
                  name=key style="width:140px;"  id=txt_keyword2 size="16" maxlength=50 value="输入关键字" onClick="this.value='';"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="center"><input type="submit" name="Submit3" value=" 开 始 搜 索 "> 
                        </td>
                      </tr>
                    </form>
                  </table></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25" align="left" valign="bottom" background="../Images/Educate/left10_bg.jpg" style="padding-left:10px;"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="65" height="20" align="center" valign="bottom" bgcolor="#FFFFFF"><strong>培训课程</strong></td>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td style="BORDER-RIGHT: #418D8B 1px solid; BORDER-LEFT: #418D8B 1px solid;BORDER-bottom: #418D8B 1px solid;padding-top:2px;padding-bottom:2px;"> 
                  <div id=demo style=overflow:hidden;height:176> 
                    <div id=demo1> <%= Cls_Lesson_New(30,13) %> </div>
                    <div id=demo2></div>
                  </div>
                  <script>
<!--
  var speed		= 15;//滚动速度
  var rows		= 22;//每行高度
  var stim		= 80; //停留时间倍数 * speed
  var stop		= 0; //初始化值，不管
  demo2.innerHTML	= demo1.innerHTML
  function Marquee(){
    if(demo.scrollTop%rows==0 && stop<=stim){
      stop++;
      return;
    }
    stop = 0;
    if(demo2.offsetTop-demo.scrollTop<=0)
      demo.scrollTop-=demo1.offsetHeight
    else{
      demo.scrollTop++
    }
  }
  var MyMar	   = setInterval(Marquee,speed)
  demo.onmouseover = function() {clearInterval(MyMar)}
  demo.onmouseout  = function() {MyMar=setInterval(Marquee,speed)}
-->
</script> </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25" align="left" valign="bottom" background="../Images/Educate/left10_bg.jpg" style="padding-left:10px;"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="65" height="20" align="center" valign="bottom" bgcolor="#FFFFFF"><strong>合作伙伴</strong></td>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td style="BORDER-RIGHT: #418D8B 1px solid; BORDER-LEFT: #418D8B 1px solid;BORDER-bottom: #418D8B 1px solid;padding-top:2px;padding-bottom:2px;"><table width="90%"  border="0" align="center" cellpadding="2" cellspacing="0">
                    <%
	  
Set Rs1 = Conn.Execute("Select Top 5 LinkName,LinkUrl From [pH_FriendLink] Where State=1 And Class=0 And Cityid=0 Order By ordernum Asc")
  if not rs1.eof then
  do while not rs1.eof %>
                    <tr> 
                      <td height="15" align="left"> <a href="<%=rs1("LinkUrl")%>" target="_blank"><%=rs1("LinkName")%></a></td>
                    </tr>
                    <%rs1.movenext

loop
end if
rs1.close
%>
                  </table></td>
              </tr>
            </table></td>
          <td width="5">&nbsp;</td>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="17"><img src="../Images/Educate/right1_left.jpg" width="17" height="24"></td>
                <td background="../Images/Educate/right1_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="50%"><strong><font color="#333333">发布培训需求</font></strong></td>
                      <td align="right"><a href="Demand_Add.asp"></a></td>
                    </tr>
                  </table>
                  <strong></strong></td>
                <td width="11"><img src="../Images/Educate/right1_right.jpg" width="11" height="24"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <form action="?action=edit" name="edit" method="post" onSubmit="return edit_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="2" cellspacing="1">
                            <tr> 
                              <td width="18%" height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 标 题：</td>
                              <td height="25" bgcolor="f9f9f9"> <input name="title" type="text" id="title" size="30" maxlength="50"> 
                                <font color="#666666">(请输入您的需求标题)</font></td>
                            </tr>
                            <tr> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 需求领域：</td>
                              <td height="25"> <SELECT name=properity class=txtfield id="properity">
                                  <OPTION value=""  selected>--请选择--</OPTION>
                                  <OPTION value="企业内训">企业内训</OPTION>
                                  <OPTION value="资格认证">资格认证</OPTION>
                                  <OPTION value="IT培训">IT培训</OPTION>
                                  <OPTION value="语言培训">语言培训</OPTION>
                                  <OPTION value="学历招生">学历招生</OPTION>
                                  <OPTION value="公开课">公开课</OPTION>
                                </SELECT> <font color="#666666">(请选择您的需求领域,如资格认证)</font></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 培训形式：</td>
                              <td height="25" bgcolor="f9f9f9"> <SELECT name=formats class=txtfield id="formats">
                                  <OPTION value=""  selected>--请选择--</OPTION>
                                  <OPTION value="面授">面授</OPTION>
                                  <OPTION value="函授">函授</OPTION>
                                  <OPTION value="公开课">公开课</OPTION>
                                  <OPTION value="内训">内训</OPTION>
                                  <OPTION value="远程">远程</OPTION>
                                  <OPTION value="脱产">脱产</OPTION>
                                  <OPTION value="周末班">周末班</OPTION>
                                </SELECT> <font color="#666666">(请选择您的培训形式,如周末班)</font></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">参加人数：</td>
                              <td height="25"> <input name="number" type="text" id="number" value="0" size="6">
                                人<font color="#666666">(</font>默然0,表示若干人)</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 培训费用：</td>
                              <td height="25" bgcolor="f9f9f9">希望在 
                                <input name="price1" type="text" id="price1" size="12">
                                元至 
                                <input name="price2" type="text" id="price2" size="12">
                                元之间</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 培训时间：</td>
                              <td height="25"> <input name="begindate" type="text" id="begindate" size="16" onClick="SD(this,'document.all.begindate')" readonly>
                                到 
                                <input name="enddate" type="text" id="enddate" size="16" onClick="SD(this,'document.all.enddate')" readonly>
                                之间 </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 所在地区：</td>
                              <td height="25" bgcolor="f9f9f9"> <!--#include file="../Include/Class_Locus2.asp" --> </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 需求描述：</td>
                              <td height="25"> <textarea name="demandmemo" cols="55" rows="5" id="demandmemo"></textarea></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">师资要求：</td>
                              <td height="25" bgcolor="f9f9f9"> <textarea name="teachermemo" cols="55" rows="5" id="teachermemo"></textarea></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">培训目标：</td>
                              <td height="25"> <textarea name="mubiaomemo" cols="55" rows="5" id="mubiaomemo"></textarea></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"> 
                                其他需求：</td>
                              <td height="25" bgcolor="f9f9f9"> <input name="othermemo" type="text" id="othermemo" size="35" maxlength="50"> 
                              </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系人：</td>
                              <td height="25"> <input name="name" type="text" id="name" size="16" value="<%= Realname %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系电话：</td>
                              <td height="25" bgcolor="f9f9f9"> <input name="phone" type="text" id="currcy3" size="16"  value="<%=phone  %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">传 真：</td>
                              <td height="25"> <input name="fax" type="text" id="currcy4" size="16" value="<%= companyfax %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 电子邮件：</td>
                              <td height="25" bgcolor="f9f9f9"> <input name="email" type="text" id="fax" size="25"  value="<%= Useremail  %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">邮政编码：</td>
                              <td height="25"> <input name="zipcode" type="text" id="zipcode" size="16"  value="<%= zipcode %>" ></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">联系地址：</td>
                              <td height="25" bgcolor="f9f9f9"> <input name="address" type="text" id="address" size="35" maxlength="50" value="<%= address %>"></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 name="cityid" type="hidden" id="cityid" value="0"> 
                    <input type="hidden" name="type" value="<%= Type1 %>"> 
                    <input type="hidden" name="Userid" value="<%= Userid %>"> 
                    <input type="submit" name="submit" value=" 确 认 发 布 " style="height:30px;"> 
                  </td>
                </tr>
              </form>
            </table></td>
        </tr>
      </table>
      
      
	  </td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><!--#include file="../Include/Footer.asp" --></td>
  </tr>
</table>
</body>
</html>
<% 
Sub Edit_Submit()
   'Title,Type,Userid,Name,Phone,Fax,Email,Zipcode,Locus_Area,Locus_City,Address,Properity,Formats,Number,Price1,Price2,BeginDate,EndDate,DemandMemo,TeacherMemo,MubiaoMemo,OtherMemo
 Title				= Replace_Text(Request.Form("Title"))
 Type1				= Replace_Text(Request.Form("Type"))
 Userid				= Replace_Text(Request.Form("Userid"))
 Name				= Replace_Text(Request.Form("Name"))
 Phone				= Replace_Text(Request.Form("Phone"))
 Fax				= Replace_Text(Request.Form("Fax"))
 Email				= Replace_Text(Request.Form("Email"))
 Zipcode			= Replace_Text(Request.Form("Zipcode"))
 Locus_Area			= Replace_Text(Request.Form("x_suozaidi"))
 Locus_City			= Replace_Text(Request.Form("x_suozaidi1"))
 Address			= Replace_Text(Request.Form("Address"))
 Properity			= Replace_Text(Request.Form("Properity"))
 Formats			= Replace_Text(Request.Form("Formats"))
 Number1			= Replace_Text(Request.Form("Number"))
 Price1				= Replace_Text(Request.Form("Price1"))
 Price2				= Replace_Text(Request.Form("Price2"))
 BeginDate			= Replace_Text(Request.Form("BeginDate"))
 EndDate			= Replace_Text(Request.Form("EndDate"))
 DemandMemo			= Replace_Text(Request.Form("DemandMemo"))
 TeacherMemo		= Replace_Text(Request.Form("TeacherMemo"))
 MubiaoMemo			= Replace_Text(Request.Form("MubiaoMemo"))
 OtherMemo			= Replace_Text(Request.Form("OtherMemo"))
 Cityid				= Replace_Text(Request.Form("cityid"))
 If DemandMemo <> "" Then DemandMemo = Replace(DemandMemo,chr(13),"<br>")
 If TeacherMemo <> "" Then TeacherMemo = Replace(TeacherMemo,chr(13),"<br>")
 If MubiaoMemo <> "" Then MubiaoMemo = Replace(MubiaoMemo,chr(13),"<br>")
 
 SQL = "Insert Into [pH_Educate_Demand] (Title,Type,Userid,Name,Phone,Fax,Email,Zipcode,Locus_Area,Locus_City,Address,Properity,Formats,Number,Price1,Price2,BeginDate,EndDate,DemandMemo,TeacherMemo,MubiaoMemo,OtherMemo,Flag,AddDate,Cityid) Values ('"&Title&"','"&Type1&"','"&Userid&"','"&Name&"','"&Phone&"','"&Fax&"','"&Email&"','"&Zipcode&"','"&Locus_Area&"','"&Locus_City&"','"&Address&"','"&Properity&"','"&Formats&"',"&Number1&","&Price1&","&Price2&",'"&BeginDate&"','"&EndDate&"','"&DemandMemo&"','"&TeacherMemo&"','"&MubiaoMemo&"','"&OtherMemo&"',0,Getdate(),"&Cityid&")"
 Conn.Execute(SQL)
 
 
 Response.write "<script>alert('您的培训需求已发布成功!通过网站审核后才能显示...');location.href='Demand.asp';</script>"
 Response.End()
End Sub

CloseDB
 %>
