-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsort.php
More file actions
61 lines (60 loc) · 1.49 KB
/
sort.php
File metadata and controls
61 lines (60 loc) · 1.49 KB
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
<?php
include_once "common/include.php";
@$key = $_GET['key'] ? $_GET['key'] : 'false';
@$value = $_GET['value'] ? $_GET['value'] : 'false';
@$page = $_GET['page'] ? $_GET['page'] : 1;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name='keywords 'content='天边,个人博客,前端开发,生活感悟,web开发,blog,html,css,js,php'/>
<meta name='description' content='天边的个人博客,前端开发分享与生活交流,利用html,css,js,php等工具将想法创造成现实。'/>
<title>文章分类--天边的博客</title>
<link rel="stylesheet" href="/blog/index.css" />
<link rel="stylesheet" href="/blog/common/blog.css" />
<style>
div#content{
display: block;
}
div#show_article{
margin-left: 40px;
}
div#classify h3{
font-weight: 500;
font-size: 16px;
}
a.content{
width: auto;
}
p#tips{
text-align:center;
font-size:18px;
font-weight: 600;
background-color: #fff;
padding: 20px;
border-radius: 6px;
box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
</style>
</head>
<body>
<div id="container">
<div id="content">
<?php
show_classify(1);
?>
<div id="show_article">
<?php
$query = "select * from article where {$key} like '%{$value}%' order by pub_time desc";
$sub_query = "key={$key}&value={$value}";
if ($key !== "false" && $value !== "false") {
echo "<p id='header' ><span style='color:#ff5e53'>{$value}</span> 分类的查询结果:</p>";
}
show_article_list($query, $page, $sub_query);
?>
</div>
</div>
</div>
</body>
</html>