update
This commit is contained in:
parent
959e423a8d
commit
de54437872
29 changed files with 656 additions and 207 deletions
|
@ -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!');
|
||||
}
|
||||
|
||||
|
|
22
admin/controllers/member.php
Normal file
22
admin/controllers/member.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$members = [
|
||||
"total" => 10,
|
||||
"pages" => 4,
|
||||
"page" => 1,
|
||||
"list" => []
|
||||
];
|
||||
|
||||
$status_types = [
|
||||
"关闭",
|
||||
"打开"
|
||||
];
|
||||
|
||||
$members["list"] = $dbpdo->select_and("users");
|
48
admin/controllers/member_add.php
Normal file
48
admin/controllers/member_add.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$err = getMsg("errors");
|
||||
$data = getMsg("form_data");
|
||||
|
||||
$status_types = [
|
||||
"关闭",
|
||||
"打开"
|
||||
];
|
||||
|
||||
$load_editor = true;
|
||||
|
||||
if (isset($_POST["do_add_member"])) {
|
||||
$title = filter_input(INPUT_POST, "title", FILTER_SANITIZE_STRING);
|
||||
$status = filter_input(INPUT_POST, "status", FILTER_SANITIZE_STRING);
|
||||
$content = filter_input(INPUT_POST, "content", FILTER_SANITIZE_SPECIAL_CHARS);
|
||||
$errors = array();
|
||||
|
||||
$data = [
|
||||
"title" => $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");
|
||||
}
|
||||
}
|
34
admin/controllers/member_details.php
Normal file
34
admin/controllers/member_details.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$err = getMsg("errors");
|
||||
|
||||
if (empty($_GET["id"])) {
|
||||
redirect("admin", "member");
|
||||
}
|
||||
|
||||
$status_types = [
|
||||
"关闭",
|
||||
"打开"
|
||||
];
|
||||
|
||||
$member_id = filter_input(INPUT_GET, "id", FILTER_SANITIZE_STRING);
|
||||
|
||||
if (empty($member_id)) {
|
||||
setMsg("msg_notify", "The Member Not Found.", "error");
|
||||
redirect("admin", "member");
|
||||
}
|
||||
|
||||
$member = $dbpdo->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");
|
||||
}
|
33
admin/controllers/member_edit.php
Normal file
33
admin/controllers/member_edit.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$err = getMsg("errors");
|
||||
|
||||
if (empty($_GET["id"])) {
|
||||
redirect("admin", "member");
|
||||
}
|
||||
|
||||
$status_types = [
|
||||
"关闭",
|
||||
"打开"
|
||||
];
|
||||
|
||||
$member_id = filter_input(INPUT_GET, "id", FILTER_SANITIZE_STRING);
|
||||
|
||||
if (empty($member_id)) {
|
||||
setMsg("msg_notify", "The Member Not Found.", "error");
|
||||
redirect("admin", "member");
|
||||
}
|
||||
|
||||
$member = $dbpdo->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");
|
||||
}
|
|
@ -36,7 +36,7 @@ if (!defined('IN_SYS')) {
|
|||
<?php } ?>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="<?php echo setRouter('clientarea', 'forget_password'); ?>" class="btn btn-link">Forget Passsword?</a>
|
||||
<a href="<?php echo setRouter('clientarea', 'forget_password'); ?>" class="btn btn-link"><?php echo $lang->I18N('password_lost'); ?></a>
|
||||
<a href="<?php echo setRouter('clientarea', 'register'); ?>" class="btn btn-link">No account? Register</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -24,13 +24,14 @@ if (!defined('IN_SYS')) {
|
|||
</div>
|
||||
<ul class="dropdown-menu language-change"><?php echo $lang->get_languages_tags(); ?></ul>
|
||||
</li>
|
||||
<li><a href="about.php"><?php echo $lang->I18N('about'); ?></a></li>
|
||||
<li><a href="contact.php"><?php echo $lang->I18N('contact'); ?></a></li>
|
||||
<li><a href="support.php"><?php echo $lang->I18N('support'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('about');?>"><?php echo $lang->I18N('about'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('contact');?>"><?php echo $lang->I18N('contact'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('support');?>"><?php echo $lang->I18N('support'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="assets/jquery/jquery.min.js?_=<?php echo $static_release; ?>"></script>
|
||||
<script src="assets/bootstrap/js/bootstrap.min.js?_=<?php echo $static_release; ?>"></script>
|
||||
<script src="assets/js/common.js?_=<?php echo $static_release; ?>"></script>
|
||||
|
|
|
@ -48,7 +48,7 @@ if (!defined('IN_SYS')) {
|
|||
<?php } ?>
|
||||
</div>
|
||||
<div class="panel-footer text-right">
|
||||
<a href="<?php echo setRouter('admin', 'forget_password'); ?>">Forget Passsword?</a>
|
||||
<a href="<?php echo setRouter('admin', 'forget_password'); ?>"><?php echo $lang->I18N('password_lost'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -41,6 +41,8 @@ if (file_exists("{$ROOT}/install.php")) {
|
|||
<div class="panel-body">
|
||||
<a class="btn btn-default" href="<?php echo setRouter('admin', 'news_add'); ?>">添加新闻</a>
|
||||
<a class="btn btn-default" href="<?php echo setRouter('admin', 'account_add'); ?>">添加账号</a>
|
||||
<a class="btn btn-default" href="<?php echo setRouter('admin', 'member_add'); ?>">添加客户</a>
|
||||
<a class="btn btn-default" href="<?php echo setRouter('admin', 'product_add'); ?>">添加产品</a>
|
||||
</div>
|
||||
<div class="panel-footer"></div>
|
||||
</div>
|
||||
|
|
63
admin/views/member.php
Normal file
63
admin/views/member.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<?php echo (getMsg("msg_notify")); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title"><?php echo $lang->I18N('member'); ?></span>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member_add'); ?>"><?php echo $lang->I18N('add'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Username</th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Email</th>
|
||||
<th>Website</th>
|
||||
<th>Registration</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($members["total"] && $members["list"]) {
|
||||
foreach ($members["list"] as $key => $value) { ?>
|
||||
<tr>
|
||||
<td style="width: 150px;"><?php echo $value["username"]; ?></td>
|
||||
<td><?php echo $value["name"]; ?></td>
|
||||
<td><?php echo $status_types[$value['is_active']]; ?></td>
|
||||
<td><?php echo $value["email"]; ?></td>
|
||||
<td><?php echo $value["website"]; ?></td>
|
||||
<td><?php echo cTime($value["created_at"]); ?></td>
|
||||
<td>
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member_details', ['id' => $value['id']]); ?>"><?php echo $lang->I18N('details'); ?></a>
|
||||
<a class="btn btn-default btn-xs" href="#"><?php echo $lang->I18N('login'); ?></a>
|
||||
<button class="btn btn-default btn-xs"><?php echo $lang->I18N('active'); ?></button>
|
||||
<button class="btn btn-default btn-xs"><?php echo $lang->I18N('disable'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
} else { ?>
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">No Records Found</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<span><?php echo $members["total"]; ?> Records Found, Page <?php echo $members["page"]; ?> of <?php echo $members["pages"]; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
49
admin/views/member_add.php
Normal file
49
admin/views/member_add.php
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<?php
|
||||
echo (getMsg("msg_notify"));
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Member Add</span>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member'); ?>"><?php echo $lang->I18N('list'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="title">Title: <sup>*</sup></label>
|
||||
<input type="text" name="title" id="title" value="<?php echo ($data['title']); ?>" class="form-control <?php echo (isset($err['title_err'])) ? 'is-invalid' : ''; ?>" maxlength="100" placeholder="Title">
|
||||
<span class="text-warning"><?php echo isset($err["title_err"]) ? $err["title_err"] : ""; ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content">Content: <sup>*</sup></label>
|
||||
<textarea name="content" id="content" class="form-control summernote" value="<?php echo ($data['content']); ?>" rows="10" maxlength="5000" placeholder="Content"></textarea>
|
||||
<span class="text-warning"><?php echo isset($err["content_err"]) ? $err["content_err"] : ""; ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="status">Status: <sup>*</sup></label>
|
||||
<select name="status" id="status" class="form-control <?php echo (isset($err['status_err'])) ? 'is-invalid' : ''; ?>">
|
||||
<?php foreach ($status_types as $key => $value) { ?>
|
||||
<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<span class="text-warning"><?php echo isset($err["status_err"]) ? $err["status_err"] : ""; ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" name="do_add_member" class="btn btn-primary"><?php echo $lang->I18N('add'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="panel-footer"></div>
|
||||
</div>
|
||||
</div>
|
57
admin/views/member_details.php
Normal file
57
admin/views/member_details.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
print_r($member);
|
||||
print_r($member_avatar);
|
||||
print_r($member_reg_date);
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<?php echo (getMsg("msg_notify")); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Member Details</span>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member_edit', ['id' => $member['id']]); ?>"><?php echo $lang->I18N('modify'); ?></a>
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member_add'); ?>"><?php echo $lang->I18N('add'); ?></a>
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member'); ?>"><?php echo $lang->I18N('list'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="text-center">
|
||||
<img src="<?php echo $member_avatar; ?>" class="img-avatar img-responsive img-responsive img-circle img-thumbnail">
|
||||
</div>
|
||||
<hr />
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width: 150px;"><?php echo $lang->I18N('username'); ?></th>
|
||||
<td><?php echo $member['username']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->I18N('name'); ?></th>
|
||||
<td><?php echo $member['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->I18N('email'); ?></th>
|
||||
<td><?php echo $member['email']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->I18N('website'); ?></th>
|
||||
<td><?php echo $member['website']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->I18N('reg_date'); ?></th>
|
||||
<td><?php echo $member_reg_date; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="" data-toggle="modal" data-target="#deactivate-account"><i class="glyphicon glyphicon-off"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
58
admin/views/member_edit.php
Normal file
58
admin/views/member_edit.php
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../admin.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<?php echo getMsg("msg_notify"); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Edit Member</span>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member_details', ['id' => $member['id']]); ?>"><?php echo $lang->I18N('details'); ?></a>
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member_add'); ?>"><?php echo $lang->I18N('add'); ?></a>
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('admin', 'member'); ?>"><?php echo $lang->I18N('list'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="name" name="name" value="<?php echo $member['name']; ?>" class="form-control <?php echo (isset($err['name_err'])) ? 'is-invalid' : ''; ?>">
|
||||
<span class="text-warning"><?php echo ($err["name_err"]); ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" value="<?php echo $member['username']; ?>" class="form-control <?php echo (isset($err['username_err'])) ? 'is-invalid' : ''; ?>">
|
||||
<span class="text-warning"><?php echo ($err["username_err"]); ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">Email Address</label>
|
||||
<input type="email" name="email" value="<?php echo $member['email']; ?>" class="form-control <?php echo (isset($err['email_err'])) ? 'is-invalid' : ''; ?>">
|
||||
<span class="text-warning"><?php echo ($err["email_err"]); ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url">Website</label>
|
||||
<input type="text" name="website" value="<?php echo $member['website']; ?>" class="form-control <?php echo (isset($err['website_err'])) ? 'is-invalid' : ''; ?>">
|
||||
<span class="text-warning"><?php echo ($err["website_err"]); ?></span>
|
||||
</div>
|
||||
<div class="form-group" id="imageBox">
|
||||
<img src="<?php echo $member_avatar; ?>" alt="" class="img-avatar img-responsive img-responsive img-circle img-thumbnail">
|
||||
<a href="#" class="" id="uploadNewImage">Click here to upload</a>
|
||||
</div>
|
||||
<div class="form-group" id="imageUpload">
|
||||
<label for="url">Upload Image</label>
|
||||
<input type="file" name="image" class="form-control <?php echo (isset($err['image_err'])) ? 'is-invalid' : ''; ?>">
|
||||
<span class="text-warning"><?php echo ($err["image_err"]); ?></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" name="edit" value="Update Now" class="btn btn-default">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="panel-footer"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -37,6 +37,7 @@ if (!defined('IN_SYS')) {
|
|||
<li><a href="<?php echo setRouter('admin', 'account_disable'); ?>">Account Suspend</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="<?php echo setRouter('admin', 'member'); ?>"><?php echo $lang->I18N('member'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('admin', 'tickets'); ?>"><?php echo $lang->I18N('tickets'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('admin', 'news'); ?>"><?php echo $lang->I18N('news'); ?></a></li>
|
||||
<?php } ?>
|
||||
|
|
|
@ -12,7 +12,7 @@ if (!defined('IN_SYS')) {
|
|||
<?php echo getMsg("msg_notify"); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Forget Password</h3>
|
||||
<h3 class="panel-title"><?php echo $lang->I18N('password_reset'); ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>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.</p>
|
||||
|
|
|
@ -33,7 +33,7 @@ if (!defined('IN_SYS')) {
|
|||
</form>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="<?php echo setRouter('clientarea', 'forget_password');?>" class="btn btn-link">Forget Passsword?</a>
|
||||
<a href="<?php echo setRouter('clientarea', 'forget_password');?>" class="btn btn-link"><?php echo $lang->I18N('password_lost'); ?></a>
|
||||
<a href="<?php echo setRouter('clientarea', 'register');?>" class="btn btn-link">No account? Register</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -63,7 +63,7 @@ if (!defined('IN_SYS')) {
|
|||
<li><a href="<?php echo setRouter('clientarea', 'login'); ?>"><?php echo $lang->I18N('login'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('clientarea', 'register'); ?>"><?php echo $lang->I18N('register'); ?></a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="<?php echo setRouter('clientarea', 'forget_password'); ?>">Forget Passsword</a></li>
|
||||
<li><a href="<?php echo setRouter('clientarea', 'forget_password'); ?>"><?php echo $lang->I18N('password_lost'); ?></a></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
|
|
3
core.php
3
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";
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ if (!defined('IN_SYS')) {
|
|||
</div>
|
||||
<ul class="dropdown-menu language-change"><?php echo $lang->get_languages_tags(); ?></ul>
|
||||
</li>
|
||||
<li><a href="about.php"><?php echo $lang->I18N('about'); ?></a></li>
|
||||
<li><a href="contact.php"><?php echo $lang->I18N('contact'); ?></a></li>
|
||||
<li><a href="support.php"><?php echo $lang->I18N('support'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('about');?>"><?php echo $lang->I18N('about'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('contact');?>"><?php echo $lang->I18N('contact'); ?></a></li>
|
||||
<li><a href="<?php echo setRouter('news');?>"><?php echo $lang->I18N('news'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -37,6 +37,24 @@ if (!defined('IN_SYS')) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="media">
|
||||
<div class="media-left media-middle">
|
||||
<img src="assets/images/cluster.jpg" alt="rack">
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Value for free</h4>
|
||||
<p>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.</p>
|
||||
<p><?= $title_s ?> hosting has the right services for you and at the right price... $0.00!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <script type="text/javascript">
|
||||
$('.check-domain').click(function () {
|
||||
var domain = $('#domainInput').val()
|
||||
|
|
|
@ -31,7 +31,7 @@ if (!defined('IN_SYS')) {
|
|||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me"><span><?php echo $lang->I18N('remember_me'); ?></span>
|
||||
<a href="//cpanel.<?= $domain ?>/lostpassword.php"><?php echo $lang->I18N('lost_password'); ?></a>
|
||||
<a href="//cpanel.<?= $domain ?>/lostpassword.php"><?php echo $lang->I18N('password_lost'); ?></a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,54 +1,46 @@
|
|||
<?php
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../news.php");
|
||||
header("Location: ../../index.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1><?php echo $lang->I18N('news'); ?></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<?php echo (getMsg("msg_notify")); ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h2>free hosting news</h2>
|
||||
<p>We proudly announce the following new features on all free hosting accounts!..</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">1. cPanel x3 theme</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
The popular and professional x3 theme is now available for all free hosting accounts.
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">2. Automatic HTTP/SSL</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
We are the only webhost's in the world to offer automatic free SSL/HTTP's encryption on all free hosted domain names. You can instantly browse any domain on our network on a https:// url.
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">3. Softaculous 1 click script installer</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
Softaculous is an auto installer for cPanel. Unlike other auto installers Softaculous is much faster, well designed and it installs all scripts in just ONE STEP.
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="media">
|
||||
<div class="media-left media-middle">
|
||||
<img src="assets/images/cluster.jpg" alt="rack">
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Value for free</h4>
|
||||
<p>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.</p>
|
||||
<p><?= $title_s ?> hosting has the right services for you and at the right price... $0.00!</p>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th style="width: 150px;">Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($news["total"] && $news["list"]) {
|
||||
foreach ($news["list"] as $key => $value) { ?>
|
||||
<tr>
|
||||
<td><a href="<?php echo setRouter('news', '', ['id' => $value['id']]); ?>"><?php echo $value["title"]; ?></a></td>
|
||||
<td style="width: 150px;"><?php echo cTime($value["date"]); ?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
} else { ?>
|
||||
<tr>
|
||||
<td colspan="2" class="text-center">No Records Found</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<span><?php echo $news["total"]; ?> Records Found, Page <?php echo $news["page"]; ?> of <?php echo $news["pages"]; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
core/views/news_details.php
Normal file
18
core/views/news_details.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
if (!defined('IN_SYS')) {
|
||||
// exit('禁止访问');
|
||||
header("Location: ../../index.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-xs" href="<?php echo setRouter('news'); ?>"><?php echo $lang->I18N('list'); ?></a>
|
||||
</div>
|
||||
<div class="page-header text-center">
|
||||
<h1><?php echo $data['title']; ?></h1>
|
||||
<p><?php echo cTime($data['date']); ?></p>
|
||||
</div>
|
||||
<?php echo htmlspecialchars_decode($data['content']); ?>
|
||||
</div>
|
|
@ -13,6 +13,8 @@ $LANG = [
|
|||
'input_username' => 'Please Input Username',
|
||||
'password' => 'Password',
|
||||
'input_password' => 'Please Input Password',
|
||||
'password_lost' => 'Lost your password?',
|
||||
'password_reset' => 'Reset Password',
|
||||
'email' => 'Email',
|
||||
'input_email' => 'Please Input Email Address',
|
||||
'site_category' => 'Site Category',
|
||||
|
@ -38,7 +40,6 @@ $LANG = [
|
|||
'signup_free_hosting' => 'Sign Up For Free Hosting',
|
||||
'remember_me' => 'Remember me',
|
||||
'please_login' => 'Please sign in',
|
||||
'lost_password' => 'Lost your password?',
|
||||
'address' => 'Address',
|
||||
'host-plan' => 'Host Plan',
|
||||
'host-plan-free' => 'Free Hosting',
|
||||
|
@ -56,7 +57,6 @@ $LANG = [
|
|||
'daily-hits' => 'Daily Hits Quota',
|
||||
'host-inodes' => 'Inodes Quota',
|
||||
'unlimited' => 'Unlimited',
|
||||
'reset-password' => 'Reset Password',
|
||||
'domain' => 'Domain',
|
||||
'input-domain' => 'Please Input Domain',
|
||||
'support' => 'Support',
|
||||
|
@ -66,10 +66,15 @@ $LANG = [
|
|||
'aboutus' => 'About',
|
||||
'clientarea' => 'Client Area',
|
||||
'add' => 'Add',
|
||||
'modify' => 'Modify',
|
||||
'edit' => 'Edit',
|
||||
'list' => 'List',
|
||||
'managearea' => 'Manage Area',
|
||||
'delete' => 'Delete',
|
||||
'details' => 'Details',
|
||||
'tickets' => 'Tickets',
|
||||
'tickets-details' => 'Tickets Details',
|
||||
'member' => 'Member',
|
||||
'members' => 'Members',
|
||||
'reg_date' => 'Registration date'
|
||||
];
|
||||
|
|
|
@ -13,6 +13,8 @@ $LANG = [
|
|||
'input_username' => '사용자 이름을 입력하십시오.',
|
||||
'password' => '암호',
|
||||
'input_password' => '암호를 입력하십시오',
|
||||
'password_lost' => 'Lost your password?',
|
||||
'password_reset' => '암호를 재설정',
|
||||
'email' => '이메일',
|
||||
'input_email' => '이메일 주소를 입력 해주세요',
|
||||
'site_category' => '사이트 유형',
|
||||
|
@ -38,7 +40,6 @@ $LANG = [
|
|||
'signup_free_hosting' => 'Sign Up For Free Hosting',
|
||||
'remember_me' => 'Remember me',
|
||||
'please_login' => '로그인 해주세요',
|
||||
'lost_password' => 'Lost your password?',
|
||||
'address' => 'Address',
|
||||
'host-plan' => 'Host Plan',
|
||||
'host-plan-free' => '무료 호스팅',
|
||||
|
@ -56,7 +57,6 @@ $LANG = [
|
|||
'daily-hits' => '일일 조회수 사용됨',
|
||||
'host-inodes' => '사용 된 Inode',
|
||||
'unlimited' => '제한 없는',
|
||||
'reset-password' => '암호를 재설정',
|
||||
'domain' => '도메인 이름',
|
||||
'input-domain' => 'Please Input Domain',
|
||||
'support' => '지원됨',
|
||||
|
@ -66,10 +66,15 @@ $LANG = [
|
|||
'aboutus' => '회사 소개',
|
||||
'clientarea' => '고객센터',
|
||||
'add' => '더하다',
|
||||
'modify' => '자료 편집',
|
||||
'edit' => '편집',
|
||||
'list' => '명부',
|
||||
'managearea' => '관리센터',
|
||||
'delete' => '삭제',
|
||||
'details' => '세부 정보',
|
||||
'tickets' => '작업 지시서',
|
||||
'tickets-details' => '작업 지시 세부 정보',
|
||||
'member' => '고객',
|
||||
'members' => '고객',
|
||||
'reg_date' => '등록 날짜'
|
||||
];
|
||||
|
|
|
@ -13,6 +13,8 @@ $LANG = [
|
|||
"input_username" => "请输入用户名",
|
||||
"password" => "密码",
|
||||
"input_password" => "请输入密码",
|
||||
"password_lost" => "忘记密码了?",
|
||||
"password_reset" => "重置密码",
|
||||
"email" => "电子邮箱地址",
|
||||
"input_email" => "请输入电子邮箱地址",
|
||||
"site_category" => "网站类型",
|
||||
|
@ -38,7 +40,6 @@ $LANG = [
|
|||
"signup_free_hosting" => "注册免费空间",
|
||||
"remember_me" => "记住我",
|
||||
"please_login" => "请登录",
|
||||
"lost_password" => "忘记密码了?",
|
||||
"address" => "地址",
|
||||
"host-plan" => "主机方案",
|
||||
"host-plan-free" => "免费主机",
|
||||
|
@ -56,7 +57,6 @@ $LANG = [
|
|||
"daily-hits" => "每日点击配额",
|
||||
"host-inodes" => "使用Inode配额",
|
||||
"unlimited" => "无限",
|
||||
"reset-password" => "重置密码",
|
||||
"domain" => "域名",
|
||||
"input-domain" => "请输入域名",
|
||||
'support' => '支持',
|
||||
|
@ -66,10 +66,16 @@ $LANG = [
|
|||
'aboutus' => '关于我们',
|
||||
'clientarea' => '客户中心',
|
||||
'add' => '新增',
|
||||
'modify' => '修改',
|
||||
'edit' => '编辑',
|
||||
'list' => '列表',
|
||||
'managearea' => '管理中心',
|
||||
'delete' => '删除',
|
||||
'details' => '详情',
|
||||
'tickets' => '工单',
|
||||
'tickets-details' => '工单详情',
|
||||
'member' => '客户',
|
||||
'members' => '客户',
|
||||
'reg_date' => '注册日期',
|
||||
'cancel' => '取消'
|
||||
];
|
||||
|
|
|
@ -13,6 +13,8 @@ $LANG = [
|
|||
'input_username' => '請輸入用戶名',
|
||||
'password' => '密碼',
|
||||
'input_password' => '請輸入密碼',
|
||||
'password_lost' => '忘記密碼了?',
|
||||
'password_reset' => '重置密碼',
|
||||
'email' => '電子郵箱地址',
|
||||
'input_email' => '請輸入電子郵箱地址',
|
||||
'site_category' => '網站類型',
|
||||
|
@ -38,7 +40,6 @@ $LANG = [
|
|||
'signup_free_hosting' => '註冊免費空間',
|
||||
'remember_me' => '記住我',
|
||||
'please_login' => '請登錄',
|
||||
'lost_password' => '忘記密碼了?',
|
||||
'address' => '地址',
|
||||
'host-plan' => '主機方案',
|
||||
'host-plan-free' => '免費主機',
|
||||
|
@ -56,7 +57,6 @@ $LANG = [
|
|||
'daily-hits' => '每日點擊額度',
|
||||
'host-inodes' => '信息節點額度',
|
||||
'unlimited' => '無限',
|
||||
'reset-password' => '重置密碼',
|
||||
'domain' => '域名',
|
||||
'input-domain' => '請輸入域名',
|
||||
'support' => '支持',
|
||||
|
@ -66,10 +66,15 @@ $LANG = [
|
|||
'aboutus' => '關於我們',
|
||||
'clientarea' => '客戶中心',
|
||||
'add' => '新增',
|
||||
'modify' => '修改',
|
||||
'edit' => '编辑',
|
||||
'list' => '列表',
|
||||
'managearea' => '管理中心',
|
||||
'delete' => '刪除',
|
||||
'details' => '詳情',
|
||||
'tickets' => '工單',
|
||||
'tickets-details' => '工單詳情',
|
||||
'member' => '客戶',
|
||||
'members' => '客戶',
|
||||
'reg_date' => '註冊日期'
|
||||
];
|
||||
|
|
2
news.php
2
news.php
|
@ -6,5 +6,5 @@ include("core/controllers/news.php");
|
|||
|
||||
include("core/views/header.php");
|
||||
include("core/views/navbar.php");
|
||||
include("core/views/news.php");
|
||||
include($section_page);
|
||||
include("core/views/footer.php");
|
||||
|
|
Loading…
Reference in a new issue