⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pic_edit.asp

📁 花了2000元买来的,可以使用的自助建站源码-人力资源的
💻 ASP
字号:
<%@ Language=VBScript %>
<%
Response.Buffer=false
Response.Expires=0
%>
<!-- #include file="../links.asp" -->
<!-- #include file="./s.asp" -->
<!-- #include file="../dsn.asp" -->
<%
keyno=Request.QueryString("keyno")
tablename=Request.QueryString("tablename")
pic=Request.QueryString("pic")
method=Request.QueryString ("method")
if keyno="" then
		Response.End 
	else
		keyno=cint(keyno)
end if
if pic=0 then
		pictxt=""
	else
		pictxt=cstr(pic)
end if
set cn=server.CreateObject("ADODB.Connection")
cn.Open mycnstr
set rs=server.createobject("ADODB.recordset") 
htmlname="keyno="&keyno&"&pic="&pic&"&tablename="&tablename
if method="del" then
		sqltext="select * from "+tablename+" where id="&keyno
		rs.Open sqltext,cn,1,2
		if not rs.EOF then
				rs("pictitle"&pictxt)=""
				rs("picplace"&pictxt)=0
		end if
		rs.Update 
		rs.Close 
end if
sqltext="select * from "+tablename+" where id="&keyno
rs.Open sqltext,cn,1,1
if not rs.EOF then
		pictitle=rs("pictitle"&pictxt)
		picplace=rs("picplace"&pictxt)
end if
rs.Close 
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
	pictitle=trim(Request.Form ("pictitle"))
	picplace=cint(Request.Form ("rr1"))
	sqltext="select * from "+tablename+" where id="&keyno
	rs.Open sqltext,cn,1,2
	if not rs.EOF then
			rs("pictitle"&pictxt)=pictitle
			rs("picplace"&pictxt)=picplace
	end if
	rs.Update 
	rs.Close 
	set rs=nothing
	set cn=nothing 
	Response.Write("<script language=Javascript>")	
	Response.Write("window.top.opener.top.main.location.reload();")
	Response.Write("window.top.close()")
	Response.Write("</script>")
end if
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size: 12px; color: #000000; font-family: 宋体}
td {font-size: 12px; color: #000000; font-family: 宋体;line-height:130%}
.t1 {font:12px 宋体;color=000000} 
.t2 {font:12px 宋体;color:ffffff} 
-->
</style>
</head>
<title>文件上传</title>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
   <table width="100%" border="0" align=center>
	<form name="form1" action="pic_edit.asp?<%=htmlname%>" method="post"> 
     <tr align=center> 
          <td width=100% align=left>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          图片标题<input type="text" name="pictitle" value="<%=pictitle%>"><font color=red>(不填则不显示,只有图片居中时才显示)</font>
          </td>
     <tr align=center>      
          <td align=center>
          图片位置
          <input type=radio name="rr1" value=0 <%if picplace=0 then Response.Write ("checked")%>>居左
          <input type=radio name="rr1" value=1 <%if picplace=1 then Response.Write ("checked")%>>居中
          <input type=radio name="rr1" value=2 <%if picplace=2 then Response.Write ("checked")%>>居右
          <input type="submit" value="确认提交" id=submit1 name=submit1>
          <input type="button" value="关闭窗口" onclick="Javascript:window.top.opener.top.main.location.reload();window.top.close()" id=button1 name=button1>
           </td>
     </tr>
    </form>
   </table>
</body>
</html>            

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -