diff --git a/admin.php b/admin.php
index 1d13451..9c73627 100644
--- a/admin.php
+++ b/admin.php
@@ -23,6 +23,7 @@ include_once "{$ROOT}/admin/library.php";
$section = isAdminLoggedIn() ? (empty($_GET["s"]) ? "main" : $_GET["s"]) : "login";
$section_page = "{$ROOT}/admin/views/{$section}.php";
if (!is_file($section_page)) {
+ header("HTTP/1.1 404 Not Found");
exit('Page Not Found!');
}
diff --git a/admin/controllers/member.php b/admin/controllers/member.php
new file mode 100644
index 0000000..0491575
--- /dev/null
+++ b/admin/controllers/member.php
@@ -0,0 +1,22 @@
+ 10,
+ "pages" => 4,
+ "page" => 1,
+ "list" => []
+];
+
+$status_types = [
+ "关闭",
+ "打开"
+];
+
+$members["list"] = $dbpdo->select_and("users");
diff --git a/admin/controllers/member_add.php b/admin/controllers/member_add.php
new file mode 100644
index 0000000..30abcca
--- /dev/null
+++ b/admin/controllers/member_add.php
@@ -0,0 +1,48 @@
+ $title,
+ "status" => $status,
+ "content" => $content
+ ];
+ if (!count($errors)) {
+ $data["date"] = time();
+ $data["lastupdated"] = "";
+ $res = $dbpdo->add("member", $data);
+ print_r($res);
+ if ($res) {
+ setMsg("msg_notify", "Add Member successfully.", "success");
+ redirect("admin", "member_details", ["id" => $res]);
+ } else {
+ setMsg("form_data", $data);
+ setMsg("msg_notify", "Add Member failed.", "warning");
+ redirect("admin", "member_add");
+ }
+ } else {
+ setMsg("form_data", $data);
+ setMsg("errors", $errors);
+ redirect("admin", "member");
+ }
+}
diff --git a/admin/controllers/member_details.php b/admin/controllers/member_details.php
new file mode 100644
index 0000000..9702143
--- /dev/null
+++ b/admin/controllers/member_details.php
@@ -0,0 +1,34 @@
+find_and('users', ["id" => $member_id]);
+if ($member) {
+ $member_avatar = (!empty($member['image'])) ? '/clientarea/images/' . $member['image'] : "http://via.placeholder.com/150x150";
+ $member_reg_date = cTime($member['created_at']);
+} else {
+ setMsg("msg_notify", "The Member Not Found.", "warning");
+ redirect("admin", "member");
+}
diff --git a/admin/controllers/member_edit.php b/admin/controllers/member_edit.php
new file mode 100644
index 0000000..a957882
--- /dev/null
+++ b/admin/controllers/member_edit.php
@@ -0,0 +1,33 @@
+find_and('users', ["id" => $member_id]);
+if ($member) {
+ $member_avatar = (!empty($member['image'])) ? '/clientarea/images/' . $member['image'] : "http://via.placeholder.com/150x150";
+} else {
+ setMsg("msg_notify", "The Member Not Found.", "warning");
+ redirect("admin", "member");
+}
diff --git a/admin/views/check_domain.php b/admin/views/check_domain.php
index 9281e28..64b769f 100644
--- a/admin/views/check_domain.php
+++ b/admin/views/check_domain.php
@@ -36,7 +36,7 @@ if (!defined('IN_SYS')) {
diff --git a/admin/views/footer.php b/admin/views/footer.php
index b17f06d..2f5793d 100644
--- a/admin/views/footer.php
+++ b/admin/views/footer.php
@@ -24,13 +24,14 @@ if (!defined('IN_SYS')) {
- I18N('about'); ?>
- I18N('contact'); ?>
- I18N('support'); ?>
+ I18N('about'); ?>
+ I18N('contact'); ?>
+ I18N('support'); ?>
+
diff --git a/admin/views/login.php b/admin/views/login.php
index ef6b9a8..d053667 100644
--- a/admin/views/login.php
+++ b/admin/views/login.php
@@ -48,7 +48,7 @@ if (!defined('IN_SYS')) {
diff --git a/admin/views/main.php b/admin/views/main.php
index 645ecb4..010bd03 100644
--- a/admin/views/main.php
+++ b/admin/views/main.php
@@ -41,6 +41,8 @@ if (file_exists("{$ROOT}/install.php")) {
diff --git a/admin/views/member.php b/admin/views/member.php
new file mode 100644
index 0000000..c784546
--- /dev/null
+++ b/admin/views/member.php
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+ Username
+ Name
+ Status
+ Email
+ Website
+ Registration
+
+
+
+
+ $value) { ?>
+
+
+
+
+
+
+
+
+ I18N('details'); ?>
+ I18N('login'); ?>
+ I18N('active'); ?>
+ I18N('disable'); ?>
+
+
+
+
+ No Records Found
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/member_add.php b/admin/views/member_add.php
new file mode 100644
index 0000000..50c6adf
--- /dev/null
+++ b/admin/views/member_add.php
@@ -0,0 +1,49 @@
+
+
+
diff --git a/admin/views/member_details.php b/admin/views/member_details.php
new file mode 100644
index 0000000..b91eb9f
--- /dev/null
+++ b/admin/views/member_details.php
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ I18N('username'); ?>
+
+
+
+ I18N('name'); ?>
+
+
+
+ I18N('email'); ?>
+
+
+
+ I18N('website'); ?>
+
+
+
+ I18N('reg_date'); ?>
+
+
+
+
+
+
+
+
diff --git a/admin/views/member_edit.php b/admin/views/member_edit.php
new file mode 100644
index 0000000..b8494bb
--- /dev/null
+++ b/admin/views/member_edit.php
@@ -0,0 +1,58 @@
+
+
+
\ No newline at end of file
diff --git a/admin/views/navbar.php b/admin/views/navbar.php
index 18259a1..15e17a3 100644
--- a/admin/views/navbar.php
+++ b/admin/views/navbar.php
@@ -37,6 +37,7 @@ if (!defined('IN_SYS')) {
Account Suspend
+ I18N('member'); ?>
I18N('tickets'); ?>
I18N('news'); ?>
diff --git a/clientarea/views/forget_password.php b/clientarea/views/forget_password.php
index 387f2b1..e675237 100644
--- a/clientarea/views/forget_password.php
+++ b/clientarea/views/forget_password.php
@@ -12,7 +12,7 @@ if (!defined('IN_SYS')) {
-
Forget Password
+ I18N('password_reset'); ?>
If you have forgotten your password, you can reset it here. When you fill in your registered email address, you will be sent instructions on how to reset your password.
diff --git a/clientarea/views/login.php b/clientarea/views/login.php
index dbeda78..8e3cf0a 100644
--- a/clientarea/views/login.php
+++ b/clientarea/views/login.php
@@ -33,7 +33,7 @@ if (!defined('IN_SYS')) {
diff --git a/clientarea/views/navbar.php b/clientarea/views/navbar.php
index dd7e27a..4cc25ac 100644
--- a/clientarea/views/navbar.php
+++ b/clientarea/views/navbar.php
@@ -63,7 +63,7 @@ if (!defined('IN_SYS')) {
I18N('login'); ?>
I18N('register'); ?>
- Forget Passsword
+ I18N('password_lost'); ?>
diff --git a/core.php b/core.php
index 344de16..ec7cf7e 100644
--- a/core.php
+++ b/core.php
@@ -4,6 +4,9 @@ if (!defined('IN_SYS')) {
header("Location: index.php");
exit;
}
+header("X-Powered-By: PHP");
+header("Content-Type: text/html; charset=UTF-8");
+
$ROOT = __DIR__;
include_once "{$ROOT}/data/config.php";
include_once "{$ROOT}/library/lang.class.php";
diff --git a/core/controllers/news.php b/core/controllers/news.php
index 97ebba2..5827297 100644
--- a/core/controllers/news.php
+++ b/core/controllers/news.php
@@ -6,3 +6,31 @@ if (!defined('IN_SYS')) {
}
$title = $title . ' - ' . $lang->I18N('news');
+
+$news_id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);
+$section_page = empty($news_id) ? "{$ROOT}/core/views/news.php" : "{$ROOT}/core/views/news_details.php";
+
+if (!is_file($section_page)) {
+ header("HTTP/1.1 404 Not Found");
+ exit('Page Not Found!');
+}
+
+$dbpdo = DBPDO::getInstance($dbconfig);
+
+if (empty($news_id)) {
+ $news = [
+ "total" => 10,
+ "pages" => 4,
+ "page" => 1,
+ "list" => []
+ ];
+ $news["list"] = $dbpdo->select_and('news', ['status' => 1]);
+} else {
+ $data = $dbpdo->find_and('news', ['id' => $news_id]);
+ if ($data) {
+ // $data = $res;
+ } else {
+ setMsg("msg_notify", "The News Not found.", "warning");
+ redirect("news");
+ }
+}
diff --git a/core/views/footer.php b/core/views/footer.php
index b7719d7..4f2d8dd 100644
--- a/core/views/footer.php
+++ b/core/views/footer.php
@@ -24,9 +24,9 @@ if (!defined('IN_SYS')) {
- I18N('about'); ?>
- I18N('contact'); ?>
- I18N('support'); ?>
+ I18N('about'); ?>
+ I18N('contact'); ?>
+ I18N('news'); ?>
diff --git a/core/views/index.php b/core/views/index.php
index e23f6c5..11bff0f 100644
--- a/core/views/index.php
+++ b/core/views/index.php
@@ -37,6 +37,24 @@ if (!defined('IN_SYS')) {
+
+
+