-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinfohous.php
More file actions
159 lines (123 loc) · 4.69 KB
/
infohous.php
File metadata and controls
159 lines (123 loc) · 4.69 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
<meta charset="UTF-8">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/info.css">
<link rel="stylesheet" type="text/css" href="layui/css/layui.css">
<style type="text/css">
form{
margin: 0;
}
</style>
<?php
$loggedin = Auth::check(); //判斷權限等級是否為2
if($loggedin){
$mem_id=$_SESSION['mem_id'];
}
?>
<?php
$post = Search::checkhouse_id();
?>
<?php
$mysqli = Connect::conn();
$search = new Search();
$houseinfo = $search->checkhouse_id();
if(!empty($houseinfo)){
foreach ($houseinfo as $info){
$_SESSION['house_id'] = $info['house_id'];
?>
<div class="main">
<div class="main-inner body-width">
<div class="banner clearfix">
<div class="slider" id="slider">
<ul class="slider-wrapper">
<li class="item" data-title="">
<a href="#" class="pic"><img src="<?php echo $info['file1'];?>" alt="#"></a>
</li>
<li class="item" data-title="" data-author="">
<a href="#" class="pic"><img src="<?php echo $info['file2'];?>" alt="#"></a>
</li>
<li class="item" data-title="" data-author="">
<a href="#" class="pic"><img src="<?php echo $info['file3'];?>" alt="#"></a>
</li>
<li class="item" data-title="" data-author="">
<a href="#" class="pic"><img src="<?php echo $info['file4'];?>" alt="#"></a>
</li>
<li class="item" data-title="">
<a href="#" class="pic"><img src="<?php echo $info['file5'];?>" alt="#"></a>
</li>
</ul>
<a href="javascript:;" class="slider-prev"></a>
<a href="javascript:;" class="slider-next"></a>
<div class="slider-title">
<h2></h2>
<span></span>
</div>
<div class="slider-btns">
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
<span class="item"></span>
</div>
</div>
<div class="banner-info">
<div class="news body-border">
<ul>
<li class="title"><?php echo $info['housename'];?></li>
<?php
$URL='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
?>
<form name="collect" id="collect" action="<?php echo $URL;?>" method="post" class="form form--sign-up" onfocus="">
<li class="choose">
<a href="#">租金:『<?php echo $info['rental'];?>元/月』 </a>
<input type="hidden" name = "house_id" value="<?php echo $info['house_id'];?>"></input>
<input type="hidden" name = "mem_id" value="<?php echo $mem_id;?>"></input>
<?php
$checkcollect = Collect::checkcollect();
if(!empty($checkcollect)){
foreach ($checkcollect as $check){
$check_collect=$check['mem_id'];
}
if($check_collect == $mem_id){
?>
<span style="width: 45px;" class="icon-text__pink">已收藏</span>
<?php
}else{
?>
<button name="collect" type="submit" value="collect" > <span class="icon-text__pink">收藏</span></button>
<?php
}
}else{
//$limitfive = Collect::limitfive();
//if(!empty($limitfive)){
// foreach ($limitfive as $limit){
// $limitnum=$limit['limitnum '];
//}
//if($limitnum>5){
//echo '收藏已五筆';
//}else{
?>
<button name="collect" type="submit" value="collect" > <span class="icon-text__pink">收藏</span></button>
<?php
//}
}
?>
</li>
</form>
<li class="assistant">
<p><i class="layui-icon"></i> 聯絡人: <span style="text-decoration:underline;"><?php echo $info['contact'];?></span></p>
<p><i class="layui-icon"></i> 與屋主關係: <span style="text-decoration:underline;"><?php echo $info['relationship'];?></span></p>
<p><i class="layui-icon"></i> 信箱: <span style="text-decoration:underline;"><?php echo $info['email'];?></span></p>
<p><i class="layui-icon"></i> 連絡電話: <span style="text-decoration:underline;"><?php echo $info['phone'];?></span> </p>
</li>
</ul>
</div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="js/script.js"></script>