📄 managenews.asp
字号:
<!--#include file=../common/conn.asp -->
<%
Function ChangeToHtmlStr(CTHStr)
Dim TempStr,i,LenStr
If IsNull(CTHStr) Then
ChangeToHtmlStr=""
Exit Function
End If
LenStr=Len(CTHStr)
TempStr=""
For i=1 To LenStr
Select Case Mid(CTHStr,i,1)
Case "<"
TempStr=TempStr+"<"
Case ">"
TempStr=TempStr+">"
Case "&"
TempStr=TempStr+"&"
Case Chr(34)
TempStr=TempStr+"""
Case Chr(13)
TempStr=TempStr+"<br>"
Case Chr(9)
TempStr=TempStr+" "
Case Chr(32)
TempStr=TempStr+" "
Case Else
TempStr=TempStr+Mid(CTHStr,i,1)
End Select
Next
ChangeToHtmlStr=TempStr
End Function
%>
<%
if request("action")="update" then
sql="update AddHtp set imgpath='"&request("image")&"',caption='"&request("classid")&"',urlpath='"&request("urlpath")&"' where id="&request("id")
conn.execute(sql)
end if
if request("action")="del" then
sql="delete from AddHtp where id="&request("newsid")
conn.execute(sql)
end if
%>
<%
sql="select * from AddHtp order by id desc"
PageSize = 30
If Request("page") ="" Then
page=1
Else
page=Int(Abs(Request("page")))
End if
rs.open sql,conn,1,3
if not rs.eof then
rs.PageSize = PageSize
TotalPage = rs.PageCount
rs.absolutepage = page
total = rs.RecordCount
end if
%>
<html>
<head>
<title>管理广告连接</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Description" CONTENT="">
<link rel="stylesheet" href="../../hs.css" type="text/css">
<link rel="stylesheet" href="../.css" type="text/css">
<link rel="stylesheet" href="../images/font.css" type="text/css">
<link href="../users/.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FED17E" text="#ffffff" background="../images/bgpic.gif">
<br>
<table width="90%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td bgcolor="">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<div align="center">
<p align="left"> <font color="#666666">管理广告连接</font></p>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="">
<tr bgcolor="#E7E7E7">
<td width="9%" height="20" class="unnamed1"> <div align="center"><font color="#666666">编号</font></div></td>
<td height="20" align="center" class="unnamed1"> <div align="center"></div>
动画类型</td>
<td width="20%" height="20" class="unnamed1"> <div align="center"><font color="#666666">时间</font></div></td>
<td height="20" width="12%" class="unnamed1"> <div align="center"><font color="#666666">管理</font></div></td>
</tr>
<%
for i=1 to rs.pagesize
if rs.eof then
exit for
end if
mar=""
if trim(rs("caption"))="img" then
mar="Images 图片"
elseif trim(rs("caption"))="flash" then
mar="Flash 动画"
end if
%>
<tr bgcolor="">
<td width="9%" height="20" align="center" class="unnamed1"> <font color="#666666"><%=rs("id")%> </font></td>
<td height="20" align="center" class="unnamed1"> <%=mar%></td>
<td width="20%" height="20" align="center" class="unnamed1"> <font color="#666666"><%=datevalue(rs("puttime"))%> </font></td>
<td width="12%" align="center" height="20" class="unnamed1"><a href="managenews.asp?action=modify&newsid=<%=rs("id")%>&page=<%=page%>">修改</a> <a href="managenews.asp?action=del&newsid=<%=rs("id")%>&page=<%=page%>" onClick="var a=confirm('确实要删除吗?');if(a==0) return(false);">删除</a></td>
</tr>
<%
rs.movenext
next
%>
<tr bgcolor="">
<td colspan="6" height="20"> <font color="#666666">
<%
If totalpage=1 Then
Response.write "·共有1页·"
End If
If Not Page=1 Then
Response.write "<a href=managenews.asp?page=1>首页</a> "
Response.write "<a href=managenews.asp?page="&Cstr(Page-1)&">前页</a> "
Else
Response.write "首页 "
Response.write "前页 "
End If
If Not Page=totalpage Then
Response.Write "<a href=managenews.asp?page="&Cstr(Page+1)&">后页</a> "
Response.Write "<a href=managenews.asp?page="&PageCount&">尾页</a>"
Else
Response.Write "后页 "
Response.Write "尾页"
End If
%>
<%rs.close%>
</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="">
</td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td> </td>
</tr>
</table>
<%
if request("action")="modify" and request("newsid")<>"" then
session("one")=request("action")
session("two")=request("newsid")
set rs1=server.CreateObject("adodb.recordset")
sql="select * from AddHtp where id="&session("two")
rs1.open sql,conn,3,2
str=""
if trim(rs1("caption"))="img" then
str="Images 图片"
elseif trim(rs1("caption"))="flash" then
str="Flash 动画"
end if
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="83" valign="top">
<form name="form1" action="managenews.asp?action=update&page=<%=page%>" method="post" >
<table width="561" border="0" cellspacing="2" cellpadding="5" align="center">
<tr bgcolor="">
<td width="20%" align="right" class="unnamed1"><font color="#666666">广告动画:</font></td>
<td width="73%" class="unnamed1"> <input name="image" type="text" id="image" value="<%if request("image")="" then
response.write(rs1("imgpath"))
else
response.Write(request("image"))
end if%>"> <a href="login.asp">更换图片
</a> <input name="id" type="hidden" id="id3" value="<%=rs1("id")%>">
<span class="tt3_1"><font color="#FF0000"><strong>(* W-180PX; H-52PX)</strong></font></span>
</td>
</tr>
<tr bgcolor="">
<td width="20%" align="right" class="unnamed1"><font color="#666666">动画类型:</font></td>
<td class="unnamed1"><select name="classid" id="classid" class="button">
<option value="img">Images 图片</option>
<option value="flash">Flash 动画</option>
<option value="<%=rs1("caption")%>" selected><%=str%></option>
</select></td>
</tr>
<tr bgcolor="">
<td width="20%" align="right" class="unnamed1"><font color="#666666">链 接: </font></td>
<td class="unnamed1"><input name="urlpath" type="text" class="button" id="urlpath" value="<%=rs1("urlpath")%>" size="40"></td>
</tr>
<tr bgcolor="">
<td align="right" width="20%" class="unnamed1"> </td>
<td width="73%" class="unnamed1"> <br>
<input type="submit" name="Submit3" value="修 改" class="button">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -