<!--#include file="head.asp"-->
<!-- 这里是主题 -->
<TABLE WIDTH=778 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR><td width="25%">
<%dim name,theitem,sql,rs,thepage,currentpage,pagename,totalpage,n,page
Set rs = Server.CreateObject("ADODB.Recordset")
    sql="select * from data where adid="&request("id")&""
    rs.open sql,conn,1,1%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CAE2F8">
<tr bgcolor="#EFF7FE"><td width="381" height="24" bgcolor="#EFF7FE" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#F0FCFF"<%end if%>>	
          <%
if rs.eof then
	response.write "对不起，没有找到符合条件的广告内容！"
	rs.close
	set rs=nothing
   	response.end
else
%>
信息标题：
                  <%if rs("cu")="yes" then%>
                  <b><font style="font-size:14px" <%if rs("color")<>"" then%>color="<%=rs("color")%>"<%end if%>><%=rs("title")%></font></b>
                  <%else%>
                  <font style="font-size:14px" <%if rs("color")<>"" then%>color="<%=rs("color")%>"<%end if%>><%=rs("title")%></font>
                  <%end if%>          
            	</td>
  <td width="137"  align="center" bgcolor="#EFF7FE" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#F0FCFF"<%end if%>>信息类别：&nbsp;<font color="#FF0000">[<%=rs("type")%>]</font></td>
          <td width="250" align=right><font color="#A2CCF2"><b>www.zhaoshangw.com</b></font></td>
</tr>                                                
<tr><td colspan="2" valign="top" bgcolor="#FFFFFF">
<table width="100%" height="49%"  border="0" cellspacing="0" cellpadding="2">
              <tr> 
                <td> <table width="381" height="180" border="0" cellpadding="0" cellspacing="1" bgcolor="e8e8e8" style="float:left;">
                    <tr> 
                      <td width="379" height="178" align="center" bgcolor="#FFFFFF"> 
                        <%if rs("pic")<>"" then%>
                        <div align="center"><a href="adpic/<%=rs("pic")%>" target="_blank"><img src="adpic/<%=rs("pic")%>" border="0" width="200" height="160" style="float:right;"></a> 
                          <%else%>
                          暂无图片 
                          <%end if%>
                        </div></td>
                    </tr>
                  </table> </td>
              </tr>
              <tr>
                <td><%=rs("text")%></td>
              </tr>
            </table>
  </td>
          <td width="250" valign="top" bgcolor="#FFFFFF"><table width="74%" border="0">
              <tr> 
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr> 
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr> 
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr> 
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr> 
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
              <tr> 
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
                <td><img src="images/mlmllink1.jpg" width="120" height="47"></td>
              </tr>
            </table></td>
</tr>                                                         
 <tr>                
  <td colspan="2"  bgColor="#EFF7FE">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td width="150">联系人：<%=rs("username")%></td>
    <td width="1" rowspan="2" bgcolor="#CAE2F8"></td>
    <td width="5">&nbsp;</td>
    <td><%
uid=rs("uid")
sql="select * from user where uid='"& uid &"'"
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,3
if not rs1.eof then
qq=rs1("qq")
email=rs1("email")
rs1.close  
set rs1=nothing                                                                                     
end if
%>
      Email：<%if email="" then%>未填<%else%><%=email%><%end if%></td>
    <td width="1" rowspan="2" bgcolor="#CAE2F8"></td>
    <td width="150" rowspan="2"><p align="center"><font color="#FF0000">发布时间:</font> <font color="#008000"><%=rs("date")%></font> <br>
      <p align="center">
        <%if rs("top")="1" then%>
        <font color="#FF0000">固顶广告</font> <font color="#008000">有效期还有<%=datediff("d",date(),rs("stop"))%>天</font>
        <%else%>
        <%if rs("money")<>"0" then%>
        <img src="images/dot.gif"> <font color="#FF6600">竞价广告</font> <font color="#008000">有效期还有<%=datediff("d",date(),rs("stop"))%>天</font>
        <%else%>
        <font color="#008000">↑有效期还有<%=datediff("d",date(),rs("stop"))%>天↑</font>
        <%end if%>
        <%end if%>
      </td>
  </tr>
  <tr>
    <td></td>
    <td>联系电话：<%=rs("tel")%> </td>
    <td>&nbsp;</td>
    <td>QQ：<%if qq="" then%>未填<%else%><%=qq%><%end if%> </td>
  </tr>
</table>
</td> 
  <td  bgColor="#EFF7FE">&nbsp;</td>
 </tr>
 </table>
<%
messagetext=HtmlEncode(trim(request.form("messagetext")))
if messagetext<>"" then
messagename=HtmlEncode(trim(request.form("messagename")))
messagelxfs=HtmlEncode(trim(request.form("messagelxfs")))
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
If ip = "" Then 
ip = Request.ServerVariables("REMOTE_ADDR") 
end if
if messagename="" then
messagename="匿名"
end if
if messagelxfs="" then
messagelxfs="未填"
end if
sql="select * from message"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,3
rs2.addnew
rs2("messagename")=messagename
rs2("messagelxfs")=messagelxfs
rs2("messagetext")=messagetext
rs2("adid")=request("id")
rs2("uid")=uid
rs2("ip")=ip
rs2.update
response.write"<script>alert('留言成功！');location='show.asp?id="&rs("adid")&"'</script>"
rs2.close  
set rs2=nothing                                                                                     
end if
%>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkmessage()
{   
    if (document.form.messagetext.value.length<1)
	{
        alert("请填写留言内容！");
        document.form.messagetext.focus();
        return false;
    }
	    if (document.form.messagetext.value.length>100)
	{
        alert("请把留言字数控制在100以内！");
        document.form.messagetext.focus();
        return false;
    }
}
//-->
</SCRIPT>
<form name="form" method="post" action="" onsubmit="return checkmessage()">
        <table width="778"  border="0" cellpadding="2" cellspacing="1" bgcolor="#CAE2F8" style="word-break:break-all">
          <tr bgcolor="#FFFFFF"><td width="504" valign="top" bgcolor="#FFFFFF">

<%
sql="select top 10 * from message where adid="& request("id") &" order by id desc"
set rs3=server.createobject("adodb.recordset")               
rs3.open sql,conn,1,3  
if rs3.eof then                          
response.write "<font color='#FF0000'>暂无留言！</font></td>"
rs3.close
set rs3=nothing                            
else
while not rs3.eof%>

  ·<%=rs3("messagetext")%>(<%=rs3("messagename")%>|<%=rs3("messagelxfs")%>)<font color="999999">[<%=rs3("messagedate")%>]</font>
<br>

<%rs3.movenext
wend
rs3.close
set rs3=nothing
end if%>
</td>
    <td width="263" colspan="2" valign="top" bgcolor="#EFF7FE">留言人:
          <input name="messagename" type="text" id="messagename" size="9" maxlength="20">
          联系方式:
          <input name="messagelxfs" type="text" id="messagelxfs" size="10" maxlength="50">          <br>
      留言内容:<FONT color=#fa4600>[请遵纪守法并注意语言文明]</FONT>
      <textarea name="messagetext" cols="35" rows="5"></textarea><table width="98%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="right"><input name="id" type="hidden" value="<%=request("id")%>">      <input type="submit" name="Submit" value="提交留言"></td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
<%                                                                           
rs.close                                                   
set rs=nothing                                                 
conn.close                                                    
set conn=nothing%> 
</td></tr> 
</table>
<%end if%>

<!-- 这里是主题结束 -->

<!--#include file="foot.asp"-->