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

📄 function.asp

📁 后台默认管理账号密码:admin 后台主要功能如下:一、系统管理:管理员管理
💻 ASP
📖 第 1 页 / 共 3 页
字号:
if firstImageName<>"" then rs("firstImageName") = firstImageName
if zcv<>yzcv then
call  sysconfig()
end if
rs.update
rs.close
set rs=nothing
conn.close  
set conn=nothing
if founderr=true then
  call WriteErrMsg()
else   
  response.write "<script language='javascript'>" & chr(13)
  response.write "alert('下载提交成功!');" & Chr(13)
  response.write "window.document.location.href='Hover_Down_Manage.asp';"&Chr(13)
  response.write "</script>" & Chr(13)
  Response.End
end if  
end function
function artil()
	oy.ganni()
		sql="select top 1 * From Hover_Product " 
		rs.open sql,conn,1,3
		rs.addnew


end function
sub SaveData()
	rs("Product_Id")=Product_Id
	rs("BigClassName")=BigClassName
	rs("SmallClassName")=SmallClassName
	'rs("SpecialName")=SpecialName
	rs("Title")=Title
	rs("Spec")=Spec
	rs("Size")=Size
	rs("Memo")=Memo
	rs("Content")=Content
	rs("Key")=Key
	rs("Hits")=Hits
	che()
	'rs("Author")=Author
	'rs("CopyFrom")=CopyFrom
	if IncludePic="yes" then
		rs("IncludePic")=True
	else
		rs("IncludePic")=False
	end if
	if Passed="yes" then
		rs("Passed")=True
	else
		if EnableArticleCheck="No" then
			rs("Passed")=True
		else
			rs("Passed")=False
		end if
	end if
	'if OnTop="yes" then
		'rs("OnTop")=True
	'else
		'rs("OnTop")=False
	'end if
	'if Hot="yes" then
		'rs("Hot")=True
	'else
		'rs("Hot")=False
	'end if
	if Elite="yes" then
		rs("Elite")=True
	else
		rs("Elite")=False
	end if
	rs("UpdateTime")=UpdateTime

	'***************************************
	'删除无用的上传文件
	if ObjInstalled=True and UploadFiles<>"" and oi=1 then
		dim fso,strRubbishFile
		Set fso = Server.CreateObject("Scripting.FileSystemObject")
		if instr(UploadFiles,"|")>1 then
			dim arrUploadFiles,intTemp
			arrUploadFiles=split(UploadFiles,"|")
			UploadFiles=""
			for intTemp=0 to ubound(arrUploadFiles)
				if instr(Content,arrUploadFiles(intTemp))<=0 and arrUploadFiles(intTemp)<>DefaultPicUrl then
					strRubbishFile=server.MapPath("../" & arrUploadFiles(intTemp))
					if fso.FileExists(strRubbishFile) then
						fso.DeleteFile(strRubbishFile)
						response.write "<br><li>" & arrUploadFiles(intTemp) & "在文章中没有用到,也没有被设为首页图片,所以已经被删除!</li>"
					end if
				else
					if intTemp=0 then
						UploadFiles=arrUploadFiles(intTemp)
					else
						UploadFiles=UploadFiles & "|" & arrUploadFiles(intTemp)
					end if
				end if
			next
		else
			if instr(Content,UploadFiles)<=0 and UploadFiles<>DefaultPicUrl then
				strRubbishFile=server.MapPath("../" & UploadFiles)
				if fso.FileExists(strRubbishFile) then
					fso.DeleteFile(strRubbishFile)
					response.write "<br><li>" & UploadFiles & "在文章中没有用到,也没有被设为首页图片,所以已经被删除!</li>"
				end if
				UploadFiles=""
			end if
		end if
		set fso=nothing
	end If
	'结束
	'***************************************
	rs("DefaultPicUrl")=DefaultPicUrl
	rs("UploadFiles")=UploadFiles
end sub

function links()

if Request.QueryString("no")="edit" then
id=Trim(Request("id"))
set rs=conn.execute("select * from Hover_Links  Where id="&id)
na=rs("name")
no=rs("note")
li=rs("link")
lo=rs("logo")


end if

if Request.QueryString("no")="yes" then
id= Trim(Request("id"))
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = Conn
Rs.Open "DELETE from Hover_Links  Where id="&id,Conn,2,3,1
if oi<>1 then
call sysconfig()
end if

Set Rs= Nothing
Set Conn = Nothing
Response.Redirect "Hover_Link.asp"
end if
if Request.QueryString("no")="eshop" then
note=request.form("note")
link=request.form("link")
name=request.form("name")
logo=request.form("logo")

If name=""  or note="http://"Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入网站名称,请返回检查!!"");history.go(-1);</script>")
response.end
end if

If note=""  or note="http://"Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入图标连接,请返回检查!!"");history.go(-1);</script>")
response.end
end if

If link="" or link="http://" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没有输入超连接,请返回检查!!"");history.go(-1);</script>")
response.end
end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from Hover_Links  Where id="&Trim(Request("id"))
rs.open sql,conn,1,3

rs("name")=name
rs("note")=note
rs("link")=link
rs("logo")=logo
rs.update
rs.close

end if
set rs=conn.execute("select * from Hover_Links  Where id="&Trim(Request("id")))
na=rs("name")
no=rs("note")
li=rs("link")
lo=rs("logo")

end function
function atlink ()
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = Conn
Rs.Open "SELECT * from Hover_Links  Order BY id"

if Request.QueryString("no")="yes" then
id= Trim(Request("id"))
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = Conn
Rs.Open "DELETE from Hover_Links  Where id="&id,Conn,2,3,1


Set Rs= Nothing
Set Conn = Nothing
Response.Redirect "Hover_Link.asp"
end if



if Request.QueryString("no")="eshop" then
note=request.form("note")
link=request.form("link")
name=request.form("name")
logo=request.form("logo")

If name=""  or note="http://"Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入网站名称,请返回检查!!"");history.go(-1);</script>")
response.end
end if

If note=""  or note="http://"Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入图标连接,请返回检查!!"");history.go(-1);</script>")
response.end
end if

If link="" or link="http://" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没有输入超连接,请返回检查!!"");history.go(-1);</script>")
response.end
end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from Hover_Links  "
rs.open sql,conn,1,3
rs.addnew
rs("name")=name
rs("note")=note
rs("link")=link
rs("logo")=logo
rs.update
Response.Redirect "Hover_Link.asp"
end if
end function

sub eedd()%>


<table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="Hover_Article_Save.asp?action=Modify">
	<tr>
		<td class="title" height="25" align="center" colspan="2"><strong>修 改 产 品</strong></td>
	</tr>
		<tr>
		<td class="title2" height="25" colspan="2">选择您需要更改的产品信息。 </td>
	</tr>
	<tr> 
								<td width="183" height="22" align="right" bgcolor="#C0C0C0" class="table">所属栏目:</td>
								<td width="771" bgcolor="#E3E3E3" class="table"> 
<%
if session("purview")=3 or session("purview")=4 then
	response.write rsArticle("BigClassName") & "<input name='BigClassName' type='hidden' value='" & rsArticle("BigClassName") & "'>&gt;&gt;"
else		
			sql = "select * from Hover_BigClass"
			rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "请先添加栏目。"
	else
	 che()
%>
<select name="BigClassName" 
onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<%
do while not rs.eof
%>
<option <% if rs("BigClassName")=rsArticle("BigClassName") then response.Write("selected") end if%> 
value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select> 
<%
end if
if session("purview")=4 then
	response.write rsArticle("SmallClassName") & "<input name='SmallClassName' type='hidden' value='" & rsArticle("SmallClassName") & "'>"
else
%>
<select name="SmallClassName">
<option value="" <%if rsArticle("SmallClassName")="" then response.write "selected"%>>不指定小类</option>
<%
sql="select * from Hover_SmallClass where BigClassName='" & rsArticle("BigClassName") & "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
%>
<option <% if rs("SmallClassName")=rsArticle("SmallClassName") then response.Write("selected") end if%> 
value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select> 
<%
end if
%>								</td>
	</tr>
							<tr> 
								<%="<td height=22 align=right bgcolor=#C0C0C0 class=table>产品编号:</td>"%>
								<td bgcolor="#E3E3E3" class="table">
								<input name="Product_Id" type="text" id="Product_Id" value="<%=rsArticle("Product_Id")%>" size="15" maxlength="15"> 
							  <font color="#FF0000">*</font> </td>
							</tr>
							<tr> 
								<td height="22" align="right" bgcolor="#C0C0C0" class="table">产品名称:</td>
								<td bgcolor="#E3E3E3" class="table">
								<input name="Title" type="text" id="Title" value="<%=rsArticle("Title")%>" size="50" maxlength="80"> 
							  <font color="#FF0000">*</font></td>
							</tr>
							<tr> 
								<%="<td height=22 align=right bgcolor=#C0C0C0 class=table>产品规格:</td>"%>
								<td bgcolor="#E3E3E3" class="table">
							  <input name="Spec" type="text" id="Spec" value="<%=rsArticle("Spec")%>" size="50" maxlength="80"></td>
							</tr>							<tr> 
								<td height="22" align="right" bgcolor="#C0C0C0" class="table">关键字:</td>
								<td bgcolor="#E3E3E3" class="table">
								<input name="Key" type="text" id="Key" value="<%=trim(rsArticle("Key"))%>" size="50" maxlength="255"> 
							  <font color="#FF0000">* </font>多个关键字,中间用空格分开。不能出现""'*?,.()等字符。</td>
							</tr>
							<tr> 
								<td height="22" align="right" valign="middle" bgcolor="#C0C0C0" class="table">产品说明:</td>
								<td bgcolor="#E3E3E3" class="table"><textarea name="Content" style="display:none"><%=rsArticle("Content")%></textarea>
								<%="<iframe id=editor src=../editor.asp frameborder=1 scrolling=no width=600 height=405></iframe>"%></td>
							</tr>
							<tr>
								<td width="183" align="right" bgcolor="#C0C0C0" class="table">首页图片: 
							  <input name="IncludePic" type="hidden" id="IncludePic" value="yes"></td>
								<td width="771" bgcolor="#E3E3E3" class="table">
								<input name="DefaultPicUrl" type="text" id="DefaultPicUrl" value="<%=rsArticle("DefaultPicUrl")%>" size="50" maxlength="180">
								<br>首页的图片,直接从上传图片中选择: 
<select name="DefaultPicList" id="DefaultPicList" onChange="DefaultPicUrl.value=this.value;">
<option value=""<% if rsArticle("DefaultPicUrl")="" then response.write "selected" %>>不指定首页图片</option>

⌨️ 快捷键说明

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