-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.php
174 lines (161 loc) · 6.17 KB
/
report.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
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>
<?php session_start(); include("conn.php");?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/amazeui.min.css">
<link rel="stylesheet" href="css/admin.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body style="overflow:auto;">
<div class="am-cf admin-main">
<!-- content start -->
<div class="admin-content">
<div class="admin-content-body">
<div class="am-cf am-padding am-padding-bottom-0">
<div class="am-fl am-cf">
<strong class="am-text-primary am-text-lg"> </strong><small>
<i class="icon-home"></i> > 首页 > 业绩报告管理</small>
</div>
</div>
<hr>
<div class="container">
<div class="am-g">
<div class="am-u-sm-12 am-u-md-6">
<div class="am-btn-toolbar">
<div class="am-btn-group am-btn-group-xs">
<button type="button" class="am-btn am-btn-default btnAdd">
<span class="icon-plus"></span> 新增
</button>
</div>
</div>
</div>
<?php if($_SESSION['priority']<3){ ?>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<div class="" >
<div class="" style="position: absolute;right: 110px;" >
<input id="职工姓名" placeholder="请输入职工姓名" type="text" name="职工姓名" style="height: 21.4px">
<input type="hidden" name="flag" value="1" />
<input name="submit" type="submit" value="搜索" style="margin-left: -5px;" />
</div>
</div>
</form>
<?php } ?>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<div class="" >
<div class="" style="position: absolute;right:30px;" >
<input id="职工姓名" placeholder="请输入职工姓名" type="hidden" name="职工姓名" style="height: 21.4px;">
<input type="hidden" name="flag" value="1" /><input name="submit" type="submit" value="显示全部" style="margin-left: -5px;" />
</div>
</div>
</form>
</div>
<div class="am-g" style="margin-top: -30px;">
<div class="am-u-sm-12">
<form class="am-form">
<table class="am-table am-table-striped am-table-hover table-main">
<thead>
<tr>
<th class="" width="50px;">
<input id="chkAll" type="checkbox">
</th>
<th class="table-id" style="width: 80px;">
ID
</th>
<th class="" style="width: 120px">
姓名
</th>
<th class="" style="width: 120px">
所在部门
</th>
<th class="" style="width: 120px">
日期
</th>
<th class="" style="width: 160px">
业绩报告
</th>
<th class="table-set">
操作
</th>
</tr>
</thead>
<?php
if(isset($_POST["flag"]))
{
if( $_SESSION['priority']==3){
$s = $_SESSION['id'];
$sqlstr ="select 业绩报告.id,姓名,部门名称,提交时间,内容 from 业绩报告,职工,部门 where 业绩报告.职工编号=职工.职工编号 and 职工.部门编号=部门.部门编号 and 职工.职工编号 = '$s' ";
$result = mysqli_query($conn,$sqlstr);
while ($rows = mysqli_fetch_row($result)){
echo "<tr>";
echo "<td><input name='chks' value='27' type='checkbox'></td>";
for($i = 0; $i < count($rows); $i++){
echo "<td height='25' align='left'>".$rows[$i]."</td>";
}
echo "<td>
<div class='am-btn-toolbar'>
<div class='am-btn-group am-btn-group-xs'><button type='button' id='depart_26' class='am-btn am-btn-default am-btn-xs am-text-secondary btnedit'><span class='am-icon-pencil-square-o'></span> 编辑</button><button type='button' class='am-btn am-btn-default am-btn-xs am-text-danger amt-hide-sm-only' onclick='''><span class='am-icon-trash-o'></span> </span><a href = 'deletePart.php?id= ".$rows[0]." ' >删除</a></button></div>
</div>
</td>";
echo "</tr>";
} }
else{
$sqlstr ="select 业绩报告.id,姓名,部门名称,提交时间,内容 from 业绩报告,职工,部门 where 业绩报告.职工编号=职工.职工编号 and 职工.部门编号=部门.部门编号 and 姓名 like '%".$_POST['职工姓名']."%' ";
$result = mysqli_query($conn,$sqlstr);
while ($rows = mysqli_fetch_row($result)){
echo "<tr>";
echo "<td><input name='chks' value='27' type='checkbox'></td>";
for($i = 0; $i < count($rows); $i++){
echo "<td height='25' align='left'>".$rows[$i]."</td>";
}
echo "<td>
<div class='am-btn-toolbar'>
<div class='am-btn-group am-btn-group-xs'><button type='button' id='depart_26' class='am-btn am-btn-default am-btn-xs am-text-secondary btnedit'><span class='am-icon-pencil-square-o'></span> 编辑</button><button type='button' class='am-btn am-btn-default am-btn-xs am-text-danger amt-hide-sm-only' onclick='''><span class='am-icon-trash-o'></span> </span><a href = 'deleteReport.php?id= ".$rows[0]." ' >删除</a></button></div>
</div>
</td>";
echo "</tr>";
}
}
}
?>
</table>
</form>
</div>
</div>
</div>
</div>
<!-- content end -->
</div>
</div>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="js/jquery-1.11.3.min.js"></script>
<!--<![endif]-->
<script type="text/javascript" src="myplugs/js/plugs.js"></script>
<script>
$(function() {
$(".btnedit").click(function() {
$.jq_Panel({
title: "修改业绩报告",
iframeWidth: 500,
iframeHeight: 350,
url: "alterReport.html"
});
});
$(".btnAdd").click(function() {
$.jq_Panel({
title: "添加业绩报告",
iframeWidth: 500,
iframeHeight: 300,
url: "addReport.html"
});
});
});
</script>
</body>
</html>