-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage.php
More file actions
39 lines (32 loc) · 939 Bytes
/
page.php
File metadata and controls
39 lines (32 loc) · 939 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
36
37
38
39
<?php
include "core.php";
head();
if ($settings['sidebar_position'] == 'Left') {
sidebar();
}
$slug = $_GET['name'];
if (empty($slug)) {
echo '<meta http-equiv="refresh" content="0; url=' . $settings['site_url'] . '">';
exit;
}
$run = mysqli_query($connect, "SELECT * FROM `pages` WHERE slug='$slug' LIMIT 1");
if (mysqli_num_rows($run) == 0) {
echo '<meta http-equiv="refresh" content="0; url=' . $settings['site_url'] . '">';
exit;
}
$row = mysqli_fetch_assoc($run);
echo '
<div class="col-md-8 mb-3">
<div class="card">
<div class="card-header">' . $row['title'] . '</div>
<div class="card-body">
' . html_entity_decode($row['content']) . '
</div>
</div>
</div>
';
if ($settings['sidebar_position'] == 'Right') {
sidebar();
}
footer();
?>