📄 ad_softcomment.asp
字号:
<input name="Oicq" type="text" id="UserName" maxlength="15" value="<%=rs("Oicq")%>">
</td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论人性别:</td>
<td class="tdbg" width="200">
<input type="radio" name="Sex" value="1" checked style="BORDER:0px;">
男
<input type="radio" name="Sex" value="0" style="BORDER:0px;">
女 </td>
<td class="tdbg" align="right" width="101">评论人 Icq:</td>
<td class="tdbg" width="475">
<input name="Icq" type="text" id="UserName" maxlength="15" value="<%=rs("Icq")%>">
</td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论人Email:</td>
<td class="tdbg" width="200">
<input name="Email" type="text" id="UserName" maxlength="40" value="<%=rs("Email")%>">
</td>
<td class="tdbg" align="right" width="101">评论人 Msn:</td>
<td class="tdbg" width="475">
<input name="Msn" type="text" id="UserName" maxlength="40" value="<%=rs("Msn")%>">
</td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论时间:</td>
<td class="tdbg" width="200">
<input name="WriteTime" type="text" id="WriteTime" value="<%=rs("WriteTime")%>">
</td>
<td class="tdbg" align="right" width="101">评论人IP:</td>
<td class="tdbg" width="475">
<input name="IP" type="text" id="IP" maxlength="15" value="<%=rs("IP")%>">
</td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论人主页:</td>
<td class="tdbg" colspan="3">
<input name="Homepage" type="text" id="UserName" maxlength="60" value="<%if rs("Homepage")="" then response.write "http://" else response.write rs("Homepage") end if%>" size="66">
</td>
</tr>
<%else%>
<tr>
<td width="200" align="right" class="tdbg">评论人姓名:</td>
<td class="tdbg" colspan="3">
<input name="ShowUserName" type="text" id="UserName" value="<%=rs("UserName")%>" disabled>
<input name="UserName" type="hidden" id="UserName" value="<%=rs("UserName")%>">
</td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论时间:</td>
<td class="tdbg" width="200">
<input name="WriteTime" type="text" id="WriteTime" value="<%=rs("WriteTime")%>">
</td>
<td class="tdbg" align="right" width="101">评论人IP:</td>
<td class="tdbg" width="475">
<input name="IP" type="text" id="IP" maxlength="15" value="<%=rs("IP")%>">
</td>
</tr>
<% end if %>
<tr>
<td width="200" align="right" class="tdbg">评 分:</td>
<td class="tdbg" colspan="3">
<input type="radio" name="Score" value="1" <%if rs("Score")=1 then response.write "checked"%>>
1分
<input type="radio" name="Score" value="2" <%if rs("Score")=2 then response.write "checked"%>>
2分
<input type="radio" name="Score" value="3" <%if rs("Score")=3 then response.write "checked"%>>
3分
<input type="radio" name="Score" value="4" <%if rs("Score")=4 then response.write "checked"%>>
4分
<input type="radio" name="Score" value="5" <%if rs("Score")=5 then response.write "checked"%>>
5分 </td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论内容:</td>
<td class="tdbg" colspan="3">
<textarea name="Content" cols="56" rows="8" id="Content"><%=rs("Content")%></textarea>
</td>
</tr>
<tr align="center">
<td height="30" colspan="4" class="tdbg">
<input name="ComeUrl" type="hidden" id="ComeUrl" value="<%=ComeUrl%>">
<input name="Action" type="hidden" id="Action" value="SaveModify">
<input name="CommentID" type="hidden" id="CommentID" value="<%=rs("CommentID")%>">
<input name="UserType" type="hidden" id="UserType" value="<%=rs("UserType")%>">
<input type="submit" name="Submit" value=" 保存修改结果 ">
</td>
</tr>
</table>
</form>
<%
end if
rs.close
set rs=nothing
end sub
sub Reply()
dim CommentID
CommentID=trim(Request("CommentID"))
if CommentID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
Exit sub
else
CommentID=Clng(CommentID)
end if
sql="select S.SoftID, S.ClassID, S.SoftName,S.SoftVersion,C.CommentID,C.UserName,C.IP, C.Content,C.WriteTime,C.ReplyContent from SoftComment C Left Join Soft S On C.SoftID=S.SoftID where C.CommentID=" & CommentID
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,1
if rs.Bof or rs.EOF then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的评论!</li>"
else
%>
<form method="post" action="ad_SoftComment.asp" name="form1">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
<tr align="center" class="title">
<td height="22" colspan="2"> <strong>回 复 评 论</strong></td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论软件名称:</td>
<td class="tdbg"><%=rs("SoftName")%></td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论人用户名:</td>
<td class="tdbg"><%=rs("UserName")%></td>
</tr>
<tr>
<td width="200" align="right" class="tdbg">评论内容:</td>
<td class="tdbg"><%=rs("Content")%></td>
</tr>
<tr>
<td align="right" class="tdbg">回复内容:</td>
<td class="tdbg"><textarea name="ReplyContent" cols="50" rows="6" id="ReplyContent"><%=rs("ReplyContent")%></textarea></td>
</tr>
<tr align="center">
<td height="30" colspan="2" class="tdbg"><input name="ComeUrl" type="hidden" id="ComeUrl" value="<%=ComeUrl%>">
<input name="Action" type="hidden" id="Action" value="SaveReply">
<input name="CommentID" type="hidden" id="CommentID" value="<%=rs("CommentID")%>">
<input type="submit" name="Submit" value=" 回 复 "> </td>
</tr>
</table>
</form>
<%
end if
rs.close
set rs=nothing
end sub
%>
</body>
</html>
<%
sub DelComment()
dim CommentID,i
CommentID=trim(Request("CommentID"))
if CommentID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
Exit sub
end if
if instr(CommentID,",")>0 then
dim idarr
idArr=split(CommentID)
for i = 0 to ubound(idArr)
conn.execute "delete from SoftComment where Commentid=" & Clng(idArr(i))
next
else
conn.execute "delete from SoftComment where Commentid=" & Clng(CommentID)
end if
call CloseConn()
response.redirect ComeUrl
End sub
sub DelComment2()
dim SoftID
SoftID=trim(request("SoftID"))
if SoftID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
Exit sub
else
SoftID=Clng(SoftID)
end if
conn.execute "delete from SoftComment where SoftID=" & SoftID
call CloseConn()
response.redirect ComeUrl
End sub
sub SaveModify()
dim rsComment,ClassID,tClass,CommentID
dim CommentUserType,CommentUserName,CommentUserSex,CommentUserEmail,CommentUserOicq
dim CommentUserIcq,CommentUserMsn,CommentUserHomepage,CommentUserScore,CommentUserContent
dim CommentUserIP,CommentWritetime
CommentID=trim(Request("CommentID"))
if CommentID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
Exit sub
end if
CommentUserName=trim(request("UserName"))
if CommentUserName="" then
founderr=true
errmsg=errmsg & "<br><li>请输入姓名</li>"
Exit sub
end if
CommentUserType=Clng(request("UserType"))
if CommentUserType=0 then
CommentUserSex=trim(request("Sex"))
CommentUserOicq=trim(request("Oicq"))
CommentUserIcq=trim(request("Icq"))
CommentUserMsn=trim(request("Msn"))
CommentUserEmail=trim(request("Email"))
CommentUserHomepage=trim(request("Homepage"))
if CommentUserHomepage="http://" or isnull(CommentUserHomepage) then CommentUserHomepage=""
end if
CommentUserIP=trim(request.form("IP"))
CommentWriteTime=trim(request.form("WriteTime"))
CommentUserScore=Clng(request.Form("Score"))
CommentUserContent=trim(request.Form("Content"))
if CommentUserContent="" or CommentUserIP="" or CommentUserScore="" then
founderr=true
errmsg=errmsg & "<br><li>请完整输入评论内容、评论时间、评论人IP等信息</li>"
end if
CommentUserContent=DvHtmlEncode(CommentUserContent)
if CommentWriteTime="" then
CommentWriteTime=now()
else
CommentWriteTime=Cdate(CommentWriteTime)
end if
if FoundErr=True then
exit sub
end if
sql="Select * from SoftComment where CommentID=" & CommentID
Set rsComment=Server.CreateObject("Adodb.RecordSet")
rsComment.Open sql,conn,1,3
if rsComment.Bof or rsComment.EOF then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的评论!</li>"
else
rsComment("UserType")=CommentUserType
rsComment("UserName")=CommentUserName
rsComment("Sex")=CommentUserSex
rsComment("Oicq")=CommentUserOicq
rsComment("Icq")=CommentUserIcq
rsComment("Msn")=CommentUserMsn
rsComment("Email")=CommentUserEmail
rsComment("Homepage")=CommentUserHomepage
rsComment("IP")=CommentUserIP
rsComment("WriteTime")=CommentWriteTime
rsComment("Score")=CommentUserScore
rsComment("Content")=CommentUserContent
rsComment.update
end if
rsComment.Close
set rsComment=Nothing
call CloseConn()
response.redirect ComeUrl
end sub
sub SaveReply()
dim CommentID,ReplyName,ReplyContent,ReplyTime
CommentID=trim(Request("CommentID"))
ReplyContent=trim(request("ReplyContent"))
if CommentID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
Exit sub
else
CommentID=Clng(CommentID)
end if
if ReplyContent="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请输入回复内容</li>"
end if
if FoundErr=True then
exit sub
end if
sql="Select * from SoftComment where CommentID=" & CommentID
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,3
if rs.Bof or rs.EOF then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的评论!</li>"
else
rs("ReplyName")=session("AdminName")
rs("ReplyTime")=now()
rs("ReplyContent")=dvhtmlencode(ReplyContent)
rs.update
end if
rs.Close
set rs=Nothing
call CloseConn()
response.redirect ComeUrl
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -