-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
104 lines (91 loc) · 2.69 KB
/
single.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
<?php
require "header.php";
$single = get_single_id($_GET["ID"]);
$seeds = get_seeds();
$beds = get_sectors();
?>
<article>
<div class="main_content_seeds">
<div class="container">
<hr>
<div class="title_single">
<h1>теплица "<span><?=$single["Name"]?></span>"</h1>
</div>
<hr>
<div class="greenhouse_main">
<div class="seeds">
<div class="seeds_title">
<h3>Семена</h3>
</div>
<div class="seeds_menu" id="scroll">
<?php
$mas = array();
$img = array();
$i=0; $j=0;
foreach ($seeds as $seed):?>
<div class="package_seeds" id="bed" data-num="<?=$i?>">
<div class="name_package" >
<p><?= $seed["Name"] ?></p>
</div>
<div class="img_package">
<p class="time_package" >Время выращивания:</p><h3><?= $seed["GrowingTime"];?>сек</h3>
</div>
</div>
<?php
$img[$j] = $seed["image"];
$mas[$i] = $seed["GrowingTime"];
$i++; $j++;
endforeach;
$json = json_encode($mas);
$image = json_encode($img);
?>
<script type="text/javascript">
var img = JSON.parse('<?php echo $image?>');
var GrowingTime = JSON.parse('<?php echo $json?>');
</script>
</div>
</div>
<div class="sectros">
<div class="img_dom"></div>
<div class="beds">
<div class="graydka">
<div class="germs_time1" data-timeNum="1"></div>
<div class="beds_item">
<div class="germs">
<div class="germs_item1"><h3 class="active">
1</h3>
</div>
</div>
<img src="img/gryadka.png" alt="">
</div>
</div>
<div class="graydka">
<div class="germs_time2" data-timeNum="2"></div>
<div class="beds_item">
<div class="germs">
<div class="germs_item2"><h3 class="active">2</h3>
</div>
</div>
<img src="img/gryadka.png" alt="">
</div>
</div>
<div class="graydka">
<div class="germs_time3" data-timeNum="3"></div>
<div class="beds_item">
<div class="germs">
<div class="germs_item3" ><h3 class="active">
3</h3>
</div>
</div>
<img src="img/gryadka.png" alt="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</article>
<script src="js/script.js"></script>
</body>
</html>