?? admin.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
'=====================================================================================
'找錯誤個人主頁(整合版)
'作者:找錯誤
'網(wǎng)地:www.fj19.net
'email:fjjc01@126.com
'=====================================================================================
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
scrollbar-face-color: #B9E4B2;
scrollbar-highlight-color: #B9E4B2;
scrollbar-shadow-color: #1DA706;
scrollbar-3dlight-color: #1DA706;
scrollbar-arrow-color: #1DA706;
scrollbar-darkshadow-color:#B9E4B2;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(img/bg22.gif);
background-position:center;
margin-left: 0px;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #009933;
}
a {
font-family: 宋體;
font-size: 12px;
}
.an { background-color: #FFFFFF;
border: 1pt dashed #B9E4B2;
font-family: "宋體";
font-size: 12px;
font-weight: normal;
color: #00CC33;
}
a:link {
color: #009933;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #009933;
}
a:hover {
text-decoration: none;
color: #CCFF00;
}
a:active {
text-decoration: none;
color: #CCFF00;
}
a:link {
color: #009933;
text-decoration: none;
}
-->
</style>
<title>管理</title>
</head>
<body>
<table width="492" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF">
<tr>
<td width="480" bgcolor="#FFFFFF"><table width="100%" height="3" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="3" bgcolor="#009933"></td>
</tr>
</table>
<br>
<table width="437" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="middle">
<td><a href="admin.asp?class=about">關(guān)于</a></td>
<td><a href="admin.asp?class=music">音樂</a></td>
<td><a href="admin.asp?class=zp">作品</a></td>
<td><a href="admin.asp?class=xq">日記</a></td>
<td><a href="admin.asp?class=book">留言</a></td>
<td><a href="admin.asp?class=change">密碼</a></td>
<td><a href="logout.asp">退出</a></td>
</tr>
</table>
<br>
<table width="100%" height="3" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="3" bgcolor="#009933"></td>
</tr>
</table>
<br>
<br>
<%
dim cl
dim act
dim id
id=request("id")
cl=request("class")
act=request("action")
call ConnectionDatabase
select case cl
case "about"
set Rs=GrateRs("select * from yuaner_about",3)
if act="submit" then
Rs("content")=request("content")
Rs.update
response.write("更新成功")
end if
%>
<form name="form1" method="post" action="admin.asp?class=about&action=submit">
<textarea name="content" cols="70" rows="20" class="an"><%=Rs("content")%></textarea>
<br>
<br>
<input name="Submit" type="submit" class="an" value="提交">
</form>
<%
case "music"
if request("dd")<>"" then
set Rs=GrateRs("select * from yuaner_music where id="&id,3)
select case request("dd")
case 1
Rs("title")=request("title")
Rs("content")=request("content")
Rs("url")=request("url")
Rs("Lyric")=request("Lyric")
response.write "更新成功"
case 2
Rs.addnew
Rs("title")=request("title")
Rs("content")=request("content")
Rs("url")=request("url")
Rs("Lyric")=request("Lyric")
response.write "更新成功"
case 3
Rs.delete
response.write "刪除成功"
id=""
end select
Rs.update
response.write("<br>")
end if
set Rs=GrateRs("select * from yuaner_music",1)
do while not Rs.eof
response.write ("<a href='admin.asp?class=music&id="&Rs("id")&"'>"&Rs("title")&"</a> ")
Rs.movenext
loop
if id<>"" then
set Rs=GrateRs("select * from yuaner_music where id="&id,1)
%>
<form name="form2" method="post" action="<%="admin.asp?class=music&id="&Rs("id")%>">
<input name="title" type="text" class="an" id="title" value="<%=Rs("title")%>" size="70">
<br>
<br>
<textarea name="content" cols="70" rows="5" class="an" id="content"><%=Rs("content")%></textarea>
<br>
<br>
<textarea name="Lyric" cols="70" rows="10" class="an" id="Lyric"><%=Rs("Lyric")%></textarea>
<br>
<br>
<input name="url" type="text" class="an" value="<%=Rs("url")%>" size="70">
<br>
<br>
<input name="dd" type="radio" class="an" value="1" checked>
保存
<input name="dd" type="radio" class="an" value="2">
新增
<input name="dd" type="radio" class="an" value="3">
刪除 <br>
<br>
<input name="Submit" type="submit" class="an" value="提交">
</form>
<%
end if
case "zp"
if request("dd")<>"" then
set Rs=GrateRs("select * from yuaner_zp where id="&id,3)
select case request("dd")
case 1
Rs("title")=request("title")
Rs("content")=request("content")
Rs("p1")=request("p1")
Rs("p2")=request("p2")
Rs("link")=request("link")
response.write "更新成功"
case 2
Rs.addnew
Rs("title")=request("title")
Rs("content")=request("content")
Rs("p1")=request("p1")
Rs("p2")=request("p2")
Rs("link")=request("link")
response.write "更新成功"
case 3
Rs.delete
response.write "刪除成功"
id=""
end select
Rs.update
response.write("<br>")
end if
set Rs=GrateRs("select * from yuaner_zp",1)
do while not Rs.eof
response.write ("<a href='admin.asp?class=zp&id="&Rs("id")&"'>"&Rs("title")&"</a> ")
Rs.movenext
loop
if id<>"" then
set Rs=GrateRs("select * from yuaner_zp where id="&id,1)
%>
<form name="form3" method="post" action="<%="admin.asp?class=zp&id="&Rs("id")%>">
<input name="title" type="text" class="an" id="title" value="<%=Rs("title")%>" size="70">
<br>
<br>
<textarea name="content" cols="70" rows="5" class="an" id="content"><%=Rs("content")%></textarea>
<br>
<br>
<input name="p1" type="text" class="an" id="p1" value="<%=Rs("p1")%>" size="70">
<br>
<br>
<input name="p2" type="text" class="an" id="p2" value="<%=Rs("p2")%>" size="70">
<br>
<br>
<input name="link" type="text" class="an" id="link" value="<%=Rs("link")%>" size="70">
<br>
<br>
<br>
<input name="dd" type="radio" class="an" value="1" checked>
保存
<input name="dd" type="radio" class="an" value="2">
新增
<input name="dd" type="radio" class="an" value="3">
刪除 <br>
<br>
<input name="Submit" type="submit" class="an" value="提交">
</form>
<%
end if
case "xq"
if request("dd")<>"" then
set Rs=GrateRs("select * from yuaner_xq where id="&id,3)
select case request("dd")
case 1
Rs("title")=request("title")
Rs("content")=request("content")
response.write "更新成功"
case 2
Rs.addnew
Rs("title")=request("title")
Rs("content")=request("content")
response.write "更新成功"
case 3
Rs.delete
response.write "刪除成功"
id=""
end select
Rs.update
response.write("<br>")
end if
set Rs=GrateRs("select * from yuaner_xq",1)
do while not Rs.eof
response.write ("<a href='admin.asp?class=xq&id="&Rs("id")&"'>"&Rs("title")&"</a> ")
Rs.movenext
loop
if id<>"" then
set Rs=GrateRs("select * from yuaner_xq where id="&id,1)
%>
<form name="form4" method="post" action="<%="admin.asp?class=xq&id="&Rs("id")%>">
<input name="title" type="text" class="an" id="title" value="<%=Rs("title")%>" size="70">
<br>
<br>
<textarea name="content" cols="70" rows="20" class="an" id="content"><%=Rs("content")%></textarea>
<br>
<br>
<br>
<input name="dd" type="radio" class="an" value="1" checked>
保存
<input name="dd" type="radio" class="an" value="2">
新增
<input name="dd" type="radio" class="an" value="3">
刪除 <br>
<br>
<br>
<input name="Submit" type="submit" class="an" value="提交">
</form>
<p>
<%
end if
case "book"
dim cc
cc=4
pag=request("pag")
if pag="" then pag=0
select case act
case "delete"
set Rs=GrateRs("select * from yuaner_book where id="&id,3)
Rs.delete
Rs.update
case "re"
set Rs=GrateRs("select * from yuaner_book where id="&id,1)
%>
</p>
<form name="form6" method="post" action="<%="admin.asp?class=book&action=update&id="&id%>">
<textarea name="re" cols="70" rows="5" class="an" id="re"><%=Rs("re")%></textarea><br>
<br>
<input name="Submit" type="submit" class="an" value="提交">
</form><br>
<br>
<br>
<p> <%
case "update"
set Rs=GrateRs("select * from yuaner_book where id="&id,3)
Rs("re")=request("re")
Rs.update
end select
set Rs=GrateRs("select * from yuaner_book",1)
if not Rs.eof then Rs.movelast
for i = 1 to pag*cc
Rs.moveprevious
if Rs.eof then exit for
next
i=0
do while not Rs.bof
response.Write(" ◇ "&ReplStr(Rs("content")))
response.Write("<div align='right'>留言人:"&Rs("name")&" <br>"&Rs("date")&" </div>")
if trim(Rs("re"))="0" then
response.write("<br>")
else
response.Write("<font color=#88B880> [回復(fù):"&Rs("re")&"]</font><br><br>")
end if
response.Write("<a href=admin.asp?class=book&action=delete&id="&Rs("id")&">刪除</a> ")
response.Write("<a href=admin.asp?class=book&action=re&id="&Rs("id")&">回復(fù)</a>  <hr><br>")
i=i+1
if i=cc then exit do
Rs.moveprevious
loop
response.write("<br>共"&int(Rs.recordcount/cc)+1&"頁,第"&pag+1&"頁 ")
response.write("<a href=admin.asp?class=book&pag=0>第一頁</a> ")
if not pag=0 then
response.write("<a href=admin.asp?class=book&pag="&pag-1&">上一頁</a> ")
else
response.write("上一頁 ")
end if
if not Rs.bof then
response.write("<a href=admin.asp?class=book&pag="&pag+1&">下一頁</a> ")
else
response.write("下一頁 ")
end if
response.write("<a href=admin.asp?class=book&pag="&int(Rs.recordcount/cc)&">最后一頁</a> ")
case "change"
if act="submit" then
%>
<!--#include file="md5.asp"-->
<%
session("username")=request("username")
session("password")=md5(request("password"))
%>
<!--#include file="check.asp"-->
<%
call ConnectionDatabase
set Rs=GrateRs("select * from yuaner_admin",3)
Rs("username")=request("newname")
Rs("password")=md5(request("newpass"))
session("username")=request("newname")
session("password")=md5(request("newpass"))
Rs.update
response.write "密碼修改成功!"
end if
%>
</p>
<form name="form5" method="post" action="admin.asp?class=change&action=submit">
<input name="username" type="text" class="an" id="username">
<br>
<input name="password" type="password" class="an" id="password">
<br>
<input name="newname" type="text" class="an" id="newname">
<br>
<input name="newpass" type="password" class="an" id="newpass">
<br>
<input name="Submit" type="submit" class="an" value="提交">
</form>
<p>
<%
end select
call DBConnEnd
%>
</p>
<table width="100%" height="3" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="3" bgcolor="#009933"></td>
</tr>
</table>
<div align="center"> 版權(quán)所有:找錯誤</div>
<table width="100%" height="3" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="3" bgcolor="#009933"></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -