<!--#include file="../../Include/Class_Conn.asp" -->
<!--#include file="../../Include/Class_Main.asp" -->
<% 
Dim Param
Dim Corid,Username,Cmd,Rs,SQL

Corid     = Replace_Text(Request.QueryString("Param"))
Action = Request.QueryString("action")
If Action = "submit" Then Call Submit() '//调用保存数据的函数


Set Rs = Conn.Execute("Select CorpName From [pH_Intro_Base] Where Corid='"&Corid&"'")
If Rs.eof Then
 Response.write "没有找到会员资料！"
 Response.End()
Else
 CorpName = Rs("CorpName")
End if
Rs.Close

%>

<!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><%= CorpName&" -- 客户留言"%></title>
</head>
<script language="JavaScript" src="../../js/Intro_lessonguestbook.js"></script>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <!--#include file="../../Header/Info/Intro.asp" -->
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
          <td height="4"></td>
        </tr>
      </table>
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr valign="top"> 
          <td width="195"> <table width="185" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="31" height="33"><img src="../../Images/mid_left_intro.gif" width="31" height="33"></td>
                            <td background="../../Images/mid_bg.gif" class="font-14"><strong><font color="#aa0400">中介公司</font></strong></td>
                            <td width="30"><img src="../../Images/mid_right.gif" width="30" height="33"></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td height="45" align="center"><a href="Index.asp?Param=<%= Corid %>"><img src="../../Images/Intro/left.gif" width="149" height="44" border="0"></a></td>
                    </tr>
                    <tr> 
                      <td height="45" align="center"><a href="Jobs.asp?Param=<%= Corid %>"><img src="../../Images/Intro/left_2.gif" width="149" height="44" border="0"></a></td>
                    </tr>
                    <tr> 
                      <td height="45" align="center"><a href="GuestBook.asp?Param=<%= Corid %>"><img src="../../Images/Intro/left_4.gif" width="149" height="44" border="0"></a></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
          <td width="1" bgcolor="#cfd0cf"></td>
          <td width="10"></td>
          <td width="554" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="25" align="center"><img src="../../Images/intro/arrow1.gif" width="13" height="9"></td>
                      <td height="25" class="font-14"><b><%= CorpName %></b></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td height="10" background="../../Images/Company/bg.gif"></td>
              </tr>
            </table>

            <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#999999">
              <tr align="center" bgcolor="#CCCCCC"> 
                <td width="100">留言者</td>
                <td>留言内容</td>
              </tr>
              <% 
SQL = "Select * From [pH_Intro_GuestBook] Where Corid='"&Corid&"' And Flag=1 Order By Ncid Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open SQL,Conn,1,1
Rs.Pagesize = 10
Psize       = Rs.PageSize
PCount      = Rs.PageCount
RCount      = Rs.RecordCount

PageNo = Cint(Request.QueryString("PageNo"))
If PageNo < 1 Then
 PageNo = 1
Elseif PageNo > PCount Then
 PageNo = PCount
End if
If Not Rs.Eof Then Rs.AbsolutePage = PageNo

For i = 1 to Psize
  If Rs.Eof Then Exit For
  Ncid = Rs("Ncid")
  JobName = Rs("JobName")
  Realname = Rs("Realname")
  Usertype = Rs("Usertype")
  Locus = Rs("Locus")
  Phone = Rs("Phone")
  Email = Rs("Email")
  Content = Rs("Content")
  AddDate = Rs("AddDate")
 %>

              <tr bgcolor="#FFFFFF"> 
                <td width="100"><table width="100%" border="0" cellspacing="0" cellpadding="4">
                    <tr> 
                      <td align="center"><%= Realname %></td>
                    </tr>
                    <tr> 
                      <td height="1" align="center" bgcolor="#CCCCCC"></td>
                    </tr>
                    <tr> 
                      <td align="center">来自：<%= Locus %></td>
                    </tr>
                    <tr>
                      <td align="center">身份：<%= Usertype %></td>
                    </tr>
                  </table></td>
                <td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
                    <tr> 
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="50%">职位：<%= JobName %></td>
                            <td width="50%">时间：<%= AddDate %></td>
                          </tr>
                          <tr> 
                            <td width="50%">电话：<%= Phone %></td>
                            <td width="50%">邮件：<%= Email %></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td height="1" bgcolor="#cccccc"></td>
                    </tr>
                    <tr>
                      <td><font color="ff6600">留言：</font><br>
                        <%= Content %></td>
                    </tr>
                  </table></td>
              </tr>
<% 
  Rs.Movenext
 Next
 %>

            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="4">
              <tr> 
                <td width="50%" height="25">共<Font color="#FF0000"><%= RCount %></Font>条 
                  分<Font color="#FF0000"><%= PCount %></Font>页 | 当前第<Font color="#FF0000"><%= PageNo %></Font>页</td>
                <td width="50%" align="right"> 
                  <% 
		  If PageNo > 1 Then
		   Response.write "<a href=""?PageNo=1&Corid="&Corid&"&Param="&Lessonid&""">首页</a>&nbsp;"
		   Response.write "<a href=""?PageNo="&PageNo-1&"&Corid="&Corid&"&Param="&Lessonid&""">上页</a>&nbsp;"    
		  Else
		   Response.write "首页&nbsp;"
		   Response.write "上页&nbsp;" 
		  End if
		 
		  If PageNo < PCount Then
		   Response.write "<a href=""?PageNo="&PageNo+1&"&Corid="&Corid&"&Param="&Lessonid&""">下页</a>&nbsp;"
		   Response.write "<a href=""?PageNo="&PCount&"&Corid="&Corid&"&Param="&Lessonid&""">尾页</a>"   
		  Else
		   Response.write "下页&nbsp;"
		   Response.write "尾页" 
		  End if
		   %>
                </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <form action="?action=submit" name="edit" method="post" onSubmit="return check_edit();">
                <tr> 
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                      <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="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="0" cellspacing="0">
                            <tr> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 姓 名：</td>
                              <td height="25"><input name="name" type="text" id="name" style="width:120px;" size="30" maxlength="30"> 
                              </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">身 
                                份：</td>
                              <td height="25" bgcolor="f9f9f9"> <input name="usertype" type="radio" value="企业" checked>
                                企业 
                                <input type="radio" name="usertype" value="个人">
                                个人 </td>
                            </tr>
                            <tr>
                              <td height="25" align="right" bgcolor="f9f9f9">咨询职位：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="jobname" type="text" id="jobname"  style="width:200px;" size="50"></td>
                            </tr>
                            <tr> 
                              <td width="18%" height="25" align="right" bgcolor="f9f9f9">来自哪里：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="locus" type="text" id="locus" style="width:120px;" size="30" maxlength="30"> 
                                <font color="#50463d">&nbsp; </font></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">联系电话：</td>
                              <td height="25"><input name="phone" type="text" id="phone" style="width:120px;" size="30" maxlength="30"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">电子邮件：</td>
                              <td height="25" bgcolor="f9f9f9"><input name="email" type="text" id="email"  style="width:200px;" size="50"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 留言信息：</td>
                              <td height="25"><textarea name="content" cols="40" rows="5" id="content"></textarea> 
                              </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="hidden" name="Corid" value="<%= Corid %>">
                   
                    <input type="submit" name="Submit" value=" 提交信息 "> 
                  </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/Info/Footer.asp" -->
    </td>
  </tr>
</table>
</body>
</html>
<% 
Sub Submit() '保存企业基本数据
 'Corid,Lessonname,Realname,Usertype,Phone,Email,Locus,Content
 Corid		= Replace_Text(Request.Form("Corid"))
 Jobname	= Replace_Text(Request.Form("Jobname"))
 Realname	= Replace_Text(Request.Form("name"))
 Usertype	= Replace_Text(Request.Form("Usertype"))
 Phone		= Replace_Text(Request.Form("Phone"))
 Email		= Replace_Text(Request.Form("Email"))
 Locus		= Replace_Text(Request.Form("Locus"))
 Content	= Replace_Text(Request.Form("Content"))
 
 SQL = "Insert Into [pH_Intro_GuestBook] (Corid,Jobname,Realname,Usertype,Phone,Email,Locus,Content,Flag,AddDate) Values ('"&Corid&"','"&Jobname&"','"&Realname&"','"&Usertype&"','"&Phone&"','"&Email&"','"&Locus&"','"&Content&"',0,Getdate())"
 Conn.Execute(SQL)
 
 Response.write "<script>alert('您的留言内容已经提交到指定的中介公司！');location.href='Index.asp?Param="&Corid&"';</script>"
 Response.End()
End Sub

'//关闭数据库连接
Set Rs = Nothing
CloseDB
 %>
