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

select case Request.QueryString("action")
case "submit"

	w_netbar_isopen=request.Form("w_netbar_isopen")
	w_netbar_content=request.Form("w_netbar_content")
	
	if w_netbar_isopen<>1 then w_netbar_isopen=0
	
	
	set rs=server.CreateObject("adodb.recordset")
	rs.open "select top 1 * from p3t_config order by w_id asc",conn,1,3
	
	rs("w_netbar_isopen")=w_netbar_isopen
	rs("w_netbar_content")=w_netbar_content
	rs.update
	rs.close
	set rs=nothing
	
	p3t "<script>alert('操作成功');parent.location.reload();</script>"
	p3t_end
case else
	call main_()
end select
footer()

sub main_()
%>
<LINK href="../css/style.css" rel=stylesheet type=text/css> 
<body marginheight=0 marginwidth=0 leftmargin=0>
<center>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">

<TABLE width=100% border="0" cellPadding=2 cellSpacing=1 class="tableBorder">
  <tr> 
     <th height=25 colspan="2" class="tableHeaderText">网吧联盟设置</th> 
  </tr>
<div class="main_body">

    <form name="form1" action="?action=submit" method="post" target="yukiiak">

    <%
	set rs=conn.execute("select top 1 * from p3t_config order by w_id asc")
	if rs.eof then
	%>
      <tr>
        <td colspan="2">配置文件丢失</td>
      </tr>
    <%
	else
	%>
      <tr>
        <td  class=forumRow>是否开启</td>
        <td  class="right"><input type="checkbox" name="w_netbar_isopen" value="1"<%if rs("w_netbar_isopen")=1 then p3t " checked"%> /><--开启前台网吧联盟申请！</td>
      </tr>
      <tr>

        <td class=forumRow>合作内容</td>
        <td class="right"><textarea name="w_netbar_content" cols="80" rows="10" class="input"><%=rs("w_netbar_content")%></textarea></td>
      </tr>
      <tr>
        <td></td>
        <td>
        	<input type="submit" name="submit" class="button" value=" 提 交 " />
        	<input type="reset" name="reset" class="button" value=" 重 置 " />
        </td>
      </tr>
    <%
	end if
	set rs=nothing
	%>
    </form>
    </table>
</div>
<%
end sub
%>