📄 admin_plus.asp
字号:
高度:
<input name="height" type="text" id="height" size="10"></td>
</tr>
<tr>
<td height="15" colspan="2" class=forumrow>
<input type="submit" name="Submit" value="添 加">
</td>
</tr>
</table>
</form>
<%
end sub
sub editlink()
set rs= server.createobject ("adodb.recordset")
sql = "select * from plus where id="&Request("id")
rs.open sql,connplus,1,1
%>
<form action="admin_plus.asp?action=savedit&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>" method=post>
<input type=hidden name=id value=<%=Request("id")%>>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th width="100%" colspan=2 height=25>编辑插件</th>
</tr>
<tr>
<td width="40%" class=forumrow>插件名称:</td>
<td width="60%" class=forumrow>
<input type="text" name="name" size=40 value=<%=rs("plusname")%>>
</td>
</tr>
<tr>
<td width="40%" class=forumrow>插件连接文件:</td>
<td width="60%" class=forumrow>
<input type="text" name="url" size=40 value=<%=rs("url")%>>
</td>
</tr>
<tr>
<td width="40%" class=forumrow>插件简介:</td>
<td width="60%" class=forumrow>
<input type="text" name="readme" size=40 value=<%=rs("readme")%>>
</td>
</tr>
<tr>
<td width="40%" height=25 class=forumrow>本插件是否在新页面中打开 </td>
<td width="60%" class=forumrow><input name=wind type=radio value=1 <%if rs("wind")=" " then response.write "checked"%>>
本页面
<input type=radio name=wind value=2 <%if rs("wind")="target=_blank" then response.write "checked"%>>
新页面 (标准)
<input type="radio" name="wind" value="3" <%if rs("wind")="limit" then response.write "checked"%>>
新页面 (限制)</td>
</tr>
<tr>
<td width="40%" height=25 class=forumrow>新窗口大小(只有上面选择了限制新页面才需填写)</td>
<td width="60%" class=forumrow>宽度:
<input name="width" type="text" id="width" size="10" <%if rs("wind")="limit" then response.write "value="&rs("width")%>>
高度:
<input name="height" type="text" id="height" size="10" <%if rs("wind")="limit" then response.write "value="&rs("height")%>></td>
</tr>
<tr>
<td height="15" colspan="2" class=forumrow>
<div align="center">
<input type="submit" name="Submit" value="修 改">
</div>
</td>
</tr>
</table>
</form>
<%
rs.close
set rs=nothing
end sub
sub plusinfo()
set rs= server.createobject ("adodb.recordset")
sql = " select * from plus where zhuid="&request("zhuid")&" order by plusid"
rs.open sql,connplus,1,1
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th height="22" width="80"><a href="?action=zhuinfo"><font color="#FFFFFF"><-返回组管理</font></a></th>
<th height="22" colspan=3><font color=white><%=request("zhuname")%></font>->插件列表
| <a href="?action=add&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>"><font color=#FFFFFF>增加新的插件
</font></a>| <a href="?action=orders&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>"><font color=#FFFFFF>分类排序</font></a></th>
</tr>
<tr align=center>
<td width="85" height=25 class="forumHeaderBackgroundAlternate"><B>插件ID</B></td>
<td width="288" class="forumHeaderBackgroundAlternate"><b>插件名</b></td>
<td width="132" class="forumHeaderBackgroundAlternate"><b>是否在新页面打开</b></td>
<td width="207" class="forumHeaderBackgroundAlternate"><B>操作</B></td>
</tr>
<%if not rs.eof then
do while not rs.eof
Tlink=split(rs(2),"$")
%>
<tr align=center>
<td height=25 class=forumrow width="85"><font color=red><%=rs("plusid")%></font></td>
<td class=forumrow width="288"><%=rs("plusname")%></a></td>
<% dim window
if rs("wind")="target=_blank" then
window="是"
elseif rs("wind")="limit" then
window="是(限制)"
else
window="否"
end if
%>
<td class=forumrow width="132"><%=window%></td>
<td class=forumrow width="207"> <a href="admin_plus.asp?action=edit&id=<%=rs("id")%>&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>">编辑</a>
<a href="admin_plus.asp?action=del&id=<%=rs("id")%>&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>">删除</a></td>
</tr>
<%
rs.movenext
loop
else
response.write "<tr><td colspan='4' class=forumrow><div align='center'>目前这个组中还没有插件!</div></td></tr>"
end if
rs.Close
set rs=nothing
%>
</table>
<%
end sub
sub savenew()
if Request("url")<>"" and Request("readme")<>"" and request("name")<>"" then
if request("wind")=3 then
if request("width")="" or request("height")="" then
body=body+"<br>"+"请输入完整插件信息。"
exit sub
elseif not (isnumeric(request("width")) and isnumeric(request("height"))) then
body=body+"<br>"+"请输入的长或宽不是有效数字。"
exit sub
end if
end if
dim linknum,windows
set rs= server.createobject ("adodb.recordset")
sql = "select * from plus where zhuid="&request("zhuid") &" order by id desc"
rs.Open sql,connplus,1,3
if rs.eof and rs.bof then
linknum=1
else
linknum=rs("plusid")+1
end if
if Request.Form ("wind")=2 then
windows="target=_blank"
elseif request("wind")=3 then
windows="limit"
else
windows=" "
end if
rs.AddNew
rs("plusid")=linknum
rs("plusname") = Trim(Request.Form ("name"))
rs("readme") = Trim(Request.Form ("readme"))
rs("url") = Request.Form ("url")
rs("wind")=windows
if windows="limit" then
rs("width")=request("width")
rs("height")=request("height")
end if
rs("zhuid")=request("zhuid")
dim rszhu
set rszhu=connplus.execute ("select zhuname from zhu where zhuid="&request("zhuid"))
rs("zhuname")=rszhu(0)
rs.Update
rs.Close
set rs=nothing
response.redirect "?action=plusinfo&zhuid="&request("zhuid")&"&zhuname="&request("zhuname")
else
body=body+"<br>"+"请输入完整插件信息。"
end if
end sub
sub savedit()
if request("name")="" or request("readme")="" or request("url")="" then body=body+"<br>"+"请输入完整插件信息。":exit sub
if request("wind")=3 and (request("width")="" or request("height")="") then body=body+"<br>"+"请输入完整插件信息。":exit sub
set rs= server.createobject ("adodb.recordset")
sql = "select * from plus where id="&request("id")
rs.Open sql,connplus,1,3
if rs.eof and rs.bof then
body=body+"<br>"+"错误,没有找到插件。"
else
if Request.Form("wind")=2 then
rs("wind")="target=_blank"
elseif request("wind")=3 then
rs("wind")="limit"
rs("width")=request("width")
rs("height")=request("height")
else
rs("wind")=" "
end if
rs("plusname") = Trim(Request.Form ("name"))
rs("readme") = Trim(Request.Form ("readme"))
rs("url") = Request.Form ("url")
rs.Update
end if
rs.Close
set rs=nothing
response.redirect "?action=plusinfo&zhuid="&request("zhuid")&"&zhuname="&request("zhuname")
end sub
sub del
dim id
id = request("id")
sql="delete from plus where id="+id
connplus.Execute(sql)
response.redirect "?action=plusinfo&zhuid="&request("zhuid")&"&zhuname="&request("zhuname")
end sub
sub orders()
if request("submit")<>"" then
set rs = server.CreateObject ("Adodb.recordset")
sql="select * from plus where zhuid="&request("zhuid")&" order by plusid"
rs.open sql,connplus,1,3
do while not rs("plusid")=cint(request("plusid"))
rs.movenext
loop
if request("orderaction")="向下" then
rs.movenext
dim temp1
temp1=rs("plusid")
rs("plusid")=cint(request("plusid"))
rs.update
rs.MovePrevious
rs("plusid")=temp1
rs.update
else
rs.MovePrevious
dim temp2
temp2=rs("plusid")
rs("plusid")=cint(request("plusid"))
rs.movenext
rs("plusid")=temp2
rs.update
end if
rs.close
set rs=nothing
end if
set rs = server.CreateObject ("Adodb.recordset")
sql="select * from plus where zhuid="&request("zhuid")&" order by plusid"
rs.open sql,connplus,1,1
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th height=14 colspan="4"><font color=white><%=request("zhuname")%></font>-><a href="?action=plusinfo&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>"><font color="#FFFFFF">插件列表</font></a>
| <a href="?action=add&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>"><font color=#FFFFFF>增加新的插件
</font></a>| <font color=#FFFFFF><strong>分类排序</strong></font></th>
</tr>
<tr>
<td width="85" height=25 class="forumHeaderBackgroundAlternate"><B>
<center>
插件ID
</center>
</B></td>
<td width="288" class="forumHeaderBackgroundAlternate"><b>
<center>
插件名
</center>
</b></td>
<td width="132" class="forumHeaderBackgroundAlternate"><b>
<center>
操作
</center>
</b></td>
<td width="207" class="forumHeaderBackgroundAlternate"><B>
<center>
修改
</center>
</B></td>
</tr>
<%
if rs.bof and rs.eof then
response.write "该组内没有插件!"
else
do while not rs.eof%>
<form name=orders action="admin_plus.asp?action=orders&plusid=<%=rs("plusid")%>&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>" method = post>
<tr>
<td height=23 class=forumrow> <div align="center"> <%=rs("plusid")%> </div></td>
<td class=forumrow><div align="center"><%=rs("plusname")%></div></td>
<td class=forumrow><div align="center">
<select name="orderaction" id="orderaction">
<%
dim bos,big,small
set bos=connplus.execute ("select * from plus where plusid>"&rs("plusid")&" and zhuid="&request("zhuid"))
if bos.eof then big=true else big=false
set bos=connplus.execute ("select * from plus where plusid<"&rs("plusid")&" and zhuid="&request("zhuid"))
if bos.eof then small=true else small=false
%>
<%if not big then%>
<option>向下</option>
<%end if%>
<%if not small then%>
<option>向上</option>
<%end if
if rs.recordcount=1 then response.write "<option>无需操作</option>"
%>
</select>
</div></td>
<td height=23 class=forumrow> <div align="center">
<input name="submit" type="submit" id="submit" value="修改">
</div></td>
</tr>
<%if rs.recordcount=1 then
%>
<script language="javascript">
document.orders.submit.disabled=true
</script>
<%
end if%>
</form>
<% rs.movenext
loop
end if
rs.close
set rs=nothing
%>
</table>
<%
end sub
sub updateorders()
if isnumeric(request("id")) and isnumeric(request("newid")) and request("newid")<>request("id") then
set rs=connplus.execute("select id from plus where id="&request("newid"))
if rs.eof and rs.bof then
sql="update plus set id="&request("newid")&" where id="&cstr(request("id"))
connplus.execute(sql)
response.write "更新成功!"
else
response.write "更新失败,您指定了和其他插件相同的序号!"
end if
else
response.write "更新失败!您输入的字符不合法,或者输入了和原来相同的序号!"
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -