<?php
error_reporting(0); 
include("../../config/wap.php");
session_start();
if(!isset($_SESSION['username'])){echo "<script>alert('请重新登录!')</script><script>top.location.href='/m$dshz'</script>";exit;}
$username=$_SESSION['username'];
$type="where name='$username'";
$user=queryall(user,$type);
$userid=$user['userid'];
if(!$user){echo "<script>alert('请重新登录!')</script><script>top.location.href='/m$dshz'</script>";exit;}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title>个人通知</title>
<link href="/2019newui/m/css/common.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/2019newui/js/jquery.min.js"></script>
<link href="/layui/css/m.css" rel="stylesheet"/>
</head>
<body>
<header class="aui-navBar aui-navBar-fixed">
<a href="javascript:;"  onclick="window.history.back(-1);" class="aui-navBar-item"><i class="icon layui-icon" style="font-size: 20px;">&#xF060;</i></a>
<div class="aui-center"><span class="aui-center-title">个人通知</span></div>
</header>
<div class="divHeight"></div>
<ul class="notify">
<?php
$pp=mysql_query("SELECT * FROM gonggao   where  userid='$userid'");
$bs=mysql_num_rows($pp);
?>
<?php if($bs==null){?><li><center>暂无公告</center></li><?php }?>
<?php
$query = mysql_query("SELECT * FROM gonggao  where  userid='$userid'");
while($ab = mysql_fetch_array($query)) {
?>  
<?php if($ab[tz]=='未读'){?>
<li><a href="/mshow_<?php echo $ab[id]?><?php echo $dshz?>" style='color:#f00;' ><span><?php echo  date("Y-m-d",strtotime($ab[shijian]))?></span><i class="icon-13"></i><p>[ 未读 ]<?php echo $ab[biaoti]?></p></a></li>
<?php }else{?>
<li><a href="/mshow_<?php echo $ab[id]?><?php echo $dshz?>" style='color:#999;' ><span><?php echo  date("Y-m-d",strtotime($ab[shijian]))?></span><i class="icon-13"></i><p>[ 已读 ]<?php echo $ab[biaoti]?></p></a></li>
<?php } ?>
<?php } ?>
</ul>
<footer class="aui-footer aui-footer-fixed">
<a href="/mmain<?php echo $dshz?>" class="aui-tabBar-item"><i class="icon layui-icon" style="font-size: 30px;">&#xF015;</i><span class="aui-tabBar-item-text">首页</span></a>
<a href="/mdingdan<?php echo $dshz?>" class="aui-tabBar-item"><i class="icon layui-icon" style="font-size: 30px;">&#xF123;</i><span class="aui-tabBar-item-text">订单</span></a>
<a href="/muser<?php echo $dshz?>" class="aui-tabBar-item"><i class="icon layui-icon" style="font-size: 30px;">&#xF007;</i><span class="aui-tabBar-item-text">我的</span></a>
</footer>
</body>
</html>