<html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--会员组管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("UsersGroup")
sub EditSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_UsersGroup where ID="&NoSqlHack(Request.Form("ID"))
		Rs.open sql,Conn,1,3
		RS("GroupName")=NoSqlHack(Request.Form("GroupName"))
		RS("GroupType")=NoSqlHack(Request.Form("GroupType"))
		RS("GroupComments")=NoSqlHack(Request.Form("GroupComments"))
		RS("GroupErrors")=NoSqlHack(Request.Form("GroupErrors"))
		RS("GroupFfilms")=NoSqlHack(Request.Form("GroupFfilms"))
		RS("GroupCollection")=NoSqlHack(Request.Form("GroupCollection"))
		RS("GroupWatched")=NoSqlHack(Request.Form("GroupWatched"))
		RS("GroupConverters")=NoSqlHack(Request.Form("GroupConverters"))
		RS("GroupConvertersRate")=NoSqlHack(Request.Form("GroupConvertersRate"))
		'RS("GroupPublished")=NoSqlHack(Request.Form("GroupPublished"))
		'RS("GroupDailyPublished")=NoSqlHack(Request.Form("GroupDailyPublished"))
		RS("GroupNote")=NoSqlHack(Request.Form("GroupNote"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("修改用户组"&Request.Form("GroupName"),7)
		call Admin_ShowErr("<li>用户组修改成功</li>","Admin_UsersGroup.asp",1)
end sub
sub AddSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_UsersGroup"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("GroupName")=NoSqlHack(Request.Form("GroupName"))
		RS("GroupType")=NoSqlHack(Request.Form("GroupType"))
		RS("GroupComments")=NoSqlHack(Request.Form("GroupComments"))
		RS("GroupErrors")=NoSqlHack(Request.Form("GroupErrors"))
		RS("GroupFfilms")=NoSqlHack(Request.Form("GroupFfilms"))
		RS("GroupCollection")=NoSqlHack(Request.Form("GroupCollection"))
		RS("GroupWatched")=NoSqlHack(Request.Form("GroupWatched"))
		RS("GroupConverters")=NoSqlHack(Request.Form("GroupConverters"))
		RS("GroupConvertersRate")=NoSqlHack(Request.Form("GroupConvertersRate"))
		'RS("GroupPublished")=NoSqlHack(Request.Form("GroupPublished"))
		'RS("GroupDailyPublished")=NoSqlHack(Request.Form("GroupDailyPublished"))
		RS("GroupNote")=NoSqlHack(Request.Form("GroupNote"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("添加用户组"&Request.Form("GroupName"),7)
		call Admin_ShowErr("<li>用户组添加成功</li>","Admin_UsersGroup.asp",1)
end sub
sub Del()
	conn.execute "delete from YWNT_TMS_UsersGroup WHERE ID="&NoSqlHack(Request("ID"))
	Call AddLog("删除用户组",7)
	call Admin_ShowErr("<li>用户组删除成功！</li>","Admin_UsersGroup.asp",1)
end sub %>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td class=xingmu>会员组管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_UsersGroup.asp">会员组管理首页</a> | <a href="Admin_UsersGroup.asp?Action=Add">添加会员组</a> | <a href="Admin_UsersGroup.asp?GroupTypeS=1">个人会员</a> | <a href="Admin_UsersGroup.asp?GroupTypeS=0">网吧会员</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
Case "Edit"
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_UsersGroup where ID="&NoSqlHack(Request("ID"))
		Rs.open sql,Conn,1,1
		YWNT_TMS_ID=RS("ID")
		YWNT_TMS_GroupName=RS("GroupName")
		YWNT_TMS_GroupType = RS("GroupType")
		YWNT_TMS_GroupComments = RS("GroupComments")
		YWNT_TMS_GroupErrors=RS("GroupErrors")
		YWNT_TMS_GroupFfilms=RS("GroupFfilms")
		YWNT_TMS_GroupCollection=RS("GroupCollection")
		YWNT_TMS_GroupWatched=RS("GroupWatched")
		YWNT_TMS_GroupConverters=RS("GroupConverters")
		YWNT_TMS_GroupConvertersRate=RS("GroupConvertersRate")
		'YWNT_TMS_GroupPublished=RS("GroupPublished")
		'YWNT_TMS_GroupDailyPublished=RS("GroupDailyPublished")
		YWNT_TMS_GroupNote=RS("GroupNote")
		RS.close   
      	set RS=nothing
	call Edit()
Case "EditSave"
	call EditSave()
Case "Del"
	call Del()
Case else
	call List()
End Select
sub List()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td width="69%" align="center" class=xingmu>会员组名称</td>
      <td width="16%" align="center" class=xingmu>会员组类型</td>
      <td width="10%" align="center" class=xingmu>操作</td>
    </tr>
<%Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,GroupName,GroupType from YWNT_TMS_UsersGroup "
		if Request.QueryString("GroupTypeS")<>"" then
			sql=sql&"where GroupType="&NoSqlHack(Request.QueryString("GroupTypeS"))&" Order by ID asc"
		else
			sql=sql&"Order by ID asc"
		end if
		Rs.open sql,Conn,1,1
do while not RS.eof%>
    <tr>
      <td height=32 align="center" class="hback"><%=Rs("ID")%></td>
      <td height=32 class="hback"><%=Rs("GroupName")%></td>
      <td align="center" class="hback"><%=GroupTypeW(RS("GroupType"))%></td>
      <td align="center" class="hback"><A href="Admin_UsersGroup.asp?Action=Edit&ID=<%=RS("ID")%>">修改</A>｜<A onClick="{if(confirm('确定要删除吗?\n此会员组的隶属会员将需要重新指定会员组!!')){return true;}return false;}" href="Admin_UsersGroup.asp?Action=Del&ID=<%=RS("ID")%>">删除</A></td>
    </tr>
		<%RS.movenext     
    	loop
		RS.close     
		set RS=nothing%>
  </tbody>
</table>
<%end sub
sub Add()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_UsersGroup.asp?Action=AddSave" method="post">
  <tbody>
    <tr>
      <td colspan="2" class=xingmu>添加会员组</td>
    </tr>
    <tr>
      <td width="21%" height=32 align="right" class="hback">会员组名称：</td>
      <td height=15 class="hback"><input name="GroupName" type="text" id="GroupName" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">会员组类型：</td>
      <td height=16 class="hback"><select name="GroupType" id="GroupType">
        <option value="1">个人会员</option>
        <option value="0">网吧会员</option>
            </select></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">发表评论：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupComments" value="1">
      关闭
      <input type="radio" name="GroupComments" value="0"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片报错：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupErrors" value="1">
关闭
<input type="radio" name="GroupErrors" value="0"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">会员求片：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupFfilms" value="1">
关闭
<input type="radio" name="GroupFfilms" value="0"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">收藏影片数量：</td>
      <td height=16 class="hback"><input name="GroupCollection" type="text" id="GroupCollection" size="40">
        部</td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">每日观看数量：</td>
      <td height=16 class="hback"><input name="GroupWatched" type="text" id="GroupWatched" size="40">
        部</td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影币与包月转换：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupConverters" value="1" onClick="showThumbnail_RateOrSize(1,'Converters')">
关闭
<input type="radio" name="GroupConverters" value="0" onClick="showThumbnail_RateOrSize(0,'Converters')"></td>
    </tr>
	  <TR id=Converters style="display:none">
    <TD height=32 align="right" class="hback">影币与包月转换率：</TD>
    <TD class="hback"><input name="GroupConvertersRate" type="text" id="GroupConvertersRate" value="8" size="40">
    /影币 (每多少影币转换一天包月)</TD>
  </TR>
   <!--<tr>
      <td height=32 align="right" class="hback">影片发布：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupPublished" value="1" onClick="showThumbnail_RateOrSize(1,'Published')">
关闭
<input type="radio" name="GroupPublished" value="0" onClick="showThumbnail_RateOrSize(0,'Published')"></td>
    </tr>
    <tr id=Published style="display:none">
      <td height=32 align="right" class="hback">每日发布数量：</td>
      <td height=16 class="hback"><input name="GroupDailyPublished" type="text" id="GroupDailyPublished" size="40">
        部</td>
    </tr>-->
    <tr>
      <td height=32 align="right" class="hback">会员组说明：</td>
      <td height=15 class="hback"><textarea name="GroupNote" cols="40" rows="5" id="GroupNote"></textarea></td>
    </tr>
    <tr>
      <td height=32 colspan="2" align="center" class="hback"><input type="submit" name="Submit" value="添 加"></td>
    </tr>
  </tbody>
</form>
</table>
<%end sub
sub Edit()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_UsersGroup.asp?Action=EditSave" method="post">
  <tbody>
    <tr>
      <td colspan="2" class=xingmu>修改会员组</td>
    </tr>
    <tr>
      <td width="21%" height=32 align="right" class="hback">会员组名称：</td>
      <td height=15 class="hback"><input name="GroupName" type="text" id="GroupName" value="<%=YWNT_TMS_GroupName%>" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">会员组类型：</td>
      <td height=16 class="hback"><select name="GroupType" id="GroupType">
        <option value="1" <%if YWNT_TMS_GroupType=1 then Response.Write("selected")%>>个人会员</option>
        <option value="0" <%if YWNT_TMS_GroupType=0 then Response.Write("selected")%>>网吧会员</option>
            </select></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">发表评论：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupComments" value="1" <%if YWNT_TMS_GroupComments=1 then Response.Write("checked")%>>
      关闭
      <input type="radio" name="GroupComments" value="0" <%if YWNT_TMS_GroupComments=0 then Response.Write("checked")%>></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片报错：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupErrors" value="1" <%if YWNT_TMS_GroupErrors=1 then Response.Write("checked")%>>
关闭
<input type="radio" name="GroupErrors" value="0" <%if YWNT_TMS_GroupErrors=0 then Response.Write("checked")%>></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">会员求片：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupFfilms" value="1" <%if YWNT_TMS_GroupFfilms=1 then Response.Write("checked")%>>
关闭
<input type="radio" name="GroupFfilms" value="0" <%if YWNT_TMS_GroupFfilms=0 then Response.Write("checked")%>></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">收藏影片数量：</td>
      <td height=16 class="hback"><input name="GroupCollection" type="text" id="GroupCollection" value="<%=YWNT_TMS_GroupCollection%>" size="40">
        部</td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">每日观看数量：</td>
      <td height=16 class="hback"><input name="GroupWatched" type="text" id="GroupWatched" value="<%=YWNT_TMS_GroupWatched%>" size="40">
        部</td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影币与包月转换：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupConverters" value="1" onClick="showThumbnail_RateOrSize(1,'Converters')" <%if YWNT_TMS_GroupConverters=1 then Response.Write("checked")%>>
关闭
<input type="radio" name="GroupConverters" value="0" onClick="showThumbnail_RateOrSize(0,'Converters')" <%if YWNT_TMS_GroupConverters=0 then Response.Write("checked")%>></td>
    </tr>
	  <TR id=Converters style="display:none">
    <TD height=32 align="right" class="hback">影币与包月转换率：</TD>
    <TD class="hback"><input name="GroupConvertersRate" type="text" id="GroupConvertersRate" value="<%=YWNT_TMS_GroupConvertersRate%>" size="40">
    /影币 (每多少影币转换一天包月)</TD>
  </TR>
    <!--<tr>
      <td height=32 align="right" class="hback">影片发布：</td>
      <td height=16 class="hback">开启
        <input type="radio" name="GroupPublished" value="1" onClick="showThumbnail_RateOrSize(1,'Published')" <%if YWNT_TMS_GroupPublished=1 then Response.Write("checked")%>>
关闭
<input type="radio" name="GroupPublished" value="0" onClick="showThumbnail_RateOrSize(0,'Published')" <%if YWNT_TMS_GroupPublished=0 then Response.Write("checked")%>></td>
    </tr>
    <tr id=Published style="display:none">
      <td height=32 align="right" class="hback">每日发布数量：</td>
      <td height=16 class="hback"><input name="GroupDailyPublished" type="text" id="GroupDailyPublished" value="<%=YWNT_TMS_GroupDailyPublished%>" size="40">
        部</td>
    </tr>-->
    <tr>
      <td height=32 align="right" class="hback">会员组说明：</td>
      <td height=15 class="hback"><textarea name="GroupNote" cols="40" rows="5" id="GroupNote"><%=YWNT_TMS_GroupNote%></textarea></td>
    </tr>
    <tr>
      <td height=32 colspan="2" align="center" class="hback"><input name="ID" type="hidden" id="ID" value="<%=YWNT_TMS_ID%>">
      <input type="submit" name="Submit" value="修 改"></td>
    </tr>
  </tbody>
</form>
</table>
<%end sub%>
<script language="javascript">
<%if Action="Edit" then%>
showThumbnail_RateOrSize(<%=YWNT_TMS_GroupConverters%>,'Converters')
//showThumbnail_RateOrSize(<%=YWNT_TMS_GroupPublished%>,'Published')
<%end if%>
function showThumbnail_RateOrSize(param,pname)
{
	if(param==1)
	{
		document.getElementById(pname).style.display="block"
	}else
	{
		document.getElementById(pname).style.display="none"
	}
}
  </script>
<%call connclose()%>
</BODY></HTML>
