⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showessay.asp

📁 .asp网站程序。专业的二手汽车商店网站。功能强大
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="inc/CHAR.asp"-->
<%
   	dim sql
   	dim rs
   	dim CateName,CateID,SubCateName,SubCateID
	if request.QueryString("SoftID")="" then
		response.write "您没有选择介绍链接,请返回"
		response.end
	end if
	
	set rs=server.createobject("adodb.recordset")
	sql="select "&CategoryName&"_Cate.CateName,"&CategoryName&"_SubCate.SubCateName,"&CategoryName&"_SoftInfo.SoftName,"&CategoryName&"_SoftInfo.CateID,"&CategoryName&"_SoftInfo.SubCateID from "&CategoryName&"_SoftInfo,"&CategoryName&"_Cate,"&CategoryName&"_SubCate where "&CategoryName&"_SoftInfo.CateID="&CategoryName&"_Cate.CateID and "&CategoryName&"_SoftInfo.SubCateID="&CategoryName&"_SubCate.SubCateID and "&CategoryName&"_SoftInfo.SoftID="&request.QueryString("SoftID")
 	rs.open sql,conn,1,1
 	if not rs.eof then
		SoftName=trim(rs("SoftName"))
		CateID=trim(rs("CateID"))
		SubCateID=trim(rs("SubCateID"))
		CateName=trim(rs("CateName"))
		SubCateName=trim(rs("SubCateName"))
 
    end if
	rs.close
%>
		
<HTML>
<HEAD>
<TITLE><%= Title_Name %> =>> <%= CategoryName_CHS %> =>> <%=SoftName%></TITLE>
<META http-equiv=Content-Type content='text/html; charset=gb2312'>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{
    if (document.myform.UserName.value==""){
       alert ("你的用户名不可为空!");
       document.myform.UserName.focus();
       return(false);
    }
	if ((document.myform.Email.value.indexOf("@") == -1) || (document.myform.Email.value.indexOf(".") == -1)){
		alert("请查看您的E-mail地址是否正确,请重录入!");
		document.myform.Email.focus();
       return(false);
	}
	

	if (myform.content.value == "")
	{
		alert("留言内容不能为空!");
		myform.content.focus();
                return (false);
	}
}
function SelectAll() {
	for (var i=0;i<document.form1.ID.length;i++) {
		var e=document.form1.ID[i];
		e.checked=!e.checked;
	}
}
//-->
</script>
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<BODY text=#003300 vLink=#002200 leftMargin=0 topMargin=0>
<TABLE width=600 height=26 border=0 align="center" cellPadding=0 cellSpacing=0 class="index">
  <TR>
    <TD width="282" height="53" rowspan="3" style="font-size: 12px"><div align="center"><a href="Default.asp"><img src="images/logo.jpg" border="0"></a> </div></TD>
    <TD width="488" style="font-size: 12px"></TD>
  </TR>
  <TR>
    <TD style="font-size: 12px"></TD>
  </TR>
  <TR>
    <TD height="26" style="font-size: 12px"><div align="center">&#21512;&#32933;&#35834;&#39134;&#31185;&#25216;&#24320;&#21457;&#26377;&#38480;&#20844;&#21496; &#12288;&#12288;&#12288;&#32852;&#31995;&#25105;&#20204; &#12288;&#12288;&#32852;&#31995;&#25105;&#20204;&#12288;&#12288;</div></TD>
  </TR>
</TABLE>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9F9F9">
  <tr>
    <td height="23">&nbsp;</td>
  </tr>
</table>
<table cellspacing=0 cellpadding=0 width=600 align=center border=0>   
  <tbody>   
    <tr>    
      <td height="200" valign=top bgcolor=#efefef>      
        <%      
	select case request("action")   
	case "savereinfo"  '保存留言信息   
         call savereinfo()   
    case "del"   
	     call delEssay()   
    case else   
         call ShowSoftInfo() '查看ftp信息   
    end select     
	    
	sub SaveReInfo()   
	dim userip_temp   
      userip_temp=Request.ServerVariables("HTTP_X_FORWARDED_FOR")   
    if userip_temp="" then   
      userip_temp=Request.ServerVariables("REMOTE_ADDR")   
    end if   
	sql="select * from "&CategoryName&"_SoftEssay where (ID is null)"   
	rs.open sql,conn,1,3   
	rs.addnew   
	rs("SoftID")=trim(request("SoftID"))   
	rs("UserName")=trim(request.form("UserName"))   
	rs("Email")=trim(request.form("Email"))   
	rs("content")=UBBCode(request.form("content"))   
	rs("dateTime")=Now()   
    rs("UserIP")=userip_temp   
	rs("type")="soft"	   
	rs.update	   
	rs.close   
	sql="select count(ID) as reNum from "&CategoryName&"_SoftEssay where SoftID="&request("SoftID")&" and type='soft'"   
     rs.open sql,conn,1,1    
	 reNum=rs("reNum")   
	 rs.close   
	 conn.execute("update "&CategoryName&"_SoftInfo set EssayNum="&reNum&" where SoftID="&request("SoftID")&" ")   
	 call ShowSoftInfo()	 	   
	end sub     
	   
	Sub delEssay()   
	if not isnull(UserName) and UserName<>"" then    
	   if chkEditUser(UserName,trim(request("SoftID"))) then   
	   conn.execute("delete from "&CategoryName&"_SoftEssay where ID in ("&Request("ID")&")")   
	   reNum=0   
	   sql="select count(ID) as reNum from "&CategoryName&"_SoftEssay where SoftID="&request("SoftID")&" and type='soft'"   
     rs.open sql,conn,1,1    
	  if not(rs.eof and rs.bof) then    
	  reNum=rs("reNum")   
	  else   
	  reNum=0   
	  end if   
	 rs.close   
	 conn.execute("update "&CategoryName&"_SoftInfo set EssayNum="&reNum&" where SoftID="&request("SoftID")&" ")   
	   end if   
	end if   
	 call ShowSoftInfo()   
	end sub   
	   
	Sub ShowSoftinfo()   
	dim isMaster   
	if not isnull(UserName) and UserName<>"" then    
	   if chkEditUser(UserName,trim(request("SoftID"))) then   
	   isMaster=True   
	   else   
	   isMater=false   
	   end if   
	end if   
	sql="select * from "&CategoryName&"_SoftInfo where SoftID="&request.QueryString("SoftID")      
	rs.open sql,conn,1,1     
	PubUserName=rs("UserName")    
	EssayNum=rs("EssayNum")   
%>    
        <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC" align="center">   
          <tr bgcolor="#FFFFFF">    
            <td width="65" align="center"  height="20">物品留言</td>   
            <td  height="20" width="88%" > <b><a href="SoftView.Asp?SoftID=<%=request.QueryString("SoftID")%>"><%=trim(rs("SoftName"))%><%=trim(rs("SoftVer"))%></a></b></td>   
          </tr>   
          <tr bgcolor="#FFFFFF">    
            <td align="center">留言情况</td>   
            <td>共有 <font color="#FF0000"><%=rs("EssayNum")%></font> 人留言</td>   
          </tr>   
          <% rs.close   
		  if isMaster then    
		  Response.Write("<form name=""form1"" method=""post"" action="""">")   
		  Response.Write("<input type=""Hidden"" name=""SoftID"" value="""&Trim(Request.QueryString("SoftID"))&""">")   
          Response.Write("<input type=""Hidden"" name=""action"" value=""del"">")   
		  end if		     
		sql="select * from "&CategoryName&"_SoftEssay where SoftID="&request("SoftID")&" order by ID desc "    
	rs.open sql,conn,1,1   
	if not (rs.eof and rs.bof) then   
	do while not rs.eof    
		 %>   
          <tr bgcolor="#F7F7F7">    
            <td colspan="2">   
			<% if isMaster then   
			Response.Write("<input type=""checkbox"" name=""ID"" value="""&Rs("ID")&""">")   
			 else   
			 Response.Write("<img src=""images/dot.gif"" align=""absmiddle"">")   
			 end if   
			 %>    
            用户:<b><%=rs("UserName")%></b> 时间:<%=DateTimeFormat(rs("DateTime"),1)%> 来自:<b><%=rs("UserIP")%></b></td>   
          </tr>   
          <tr bgcolor="#FFFFFF">    
            <td colspan="2"><%=rs("Content")%></td>   
          </tr>   
          <%   
		rs.movenext   
	    loop   
	   	end if    
	    rs.close   
		if isMaster then   
		%>   
		<tr bgcolor="#FFFFFF">    
            <td colspan="2"><strong><font color="#FF0000">留言管理操作:</font></strong>全选/反选    
              <input type=checkbox name=chkall value=on onClick="javascript:SelectAll()">   
			<input type="submit" name="Submit" value=" 删 除 "> </td>   
        </tr>   
		<%     
		 Response.Write("</form>")   
	    end if   
		if UserName<>pubUserName then   
		%>   
          <tr bgcolor="#FFFFFF">    
            <td align="center">我要留言</td>   
            <td> <table width="100%" border="0" cellspacing="0" cellpadding="1">   
                <form name="myform" method="post" action="" target="_top" onSubmit="return Juge(this)" >   
                  <tr>    
                    <td width="9%">用户:</td>   
                    <td width="37%"> <input type="text" name="UserName" maxlength="15" size="28" style="height: 16px;BORDER-BOTTOM: #888888 1px solid; BORDER-LEFT: #888888 1px solid; BORDER-RIGHT: #888888 1px solid; BORDER-TOP: #888888 1px solid; font-size: 9pt">    
                    </td>   
                    <td rowspan="2">&nbsp;                    </td>   
                  </tr>
                  <tr>
                    <td width="9%">Email:</td>
                    <td><input type="text" name="Email" maxlength="50" size="28" style="height: 16px;BORDER-BOTTOM: #888888 1px solid; BORDER-LEFT: #888888 1px solid; BORDER-RIGHT: #888888 1px solid; BORDER-TOP: #888888 1px solid; font-size: 9pt"></td>
                  </tr>   
                 <tr>    
                    <td>说明:</td>   
                    <td colspan="2"> <textarea name="content" cols="35" rows="5" style="BORDER-BOTTOM: #888888 1px solid; BORDER-LEFT: #888888 1px solid; BORDER-RIGHT: #888888 1px solid; BORDER-TOP: #888888 1px solid; font-size: 9pt"></textarea>    
                      <font color="#FF0000"><br>   
                      * 请注意用语文明且合法,不要发布带有攻击性的言论,谢谢合作! </font></td>   
                  </tr>   
                  <tr>    
                    <td> </td>   
                    <td colspan="2"> <input type="submit" name="Submit" value=" 提 交 ">    
                      <input type="reset" name="Submit2" value=" 重 设 ">   
                      (注:“<font color="#FF0000">!</font>”为必填内容。) </td>   
                  </tr>   
                </form>   
              </table></td>   
          </tr>   
          <%end if %>   
          <tr bgcolor="#FFFFFF">    
            <td align="center"> </td>   
            <td> </td>   
          </tr>   
      </table>        <%end sub %> </td>   
    </tr>   
  </tbody>   
</table>   
</body>   
</html>   
<%   
set rs=nothing   
CloseDatabase   
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -