-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow.php
More file actions
172 lines (172 loc) · 8.08 KB
/
show.php
File metadata and controls
172 lines (172 loc) · 8.08 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>bp 0.1, all for better product!</title>
<link rel="stylesheet" href="Public/css/bootstrap.min.css">
<link rel="stylesheet" href="Public/css/index.css">
<link href="Public/css/jquery-ui.min.css" rel="stylesheet">
</head>
<?php
$db = new PDO('sqlite:feedback.db');
$sql = "select * from feedbacks order by dateTime desc";
$rs_arr = $db->query($sql)->fetchAll();
?>
<body>
<div class="container-fluid">
<nav id="header" class="navbar navbar-default navbar-fixed-top" role="navigation">
<h3 class="text-center">BP系统:Better Product
<a href="./index.php">提意见</a>
</h3>
</nav>
<div id="middle" class = "row">
<div class = "col-md-2"></div>
<div class = "col-md-8">
<form id="form2" method="POST" class="form-horizontal" role="form">
<table class="table table-bordered">
<tr>
<th colspan="2">条件查询</th>
</tr>
<tr>
<td>
<div class="input-group">
<span class="input-group-addon">起始日期:</span>
<input name="startDate" class="datepicker form-control" type="text">
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon">结束日期:</span>
<input name="endDate" class="datepicker form-control" type="text">
</div>
</td>
</tr>
<tr>
<td>
<div class="input-group">
<span class="input-group-addon">姓名:</span>
<select name = "username" class="form-control">
<option></option>
<?php
$sql = "select name from employee order by name asc";
$rs = $db->query($sql);
while($row = $rs->fetch()){
echo '<option>'.$row[0].'</option>';
}
?>
</select>
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon">产品:</span>
<select id="product" class="form-control" name = "product" >
<option></option>
<?php
$sql = "select distinct(name) from product";
$rs = $db->query($sql);
while($row = $rs->fetch()){
echo '<option>'.$row[0].'</option>';
}
?>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="input-group">
<span class="input-group-addon">平台:</span>
<select id="platform" class="form-control" name = "platform" >
</select>
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon">版本:</span>
<select id="version" class="form-control" name = "version" >
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="input-group">
<span class="input-group-addon">渠道:</span>
<select id="channel" class="form-control" name = "channel" >
</select>
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon">状态:</span>
<select id="isKilled" class="form-control" name = "isKilled" >
<option></option>
<option value="0">未修复</option>
<option value="1">已修复</option>
</select>
</div>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="hidden" name="tag" value="query" class="btn btn-success">
<input type="submit" class="btn btn-success" value="点 击 查 询">
</td>
</tr>
</table>
</form>
<table id="gather" class="table table-striped table-bordered">
<col style="width: 11%;">
<col style="width: 6%;">
<col style="width: 10%;">
<col style="width: 7%;">
<col style="width: 6%;">
<col style="width: 11%;">
<col style="width: 6%;">
<tr>
<th>日期</th>
<th>姓名</th>
<th>产品名称</th>
<th>平台</th>
<th>版本</th>
<th>渠道</th>
<th>是否修复</th>
</tr>
<?php
foreach ($rs_arr as $row)
{
$abc ='<td>'.$row["dateTime"].'</td>';
$abc .='<td>'.$row["username"].'</td>';
$abc .='<td>'.$row["product"].'</td>';
$abc .='<td>'.$row["platform"].'</td>';
$abc .='<td>'.$row["version"].'</td>';
$abc .='<td>'.$row["channel"].'</td>';
if($row["isKilled"]){
$str = '<tr class="dataRow success">';
$str .= $abc;
$str .='<td>已修复</td>';
}else{
$str = '<tr class="dataRow info">';
$str .= $abc;
$str .='<td>未修复</td>';
}
$str .= '</tr>';
$str .='<tr class="dataRow"><td colspan="7">'.$row["content"].'</td></tr>';
echo $str;
}
?>
</table>
</div>
<div class = "col-md-2"></div>
</div>
<div id="footer" class = "row navbar-static-bottom">
<h6 class="text-center">For a better product! Air Bay Creative Limited Copyright 2014,for internal use only</h6>
</div>
</div>
<script src="Public/js/jquery-2.1.1.min.js"></script>
<script src="Public/js/jquery-ui.min.js"></script>
<script src="Public/js/bootstrap.min.js"></script>
<script src="Public/js/show.js"></script>
</body>
</html>