📄 admin_wztxt.asp
字号:
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/MyFunction.Asp"-->
<% call master %>
<% l=request.QueryString("l")
select case l
case "add"
wzadd
case "edit"
wzedit
case else
wzgl
end select %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文章</title>
<link href="../css/admincss.css" rel="stylesheet" type="text/css">
</head>
<body>
<%set t2=conn.execute("Select * From munexx where m_type=2 Order by m_order Asc")%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not t2.eof
%>
subcat[<%=count%>] = new Array("<%= trim(t2(1))%>","<%= trim(t2(3))%>","<%= trim(t2(0))%>");
<%
count = count + 1
t2.movenext
loop
t2.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.formfb.type2.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.formfb.type2.options[document.formfb.type2.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<% sub wzgl %>
<table width="80%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#0099CC">
<tr bgcolor="#FFFFFF">
<td colspan="5" align="center" height="25">文章管理</td>
</tr>
<% set wz=server.CreateObject("adodb.recordset")
wz.open"select t_id,mid1,mid2,t_tit,t_hits,t_show from wzxx order by t_id desc",conn,1,1
if wz.eof then %>
<tr bgcolor="#FFFFFF">
<td colspan="5" align="center">暂无文章!</td>
</tr>
<% Else
mypage=request("page")
if mypage="" or mypage<1 then
mypage=1
end if %>
<tr bgcolor="#8EDBFF">
<td width="12%" align="center">所属大类</td>
<td width="12%" align="center">所属小类</td>
<td width="55%" align="center">文章标题</td>
<td width="6%" align="center">人气</td>
<td width="15%" align="center">操作</td>
</tr>
<% wz.pagesize=20
rec=cint(wz.pagesize)
maxpage=cint(wz.pagecount)
sum=wz.recordcount
wz.absolutepage=mypage
cs=""
csz=""
i=0
do until wz.eof or i=20 %>
<tr bgcolor="#FFFFFF">
<td align="center"><% set t1=conn.execute("select m_name from munexx where m_id=" & wz(1) & "") %>
<%= t1(0) %>
<% t1.close
set t1=nothing %></td>
<td align="center"><% set t2=conn.execute("select m_name from munexx where m_id=" & wz(2) & "") %>
<%= t2(0) %>
<% t2.close
set t2=nothing %></td>
<td> <%= wz(3) %></td>
<td align="center"><%= wz(4) %></td>
<td align="center"><% If wz(5)=true Then %><a href="admin_do.asp?act=wzshow&s=false&id=<%= wz(0) %>">隐藏</a><% Else %><a href="admin_do.asp?act=wzshow&s=true&id=<%= wz(0) %>">显示</a><% End If %> <a href="?l=edit&id=<%= wz(0) %>">修改</a> <a href="admin_do.asp?act=wzdel&id=<%= wz(0) %>" onClick="{if(confirm('确定要删除吗?')){return true;}return false;}">删除</a></td>
</tr>
<% wz.movenext
i=i+1
loop
scriptname=request.ServerVariables("SCRIPT_NAME") %>
<tr bgcolor="#FFFFFF">
<td align="center" colspan="5"><% call pagelist(sum,rec,maxpage,mypage,scriptname,cs,csz) %></td>
</tr>
<% End If
wz.close
set wz=nothing %>
</table>
<% end sub %>
<% sub wzadd %>
<table width="80%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#0099CC">
<tr bgcolor="#3CBFFF">
<td height="25" colspan="2" align="center">添加文章</td>
</tr>
<form method="post" name="formfb" action="admin_do.asp?act=wzadd">
<tr bgcolor="#FFFFFF">
<td width="80" align="right">选择分类:</td>
<td><select name="type1" id="type1" onChange="changelocation(document.formfb.type1.options[document.formfb.type1.selectedIndex].value)">
<option value="" selected>=请选择大类=</option>
<%set t1=conn.execute("Select m_id,m_name From munexx where m_type=1 order by m_order asc")
Do while Not t1.eof
response.write "<option value='"&t1(0)&"'>"&t1(1)&"</option>"
t1.MoveNext()
loop
t1.Close()
set t1=Nothing%>
</select>
<select name="type2" id="type2">
<option value="" selected>=请选择小类=</option>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章标题:</td>
<td><input name="t_tit" type="text" id="t_tit" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章作者:</td>
<td><input name="zuozhe" type="text" id="zuozhe" value="不详" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章收集:</td>
<td><input name="soji" type="text" id="soji" value="ァOnE LoVEㄣ" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章内容:</td>
<td><textarea name="t_con" cols="1" rows="1" style="display:none "></textarea>
<IFRAME ID="Editor1" SRC="../editor.asp?id=t_con&style=mis8" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350">
</IFRAME></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">是否显示:</td>
<td><input name="t_show" type="radio" value="true" checked>显示
<input type="radio" name="t_show" value="false">隐藏</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right"> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr></form>
</table>
<% end sub %>
<% sub wzedit
id=request.QueryString("id")
set rs=conn.execute("select * from wzxx where t_id=" & id & "") %>
<table width="80%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#0099CC">
<tr bgcolor="#3CBFFF">
<td height="25" colspan="2" align="center">修改文章</td>
</tr>
<form method="post" name="formfb" action="admin_do.asp?act=wzed">
<tr bgcolor="#FFFFFF">
<td width="80" align="right">选择分类:</td>
<td><select name="type1" id="type1" onChange="changelocation(document.formfb.type1.options[document.formfb.type1.selectedIndex].value)">
<%set t1=conn.execute("Select m_id,m_name From munexx where m_id=" & rs(1) & "")%>
<option value="<%= t1(0) %>" selected><%= t1(1) %></option>
<% t1.Close()
set t1=Nothing %>
<%set t1=conn.execute("Select m_id,m_name From munexx where m_type=1 and m_id<>" & rs(1) & " order by m_order asc")
Do while Not t1.eof
response.write "<option value='"&t1(0)&"'>"&t1(1)&"</option>"
t1.MoveNext()
loop
t1.Close()
set t1=Nothing%>
</select>
<select name="type2" id="type2">
<%set t2=conn.execute("Select m_id,m_name From munexx where m_id=" & rs(2) & "")%>
<option value="<%= t2(0) %>" selected><%= t2(1) %></option>
<% t2.close
set t2=nothing %>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章标题:</td>
<td><input name="t_tit" type="text" id="t_tit" size="30" value="<%= rs(3) %>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章作者:</td>
<td><input name="zuozhe" type="text" id="zuozhe" value="<%= rs(8) %>" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章收集:</td>
<td><input name="soji" type="text" id="soji" value="<%= rs(9) %>" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">文章内容:</td>
<td><textarea name="t_con" cols="1" rows="1" style="display:none "><%= rs(4) %></textarea>
<IFRAME ID="Editor1" SRC="../editor.asp?id=t_con&style=mis8" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350">
</IFRAME></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">是否显示:</td>
<td><input name="t_show" type="radio" value="true" <% If rs(7)=true Then %>checked<% End If %>>显示
<input type="radio" name="t_show" value="false" <% If rs(7)=false Then %>checked<% End If %>>隐藏</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right"> </td>
<td><input name="id" type="hidden" id="id" value="<%= id %>">
<input type="submit" name="Submit" value="提交"></td>
</tr></form>
</table>
<% end sub %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -