<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="inc/Page_cls.asp"-->
<!--#include file="../API/SMS.Class.asp"-->
<!--#include file="../include/Lebi_Config.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_sms.asp
'* 最后更新 2014-01-02 by 56770.kingdge
'*****************************************
Dim admin_flag
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_sms.inc"
CurrentId = 4
CurrentUrl = "admin_sms.asp"
LB_Head()
LB_Menu()
action = request("action")
state = request("state")
%>
<div class="tabmenu mainwidth">
	  <ul>
		<li <%If action = "" Then Response.Write("class=""current""") End If%>><a href="admin_sms.asp"><span><%=Lang_Menu(112)%></span></a></li>
		<li <%If action = "mobile" Then Response.Write("class=""current""") End If%>><a href="?action=mobile"><span><%=Lang_Menu(113)%></span></a></li>
		<li <%If action = "group" Then Response.Write("class=""current""") End If%>><a href="?action=group"><span><%=Lang_Menu(114)%></span></a></li>
		<li <%If action = "config" Then Response.Write("class=""current""") End If%>><a href="?action=config"><span><%=Lang_Menu(115)%></span></a></li>
		<li <%If action = "send" Then Response.Write("class=""current""") End If%>><a href="?action=send"><span><%=Lang_Menu(111)%></span></a></li>
	  </ul>
</div>
<%
Response.Write("<div class=""tab-mainbody"">")
Response.Write("<div class=""tab-mainbody2"">")
If OutSubmit = 1 Then CheckOutSubmit()
Select Case request("action")
	   Case "config" config()
	   Case "config_ok" config_ok()
	   Case "mobile" mobile()
	   Case "mobile_add" mobile_add()
	   Case "mobile_edit" mobile_edit()
	   Case "mobile_del" mobile_del()
	   Case "group" group()
	   Case "group_add" group_add()
	   Case "group_edit" group_edit()
	   Case "group_del" group_del()
	   Case "send" send()
	   Case "send_ok" send_ok()
	   Case "del" del()
	   Case Else
			main()
End Select
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

Sub config_ok()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.5,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		sys_sms = safereplace(trim(request("sms_user"))) &"$"& safereplace(trim(request("sms_pass"))) &"$"& safereplace(trim(request("sms_sendtype"))) &"$"& Replace(safereplace(trim(request("sms_sendmode")))," ","") &"$"& safereplace(trim(request("sms_receiveno"))) &"$"& safereplace(trim(request("sms_state"))) &"$"& safereplace(trim(request("sms_maxlen"))) &"$"& checknum(trim(request("sms_server")),0) &"$$$$$$$"
		set rs=server.createobject("adodb.recordset")
		sql="select sys_sms from [Lebi_system]"
		rs.open sql, conn, 1, 3
		rs("sys_sms") = sys_sms
		rs.update
		rs.close:Set rs=Nothing
		CreateConfig()
		Application("Lebi_sys_config"& cookiesname) = Empty
		ManageLog Lang_Sms(1)
		Call Up_mes(Lang_sys(69),"·"& Lang_sys(68),0,"?action=config",0,0,2,1)
End Sub

Sub mobile_add()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.3,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		f_user = Safereplace(trim(request("f_user")))
		f_mobile = Safereplace(trim(request("f_mobile")))
		f_company = Safereplace(trim(request("f_company")))
		f_group = checknum(trim(request("f_group")),0)
		set rs=server.CreateObject("adodb.recordset")
		rs.Open "select * from [Lebi_Friend]", conn, 1, 3
		rs.AddNew
		rs("f_user") = f_user
		rs("f_mobile") = f_mobile
		rs("f_company") = f_company
		rs("f_group") = f_group
		rs.Update
		rs.Close:set rs=Nothing
		ManageLog Lang_Sms(2) &" ["& f_user &"："& f_mobile &"]"
		Call Up_mes(Lang_sys(45),"·"& Lang_sys(44),0,"?action=mobile",0,0,2,1)
End Sub

Sub mobile_edit()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.3,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		f_id = Replace(Safereplace(trim(request("f_id")))," ","")
        f_user = Replace(Safereplace(trim(request("f_user")))," ","")
		f_mobile = Replace(Safereplace(trim(request("f_mobile")))," ","")
        f_company = Replace(Safereplace(trim(request("f_company")))," ","")
		f_group = Replace(Safereplace(trim(request("f_group")))," ","")
		If UBound (Split(f_id,",")) = 0 Then
                set rs=server.CreateObject("adodb.recordset")
                rs.open "select * from [Lebi_Friend] where f_id=" & f_id, conn, 1, 3
				rs("f_user") = f_user
				rs("f_mobile") = f_mobile
				rs("f_company") = f_company
				rs("f_group") = f_group
                rs.update
                rs.close:set rs=Nothing
				ManageLog Lang_Sms(3) &" ["& f_user &"："& f_mobile &"]"
		Else
		        For edit_i = 0 To UBound (Split(f_id,","))
                        set rs=server.CreateObject("adodb.recordset")
                        rs.open "select * from [Lebi_Friend] where f_id=" & Split(f_id,",")(edit_i), conn, 1, 3
                        rs("f_user") = Split(f_user,",")(edit_i)
                        rs("f_mobile") = Split(f_mobile,",")(edit_i)
                        rs("f_company") = Split(f_company,",")(edit_i)
                        rs("f_group") = Split(f_group,",")(edit_i)
                        rs.update
                        rs.close:set rs=Nothing
                Next
				ManageLog Lang_Sms(4)
		End If
        m_u="?action=mobile&page="& request("page") &"&groupid="& request("groupid") &"&keyword="& request("keyword")
		Call Up_mes(Lang_sys(48),"·"& Lang_sys(47),0,m_u,0,0,2,1)
End Sub

Sub mobile_del()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.3,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
        del_id= Replace(safereplace(Trim(request("id"))),"，",",")
		If Right(del_id,1) = "," Then del_id = Left(del_id,Len(del_id)-1)
        if del_id="" then
                response.write"<SCRIPT language=JavaScript>alert('"& Lang_sys(41) &"');javascript:history.go(-1)</SCRIPT>"
                response.end
        end if
        conn.execute ("delete from [Lebi_Friend] where f_id in("&del_id&")")
		ManageLog Lang_Sms(5)
        m_u="?action=mobile&page="& request("page") &"&groupid="& request("groupid") &"&pagenum="& request("pagenum") &"&keyword="& request("keyword")
		Call Up_mes(Lang_sys(43),"·"& Lang_sys(42),0,m_u,0,0,2,1)
End Sub

Sub group_add()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.4,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		g_name = Safereplace(trim(request("g_name")))
		g_order = checknum(trim(request("g_order")),0)
		set rs=server.CreateObject("adodb.recordset")
		rs.Open "select * from [Lebi_FriendGroup]", conn, 1, 3
		rs.AddNew
		rs("g_name") = g_name
		rs("g_order") = g_order
		rs.Update
		rs.Close:set rs=Nothing
		ManageLog Lang_Sms(6) &" ["& g_name &"]"
		Call Up_mes(Lang_sys(45),"·"& Lang_sys(44),0,"?action=group",0,0,2,1)
End Sub

Sub group_edit()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.4,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		g_id = Replace(Safereplace(trim(request("g_id")))," ","")
        g_name = Replace(Safereplace(trim(request("g_name")))," ","")
		g_order = Replace(Safereplace(trim(request("g_order")))," ","")
		If UBound (Split(g_id,",")) = 0 Then
                set rs=server.CreateObject("adodb.recordset")
                rs.open "select * from [Lebi_FriendGroup] where g_id=" & g_id, conn, 1, 3
				rs("g_name") = g_name
				rs("g_order") = g_order
                rs.update
                rs.close:set rs=Nothing
				ManageLog Lang_Sms(7) &" ["& g_name &"]"
		Else
		        For edit_i = 0 To UBound (Split(g_id,","))
                        set rs=server.CreateObject("adodb.recordset")
                        rs.open "select * from [Lebi_FriendGroup] where g_id=" & Split(g_id,",")(edit_i), conn, 1, 3
                        rs("g_name") = Split(g_name,",")(edit_i)
                        rs("g_order") = Checknum(Split(g_order,",")(edit_i),0)
                        rs.update
                        rs.close:set rs=Nothing
                Next
				ManageLog Lang_Sms(8)
		End If
        m_u="?action=group&page="& request("page")
		Call Up_mes(Lang_sys(48),"·"& Lang_sys(47),0,"?",0,0,2,1)
End Sub

Sub group_del()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.4,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
        del_id= Replace(safereplace(Trim(request("id"))),"，",",")
		If Right(del_id,1) = "," Then del_id = Left(del_id,Len(del_id)-1)
        if del_id="" then
                response.write"<SCRIPT language=JavaScript>alert('"& Lang_sys(41) &"');javascript:history.go(-1)</SCRIPT>"
                response.end
        end if
        conn.execute ("delete from [Lebi_FriendGroup] where g_id in("&del_id&")")
		ManageLog Lang_Sms(9)
        m_u="?action=group&pagenum="& request("pagenum") &"&page="& request("page")
		Call Up_mes(Lang_sys(43),"·"& Lang_sys(42),0,m_u,0,0,2,1)
End Sub

Sub send_ok()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.1,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		Set rs = conn.execute("select top 1 sys_sms from [Lebi_system]")
		arr_sys_sms = split(rs("sys_sms"),"$")
		rs.close : Set rs = Nothing
		sms_state = arr_sys_sms(5)
        send_way = checknum(request("send_way"),0)
        send_type = checknum(request("send_type"),0)
	    send_no = Replace(safereplace(request("send_no")),"，",",") &",0"
	    send_content = safereplace(request("send_content"))
	    send_group = safereplace(request("send_group"))
	    usergrade = safereplace(request("usergrade"))
	    userlogintype = Replace(request("userlogintype"),"'","")
	    userlogins = checknum(request("userlogins"),0)
	    userlogindaytype = Replace(request("userlogindaytype"),"'","")
	    userloginday = checknum(request("userloginday"),0)
	    userjifentype = Replace(request("userjifentype"),"'","")
	    userjifen = checknum(request("userjifen"),0)
	    usersumpaytype = Replace(request("usersumpaytype"),"'","")
	    usersumpay = checknum(request("usersumpay"),0)
	    usersex = safereplace(request("usersex"))
		If SMS_State = "1" Then
				Select Case send_way
				Case "0"

				Case "1"
						send_no = ""
						sql = "select f_mobile from [lebi_Friend] where 1=1"
						If InStr(send_group,",")>0 Then
								sql = sql &" and ("
								For i = 0 To UBound(Split(send_group,","))
										sql = sql &" f_group = "& Split(send_group,",")(i) &""
										If i < UBound(Split(send_group,",")) Then sql = sql &" or"
								Next
								sql = sql &" )"
						ElseIf send_group <> "" Then
								sql = sql &" and f_group = "& send_group &""
						End If
						Set rs = conn.execute(sql)
						If rs.eof Then
								Call Up_mes(Lang_sys(46),"·"& Lang_Sms(10),0,"javascript:history.back()",0,0,2,0)
						End If
						Do While Not rs.eof
								If CheckMobile(rs(0)) Then
										send_no = send_no & rs(0) &","
								End If
						rs.movenext
						Loop
						rs.close : Set rs = Nothing
				Case "2"
						send_no = ""
						sql = "select user_mobile from [lebi_User] where 1=1"
						If InStr(usergrade,",")>0 Then
								sql = sql &" and ("
								For i = 0 To UBound(Split(usergrade,","))
										sql = sql &" user_grade = "& Split(usergrade,",")(i) &""
										If i < UBound(Split(usergrade,",")) Then sql = sql &" or"
								Next
								sql = sql &" )"
						ElseIf usergrade <> "" Then
								sql = sql &" and user_grade = "& usergrade &""
						End If
						sql = sql &" and logins "& userlogintype &" "& userlogins &" and jifen "& userjifentype &" "& userjifen &" and sumpay "& usersumpaytype &" "& usersumpay &""
						If IsSqlDataBase = 1 Then sql = sql &" and datediff(d,lastlogintime,'"& date() &"') "& userlogindaytype &" "& userloginday &""
						If IsSqlDataBase = 0 Then sql = sql &" and datediff('d',lastlogintime,'"& date() &"') "& userlogindaytype &" "& userloginday &""
						if usersex <> "0" then sql = sql &" and sex = '"& usersex &"'"
						Set rs = conn.execute(sql)
						If rs.eof Then
								Call Up_mes(Lang_sys(46),"·"& Lang_Sms(11),0,"javascript:history.back()",0,0,2,0)
						End If
						Do While Not rs.eof
								If CheckMobile(rs(0)) Then
										send_no = send_no & rs(0) &","
								End If
						rs.movenext
						Loop
						rs.close : Set rs = Nothing
				End Select
				Call RedirectSendSMS(send_no,send_content,"send","",send_type)
		End If
		Call Up_mes(Lang_Sms(12),"·"& Lang_Sms(13),0,"?action=send",0,0,2,1)
End Sub

Sub del()
        If OnlyRead = 1 Then OnlyReadMessage()
		admin_flag=",13.2,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
        del_id= Replace(safereplace(Trim(request("id"))),"，",",")
		If Right(del_id,1) = "," Then del_id = Left(del_id,Len(del_id)-1)
        if del_id="" then
                response.write"<SCRIPT language=JavaScript>alert('"& Lang_sys(41) &"');javascript:history.go(-1)</SCRIPT>"
                response.end
        end if
        conn.execute ("delete from [Lebi_SmsLog] where l_id in("&del_id&")")
		ManageLog Lang_Sms(14)
        m_u="?page="& request("page") &"&datefrom="& request("datefrom") &"&dateto="& request("dateto") &"&pagenum="& request("pagenum") &"&keyword="& request("keyword")
		Call Up_mes(Lang_sys(43),"·"& Lang_sys(42),0,m_u,0,0,2,1)
End Sub

Sub config()
		admin_flag=",13.5,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="config" class="classtable">
<form name="system" method="post" action="?action=config_ok">
<tr>
	<td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
	<td align="right" class="classhead">
	<%=QuickMenu("?action=group|"& Lang_Menu(114) &"","?action=send|"& Lang_Menu(111) &"")%>
	</td>
 </tr>
<%
Set rs = conn.execute("select top 1 sys_sms from [Lebi_system]")
arr_sys_sms = split(rs("sys_sms"),"$")
rs.close : Set rs = Nothing
sms_user = arr_sys_sms(0)
sms_pass = arr_sys_sms(1)
sms_sendtype = arr_sys_sms(2)
sms_sendmode = arr_sys_sms(3)
sms_receiveno = arr_sys_sms(4)
sms_state = arr_sys_sms(5)
sms_maxlen = arr_sys_sms(6)
sms_mserver = checknum(arr_sys_sms(7),0)
Set newclient=New SMS
If sms_mserver = 0 Then 
respxml=newclient.infoSMSAccount()
SESSION("xml")=newclient.sendXML
SESSION("respxml")=respxml 'newclient.respxml
smscode=newclient.getCode()
account=getMessage(respxml,"smsaccount")
Else
SMSSum=newclient.GetHttpPage("","CheckSumSms")
End If 
%>
<tr>
<td height="30" colspan="2" class="classtop" height="30"><%=Lang_Sms(15)%></td>
</tr>
<tr class="classrow">
<td width="15%" height="30" class="classrow"><%=Lang_Sms(16)%></td>
<td width="85%" class="classrow">
<input type="text" name="sms_user" size="35" value="<%=sms_user%>" class="form">
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(17)%></td>
<td class="classrow">
<input type="password" name="sms_pass" size="35" value="<%=sms_pass%>" class="form">
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(83)%></td>
<td class="classrow">
<select name="sms_server">
	<option value="0" <%=judge2(sms_server,"0")%>><%=Lang_Sms(84)%></option>
	<option value="1" <%=judge2(sms_server,"1")%>><%=Lang_Sms(85)%></option>
</select>
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(18)%></td>
<td class="classrow">
<select name="sms_state">
	<option value="0" <%=judge2(sms_state,"0")%>><%=Lang_Sms(19)%></option>
	<option value="1" <%=judge2(sms_state,"1")%>><%=Lang_Sms(20)%></option>
</select>
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(21)%></td>
<td class="classrow">
<select name="sms_sendtype">
	<!--<option value="9" <%=judge2(sms_sendtype,"9")%>>即时通道一 (发送1条扣去1.3条)</option>
	<option value="8" <%=judge2(sms_sendtype,"8")%>>即时通道一(客服类推荐) (发送1条扣去1.3条)</option>-->
	<option value="3" <%=judge2(sms_sendtype,"3")%>> <%=Lang_Sms(46)%></option>
	<option value="2" <%=judge2(sms_sendtype,"2")%>> <%=Lang_Sms(47)%></option>
	<!--<option value="10" <%=judge2(sms_sendtype,"10")%>>普通通道三 (发送1条扣去1条)</option>-->
</select>
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(22)%></td>
<td class="classrow">
<strong><%=Lang_Sms(29)%></strong><%=Lang_Sms(31)%><input type="checkbox" value="1" <%=judge(sms_sendmode,"1")%> name="sms_sendmode">
<%=Lang_Sms(32)%><input type="checkbox" value="2" <%=judge(sms_sendmode,"2")%> name="sms_sendmode">
<%=Lang_Sms(33)%><input type="checkbox" value="3" <%=judge(sms_sendmode,"3")%> name="sms_sendmode">
<%=Lang_Sms(34)%><input type="checkbox" value="4" <%=judge(sms_sendmode,"4")%> name="sms_sendmode">
<%=Lang_Sms(35)%><input type="checkbox" value="5" <%=judge(sms_sendmode,"5")%> name="sms_sendmode">
<%=Lang_Sms(36)%><input type="checkbox" value="6" <%=judge(sms_sendmode,"6")%> name="sms_sendmode">
<%=Lang_Sms(37)%><input type="checkbox" value="7" <%=judge(sms_sendmode,"7")%> name="sms_sendmode">
<br/>
<strong><%=Lang_Sms(30)%></strong><%=Lang_Sms(38)%><input type="checkbox" value="8" <%=judge(sms_sendmode,"8")%> name="sms_sendmode">
<%=Lang_Sms(39)%><input type="checkbox" value="9" <%=judge(sms_sendmode,"9")%> name="sms_sendmode">
<%=Lang_Sms(40)%><input type="checkbox" value="10" <%=judge(sms_sendmode,"10")%> name="sms_sendmode">
<%=Lang_Sms(41)%><input type="checkbox" value="11" <%=judge(sms_sendmode,"11")%> name="sms_sendmode">
<%=Lang_Sms(42)%><input type="checkbox" value="12" <%=judge(sms_sendmode,"12")%> name="sms_sendmode">
<%=Lang_Sms(43)%><input type="checkbox" value="13" <%=judge(sms_sendmode,"13")%> name="sms_sendmode">
<%=Lang_Sms(44)%><input type="checkbox" value="14" <%=judge(sms_sendmode,"14")%> name="sms_sendmode">
<%=Lang_Sms(45)%><input type="checkbox" value="15" <%=judge(sms_sendmode,"15")%> name="sms_sendmode">
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(23)%></td>
<td class="classrow">
<input type="text" name="sms_receiveno" size="35" value="<%=sms_receiveno%>" class="form"> <img src="images/help.gif" onmouseover="showhintinfo(this,0,0,'','<%=Lang_Sms(24)%>','50','up');" onmouseout="hidehintinfo();" />
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(25)%></td>
<td class="classrow">
<input type="text" name="sms_maxlen" size="5" value="<%=sms_maxlen%>" class="form"> <%=Lang_Sms(26)%> <img src="images/help.gif" onmouseover="showhintinfo(this,0,0,'','<%=Lang_Sms(27)%>','50','up');" onmouseout="hidehintinfo();" />
</td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Sms(28)%></td>
<td class="classrow">
<%
if smscode<>"2000" Then
		response.write("0.00")
Else
		response.write(account)
End If
%>
</td>
</tr>
<tr>
<td colspan="2" class="classfaq">
  <div class="faq_main">
  <p class="faq_title"><%=Lang_Sms(84)%><%=Lang_Sms(48)%></p>
  <%=Lang_Sms(49)%>
  <p class="faq_title"><%=Lang_Sms(85)%><%=Lang_Sms(48)%></p>
  <%=Lang_Sms(86)%>
  </div>
</td>
</tr>
<tr>
  <td height="30" colspan="2" align="left" class="classfooter"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
 </tr>
</form>
</table>
<script>tdshow("config");</script>
<%
End Sub

Sub send()
		admin_flag=",13.1,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		Set rs = conn.execute("select top 1 sys_sms from [Lebi_system]")
		arr_sys_sms = split(rs("sys_sms"),"$")
		rs.close : Set rs = Nothing
		sms_sendtype = arr_sys_sms(2)
%>
		<script language="JavaScript" type="text/JavaScript">
		function CheckForm(theform)
		{
			var jsend_way = document.getElementsByName('send_way');for (var ii=0;ii<jsend_way.length ;ii++ ){ if(jsend_way[ii].checked==true ){jsend_way = jsend_way[ii].value;}}
			if (jsend_way == 0)
			{
				if (CheckEmpty('send_no')){ShowMessage('send_no','<%=Lang_Sms(10)%>');return false;}
			}
			if (CheckEmpty('send_content')){ShowMessage('send_content','<%=Lang_Sms(50)%>');return false;}
		}
		function utype(n)
		{
			if (n==0)
			{
			document.getElementById("box_send_no").style.display="";
			document.getElementById("box_send_mobile").style.display="none";
			document.getElementById("box_send_user").style.display="none";
			}else{
			document.getElementById("box_send_no").style.display="none";
			}
			if (n==1)
			{
			document.getElementById("box_send_no").style.display="none";
			document.getElementById("box_send_mobile").style.display="";
			}else{
			document.getElementById("box_send_mobile").style.display="none";
			}
			if (n==2)
			{
			document.getElementById("box_send_no").style.display="none";
			document.getElementById("box_send_user").style.display="";
			}else{
			document.getElementById("box_send_user").style.display="none";
			}
		}
		maxLen = 70;
		function checkMaxInput(form) {
		if (document.getElementById("send_content").value.length > maxLen)
		document.getElementById("send_content").value = document.getElementById("send_content").value.substring(0, maxLen);
		else document.getElementById("remLen").value = maxLen - document.getElementById("send_content").value.length;
		}
		</script>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable">
		<form name="form2" method="post" action="?action=send_ok" onSubmit="return CheckForm(this);">
		<tr>
		  <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
		  <td class="classhead" align="right"> <%=QuickMenu("?action=config|"& Lang_Menu(115) &"","|")%></td>
		 </tr>
		<tr>
		   <td class="classtop" height="30" colspan="2"><%=Lang_Menu(111)%></td>
		</tr>
	    <tr class="classrow">
			<td width="15%" height="30" class="classrow"><%=Lang_Sms(51)%></td>
			<td class="classrow"><input type="radio" name="send_way" value="0" onclick="utype(this.value)" checked><%=Lang_Sms(52)%>
			<input type="radio" name="send_way" value="1" onclick="utype(this.value)"><%=Lang_Sms(53)%>
			<input type="radio" name="send_way" value="2" onclick="utype(this.value)"><%=Lang_Sms(54)%>
			</td>
	    </tr>
		<tr class="classrow" id="box_send_no">
		<td height="30" class="classrow"><%=Lang_Sms(23)%><br/><em><%=Lang_Sms(55)%></em></td>
		<td class="classrow"><textarea name="send_no" id="send_no" cols="60" rows="5" class="text"><%=Trim(request("send_no"))%></textarea> <span id="mes_send_no"></span></td>
		</tr>
		<tr class="classrow" style="display:none">
		<td class="classrow" colspan="2"></td>
		</tr>
		<tr class="classrow" id="box_send_mobile" style="display:none;">
		<td height="30" width="15%" class="classrow"><%=Lang_Sms(56)%></td>
		<td height="30" class="classrow">
		<%
		set rs = conn.execute("select g_id,g_name from [lebi_FriendGroup] order by g_order desc")
		do while not rs.eof
		%>
		<input name="send_group" type="checkbox" value="<%=rs(0)%>" checked><%=rs(1)%>
		<%
		rs.movenext
		loop
		rs.close : set rs = nothing
		%>
		</td>
		</tr>
		<tr class="classrow" style="display:none">
		<td class="classrow" colspan="2"></td>
		</tr>
		<tr class="classrow" id="box_send_user" style="display:none;">
		<td height="30" width="15%" class="classrow"><%=Lang_Sms(57)%></td>
		<td height="30" class="classrow">
		<%
		set rs = conn.execute("select grade_name,grade_dj from [lebi_user_grade] where grade_dj<>0 order by grade_dj")
		do while not rs.eof
		%>
		<input name="usergrade" type="checkbox" value="<%=rs(1)%>" checked><%=rs(0)%>
		<%
		rs.movenext
		loop
		rs.close : set rs = nothing
		%>&nbsp;┆&nbsp;<%=Lang_Sms(58)%><select name="userlogintype" style="width:48px"><option value=">="><%=Lang_Sms(67)%></option><option value="<="><%=Lang_Sms(66)%></option></select>&nbsp;<input name="userlogins" type="text" value="0" class="form" style="width:30px;">&nbsp;┆&nbsp;<%=Lang_Sms(59)%><select name="userlogindaytype" style="width:38px"><option value="<="><%=Lang_Sms(66)%></option><option value=">="><%=Lang_Sms(67)%></option></select>&nbsp;<input name="userloginday" type="text" value="100" class="form" style="width:30px;">
		<br><%=Lang_Sms(60)%><select name="userjifentype" style="width:48px"><option value=">="><%=Lang_Sms(67)%></option><option value="<="><%=Lang_Sms(66)%></option></select>&nbsp;<input name="userjifen" type="text" value="0" class="form" style="width:30px;">&nbsp;┆&nbsp;<%=Lang_Sms(61)%><select name="usersumpaytype" style="width:48px"><option value=">="><%=Lang_Sms(67)%></option><option value="<="><%=Lang_Sms(66)%></option></select>&nbsp;<input name="usersumpay" type="text" value="0" class="form" style="width:36px;">&nbsp;┆&nbsp;<%=Lang_Sms(62)%><select name="usersex" style="width:48px"><option value="0"><%=Lang_Sms(68)%></option><option value="<%=Lang_Sms(69)%>"><%=Lang_Sms(69)%></option><option value="<%=Lang_Sms(70)%>"><%=Lang_Sms(70)%></option></select>&nbsp;┆&nbsp;<%=Lang_Sms(63)%><select name="Showlang">
		<option value="" selected>┌ <%=Lang_Sms(68)%></option>
		<%For LangT = 1 To TotalLang%>
		<option value="<%= LanguageName(LangT) %>">├ <%= LanguageName(LangT) %></option>
		<%Next%>
		</select>
		</td>
		</tr>
		<tr class="classrow">
		<td height="30" class="classrow"><%=Lang_Sms(64)%><br/><em><%=Lang_Sms(65)%><INPUT readonly type="text" name="remLen" style="width:20px;border:none;" value="70"></em></td>
		<td class="classrow">
		<textarea wrap="physical" name="send_content" id="send_content" cols="60" rows="5" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)" class="text"></textarea> <span id="mes_send_content"></span>
		</td>
		</tr>
		<tr class="classrow">
		<td width="20%" class="classrow" height="30"><%=Lang_Sms(21)%></td>
		<td width="80%" class="classrow" height="30">
		<select name="send_type">
			<option value="3" <%=judge2(sms_sendtype,"3")%>> <%=Lang_Sms(46)%></option>
			<option value="2" <%=judge2(sms_sendtype,"2")%>> <%=Lang_Sms(47)%></option>
		</select>
		</td>
		</tr>
		<tr>
		<td colspan="2" height="30" class="classfooter" align="left">
		<input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle">
		</td>
		</tr>
		</form>
		</table>
		<script>tdshow("classtable");</script>
<%
End Sub

Sub main
		admin_flag=",13.2,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		keyword = safereplace(request("keyword"))
		datefrom = safereplace(request("datefrom"))
		dateto = safereplace(request("dateto"))
		page = checknum(request("page"),1)
		pagenum = CheckNum(request("pagenum"),15)
		Dim ors
		Set ors=new Cls_vbsPage
		Set ors.Conn=conn
		With ors
		.PageSize=pagenum
		.PageName="Page"
		.DbType="AC"
		.RecType=-1
		.Pkey="l_id"
		.Field="l_id,l_mobile,l_content,l_time"
		.Table="[Lebi_SmsLog]"
		sql = "1=1"
		If keyword <> "" Then sql = sql &" and (l_mobile like '%"&keyword&"%' or l_content like '%"&keyword&"%')"
		If IsSqlDataBase = 1 And datefrom<>"" And s_dateto<>"" Then sql=sql + " and DateDiff(d,l_time,'"& datefrom &"')<=0 and DateDiff(d,l_time,'"& dateto &"')>=0"
		If IsSqlDataBase = 0 And datefrom<>"" And s_dateto<>"" Then sql=sql + " and DateDiff('d',l_time,'"& datefrom &"')<=0 and DateDiff('d',l_time,'"& dateto &"')>=0"
		.Condition=sql
		.OrderBy="l_id desc"
		End With
		DataCount=ors.RecCount()
		DataList=ors.ResultSet()
%>
<script language="javascript" type="text/javascript" src="inc/js/MyCalendar.js"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable-top">
  <tr>
    <td height="30" class="classhead">
		<form method="get" action="?">
		<table border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td><input type="text" name="dateFrom" value="" size="12" class="form_calendar" onclick="setday(this)" /> -
		<input type="text" name="dateTo" value="" size="12" class="form_calendar" onclick="setday(this)" />
		</td>
		<td style="padding-left:5px;"><input name="keyword" type="text" class="form_query" size="15"><input name="Submit" type="submit" value="" title="<%=Lang_sys(25)%>" align="absmiddle" class="btn_query"><input type="hidden" name="pagenum" value="<%= pagenum %>">
		</td>
		</tr>
		</table>
		</form>
    </td>
	<td height="30" align="right" class="classhead"><%=QuickMenu("?action=send|发送短信","?action=mobile|号码管理")%></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="list" class="classtable2">
<form name="edit" method="post" action="?action=del">
<input type="hidden" name="page" value="<%= page %>">
<input type="hidden" name="datefrom" value="<%= datefrom %>">
<input type="hidden" name="dateto" value="<%= dateto %>">
<input type="hidden" name="keyword" value="<%= keyword %>">
<input type="hidden" name="pagenum" value="<%= pagenum %>">
<tr>
  <td colspan="2" height="30" class="classhead">
     <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_delete.gif" value=" <%=Lang_sys(15)%> " title=" <%=Lang_sys(15)%> " align="absmiddle">
  </td>
  <td height="30" class="classhead" align="right" colspan="2"><%=ors.ShowPageHead(page)%></td>
 </tr>
  <tr>
    <td width="5%" height="30" class="classtop" title="<%=Lang_sys(4)%>" style="cursor:pointer;" onclick="location.href='javascript:selectall();';return false;"><%=Lang_sys(50)%></td>
    <td width="12%" class="classtop"><%=Lang_Sms(71)%></td>
    <td width="68%" class="classtop"><%=Lang_Sms(72)%></td>
    <td width="15%" class="classtop"><%=Lang_Sms(73)%></td>
  </tr>
  <%
If DataCount >0 Then
		For i = 0 To Ubound(DataList,2)

%>
  <tr>
    <td height="30" class="classrow"><input type="checkbox" name="id" value="<%=DataList(0,i)%>"></td>
    <td class="classrow"><%=DataList(1,i)%></td>
    <td class="classrow"><%=DataList(2,i)%></td>
    <td class="classrow"><%=DataList(3,i)%></td>
  </tr>
<%
				Next
		End If
%>
</form>
<tr>
	<td height="30" class="classfooter" colspan="2"><%=GetPageNum(15,pagenum)%></td>
	<td height="30" class="classfooter" align="right" colspan="2"><%=ors.ShowPageFoot(page)%></td>
</tr>
</table>
<script>tdshow("list");</script>
<%
end Sub

Sub mobile()
		admin_flag=",13.3,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		page = CheckNum(request("page"),1)
		pagenum = CheckNum(request("pagenum"),15)
		keyword = Safereplace(request("keyword"))
		groupid = CheckNum(request("groupid"),0)
		Dim ors
		Set ors=new Cls_vbsPage
		Set ors.Conn=conn
		With ors
		.PageSize=pagenum
		.PageName="Page"
		If IsSqlDataBase = 0 Then
				.DbType="AC"
		Else
				.DbType="MSSQL"
		End If
		.RecType=-1
		.Pkey="f_id"
		.Field="f_id,f_user,f_mobile,f_company,f_group"
		.Table="[Lebi_Friend]"
		sql = "1=1"
		If groupid <> 0 Then sql = sql &" and f_group = "& groupid &""
		If keyword <> "" Then sql = sql &" and (f_user like '%"& keyword &"%' or f_mobile like '%"& keyword &"%' or f_company like '%"& keyword &"%')"
		.Condition=sql
		.OrderBy="f_id desc"
		End With
		DataCount=ors.RecCount()
		DataList=ors.ResultSet()
%>
<script language="JavaScript" type="text/JavaScript">
function CheckForm(theform)
{
	if (CheckEmpty('f_user')){ShowMessage('f_user','<%=Lang_Sms(74)%>');return false;}
	if (CheckEmpty('f_mobile')){ShowMessage('f_mobile','<%=Lang_Sms(10)%>');return false;}
	if (CheckEmpty('f_group')){ShowMessage('f_group','<%=Lang_Sms(75)%>');return false;}
}
function todel()
{

   var i = 0;
   var chkArr = document.getElementsByTagName("input");
   var page = document.getElementById("page").value;
   var groupid = document.getElementById("groupid").value;
   var keyword = document.getElementById("keyword").value;
   var pagenum = document.getElementById("pagenum").value;
   var param = "";
   for (i=0;i<chkArr.length;i++)
   if (chkArr[i].checked)
   param+=chkArr[i].value +",";
   if (param.length == 0)
   {
       alert("<%=Lang_sys(41)%>");
   }else{
       if(window.confirm("<%=Lang_sys(64)%>")){
           location="?action=mobile_del&id="+param+"&keyword="+escape(keyword)+"&groupid="+groupid+"&pagenum="+pagenum+"&page="+page;
       }else return;
   }
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable-top">
<tbody>
<tr>
<td height="30" align="left" class="classhead">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<form method="get" action="?">
<td>
<select name="groupid" id="groupid">
<option value="" selected>┌ <%=Lang_Sms(76)%></option>
<%
Set groupdata = conn.execute("Select g_id,g_name from [Lebi_FriendGroup] order by g_order desc")
If groupdata.eof Then
		response.write("<option value="""">├ "& Lang_Sms(77) &"</option>")
Else
		Do While Not groupdata.eof
		response.write("<option value="""& groupdata(0) &""" "& judge2(groupid,groupdata(0)) &">├ "& groupdata(1) &"</option>")
		groupdata.movenext
		Loop
End If
groupdata.close : Set groupdata = Nothing
%>
</select>
</td>
<td style="padding-left:5px;"><input name="keyword" type="text" class="form_query" size="15"><input name="Submit" type="submit" value="" title="<%=Lang_sys(25)%>" align="absmiddle" class="btn_query"><input type="hidden" name="action" value="mobile"><input type="hidden" name="pagenum" value="<%= pagenum %>">
</td>
</form>
</tr>
</table>
</td>
<td height="30" align="right" class="classhead">
<%=QuickMenu("?|"& Lang_Menu(112) &"","?action=group|"& Lang_Menu(114) &"")%>
</td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable2">
<tbody>
<tr>
	<form name="add" method="post" action="?action=mobile_add" onSubmit="return CheckForm(this);">
	<td height="30" align="left" colspan="5" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"> <span id="mes_f_user"></span><span id="mes_f_mobile"></span><span id="mes_f_group"></span></td>
 </tr>
<tr>
<td class="classtop" width="5%" height="30">&nbsp;</td>
<td class="classtop" width="20%"><%=Lang_Sms(78)%></td>
<td class="classtop" width="20%"><%=Lang_Sms(71)%></td>
<td class="classtop" width="40%"><%=Lang_Sms(79)%></td>
<td class="classtop" width="15%"><%=Lang_Sms(76)%></td>
</tr>
<tr>
<td width="5%" height="30" class="classrow">&nbsp;</td>
<td class="classrow">
<input name="f_user" type="text" id="f_user" size="20" class="form">
</td>
<td class="classrow">
<input name="f_mobile" type="text" id="f_mobile" size="20" class="form">
</td>
<td class="classrow">
<input name="f_company" type="text" id="f_company" size="40" class="form">
</td>
<td class="classrow">
<select name="f_group" id="f_group">
<%
Set groupdata = conn.execute("Select g_id,g_name from [Lebi_FriendGroup] order by g_order desc")
If groupdata.eof Then
		response.write("<option value="""">├ "& Lang_Sms(77) &"</option>")
Else
		Do While Not groupdata.eof
		response.write("<option value="""& groupdata(0) &""">├ "& groupdata(1) &"</option>")
		groupdata.movenext
		Loop
End If
groupdata.close : Set groupdata = Nothing
%>
</select>
</td>
</form>
</tr>
</tbody>
</table>
</div>
</div>
<div class="mainbody-block">
<div class="mainbody-block2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable">
<form name="edit" method="post" action="?action=mobile_edit">
<input type="hidden" name="page" value="<%= page %>">
<input type="hidden" name="groupid" value="<%= groupid %>">
<input type="hidden" name="keyword" value="<%= keyword %>">
<input type="hidden" name="pagenum" value="<%= pagenum %>">
<tr>
  <td colspan="2" height="30" class="classhead">
     <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">
     <input type="image" title=" <%=Lang_sys(15)%> " onclick="location.href='javascript:todel();';return false;" src="lang/<%=LangFilePath%>/images/bt_delete.gif" align="absmiddle">
  </td>
  <td height="30" class="classhead" align="right" colspan="5"><%=ors.ShowPageHead(page)%></td>
 </tr>
<tr>
<td class="classtop" width="5%" height="30" title="<%=Lang_sys(4)%>" style="cursor:pointer;" onclick="location.href='javascript:selectall();';return false;"><%=Lang_sys(50)%></td>
<td class="classtop" width="20%"><%=Lang_Sms(78)%></td>
<td class="classtop" width="20%"><%=Lang_Sms(71)%></td>
<td class="classtop" width="40%"><%=Lang_Sms(79)%></td>
<td class="classtop" width="15%"><%=Lang_Sms(76)%></td>
</tr>
<%
If DataCount >0 Then
		For i = 0 To Ubound(DataList,2)
%>
<tr class="classrow">
<td width="5%" height="30" class="classrow"><input name="id" type="checkbox" value="<%=DataList(0,i)%>"><input name="f_id" type="hidden" value="<%=DataList(0,i)%>"></td>
<td height="30" class="classrow">
<input name="f_user" type="text" id="f_user" value="<%=DataList(1,i)%>" size="20" class="form">
</td>
<td height="30" class="classrow">
<input name="f_mobile" type="text" id="f_mobile" value="<%=DataList(2,i)%>" size="20" class="form">
</td>
<td height="30" class="classrow">
<input name="f_company" type="text" id="f_company" value="<%=DataList(3,i)%>" size="40" class="form">
</td>
<td class="classrow">
<select name="f_group" id="f_group">
<%
Set groupdata = conn.execute("Select g_id,g_name from [Lebi_FriendGroup] order by g_order desc")
If groupdata.eof Then
		response.write("<option value="""">├ "& Lang_Sms(77) &"</option>")
Else
		Do While Not groupdata.eof
		response.write("<option value="""& groupdata(0) &""" "& judge2(DataList(4,i),groupdata(0)) &">├ "& groupdata(1) &"</option>")
		groupdata.movenext
		Loop
End If
groupdata.close : Set groupdata = Nothing
%>
</select>
</td>
</tr>
<%
        Next
End If
%>
</form>
<tr>
	<td height="30" class="classfooter" colspan="2"><%=GetPageNum(15,pagenum)%></td>
	<td height="30" class="classfooter" align="right" colspan="5"><%=ors.ShowPageFoot(page)%></td>
</tr>
</tbody>
</table>
<script>tdshow("classtable");</script>
<%
end Sub

Sub group
		admin_flag=",13.4,"
		if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
				adminflag()
		End If
		page = CheckNum(request("page"),1)
		pagenum = CheckNum(request("pagenum"),15)
		Dim ors
		Set ors=new Cls_vbsPage
		Set ors.Conn=conn
		With ors
		.PageSize=pagenum
		.PageName="Page"
		If IsSqlDataBase = 0 Then
				.DbType="AC"
		Else
				.DbType="MSSQL"
		End If
		.RecType=-1
		.Pkey="g_id"
		.Field="g_id,g_name,g_order"
		.Table="[Lebi_FriendGroup]"
		sql = "1=1"
		.Condition=sql
		.OrderBy="g_order desc"
		End With
		DataCount=ors.RecCount()
		DataList=ors.ResultSet()
%>
<script language="JavaScript" type="text/JavaScript">
function CheckForm(theform)
{
	if (CheckEmpty('g_name')){ShowMessage('g_name','<%=Lang_Sms(80)%>');return false;}
}
function todel()
{

   var i = 0;
   var chkArr = document.getElementsByTagName("input");
   var page = document.getElementById("page").value;
   var pagenum = document.getElementById("pagenum").value;
   var param = "";
   for (i=0;i<chkArr.length;i++)
   if (chkArr[i].checked)
   param+=chkArr[i].value +",";
   if (param.length == 0)
   {
       alert("<%=Lang_sys(41)%>");
   }else{
       if(window.confirm("<%=Lang_sys(64)%>")){
           location="?action=group_del&id="+param+"&pagenum="+pagenum+"&page="+page;
       }else return;
   }
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable">
<tbody>
<tr>
	<form name="add" method="post" action="?action=group_add" onSubmit="return CheckForm(this);">
	<td height="30" align="left" colspan="2" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
	<td height="30" align="right" class="classhead">
	<%=QuickMenu("?action=mobile|"& Lang_Menu(113) &"","?action=config|"& Lang_Menu(115) &"")%>
	</td>
 </tr>
<tr>
<td class="classtop" width="5%" height="30">&nbsp;</td>
<td class="classtop" width="75%"><%=Lang_Sms(81)%></td>
<td class="classtop" width="20%"><%=Lang_Sms(82)%></td>
</tr>
<tr>
<td width="5%" height="30" class="classrow">&nbsp;</td>
<td class="classrow">
<input name="g_name" type="text" id="g_name" size="20" class="form"> <span id="mes_g_name"></span>
</td>
<td class="classrow">
<input name="g_order" type="text" id="g_order" size="5" onkeyup="value=value.replace(/[^\d\.]/g,'');" class="form">
</td>
</form>
</tr>
</tbody>
</table>
</div>
</div>
<div class="mainbody-block">
<div class="mainbody-block2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable">
<form name="edit" method="post" action="?action=group_edit">
<input type="hidden" name="page" value="<%= page %>">
<input type="hidden" name="pagenum" value="<%= pagenum %>">
<tr>
  <td colspan="2" height="30" class="classhead">
     <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">
     <input type="image" title=" <%=Lang_sys(15)%> " onclick="location.href='javascript:todel();';return false;" src="lang/<%=LangFilePath%>/images/bt_delete.gif" align="absmiddle">
  </td>
  <td height="30" class="classhead" align="right" colspan="5"><%=ors.ShowPageHead(page)%></td>
 </tr>
<tr>
<td class="classtop" width="5%" height="30" title="<%=Lang_sys(4)%>" style="cursor:pointer;" onclick="location.href='javascript:selectall();';return false;"><%=Lang_sys(50)%></td>
<td class="classtop" width="35%"><%=Lang_Sms(81)%></td>
<td class="classtop" width="40%">&nbsp;</td>
<td class="classtop" width="20%"><%=Lang_Sms(82)%></td>
</tr>
<%
If DataCount >0 Then
		For i = 0 To Ubound(DataList,2)
%>
<tr class="classrow">
<td width="5%" height="30" class="classrow"><input name="id" type="checkbox" value="<%=DataList(0,i)%>"><input name="g_id" type="hidden" value="<%=DataList(0,i)%>"></td>
<td height="30" colspan="2" class="classrow">
<input name="g_name" type="text" id="g_name" value="<%=DataList(1,i)%>" size="20" class="form">
</td>
<td class="classrow">
<input name="g_order" type="text" id="g_order" value=<%=DataList(2,i)%> size="5" onkeyup="value=value.replace(/[^\d\.]/g,'');" class="form">
</td>
</tr>
<%
        Next
End If
%>
</form>
<tr>
	<td height="30" class="classfooter" colspan="2"><%=GetPageNum(15,pagenum)%></td>
	<td height="30" class="classfooter" align="right" colspan="2"><%=ors.ShowPageFoot(page)%></td>
</tr>
</tbody>
</table>
<script>tdshow("classtable");</script>
<%end Sub%>