diff --git a/admin.php b/admin.php index 1d134515ce01da998e42d8aa42bac325e49be06a..9c73627f59c69adf7baa09dfab9b738cca5a17d7 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 0000000000000000000000000000000000000000..0491575405f48ab519338aeb65314dac3bcb7f96 --- /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 0000000000000000000000000000000000000000..30abcca08680bb29bec2600abee8f4d5396e07f0 --- /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 0000000000000000000000000000000000000000..970214300e5eb3d6479997596af159927fdc8de4 --- /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 0000000000000000000000000000000000000000..a957882a5b32163c9f4429ba1f39524e6634b93d --- /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 9281e28f5f4e52621e2886f4a668d238c66bfa31..64b769f3e5685ff8df8f362767367c4a97f41944 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 b17f06d709cbd620a9147fc3fad2b39c0ec99896..2f5793dea50aff20f65b9b009218c98193a90f78 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 ef6b9a881b6d3e4281508ff4fe137533a355b432..d053667180846170e6c437fe0492cb847abaae03 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 645ecb421c5a8ba60bcbedb27497d9b211b82616..010bd035c7102d166b459bd239e6beb661ff8fa7 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 0000000000000000000000000000000000000000..c784546986e448c71a6327b7e414a0c9df65a03d --- /dev/null +++ b/admin/views/member.php @@ -0,0 +1,63 @@ + + +
    + +
    +
    + I18N('member'); ?> + +
    +
    +
    + + + + + + + + + + + + + + $value) { ?> + + + + + + + + + + + + + + + +
    UsernameNameStatusEmailWebsiteRegistration
    + I18N('details'); ?> + I18N('login'); ?> + + +
    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 0000000000000000000000000000000000000000..50c6adf44c757f769aaed16772bfe0fa471ca3f2 --- /dev/null +++ b/admin/views/member_add.php @@ -0,0 +1,49 @@ + + +
    + +
    +
    + Member Add + +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + +
    +
    +
    + +
    +
    diff --git a/admin/views/member_details.php b/admin/views/member_details.php new file mode 100644 index 0000000000000000000000000000000000000000..b91eb9f6ae9c252891ad46e0a6d9a45de74ceaf1 --- /dev/null +++ b/admin/views/member_details.php @@ -0,0 +1,57 @@ + + +
    + +
    +
    + Member Details + +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    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 0000000000000000000000000000000000000000..b8494bbe48dd9ae626914609bddf00d50d10759c --- /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 18259a121c123532be37c4216ef6072e156652ef..15e17a37dfebd8c28fd8419c7ad87bf31c3f361b 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 387f2b10939781e34d5b4293b305b0dcee51b2a1..e6752378d2198fa522008ced43a7bb8300a5d75b 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 dbeda783b34e37af03c4748afde7993156e428b0..8e3cf0a082ee7a1fde0e45106c16a71e27a8a88b 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 dd7e27af1f391144a4294660a7ff5b299b65e4f5..4cc25ac61e186156f403c50fa5b6f4b4528dbe73 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 344de166038a33661558dfbfd18b24370134cd3c..ec7cf7e4b0aa7fa302832d93a82219a90def2e50 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 97ebba2a0fc2016ca547f3abcdb7c29de5e50b56..58272978e66e6c07994d0dade309c8f33da3706d 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 b7719d703fef46d47d311535771d1381d8b36277..4f2d8ddb3bcd74c079406828986d8c878f5d6e47 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 e23f6c5fef3ca18373d94ba05e9162f8f642a371..11bff0fa451e4552302da0b7079807563eca17e6 100644 --- a/core/views/index.php +++ b/core/views/index.php @@ -37,6 +37,24 @@ if (!defined('IN_SYS')) { + +
    +
    +
    +
    +
    + rack +
    +
    +

    Value for free

    +

    Our cluster-based GRID network features hundreds of server nodes using the right software for the right job powered by Linux and Unix operating systems.

    +

    hosting has the right services for you and at the right price... $0.00!

    +
    +
    +
    +
    +
    +