<!--#include file="../inc/DAL.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/page.asp"-->
<!--#include file="Check.asp"-->
<%
Dim ConfigRS
Set ConfigRS=Server.CreateObject( "ADODB.Recordset" )

if request.form("Method")="ED" then
    ConfigRS.OPEN "select top 1 * from [i_User_Class] where [i_User_Class_ID]="&request("PowerID") , DB_CONN , 1 , 3
    ConfigRS("i_User_Class_Name")=request.form("i_User_Class_Name")
    ConfigRS("i_User_Class_Style")=request.form("i_User_Class_Style")
    ConfigRS("i_User_Class_SortValue")=request.form("i_User_Class_SortValue")
    ConfigRS("i_User_Class_Sort")=request.form("i_User_Class_Sort")
    ConfigRS("i_User_Class_DisKick")=request.form("i_User_Class_DisKick")
    ConfigRS("i_User_Class_AlwaysEnterRoom")=request.form("i_User_Class_AlwaysEnterRoom")
    ConfigRS("i_User_Class_FreeSpeaker")=request.form("i_User_Class_FreeSpeaker")
    ConfigRS.update()
    ConfigRS.close()
    RW "<script>alert('修改成功!');location.href='SetPower.asp';</script>":response.end()
end if

Set ConfigRS=DB_CONN.EXECUTE("select * from [i_User_Class] where [i_User_Class_ID]="&request.QueryString("PowerID"))

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ImChat v1.5 Manage System</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="styles/layoutContent.css" rel="stylesheet" type="text/css" />
<link href="themes/blue/styles.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../JS_Custom/pcasunzip.js"></script>
<style>
.JSTB{border:#ccc solid 1px;border-right:none;border-bottom:none;margin-top:20px;}
.JSTB th,.JSTB td{border-bottom:#ccc solid 1px; border-right:#ccc solid 1px;}
#KRS{padding-left:20px;}
#KRS input,#KRS label{float:left;}
.line{clear:both;line-height:1px;height:1px;}
</style>
</head>
<body>
<div class="contentcontainer">
    <div class="headings alt">
        <h2>角色编辑&nbsp;&nbsp;&nbsp;<a href="javascript:history.back();" style="text-decoration:none;">返回</a>&nbsp;&nbsp;&nbsp;<a href="javascript:\\;" onclick="location.reload();" style="text-decoration:none;">刷新</a></h2>
    </div>
    <div class="contentbox">
        
        <form action="#" method="post" >
            <table class="CB" width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td width="350">
                        <label for="i_User_Class_Name"><strong>角色名称:</strong></label>
                        <input type="text" id="i_User_Class_Name" name="i_User_Class_Name" class="inputbox" value="<%=ConfigRS("i_User_Class_Name")%>"/>
                    </td>
                    <td>
                        <label for="i_User_Class_Style"><strong>样式:</strong></label>
                        <input type="text" id="i_User_Class_Style" name="i_User_Class_Style" class="inputbox" value="<%=ConfigRS("i_User_Class_Style")%>"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_User_Class_SortValue"><strong>权重(数字):</strong></label>
                        <input type="text" id="i_User_Class_SortValue" name="i_User_Class_SortValue" class="inputbox" value="<%=ConfigRS("i_User_Class_SortValue")%>"/>
                    </td>
                    <td>
                        <label for="i_User_Class_Sort"><strong>排序:</strong></label>
                        <input type="text" id="i_User_Class_Sort" name="i_User_Class_Sort" class="inputbox" value="<%=ConfigRS("i_User_Class_Sort")%>"/>
                    </td>
                </tr>
                <tr>
                    <td width="350">
                        <label for="i_User_Class_DisKick"><strong>是否防踢:</strong></label>
                        <select id="i_User_Class_DisKick" name="i_User_Class_DisKick">
                            <option value="1" <%if Cstr(ConfigRS("i_User_Class_DisKick"))="1" then RW "selected=""selected"""%>>是</option>
                            <option value="0" <%if Cstr(ConfigRS("i_User_Class_DisKick"))="0" then RW "selected=""selected"""%>>否</option>
                        </select>
                    </td>
                    <td width="350">
                        <label for="i_User_Class_AlwaysEnterRoom"><strong>是否可以进入满员房间:</strong></label>
                        <select id="i_User_Class_AlwaysEnterRoom" name="i_User_Class_AlwaysEnterRoom">
                            <option value="1" <%if Cstr(ConfigRS("i_User_Class_AlwaysEnterRoom"))="1" then RW "selected=""selected"""%>>是</option>
                            <option value="0" <%if Cstr(ConfigRS("i_User_Class_AlwaysEnterRoom"))="0" then RW "selected=""selected"""%>>否</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <label for="i_User_Class_FreeSpeaker"><strong>每天免费全站小喇叭数量:</strong></label>
                        <input type="text" id="i_User_Class_FreeSpeaker" name="i_User_Class_FreeSpeaker" class="inputbox" value="<%=ConfigRS("i_User_Class_FreeSpeaker")%>"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="hidden" value="<%=request("PowerID")%>" name="PowerID"/>
                        <input type="hidden" value="ED" name="Method"/>
                        <input type="submit" value="修改" class="btn" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>
</html>
