
<!--#include file="../../p_inc/Include_func.asp"-->
<!--#include file="../inc/public.asp"-->
<!--#include file="../inc/openconn.asp"-->

<%
Response.Buffer = True 
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = 0 
Response.CacheControl = "no-cache" 
%>
<%
If request.Cookies(Sky_Admin_Cookies_1)("admin_u")="" or request.Cookies(Sky_Admin_Cookies_1)("admin_p")="" or request.Cookies(Sky_Admin_Cookies_1)("admin_m")="" then
	response.write "<script language='javascript'>"
	response.write"this.location.href='./login.asp';</SCRIPT>" 
response.end
end if
%>
<html>
<head>
<title>系统授权</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style.css">
<SCRIPT language=javaScript src="../js/mouse_on_title.js" type=text/javascript></SCRIPT>

</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <td width="24%"><img src="../images/admin.png" width="200" height="66"></td>
  <tr bgcolor="#F6F6F6"> 
    <td height="20" class="forumRowHighlight"><font color="#333333">&nbsp;系统授权 --&gt; 授权信息</font></td>
  </tr>
  <tr bgcolor="#FF9900"> 
    <td height="1" colspan="2"></td>
  </tr>
</table>
<br>
<table width="50%" border="1" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr> 
    <th width="13%" height="23" class="tableHeaderText"><div align="center">授权用户名</div></th>
    <th width="12%"><div align="center" class="tableHeaderText">登陆用户名</div></th>
    <th width="15%" class="tableHeaderText"><div align="center">授权域名</div></th>
    <th class="tableHeaderText"><div align="center">到期时间</div></th>
    <th width="11%" class="tableHeaderText"><div align="center">授权级别</div></th>
	     <th width="28%" class="tableHeaderText"><div align="center">操 作</div></th>
  </tr>
  <%  keyword=replace(trim(request("keyword")),"'","")
      act=request("act")
	  if act="" then act="zh"
	  set rs=server.CreateObject("adodb.recordset")
	if session("login_level")=4 then   '系统管理员，管理全部
	  if act="zh" then 
	  sql="select * from [user] where username like '%"&keyword&"%' order by id desc"
	  else 
	  sql="select * from [user] where pssword like '%"&keyword&"%' order by id desc"
	  end if
	else
		'超级管理员，不能管理系统管理员
		com_id=session("login_comid")
		if act="zh" then
			'sql="select * from tbl_admin where str_username like '%"&keyword&"%' and str_level<>4 and com_id="&com_id&" order by id desc"
			sql="select * from [user] where username like '%"&keyword&"%'  order by id desc"
		else
			sql="select * from [user] where pssword like '%"&keyword&"%' order by id desc"
		end if
	end if
	  rs.open sql,conn,1,3
	  if rs.eof then
	%>
  <tr bgcolor="#F6F6F6"> 
    <td height="24" colspan="6"> &nbsp;&nbsp;没有获取授权信息，<a href="add.asp">请先点击这注册添加你的信息...</a></td>
  </tr>
  <%else
rs.pagesize =15  '设置每页显示记录条数
if request("page")=""or not IsNumeric(request("page")) or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
rs.Move rs.PageSize*(page-1)
end if
i=1
while not rs.eof and i<=rs.pagesize
		%>
		<%	Set oRs=conn.Execute("Select Top 1 * From [User]")
	IF Not oRs.Eof Then
		uname=oRs("username")
	Else
		uname=""
	End IF
	oRs.close()%>
			<%	Set oRs=conn.Execute("Select Top 1 * From upda")
	IF Not oRs.Eof Then
		G_UpdateSite=oRs("G_UpdateSite")
	Else
		G_UpdateSite=""
	End IF
	oRs.close()%>
  <tr  onMouseOut="this.style.backgroundColor='#F6F6F6'" onMouseOver="this.style.backgroundColor='#EEEEEE'"> 
    <td height="24"><div align="center"><font color="#666666"><%=rs("username")%> </font></div></td>
    <td><div align="center"><font color="#666666"> <%=rs("username")%></font></div></td>
    <td><div align="center">&nbsp;<%=rs("dns")%>&nbsp;</div></td>
    <td><div align="center">&nbsp;<%=rs("time")%>&nbsp;</div></td>
    <td><div align="center"><font color="#666666"> <script src="<%=G_UpdateSite%>/svrFolder/yz.asp?uname=<%=uname%>"></script></font></div></td>
    <td> <div align="center">[<a href="modify.asp?id=<%=rs("id")%>">修改</a>] 
        <%if rs("str_username")<>session("login_username") then%>
        [<a href="delete.asp?id=<%=rs("id")%>&page=<%=request("page")%>&act=<%=request("act")%>&keyword=<%=request("keyword")%>" onClick="return confirm('确定删除吗？')">删除</a>] 
        <%end if%>
 </div>
		</td>
  </tr>
  <%
i=i+1
 rs.MoveNext                                              
 wend 
%>
<SCRIPT language=JavaScript>
function test()
{
	
		if(form1.username.value.length == 0)
	{
		alert("用户登陆帐号不可为空!") ;
		form1.username.focus() ;
		return false;
	}
	
	if(form1.password.value.length == 0)
	{
		alert("用户密码不可为空!") ;
		form1.password.focus() ;
		return false;
	}
	
		if(form1.password_2.value.length == 0)
	{
		alert("密码重复不可为空!") ;
		form1.password_2.focus() ;
		return false;
	}
		if(form1.str_pass.value!=form1.str_pass2.value)
	{
		alert("密码和密码重复不同!") ;
		form1.str_pass2.focus() ;
		return false;
	}
	return true;
};
function check()
{if (document.form1.all_check.checked)
for(i=0;i<document.form1.str_manage.length;i++)
  document.form1.str_manage[i].checked=true;
else
for(i=0;i<document.form1.str_manage.length;i++)
  document.form1.str_manage[i].checked=false;

}

</SCRIPT>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <th height="22" colspan="2" class="tableHeaderText">&nbsp;&nbsp;::: 系统授权 
      --&gt; 授权信息:::</th>
  </tr>
  <tr> 
    <td height="1" colspan="2"></td>
  </tr>
</table>
<br>
<table width="98%" border="1"  align=center cellpadding="0" cellspacing="1" class="tableBorder">
  <form action="add_save.asp" method="POST" name="form1" id="form1"  onSubmit="return test();">
    <tr> 
      <td height=25 class=forumRow><div align="right">授权用户帐号：</div></td>
      <td class=forumRow >&nbsp; <input name="username" type="text" id="zt2" size="20"> 
        <font color="#FF6600">*（填写在绿网官方注册的授权帐号）</font></td>
    </tr>
    <tr> 
      <td height=25 class=forumRow><div align="right">用户密码：</div></td>
      <td bgcolor="#F6F6F6" class=forumRow >&nbsp; <input name="password" type="password" id="zt"  size="20"> 
        <font color="#FF6600">*（写在绿网官方注册的授权密码）</font></td>
    </tr>
    <tr> 
      <td height=25 class=forumRow ><div align="right">重复密码：</div></td>
      <td bgcolor="#F6F6F6" class=forumRow>&nbsp; <input name="password_2" type="password" id="password_2"  size="20"> 
        <font color="#FF6600">*（初始化为888888）</font></td>
    </tr>
    <tr> 
      <td height=25 class=forumRow><div align="right">授权类别：</div></td>
      <td bgcolor="#F6F6F6" class=forumRow>&nbsp; 
		<select name="lev" id="lev">
            <option value="" style="color:#999;">请选择类型</option>
            <option value="1">免费用户</option>
            <option value="2">开源用户</option>
            <option value="3">VIP用户</option>
        </select>
		         <script type="text/javascript">document.getElementById("lev").value="<%=lev%>";</script>
					<font color="#FF6600">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*选择你注册授权时的类型!</font>
		</td>
    </tr>
    <tr> 
      <td height=25 class=forumRow><div align="right">授权域名：</div></td>
      <td bgcolor="#F6F6F6" class=forumRow>&nbsp; <input name="dns" type="text" id="dns" size="20">
		<font color="#FF6600">*输入你的域名,如:www.58119.com 不要http://</font></td>
    </tr>

    <tr> 
      <td width="16%" height=39 class=forumRow><div align="center">&nbsp; </div></td>
      <td width="84%"class=forumRow> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input name="Submit" type="submit" value=" 添加 "> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input name="Submit2" type="reset" value=" 清空 "></td>
    </tr>
  </form>
</table>
<br>


  <%end if
rs.close
set rs=nothing	
%>
</table>
<div align="center"></div>
</body>
</html>


