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

📄 create_soft_view.asp

📁 动感系统XP Access版,服务器需要安装Jmail 组件 配置SendMessages.asp 最后部分的参数
💻 ASP
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/function.asp" -->
<!--#include file="inc/CHAR.asp"-->
<!--#include file="Create_Soft_View_inc.asp"-->
<HTML><HEAD><TITLE>后台管理 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="admin.css" type=text/css rel=stylesheet>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<!-- #include file="admin_header.asp" -->
<table width="100%" border="0" cellspacing="2">
  <tr>
    <td width="20%" align="center" valign="top" class="tdbgleft"><!-- #include file="Admin_Left.asp" --></td> 
    <td  class="b1" valign="top">
<%	if Trim(Request.Form("SoftNum"))<>"" then session("SoftNum")=Trim(Request.Form("SoftNum"))
	if isnull(session("SoftNum")) or session("SoftNum")="" then session("SoftNum")=500
	MaxPerPage=cint(session("SoftNum"))
	
msgtitle="生成软件详细信息静态网页"
if not isnull(cUserName) or cUserName<>"" then
	if chkMaster(cUserName) then
		Server.ScriptTimeOut=9999999
		Set fso = Server.CreateObject("Scripting.FileSystemObject")
		Set Rs=server.createobject("adodb.recordset")
		Set ViewRs=server.createobject("adodb.recordset")
		'读取默认模板
		sql="select ID,Header,Footer,SoftView_htm from SoftDown_Template where isActive=true"
		rs.open sql,conn,1,1 
		if rs.eof and rs.bof then
   			response.write "您没有添加模板,或者没有设置默认模板。"
			response.end
		else
			HtmlTemplate=rs("Header")&rs("SoftView_htm")&rs("Footer")
		end if
		rs.close
		
   		if Request("action")=1 then
			call action1()
		elseif Request("action")=2 then
			call action2()
		else
			call main()
		end if

		set ViewRs=Nothing  
		Set Rs=nothing
		Set fso=nothing
	else
		msginfo="<li>操作错误,你不是系统管理员,没有权限进行此项操作!</li>" 
		call Sysmsg(msgtitle,msginfo)
	end if
else
    msginfo="<li>操作错误,你没有登录系统!<li><a href=""User.Asp"">点此登录系统</a></li>" 
    call Sysmsg(msgtitle,msginfo)
end if

sub action1()
	sql="select SoftID from SoftDown_SoftInfo where SoftID>="&Request.Form("beginID")&" and SoftID<="&Request.Form("EndID")&" order by SoftTime desc"
	ViewRs.open sql,conn,1,1
   	if not(ViewRs.eof and ViewRs.bof) then 
		do while not ViewRs.eof	
		msginfo = msginfo & "ID."&ViewRs("SoftID") &"<br>" & vbcrlf
		tem=Create_SoftView(ViewRs("SoftID"),HtmlTemplate)
		tem=""
		ViewRs.movenext 
    	loop
	end if
	ViewRs.close
	msgtitle="生成软件详细信息静态网页"
    call Sysmsg(msgtitle,msginfo)	
end sub
sub action2()		
%>
      <table width="100%" border="0" cellpadding="3" cellspacing="1">
        <tr> 
          <td align="center" class="tdbg1">生成软件信息页</td>
        </tr>
        <tr> 
          <td align="center" class="tdbg2"><a href="?action=2">下一页</a></td>
        </tr>
        <%	
 	sql="select top "&MaxPerPage&" SoftID from SoftDown_SoftInfo where isCreate=0 order by SoftTime Desc"
	ViewRs.open sql,conn,1,1 
	if Not(ViewRs.eof and ViewRs.bof) then 
		do while not ViewRs.eof
		Response.Write("<tr><td class=""tdbg2"">"&Create_SoftView(ViewRs("SoftID"),HtmlTemplate)&"</td></tr>" & vbcrlf)
		sql="update SoftDown_SoftInfo set isCreate=1 where SoftID="&ViewRs("SoftID")
		conn.execute sql
		ViewRs.movenext
    	loop
		Response.Write("<meta HTTP-EQUIV=REFRESH CONTENT='0; URL=?action=2'>")
	else
	    Response.Write("<tr><td class=""tdbg2"">")
		if Trim(Request.QueryString("Reset"))="yes" then
			sql="update SoftDown_SoftInfo set isCreate=0"
			conn.execute sql
			Response.Write("重置数据库操作完成!!!")
		else			
			Response.Write("操作完成!是否重置软件信息数据表为未创建HTML页状态?")
			Response.Write(" [ <a href=""?action=2&Reset=yes"">是</a> ] ")
			Response.Write(" [ <a href=""?action=2&Reset=no"">否</a> ] ")
		end if
		Response.Write("</td></tr>")
	end if
	ViewRs.close
%>
      </table>
<%
end sub
sub main() %>
	  <table width="100%" border="0" cellpadding="5" cellspacing="1">
        <tr> 
          <td colspan="2" align="center" class="tdbg1">生成软件信息页</td>
        </tr>
        <form action="Create_Soft_View.asp" method="post" name="form1">
          <tr>
            <td colspan="2" class="tdbg2"><font color="#FF0000">注意</font>:此项操作在系统第一次使用时进行,以后添加或者更新软件系统自动生成。</td>
          </tr>
          <tr> 
            <td colspan="2" class="tdbg2"><strong>方式之一:按指定的ID批量生成</strong></td>
          </tr>
          <tr> 
            <td class="tdbg2">开始的SoftID号</td>
            <td class="tdbg2"><input type=text name="beginID" value="1" size=5>
              软件ID,可以填写您想从哪一个SoftID号开始进行生成软件信息静态网页</td>
          </tr>
          <tr> 
            <td class="tdbg2">结束的SoftID号</td>
            <td class="tdbg2"> <input type=text name="EndID" value="1000" size=5>
              生成开始到结束SoftID之间的软件信息网页,之间的数值最好不要选择过大。 </td>
          </tr>
          <tr> 
            <td colspan="2" class="tdbg2"><input type="submit" name="Submit" value="执行操作"> 
              <input name="action" type="hidden" id="action" value="1"></td>
          </tr>
        </form>
        <form action="Create_Soft_View.asp" method="post" name="form1">
          <tr> 
            <td colspan="2" class="tdbg2"><strong>方式之二:按顺序分页次批量生成</strong></td>
          </tr>
          <tr> 
            <td class="tdbg2">设置每页数目</td>
            <td class="tdbg2"><input type=text name="SoftNum" value="10" size=5>
              个软件/页</td>
          </tr>
          <tr> 
            <td colspan="2" class="tdbg2"><input type="submit" name="Submit2" value="执行操作"> 
              <input name="action" type="hidden" id="action" value="2"></td>
          </tr>
        </form>
      </table> 
	  <% end sub %>
	  </td>
  </tr>
</table>
<!-- #include file="admin_footer.asp" -->
</BODY></HTML>
<% CloseDatabase %>

⌨️ 快捷键说明

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