<?php
require_once('connect.php');
$sql = "select * from news order by dateline desc";
$query = mysql_query($sql);
if($query&&mysql_num_rows($query)){
while($row = mysql_fetch_assoc($query)){
$date[] = $row;
}
}else{
$date = array();
}
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>百度新闻后台管理系统</title>
<link rel="stylesheet" href="css/userlogin.css" type="text/css">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<div class="wrapper">
<!-- 导航部分start -->
<nav class="navbar navbar-default ">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#jikexueyuan-nav-header" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h3>欢迎百度新闻后台管理系统</h3>
</div>
<!-- 导航栏部分start -->
<ul class="nav navbar-nav navbar-right">
<!--navbar-right 固定值 表示会出现在右边 -->
<li class="dropdown">
<a href="#">
<span class="glyphicon glyphicon-bell"></span> 管理
</a>
</li>
<li class="dropdown">
<a href="#">
<span class="glyphicon glyphicon-user"></span>站点首页
</a>
</li>
<li class="dropdown">
<a href="#">
<span class="glyphicon glyphicon-user"></span>后台首页
</a>
</li>
<li class="dropdown">
<a href="#">
<span class="glyphicon glyphicon-user"></span>退出管理
</a>
</li>
</ul>
<!-- 导航栏部分end -->
</div>
</nav>
<!-- 导航部分end -->
<!-- 表格部分start -->
<div class="main">
<div class="container-fluid">
<div class="nav-map">
<div class="btn">
<a href="addnews.html"><button class="btn btn-primary" type="button" id="btn">添加新闻</button></a>
</div>
<ol class="breadcrumb">
<li><a href="#">新闻管理>新闻列表</a></li>
</ol>
</div>
<div class="table-responsive">
<!--table-responsive为响应式表格小于768px时水平滚动。当屏幕大于 768px 宽度时,水平滚动条消失 -->
<table class="table table-bordered table-condensed" style="table-layout:fixed;word-break:break-all;">
<thead>
<tr class="success">
<th>新闻标题</th>
<th>新闻图片</th>
<th>新闻内容</th>
<th>新闻时间</th>
<th>操作</th>
</tr>
</thead>
<?php
if(!empty($date)){
foreach($date as $value){}
}
?>
<tbody>
<tr>
<td><?php echo $value['newstitle']?></td>
<td><?php echo $value['newsimg']?></td>
<td><?php echo $value['newscont']?></td>
<td><?php echo $value['newstime']?></td>
<td><a href="revise.php?id = <?php echo $value['id']?>">修改</a>/<a href="del-handle.php?id=<?php echo $value['id']?>">删除</a></td>
</tr>
<tr>
<td><?php echo $value['newstitle']?></td>
<td><?php echo $value['newsimg']?></td>
<td><?php echo $value['newscont']?></td>
<td><?php echo $value['newstime']?></td>
<td><a href="revise.php?id = <?php echo $value['id']?>">修改</a>/<a href="del-handle.php?id=<?php echo $value['id']?>">删除</a></td>
</tr>
<tr>
<td><?php echo $value['newstitle']?></td>
<td><?php echo $value['newsimg']?></td>
<td><?php echo $value['newscont']?></td>
<td><?php echo $value['newstime']?></td>
<td><a href="revise.php?id = <?php echo $value['id']?>">修改</a>/<a href="del-handle.php?id=<?php echo $value['id']?>">删除</a></td>
</tr>
<tr>
<td><?php echo $value['newstitle']?></td>
<td><?php echo $value['newsimg']?></td>
<td><?php echo $value['newscont']?></td>
<td><?php echo $value['newstime']?></td>
<td><a href="revise.php?id = <?php echo $value['id']?>">修改</a>/<a href="del-handle.php?id=<?php echo $value['id']?>">删除</a></td>
</tr>
<tr>
<td><?php echo $value['newstitle']?></td>
<td><?php echo $value['newsimg']?></td>
<td><?php echo $value['newscont']?></td>
<td><?php echo $value['newstime']?></td>
<td><a href="revise.php?id = <?php echo $value['id']?>">修改</a>/<a href="del-handle.php?id=<?php echo $value['id']?>">删除</a></td>
</tr>
<tr>
<td><?php echo $value['newstitle']?></td>
<td><?php echo $value['newsimg']?></td>
<td><?php echo $value['newscont']?></td>
<td><?php echo $value['newstime']?></td>
<td><a href="revise.php?id = <?php echo $value['id']?>">修改</a>/<a href="del-handle.php?id=<?php echo $value['id']?>">删除</a></td>
</tr>
</tbody>
</table>
</div>
公元前221
揍扁扁了
p1911780518
相关分类