<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Powered by 9416.cn</title>
<!--#include file="../inc/conn.asp"-->

<script type="text/javascript" src="../ui/jquery.js"></script>
 <link rel="stylesheet" href="../ui/layui/css/layui.css" type="text/css"  />
 <style type="text/css">
 .islink {
	display: none;
	margin-bottom: 10px;
}
 </style>
<script type="text/javascript" src="../ui/layui/layui.js"></script>



</head>


<body>
<%sql="select * from [type] where id="&request("id")
rs.open sql,conn,3,3
		%>
   <div style="padding:20px">
  <%jianbook.qxmsg()%>
        <form id="form1" name="form1" class="layui-form"  method="post" action="?act=add&id=<%=request("id")%>">
  	   <table width="100%" border="0" cellspacing="0" cellpadding="0"  >
    <tr>
      
      <td height="40"><input name="title" type="text" class="layui-input"  style="width:200px; float:left; margin-right:10px " lay-verify="required"  placeholder="分类名称" value="<%=rs("title")%>"/>
      <input name="num" type="text" class="layui-input"  size="100" lay-verify="number" style="width:100px; float:left; " placeholder="排序" value="<%=rs("num")%>"/></td>
    </tr>
    <tr>
     
      <td height="40"><input type="checkbox" name="iscomment" title="用户可发布" value="1" <%if rs("iscomment")=1 then%> checked="checked"<%end if%> />
      <input type="checkbox" name="islink" title="外链" lay-filter="islink"  value="1" <%if rs("islink")=1 then%> checked="checked"<%end if%>></td>
    </tr>
   
       </table>
       <div class="islink" <%if rs("islink")=1 then%> style="display:block"<%end if%>><input name="link" type="text" class="layui-input"  placeholder="http://" value="<%=rs("url")%>"/></div>
  
       <input type="submit" class="layui-btn" value="保存修改" lay-submit="lay-submit" />
        
 
  </form>
    

	
   </div> 
  
<%
  if request("act")="add" then

   jianbook.demomsg()

		if request("iscomment")=1 then
		rs("iscomment")=1
		else
		rs("iscomment")=0
		end if
		if request("islink")=1 then
		rs("islink")=1
		else
		rs("islink")=0
		end if
		rs("url")=request("link")
		rs("title")=request("title")
		rs("num")=request("num")
        rs.update
		rs.close
	
response.Write"<script>parent.location.reload();</script>"



end if
	

 

		set rs=nothing
 
%>
 <script>


layui.use('form', function(){
 var form = layui.form;
 
	 form.on('checkbox(islink)', function(data){
 $(".islink").css("display","none");
   //被点击的radio的value值
  	var bb_type =data.elem.checked;
	if(bb_type)
		{
			
			$(".islink").css("display","block");
			
			
			
				
		}
		});	
		


});

</script>
		
<script type="text/javascript" src="../ui/pc.js"></script>
</body>

</html>
