<!--#include file="../inc/DAL.asp"-->
<!--#include file="Check.asp"-->
<%
if request.form("Method")="SetConfig" then
    Dim ConfigRS
    Set ConfigRS=Server.CreateObject( "ADODB.Recordset" )
    ConfigRS.OPEN "select * from [i_Sys_Config]" , DB_CONN , 1 , 3
    ConfigRS("i_Sys_Config_SysName")=request.form("i_Sys_Config_SysName")
    ConfigRS("i_Sys_Config_MoneyName")=request.form("i_Sys_Config_MoneyName")
    ConfigRS("i_Sys_Config_IndexPageSize")=request.form("i_Sys_Config_IndexPageSize")
    ConfigRS("i_Sys_Config_FlyMsgMoney")=request.form("i_Sys_Config_FlyMsgMoney")
    ConfigRS("i_Sys_Config_SysTipMoney")=request.form("i_Sys_Config_SysTipMoney")
    ConfigRS("i_Sys_Config_SeatMsgMoney")=request.form("i_Sys_Config_SeatMsgMoney")
    ConfigRS("i_Sys_Config_PayPercent")=request.form("i_Sys_Config_PayPercent")
    ConfigRS("i_Sys_Config_ExtractionPercent")=request.form("i_Sys_Config_ExtractionPercent")
    ConfigRS("i_Sys_Config_OpenReg")=Cint(request.form("i_Sys_Config_OpenReg"))
    ConfigRS("i_Sys_Config_OpenRoom")=Cint(request.form("i_Sys_Config_OpenRoom"))
    ConfigRS("i_Sys_Config_OpenUCenter")=Cint(request.form("i_Sys_Config_OpenUCenter"))
    ConfigRS("i_Sys_Config_RegDefaultClass")=request.form("i_Sys_Config_RegDefaultClass")
    ConfigRS("i_Sys_Config_RegDefaultMoneyNum")=request.form("i_Sys_Config_RegDefaultMoneyNum")
    ConfigRS("i_Sys_Config_TemplatePath")=request.form("i_Sys_Config_TemplatePath")
    ConfigRS("i_Sys_Config_QQAppID")=request.form("i_Sys_Config_QQAppID")
    ConfigRS("i_Sys_Config_QQAppKey")=request.form("i_Sys_Config_QQAppKey")
	
    ConfigRS("i_Sys_Config_MailServer")=request.form("i_Sys_Config_MailServer")
    ConfigRS("i_Sys_Config_MailAdd")=request.form("i_Sys_Config_MailAdd")
    ConfigRS("i_Sys_Config_MailUserName")=request.form("i_Sys_Config_MailUserName")
    ConfigRS("i_Sys_Config_MailPass")=request.form("i_Sys_Config_MailPass")
    ConfigRS.update()
    for i=0 to (ConfigRS.Fields.count-1)
        Application.Lock()
        Application.contents(ConfigRS.Fields(i).Name)=ConfigRS(ConfigRS.Fields(i).Name)
        Application.Unlock()
    next    
    ConfigRS.close()
    RW "<script>alert('修改成功!');location.href='SetConfig.asp';</script>"
end if
%>
<!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>iShow Manage System</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/layoutContent.css" rel="stylesheet" type="text/css" />
<link href="themes/blue/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="contentcontainer">
    <div class="headings alt">
        <h2>全局设置</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_Sys_Config_SysName"><strong>系统名称:</strong></label>
                        <input type="text" id="i_Sys_Config_SysName" name="i_Sys_Config_SysName" class="inputbox" value="<%=SysConfig("i_Sys_Config_SysName")%>" />
                    </td>
                    <td>
                        <label for="i_Sys_Config_MoneyName"><strong>金钱名称:</strong></label>
                        <input type="text" id="i_Sys_Config_MoneyName" name="i_Sys_Config_MoneyName" class="inputbox"  value="<%=SysConfig("i_Sys_Config_MoneyName")%>"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Config_IndexPageSize"><strong>首页显示的房间数量(数字):</strong></label>
                        <input type="text" id="i_Sys_Config_IndexPageSize" name="i_Sys_Config_IndexPageSize" class="inputbox"  value="<%=SysConfig("i_Sys_Config_IndexPageSize")%>"/>
                    </td>
                    <td >
                        <label for="i_Sys_Config_SysTipMoney"><strong>广播价格(数字):</strong></label>
                        <input type="text" id="i_Sys_Config_SysTipMoney" name="i_Sys_Config_SysTipMoney" class="inputbox"  value="<%=SysConfig("i_Sys_Config_SysTipMoney")%>"/>
                    </td>
                </tr>
                <tr>
                    <td >
                        <label for="i_Sys_Config_SeatMsgMoney"><strong>抢座价格(数字):</strong></label>
                        <input type="text" id="i_Sys_Config_SeatMsgMoney" name="i_Sys_Config_SeatMsgMoney" class="inputbox"  value="<%=SysConfig("i_Sys_Config_SeatMsgMoney")%>"/>
                    </td>
                    <td >
                        <label for="i_Sys_Config_FlyMsgMoney"><strong>飞屏价格(数字):</strong></label>
                        <input type="text" id="i_Sys_Config_FlyMsgMoney" name="i_Sys_Config_FlyMsgMoney" class="inputbox"  value="<%=SysConfig("i_Sys_Config_FlyMsgMoney")%>"/>
                    </td>
                </tr>
				<tr>
                    <td >
                        <label for="i_Sys_Config_PayPercent"><strong>充值汇率(1人民币=?金币):</strong></label>
                        <input type="text" id="i_Sys_Config_PayPercent" name="i_Sys_Config_PayPercent" class="inputbox"  value="<%=SysConfig("i_Sys_Config_PayPercent")%>"/>
                    </td>
                    <td >
                        <label for="i_Sys_Config_ExtractionPercent"><strong>折现汇率(提现金额=金币收入÷充值汇率*折现汇率):</strong></label>
                        <input type="text" id="i_Sys_Config_ExtractionPercent" name="i_Sys_Config_ExtractionPercent" class="inputbox"  value="<%=SysConfig("i_Sys_Config_ExtractionPercent")%>"/>
                    </td>
					
                </tr>
				<tr>    
                    <td>
                        <label for="i_Sys_Config_OpenReg"><strong>是否开启注册:</strong></label>
						<select id="i_Sys_Config_OpenReg" name="i_Sys_Config_OpenReg">
                            <option value="1" <%if Cint(SysConfig("i_Sys_Config_OpenReg"))=1 then response.write "selected"%>>开启</option>
                            <option value="0" <%if Cint(SysConfig("i_Sys_Config_OpenReg"))=0 then response.write "selected"%>>关闭</option>
                        </select>
                    </td>    
                    <td>
                        <label for="i_Sys_Config_OpenRoom"><strong>注册后是否自动开通房间:</strong></label>
						<select id="i_Sys_Config_OpenRoom" name="i_Sys_Config_OpenRoom">
                            <option value="1" <%if Cint(SysConfig("i_Sys_Config_OpenRoom"))=1 then response.write "selected"%>>开启</option>
                            <option value="0" <%if Cint(SysConfig("i_Sys_Config_OpenRoom"))=0 then response.write "selected"%>>关闭</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Config_OpenUCenter"><strong>是否开启UCenter整合:</strong></label>
                        <select id="i_Sys_Config_OpenUCenter" name="i_Sys_Config_OpenUCenter">
                            <option value="1" <%if Cint(SysConfig("i_Sys_Config_OpenUCenter"))=1 then response.write "selected"%>>开启</option>
                            <option value="0" <%if Cint(SysConfig("i_Sys_Config_OpenUCenter"))=0 then response.write "selected"%>>关闭</option>
                        </select>
                    </td>
                    <td>
                        <label for="i_Sys_Config_RegDefaultClass"><strong>用户注册初始用户级别:</strong></label>
                        <select id="i_Sys_Config_RegDefaultClass" name="i_Sys_Config_RegDefaultClass">
                            <%
                            dim GPRS
                            set GPRS=Server.CreateObject( "ADODB.Recordset" )
                            set GPRS=DB_CONN.EXECUTE("select * from [i_User_Class] order by [i_User_Class_Sort] ")
                            while not GPRS.eof
                                dim Selected
                                Selected=""
                                if Cstr(GPRS("i_User_Class_ID"))=Cstr(SysConfig("i_Sys_Config_RegDefaultClass")) then Selected="Selected='selected'"
                                RW "<option value='"&GPRS("i_User_Class_ID")&"' "&Selected&" >"&GPRS("i_User_Class_Name")&"</option>"
                            GPRS.movenext()
                            wend
                            %>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Config_RegDefaultMoneyNum"><strong>用户注册初始金钱</strong></label>
                        <input type="text" id="i_Sys_Config_RegDefaultMoneyNum" name="i_Sys_Config_RegDefaultMoneyNum" class="inputbox"  value="<%=SysConfig("i_Sys_Config_RegDefaultMoneyNum")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Config_TemplatePath"><strong>系统模板路径</strong></label>
                        <input type="text" id="i_Sys_Config_TemplatePath" name="i_Sys_Config_TemplatePath" class="inputbox"  value="<%=SysConfig("i_Sys_Config_TemplatePath")%>"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Config_QQAppID"><strong>QQ_APP_ID:(QQ登录APP_ID)</strong></label>
                        <input type="text" id="i_Sys_Config_QQAppID" name="i_Sys_Config_QQAppID" class="inputbox"  value="<%=SysConfig("i_Sys_Config_QQAppID")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Config_QQAppKey"><strong>QQ_APP_Key:(QQ登录APP_Key)</strong></label>
                        <input type="text" id="i_Sys_Config_QQAppKey" name="i_Sys_Config_QQAppKey" class="inputbox"  value="<%=SysConfig("i_Sys_Config_QQAppKey")%>"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Config_MailServer"><strong>系统邮件SMTP服务器:</strong></label>
                        <input type="text" id="i_Sys_Config_MailServer" name="i_Sys_Config_MailServer" class="inputbox"  value="<%=SysConfig("i_Sys_Config_MailServer")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Config_MailAdd"><strong>系统邮箱地址:(发送密码重置邮件)</strong></label>
                        <input type="text" id="i_Sys_Config_MailAdd" name="i_Sys_Config_MailAdd" class="inputbox"  value="<%=SysConfig("i_Sys_Config_MailAdd")%>"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="i_Sys_Config_MailUserName"><strong>系统邮箱用户名:</strong></label>
                        <input type="text" id="i_Sys_Config_MailUserName" name="i_Sys_Config_MailUserName" class="inputbox"  value="<%=SysConfig("i_Sys_Config_MailUserName")%>"/>
                    </td>
                    <td>
                        <label for="i_Sys_Config_MailPass"><strong>系统邮箱密码:</strong></label>
                        <input type="text" id="i_Sys_Config_MailPass" name="i_Sys_Config_MailPass" class="inputbox"  value="<%=SysConfig("i_Sys_Config_MailPass")%>"/>
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2">
                        <input type="hidden" value="SetConfig" name="Method"/>
                        <input type="submit" value="提交" class="btn" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>
</html>
