左边列表在线QQ客服
演示地址:http://www.souab.com/Demo/200912/Kfqq/
好久都没来博客了。今天写下。年底了。后天就是2010年。祝大家元旦快乐。
下载附件请用右链另存为。谢谢
Kfqq.rar 21.48KB
演示地址:http://www.souab.com/Demo/200912/Kfqq/
好久都没来博客了。今天写下。年底了。后天就是2010年。祝大家元旦快乐。
下载附件请用右链另存为。谢谢
将以下代码保存为:seeion.asp
<%if session("user")<>"" then%>
<%
else
response.write "<script>alert('您目前的操作需要登陆手才能进行');window.location.href='login.asp';</script>"
response.end
end if
%>
由于md5.asp及验证码生成code.asp文件过长。此处不贴源码。请右键下载附件。
将以下代码保存为:login.asp
<!--#include file="conn.asp" -->
<!--#include file="md5.asp" -->
<%
if session("usre")<>"" then
response.redirect "adminnews.asp"
else
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理登陆</title>
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: #000000;
margin:0px auto;
line-height:25px;
}
.table {
margin-top:80px;
border:1px #e6e6e6 solid;
}
.title {
line-height:30px;
text-align:right;
background:#FAFAFA;
}
.input {
font-size:14px;
border-top:#CDCDCD 1px solid;
border-left:#CDCDCD 1px solid;
border-right:#eeeeee 1px solid;
border-bottom:#eeeeee 1px solid;
height:18px;color:#333333;
vertical-align:middle;
padding:1px;
letter-spacing:0px;
background-color:#FAFAFA;
}
-->
</style>
</head>
<body>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
<form id="form1" name="form1" method="post" action="loginchk.asp">
<tr>
<td width="100" class="title">用户名:</td>
<td><input name="user" type="text" class="input" id="user" /></td>
</tr>
<tr>
<td class="title">密 码:</td>
<td><input name="pass" type="password" class="input" id="pass" /></td>
</tr>
<tr>
<td class="title">验证码:</td>
<td><input name="VerifyCode" type="text" class="input" id="VerifyCode" style="width:100px;"/> <img src="code.asp?" alt="图片看不清?点击重新得到验证码" width="60" height="20" align="absmiddle" style="cursor:hand;" onClick="this.src+=Math.random()" /></td>
</tr>
<tr>
<td class="title"> </td>
<td><input name="Submit" type="submit" value="登 录" />
<input type="reset" name="Submit2" value="重置" /></td>
</tr>
</form>
</table>
</body>
</html>
将以下代码保存为:template.asp
<!--#include file="conn.asp" -->
<!--#include file="seeion.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改模板</title>
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: #000000;
margin:0px auto;
line-height:25px;
}
.table {
margin-top:80px;
border:1px #e6e6e6 solid;
}
.title {
line-height:30px;
text-align:left;
padding-left:20px;
font-size:16px;
background:#FAFAFA;
}
-->
</style>
</head>
<body>
<%
dim action,add,moban
action=request("action")
moban=request("moban")
if action="add" then
dim rs2,sql2
set rs2=server.CreateObject("adodb.recordset")
sql2="select * from template"
rs2.open sql2,conn,1,3
rs2("moban")=moban
rs2.update
rs2.close
set rs2=nothing
'response.Redirect("template.asp")
Response.Write "<script>alert('修改成功!');window.location.href='template.asp';</script>"
end if
%>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from template"
rs.open sql,conn,1,1
%>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
<form action="template.asp?action=add" method="post">
<tr>
<td class="title">编辑模板</td>
</tr>
<tr>
<td class="title"><textarea name="moban" cols="100" rows="30" id="moban"><%=rs("moban")%></textarea></td>
</tr>
<tr>
<td class="title"><input type="submit" name="Submit" value="提交" /> </td>
</tr>
</form>
</table>
<%
rs.close
set rs=nothing
%>
</body>
</html>
将以下文件保存为:del.asp
<!--#include file="conn.asp" -->
<%
id = request.querystring("id")
sql = "Select * from news where id="&id
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.Open sql,conn,2,3
filepath=rs("filepath")
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile(Server.mappath(filepath))
Set fso = nothing
rs.delete
rs.close
Set rs = Nothing
conn.close
set conn=nothing
response.write "<script>alert('成功删除指定的文件!');window.location.href='adminnews.asp';</script>"
%>
最新评论
真是很精彩
第一页打开可以...
我按你的方法去...
Yes, probably so it ...
好,学习了。
不懂恋爱鱼儿!...
实用.我喜欢
多谢.一次性解决...
很好,收藏了
删除后不能发表...