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

📄 sql_moban.asp

📁 后台地址:login.asp 管理员 帐户:admin 密码:admin 数据库 Data/#23mn.cn.asp (电视电台数据) Data/Data_Admin.asp (管理信
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Sql_Conn_Open.asp"-->
<!--#include file="Sql_Check.asp"-->

<html>

<html>
<head>
<title>模版管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Images/Style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="98%" border="0" align="center" cellpAdding="0" cellspacing="0">
  <tr> 
    <td height="35" background="Images/Sql_top_bg.gif"> </td>
  </tr>
</table>

<%if request("Action") = "Index" then%>

<table width="100%" height="100" border="0" align="center" cellpAdding="0" cellspacing="0">
  <tr>
    <td valign="top">
    <table width="98%" border="0" align="center" cellpAdding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpAdding="0" cellspacing="1" class="table">
      <form method="Post" name="Form1" Action="Sql_Moban.asp">
          <tr > 
            <td  bgcolor="799AE1"height="26" align="center" class="font"> 
            <%
            set rs=server.createobject("adodb.recordset")
            sql="select * from Sql_Moban"
            rs.open sql,conn,1,1
            %>
                <table width="99%" border="0" align="right" cellpAdding="0" cellspacing="0">
                  <tr> 
                  <%if rs.eof then
                  Response.Write "对不起,暂无任何模版..."
                  else

                  no=rs.recordcount
                  dim a
                  for a=1 to no
                  %>
                    <td class="font" width="20%" align="center">
                      <a href="Sql_Moban.asp?Action=Edit_MoBan&ID=<%=rs("ID")%>" Title="<%=rs("Sql_Name")%>编辑"> <font color="#FFFFFF"><%=rs("Sql_Name")%></font></a>  <a href="Sql_Moban.asp?Action=Index&ID=<%=rs("ID")%>" Title="<%=rs("Sql_Name")%>分类模版">分类</a>  <a href="Sql_Moban.asp?Action=Class&ID=<%=rs("ID")%>" Title="<%=rs("Sql_Name")%>信息模版">信息</a>
                    </td>
				  <%
				   rs.movenext 
                  next
                  end if
                  %>
                  </tr>
                </table>
              </td>
          </tr>
<%
    set rs=server.createobject("adodb.recordset")
	sql="select * from Sql_Moban where id="&request("id")
	rs.open sql,conn,1,1
%>
    <tr > 
      <td align=center width="100%"> 
        <textarea rows="20" name="Moban_Class" cols="80"><%=rs("Sql_Class")%></textarea>
	  </td>
    </tr>
  </table>
  <p align="center">
  <input type="Submit" name="Submit" value="修 改"> 
  <input type="Hidden" name="Action" value="Edit_Class"> 
  <input type="Hidden" name="ID" value="<%=request("id")%>"> 
  <input type="Button" value="预览" onClick="test()" size=10></p>
      </td>
  </tr>
  </form>
</table>

<%elseif request("Action") = "Edit_Class" then%>

<%
	if trim(request("Moban_Class"))="" then
  		errmsg=errmsg+"<li>模板内容不能为空</li>"
	
	else
		
	set rs=server.createobject("adodb.recordset")
    sql="select * from Sql_Moban where id="&request("id")	
	rs.open sql,conn,1,3
	rs("Sql_Class")=request("Moban_Class")
	rs.update	

	end if
%>

<p align="center">模板已经修改成功</p>

<%elseif request("Action") = "Class" then%>

<table width="100%" height="100" border="0" align="center" cellpAdding="0" cellspacing="0">
  <tr>
    <td valign="top">
    <table width="98%" border="0" align="center" cellpAdding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpAdding="0" cellspacing="1" class="table">
      <form method="Post" name="Form2" Action="Sql_Moban.asp">
          <tr > 
            <td  bgcolor="799AE1"height="26" align="center" class="font"> 
            <%
            set rs=server.createobject("adodb.recordset")
            sql="select * from Sql_Moban"
            rs.open sql,conn,1,1
            %>
                <table width="99%" border="0" align="right" cellpAdding="0" cellspacing="0">
                  <tr> 
                  <%if rs.eof then
                  Response.Write "对不起,暂无任何模版..."
                  else

                  no=rs.recordcount
                  dim b
                  for b=1 to no
                  %>
                    <td class="font" width="20%" align="center">
                      <a href="Sql_Moban.asp?Action=Edit_MoBan&ID=<%=rs("ID")%>" Title="<%=rs("Sql_Name")%>编辑"> <font color="#FFFFFF"><%=rs("Sql_Name")%></font></a>  <a href="Sql_Moban.asp?Action=Index&ID=<%=rs("ID")%>" Title="<%=rs("Sql_Name")%>分类模版">分类</a>  <a href="Sql_Moban.asp?Action=Class&ID=<%=rs("ID")%>" Title="<%=rs("Sql_Name")%>信息模版">信息</a></font>
                    </td>
				  <%
				   rs.movenext 
                  next
                  end if
                  %>
                  </tr>
                </table>
              </td>
          </tr>
<%
    set ru=server.createobject("adodb.recordset")
	sql="select * from Sql_Moban where id="&request("id")
	ru.open sql,conn,1,1
%>
    <tr > 
      <td align=center width="100%"> 
        <textarea rows="20" name="Moban_Show" cols="80"><%=ru("Sql_Show")%></textarea>
	  </td>
    </tr>
  </table>
  <p align="center">
  <input type="Submit" name="Submit" value="修 改"> 
  <input type="Hidden" name="Action" value="Edit_Show"> 
  <input type="Hidden" name="ID" value="<%=request("id")%>"> 
  <input type="Button" value="预览" onClick="test()" size=10></p>
      </td>
  </tr>
  </form>
</table>

<%elseif request("Action") = "Edit_Show" then%>

<%
	if trim(request("Moban_Show"))="" then
  		errmsg=errmsg+"<li>模板内容不能为空</li>"
	
	else
		
	set ru=server.createobject("adodb.recordset")
    sql="select * from Sql_Moban where id="&request("id")	
	ru.open sql,conn,1,3
	ru("Sql_Show")=request("Moban_Show")
	ru.update	

	end if
%>

<p align="center">模板已经修改成功</p>

<%elseif request("Action") = "Add_MoBan" then%>

<% If request("Submit") <> "" Then
sql="insert into Sql_MoBan(Sql_Name)values('"&server.HTMLEncode(request("Add_MoBan"))&"')"
conn.execute(sql)
%>
<script language="JavaScript">
<!--
	parent.navigate("Sql_Class.asp")
//-->
</script>
<%end if%>

<%elseif request("Action") = "Manage" then%>

<table width="100%" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top">
       <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="10"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
        <tr bgcolor="799AE1" > 
          <td height="26" colspan="4" align="center" class="font">
              <table width="99%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr> 
                <td class="font"><b><font color="#FFFFFF">模板分类管理</font></b></td>
              </tr>
            </table></td>

⌨️ 快捷键说明

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