-
Notifications
You must be signed in to change notification settings - Fork 1
/
lab1.php
127 lines (107 loc) · 3.04 KB
/
lab1.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
<?php
include("php/baseup.php");
?>
<head>
<link href="css/background.css" rel="stylesheet">
</head>
<body id = "top">
<div class="main">
<h1>LABS</h1>
<div class="container">
<?php
include("php/connectece.php");
$id = 1;
$sql = "SELECT * FROM labs WHERE Id = $id";
$query = mysql_query($sql);
$data = mysql_fetch_array($query);
?>
<div class ="col-sm-3">
<ul class="nav nav-pills nav-stacked" role="tablist">
<?php while($data['id'] != NULL) {
if ($data['id'] == 15) {?>
<li class = "active" ><a class = "hvr-grow" data-toggle = "tab" href="#<?php echo $data['id']?>"><?php echo $data['name'];}?></a></li>
<?php if($data['id'] > 15) {?>
<li><a class = "hvr-grow" data-toggle = "tab" href="#<?php echo $data['id']?>"><?php echo $data['name'];}?></a></li>
<?php
$id++;
$sql = "SELECT * FROM labs WHERE Id = $id";
$query = mysql_query($sql);
$data = mysql_fetch_array($query);
}
?>
</ul>
</div>
<?php
$id = 15;
$sql = "SELECT * FROM labs WHERE Id = $id";
$query = mysql_query($sql);
$data = mysql_fetch_array($query);
?>
<div class ="col-sm-7">
<div class = "tab-content">
<?php while($data['id'] != NULL) {
if ($data['id'] == 15) {?>
<div id="<?php echo $data['id']?>" class ="tab-pane fade in active" >
<h3><?php echo $data['name']?></h3>
<div class="image" style="background-image:url('<?php echo $data['image'] ?>');"></div>
<!--<img class="image" src = "<?php echo $data['image']?>">-->
<br><br>
<p class ="text-justify" > <?php echo $data['detail'] ?></p>
</div>
<?php }
if ($data['id'] > 15) { ?>
<div id="<?php echo $data['id']?>" class ="tab-pane fade">
<h3><?php echo $data['name']?></h3>
<div class="image" style="background-image:url('<?php echo $data['image'] ?>');"></div>
<br><br>
<p class ="text-justify"> <?php echo $data['detail'] ?></p>
</div>
<?php }
$id++;
$sql = "SELECT * FROM labs WHERE Id = $id";
$query = mysql_query($sql);
$data = mysql_fetch_array($query);
} ?>
</div>
</div>
</div>
<a href = "lab.php">go back</a>
</div>
<style>
.message {
padding: 2%;
margin: 2%;
border: 1px solid blue;
border-radius: 25px;
font-size: 1.2em;
}
.image {
height:300px;
width:100%;
background-repeat:no-repeat;
background-position:center center;
background-size:100% 300px;
border:2px inset black;
padding: 1%;
}
.hvr-grow {
display: inline-block;
vertical-align: middle;
transform: translateZ(0);
box-shadow: 0 0 1px rgba(3, 1, 0, 9);
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
transition-duration: 0.3s;
transition-property: transform;
}
.hvr-grow:hover,
.hvr-grow:focus,
.hvr-grow:active {
transform: scale(1.1);
}
</style>
<br>
</body>
<?php
include("php/basedown.php");
?>