?? memgroup.asp
字號:
?<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
'┊ ┊
'┊ 互連在線企業(yè)網(wǎng)站管理系統(tǒng)(NWEB) ┊
'┊ ┊
' 版權(quán)所有 csys.com.cn
'
' 程序制作 互連在線網(wǎng)絡(luò)工作室
' Q Q:61128110
'
' 相關(guān)網(wǎng)址 [產(chǎn)品介紹]http://www.csys.com.cn
' [支持論壇]http://www.csys.com.cn/bbs
'
' 演示網(wǎng)址 http://www.csys.com.cn
'┊ ┊
'└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
%>
<% 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 2004-2008 - csys.com.cn-STUDIO" />
<META NAME="Author" CONTENT="互連在線網(wǎng)絡(luò)技術(shù)工作室,www.csys.com.cn" />
<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')>你不具有該管理模塊的操作權(quán)限,請返回!</font>")
response.end
end if
'========判斷是否具有管理權(quán)限
%>
<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>網(wǎng)站會員管理:會員組別設(shè)置,添加,修改會員信息</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,GroupName,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">權(quán)限值</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>創(chuàng)建時間</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 '創(chuàng)建會員組別
sql="select * from Csys_MemGroup"
rs.open sql,conn,1,3
rs.addnew
if len(trim(Request.Form("GroupName")))<3 or len(trim(Request.Form("GroupName")))>16 then
response.write "<script language=javascript> alert('會員組別名稱必填,且字符數(shù)為6-16字符,3-8個漢字!');history.back(-1);</script>"
response.end
end if
rs("GroupID")=Request.Form("GroupID")
rs("GroupName")=trim(Request.Form("GroupName"))
rs("GroupLevel")=trim(Request.Form("GroupLevel"))
rs("Explain")=trim(Request.Form("Explain"))
rs("AddTime")=now()
end if
if Result="Modify" then '修改網(wǎng)站管理員
sql="select * from Csys_MemGroup where ID="&ID
rs.open sql,conn,1,3
if len(trim(Request.Form("GroupName")))<3 or len(trim(Request.Form("GroupName")))>16 then
response.write "<script language=javascript> alert('會員組別名稱必填,且字符數(shù)為6-16字符,3-8個漢字!');history.back(-1);</script>"
response.end
end if
rs("GroupName")=trim(Request.Form("GroupName"))
rs("GroupLevel")=trim(Request.Form("GroupLevel"))
rs("Explain")=trim(Request.Form("Explain"))
conn.execute("Update Csys_Members set GroupName='"&trim(Request.Form("GroupName"))&"' 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 Csys_MemGroup where ID="& ID
rs.open sql,conn,1,1
if rs.RecordCount=0 then
response.write "<script language=javascript> alert('數(shù)據(jù)庫中無此記錄,請確定返回!');history.back(-1)</script>"
response.end
end if
ID=rs("ID")
GroupID=rs("GroupID")
GroupName=rs("GroupName")
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="GroupName" type="text" class="textfield" id="GroupName" style="WIDTH: 100;" value="<%=GroupName%>"> *</td>
</tr>
<tr>
<td height="20" align="right">權(quán) 限 值:</td>
<td><input name="GroupLevel" type="text" class="textfield" id="GroupLevel" style="WIDTH: 100;" value="<%=GroupLevel%>" onChange="if(/\D/.test(this.value)){alert('只能在權(quán)限值內(nèi)輸入整數(shù)!');}"> * 必須為整數(shù)</td>
</tr>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -