<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Conn/conn.asp"-->
<!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=gb2312" />
<link rel="stylesheet" href="../css/indexTwo.css" type="text/css">
<title>网站后台</title>
</head>
<body>
<%
if request("action")="edit" then
	modeID=0
	tag=request("tag")
	select case tag
		case "color"
			modeID=3
		case "Topsign"
			modeID=4
		case "Pic"
			modeID=5
		case "content"
			modeID=6
		case "back"
			modeID=7
	end select
	sql="select * from TbNewsSet where id="&modeID
	rs.open sql,conn,1,3
	if not rs.eof then
		if rs("mode")=1 then
			rs("mode")=0
		else
			rs("mode")=1
		end if
		rs.update
	end if
	rs.close
	response.write "<script> alert('修改成功');window.document.location.href='News_Mode.asp';   </script>"
	response.End()
end if
%>
<table width="100%" border="0" cellspacing="1" class="Navi2">
  <tr>
    <th colspan="2">信息默认设置</th>
  </tr>
  <tr>
  	<td style=" width:150px;text-align:right; padding-right:8px;">标题颜色</td>
	<td style="text-align:left; padding-left:8px;"><%call ShowMode("color")%></td>
  </tr>
  <tr>
  	<td style=" width:150px;text-align:right; padding-right:8px;">推荐信息</td>
	<td style="text-align:left; padding-left:8px;"><%call ShowMode("Topsign")%></td>
  </tr>
  <tr>
  	<td style=" width:150px;text-align:right; padding-right:8px;">封面图</td>
	<td style="text-align:left; padding-left:8px;"><%call ShowMode("Pic")%></td>
  </tr>
  <tr>
  	<td style=" width:150px;text-align:right; padding-right:8px;">新闻内容</td>
	<td style="text-align:left; padding-left:8px;"><%call ShowMode("content")%></td>
  </tr>
   <tr>
  	<td style=" width:150px;text-align:right; padding-right:8px;">是否需要返回</td>
	<td style="text-align:left; padding-left:8px;"><%call ShowMode("back")%></td>
  </tr>
  <tr>
  	<td colspan="2">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<!--#include file="../Conn/conn_close.asp"-->
<%
sub ShowMode(modetype)
	select case modetype
		case "color"
			modeID=3
		case "Topsign"
			modeID=4
		case "Pic"
			modeID=5
		case "content"
			modeID=6
		case "back"
			modeID=7
	end select
	sql="select * from TbNewsSet where id="&modeID
	rs.open sql,conn,1,1
	if not rs.eof then
		response.Write("<a href='?tag="&modetype&"&action=edit' class='link2'>")
		if rs("mode")=1 then
			response.Write("开启")
		else
			response.Write("关闭")
		end if
		response.Write("</a>")
	end if
	rs.close
end sub
%>