📄 ye_fenlei_tg.asp
字号:
<%if session("admin")="" then
response.write"你没有登录或是非法用户!<meta http-equiv=refresh content='1;url=../Index.asp'>"
response.End()
end if%>
<!--#include file=conn.asp-->
<!--#include file="../Config.asp"-->
<!--#include file=Ye_Up.asp-->
<link href=ht.css rel=stylesheet type=text/css>
<title><%=webname%>_分类管理</title>
<br>
<!--删除、修改一级分类-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
<tr>
<td>
<form method=post action=Ye_FenLei_TG.asp>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>删除、修改一级分类</strong></td>
</tr>
<tr>
<td align=center><br> <%if request("del")="删除" then
if request("topic")="" then
response.write"分类不能为空!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
else
topic=request("topic")
'删除该主题相关问题和答复
rs2.open"select * from class where topic='"&topic&"'",conn,1,1
clid=rs2("id")
rs2.close
rs1.open"select * from assort where shuxing="&clid&"",conn,1,1
if not rs1.eof then
rs2.open"select * from assort where shuxing="&clid&"",conn,1,1
topic1=rs2("topic")
rs2.close
rs2.open"select * from question where topic='"&topic1&"'",conn,1,3
while not rs2.eof
rs3.open"select * from reply where replyid="&rs2("id"),conn,1,3
while not rs3.eof
'修改解决数和回复数、积分
rs4.open"select * from person where name='"&rs3("replyer")&"'",conn,1,3
if rs3("isdeal")=1 then
rs4("replynum")=rs4("replynum")-1
rs4("helpnum")=rs4("helpnum")-1
rs4("jifen")=rs4("jifen")-dajiadf-dadf
temp=rs4("jifen")-dajiadf-dadf
else
rs4("replynum")=rs4("replynum")-1
rs4("jifen")=rs4("jifen")-dadf
temp=rs4("jifen")-dadf
end if
if temp<fen2 then
rs4("touxian")=""&ji1&" 一级"
elseif temp>=fen2 and temp<fen3 then
rs4("touxian")=""&ji2&" 二级"
elseif temp>=fen3 and temp<fen4 then
rs4("touxian")=""&ji3&" 三级"
elseif temp>=fen4 and temp<fen5 then
rs4("touxian")=""&ji4&" 四级"
elseif temp>=fen5 and temp<fen6 then
rs4("touxian")=""&ji5&" 五级"
elseif temp>=fen6 and temp<fen7 then
rs4("touxian")=""&ji6&" 六级"
elseif temp>=fen7 and temp<fen8 then
rs4("touxian")=""&ji7&" 七级"
elseif temp>=fen8 and temp<fen9 then
rs4("touxian")=""&ji8&" 八级"
elseif temp>=fen9 and temp<fen10 then
rs4("touxian")=""&ji9&" 九级"
elseif temp>=fen10 then
rs4("touxian")=""&ji10&" 十级"
end if
rs4.update
rs4.close
'
rs3.delete
rs3.movenext
wend
rs3.close
'修改发表问题数和积分
rs4.open"select * from person where name='"&rs2("sender")&"'",conn,1,3
rs4("asknum")=rs4("asknum")-1
rs4("jifen")=rs4("jifen")+twf
temp=rs4("jifen")+twf
if temp<fen2 then
rs4("touxian")=""&ji1&" 一级"
elseif temp>=fen2 and temp<fen3 then
rs4("touxian")=""&ji2&" 二级"
elseif temp>=fen3 and temp<fen4 then
rs4("touxian")=""&ji3&" 三级"
elseif temp>=fen4 and temp<fen5 then
rs4("touxian")=""&ji4&" 四级"
elseif temp>=fen5 and temp<fen6 then
rs4("touxian")=""&ji5&" 五级"
elseif temp>=fen6 and temp<fen7 then
rs4("touxian")=""&ji6&" 六级"
elseif temp>=fen7 and temp<fen8 then
rs4("touxian")=""&ji7&" 七级"
elseif temp>=fen8 and temp<fen9 then
rs4("touxian")=""&ji8&" 八级"
elseif temp>=fen9 and temp<fen10 then
rs4("touxian")=""&ji9&" 九级"
elseif temp>=fen10 then
rs4("touxian")=""&ji10&" 十级"
end if
rs4.update
rs4.close
'
rs2.delete
rs2.movenext
wend
rs2.close
rs2.open"select * from assort where shuxing="&clid&"",conn,1,3
while not rs2.eof
rs2.delete
rs2.movenext
wend
rs2.close
end if
rs1.close
rs.open"select * from class where topic='"&topic&"'",conn,1,3
rs.delete
rs.close
response.write"分类删除成功!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
end if%>
<%if request("up2")="修改" then
if request("paixu")="" then
response.write"分类排序不能为空!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
if not IsNumeric(request("paixu")) then
response.write"分类排序只能为数字!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
if request("topic")="" then
response.write"分类名称不能为空!<a href=javascript:history.back()>返回</a>"
response.End()
else
rs.open"select * from class where id<>"&cint(request("id")),conn,1,1
while not rs.eof
if request("topic")=rs("topic") then
response.write"分类名称已经存在!<a href=javascript:history.back()>返回</a>"
response.End()
end if
rs.movenext
wend
rs.close
rs.open"select * from class where id="&cint(request("id")),conn,1,3
rs("topic")=request("topic")
rs("paixu")=request("paixu")
rs.update
rs.close
response.write"分类修改成功!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
end if%>
<%if request("up")="修改" then
if request("topic")="" then
response.write"分类不能为空!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
else
rs.open"select * from class where topic='"&request("topic")&"'",conn,1,1
id=rs("id")%>
<form method=post action=Ye_FenLei_TG.asp>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=center>
<input type=hidden name="id" value=<%=rs("id")%>>
分类名称:<input type=text size=12 name="topic" value=<%=request("topic")%> > 分类排序:<input type=text size=4 name="paixu" value=<%=rs("paixu")%> > <input type=submit name="up2" value="修改"></td>
</tr>
</table></form>
<%rs.close
response.End()
end if
end if%>
分类:
<select name="topic">
<%rs.open"select * from class",conn,1,1
while not rs.eof%>
<option value=<%=rs("topic")%>><%=rs("topic")%></option>
<%rs.movenext
wend
rs.close%>
</select>
<br>
<input name="del" type="submit" id="del" value="删除">
<input name="up" type="submit" id="up" value="修改">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br>
<!--删除、修改二级分类-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
<tr>
<td>
<form method=post action=Ye_FenLei_TG.asp>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>删除、修改二级分类</strong></td>
</tr>
<tr>
<td align=center><br>
<%if request("del_2")="删除" then
if request("topic")="" then
response.write"分类不能为空!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
else
topic=request("topic")
'删除该主题相关问题和答复
rs2.open"select * from question where topic='"&topic&"'",conn,1,3
while not rs2.eof
rs3.open"select * from reply where replyid="&rs2("id"),conn,1,3
while not rs3.eof
'修改解决数和回复数、积分
rs4.open"select * from person where name='"&rs3("replyer")&"'",conn,1,3
if rs3("isdeal")=1 then
rs4("replynum")=rs4("replynum")-1
rs4("helpnum")=rs4("helpnum")-1
rs4("jifen")=rs4("jifen")-dajiadf-dadf
temp=rs4("jifen")-dajiadf-dadf
else
rs4("replynum")=rs4("replynum")-1
rs4("jifen")=rs4("jifen")-dadf
temp=rs4("jifen")-dadf
end if
if temp<fen2 then
rs4("touxian")=""&ji1&" 一级"
elseif temp>=fen2 and temp<fen3 then
rs4("touxian")=""&ji2&" 二级"
elseif temp>=fen3 and temp<fen4 then
rs4("touxian")=""&ji3&" 三级"
elseif temp>=fen4 and temp<fen5 then
rs4("touxian")=""&ji4&" 四级"
elseif temp>=fen5 and temp<fen6 then
rs4("touxian")=""&ji5&" 五级"
elseif temp>=fen6 and temp<fen7 then
rs4("touxian")=""&ji6&" 六级"
elseif temp>=fen7 and temp<fen8 then
rs4("touxian")=""&ji7&" 七级"
elseif temp>=fen8 and temp<fen9 then
rs4("touxian")=""&ji8&" 八级"
elseif temp>=fen9 and temp<fen10 then
rs4("touxian")=""&ji9&" 九级"
elseif temp>=fen10 then
rs4("touxian")=""&ji10&" 十级"
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -