<!--#include file="head.asp"-->
<style>body{background-color: #fff;}</style>

<%
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>


<main>
<div  class="container">
<div class="ui-lrctnei">
<%call userleft()%>
<div class="r"> 
<div class="ui-content">
                        
					
                            
<div class="neiye">

                   
                                                     
            <!-------------------------------------- 开始 -------------------------------------->									
            <div class="neibiaoti"></div>
            <div class="neibiaoti2">站内通知</div>
            <div class="gexian20"></div>     
						<div class="neitable">
                        <form action="?page=<%=page%>" method="post" name="myform" id="myform">
                        <table>

           		  		<tr class="hd">
                            <td width="70">&nbsp;</td> 
                            <td width="180">信件时间</td>
                            <td width="380">通知标题</td>
                            <td>&nbsp;</td>
                        </tr>
							<%
            				sql="select * from aytongzhi where t4=1 and aytongzhiuser="&clng(request.Cookies("aynameid"))&" order by aytongzhiid desc" 
                            rs.open sql,conn,1,1
                            if not(rs.bof and rs.eof) then
                            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 onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                            <td><input name="list1" type="checkbox" id="list1" value="<%=rs("aytongzhiid")%>" onClick="unselectall1()"></td> 
                            <td><%=rs("aytongzhidate")%></td>
                            <td>
                            <A href="/notice/<%=trim(rs("suijiid"))%>" target="_blank">
                            <%
							if cint(rs("aytongzhidu"))=0 then
							response.Write ("<strong>"&rs("aytongzhibiao")&"</strong>")
							else
							response.Write rs("aytongzhibiao")
							end if%></A>	
                            </td>
                            <td>&nbsp;</td>
                        </tr>
						<%
                        rs.movenext 
                        if n>=rs.pagesize then exit do 
                        loop
                        zongshu=rs.RecordCount
                        else%> 
    					  <tr>
                            <td colspan="4" style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;还没有站内通知！</td>
                          </tr>
                    <%end if
                    rs.close%>
    					  <tr>
                            <td colspan="4"  style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                       		  <input name="chkAll1" type="checkbox" id="chkAll1" onClick="this.value=check1(this.form.list1)" value="checkbox">&nbsp;全选&nbsp;
                              <input type="submit" name="Submit" value=" 删除选定 " onClick="return del();" class="logindlregedit">&nbsp;
                              <input type="submit" name="Submit2" value=" 标记为已读 " onClick="return yidu();" class="logindlregedit">
                              <input type="hidden" name="isdel" id="isdel">
							  <input type="hidden" name="isyidu" id="isyidu">&nbsp;
								<%
                                link="mess?cact="
                                call pageye()
                                %>
                            </td>
                          </tr>
                    </table>
                    </form>
                    </div>

                   
            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            提示：站内通知信件保留时间为30天。
            </div>


            <!-------------------------------------- 结束 -------------------------------------->
                   
     
                   
   
            
          
            
           

        <div class="clearfix"></div>



</div>








</div>
</div>
</div>
</div>
</main>


<footer>
<div class="container">
</div>
</footer>

</body>
</html>