<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Conn.asp"-->
<!--#include file="Ex_Cls/Ex_SkinCls.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<link rel="stylesheet" href="Admin_Style.css">
<script src="wbTextBox/kindeditor.js"></script>
<body>
<%
Dim ExComm
Set ExComm=new Ex_CommonCls
ExComm.IsAdLogin 
ExComm.IsIpAllow
dim action
action=request.QueryString("action")
if action="change" then
call change()'修改数据
else
call show()
end if
sub show()
dim strsql,rs,placard
strsql="select placard from Ex_Config"
set rs=Conn.execute(strsql)
placard=Rs(0)
Dim Re
Set Re=new Regexp
Re.ignorecase=true
Re.pattern="(<marquee(.)*?>)"
Re.multiline=True
placard=re.Replace(placard,"")
placard=Replace(placard,"</marquee>","")
%>
<script>
function show()
{	
	var effect;
	var text=KE.util.getData('aBody');
	var effectObj=document.getElementsByName("effect");
	var str=text;
	for (var i=0;i<effectObj.length ;i++ )
	{
		if (effectObj[i].checked==true)
		{
			effect=effectObj[i].value;
		}
	}
	if (effect!="no")
	{
		str="<marquee scrollamount=3 onmouseover='this.stop();' onmouseout='this.start();' direction="+effect+">"+str+"</marquee>";
	}
	document.getElementById("show").innerHTML=str;
	document.getElementById("c").value=str;
}
</script>
<center>
<form name="form1" method="post" action="?action=change" onSubmit="return show()">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="border tablebg" >
    <tr>
      <th class="topbg" colspan="4">博客公告设置</th>
      </tr>
    <tr>
      <td width="185" class="tdbg"><div align="center">公告内容：</div></td>
      <td width="313" class="tdbg">
	  <textarea name="aBody" id="aBody"><%=server.htmlencode(placard)%>
	  </textarea>
	<!--#include file="htmedit_a.asp"-->
		<input type="hidden" id="c" name="c" value="<%=server.htmlencode(placard)%>">
	  </td>
      <td width="141" class="tdbg"><div align="center">效果预览：</div></td>
      <td width="313" class="tdbg"><div id="show"></div></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">
        <p>显示效果：</p>
        </div></td>
      <td colspan="3" class="tdbg">
	  <input type="radio" name="effect" value="no" onClick="show()">
		无
	  <input type="radio" name="effect" value="right" onClick="show()">
        从左向右滚动
        <input name="effect" type="radio" value="left" onClick="show()">
        从右向左滚动 
        <input type="radio" name="effect" value="up" onClick="show()">
        从下向上滚动 
        <input type="radio" name="effect" value="down" onClick="show()"> 
        从上往下滚动 
        </td>
    </tr>
      <td class="tdbg" colspan="4"><div align="center">
        <input type="submit" name="Submit" value="保存设置">
      &nbsp;&nbsp;<input type="button" name="button" value="查看效果" onClick="show()"></div></td>
      </tr>
  </table>
</form></center>
<a href="http://www.ex123.net/bbs" target="_blank"><font color="red">如果您对博客公告设置还有什么疑问,点此查看易心博客使用教程</font></a>
<%end sub%>
<%
sub change()
dim placard,ExFso
Placard=ExComm.G(request("c"))
Conn.execute "update Ex_Config set placard='"&placard&"'"
ExComm.ClearCaches(sn)
Dim ExSkin
Set ExSkin=new Ex_SkinCls
ExSkin.RefreshSkinCache
Set ExSkin=Nothing 
ExComm.ShowMsg "操作成功","admin_Placard.asp"
end Sub 
%>
</body>
</html>
