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

📄 systembigclassmanage.asp

📁 这个也是一个功能强大的企业整站的ASP源代码
💻 ASP
字号:
<!--#include file="CheckAdminLogined.asp"-->
<!--#include file="../include/connstr.asp"-->
<!--#include file="../include/DefFunction.asp"-->
<%
 if request("cur_action")="addsave" then'
   set rs=server.CreateObject("adodb.recordset")
   sql_addsave="select * from tSystemBigClass where ID='"&request("T_ID")&"'"
   rs.open sql_addsave,conn,1,1
   if not(rs.bof and rs.eof) then
     response.write "<script>alert('该类别ID号已经存在,按确定返回!');history.back();</script>"
	 response.End()
   end if 
   sql_addsave="insert into tSystemBigClass(ID,BClassName,AddTime) values('"&request("T_ID")&"','"&request("T_BClassName")&"','"&request("T_AddTime")&"')"
   conn.execute sql_addsave
   response.write "<script>alert('已经成功添加');location.replace('SystemBigClassManage.asp');</script>"
   response.End()
 end if
 
 if request("cur_action")="editsave" then
   sql_editsave="update tSystemBigClass set BClassName='"&request("T_BClassName")&"',AddTime='" &request("T_AddTime")&"' where ID='"&request("EditID")&"'"
   conn.execute sql_editsave
   response.write "<script>alert('已经成功修改');location.replace('SystemBigClassManage.asp?PageNo="&request("PageNo")&"');</script>"
   response.End()
 end if
 
 if request("cur_action")="delete" then
   sql_delete="delete from tSystemBigClass where ID='"&request("EditID")&"'"
   conn.execute sql_delete
   response.write "<script>alert('已经成功删除');location.replace('SystemBigClassManage.asp?PageNo="&request("PageNo")&"');</script>"
   response.End() 
 end if 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="/include/jchar.js"></script>
<script language="JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function check_data(form){
  if(Jtrim(form.T_BClassName.value)==""){
    alert("你没有填写大类别行业名称,请填写!")
	form.T_BClassName.focus();
	return(false)	
  }
  form.submit();
}
</script>
<link href="Images/AdminCss.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="8" colspan="2"></td>
  </tr>
  <tr> 
    <td width="76" height="20" rowspan="2"><img src="Images/TopBt.gif" width="67" height="36"></td>
    <td width="917" height="10"></td>
  </tr>
  <tr>
    <td>我的位置:服务管理平台._基本信息._系统大类管理</td>
  </tr>
  <tr> 
    <td height="4" colspan="2"></td>
  </tr>
  <tr> 
    <td colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="E7E7E7">
        <tr> 
          <td height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="159" height="20" align="center" background="images/title1.gif" class="fontwintitle"> 
                  <strong>系统大类管理</strong></td>
                <td align="right" background="images/title2.gif"> <a href="?cur_action=add" class="top"><strong><font color="#CC0000">添加系统大类 </font></strong></a></td>
                <td width="10"><img src="images/title3.gif" width="10" height="20"></td>
              </tr>
            </table></td>
        </tr>
        <tr valign="top"> 
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="6" background="images/midder1.gif"><img src="images/midder1.gif" width="6" height="3"></td>
                <td height="100%" align="center" valign="top"> <% if request("cur_action")="add" then%> <br> <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
                    <form name="form1" method="post" action="?cur_action=addsave">
                      <tr> 
                        <td height="22" colspan="2" align="center" bgcolor="#FFFFFF" class="fonttitle"><strong>添加系统大类</strong></td>
                      </tr>
                      <tr> 
                        <td height="26" align="right" bgcolor="#E7E7DE"><font color="#CC0000">*</font> 
                          大类ID号:</td>
                        <td bgcolor="#FFFFFF">&nbsp; <input name="T_ID" type="text" id="T_ID" size="20"></td>
                      </tr>
                      <tr> 
                        <td width="30%" height="26" align="right" bgcolor="#E7E7DE"> 
                          <font color="#CC0000">*</font> 大类名称:</td>
                        <td width="70%" bgcolor="#FFFFFF">&nbsp; <input name="T_BClassName" type="text" id="T_BClassName" size="40"></td>
                      </tr>
                      <tr> 
                        <td height="22" align="right" bgcolor="#E7E7DE">添加时间:</td>
                        <td bgcolor="#FFFFFF">&nbsp; <input name="T_AddTime" type="text" id="T_AddTime" value="<%=now()%>"></td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="31" colspan="2" align="center"><input type="button" name="Button" value="正确提交" onClick="return check_data(this.form)"> 
                          <input type="reset" name="Submit2" value="重新填写"> <input type="button" name="Submit3" value="返回" onClick="javascript:history.back();"></td>
                      </tr>
                    </form>
                  </table>
                  <%end if
				   if request("cur_action")="edit" then
				     set rs_edit=server.CreateObject("adodb.recordset")
					 sql_edit="select * from tSystemBigClass where ID='"&request("EditID")&"'"
					 rs_edit.open sql_edit,conn,1,1
					 if rs_edit.bof and rs_edit.eof then
					   response.write "<script>alert('读取数据时出错,请与管理员联系!');history.back();</script>"
					   response.end
					 end if				
				   %> <br> <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
                    <form name="form2" method="post" action="?cur_action=editsave">
                      <tr> 
                        <td height="22" colspan="2" align="center" bgcolor="#FFFFFF" class="fonttitle"><strong>修改系统大类</strong></td>
                      </tr>
                      <tr> 
                        <td height="26" align="right" bgcolor="#E7E7DE"><font color="#CC0000">*</font> 
                          大类ID号: </td>
                        <td bgcolor="#FFFFFF">&nbsp; <%=rs_edit("ID")%></td>
                      </tr>
                      <tr> 
                        <td width="30%" height="26" align="right" bgcolor="#E7E7DE"> 
                          <font color="#CC0000">*</font> 大类名称:</td>
                        <td width="70%" bgcolor="#FFFFFF">&nbsp; <input name="T_BClassName" type="text" id="T_BClassName" size="40" value="<%=rs_edit("BClassName")%>"></td>
                      </tr>
                      <tr> 
                        <td height="22" align="right" bgcolor="#E7E7DE">添加时间:</td>
                        <td bgcolor="#FFFFFF">&nbsp; <input name="T_AddTime" type="text" id="T_AddTime" value="<%=rs_edit("AddTime")%>"></td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="31" colspan="2" align="center"><input name="PageNo" type="hidden" id="PageNo" value="<%=request("PageNo")%>"> 
                          <input name="EditID" type="hidden" id="EditID" value="<%=request("EditID")%>"> 
                          <input type="submit" name="Submit4" value="正确提交" onClick="return check_data(this.form)"> 
                          <input type="reset" name="Submit22" value="重新填写"> <input type="button" name="Submit32" value="返回" onClick="javascript:history.back();"></td>
                      </tr>
                    </form>
                  </table>
                  <%end if
				  '----------------------------				     
				   PERPAGE =15
                   PageNo=request("PageNo")   
                   set rs=server.createobject("ADODB.recordset")
                   sql="select * from tSystemBigClass"
                   rs.open sql,conn,1,1 
				   
				   if rs.eof and rs.bof then
				     response.write "暂时没有数据!"
                   else
                      if request("PageNo")="" then
                         CurPage = 1
                      else
                         CurPage = cint(request("PageNo"))
                      end if
                      rs.pagesize = PERPAGE
                      rs.absolutepage = CurPage
				   %> <br> <table width="98%" border="0" cellspacing="0" cellpadding="0">
                    <tr align="center"> 
                      <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
                          <tr align="center" bgcolor="#FFFFFF"> 
                            <td width="11%" height="22"><strong>ID</strong></td>
                            <td width="11%"><strong>大类名称</strong></td>
                            <td width="21%" height="22"><strong>添加时间</strong></td>
                            <td width="14%" height="22"><strong>功能操作</strong></td>
                          </tr>
                          <% for i = 1 to rs.pagesize %>
                          <tr align="center" onMouseOver="this.style.backgroundColor='#e7e7e7';"  onMouseOut="this.style.backgroundColor='#ffffff'"> 
                            <td height="22" bgcolor="#FFFFFF"><%=rs("ID")%></td>
                            <td height="22" bgcolor="#FFFFFF"><%=rs("BClassName")%></td>
                            <td height="22" bgcolor="#FFFFFF"><%=rs("AddTime")%></td>
                            <td height="22" bgcolor="#FFFFFF"> <a href='?cur_action=edit&EditID=<%=rs("id")%>&PageNo=<%=PageNo%>'>修改</a>|<a href="?cur_action=delete&EditID=<%=rs("ID")%>&PageNo=<%=PageNo%>" onclick="{if(confirm('确定删除选定的纪录吗?')){return true;}return false;}">删除</a></td>
                          </tr>
                          <% rs.movenext
                             if rs.eof then
             	               i = i + 1
          	                   exit for
                             end if
                          next %>
                        </table></td>
                    </tr>
                    <tr> 
                      <td height="8" colspan="2"></td>
                    </tr>
                    <tr> 
                      <td width="33%"> 页次:<b><%=CurPage%></b>/<b><%=rs.pagecount %></b>页&nbsp;&nbsp;共<b><%=rs.recordcount %></b>条记录</td>
                      <td width="67%" align="right"> <% 
		                 if CurPage = 1 then 
			                response.write " 首页 | 上一页 | "
		                 else
		                    response.write "<a href='?PageNo=1&T_key="&request("T_key")&"'><b> 首页 </b></a> | <a href='?PageNo="&CurPage-1&"&T_key="&request("T_key")&"'><b>上一页</b></a>| "
		                 end if 
		  
		                 if  CurPage = rs.pagecount then
			                response.write "后一页 | 尾页 "
		                 else
		 	                response.write "<a href='?PageNo="&CurPage+1&"&T_key="&request("T_key")&"'><b>后一页</b> </a>| <a href='?PageNo="&rs.pagecount&"&T_key="&request("T_key")&"'><b>尾页</b> </a>"
		                 end if
                        %> &nbsp;&nbsp;&nbsp;&nbsp;跳转到: <select name="menu1" onChange="MM_jumpMenu('parent.frames[\'right\']',this,0)">
                          <% for i=1 to rs.pagecount 
			                   if CurPage=i then 
					              response.write "<option value='?PageNo="&i&"&T_key="&request("T_key")&"' selected>第"&i&"页"
					           else
					            response.write "<option value='?PageNo="&i&"&T_key="&request("T_key")&"'>第"&i&"页"
					           end if
			                 next
			              %>
                        </select> </td>
                    </tr>
                  </table>
                  <%end if%> <br> <br> </td>
                <td width="2" background="images/midder2.gif"><img src="images/midder2.gif" width="2" height="3"></td>
              </tr>
              <tr> 
                <td valign="top"><img src="images/bottom1.gif" width="6" height="14"></td>
                <td height="14" valign="top" background="images/bottom2.gif"><img src="images/bottom2.gif" width="2" height="14"></td>
                <td valign="top"><img src="images/bottom3.gif" width="2" height="14"></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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