<!--#include file="head.asp"-->
<!--#include file="subleft.asp"-->

<script>document.getElementById('o_1').setAttribute("class", "ed"); document.getElementById("t_1").style.display="";document.getElementById('s_1_7').setAttribute("class", "ed5");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<%
isyidu=SafeRequestform("isyidu")
isdel=SafeRequestform("isdel")

if isdel="alldel" then
listid=SafeRequestform("list1")
page=SafeRequest("page")
if listid="" then call PopErr2("未找到此项目","mess?page="&page&"")
	delid=split(listid,",")
	For dianka=0 To Ubound(delid) 
	'response.Write delid(dianka)
	sql="select * from aytongzhi where aytongzhiid="&trim(delid(dianka))&" and aytongzhiuser="&clng(request.Cookies("aynameid"))&"" 
	rs.open sql,conn,1,3
	if rs.bof and rs.eof then
	call PopErr2("未找到此项目","mess?page="&page&"")
	else
	rs.delete
	rs.close
	end if
	next
	call logadd(request.Cookies("aynameid"),"站内通知多选删除成功",0,0)
	response.Redirect("mess?page="&page&"")
end if

if isyidu="allyidu" then
listid=SafeRequestform("list1")
page=SafeRequest("page")
if listid="" then call PopErr2("未找到此项目","mess?page="&page&"")
	delid=split(listid,",")
	For dianka=0 To Ubound(delid) 
	'response.Write delid(dianka)
	sql="select * from aytongzhi where aytongzhiid="&trim(delid(dianka))&" and aytongzhiuser="&clng(request.Cookies("aynameid"))&"" 
	rs.open sql,conn,1,3
	if rs.bof and rs.eof then
	call PopErr2("未找到此项目","mess?page="&page&"")
	else
	rs("aytongzhidu")=1
	rs.update
	rs.close
	end if
	next
	call logadd(request.Cookies("aynameid"),"站内通知多选设置已读成功",0,0)
	response.Redirect("mess?page="&page&"")
end if
%>

<title><%=webname%>-站内信</title>

<SCRIPT LANGUAGE="JavaScript">
var checkflag1 = "false";
function check1(field) {
if (checkflag1 == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag1 = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag1 = "false";
return "true"; }
}

function unselectall1()
{
    if(document.myform.chkAll1.checked){
	document.myform.chkAll1.checked = document.myform.chkAll1.checked&0;
	checkflag1 = "false";
    } 	
}
</script>

<SCRIPT LANGUAGE="JavaScript">
function del(){

if(confirm("确定要删除通知吗？")){
	document.getElementById("isdel").value="alldel";
	document.getElementById(myform).submit();
        return true;
}else{
        return false;
}

}
</script>

<SCRIPT LANGUAGE="JavaScript">
function yidu(){

	document.getElementById("isyidu").value="allyidu";
	document.getElementById(myform).submit();
    return true;

}
</script>
<br>
<DIV id=main2> 
<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>

<H2><SPAN>站内信</SPAN></H2>
<DIV class=main4>
	
<DIV >
<form action="?page=<%=page%>" method="post" name="myform" id="myform">
<TABLE width="100%" align="center">
  <TBODY>
  				<%
sql="select * from aytongzhi where t4=1 and aytongzhiuser="&clng(request.Cookies("aynameid"))&" order by aytongzhiid desc" 
				rs.open sql,conn,1,1
				if rs.bof and rs.eof then
				rs.close
				response.Write("<br>&nbsp;&nbsp;暂无站内信息<br><br>")
				else
				rs.pagesize=20
				pagecount=rs.pagecount 
				if request("page")="" then 
				page=1
				else
				page=int(request("page")) 
				end if
				if page<=0 then page=1 
				if request("page")="" then page=1
				rs.absolutepage=page
				do while not rs.eof%>
  <TR>
    <TD style="TEXT-ALIGN: center; COLOR: #666" height=25 width=5%><span>
      <input name="list1" type="checkbox" id="list1" value="<%=rs("aytongzhiid")%>" onClick="unselectall1()">
    </span></TD>
    <TD style="TEXT-ALIGN: center; COLOR: #666" width=11%><%=DateValue(rs("aytongzhidate"))%>
    </TD>
    <TD width="84%"><SPAN style="COLOR: #333; FONT-SIZE: 18px">·</SPAN>	<A href="/notice/<%=trim(rs("suijiid"))%>" target="_blank">
	<%
	
	  
				if len(trim(rs("aytongzhibiao")))>55 then
					if cint(rs("aytongzhidu"))=0 then
					response.Write ("<strong>"&left(rs("aytongzhibiao"),55)&"……</strong>")
					else
					response.Write (left(rs("aytongzhibiao"),55)&"……")
					end if
				else
					if cint(rs("aytongzhidu"))=0 then
					response.Write ("<strong>"&rs("aytongzhibiao")&"</strong>")
					else
					response.Write rs("aytongzhibiao")
					end if
				end if
	
	
	%>
	
	</A>	</TD>
  </TR>
				<%n=n+1
				rs.movenext 
				if n>=rs.pagesize then exit do 
				loop
				zongshu=rs.RecordCount
				rs.close
				end if%> 
 
  <TR>
    <TD style="PADDING-LEFT: 10px;border-top:1px solid #ccc;" height=30 colSpan=3><input name="chkAll1" type="checkbox" id="chkAll1" onClick="this.value=check1(this.form.list1)" value="checkbox">
      全选
	  <input type="submit" name="Submit" value=" 删除选定 " onClick="return del();">&nbsp;
	  <input type="submit" name="Submit2" value=" 标记为已读 " onClick="return yidu();">
	  <%
link="mess?cact="
call pageye()
%>	<input type="hidden" name="isdel" id="isdel">
<input type="hidden" name="isyidu" id="isyidu"></TD>
  </TR></TBODY></TABLE>
  </form>
</DIV>

</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>

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


