<!--#include virtual="/incs/config.asp"-->
<!--#include virtual="/incs/top.asp"-->
<% chk_log()%>
<%
chk_newpwr 4,23,1
perpage=20
ThePage=0
conn.open constr
perpage=SafeRequest("perpage")
if chk_int(perpage)=false then
perpage=20
end if 
perpage=clng(perpage)
ThePage=0
page=0
rcount=0
thepage=0
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
					   if SafeRequest("k_tpe")<>"" then
					   qrystr=" and u_"&SafeRequest("k_tpe")&"="&SafeRequest("k_wrds")
					   end if
		
					   query="select * from v_mempwr where 1=1 "&qrystr
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    rs.open query,conn,1,1
    if rs.RecordCount<=0 then
          ErrMsg=ErrMsg+"<font color=#ff0000>对不起，</font>没有找到记录！..."
	else
	       rcount=rs.recordcount
	      rs.pagesize=perpage
		  ThePage=rs.pagecount
		  if Chk_Int(SafeRequest("page"))=false then
		  page=1
		  else
		   page=cint(SafeRequest("page"))
		    if page<=0  then
		       page=1
		    elseif page>ThePage then
		       page=ThePage
		    end if	  
		  end if
		    rs.absolutepage=page
    end if 
%>
<script language=javascript>
function ifdel(pwid)
{
if(confirm("提示：是否确认删除！"))
showurl("pwr_mng.asp?module=<%=server.urlencode("pwr_del")%>&pwid="+pwid);
}
function tofirst()
{searchform.page.value=1;
searchform.submit();
 }
  function toprev()
{searchform.page.value-=1;
searchform.submit();
 }
  function tonext()
{
searchform.page.value=<%=page%>-1+2;
searchform.submit();
 }
  function tolast()
{searchform.page.value=<%=ThePage%>;
searchform.submit();
 }
 function toorder(ordn)
{searchform.ordernum.value=ordn;
searchform.page.value=1;
searchform.submit();
 }
</script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>权限分组</strong></span></b></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="javascript:showurl('pwr_add.asp');" class=commonface>权限组添加</a> 
            | <a href="javascript:showurl('pwr_lst.asp');" class=commonface>权限组列表</a></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="top" height="28"> 
      <div align="center"> 
        <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tbody> 
          <form action=pwr_mem.asp method=post name=searchform2>
            <tr> 
              <td height=20 width="119">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
              <td height=20> 
                <div align="center"><%=page_turn%><input type=hidden name=k_tpe value=pwr><input type=hidden name=k_wrds value="<%=SafeRequest("k_wrds")%>"></div>
              </td>
              <td height=20 width="120"> 
                <div align="right">转第 
                  <select name="page" onChange="javascript:document.searchform2.submit();">
                    <option selected value=<%=page%>><%=page%></option>
                    <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                  </select>
                  页</div>
              </td>
            </tr>
          </form>
          </tbody> 
        </table>
        <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td height=12></td>
          </tr>
        </table>
        <table border=0 cellpadding=0 
                        cellspacing=0 class=datalist align="center" width="100%">
          <tr > 
            <th class=datalistheader height="22" align=center> 
              <div align="center">序号</div>
            </th>
            <th class=datalistheader align=center>会员名称</th>
            <th  class=datalistheader align=center>组名称</th>
          </tr>
          <%
	
					
i=1
					do   while not rs.eof
					    %>
          <form action="pwr_mem_edt.asp" method=post name=pwmng>
            <tr > 
              <td class=datalistgrida  height="22"  align=center><%=i%></td>
              <td  class=datalistgrida  align=center><%=rs("u_nme")%> </td>
              <td   class=datalistgrida align=center><%=rs("pw_nme")%> </td>
            </tr>
          </form>
          <% 
					 
				
					rs.movenext
i=i+1
if i>perpage then
exit do
end if
					loop
					rs.close
					
					%>
        </table>
        <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td height=8></td>
          </tr>
        </table>
        <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tbody> 
          <form action=pwr_mem.asp method=post name=searchform>
            <tr> 
              <td height=20 width="120">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
              <td height=20> 
                <div align="center"><%=page_turn%><input type=hidden name=k_tpe value=pwr><input type=hidden name=k_wrds value="<%=SafeRequest("k_wrds")%>"></div>
              </td>
              <td height=20 width="120"> 
                <div align="right">转第 
                  <select name="page" onChange="javascript:document.searchform.submit();">
                    <option selected value=<%=page%>><%=page%></option>
                    <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                  </select>
                  页</div>
              </td>
            </tr>
          </form>
          </tbody> 
        </table>
        <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td height=8></td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
  <tr>
    <td  colspan=2 valign="top" height="28">&nbsp;
      <table border=0 cellpadding=0 
                        cellspacing=0 class=datalist align="center" width="100%">
        <form action="pwr_mng.asp" name="pwrmng" method=post>
                
          <tr > 
            <th height="22" colspan="5" align=center class=datalistheader> 
              <div align="center">加入权限组</div>
                            </th>
                        </tr>
                        
                          
          <tr > 
            <td class=datalistgrida width="20%" height="22"  align=center>会员名称</td>
                            
                          <td width="20%"  class=datalistgrida  align=center><input name="u_nme" type="text" id="u_nme" size="15"></td>
                            
                          <td width="20%"  class=datalistgrida  align=center>管理等级
                            <input name="module" type="hidden" id="module" value="pwr_mem_add"></td>
                            
                          <td width="20%"  class=datalistgrida  align=center><select name="pwid" id="pwid">
                              <% query="select * from pwrlst order by pw_nme"

							  rs.open query,conn,1,1
							  while not rs.eof
							  if clng(rs("pw_id"))=clng(SafeRequest("k_wrds")) then
							  response.write "<option value='"&rs("pw_id")&"' selected>"&trim(rs("pw_nme"))&"</option>"
							  else
							  response.write "<option value='"&rs("pw_id")&"'>"&trim(rs("pw_nme"))&"</option>"
							  end if
							  rs.movenext
							  wend
							  %>
							  
                            </select> </td>
                            
                          <td width="20%"  class=datalistgrida  align=center> <input type="submit" name="Submit" value="添 加" class=btxx></td>
                          </tr>
                       </form>
                      </table></td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->



