📄 ye_fenlei_tg.asp
字号:
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
'
rs.open"select * from assort 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_2")="修改" 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 assort 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
'更新问题中的topic字段
rs.open"select * from assort where id="&cint(request("id")),conn,1,1
oldtopic=rs("topic")
rs.close
rs.open"select * from question where topic='"&oldtopic&"'",conn,1,3
while not rs.eof
rs("topic")=request("topic")
rs.update
rs.movenext
wend
rs.close
'response.write cint(request.("id"))
'response.End()
rs.open"select * from class where topic='"&request("topic1")&"'",conn,1,1
sxid=rs("id")
rs.close
rs.open"select * from assort where id="&cint(request("id")),conn,1,3
rs("topic")=request("topic")
rs("shuxing")=sxid
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_2")="修改" 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 assort where topic='"&request("topic")&"'",conn,1,1
id=rs("id")%><form method=post action=Ye_FenLei_TG.asp>
<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")%> > 现属分类:<font color="#FF0000">
<%rs2.open"select * from class where id="&rs("shuxing")&"",conn,1,1%><%=rs2("topic")%></font> 修改为:
<select name="topic1">
<%rs1.open"select * from class",conn,1,1
while not rs1.eof
%>
<option <%if rs1("topic")=rs2("topic") then%>selected<%end if%> value=<%=rs1("topic")%>><%=rs1("topic")%></option>
<%
rs1.movenext
wend
rs1.close%>
</select><%rs2.close%>
<%end if%>
<input type=submit name="up2_2" value="修改">
<br></td>
</tr>
</form>
<%rs.close
response.End()
end if%><form method=post action=Ye_FenLei_TG.asp>
分类:
<select name="topic">
<%rs.open"select * from assort",conn,1,1
while not rs.eof%>
<option value=<%=rs("topic")%>><%=rs("topic")%></option>
<%rs.movenext
wend
rs.close%>
</select>
<br>
<input name="del_2" type="submit" id="del_2" value="删除">
<input name="up_2" type="submit" id="up_2" value="修改">
</form>
</table>
</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("add")="添加一级分类" 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"分类名称不能为空!<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
if not rs.eof then
rs.close
response.write"该分类名称已经存在!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
else
rs.close
rs.open"select * from class",conn,1,3
rs.addnew
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
end if%>
分类名称:
<input name="topic" type="text" size=12> 分类排序:<input type=text size=4 name="paixu"> <input name="add" type="submit" 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("add2")="添加二级分类" then
if request("paixu2")="" then
response.write"分类排序不能为空!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
if not IsNumeric(request("paixu2")) then
response.write"分类排序只能为数字!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
if request("topic2")="" then
response.write"分类名称不能为空!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
else
rs.open"select * from assort where topic='"&request("topic2")&"'",conn,1,1
if not rs.eof then
rs.close
response.write"该分类名称已经存在!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
else
rs.close
rs.open"select * from assort",conn,1,3
rs.addnew
rs("topic")=request("topic2")
rs("shuxing")=request("yjfl")
rs("paixu")=request("paixu2")
rs.update
rs.close
response.write"分类添加成功!<meta http-equiv=refresh content='1;url=Ye_FenLei_TG.asp'>"
response.End()
end if
end if
end if%>
分类名称:
<input name="topic2" type="text" size=12> 分类排序:<input type=text size=4 name="paixu2"> 所属分类:<select name="yjfl">
<%rs3.open"select * from class",conn,1,1
while not rs3.eof%>
<option value=<%=rs3("id")%>><%=rs3("topic")%></option>
<%rs3.movenext
wend
rs3.close%>
</select>
<input name="add2" type="submit" value="添加二级分类"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br><!--#include file=Ye_End.asp-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -