-
Notifications
You must be signed in to change notification settings - Fork 0
/
about.php
160 lines (141 loc) · 5.63 KB
/
about.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?php
include_once 'inc/database.php';
$database = new Connection();
$db = $database->openConnection();
$stmt = $db->prepare("SELECT id,about,created_at FROM status_about WHERE id='1'");
$stmt->execute();
$row = $stmt->fetch();
if (isset($_POST['update'])) {
$data = [
'id' => 1,
'about' => $_POST['about'],
];
// print_r($data);
$sql = "UPDATE status_about SET about=:about WHERE id=:id";
$result = $db->prepare($sql)->execute($data);
if ($result) {
setAlert("success","About content has been updated successfully..");
} else {
setAlert("danger","Something went wrong");
}
header('Location:about.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Wallpaper | About Us</title>
<!-- Favicon icon -->
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon.png">
<!-- Custom Stylesheet -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!--*******************
Preloader start
********************-->
<div id="preloader">
<div class="loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="3" stroke-miterlimit="10" />
</svg>
</div>
</div>
<!--*******************
Preloader end
********************-->
<!--**********************************
Main wrapper start
***********************************-->
<div id="main-wrapper">
<!--**********************************
Header start
***********************************-->
<?php include('inc/header.php'); ?>
<!--**********************************
Header end ti-comment-alt
***********************************-->
<!--**********************************
Sidebar start
***********************************-->
<?php include('inc/sidebar.php'); ?>
<!--**********************************
Sidebar end
***********************************-->
<!--**********************************
Content body start
***********************************-->
<div class="content-body">
<div class="row page-titles mx-0">
<div class="col p-md-0">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="home.php">Dashboard</a></li>
<li class="breadcrumb-item active"><a href="javascript:void(0)">Terms and Conditions</a></li>
</ol>
</div>
</div>
<!-- row -->
<div class="container-fluid">
<div class="row">
<div class="col-12">
<?php
if (isset($_SESSION['alertType']) && isset($_SESSION['alertMessage'])) {
?>
<div class="alert alert-<?php echo $_SESSION['alertType']; ?> alert-dismissible">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Success!</strong> <?php echo $_SESSION['alertMessage']; ?>
</div>
<?php
clearAlert();
}
?>
<div class="card">
<div class="card-body">
<h4 class="card-title">About Us</h4>
<p class="text-muted"><code></code>
</p>
<div id="terms-conditions-three" class="terms-conditions">
<form method="post">
<textarea class="form-control" id="ckeditor" name="about"><?php echo $row['about']; ?></textarea>
<button type="submit" name="update" class="btn mb-1 btn-primary mt-5">Save</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- #/ container -->
</div>
<!--**********************************
Content body end
***********************************-->
<!--**********************************
Footer start
***********************************-->
<?php include('inc/footer.php'); ?>
<!--**********************************
Footer end
***********************************-->
</div>
<!--**********************************
Main wrapper end
***********************************-->
<!--**********************************
Scripts
***********************************-->
<script src="plugins/common/common.min.js"></script>
<script src="js/custom.min.js"></script>
<script src="js/settings.js"></script>
<script src="js/gleek.js"></script>
<script src="js/styleSwitcher.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.12.1/ckeditor.js"></script>
<script type="text/javascript">
CKEDITOR.replace('ckeditor');
</script>
</body>
</html>