-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneral.php
60 lines (58 loc) · 2.08 KB
/
general.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
<?php
require_once("includes/db.php");
if(isset($_GET["link"])){
$select_link = escape_string($_GET["link"]);
$select_general_page_query = query("SELECT * FROM general_page WHERE slug = '{$select_link}';");
confirm($select_general_page_query);
if(mysqli_num_rows($select_general_page_query) > 0){
while($row = fetch_array($select_general_page_query)){
$select_english_title = $row['title_en'];
$select_title = $row['title_' . $_SESSION["lan"]];
$select_content = $row['content_' . $_SESSION["lan"]];
$select_seo_id = $row['seo_id'];
}
if (!strcmp($select_seo_id, "0")) {
$select_seo_id = 1;
}
$select_seo_query = query("SELECT * FROM seo WHERE id = '{$select_seo_id}'");
confirm($select_seo_query);
while ($seo_row = fetch_array($select_seo_query)) {
$select_seo_page_title = $select_english_title;
$select_seo_page_description = $seo_row['page_description'];
$select_seo_page_keywords = $seo_row['page_keywords'];
$select_seo_page_image = $seo_row['page_image'];
}
}else{
redirect("error");
}
}else{
redirect('error');
}
include "includes/header.php";
?>
<!-- Main Body - Start
================================================== -->
<main class="page_content">
<!-- Contact Section - Start
================================================== -->
<section class="contact_section section_space_lg">
<div class="container">
<div class="project_description_container">
<?php
$new_general_content = str_replace('<img src="../', '<img src="', $select_content);
echo $new_general_content;
?>
</div>
</div>
</section>
<!-- Contact Section - End
================================================== -->
</main>
<!-- Main Body - End
================================================== -->
<!-- Site Footer - Start
================================================== -->
<footer class="site_footer style_3">
<?php
include "includes/footer.php";
?>