<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->
<!--#include virtual="/inc/connhost.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>-最高权限-发布通知</title>
<%
call logquanxian("f1",1)
%>

<DIV>

<%
act=SafeRequest("act")

if act="editok" then
cid=SafeRequestform("cid")

aytongzhilei=request.Form("aytongzhilei")
aytongzhisx=request.Form("aytongzhisx")
aytongzhiuser=request.Form("aytongzhiuser")
aytongzhibiao=request.Form("aytongzhibiao")
content1=request.Form("content1")
aytongzhibtys=request.Form("aytongzhibtys")
aytongzhikejian=request.Form("aytongzhikejian")
if aytongzhikejian="" then aytongzhikejian=1
aytongzhidu=request.Form("aytongzhidu")
if aytongzhidu="" then aytongzhidu=0

aytongzhipic=request.Form("aytongzhipic")
ayisshow=request.Form("ayisshow")
if ayisshow="" then ayisshow=0
ayshowcon=request.Form("ayshowcon")
t1=request.Form("t1")
t2=request.Form("t2")
t3=request.Form("t3")
t4=request.Form("t4")
t4isall=request.Form("t4isall")
t5=request.Form("t5")
t6=request.Form("t6")
t7=request.Form("t7")
if t1="" then t1=0
if t2="" then t2=0
if t3="" then t3=0
if t4="" then t4=0
if t4isall="" then t4isall=0
if t5="" then t5=0
if t6="" then t6=0
if t7="" then t7=0
	
	if hosturl<>"/" and trim(content1)<>"" then
		hoststr=split(allhosturl,"|")
		For hostsum=0 To Ubound(hoststr) '原已提交路径变更标示
		content1=replace(trim(content1),hoststr(hostsum)&"updata/tongzhi/",hoststr(hostsum)&"updata/tongzhi2/")
		next
	
	'替换新加路径	
	content1=replace(trim(content1),"/updata/tongzhi/",""&hosturl&"updata/tongzhi/")
		
	'原路径标示还原
	hoststr=split(allhosturl,"|")
	For hostsum=0 To Ubound(hoststr)
	content1=replace(trim(content1),hoststr(hostsum)&"updata/tongzhi2/",hoststr(hostsum)&"updata/tongzhi/")
	next
	
	end if
	

'Function htmlspecialchars(str)
'str = Replace(str, "&", "&amp;")
'str = Replace(str, "<", "&lt;")
'str = Replace(str, ">", "&gt;")
'str = Replace(str, """", "&quot;")
'htmlspecialchars = str
'End Function
'response.Write htmlspecialchars(content1)
'response.end


sql="select * from aytongzhi where aytongzhiid="&clng(cid)&"" 
rs.open sql,conn,1,3
	rs("aytongzhilei")=cint(aytongzhilei)
	rs("aytongzhisx")=cint(aytongzhisx)
	rs("aytongzhiuser")=cint(aytongzhiuser)
	rs("aytongzhibiao")=aytongzhibiao
	rs("aytongzhicon")=content1
	rs("aytongzhikejian")=cint(aytongzhikejian)
	rs("aytongzhidate")=now()
	rs("aytongzhisum")=0
	rs("aytongzhibtys")=aytongzhibtys
	rs("aytongzhidu")=cint(aytongzhidu)
	rs("t1")=t1
	rs("t2")=t2
	rs("t3")=t3
	rs("t4")=t4
	rs("t5")=t5
	rs("t6")=t6
	rs("t7")=t7
	rs("t4isall")=t4isall
	
	if trim(aytongzhipic)<>"" then rs("aytongzhipic")=aytongzhipic
	rs("ayisshow")=ayisshow
	rs("ayshowcon")=ayshowcon
	

	rs.update
	rs.close
	call logadd(request.Cookies("aynameid"),"管理-通知修改成功"&cid,0,0)
	call PopErr2("修改成功","admintongzhi.asp")



end if



id =SafeRequest("id")
if id="" then call PopErr("获取参数错误") 
sql="select * from aytongzhi where aytongzhiid="&clng(id)&"" 
rs.open sql,conn,1,1
if rs.bof and rs.eof then 
call PopErr("未找到此数据") 
end if


%>
<DIV id=main1200> 
<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>

<DIV class=right_titleadmin>&nbsp;&nbsp;发布通知</DIV>
<DIV class=main>

<form action="?act=editok" method="post" name="form" id="form">
  <table width="99%" border="0" cellspacing="0" cellpadding="0" class="table_style_a1">
    <tr>
      <td width="80" align="center">通知类别：</td>
      <td><input name="t1" type="checkbox" id="t1" value="1" <%if cint(rs("t1"))=1 then response.Write("checked")%>>顶部通知
          <input name="t2" type="checkbox" id="t2" value="1" <%if cint(rs("t2"))=1 then response.Write("checked")%>>最新动态
          <input name="t3" type="checkbox" id="t3" value="1" <%if cint(rs("t3"))=1 then response.Write("checked")%>>常见问题
          <input name="t4" type="checkbox" id="t4" value="1" <%if cint(rs("t4"))=1 then response.Write("checked")%>>站内信
          <input name="t5" type="checkbox" id="t5" value="1" <%if cint(rs("t5"))=1 then response.Write("checked")%>>公告
          <input name="t6" type="checkbox" id="t6" value="1" <%if cint(rs("t6"))=1 then response.Write("checked")%>>后台通知
          <input name="t7" type="checkbox" id="t7" value="1" <%if cint(rs("t7"))=1 then response.Write("checked")%>>紧急通知</td>
    </tr>
    <tr>
      <td align="center">通知排序：</td>
      <td><input name="aytongzhisx" type="text" id="aytongzhisx" value="<%=rs("aytongzhisx")%>" size="7" maxlength="4">
        数字越小越靠前</td>
    </tr>
    <tr>
      <td align="center">通知会员ID：</td>
      <td><input name="aytongzhiuser" type="text" id="aytongzhiuser" value="<%=rs("aytongzhiuser")%>" size="7" maxlength="8">
        <input name="t4isall" type="checkbox" id="t4isall" value="1"  <%if cint(rs("t4isall"))=1 then response.Write("checked")%>>
        所有会员</td>
    </tr>
    <tr>
      <td align="center">通知标题：</td>
      <td><input name="aytongzhibiao" type="text" id="aytongzhibiao" value="<%=trim(rs("aytongzhibiao"))%>" size="90" maxlength="70"></td>
    </tr>
<link rel="stylesheet" href="/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>
<script>
			KindEditor.ready(function(K) {
				var uploadbutton1 = K.uploadbutton({
					button : K('#uploadButton1')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_tongzhi.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, '');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#aytongzhipic').val(urlcon);
							//con1.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton1.fileBox.change(function(e) {
					uploadbutton1.submit();
				});
			});
		</script>

    <tr>
      <td align="center">首页配图：</td>
      <td><input name="aytongzhipic" type="text" id="aytongzhipic" value="<%=trim(rs("aytongzhipic"))%>" size="90">
      <input type="button" id="uploadButton1" value="上传图片" /> 款435 高248</td>
    </tr>
    <tr>
      <td align="center">首页固定：</td>
      <td><input name="ayisshow" type="checkbox" id="ayisshow" value="1" <%if cint(rs("ayisshow"))=1 then response.Write("checked")%>>
        是否在首页固定位置显示 以及显示图片</td>
    </tr>
    <tr>
      <td align="center">简版内容：</td>
      <td><textarea name="ayshowcon" cols="100" rows="4" id="ayshowcon"><%=trim(rs("ayshowcon"))%></textarea><br>
        在首页显示的简版文字内容，禁止带图片</td>
    </tr>
    <tr>
      <td align="center">标题样式：</td>
      <td><input name="aytongzhibtys" type="text" id="aytongzhibtys" value="<%=trim(rs("aytongzhibtys"))%>" size="33">
        color:#ff0000;font-weight:bold 红色FF0000 黄色FF9900 紫色FF00FF 绿色339900</td>
    </tr>
    
    <tr>
      <td align="center">通知内容：<br><br>图片宽度不超过760px</td>
      <td>
<!--
<INPUT type="hidden" name="content1" value="<%'=Server.HtmlEncode(rs("aytongzhicon"))%>">
<IFRAME ID="eWebEditor1" src="/e/ewebeditor.htm?id=content1&style=light" frameborder="0" scrolling="no" width="950" height="350"></IFRAME>
-->

<script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>
<script>
        var editor;
        KindEditor.ready(function(K) {
                editor = K.create('#editor_id', 
				{
				width : '900px',
				height : '700px', 
				uploadJson : '/kindeditor/asp/json_tongzhi.asp',
				fileManagerJson : '/kindeditor/asp/json_file_tongzhi.asp',
				allowFileManager : true,  //图片空间
				fillDescAfterUploadImage : true,  //图片上传后编辑
				items:[
						'undo', 'redo', '|', 'justifyleft', 'justifycenter', 'justifyright', 'fontname', 'fontsize', 'forecolor', 'hilitecolor',
						'bold', 'italic', '|', 'underline', 'strikethrough', 'image',
						'table', 'hr', 'emoticons', 'link', 'unlink', 'lineheight'
					  ]
                });
        });
</script>
<textarea id="editor_id" name="content1"><%=Server.HtmlEncode(rs("aytongzhicon"))%></textarea>
        </td>
    </tr>
    <tr>
      <td align="center">是否可见：</td>
      <td><input name="aytongzhikejian" type="checkbox" id="aytongzhikejian" value="0" <%if cint(rs("aytongzhikejian"))=0 then response.Write("checked")%>>
        <input name="cid" type="hidden" id="cid" value="<%=id%>"> 会员是否已读
        <input name="aytongzhidu" type="checkbox" id="aytongzhidu" value="1" <%if cint(rs("aytongzhidu"))=1 then response.Write("checked")%>></td>
    </tr>
    <tr>
      <td colspan="2" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="Submit" value=" 修 改 通 知 "></td>
      </tr>
  </table>
</form>
</DIV>
 

</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>
<SCRIPT>
$(function(){
$('.left_title').each(function(){
   $(this).click(function(){
	   var index=$('.left_title').index(this);
	   if($(this).next().hasClass('hide_m')){
		   $(this).next().removeClass('hide_m');
           $(this).next().show();		 
		   $(this).find('img').attr('src','<%=ossurl%>images/expansion.gif');
		   $.cookie('m_index_'+index,'',{expires:0});
	   } else {
	       $(this).next().hide();
		   $(this).next().addClass('hide_m');
		   $(this).find('img').attr('src','<%=ossurl%>images/shrank.gif');		   
		   $.cookie('m_index_'+index,'none',{expires:365});
	   }
   })
})

$('.left_title').each(function(){
	var index=$('.left_title').index(this);
    $(this).next().css('display',$.cookie('m_index_'+index) ? $.cookie('m_index_'+index) : '');
	if($.cookie('m_index_'+index)){
	    $(this).next().addClass('hide_m');
	}
	$(this).find('img').attr('src',$.cookie('m_index_'+index) ? '<%=ossurl%>images/shrank.gif' : '<%=ossurl%>images/expansion.gif');
})
})

</SCRIPT>


<!--#include virtual="/show/footadmin.asp"-->

