-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathallPlan.php
executable file
·168 lines (145 loc) · 5.56 KB
/
allPlan.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
$errMsg="";
try {
require_once("connectDB.php");
$sql = "SELECT * from `event` where entStatus =1 order by entNo";
$event = $pdo -> query($sql);
$event -> bindColumn('entName',$entName);
$event -> bindColumn('entNo',$entNo);
$event -> bindColumn('entPhoto',$entPhoto);
$event -> bindColumn('entSurVal',$entSurVal);
$event -> bindColumn('entHanVal',$entHanVal);
$event -> bindColumn('entPcVal',$entPcVal);
} catch (PDOException $e) {
$errMsg .= "錯誤原因" . $e->getMessage() . "<br>";
$errMsg .= "錯誤行號" . $e->getLine() . "<br>";
}
echo $errMsg;
?>
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/hbgClick.js"></script>
<script src="js/TweenMax.min.js"></script>
<link rel="Shortcut Icon" type="image/x-icon" href="images/new/favicon.png" />
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/header.css">
<link rel="stylesheet" href="css/plan.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="css/svg_style.css">
<link rel="stylesheet" href="css/allPlan.css">
<title>森存者|全部活動</title>
</head>
<body>
<!-- header -->
<?php include 'header.php';?>
<!-- header -->
<!-- beeeat -->
<?php include 'playeatbeeicon.php';?>
<!-- beeeat -->
<!-- robot -->
<?php include 'robot.php';?>
<!-- robot -->
<div class="background_head">
<img id="bg_airballoon" src="images/airballoon.png" alt="熱氣球">
<img id="bg_cloud2" src="images/Cloud1.png" alt="白雲">
<img id="bg_airballoon3" src="images/airballoon.png" alt="熱氣球">
</div>
<div class="wrap">
<div class="allPlan-header">
<div class="all-plan-title">
<img src="images/new/title_back_allPlan.png" alt="全部活動">
<h2>全部活動</h2>
</div>
<div class="explain-icons">
<div class="icons-all icons-family">
<img src="images/value_family.png" alt="親子值"><span>親子值</span>
</div>
<div class="icons-all icons-handmade">
<img src="images/value_handmade.png" alt="手作值"><span>手作值</span>
</div>
<div class="icons-all icons-survive">
<img src="images/value_survive.png" alt="求生值"><span>求生值</span>
</div>
</div>
</div>
<div class="allPlan-content">
<div class="allPlan-group">
<?php
while($event->fetch(PDO::FETCH_ASSOC)){
?>
<div class="allPlan-box">
<h2><?php echo $entName;?></h2>
<input type="hidden" value="<?php echo $entNo;?>" class="eventNo" name="eventNo">
<div class="allPlan-pic">
<img src="images/plan/<?php echo $entPhoto;?>" alt="刀具製作">
</div>
<table class="allPlan-value-table">
<tr>
<td><img src="images/value_family.png" alt="親子值"></td>
<td><?php echo $entPcVal;?></td>
<td><img src="images/value_handmade.png" alt="手作值"></td>
<td><?php echo $entHanVal;?></td>
<td><img src="images/value_survive.png" alt="求生值"></td>
<td><?php echo $entSurVal;?></td>
</tr>
</table>
</div>
<?php
}
?>
</div>
</div>
<div id="infoContainer"></div>
<a href="plan.php" id="goToPlan">立即規劃行程</a>
</div>
<script>
TweenMax.to('#bg_airballoon',30,{
right: '90%',
top: '30px',
repeat: -1,
yoyo: true,
});
TweenMax.to('#bg_cloud2',50,{
left: '1100px',
top: '1500px',
repeat: -1,
});
TweenMax.to('#bg_airballoon3',20,{
right: '70%',
top: '2600px',
repeat: -1,
yoyo: true,
});
</script>
<script>
//AJAX //點選活動顯示活動介紹燈箱
$('.allPlan-content .allPlan-box').click(function(e){
console.log($(this).find('input').val());
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', (e) => {
if (xhr.status == 200){
$('#infoContainer').show();
document.getElementById('infoContainer').innerHTML = xhr.responseText;
// console.log(xhr.responseText);
$('#Lightbox2_close').click(function(){
$('#infoContainer').hide();
});
}else{
alert(xhr.status);
}
});
xhr.open("GET", "plan_eventPop.php?entNo="+ $(this).find('input').val(), true);
xhr.send(null);
});
</script>
<!-- footer -->
<?php include 'footer.php';?>
<!-- footer -->
<script src="js/sessionPage.js"></script>
</body>
</html>