-
Notifications
You must be signed in to change notification settings - Fork 3
/
offer.php
138 lines (107 loc) · 3.97 KB
/
offer.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
<?php
include 'connection.php';
include 'Vars.php';
include 'common/shopName.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php
include 'common/head.php';
?>
<link rel="stylesheet" type="text/css" href="Style/category.css">
<style type="text/css">
</style>
</head>
<body>
<?php
include 'common/header.php';
?>
<section id="main-content">
<div class="jumbotron">
<div class="container text-center">
<h1 class="display-2"> Offers </h1>
<strong><h4 class="mark"> Pay Less , Buy More. </h4></strong>
</div>
</div>
<?php
$res = $con->query("SELECT * FROM `offer` WHERE owner = ".$_SESSION['id']." ORDER BY id ;");
$htm = "";
if($res==null){
$rows = 0;
}else{
$row = $res->num_rows+1;
$rows = floor($row/3);
}
// Don't know why it was maybe used ????
// $res->fetch_assoc();
while ($rows--) {
$htm .= '<div class="row" > ';
while ($X = $res->fetch_assoc()) {
$htm .= '<div class="col-sm-4 offer_column" style=""> ';
$a=$X['pic_loc'] ;
$b = "background: url('$a')";
$htm .= '<div class="row pic" style=" '.$b.'; background-repeat: no-repeat; background-position: center; background-size: 100% 100%;height : 200px; max-width : 300px; margin: auto;"></div> ';
$htm .= '<div class="row title" style=" max-width : 300px; margin: auto;"></div> ';
$htm .= '<div class="row title half" style=" max-width : 300px; margin: auto;"> '.$X['name'].' </div> ';
$htm .= '<div class="row txt" style=" max-width : 300px; margin: auto;"> '.$X['details']."<br>".'Duration :- '.$X['duration'].'</div> ';
$htm .= '</div> ';
}
$htm .= '</div>';
echo $htm;
$htm = "";
}
?>
<?php
/*
<div class="row" >
<div class="col-sm-4 offer_column" style="">
<div class="col-sm-12 pic" style="background: url('Image/User/1.jpg'); background-repeat: no-repeat; background-position: center; background-size: 100% 100%;"></div>
<div class="col-sm-12 title"></div>
<div class="col-sm-12 title half"> title 1 </div>
<div class="col-sm-12 txt"> text 1</div>
</div>
<div class="col-sm-4 offer_column">
<div class="col-sm-12 pic" style="background: url('Image/User/1.jpg'); background-position: center;background-repeat: no-repeat; background-size: 100% 100%;"></div>
<div class="col-sm-12 title" ></div>
<div class="col-sm-12 title half" ><center>title 2</center></div>
<div class="col-sm-12 txt"> text 2</div>
</div>
<div class="col-sm-4 offer_column">
<div class="col-sm-12 pic" style="background: url('Image/User/1.jpg'); background-position: center;background-repeat: no-repeat; background-size: 100% 100%;"></div>
<div class="col-sm-12 title"></div>
<div class="col-sm-12 title half"> title 3 </div>
<div class="col-sm-12 txt"> text 3</div>
</div>
</div>
*/
?>
</section>
<?php
include 'common/footer.php';
?>
<script src="Javascript/category.js"></script>
<script type="text/javascript">
$(document).ready(function () {
/*
$(".Image").hover(function(){
$(this).children(".Label").slideDown(1000);
} ,
function(){
$(this).children(".Label").slideUp(2000);
}
);
*/
var x =screen.width;
if (x>=768) {
$(".offer_column").hover(function(){
//console.log("ji");
$(this).children(".title").slideDown(500);
},function(){
$(this).children(".title").slideUp(2000);
});
}
});
</script>
</body>
</html>