-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevelop_member.php
More file actions
174 lines (125 loc) · 5.19 KB
/
Copy pathdevelop_member.php
File metadata and controls
174 lines (125 loc) · 5.19 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
173
174
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?php session_start(); ?>
<html>
<head>
<title></title>
<link rel="stylesheet" href="./fonts/font-awesome/css/font-awesome.min.css">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="./css/bootstrap.css" rel="stylesheet">
<link href="./css/bootstrap-treeview.css" rel="stylesheet">
<!-- Required Javascript -->
<script src="./js/jquery-3.1.1.js"></script>
<script src="./js/bootstrap-treeview.min.js"></script>
<style type="text/css">
#content {
float: center;
margin-left: 20px;
margin-right: 20px;
}
table {
border-collapse: separate;
*border-collapse: collapse; /* IE7 and lower */
border-spacing: 0;
}
tbody tr:hover {
background: linear-gradient(#fff, #ffdcb9);
}
th {
padding: 10px;
text-align: center;
background-color: #FF9999;
background: -ms-linear-gradient(top, #fff, #ffdcb9); /* IE 10 */
background: -moz-linear-gradient(top, #b8c4cb, #f6f6f8); /*火狐*/
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#b8c4cb), to(#f6f6f8)); /*谷歌*/
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ffdcb9)); /* Safari 4-5, Chrome 1-9*/
background: -webkit-linear-gradient(top, #fff, #ffdcb9); /*Safari5.1 Chrome 10+*/
background: -o-linear-gradient(top, #fff, #ffdcb9); /*Opera 11.10+*/
}
td {
text-align: center;
}
th:first-child {
border-radius: 6px 0 0 0;
}
th:last-child {
border-radius: 0 6px 0 0;
}
tr:last-child td:first-child {
border-radius: 0 0 0 6px;
}
tr:last-child td:last-child {
border-radius: 0 0 6px 0;
}
</style>
</head>
<body>
<div id="container">
<div id="content">
<h3><i class="fa fa-id-badge"></i> 发展对象</h3>
<hr>
<div class="col-md-12">
<div class="row">
<?php
$branch = isset($_GET['branch']) ? $_GET['branch'] : NULL; // 获取单位
?>
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span><a
href="person_create.php?branch=<?php echo $branch ?>&type=发展对象">新增</a>
</button>
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr>
<table class="table table-condensed" align="center">
<tr class="warning">
<th width="5%">序号</th>
<th width="10%">姓名</th>
<th width="20%">申请入党时间</th>
<th width="20%">列为积极分子时间</th>
<th width="20%">列为发展对象时间</th>
<th width="20%">备注</th>
</tr>
<?php
if (isset($_SESSION['username'])) {
$username = $_SESSION['username'];
} else {
echo "<script>alert('先登陆。。。!');location.href='index.php';</script>";
}
$branch = isset($_GET['branch']) ? $_GET['branch'] : NULL; // 获取单位
require_once 'db_login.php';
$conn = new mysqli($db_hostname, $db_username, $db_password, $db_database);
if ($conn->connect_error) die($conn->connect_error);
mysqli_set_charset($conn, 'utf8');
if ($branch == '中心') {
$query = "select * FROM person WHERE `type` = '发展对象'";
} else {
$query = "select * FROM person WHERE `branch` = '" . $branch . "' AND `type` = '发展对象'";
}
$result = $conn->query($query);
if (!$result) die($conn->connect_error);
$index = 1;
while ($rows = $result->fetch_array()) {
echo <<<TABLE
<tr>
<td>$index</td>
<td><a href = "person_detail.php?name={$rows['name']}&type=发展对象&branch={$branch}">{$rows['name']}</a></td>
<td>{$rows['applicationTime']}</td>
<td>{$rows['activistTime']}</td>
<td>{$rows['developmentTime']}</td>
<td>{$rows['remark']}</td>
</tr>
TABLE;
$index++;
}
$result->close();
$conn->close();
// echo $branch;
?>
</table>
</div>
</div>
</div>
</div>
</body>
</html>