<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../head.asp"-->
  <!--#include file="../checkrole.asp"-->
 <%
     call checkuser("ly")
	 %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function check()
{
  if (trim(form1.messageTitle.value)=="") {
		alert("主题不能为空！");
		form1.messageTitle.focus();		
		    return (false);
  }
  if (trim(form1.messageContent.value)=="") {
		alert("主要内容不能为空！");
		form1.messageContent.focus();		
		    return (false);
  }
else
	document.form1.submit();
}
//-->
function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 

//--> 
</script>
<br>
<TABLE cellSpacing=0 cellPadding=0 width=778 border=0>
  <TBODY>
  <TR>
   </TD>
    <TD 
    style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(i../mages/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
          <TD width="51"><IMG height=32 src="../images/sendmessage.gif" 
            border=0></TD>
          <TD width="727" background="../images/info_bg.gif">&nbsp;</TD>
        </TR></TBODY></TABLE>
      <%
 id=Replace_Text(request("id"))
 
sql="select Websen_getprice.sendcid,Websen_getprice.title,Websen_corporation.* from Websen_getprice,Websen_corporation where Websen_getprice.id="&id&" and Websen_corporation.id=Websen_getprice.sendcid and Websen_corporation.flag=1  "

Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write"暂无任何信息"
else
%> 

        
<FORM name=form1 action="savereplymessage.asp" method=post>
<input type=hidden value=<%=rs("sendcid")%> name=mycid>
          <TABLE width=100% border=0 cellPadding=0 cellSpacing=0>
            <TBODY>
  <TR>
    <TD bgColor=#efefef>
      <TABLE cellSpacing=1 cellPadding=4 width=100% border=0>
                    <TBODY>
        <TR bgColor=#ffffff>
          <TD align=right bgColor=#ffffff><B>发送给：</B></TD>
          <TD><%=rs("qymc")%></TD></TR>
        
        <TR bgColor=#ffffff>
          <TD align=right bgColor=#ffffff><B>主题：</B></TD>
          <TD><INPUT maxLength=50 size=60 value=回复：“<%=rs("title")%>” 
            name=messageTitle> </TD></TR>
        <TR bgColor=#ffffff>
          <TD vAlign=top align=right bgColor=#ffffff><B>主要内容：</B></TD>
          <TD><TEXTAREA name=messageContent rows=10 cols=60></TEXTAREA> </TD></TR>
        
        <TR bgColor=#ffffff>
          <TD vAlign=top align=right>&nbsp; </TD>
          <TD vAlign=top><!--<INPUT type=checkbox CHECKED value=true
            name=sendEmail>发到对方的电子邮箱中--><BR><INPUT type=checkbox disabled CHECKED value=1 
            name=sendMessage>
                          发到对方的“我收到的留言”中<BR>
                          <INPUT type=checkbox 
            CHECKED value=true name=saveSendMessage>
                          保存到我的“我发出的留言”中<BR>
        <INPUT 
            type=checkbox CHECKED value=true 
        name=sendContact>发送我的联系方式<BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>

          <TABLE width=100% border=0 cellPadding=0 cellSpacing=0 bgColor=#ffffff>
            <TBODY>
  <TR>
    <TD align=left><div align="center"><A 
      href="../modify/modify_info.asp">检查我的联系信息是否有误</A></div></TD></TR></TBODY></TABLE><BR>
          <TABLE width=300 border=0 align="center" cellPadding=4 cellSpacing=0>
            <TBODY>
  <TR align=middle>
    <TD noWrap><INPUT type=button value="  发送  " name=sendButton onClick="check()"> 
    </TD>
    <TD noWrap><INPUT type=reset value="  重填  " name=resetButton> 
  </TD></TR></TBODY></TABLE></FORM>

<%end if%>
</TABLE>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>