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

📄 admin_js.asp

📁 3000首FLASH源程序
💻 ASP
字号:
<!--#include file="function.asp"-->
<%checkadmint%>
<!--#include file="top.asp"-->
<table width="770" border="0" cellspacing="1" cellpadding="1" align="center" bgcolor="<%=Tablebackcolor%>">
  <tr>
    <td width="160" bgcolor="<%=Tabletitlecolor%>"> 
      <!--#include file="admin_left.asp"-->
    </td>
    <td width="622" bgcolor="<%=Tablebodycolor%>" align="center">
<%
if request.form("classid")<>"" then
	classSql="classid="&request.form("classid")&"&"
else
	classSql=""
end if
if request.form("Nclassid")<>"" then
	NclassSql="Nclassid="&request.form("classid")&"&"
else
	NclassSql=""
end if
if request.form("count")<>"" then
	countSql="count="&request.form("count")&"&"
else
	countSql=""
end if
if request.form("best")<>"" then
	bestSql="best="&request.form("best")&"&"
else
	bestSql=""
end if
if request.form("dateshow")<>"" then
	dateshowSql="dateshow="&request.form("dateshow")&"&"
else
	dateshowSql=""
end if
if request.form("authorshow")<>"" then
	authorshowsql="authorshow="&request.form("authorshow")&"&"
else
	authorshowsql=""
end if
prejscode=replace(request.ServerVariables("HTTP_REFERER"),"admin_js","js")
jscode="<script src="&prejscode&"?"&ClassSql&""&NclassSql&""&countSql&""&bestSql&""&dateshowSql&""&authorshowSql&"></script>"
jscode=replace(jscode,right(jscode,11),"></script>")
set rs=server.createobject("adodb.recordset")
sql = "select * from nclass order by Nclassid asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("Nclassid"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
      <table width="95%" border="0" cellspacing="1" cellpadding="1" bgcolor="<%=Tablebackcolor%>">
        <tr> 
          <td align="center" bgcolor="<%=Tabletitlecolor%>">生成JS代码</td>
        </tr>
        <form method="POST" name="myform" action="admin_js.asp">
          <tr> 
            <td align="center" bgcolor="#FFFFFF"> 
              <%
    sql = "select * from class"
    rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
              <select name="classid" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
                <% 
        do while not rs.eof
%>
                <option selected value="<%=trim(rs("classid"))%>"><%=trim(rs("class"))%></option>
                <%
        rs.movenext
        loop
	end if
        rs.close
        set rs = nothing
        conn.Close
        set conn = nothing
%>
                <option selected value="">==请选栏目==</option>
              </select>
              <select name="Nclassid">
                <option selected value="">==请选栏目==</option>
              </select>
            </td>
          </tr>
          <tr> 
            <td align="center" bgcolor="#FFFFFF">数目: 
              <input type="text" name="Count" size="3" maxlength="3">
            </td>
          </tr>
          <tr> 
            <td align="center" bgcolor="#FFFFFF"> 推荐: 
              <input type="checkbox" name="best" value="Y">
               显示时间: 
              <input type="checkbox" name="dateshow" value="Y">
               显示作者: 
              <input type="checkbox" name="authorshow" value="Y">
            </td>
          </tr>
          <tr> 
            <td align="center" bgcolor="#FFFFFF"> 
              <textarea rows="3" name="jscode" cols="75"><%=jscode%></textarea>
            </td>
          </tr>
          <tr>
            <td align="center" bgcolor="#FFFFFF">
              <input type="submit" name="Submit3" value="确 定">
              <input type="button" name="Submit4" value="清 除">
            </td>
          </tr>
          <tr> 
            <td bgcolor="#FFE8E8">注:<font color="#FF0000">Classid</font> 代表一级栏目  <font color="#FF0000">Nclassid</font> 代表二级栏目<br>
                <font color="#FF0000">Count</font> 代表显示的数目  <br>
                <font color="#FF0000">Best</font> 代表是否是精品推荐(Y表示精品推荐)<br>
                <font color="#FF0000">Dateshow</font> 代表是否显示时间(Y表示显示)</td>
          </tr>
        </form>
      </table>
	</td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>

⌨️ 快捷键说明

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