-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathassistant.php
168 lines (152 loc) · 5.75 KB
/
assistant.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
<?php session_start(); ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="GaryHsu">
<!--<link rel="stylesheet" href="assets/css/main.css" /> -->
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
<title>待處理公文</title>
<!-- Bootstrap core CSS -->
<link href="../../../../dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="navbar-top-fixed.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="">公文回報系統</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="assistant.php">顯示全部</a>
</li>
<li class="nav-item">
<a class="nav-link" href="assis_add_job.php">新增公文</a>
</li>
</ul>
</div>
</nav>
<!-- <main role="main" class="container">
<div class="jumbotron">
<h1>Navbar example</h1>
<p class="lead">This example is a quick exercise to illustrate how fixed to top navbar works. As you scroll, it will remain fixed to the top of your browser's viewport.</p>
<a class="btn btn-lg btn-primary" href="../../components/navbar/" role="button">View navbar docs »</a>
</div>
</main> -->
<div id="wrapper" style="margin-top: 60px;">
<?php
if($_SESSION['username'] != null){
echo " 歡迎您 ".$_SESSION['username'].' <a href="logout.php">登出</a>';
}
else{
echo "<script>alert('who are you!?'); location.href = 'index.html';</script>";
// header("Refresh:0;url=index.html");
}
?>
<?php
include("mysql.php");
mysqli_query($my_db,"SET NAMES 'utf8'");
$sql = "SELECT * FROM document ORDER BY id DESC ";
$result = mysqli_query($my_db,$sql);
$num = mysqli_num_rows($result);
?>
<br />
<div class="col-12 ">
<div>
<table class="table table-bordered table-sm">
<thead class="thead-dark table-hover">
<tr style="text-align: center;">
<th>發文單位</th>
<th>發文字號</th>
<th>對象姓名</th>
<th>文件時間</th>
<th>截止日期</th>
<th>回覆日期</th>
<th>是否結案</th>
<th>發文檔案</th>
<th>回覆檔案</th>
<th>是否開會</th>
<th>備註</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
for ($i=1; $i <=$num ; $i++) {
$rs = mysqli_fetch_array($result);
if($rs[8]==1){
$rs[8]="是";
}else{
$rs[8]="否";
}
?>
<tr>
<td style="text-align: center;">
<?php echo $rs[2] ; ?>
</td>
<td style="text-align: center;">
<input type="hidden" name="title" value="<?php echo $rs[3] ; ?>"/>
<?php echo $rs[3] ; ?>
</td>
<td style="text-align: center;">
<?php echo $rs[4] ; ?>
</td>
<td style="text-align: center;">
<?php echo $rs[5] ; ?>
</td>
<td style="text-align: center;">
<?php echo $rs[6] ; ?>
</td>
<td style="text-align: center;">
<?php echo $rs[7] ; ?>
</td>
<td style="text-align: center;">
<?php echo $rs[8] ; ?>
</td>
<td style="text-align: center;">
<a href="<?php echo $rs[9]; ?>" target="_blank" title="文件檔案">
<img src="images/link_logo.png" style="width: 25px;"/>
</a>
</td>
<?php if(!empty($rs[10])){ ?>
<td style="text-align: center;">
<a href="<?php echo $rs[10]; ?>" target="_blank" title="文件檔案">
<img src="images/link_logo.png" style="width: 25px;"/>
</a>
</td>
<?php }else{ ?>
<td style="text-align: center;">無</td>
<?php } ?>
<td style="text-align: center;">
<?php echo $rs[11] ; ?>
</td>
<td style="text-align: center;">
<?php echo $rs[12] ; ?>
</td>
<form action="assis_change.php" method="POST">
<td style="text-align: center;">
<input type="hidden" name="title" value="<?php echo $rs[3] ; ?>"/>
<input type="submit" value="修改" style="background-color:white;"/>
</td>
</form>
</tr>
</tbody>
<?php
}
?>
</table>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
</body>
</html>