-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewServices.php
148 lines (112 loc) · 4.25 KB
/
viewServices.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
<?php require "dbConnect.php"?>
<?php
parse_str($_SERVER['QUERY_STRING']);
$sql="SELECT * FROM services where id = ".$id.";";
$result= $conn->query($sql);
$updateSql="Update services set noOfClicks=noOfClicks+1 where id = ".$id.";";
$updateResult= $conn->query($updateSql);
$cookie_name="lastVistedsites";
$cookie_value=$id;
if(isset($_COOKIE[$cookie_name])){
setcookie($cookie_name, $cookie_value.';'.$_COOKIE[$cookie_name], time()+31556926,"/");
}
else{
setcookie($cookie_name, $cookie_value, time()+ 31556926,"/");
}
?>
<!DOCTYPE html>
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* Tabs*/
section {
padding: 60px 0;
height:500px;
}
section .section-title {
text-align: center;
color: #AEC6CF;
margin-bottom: 10px;
}
#tabs{
background: #AEC6CF;
color: #000000;
}
#tabs h6.section-title{
color: #000000;
}
#tabs .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
color: #000000;
background-color: transparent;
border-color: transparent transparent #000000;
border-bottom: 4px solid !important;
font-size: 60px;
font-weight: bold;
}
#tabs .nav-tabs .nav-link {
border: 1px solid transparent;
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
color: #000000;
font-size: 20px;
}
</style>
</head>
<body>
<img src="http://terrylinda1379278.ipage.com/TutorMe/Img/header.png" alt="Simply Easy Learning" >
<!-- Tabs -->
<section id="tabs">
<div class="container">
<h6 class="section-title h1">TutorMe</h6>
<div class="row">
<div class="col-xs-12 ">
<nav>
<div class="nav nav-tabs nav-fill" id="nav-tab" role="tablist">
<a class="nav-item nav-link " id="nav-home-tab" href="home.php" role="tab" aria-controls="nav-home" aria-selected="true">Home</a>
<a class="nav-item nav-link" id="nav-about-tab" href="about.php" role="tab" aria-controls="nav-about" aria-selected="false">About</a>
<a class="nav-item nav-link active" id="nav-services-tab" href="services.php" role="tab" aria-controls="nav-services" aria-selected="false">Services</a>
<a class="nav-item nav-link" id="nav-news-tab" href="news.php" role="tab" aria-controls="nav-news" aria-selected="false">News</a>
<a class="nav-item nav-link" id="nav-contacts-tab" href="login.php" role="tab" aria-controls="nav-contacts" aria-selected="false">Contacts</a>
<a class="nav-item nav-link" id="nav-users-tab" href="users.php" role="tab" aria-controls="nav-users" aria-selected="false">Users</a>
</div>
</nav>
<div class="test" id="test">
<div class="tab-pane fade show active" id="nav-services" role="tab" aria-labelledby="nav-services-tab">
<?php
$data = array(1,2,3,4,5);
while ($row = $result->fetch_assoc()) {
$data[0]=$row["id"];
$data[1]=$row["service_name"];
$data[2]=$row["price"];
$data[3]=$row["description"];
$data[4]=$row["image"];
}
echo '<div style="clear: both">
<h3 style="float: left">'.$data[1].'---></h5>
<h3 style="float: right">'.$data[2].'$</h3>
</div><br><br>';
$img = 'http://terrylinda1379278.ipage.com/TutorMe/Img/'.$data[4];
echo '<div style="clear: both">
<h6 style="float: left">'.$data[3].'</h6>
<img src="'.$img.'" alt="Girl in a jacket">
</div><br><br>';
?>
</div>
</div>
</div>
</div>
</div>
</section>
<img src="http://terrylinda1379278.ipage.com/TutorMe/Img/footer.png" alt="Simply Easy Learning" >
<!-- ./Tabs -->
</body>
</html>