落伍者站长论坛's Archiver

mosheng 发表于 2008-5-15 01:35

救命啊,,谁帮我搞定这两文件。。

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file="../setup.asp"-->
<!--#include file ="../connadmin.asp"-->
<%
act=request.QueryString("act")
select case act
    case "add"  call add()
    case "rename"  call rename()
        case "del"  call dele()
end select

[color=Red]'***********************************************************
sub add()
response.Redirect("test.asp")
end sub
'***********************************************************
sub dele()
response.Redirect("test.asp")
end sub
'***********************************************************
sub rename()
response.Redirect("test.asp")
end sub
'***********************************************************
%>[/color]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../img/css.css">
<title><%=site_name%></title>
</head>

<body>

<script language="JavaScript">
function SureDel(id)
{
    if ( confirm("警告!你是否真的要删除?"))
        {
            window.location.href = "?act=del&do_id=" + id
        }
}
</script>
<table class="border" width="95%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr>
    <td height="49" align="center" valign="top" class="bg_low"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="middle" class="bgtop"><font class="bgtop_title">企业信息类别管理</font>
          </td>
        </tr>
      </table>
        <table width="409" border="5" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
            <td width="403" align="center">
              <table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
              <tr>
                <td align="center">《类别名称》</td>
                <td>&nbsp;</td>
              </tr>
              <%if request("erid")="" then
        set rs1=server.createobject("ADODB.recordset")
        sql="select * from com_kind order by yiorder"
        rs1.open sql,conn,1,1
        lanmu=""
        do while not rs1.eof
        lanmu=lanmu& "<option value='"&rs1("yiid")&"'>"&rs1("yiname")&"</option>"
%>
              <tr>
                <td width="174"><%=rs1("yiname")%></td>
                <td width="44"> <a class="xiahua" href="#" onClick="SureDel(<%=rs1("yiid")%>)">删除</a></td>
              </tr>
              <%
        rs1.movenext
        loop
        rs1.close
end if                       
%>
            </table>
            </td>
    </tr>
  </table>

<form name="form2" method="post" action="?act=add">
        <table width="410" border="5" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
      <td width="404">添加:
        <input name="newname_lan" type="text" id="newname_lan2" size="12" maxlength="20">
        <input type="submit" name="lan_Submit" value="提交"> </td>
    </tr>
  </table>
  </form>

<form name="form3" method="post" action="?act=rename">
        <table width="409" border="5" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
      <td width="407">修改:
        <select size="1" name="lmlist" >
          <option selected>信息分类</option>
          <%=lanmu%>
        </select>
        改名为:
        <input type="text" name="txt_newname" size="12" > <input type="submit" name="Submit2" value="提交">
      </td>
    </tr>
  </table>
</form>
</td>
  </tr>
</table>
</body>
</html>
<%
conn.close
set conn=nothing               
%>



红色这段怎么写啊。。。


这个是一个文件。。。。



----------------------我是可爱的切割线




<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file="../setup.asp"-->
<!--#include file ="../connadmin.asp"-->
<%
act=request.QueryString("act")
select case act
    case "add"  call add()
    case "rename"  call rename()
    case "paixu"  call paixu()
        case "del"  call dele()
end select

[color=Red]'***********************************************************
sub add()
response.Redirect("test.asp")
end sub
'***********************************************************
sub dele()
response.Redirect("test.asp")
end sub
'***********************************************************
sub rename()
response.Redirect("test.asp")
end sub
'***********************************************************
sub paixu()
response.Redirect("test.asp")
end sub
'***********************************************************[/color]
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../img/css.css">
<title><%=site_name%></title>
</head>

<body>

<script language="JavaScript">
function SureDel(id)
{
    if ( confirm("警告!你是否真的要删除?"))
        {
            window.location.href = "?act=del&do_id=" + id
        }
}
</script>
<table class="border" width="95%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr>
    <td height="49" align="center" valign="top" class="bg_low"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="middle" class="bgtop"><font class="bgtop_title">资讯栏目管理</font>
          </td>
        </tr>
      </table><form name="form1" method="post" action="?act=paixu">
        <table width="409" border="5" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
            <td width="403" align="center">
              <table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
                <tr>
            <td>《排序》</td>
            <td align="center">《类别名称》</td>
            <td>&nbsp;</td>
          </tr>
          <%if request("erid")="" then
        set rs1=server.createobject("ADODB.recordset")
        sql="select * from yikind order by yiorder"
        rs1.open sql,conn,1,1
        lanmu=""
        do while not rs1.eof
        lanmu=lanmu& "<option value='"&rs1("yiid")&"'>"&rs1("yiname")&"</option>"
%>
          <tr>
            <td width="58" align="center">
              <input name="txt_paixu" type="text"  value="<%=rs1("yiorder")%>" size="2" width="3">
            </td>
            <td width="174"><%=rs1("yiname")%></td>
            <td width="44">
                       
                        <a class="xiahua" href="#" onClick="SureDel(<%=rs1("yiid")%>)">删除</a></td>
          </tr>
          <%
        rs1.movenext
        loop
        rs1.close
end if                       
%>
        </table>
        <input type="submit" name="Submit" value="提交"> <input type="reset" name="reset" value="重设">
            </td>
    </tr>
  </table>
  </form>

<form name="form2" method="post" action="?act=add">
        <table width="410" border="5" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
      <td width="404">添加:
        <input name="newname_lan" type="text" id="newname_lan2" size="12" maxlength="20">
        <input type="submit" name="lan_Submit" value="提交"> </td>
    </tr>
  </table>
  </form>

<form name="form3" method="post" action="?act=rename">
        <table width="409" border="5" cellpadding="3" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
      <td width="407">修改:
        <select size="1" name="lmlist" >
          <option selected>信息分类</option>
          <%=lanmu%>
        </select>
        改名为:
        <input type="text" name="txt_newname" size="12" > <input type="submit" name="Submit2" value="提交">
      </td>
    </tr>
  </table>
</form>
</td>
  </tr>
</table>
</body>
</html>
<%
conn.close
set conn=nothing               
%>



还是这一个。。。。


数据库下载:[url]http://hgqy.zmdns.cn/mdb.mdb[/url]

爬山虎 发表于 2008-5-15 08:27

帮顶 我不会哦

mosheng 发表于 2008-5-15 13:12

谢谢楼上。

搞定了添加和修改。。。还有删除和排序不行。。。

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.