📄 add_pic.asp
字号:
<%
if session("flag")=1 or session("flag")=2 then
%>
<html>
<head>
<title>添加图片</title>
<link rel=stylesheet type=text/css href=style/style.css>
</head>
<body bgcolor="#799AE1">
<!--#include file="pic_conn.asp"-->
<%
dim action,picid,id
action=request.QueryString("action")
picid=request.QueryString("picid")
select case action
case "addpic"
set Rs=GrateRs("select * from pic",3)
Rs.movelast
%>
<p> </p>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<form name="form1" method="POST" action="add_pic.asp?action=updata&picid=<%=Rs("picid")%>">
<tr>
<td width="100%" align="center">
<table border=0 cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="87%" class=c1>
<tr>
<td class=c2 colspan="2" height="46" align="center">
<p style="margin: 5"><b><font face="Verdana" size="3">添加图片</font></b></td>
</tr>
<tr>
<td width="14%" class=c2>
<p style="line-height: 150%; margin: 5"> <b>图片标题:</b></td>
<td width="85%" class=c3> <input type=text name=pictitle1 size=50 maxlength=50></td>
</tr>
<tr>
<td class=c2>
<p style="margin: 5"> <b>图片类型:</b></td>
<td class=c3><p style="line-height: 150%; margin: 4">
<select size="1" name="pictype1">
<option selected value="请选择图片类型">请选择图片类型</option>
<%
set Rs=GrateRs("select * from type",3)
if not Rs.eof then
do while not Rs.eof
%>
<option value="<%=Rs("typeid")%>">=====<%=Rs("type")%>=====</option>
<%
Rs.movenext
loop
end if
Rs.close
%>
</select></p>
</td>
</tr>
<tr>
<td class=c2 height="25">
<p style="margin: 5"> <b>初始点击:</b></td>
<td class=c3>
<input type="text" name="T1" size="7" value="100"></td>
</tr>
<tr>
<td class=c2 height="25">
<p style="margin: 5"> <b>添加地址:</b></td>
<td class=c3>
<script language=vbscript>
sub pic()
dim url
url=inputbox("请输入图片地址:","图片地址","http://")
form1.s1.value=form1.s1.value+"<img src=" & url & ">"+"<p>"+chr(13)+chr(10)
end sub
</script>
<input type="button" value="添加地址" name="B5" onclick="pic()"></td>
</tr>
<tr>
<td class=c2 valign="top" height="187">
<p style="line-height: 150%; margin: 5"><b> 图片地址:</b><br>
</td>
<td class=c3>
<textarea rows="15" name="S1" cols="71"><p>
</textarea></td>
</tr>
</table>
</td>
</tr><tr>
<td align="center">
<table border=0 cellpadding="0" cellspacing="0" width='87%' class=tab1><tr><td height="50" align="center" class=c2> <input class=submit type=submit value=确定添加 name=B1>
<input class=submit type=reset value=重写添加 name=B2>
首页推荐 <input type="radio" value="1" name="R1">是
<input type="radio" name="R1" value="0" checked>否</td></tr></table></td></tr>
</table><script>tbottom()</script></form>
<%
case "adminpic"
%>
<p> </p>
<table align="center" border=0 cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="85%" class=c1 id="table1" height="21">
<tr>
<td class=c2 width="74" align="center">
<p style="line-height: 150%; margin: 4">
ID号</p>
</td>
<td class=c2 align="center" width="292">
图片标题:</td>
<td class=c2 align="center" width="75">
图片类型:</td>
<td class=c2 align="center">
点击次数:</td>
<td class=c2 width="143" align="center">
操作</td>
</tr>
</table>
<div align="center">
<%
Set Rs=GrateRs("Select * from pic order by picid desc",3)
if Rs.recordcount>0 then
Rs.pagesize=30
page=clng(request.querystring("page"))
if page<1 then page=1
if page >rs.pagecount then page=rs.pagecount
rs.absolutepage=page
for i=1 to rs.pagesize
if rs.eof then
exit for
else
%>
<table border=0 cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="85%" class=c1 id="table2" height="25">
<tr>
<td class=c2 width="74" align="center"><font face="Verdana"><%=Rs("picid")%></font></td>
<td class=c2 align="left" width="292">
<font face="Verdana"> <img border="0" src="images/gray.gif" width="15" height="15"><a target="_blank" href="/<%=Rs("url")%>"><%=Rs("pictitle")%></a></font></td>
<td class=c2 align="center"><font face="Verdana"><%=Rs("pictype")%></font></td>
<td class=c2 align="center" width="70"><font size=1><%=Rs("hit")%></font></td>
<td class=c2 width="71" align="center">
<font face="Verdana"><a target="_blank" href="/<%=Rs("url")%>">预览</a></font></td>
<td class=c2 width="71" align="center">
<font face="Verdana">
<a href="add_pic.asp?action=delet&id=<%=Rs("picid")%>">删除</a></font></td>
</tr>
</table>
<%
end if
rs.movenext
next
end if
%>
<table border=0 cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="85%" class=c1 id="table2" height="25">
<tr>
<td colspan=6 bgcolor="#f8f8f8" align=center>
一共[<font color="#FF0000"><%=rs.recordcount%></font>]组图片
<a href="add_pic.asp?action=adminpic&page=1">[第一页]</a>
<a href="add_pic.asp?action=adminpic&page=<%=(page-1)%>">[上一页]</a>
<a href="add_pic.asp?action=adminpic&page=<%=(page+1)%>">[下一页]</a>
<a href="add_pic.asp?action=adminpic&page=<%=rs.pagecount%>">[最后一页]</a>
<font face="Verdana" color="#FF0000">[共<%=rs.pagecount%>页]</font>
<select size="1" name="D1" onchange=javascript:window.location.href=this.options[this.selectedIndex].value>
<%
dim num
for num=1 to rs.pagecount
%>
<option value="add_pic.asp?action=adminpic&page=<%=(num)%>" <%if page=num then%> selected <%end if%>>第<%=(num)%>页</option>
<%next%>
</select>
</td>
</tr>
</table>
<%rs.close%>
</div>
<p> </p>
<%
case "delet"
id=request.QueryString("id")
set Rs=GrateRs("select * from pic where picid="&id,3)
Rs.delete
Rs.update
rs.close
response.write "<script language='JavaScript'>{window.location='add_pic.asp?action=adminpic';}</script>"
case "updata"
picid=request.QueryString("picid")
set Rs=GrateRs("select * from pic where picid="&picid,3)
Rs.addnew
Rs("pictitle")=request.form("pictitle1")
Rs("pictype")=request.form("pictype1")
Rs("urlname")=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)
Rs("url")="html/"&year(now)&"-"&month(now)&"-"&day(now)&"/"&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)& ".html"
Rs("hit")=request.form("T1")
Rs("hot")=request.form("R1")
url=request.form("s1")
name=request.form("pictitle1")
Rs.update
hitid=rs("picid")
%>
<p> </p>
<table border="0" width="63%" cellspacing="0" cellpadding="0" id="table1" height="317" align=center>
<form name="form3" method="post" action="add_pic.asp?action=pichtm&picid=<%=rs("picid")%>">
<tr>
<td class=c2 colspan="3" height="40"> </td>
</tr>
<tr>
<td width="12%" class=c2 height="160"> </td>
<td width="77%" height="160" align="center">
<textarea rows="15" name="conter" cols="63">
<HTML>
<HEAD>
<TITLE><%=Rs("pictitle")%>-美女图片,搞笑图片,卡通图片,风景图片,明星图片,美女写真,人体写真,明星写真,林心如写真,写真集,性感,性感图片,制服诱惑,图片,娱乐新闻,性感美图,美图网,贴图,图片库,美女图吧,美女图吧,偷拍走光</TITLE>
<!--#include file="../html/1/pic_asp.asp"-->
<div align="center">
<table border="0" width="760" cellspacing="0" cellpadding="0" id="table1">
<tr>
<td align="center">
<b><font size=4><%response.write(name)%></font></b>
</td>
</tr>
<tr>
<td align="right" width="600">已经被浏览了:<script src="/hit.asp?picid=<%=(hitid)%>"></script>次</td>
</tr>
</table>
</div>
<%response.write(url)%>
<!--#include file="../html/1/pic_asp2.asp"-->
</textarea></td>
<td width="12%" height="160" class=c2> </td>
</tr>
<tr>
<td width="100%" class=c2 colspan="3" align="center">
<input type="submit" value="生成.htm" name="addpopnew"></td>
</tr>
</form>
</table>
<%
case "pichtm"
set Rs=GrateRs("select * from pic where picid="&picid,3)
conter=request("conter")
set fs=server.CreateObject("Scripting.FileSystemObject")
SaveUpFilesPath="../html/"
SavePath=SaveUpFilesPath&year(now)&"-"&month(now)&"-"&day(now)
if not fs.folderexists(server.mappath(SavePath)) then
set f=fs.createfolder(server.mappath(SavePath))
else
set f=fs.getfolder(server.mappath(SavePath))
end if
htmpath=server.mappath(SavePath)
filepath=htmpath&"\"&rs("urlname")&".html"
set htm=fs.opentextfile(FilePath,2,true)
htm.write conter
response.write "<script language='JavaScript'>{window.location='add_pic.asp?action=addpic';}</script>"
%>
<%
end select
%>
</body>
</html>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -