-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnews.php
115 lines (104 loc) · 4.59 KB
/
news.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
$runtime_start = microtime(true);
require_once("include/conn.php");
if (isset($_GET["newsid"])){
$newsid = $_GET['newsid'];
}
else{
header('Location:index.php');
}
$sql="SELECT * FROM dm_news WHERE newsid = '{$newsid}'";
$re = $db ->query($sql);
$res = $re ->fetch_assoc();
$sql1="SELECT * FROM dm_user WHERE uid ='{$res['uid']}'";
$u = $db -> query($sql1);
$ue = $u -> fetch_assoc();
$db -> close();
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title><?php echo $res["tittle"],"动漫资讯-动漫新闻"; ?></title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Custom styles for this template -->
<link href="css/carousel.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<!-- NAVBAR
================================================== -->
<body id="main">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">动漫新闻</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="table.php?type=1">动漫资讯</a></li>
<li class="active"><a href="table.php?type=2">小说资讯</a></li>
<li class="active"><a href="table.php?type=3">游戏资讯</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">后台管理 <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="login.php">登陆</a></li>
<li><a href="singin.php">注册</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</div>
<main>
<div class="container">
<div class="adjoined-bottom">
<div><h2><?php echo $res["tittle"] ?> </h2></div>
<div><h3>发布时间:<? echo $res['time']; ?> 发布者:<? echo $ue['username'] ?> 新闻类型:<? echo $res['source'] ?></h3></div>
<div class="grid-container">
<?php echo html_entity_decode($res["text"]); $runtime_stop = microtime(true);?>
</div>
</div>
</main>
<footer>
<div class="container">
<p class="pull-right"><a href="#">返回顶部</a></p>
<p>© <a href="index.php">动漫新闻</a> 2016 Powered by dm_miemie</p>
<p>打开本网页耗时:<?php echo round($runtime_stop-$runtime_start,6); ?>s · 陈立制作 · <a href="mailto:[email protected]">Email联系:[email protected]</a></p>
</div>
</footer>
</div><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
<script src="js/holder.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>