📄 memgroup.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>会员组别</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2008-2010 - GLGK.COM-STUDIO" />
<META NAME="Author" CONTENT="冠龙科技,www.glgk.com" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script></HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
if Instr(session("AdminPurview"),"|105,")=0 then
response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
response.end
end if
'========判断是否具有管理权限
%>
<BODY>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<tr>
<td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle"> <strong>网站会员管理:会员组别设置,添加,修改会员信息</strong></font></td>
</tr>
<tr>
<td height="24" align="center" nowrap bgcolor="#EBF2F9"><a href="MemGroup.asp?Result=Add" onClick='changeAdminFlag("添加会员组别")'>添加会员组别</a><font color="#0000FF"> | </font><a href="MemList.asp" onClick='changeAdminFlag("查看所有会员")'>查看所有会员</a></td>
</tr>
</table>
<br>
<%
dim Result
Result=request.QueryString("Result")
dim ID,GroupID,GroupNameCh,GroupNameEn,GroupLevel,Explain,AddTime,RanNum
ID=request.QueryString("ID")
randomize timer
RanNum=Int((8999)*Rnd +1009)
if ID="" then GroupID=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&RanNum
if Result<>"" then
call MemGroupEdit()
end if
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<form action="DelContent.asp?Result=MemGroup" method="post" name="formDel" >
<tr>
<td width="30" height="24" nowrap bgcolor="#8DB5E9"><font color="#FFFFFF"><strong>ID</strong></font></td>
<td width="120" nowrap bgcolor="#8DB5E9"><font color="#FFFFFF"><strong>会员组别号</strong></font></td>
<td width="68" nowrap bgcolor="#8DB5E9"><font color="#FFFFFF"><strong>组别名称</strong></font></td>
<td width="46" nowrap bgcolor="#8DB5E9"><strong><font color="#FFFFFF">权限值</font></strong></td>
<td nowrap bgcolor="#8DB5E9"><strong><font color="#FFFFFF">说明</font></strong></td>
<td width="118" nowrap bgcolor="#8DB5E9"><strong><font color="#FFFFFF"><strong>创建时间</strong></font></strong></td>
<td width="76" colspan="2" nowrap bgcolor="#8DB5E9"><strong><font color="#FFFFFF">操作</font></strong>
<input onClick="CheckAll(this.form)" name="buttonAllSelect" type="button" class="button" id="submitAllSearch" value="全" style="HEIGHT: 18px;WIDTH: 16px;">
<input onClick="CheckOthers(this.form)" name="buttonOtherSelect" type="button" class="button" id="submitOtherSelect" value="反" style="HEIGHT: 18px;WIDTH: 16px;"> </td>
</tr>
<% MemGroupList() %>
</form>
</table>
</BODY>
</HTML>
<%
sub MemGroupEdit()
dim Action,rs,sql
Action=request.QueryString("Action")
if Action="SaveEdit" then '保存编辑会员组别信息
set rs = server.createobject("adodb.recordset")
if Result="Add" then '创建会员组别
sql="select * from MemGroup"
rs.open sql,conn,1,3
rs.addnew
if len(trim(Request.Form("GroupNameCh")))<1 then
response.write "<script language=javascript> alert('""中文""会员组别名称必填!');history.back(-1);</script>"
response.end
end if
if len(trim(Request.Form("GroupNameEn")))<1 then
response.write "<script language=javascript> alert('""英文""会员组别名称必填!');history.back(-1);</script>"
response.end
end if
rs("GroupID")=Request.Form("GroupID")
rs("GroupNameCh")=trim(Request.Form("GroupNameCh"))
rs("GroupNameEn")=trim(Request.Form("GroupNameEn"))
rs("GroupLevel")=trim(Request.Form("GroupLevel"))
rs("Explain")=trim(Request.Form("Explain"))
rs("AddTime")=now()
end if
if Result="Modify" then '修改网站管理员
sql="select * from MemGroup where ID="&ID
rs.open sql,conn,1,3
if len(trim(Request.Form("GroupNameCh")))<1 then
response.write "<script language=javascript> alert('""中文""会员组别名称必填!');history.back(-1);</script>"
response.end
end if
if len(trim(Request.Form("GroupNameEn")))<1 then
response.write "<script language=javascript> alert('""英文""会员组别名称必填!');history.back(-1);</script>"
response.end
end if
rs("GroupNameCh")=trim(Request.Form("GroupNameCh"))
rs("GroupNameEn")=trim(Request.Form("GroupNameEn"))
rs("GroupLevel")=trim(Request.Form("GroupLevel"))
rs("Explain")=trim(Request.Form("Explain"))
conn.execute("Update Members set GroupName='"&trim(Request.Form("GroupNameCh"))&"' where GroupID='"&trim(Request.Form("GroupID"))&"'")
end if
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript> alert('成功编辑会员组别!');changeAdminFlag('会员组别');location.replace('MemGroup.asp');</script>"
else '提取管理员信息
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from MemGroup where ID="& ID
rs.open sql,conn,1,1
if rs.RecordCount=0 then
response.write "<script language=javascript> alert('数据库中无此记录,请确定返回!');history.back(-1)</script>"
response.end
end if
ID=rs("ID")
GroupID=rs("GroupID")
GroupNameCh=rs("GroupNameCh")
GroupNameEn=rs("GroupNameEn")
GroupLevel=rs("GroupLevel")
Explain=rs("Explain")
rs.close
set rs=nothing
end if
end if
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<form name="editMemGroup" method="post" action="MemGroup.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>" onSubmit="return CheckMemGroup()">
<tr>
<td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">
<tr>
<td width="120" height="20" align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="20" align="right">I D:</td>
<td><input name="ID" type="text" class="textfield" id="ID" style="WIDTH: 100;" value="<%if ID="" then response.write ("自动") else response.write (ID) end if%>" maxlength="6" readonly></td>
</tr>
<tr>
<td height="20" align="right">组 别 号:</td>
<td><input name="GroupID" type="text" class="textfield" id="GroupID" style="WIDTH: 140;" value="<%=GroupID%>" maxlength="18" readonly> *</td>
</tr>
<tr>
<td height="20" align="right">中文组别名称:</td>
<td><input name="GroupNameCh" type="text" class="textfield" id="GroupNameCh" style="WIDTH: 100;" value="<%=GroupNameCh%>"> *</td>
</tr>
<tr>
<td height="20" align="right">英文组别名称:</td>
<td><input name="GroupNameEn" type="text" class="textfield" id="GroupNameEn" style="WIDTH: 100;" value="<%=GroupNameEn%>"> *</td>
</tr>
<tr>
<td height="20" align="right">权 限 值:</td>
<td><input name="GroupLevel" type="text" class="textfield" id="GroupLevel" style="WIDTH: 100;" value="<%=GroupLevel%>" onChange="if(/\D/.test(this.value)){alert('只能在权限值内输入整数!');}"> * 必须为整数</td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -