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

📄 function.asp

📁 后台默认管理账号密码:admin 后台主要功能如下:一、系统管理:管理员管理
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
if rsArticle("UploadFiles")<>"" then
	dim IsOtherUrl
	IsOtherUrl=True
	if instr(rsArticle("UploadFiles"),"|")>1 then
		dim arrUploadFiles,intTemp
		arrUploadFiles=split(rsArticle("UploadFiles"),"|")						
		for intTemp=0 to ubound(arrUploadFiles)
			if rsArticle("DefaultPicUrl")=arrUploadFiles(intTemp) then
				response.write "<option value='" & arrUploadFiles(intTemp) & "' selected>" & arrUploadFiles(intTemp) & "</option>"
				IsOtherUrl=False
			else
				response.write "<option value='" & arrUploadFiles(intTemp) & "'>" & arrUploadFiles(intTemp) & "</option>"
			end if
		next
	else
		if rsArticle("UploadFiles")=rsArticle("DefaultPicUrl") then
			response.write "<option value='" & rsArticle("UploadFiles") & "' selected>" & rsArticle("UploadFiles") & "</option>"
			IsOtherUrl=False
		else
			response.write "<option value='" & rsArticle("UploadFiles") & "'>" & rsArticle("UploadFiles") & "</option>"		
		end if
	end If
	if IsOtherUrl=True then
		response.write "<option value='" & rsArticle("DefaultPicUrl") & "' selected>" & rsArticle("DefaultPicUrl") & "</option>"
	end if
end if
%>
</select>
								<input name="UploadFiles" type="hidden" id="UploadFiles" value="<%=rsArticle("UploadFiles")%>">							  </td>
							</tr>
							<tr> 
								<td height="22" align="right" bgcolor="#C0C0C0" class="table">已通过审核:</td>
								<td bgcolor="#E3E3E3" class="table">
								<input name="Passed" type="checkbox" id="Passed" value="yes" <% if rsArticle("Passed")=true then response.Write("checked") end if%>>
							  是<font color="#0000FF">(如果选中的话将直接发布)</font></td>
							</tr>
							<tr> 
								<td height="22" align="right" bgcolor="#C0C0C0" class="table">首页显示:</td>
								<td bgcolor="#E3E3E3" class="table">
								<input name="Elite" type="checkbox" id="Elite" value="yes" <% if rsArticle("Elite")=true then response.Write("checked") end if%>>
							  是<font color="#0000FF">(如果选中的话将在首页做为新产品显示)</font></td>
							</tr>
							<tr> 
								<td height="22" align="right" bgcolor="#C0C0C0" class="table">录入时间:</td>
								<td bgcolor="#E3E3E3" class="table">
								<input name="UpdateTime" type="text" id="UpdateTime" value="<%=now()%>" maxlength="50">
							  当前时间为:<%=now()%> 注意不要改变格式。</td>
							</tr>
							<tr> 
								<td height="22" colspan="2" align="center" bgcolor="#C0C0C0" class="table"><input name="ArticleID" type="hidden" id="ArticleID" value="<%=rsArticle("ArticleID")%>">
				<input name="Save" type="submit" class="btn"   id="Save" value=" 保存修改 "></td>
				</tr>
  </form>
</table>



<%end sub

sub ookk()
sql = "select * from Hover_SmallClass_down order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.addNEWS.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    

function CheckForm()
{

	if (document.addNEWS.title.value.length == 0) {
		alert("下载名称没有填写.");
		document.addNEWS.title.focus();
		return false;
	}
	if (document.addNEWS.System.value.length == 0) {
		alert("适用系统没有填写");
		document.addNEWS.System.focus();
		return false;
	}
		if (document.addNEWS.DownloadUrl.value.length == 0) {
		alert("下载地址没有填写");
		document.addNEWS.DownloadUrl.focus();
		return false;
	}
		
	return true;
}
</script>
<!-- #include file="Head.asp" -->
<BR>
 <%="<table width=97% border=0 align=center cellpadding=3 cellspacing=1 class=tableBorder><form name=addNEWS method=post action=Hover_Down_add_ok.asp "%>
 <%="onSubmit=return  CheckForm();><tr><td class=title height=30 colspan=3 align=center>添加下载</td> </tr> <tr>   <td width=287 height=25 align=right"  %>  
 <%="bgcolor=#ECF5FF  class=table><font color=#FF0000>*</font>下载名称:</td> <td colspan=2 bgcolor=#ECF5FF class=table>  <input name=title type=text"  %> 
  <%="class=input size=30></td></tr><tr><td height=25 align=right bgcolor=#ECF5FF class=table><font color=#FF0000>*</font>下载类别:</td>"  %><td colspan=2 bgcolor
    <%="=#ECF5FF class=table>"%>         
     
            
    
           
           
          
    
            
         
         
     
             		
        <%sql = "select * From Hover_BigClass_down"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%> <select name="BigClassName" onChange="changelocation(document.addNEWS.BigClassName.options[document.addNEWS.BigClassName.selectedIndex].value)" size="1">
                <option selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
                <%
			dim selclass
		    selclass=rs("BigClassName")
        	rs.movenext
		    do while not rs.eof
			%>
                <option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
                <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%>
              </select> <select name="SmallClassName">
                <option value="" selected>不指定小类</option>
                <%
			sql="select * from Hover_SmallClass_down where BigClassName='" & selclass & "'"
			rs.open sql,conn,1,1
			if not(rs.eof and rs.bof) then
			%>
                <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
                <% rs.movenext
				do while not rs.eof%>
                <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
                <%
			    	rs.movenext
				loop
			end if
	        rs.close
			%>
                <%
			ranNum=int(9*rnd)+10
			iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
			%>
            </select></td>
         
            <%=" </tr> <tr>"%>
          
             <%="<td height=25 align=right valign=top bgcolor=#ECF5FF class=table><font color=#FF0000>*</font>下载说明:</td>"%>
            <%="<td colspan=2 valign=top bgcolor=#ECF5FF class=table><textarea name=cnWords cols=68 rows=8 id=cnWords></textarea>            </tr>"%>
           <%="<tr> "%>
             <%="<td height=25 align=right bgcolor=#ECF5FF class=table><font color=#FF0000>*</font>适用系统:</td>"%>
             <%="<td colspan=2 bgcolor=#ECF5FF class=table>"%>
 <%="<input name=System type=text  id=System value=WIN98, WIN2000, WIN XP size=30></td>"%>
           <%="</tr>"%>
           <%="<tr> "%>
            <%=" <td height=25 align=right bgcolor=#ECF5FF class=table><font color=#FF0000>*</font>软件类型:</td>"%>
             <%="<td colspan=2 bgcolor=#ECF5FF class=table>"%>
 <%="<input name=Softclass type=text  id=Softclass  size=30></td>"%>
           <%="</tr>"%>
          <%=" <tr bgcolor=#ECF5FF> "%>
             <%="<td height=25 align=right class=table>产品图片:</td>"%>
             <%="<td width=218 class=table> "%>
            <%=" <input name=PhotoUrl type=text id=PhotoUrl size=30 maxlength=200></td>"%>
             <%="<td width=458 class=table> <iframe style=top:2px ID=UploadFiles src=../Upload_Photo.asp?PhotoUrlID=0 frameborder=0 scrolling=no width=320 "%><%="height=25></iframe>"%></td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td height="25" align="right" class="table"><font color="#FF0000">*</font>下载地址:</td>
            <td class="table"> 
            <input name="DownloadUrl" type="text" id="DownloadUrl" size="30" maxlength="200"></td>
            <td class="table"> 
            <%="<iframe style=top:2px ID=UploadFiles src=../Upload_Photo.asp?PhotoUrlID=1 frameborder=0 scrolling=no width=320 height=25></iframe>"%></td>
          </tr>
          <tr> 
            <td height="25" align="right" bgcolor="#ECF5FF" class="table"><font color="#FF0000">*</font>文件大小:</td>
            <td colspan="2" bgcolor="#ECF5FF" class="table"><input name="FileSize" type="text" class="input" id="fileSize" size="30">
            K </td>
          </tr>
          <tr> 
            <td height="30" colspan="3" align="center" bgcolor="#ECF5FF" class="table"> 
              <input type="submit"  name="Submit" value="提交" class="btn"> &nbsp;&nbsp;
              <input type="reset"   name="Submit2" value="重置" class="btn"> 
            </td>
          </tr>
        </form>
</table>



<%end sub
function tput()
  response.Write("<iframe ID=editor src=../editor.asp frameborder=1 scrolling=no width=620 height=405></iframe>")
end function
sub SaveDatanew()  
  rs("Title")=Title
  rs("Content")=Content
  rs("User")=User
  rs("BigClassName")=BigClassName
  rs("SmallClassName")=SmallClassName
  rs("UpdateTime")=UpdateTime
  rs("Hits")=Hits
  if oi<>1 then
  call sysconfig()
  end if
  if Ok="yes" then
	rs("Ok")=True
  else
	rs("Ok")=False
  end if 
  rs("UpdateTime")=UpdateTime
   

	if ObjInstalled=True and UploadFiles<>"" 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)<>FirstImageName 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<>FirstImageName 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("FirstImageName")=FirstImageName     
end sub




function domo()
if request("no")="modi" then
newsid=request("newsId")
title=request("title")
BigClassName=request("BigClassName")
SmallClassName=request("SmallClassName")
	mContent = trim(Request.form("cnWords")) 
	mContent = Replace(mContent,"<script","<sscript") 
	mContent = Replace(mContent,"/script>","/scripts>")
	mContent = Replace(mContent,"/script >","/scripts>")
	'mimageNum = Request.form("imageNum")
	'firstImageName = trim(Request.form("editFirstImageName"))
System=request("System")
Softclass=request("Softclass")
PhotoUrl=request("PhotoUrl")
DownloadUrl=request("DownloadUrl")
FileSize=request("FileSize")


set rs=server.createobject("adodb.recordset")
sql="select * from Hover_download where id="&newsid
rs.open sql,conn,1,3
che()
rs("title")=title
rs("content")=mcontent
rs("System")=System
rs("Softclass")=Softclass
rs("PhotoUrl")=PhotoUrl
rs("DownloadUrl")=DownloadUrl
rs("FileSize")=FileSize
rs("BigClassName")=BigClassName
rs("SmallClassName")=SmallClassName

'if mimageNum<>"" then rs("imageNum") = mimageNum 
'if firstImageName<>"" then rs("firstImageName") = firstImageName
rs.update
rs.close
set rs=nothing
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


%>

⌨️ 快捷键说明

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