-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocation.php
More file actions
35 lines (30 loc) · 938 Bytes
/
location.php
File metadata and controls
35 lines (30 loc) · 938 Bytes
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
<?php
include('bootloader.php');
$location = $_GET['location'];
$sql = "SELECT location_description FROM location WHERE id = '{$location}'";
$kq = $db->query($sql);
$filename = "header.php";
// Mở file ở chế độ chỉ đọc
$fp = fopen($filename, "r");
$html1 = "";
// Đọc từng đoạn dữ liệu từ file
while (!feof($fp)) {
$data = fread($fp, 1024);
// Xử lý dữ liệu
$html1 .= $data;
};
$filename = "footer.php";
// Mở file ở chế độ chỉ đọc
$fp = fopen($filename, "r");
$html2 = '';
// Đọc từng đoạn dữ liệu từ file
while (!feof($fp)) {
$data = fread($fp, 1024);
// Xử lý dữ liệu
$html2 .= $data;
};
foreach ($kq as $row->fetch_assoc()){
$html = implode('',$kq);
}
echo($html1 . $html . $html2);
?>