freeadd.asp

来自「短信平台 短信平台 短信平台」· ASP 代码 · 共 134 行

ASP
134
字号
<%
if session("admin")="" then
  response.redirect "admin.asp"
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="code.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>添 加 文 章</title>
<link rel="stylesheet" type="text/css" href="style.css">
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from ANclass 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>
</head>

<body>
<br><br>
<form method="POST" name="myform" action="adminsave.asp?action=add">
  <div align="center"><center><table cellspacing="0" width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
    <tr>
      <td width="100%" bgcolor="#999999" height="20"><font color="#FFFFFF"><center><p><b>添 加 短 信</b></font></td>
    </tr>
    <tr align="center">
      <td width="100%">
	<table border="0" cellspacing="1" width="100%">
            <tr> 
              <td width="15%" align="right" valign="top" height="20"><b>短信类型:</b></td>
              <td width="85%"> <%
        sql = "select * from Aclass order by classid desc"
        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">
<option selected value="">=选择业务=</option>
                  <% 
        do while not rs.eof
%>
                  <option value="<%=trim(rs("classid"))%>"><%=trim(rs("class"))%></option>
                  <%
        rs.movenext
        loop
	end if
        rs.close
        set rs = nothing
        conn.Close
        set conn = nothing
%>
                </select> <select name="Nclassid">
                  <option selected value="">==请选栏目==</option>
                </select>
                *(请先选择业务类型,右边会出现二级分类!)</td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>短信标题和内容:</b></td>
              <td width="85%" height="30"><input type="text" name="txttitle" size="70"
          class="smallinput" maxlength="100"></td>
            </tr>
            <tr> 
              <td width="15%" valign="top"><p>&nbsp;</p>
                <p><b><font color="#FF0000">请注意:标题是发送给用户的实际信息。为方便管理建议将标题的内容复制到内容里面,保持一致!</font></b></p></td>
              <td width="85%"><textarea rows="15" name="txtcontent" cols="60" class="smallarea"></textarea></td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>相关短信息:</b></td>
              <td width="85%" height="30"><input type="text" name="key" size="70"
          class="smallinput" maxlength="100" value="sms"></td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>作者:</b></td>
              <td width="85%" height="30"><input type="text" name="writer" size="70"
          class="smallinput" maxlength="100" value="801"></td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>来源:</b></td>
              <td width="85%" height="30"><input type="text" name="writefrom" size="70"
          class="smallinput" maxlength="100" value="www..com"></td>
            </tr>
          </table>
      </td>
    </tr>
  </table>
  </center></div><div align="center"><center><p><input type="submit" value=" 添 加 "
  name="cmdok" class="buttonface">&nbsp; <input type="reset" value=" 清 除 "
  name="cmdcancel" class="buttonface"></p>
  </center></div>
</form>
</body>
</html>

⌨️ 快捷键说明

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