Repository navigation
Expand file tree
/
Copy pathactSign.php
More file actions
132 lines (115 loc) · 3.27 KB
/
Copy pathactSign.php
File metadata and controls
132 lines (115 loc) · 3.27 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
<?php
ob_start();
session_start();
?>
<!DOCTYPE html>
<html lang="UTF-8">
<head>
<meta charset="UTF-8">
<title>後台::查看報名</title>
<link rel="stylesheet" type="text/css" href="css/web_back_frame.css">
<!-- 不准動的部分,以下三行 -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> -->
<script src="js/jquery.min.js"></script>
<script src="js/web_back_frame/web_back_frame.js"></script>
<!-- 自己的css擺這裡 -->
<link rel="stylesheet" href="css/actSign.css">
</head>
<body>
<?php require_once('web_back_frame_top.php') ?>
<nav>
<div class="nav_item pageTitle">
<h2>查看報名</h2>
</div>
<div class="nav_item">
<div class="search">
<input type="text" name="" placeholder="搜尋">
<button><img src="src/image/web_back_frame/seaech.png"></button>
<!-- <button><img src="src/image/web_back_frame/erase.png"></button> -->
</div>
</div>
<div class="nav_item select">
<!-- <span>狀態:</span>
<select>
<option value="">不限</option>
<option value="">不限</option>
<option value="">不限</option>
</select> -->
</div>
<div class="nav_item select">
<span>分類:</span>
<select>
<option value="">訂單編號</option>
<option value="">不限</option>
<option value="">不限</option>
</select>
</div>
<div class="clearfix"></div>
</nav>
<form class="myForm">
<table cellspacing="1">
<tr>
<th>活動編號</th>
<th>活動編號</th>
<th>報名人</th>
<th>信箱</th>
<th>電話</th>
<th>報名數量</th>
</tr>
<?php try {
require_once("php/connectBeck.php");
$sql = "select * from actSign";
//共有幾筆資料
$sql = "select count(*) from actSign";
$result = $pdo->query($sql);
$result->bindColumn(1,$totalRecord);
$result->fetch();
//每頁有幾筆
$recPerPage = 7;
//共有幾頁
$totalPage = ceil($totalRecord/$recPerPage);
//設定好要開始抓取的位置
if(isset($_GET["pageNo"])==false)
$pageNo=1;
else
$pageNo=$_GET["pageNo"];
$start = ($pageNo-1) * $recPerPage;
$sql = "select * from actSign order by actSign_no limit $start,$recPerPage";
$products = $pdo->query($sql);
$orderItem = $pdo->query($sql);
while( $resultset = $orderItem ->fetchObject() ){
?>
<tr class="tdRow">
<td><?php echo $resultset->actSign_no ;?></td>
<td><?php echo $resultset->act_no ;?></td>
<td><?php echo $resultset->actSign_name ;?></td>
<td><?php echo $resultset->actSign_mail ;?></td>
<td><?php echo $resultset->actSign_tel ;?></td>
<td><?php echo $resultset->actSign_qty ;?></td>
</tr>
<?php
}
}
catch (PDOException $e) {
echo "錯誤原因 : " , $e->getMessage(),"<br>";
echo "行號 : " , $e->getLine(),"<br>";
}
?>
</table>
</form>
<div style="display:compact;text-align:center" class="pages">
<?php
//印可連結的頁數資料
echo "<a href='?pageNo=1'>第一頁</a> ";
for($i=1; $i <= $totalPage;$i++){
if($i==$pageNo)
echo "<a href='?pageNo=$i' style='color:#F29600;border-bottom:1px solid #F29600;'>",$i,"</a>  ";
else
echo "<a href='?pageNo=$i'>",$i,"</a>  ";
}
echo "<a href='?pageNo=$totalPage'>最末頁</a> ";
?>
</div>
<?php require_once('web_back_frame_bottom.php') ?>
</body>
</html>