<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="inc/Page_cls.asp"-->
<!--#include file="../include/lebi_md5.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_flag.asp
'* 最后更新 2013-05-29 by 56770.kingdge
'*****************************************
Dim admin_flag
admin_flag=",0.1,"
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_flag.inc"
CurrentId = 5
CurrentUrl = "admin_flag.asp"
LB_Head()
LB_Menu()
action = request("action")
%>
<div class="tabmenu mainwidth">
      <ul>
        <li <%If action <> "add" And action <> "add_ok" And action <> "log" Then Response.Write("class=""current""") End If%>><a href="Admin_flag.asp"><span><%=Lang_Menu(131)%></span></a></li>
		<li <%If action = "log" Then Response.Write("class=""current""") End If%>><a href="?action=log"><span><%=Lang_Menu(132)%></span></a></li>
		<li <%If action = "add" Or action = "add_ok" Then Response.Write("class=""current""") End If%>><a href="?action=add"><span><%=Lang_Menu(130)%></span></a></li>
      </ul>
</div>
<%
Response.Write("<div class=""tab-mainbody"">")
Response.Write("<div class=""tab-mainbody2"">")
If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
	    adminflag()
Else
		If OutSubmit = 1 Then CheckOutSubmit()
		Select Case action
			Case "edit_ok" : edit_oke()
			Case "del" : Del()
			Case "pasword" : pasword()
			Case "newpass" : newpass()
			Case "add" : addadmin()
			Case "edit" : userinfo()
			Case "add_ok" : add_ok()
			Case "log" : Log()
			Case Else
				userlist()
		End Select
End If
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

sub userlist()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable">
<tr>
	<td height="30" align="left" colspan="5" class="classhead">&nbsp;
	</td>
	<td align="right" class="classhead">
	<%=QuickMenu("Admin_flag.asp?action=add|"& Lang_Menu(130) &"","Admin_flag.asp?action=log|"& Lang_Menu(132) &"")%>
	</td>
</tr>
<tr>
  <td width="15%" height="30" class="classtop"><%=Lang_Flag(1)%></td><td width="10%" height="30" class="classtop"><%=Lang_Flag(2)%></td><td width="20%"  class="classtop"><%=Lang_Flag(3)%></td><td width="15%" class="classtop"><%=Lang_Flag(4)%></td><td width="10%" class="classtop"><%=Lang_Flag(5)%></td><td width="30%" class="classtop"><%=Lang_Flag(6)%></td>
</tr>
<%
	set	rs=Conn.Execute("select * from [Lebi_adminuser] order by LastLogin desc")
	do while not rs.eof
%>
<tr class="classrow">
	<td height="30" class="classrow"><a href="?action=pasword&id=<%=rs("id")%>"><%=rs("admin_name")%></a></td>
	<td class="classrow"><%If rs("a_state") = 0 Then response.write(Lang_Flag(7)) Else response.write("<font color=red>"& Lang_Flag(8) &"</font>") End If%></td>
	<td class="classrow"><%=rs("LastLogin")%></td>
	<td class="classrow"><%=rs("LastLoginIP")%></td>
	<td class="classrow"><%=rs("logins")%></td>
	<td class="classrow"><a href="?id=<%=rs("id")%>&action=edit"><%=Lang_Flag(9)%></a> | <a	href="admin_log.asp?l_name=<%=server.urlencode(rs("admin_name"))%>"><%=Lang_Flag(10)%></a> | <a	href="?action=log&l_name=<%=server.urlencode(rs("admin_name"))%>"><%=Lang_Flag(11)%></a> | <a href="?action=pasword&id=<%=rs("id")%>"><%=Lang_Flag(12)%></a> | <a href="?action=del&id=<%=rs("id")%>"  onClick="return ConfirmDel();"><%=Lang_sys(15)%></a></td>
</tr>
<%
	rs.movenext
	loop
	rs.close
	set rs=nothing
%>
<tr>
<td colspan="6" class="classfaq">
  <div class="faq_main">
  <p class="faq_title"><%=Lang_sys(49)%></p>
  <%=Lang_Flag(13)%>
</div>
</td>
</tr>
</table>
<script>tdshow("classtable");</script>
<%
	end sub

Sub	Del()
        If OnlyRead = 1 Then OnlyReadMessage()
        id = CheckNum(request("id"),0)
	    Set rs = server.CreateObject("adodb.recordset")
		rs.open "select admin_name FROM [Lebi_adminuser] WHERE Id = " & id &"",conn,1,3
		ManageLog Lang_Flag(14) &" ["&rs(0)&"]"
		rs.delete
		rs.close : Set rs = Nothing
		Call Up_mes(Lang_sys(43),"·"& Lang_sys(42),0,"?",0,0,2,1)
End	Sub

Sub	pasword()
	Dim AcceptIP,i,AddIP
	set	Rs=Conn.Execute("select * from [Lebi_adminuser] where id="&CheckNum(request("id"),0))
	admin_pass=rs("admin_pass")
	admin_name=rs("admin_name")
	AcceptIP = trim(Rs("AcceptIP"))
	AddIP = request.servervariables("remote_addr")
	'AddIP = Left(AddIP, InStrRev(AddIP, ".")-1)
	'AddIP = Left(AddIP, InStrRev(AddIP, ".")-1)
	'AddIP = AddIP &".*.*"
  %>
         <table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable">
          <form name="form2" method="post" action="?">
           <tr>
              <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"><input type="hidden" name="action" value="newpass"></td>
			<td align="right" class="classhead">
			<%=QuickMenu("","")%>
			</td>
           </tr>
           <tr>
              <td class="classtop" height="30" colspan="2"><%=Lang_Flag(15)%></td>
           </tr>
		   <tr class="classrow">
			<td width="15%" height="30" class="classrow"><%=Lang_Flag(16)%></td>
			<td width="85%" class="classrow"><%=rs("admin_name")%>
			  <input type=hidden name="admin_name" value="<%=rs("admin_name")%>">
			</td>
		  </tr>
		  <tr class="classrow">
			<td height="30" class="classrow"><%=Lang_Flag(17)%></td>
			<td class="classrow">
			  <input type="password" name="admin_pass" class="form"> <img src="images/help.gif" align="absmiddle" onmouseover="showhintinfo(this,0,0,'','<%=Lang_Flag(20)%>','50','up');" onmouseout="hidehintinfo();" />
			</td>
		  </tr>
		  <tr class="classrow">
			<td height="30" class="classrow"><%=Lang_Flag(18)%></td>
			<td class="classrow">
			  <%=Lang_Flag(8)%><input type="checkbox" name="a_state" value="1" <%If rs("a_state") = 1 Then response.write("checked") End If%>>
			</td>
		  </tr>
		  <tr class="classrow">
			<td class="classrow" valign="top"><%=Lang_Flag(19)%>
			</td>
			<td class="classrow">
			<textarea name="AddAcceptIP" cols="40" rows="3" class="text"><%=AcceptIP%>
			<%
			'If AcceptIP<>"" or not IsNull(AcceptIP) Then
			'	AcceptIP=Split(Trim(AcceptIP),"|")
			'	For i=0 To Ubound(AcceptIP)
			'		Response.Write AcceptIP(i)
			'		If i<Ubound(AcceptIP) Then Response.Write vbCrLf
			'	Next
			'End If

			%></textarea><br><input type=button value="<%=Lang_Flag(21)%>" onclick="AddAcceptIP.value+='<%=AddIP%>|'" class="button"> <%=request.servervariables("remote_addr")%>
           </td>
		  </tr>
		  <tr>
			<td height="30" colspan="2" align="left" class="classfooter">
			  <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle">
			  <input type="hidden" name="id" value="<%=request("id")%>">
			</td>
		  </tr>
          <tr>
            <td colspan="2" class="classfaq">
               <div class="faq_main">
               <p class="faq_title"><%=Lang_Flag(22)%></p>
               <%=Lang_Flag(23)%>
			   </div>
            </td>
          </tr>
		</form>
		</table>
		<script>tdshow("classtable");</script>
<%		 Rs.close
		 Set Rs=nothing
End	Sub

Sub	newpass()
        If OnlyRead = 1 Then OnlyReadMessage()
        admin_pass=md5(safereplace(Trim(request("admin_pass"))))
	    admin_name=safereplace(trim(request("admin_name")))
	    a_state=CheckNum(request("a_state"),0)
	    AcceptIP = Replace(safereplace(Trim(Request("AddAcceptIP")))," ","")
	    'Tempstr = Trim(Request("AddAcceptIP"))
	    'If Tempstr<>"" Then
	    '	Tempstr = Split(Tempstr,vbCrLf)
	    '	For i = 0 To ubound(Tempstr)
	    '		If Tempstr(i)<>"" and Tempstr(i)<>" " and Isnumeric(Replace(Replace(Tempstr(i),".",""),"*","")) and Instr(Tempstr(i),",")=0 Then
	    '			If i=0 or AcceptIP="" Then
	    '				AcceptIP = Tempstr(i)
	    '			Else
	    '				AcceptIP = AcceptIP & "|" & Tempstr(i)
	    '			End If
	    '		End If
	    '	Next
	    'End If
	    If Len(AcceptIP)>=255 Then
			    Call Up_mes(Lang_sys(48),"·"& Lang_Flag(24),0,"javascript:history.back()",0,0,2,1)
	    End If
	    set	rs=server.createobject("adodb.recordset")
	    sql="select * from [Lebi_adminuser] where admin_name='"& safereplace(trim(request("admin_name"))) &"'"
	    rs.open	sql,conn,1,3
	    if not rs.eof and not rs.bof then
	    	    if request("admin_pass")<>"" then
	    	    	    Rs("admin_pass") = admin_pass
	    	    end if
	    	    Rs("AcceptIP") = AcceptIP
	    	    Rs("a_state") = a_state
	    	    rs.update
	    End	if
	    rs.close : Set rs = Nothing
		ManageLog Lang_Flag(25) &" ["&admin_name&"]"
		Call Up_mes(Lang_sys(48),"·"& Lang_sys(47),0,"?",0,0,2,1)
end	sub

sub	addadmin()
	    AddIP = request.servervariables("remote_addr")
%>
         <table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable">
          <form name="form2" method="post" action="?">
           <tr>
              <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"><input type="hidden" name="action" value="add_ok"></td>
			<td align="right" class="classhead">
			<%=QuickMenu("?action=log|"& Lang_Menu(132) &"","Admin_deliver.asp|"& Lang_Menu(136) &"")%>
			</td>
           </tr>
           <tr>
              <td class="classtop" height="30" colspan="2"><%=Lang_Flag(26)%></td>
           </tr>
           <tr class="classrow">
	          <td width="15%" height="30" class="classrow"><%=Lang_Flag(16)%></td>
	          <td class="classrow">
			  <input type=text name="admin_name" size=30 class="form"></td>
           </tr>
           <tr class="classrow">
	          <td height="30" class="classrow"><%=Lang_Flag(17)%></td>
	          <td class="classrow">
			  <input type="password" name="admin_pass" size=30 class="form">
	          </td>
           </tr>
		  <tr class="classrow">
			<td height="30" class="classrow"><%=Lang_Flag(18)%></td>
			<td class="classrow">
			  <%=Lang_Flag(8)%><input type="checkbox" name="a_state" value="1">
			</td>
		  </tr>
		  <tr class="classrow">
			<td class="classrow" valign="top"><%=Lang_Flag(19)%>
			</td>
			<td class="classrow">
			<textarea name="AddAcceptIP" cols="40" rows="3" class="text"><%=AcceptIP%>
			<%
			'If AcceptIP<>"" or not IsNull(AcceptIP) Then
			'	AcceptIP=Split(Trim(AcceptIP),"|")
			'	For i=0 To Ubound(AcceptIP)
			'		Response.Write AcceptIP(i)
			'		If i<Ubound(AcceptIP) Then Response.Write vbCrLf
			'	Next
			'End If

			%></textarea><br><input type="button" value="<%=Lang_Flag(21)%>" onclick="AddAcceptIP.value+='<%=AddIP%>|'" class="button"> <%=request.servervariables("remote_addr")%>
           </td>
		  </tr>
           <tr>
	          <td height="30" colspan="2" align="left" class="classfooter">
	             <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle">
	          </td>
           </tr>
          <tr>
            <td colspan="5" class="classfaq">
               <div class="faq_main">
               <p class="faq_title"><%=Lang_Flag(22)%></p>
               <%=Lang_Flag(23)%>
			   </div>
            </td>
          </tr>
          </form>
         </table>
		 <script>tdshow("classtable");</script>
<%
end	sub

sub	add_ok()
        If OnlyRead = 1 Then OnlyReadMessage()
        admin_pass=md5(safereplace(Trim(request("admin_pass"))))
	    admin_name=safereplace(trim(request("admin_name")))
	    a_state=CheckNum(request("a_state"),0)
	    AcceptIP = Replace(safereplace(Trim(Request("AddAcceptIP")))," ","")
	    If Len(AcceptIP)>=255 Then
			    Call Up_mes(Lang_sys(45),"·"& Lang_Flag(24),0,"javascript:history.back()",0,0,2,1)
	    End If
	    set	rs=Conn.Execute("select admin_name from [Lebi_adminuser] where admin_name='"& admin_name &"'")
	    If Not (rs.eof And rs.bof) Then
                response.write"<SCRIPT language=JavaScript>alert('"& Lang_Flag(27) &"');javascript:history.go(-1)</SCRIPT>"
                response.End
	    Else
	            Conn.Execute("insert into [Lebi_adminuser] (admin_name,admin_pass,AcceptIP,a_state,pflag) values ('"& admin_name &"','"& admin_pass &"','"& AcceptIP &"',"& a_state &",'0')")
        End If
		Set rs=conn.execute("select id from [Lebi_adminuser] where admin_name='"& admin_name &"'")
		id=rs("id")
		rs.close:Set rs=Nothing
		ManageLog Lang_Flag(28) &" ["&admin_name&"]"
		m_u="Admin_flag.asp?id="&id&"&action=edit"
		Call Up_mes(Lang_sys(45),"·"& Lang_Flag(29),0,m_u,0,0,2,1)
end	sub

sub	userinfo()
dim	menu(13,13),JXCmenu(10,10),WebServicemenu(0,10),QS(0,10),Union(0,10),print(0,10),TaobaoSYN(0,5),trs,k  '已增加至60
menu(0,0)=Lang_Menu(129)
menu(0,1)=Lang_Menu(130) &" | "& Lang_Menu(131) &"@@0.1"

menu(1,0)=Lang_Menu(12)
menu(1,1)=Lang_Flag(30) &"@@1.1"
menu(1,2)=Lang_Flag(31) &"@@1.2"
menu(1,3)=Lang_Flag(32) &"@@1.3"
menu(1,4)=Lang_Menu(98) &"@@1.4"
menu(1,5)=Lang_Menu(87) &"@@1.5"
menu(1,6)=Lang_Menu(99) &"@@1.6"
menu(1,7)=Lang_Menu(55) &"@@1.7"
menu(1,8)=Lang_Menu(100) &"@@1.8"
menu(1,9)=Lang_Menu(101) &"@@1.9"
menu(1,10)=Lang_Flag(33) &"@@1.10"
menu(1,11)=Lang_Flag(34) &"@@1.11"

menu(2,0)=Lang_Menu(10)
menu(2,1)=Lang_Menu(52) &"@@2.1"
menu(2,2)=Lang_Flag(35) &"@@2.2"
menu(2,3)=Lang_Flag(36) &"@@2.3"
menu(2,4)=Lang_Menu(69) &"@@2.8"
menu(2,5)=Lang_Flag(37) &"@@2.4"
menu(2,6)=Lang_Flag(38) &"@@2.5"
menu(2,7)=Lang_Flag(39) &"@@2.6"
menu(2,8)=Lang_Menu(72) &"@@2.7"

menu(3,0)=Lang_Menu(74)
menu(3,1)=Lang_Menu(75) &"@@3.1"
menu(3,2)=Lang_Menu(77) &"@@3.2"
menu(3,3)=Lang_Menu(78) &"@@3.3"
menu(3,4)=Lang_Menu(79) &"@@3.4"
menu(3,5)=Lang_Menu(80) &"@@3.5"
menu(3,6)=Lang_Menu(81) &"@@3.6"
menu(3,7)=Lang_Menu(82) &"@@3.7"
menu(3,8)=Lang_Menu(83) &"@@3.8"
menu(3,9)=Lang_Menu(84) &"@@3.9"
menu(3,10)=Lang_Menu(76) &"@@3.10"
menu(3,11)=Lang_Menu(197) &"@@3.11"

menu(4,0)=Lang_Menu(14)
menu(4,1)=Lang_Flag(40) &"@@4.1"
menu(4,2)=Lang_Flag(41) &"@@4.2"
menu(4,3)=Lang_Menu(107) &"@@4.3"
menu(4,4)=Lang_Menu(105) &"@@4.4"
menu(4,5)=Lang_Menu(105) &"@@4.5"

menu(5,0)=Lang_Menu(125)
menu(5,1)=Lang_Menu(126) &"@@5.1"
menu(5,2)=Lang_Flag(42) &"@@5.2"
menu(5,3)=Lang_Flag(43) &"@@5.3"
menu(5,4)=Lang_Menu(123) &"@@5.4"
menu(5,5)=Lang_Menu(128) &"@@5.5"

menu(6,0)=Lang_Menu(120)
menu(6,1)=Lang_Menu(121) &"@@6.1"
menu(6,2)=Lang_Flag(44) &"@@6.2"
menu(6,3)=Lang_Flag(45) &"@@6.3"
menu(6,4)=Lang_Menu(123) &"@@6.4"
menu(6,5)=Lang_Menu(124) &"@@6.5"

menu(7,0)=Lang_Menu(116)
menu(7,1)=Lang_Flag(46) &"@@7.1"
menu(7,2)=Lang_Flag(47) &"@@7.2"
menu(7,3)=Lang_Flag(48) &"@@7.3"
menu(7,4)=Lang_Flag(49) &"@@7.4"
menu(7,5)=Lang_Flag(50) &"@@7.5"
menu(7,6)=Lang_Flag(51) &"@@7.6"
menu(7,7)=Lang_Menu(118) &"@@7.7"

menu(8,0)=Lang_Menu(133)
menu(8,1)=Lang_Menu(49) &"@@8.1"
menu(8,2)=Lang_Menu(134) &"@@8.2"
menu(8,3)=Lang_Menu(135) &"@@8.3"
menu(8,4)=Lang_Menu(146) &"@@8.4"
menu(8,5)=Lang_Menu(137) &"@@8.5"
menu(8,6)=Lang_Menu(136) &"@@8.6"
menu(8,7)=Lang_Menu(138) &"@@8.7"
menu(8,8)=Lang_Menu(139) &"@@8.8"
menu(8,9)=Lang_Menu(140) &"@@8.9"
menu(8,10)=Lang_Menu(141) &"@@8.10"
menu(8,11)=Lang_Menu(142) &"@@8.13"
menu(8,12)=Lang_Menu(143) &"@@8.11"
menu(8,13)=Lang_Menu(145) &"@@8.12"

menu(9,0)=Lang_Menu(20)
menu(9,1)=Lang_Menu(58) &"@@9.1"
menu(9,2)=Lang_Menu(158) &"@@9.2"
menu(9,3)=Lang_Menu(159) &"@@9.3"
menu(9,4)=Lang_Menu(160) &"@@9.4"
menu(9,5)=Lang_Menu(161) &"@@9.5"
menu(9,6)=Lang_Menu(193) &"@@9.6"
menu(9,7)=Lang_Menu(196) &"@@9.7"

menu(10,0)=Lang_Menu(148)
menu(10,1)=Lang_Menu(150) &"@@10.1"
menu(10,2)=Lang_Menu(59) &"@@10.2"
menu(10,3)=Lang_Menu(151) &"@@10.3"
menu(10,4)=Lang_Menu(152) &"@@10.4"
menu(10,5)=Lang_Menu(153) &"@@10.5"
'menu(10,6)=Lang_Menu(154) &"@@10.6"
menu(10,6)=Lang_Menu(155) &"@@10.7"
menu(10,7)=Lang_Menu(149) &"@@10.8"
menu(10,8)=Lang_Menu(187) &"@@10.9"
menu(10,9)=Lang_Menu(190) &"@@10.10"

menu(11,0)=Lang_Menu(167)
menu(11,1)=Lang_Menu(167) &"@@11.1"
menu(11,2)=Lang_Menu(123) &"@@11.2"

menu(12,0)=Lang_Menu(163)
menu(12,1)=Lang_Menu(22) &"@@12.1"
menu(12,2)=Lang_Menu(164) &"@@12.2"
menu(12,3)=Lang_Menu(165) &"@@12.3"
menu(12,4)=Lang_Menu(159) &"@@12.4"
menu(12,5)=Lang_Menu(166) &"@@12.5"
menu(12,6)=Lang_Menu(180) &"@@12.6"

menu(13,0)=Lang_Menu(110)
menu(13,1)=Lang_Menu(111) &"@@13.1"
menu(13,2)=Lang_Menu(112) &"@@13.2"
menu(13,3)=Lang_Menu(113) &"@@13.3"
menu(13,4)=Lang_Menu(114) &"@@13.4"
menu(13,5)=Lang_Menu(115) &"@@13.5"

JXCMenu(0,0)="员工管理"
JXCMenu(0,1)="部门管理@@x1.1"
JXCMenu(0,2)="员工添加@@x1.2"
JXCMenu(0,3)="员工查询@@x1.3"
JXCMenu(0,4)="员工编辑@@x1.4"
JXCMenu(0,5)="权限设置@@x1.5"

JXCMenu(1,0)="工作日志"
JXCMenu(1,1)="写日志@@x2.1"
JXCMenu(1,2)="删除日志@@x2.2"
JXCMenu(1,3)="管理员工日志@@x2.3"

JXCMenu(2,0)="在线交流"
JXCMenu(2,1)="发布主题@@x3.1"
JXCMenu(2,2)="编辑主题@@x3.2"
JXCMenu(2,3)="删除主题@@x3.3"

JXCMenu(3,0)="公告管理"
JXCMenu(3,1)="发布公告@@x4.1"
JXCMenu(3,2)="编辑公告@@x4.2"
JXCMenu(3,3)="删除公告@@x4.3"

JXCMenu(4,0)="入库管理"
JXCMenu(4,1)="产品入库@@x5.1"
JXCMenu(4,2)="入库编辑@@x5.2"
JXCMenu(4,3)="入库删除@@x5.3"
JXCMenu(4,4)="退回录入@@x5.4"
JXCMenu(4,5)="退回编辑@@x5.5"
JXCMenu(4,6)="退回删除@@x5.6"

JXCMenu(5,0)="货商管理"
JXCMenu(5,1)="区域管理@@x6.1"
JXCMenu(5,2)="供货商添加@@x6.2"
JXCMenu(5,3)="供货商查询@@x6.3"
JXCMenu(5,4)="供货商编辑@@x6.4"
JXCMenu(5,5)="供货商删除@@x6.5"

JXCMenu(6,0)="仓库管理"
JXCMenu(6,1)="仓库添加@@x7.1"
JXCMenu(6,2)="仓库查询@@x7.2"
JXCMenu(6,3)="仓库编辑@@x7.3"
JXCMenu(6,4)="仓库删除@@x7.4"
JXCMenu(6,5)="日志浏览@@x7.5"
JXCMenu(6,6)="日志删除@@x7.6"

JXCMenu(7,0)="出库管理"
JXCMenu(7,1)="产品销售@@x8.1"
JXCMenu(7,2)="销售编辑@@x8.2"
JXCMenu(7,3)="销售删除@@x8.3"
JXCMenu(7,4)="销售退货@@x8.4"
JXCMenu(7,5)="退货编辑@@x8.5"
JXCMenu(7,6)="退货删除@@x8.6"
JXCMenu(7,7)="产品报废@@x8.7"
JXCMenu(7,8)="报废编辑@@x8.8"
JXCMenu(7,9)="报废删除@@x8.9"

JXCMenu(8,0)="订单管理"
JXCMenu(8,1)="订单浏览@@x9.1"
JXCMenu(8,2)="订单编辑@@x9.2"

JXCMenu(9,0)="库存管理"
JXCMenu(9,1)="库存查询@@x10.1"
JXCMenu(9,2)="产品编辑@@x10.2"
JXCMenu(9,3)="库存调拨@@x10.3"
JXCMenu(9,4)="调拨查询@@x10.4"
JXCMenu(9,5)="调拨删除@@x10.5"
JXCMenu(9,6)="库存预警@@x10.6"
JXCMenu(9,7)="库存同步@@x10.7"

JXCMenu(10,0)="财务管理"
JXCMenu(10,1)="类型管理@@x11.1"
JXCMenu(10,2)="类别管理@@x11.2"
JXCMenu(10,3)="费用录入@@x11.3"
JXCMenu(10,4)="费用查询@@x11.4"
JXCMenu(10,5)="费用编辑@@x11.5"
JXCMenu(10,6)="费用删除@@x11.6"
JXCMenu(10,7)="统计报表@@x11.7"

WebServicemenu(0,0)="权限设置"
WebServicemenu(0,1)="统计概况@@w1"
'WebServicemenu(0,2)="通讯管理@@w2"
WebServicemenu(0,2)="权限管理@@w3"
WebServicemenu(0,3)="系统管理@@w4"

QS(0,0)="权限设置"
QS(0,1)="商品浏览@@q8"
QS(0,2)="商品删除@@q9"
QS(0,3)="商品采购@@q1"
QS(0,4)="商品发布@@q2"
QS(0,5)="订单管理@@q3"
QS(0,6)="财务管理@@q4"
QS(0,7)="客户管理@@q5"
QS(0,8)="帐号管理@@q6"
QS(0,9)="密码管理@@q7"

Union(0,0)="联盟系统"
Union(0,1)="业绩明细@@u1"
Union(0,2)="账户提现@@u2"
Union(0,3)="用户列表@@u3"
Union(0,4)="帮助中心@@u4"
Union(0,5)="系统配置@@u5"
Union(0,6)="推广代码@@u6"
Union(0,7)="管理首页@@u7"

print(0,0)="快递单打印系统"
print(0,1)="管理权限@@p1"

TaobaoSYN(0,0)="淘宝同步系统"
TaobaoSYN(0,1)="订单管理@@t1"
TaobaoSYN(0,2)="评价管理@@t2"
TaobaoSYN(0,3)="客户管理@@t3"
TaobaoSYN(0,4)="店铺管理@@t4"
TaobaoSYN(0,5)="模板管理@@t5"
dim	j,tmpmenu,menuname,menurl
set	rs=Conn.Execute("select * from	[Lebi_adminuser] where id="&checknum(request("id"),0))
%>
<script language="javascript">
<!--
function SelectIterm(form,sign)
{
for (var i=0;i<form.elements.length;i++){
if(form.elements[i].type=='checkbox'){
var e=form.elements[i]
if (sign==0) e.checked=true;
if(sign==1) e.checked=!e.checked;
if(sign==2) e.checked=false;}
}
}
-->
</script>
         <table width="100%" border="0" cellspacing="0" cellpadding="0" id="flag" class="classtable">
          <form name="form2" method="post" action="?">
           <tr>
              <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" border="0" title=" <%=Lang_sys(4)%> " onclick="location.href='javascript:SelectIterm(form2,0);';return false;" src="lang/<%=LangFilePath%>/images/bt_select.gif" align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="location.href='javascript:SelectIterm(form2,2);';return false;" align="absmiddle"><input type="hidden" name="action" value="edit_ok"></td>
			<td align="right" class="classhead">
			<%=QuickMenu("","")%>
			</td>
           </tr>
           <tr>
              <td class="classtop" colspan="2" height="30"><%=rs("admin_name")%> <%=Lang_Flag(52)%></td>
           </tr>
			<%
			Dim n
			n = 0
			for i=0 to ubound(menu,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&menu(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(menu,2)
							if isempty(menu(i,j)) then exit	for
							tmpmenu=split(menu(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
           <tr>
              <td height="30" colspan="2" class="classtop"><%=rs("admin_name")%> <%=Lang_Flag(53)%></td>
           </tr>
			<%
			for i=0 to ubound(JXCmenu,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&JXCmenu(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(JXCmenu,2)
							if isempty(JXCmenu(i,j)) then exit	for
							tmpmenu=split(JXCmenu(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
           <tr>
              <td class="classtop" colspan="2" height="30"><%=rs("admin_name")%> <%=Lang_Flag(54)%></td>
           </tr>
			<%
			for i=0 to ubound(WebServicemenu,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&WebServicemenu(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(WebServicemenu,2)
							if isempty(WebServicemenu(i,j)) then exit	for
							tmpmenu=split(WebServicemenu(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
           <tr>
              <td class="classtop" colspan="2" height="30"><%=rs("admin_name")%> <%=Lang_Flag(66)%></td>
           </tr>
			<%
			for i=0 to ubound(QS,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&QS(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(QS,2)
							if isempty(QS(i,j)) then exit	for
							tmpmenu=split(QS(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
           <tr>
              <td class="classtop" colspan="2" height="30"><%=rs("admin_name")%> <%=Lang_Flag(67)%></td>
           </tr>
			<%
			for i=0 to ubound(Union,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&Union(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(Union,2)
							if isempty(Union(i,j)) then exit	for
							tmpmenu=split(Union(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
           <tr>
              <td class="classtop" colspan="2" height="30"><%=rs("admin_name")%> 快递单打印系统</td>
           </tr>
			<%
			for i=0 to ubound(print,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&print(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(print,2)
							if isempty(print(i,j)) then exit	for
							tmpmenu=split(print(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
           <tr>
              <td class="classtop" colspan="2" height="30"><%=rs("admin_name")%> 淘宝同步系统</td>
           </tr>
			<%
			for i=0 to ubound(TaobaoSYN,1)
					Response.Write "<tr	class=""classrow""><td class=""classrow"" colspan=""2""><b>"&TaobaoSYN(i,0)&"</b><br>"
					on error resume	next
					for	j=1	to ubound(TaobaoSYN,2)
							if isempty(TaobaoSYN(i,j)) then exit	for
							tmpmenu=split(TaobaoSYN(i,j),"@@")
							menuname=tmpmenu(0)
							menurl=tmpmenu(1)
							Response.Write "<input type=""checkbox"" name=""flag"""
							if instr(","&Eshop_Lebi_flag&",",",0.1,")=0 then response.write "disabled=true"
							Response.Write "value="""& menurl &""" "& judge(rs("flag"),menurl) &">"& menuname &"&nbsp;&nbsp;"
					Next
					Response.Write "</td></tr>"
			Next
			%>
			<tr>
			<td height="30" colspan="2" align="left" class="classfooter">
			<input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" border="0" title=" <%=Lang_sys(4)%> " onclick="location.href='javascript:SelectIterm(form2,0);';return false;" src="lang/<%=LangFilePath%>/images/bt_select.gif" align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="location.href='javascript:SelectIterm(form2,2);';return false;" align="absmiddle">
			<input type="hidden" name="id" value="<%=request("id")%>">
			</td>
			</tr>
			</form>
			</table>
			<script>tdshow("flag");</script>
<%
rs.close
set	rs=nothing
end	sub

sub	edit_oke()
        If OnlyRead = 1 Then OnlyReadMessage()
		set	rs=server.createobject("adodb.recordset")
		sql="select flag,admin_name from [Lebi_adminuser] where id="&CheckNum(request("id"),0)
		rs.open	sql,conn,1,3
		if not rs.eof and not rs.bof then
		rs(0)=replace(safereplace(Request("flag"))," ","")&",99&"
		admin_name = rs(1)
		rs.update
		end	if
		rs.close:Set rs=Nothing
		ManageLog Lang_Flag(55) &" ["&admin_name&"]"
		Call Up_mes(Lang_sys(69),"·"& Lang_Flag(56),0,"?",0,0,2,1)
end	sub
%>

<%
Sub Log()
		If IsSqlDataBase =1 Then
				conn.execute("delete from [Lebi_admin_log] where datediff(d,l_logintime,"&sqlnowstring&")>30")
		Else
				conn.execute("delete from [Lebi_admin_log] where datediff('d',l_logintime,"&sqlnowstring&")>30")
		End If
		page = CheckNum(request("page"),1)
		datefrom=safeReplace(request("datefrom"))
		dateto=safeReplace(request("dateto"))
		l_name=safereplace(request("l_name"))
		keyword=safeReplace(request("keyword"))
		Dim ors
		Set ors=new Cls_vbsPage
		Set ors.Conn=conn
		With ors
		.PageSize=15
		.PageName="Page"
		If IsSqlDataBase = 0 Then
				.DbType="AC"
		Else
				.DbType="MSSQL"
		End If
		.RecType=-1
		.Pkey="l_id"
		.Field="l_name,l_logintime,l_loginip"
		.Table="[Lebi_admin_log]"
		sql = "1=1"
		If l_name <> "" Then sql = sql &" and l_name='"&l_name&"'"
		if keyword<>"" then sql=sql&" and (l_loginip like '%"&keyword&"%')"
		If IsSqlDataBase = 1 And datefrom<>"" And dateto<>"" Then sql=sql + " and DateDiff(d,l_logintime,'"& datefrom &"')<=0 and DateDiff(d,l_logintime,'"& dateto &"')>=0"
		If IsSqlDataBase = 0 And datefrom<>"" And dateto<>"" Then sql=sql + " and DateDiff('d',l_logintime,'"& datefrom &"')<=0 and DateDiff('d',l_logintime,'"& dateto &"')>=0"
		.Condition=sql
		.OrderBy="l_logintime desc"
		End With
		DataCount=ors.RecCount()
		DataList=ors.ResultSet()
%>
<script language="javascript" src="inc/js/MyCalendar.js"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable-top">
<tbody>
<form name="form" action="?" method="get">
<tr>
<td height="30" align="left" class="classhead">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<select name="l_name">
<option value="">┌ <%=Lang_Flag(60)%></option>
<% Set rs=conn.execute("select admin_name from [Lebi_adminuser]")
 If Not rs.eof then
 Do While Not rs.eof
 response.write "<option value="""&rs(0)&""""& judge2(rs(0),l_name) &">├ "&rs(0)&"</option>"
 rs.movenext
 Loop
 End If
 rs.close:Set rs=Nothing
%>
</select>
</td>
<td style="padding-left:5px;"><input type="text" name="dateFrom" value="<%=dateFrom%>" size="12" class="form_calendar" onclick="setday(this)" /> - <input type="text" name="dateTo" value="<%=dateTo%>" size="12" class="form_calendar" onclick="setday(this)" /></td>
<td style="padding-left:5px;"><input name="keyword" type="text" value="<%=keyword%>" 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="log">
</td>
</tr>
</table>
</td>
<td align="right" class="classhead">
<%=QuickMenu("Admin_flag.asp|"& Lang_Menu(131) &"","?action=add|"& Lang_Menu(126) &"")%>
</td>
</tr>
</form>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable2">
</tbody>
<tr>
<td height="30" class="classhead" align="right" colspan="3"><%=ors.ShowPageHead(page)%></td>
</tr>
  <tr>
    <td width="15%" height="30" class="classtop"><%=Lang_Flag(1)%></td>
    <td width="65%" class="classtop"><%=Lang_Flag(57)%></td>
    <td width="20%" class="classtop"><%=Lang_Flag(58)%></td>
  </tr>
<%
If DataCount >0 Then
		For i = 0 To Ubound(DataList,2)
%>
  <tr class="classrow">
    <td height="30" class="classrow"><%=DataList(0,i)%></td>
    <td class="classrow"><%=DataList(1,i)%></td>
    <td class="classrow"><%=DataList(2,i)%></td>
  </tr>
<%
        Next
End If
%>
</form>
<tr>
	<td height="30" class="classfooter" align="right" colspan="3"><%=ors.ShowPageFoot(page)%></td>
</tr>
<tr>
<td colspan="3" class="classfaq">
  <div class="faq_main">
  <p class="faq_title"><%=Lang_sys(49)%></p>
  <%=Lang_Flag(59)%>
  </div>
</td>
</tr>
</tbody>
</table>
<script>tdshow("classtable");</script>
<%End sub%>