-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
122 lines (122 loc) · 5.75 KB
/
index.php
File metadata and controls
122 lines (122 loc) · 5.75 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
<!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">
</head>
<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="./show.php">查看意见</a>
</h3>
</nav>
<div id="middle" class = "row">
<div class = "col-md-2"></div>
<div class = "col-md-8">
<div class = "panel panel-default">
<div class = "panel-heading">
<h3 class = "panel-title">产品改进意见</h3>
</div>
<div class = "panel-body">
<form role = "form" id = "form1" method = "POST">
<div class = "input-group">
<span class = "input-group-addon">*姓名:</span>
<select id="username" name = "username" class = "form-control">
<?php
$db = new PDO('sqlite:feedback.db');
$sql = "select name from employee order by name asc";
$rs = $db->query($sql);
while($row = $rs->fetch()){
if($row[0]==$_COOKIE["username"]){
echo '<option selected>'.$row[0].'</option>';
}else{
echo '<option>'.$row[0].'</option>';
}
}
?>
</select>
</div>
<div class = "input-group">
<span class = "input-group-addon">*产品:</span>
<select id="product" name = "product" class = "form-control">
<?php
$sql = "select distinct(name) from product";
$rs = $db->query($sql);
while($row = $rs->fetch()){
if($row[0]==$_COOKIE["product"]){
echo '<option selected>'.$row[0].'</option>';
}else{
echo '<option>'.$row[0].'</option>';
}
}
?>
</select>
</div>
<div class = "input-group">
<span class = "input-group-addon">*平台:</span>
<select id="platform" name = "platform" class = "form-control">
<option></option>
</select>
</div>
<div class = "input-group">
<span class = "input-group-addon">*版本:</span>
<select id="version" name = "version" class = "form-control">
<option></option>
</select>
</div>
<div class = "input-group">
<span class = "input-group-addon"> 渠道:</span>
<select id="channel" name = "channel" class = "form-control">
<option></option>
</select>
</div>
<div class = "input-group">
<label>反馈内容</label>
<textarea id="content" name = "content" class = "form-control" rows = "10"></textarea>
</div>
<input type="hidden" id="time" name="time" />
<input type="hidden" name="tag" value="record">
<button type = "submit" class = "btn btn-info pull-right">提 交</button>
</form>
</div>
</div>
</div>
<div class = "col-md-2"></div>
</div>
<div id="footer" class = "row navbar-fixed-bottom">
<h6 class="text-center">
For a better product!
Air Bay Creative Limited
Copyright 2014,for internal use only
</h6>
</div>
<!--modal start-->
<div id = "myModal" class = "modal fade">
<div class = "modal-dialog">
<div class = "modal-content">
<div class = "modal-header">
<button type = "button" class = "close" data-dismiss = "modal">
<span aria-hidden = "true">×</span><span class = "sr-only">Close</span>
</button>
<h4 class = "modal-title">温馨提示</h4>
</div>
<div class = "modal-body">
<p>提交成功</p>
</div>
<div class = "modal-footer">
<button type = "button" id="againBtn" class = "btn btn-default" data-dismiss = "modal">再来一条</button>
<button type = "button" id="toGatherBtn" class = "btn btn-primary">意见汇总</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
</div>
<script src = "Public/js/jquery-2.1.1.min.js"></script>
<script src = "Public/js/bootstrap.min.js"></script>
<script src = "Public/js/index.js"></script>
</body>
</html>