no message

master
mmmwhy 9 years ago
parent c7a45a6bd9
commit 8adbe0cae7

@ -0,0 +1,59 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">404</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>您试图访问的页面不存在。如果您认为这个错误不该发生,<a href="https://github.com/glzjin/ss-panel-v3-mod/issues">请到 Github 提交 issue</a>。</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach" href="javascript:history.back()"><span class="icon">backspace</span>&nbsp;返回</a>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="card-img">
<img src="{$pic}" style="width: 100%;">
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,62 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">405</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>您的访问方式不正确。如果您认为这个错误不该发生,<a href="https://github.com/glzjin/ss-panel-v3-mod/issues">请到 Github 提交 issue</a>。</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach" href="javascript:history.back()"><span class="icon">backspace</span>&nbsp;返回</a>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="card-img">
<img src="{$pic}" style="width: 100%;">
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,62 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">500</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>您试图访问的页面地址出错了。如果您认为这个错误不该发生,<a href="https://github.com/glzjin/ss-panel-v3-mod/issues">请到 Github 提交 issue</a>。</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach" href="javascript:history.back()"><span class="icon">backspace</span>&nbsp;返回</a>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="card-img">
<img src="{$pic}" style="width: 100%;">
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,127 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">添加公告</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="content">内容</label>
<link rel="stylesheet" href="/theme/material/editor/css/editormd.min.css" />
<div id="editormd">
<textarea style="display:none;" id="content"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script src="/theme/material/editor/editormd.min.js"></script>
<script>
$(document).ready(function () {
function submit() {
$.ajax({
type: "POST",
url: "/admin/announcement",
dataType: "json",
data: {
content: editor.getHTML(),
markdown: editor.getMarkdown()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
}
});
}
$("#submit").click(function () {
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "/theme/material/editor/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -0,0 +1,130 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">编辑公告 #{$ann->id}</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="content">内容</label>
<link rel="stylesheet" href="/theme/material/editor/css/editormd.min.css" />
<div id="editormd">
<textarea style="display:none;" id="content">{$ann->markdown}</textarea>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">修改</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script src="/theme/material/editor/editormd.min.js"></script>
<script>
$(document).ready(function () {
function submit() {
$.ajax({
type: "PUT",
url: "/admin/announcement/{$ann->id}",
dataType: "json",
data: {
content: editor.getHTML(),
markdown: editor.getMarkdown()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
}
});
}
$("#submit").click(function () {
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "/theme/material/editor/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -0,0 +1,117 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">公告管理</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有公告。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/announcement/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要删除?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/announcement",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,122 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">添加下发命令</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="content">命令</label>
<textarea class="form-control" id="content" rows="15"></textarea>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="sign">GPG签名</label>
<textarea class="form-control" id="sign" rows="15"></textarea>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
function submit() {
$.ajax({
type: "POST",
url: "/admin/auto",
dataType: "json",
data: {
content: $("#content").val(),
sign: $("#sign").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
}
});
}
$("#submit").click(function () {
submit();
});
});
</script>

@ -0,0 +1,116 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">自动化命令执行</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有自动化命令执行记录。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/auto/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要删除?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/auto",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
{include file='table/js_2.tpl'}
})
</script>

@ -0,0 +1,125 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">添加充值码</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="amount">数目</label>
<input class="form-control" id="amount" type="text" >
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="number">金额</label>
<input class="form-control" id="number" type="text" >
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
function submit() {
$.ajax({
type: "POST",
url: "/admin/code",
dataType: "json",
data: {
amount: $("#amount").val(),
number: $("#number").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
})
</script>

@ -0,0 +1,136 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">添加捐赠或支出记录</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="number">类型</label>
<select id="type" class="form-control" name="type">
<option value="-1">捐赠</option>
<option value="-2">支出</option>
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="number">备注</label>
<input class="form-control" id="code" type="text" >
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="amount">金额</label>
<input class="form-control" id="amount" type="text" >
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
function submit() {
$.ajax({
type: "POST",
url: "/admin/donate",
dataType: "json",
data: {
amount: $("#amount").val(),
code: $("#code").val(),
type: $("#type").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
})
</script>

@ -0,0 +1,74 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">充值码{if $config['enable_donate']=='true'}与捐赠{/if}管理</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中金额流转记录。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/code/create">+</a>
</div>
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" data-toggle="dropdown"><span class="fbtn-ori icon">add</span><span class="fbtn-sub icon">close</span></a>
<div class="fbtn-dropup">
<a class="fbtn fbtn-brand waves-attach waves-circle waves-light" href="/admin/code/create"><span class="fbtn-text fbtn-text-left">充值码</span><span class="icon">code</span></a> {if $config['enable_donate']=='true'}
<a class="fbtn fbtn-green waves-attach waves-circle waves-light" href="/admin/donate/create"><span class="fbtn-text fbtn-text-left">捐赠和支出</span><span class="icon">attach_money</span></a> {/if}
</div>
</div>
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,154 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">优惠码</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="prefix">优惠码前缀</label>
<input class="form-control" id="prefix" type="text">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="credit">优惠码额度(百分比,九折就填 10 )</label>
<input class="form-control" id="credit" type="text">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="expire">优惠码有效期(h)</label>
<input class="form-control" id="expire" type="number" value="1">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="shop">优惠码可用商品ID,不填即为所有商品可用,多个的话用英文半角逗号分割</label>
<input class="form-control" id="shop" type="text">
</div>
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="onetime">
<input class="access-hide" id="onetime" type="checkbox"><span class="switch-toggle"></span>一次性的,只在用户当次购买时有效
</label>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="coupon" type="submit" class="btn btn-block btn-brand waves-attach waves-light">生成</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<p class="card-heading">优惠码</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
<div class="card-table">
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function () {
{include file='table/js_2.tpl'}
$("#coupon").click(function () {
if(document.getElementById('onetime').checked)
{
var onetime=1;
}
else
{
var onetime=0;
}
$.ajax({
type: "POST",
url: "/admin/coupon",
dataType: "json",
data: {
prefix: $("#prefix").val(),
credit: $("#credit").val(),
shop: $("#shop").val(),
onetime: onetime,
expire: $("#expire").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/admin/coupon'", {$config['jump_delay']});
}
// window.location.reload();
},
error: function (jqXHR) {
alert("发生错误:" + jqXHR.status);
}
})
})
})
</script>

@ -0,0 +1,147 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading"> 添加规则</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="name">规则名称</label>
<input class="form-control" id="name" name="name" type="text">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="text">规则描述</label>
<input class="form-control" id="text" name="text" type="text">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="regex">规则正则表达式</label>
<input class="form-control" id="regex" name="regex" type="text">
</div>
<div class="form-group form-group-label">
<div class="form-group form-group-label">
<label class="floating-label" for="type">规则类型</label>
<select id="type" class="form-control" name="type">
<option value="1">数据包明文匹配</option>
<option value="2">数据包 hex 匹配</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
name: {required: true},
text: {required: true},
regex: {required: true}
},
submitHandler: function() {
$.ajax({
type: "POST",
url: "/admin/detect",
dataType: "json",
{/literal}
data: {
name: $("#name").val(),
text: $("#text").val(),
regex: $("#regex").val(),
type: $("#type").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,147 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading"> 编辑规则 #{$rule->id}</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="name">规则名称</label>
<input class="form-control" id="name" name="name" type="text" value="{$rule->name}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="text">规则描述</label>
<input class="form-control" id="text" name="text" type="text" value="{$rule->text}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="regex">规则正则表达式</label>
<input class="form-control" id="regex" name="regex" type="text" value="{$rule->regex}">
</div>
<div class="form-group form-group-label">
<div class="form-group form-group-label">
<label class="floating-label" for="type">规则类型</label>
<select id="type" class="form-control" name="type">
<option value="1" {if $rule->type == 1}selected{/if}>数据包明文匹配</option>
<option value="2" {if $rule->type == 2}selected{/if}>数据包 hex 匹配</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">修改</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
name: {required: true},
text: {required: true},
regex: {required: true}
},
submitHandler: function() {
{/literal}
$.ajax({
type: "PUT",
url: "/admin/detect/{$rule->id}",
dataType: "json",
data: {
name: $("#name").val(),
text: $("#text").val(),
regex: $("#regex").val(),
type: $("#type").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,116 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">审计规则管理</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有过滤规则。</p>
<p>
显示表项: {include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/detect/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要删除?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
$(document).ready(function(){
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/detect",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,56 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">审计记录查看</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有审计记录。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,17 @@
<footer class="ui-footer" style="position:relative">
<div class="container">
&copy; {$config["appName"]} <a href="/staff">STAFF</a> {if $config["enable_analytics_code"] == 'true'}{include file='analytics.tpl'}{/if}
</div>
</footer>
<!-- js -->
<script src="//cdn.staticfile.org/jquery/2.2.1/jquery.js"></script>
<script src="//cdn.staticfile.org/jquery-validate/1.15.0/jquery.validate.min.js"></script>
<script src="//cdn.staticfile.org/datatables/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="//cdn.staticfile.org/datatables/1.10.13/js/dataTables.material.min.js"></script>
<script src="/theme/material/js/base.js"></script>
<script src="/theme/material/js/project.js"></script>
</body>
</html>

@ -0,0 +1,284 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">汇总</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<p>下面是系统运行情况简报。</p>
</div>
</div>
</div>
</div>
</div>
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-6 col-sm-6">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div id="check_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script type="text/javascript">
var chart = new CanvasJS.Chart("check_chart",
{
title:{
text: "用户签到情况(总用户 {$sts->getTotalUser()}人)",
fontFamily: "Impact",
fontWeight: "normal"
},
legend:{
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [
{
//startAngle: 45,
indexLabelFontSize: 20,
indexLabelFontFamily: "Garamond",
indexLabelFontColor: "darkgrey",
indexLabelLineColor: "darkgrey",
indexLabelPlacement: "outside",
type: "doughnut",
showInLegend: true,
dataPoints: [
{
y: {(1-($sts->getCheckinUser()/$sts->getTotalUser()))*100}, legendText:"没有签到过的用户 {number_format((1-($sts->getCheckinUser()/$sts->getTotalUser()))*100,2)}% {$sts->getTotalUser()-$sts->getCheckinUser()}人", indexLabel: "没有签到过的用户 {number_format((1-($sts->getCheckinUser()/$sts->getTotalUser()))*100,2)}% {$sts->getTotalUser()-$sts->getCheckinUser()}人"
},
{
y: {(($sts->getCheckinUser()-$sts->getTodayCheckinUser())/$sts->getTotalUser())*100}, legendText:"曾经签到过的用户 {number_format((($sts->getCheckinUser()-$sts->getTodayCheckinUser())/$sts->getTotalUser())*100,2)}% {$sts->getCheckinUser()-$sts->getTodayCheckinUser()}人", indexLabel: "曾经签到过的用户 {number_format((($sts->getCheckinUser()-$sts->getTodayCheckinUser())/$sts->getTotalUser())*100,2)}% {$sts->getCheckinUser()-$sts->getTodayCheckinUser()}人"
},
{
y: {$sts->getTodayCheckinUser()/$sts->getTotalUser()*100}, legendText:"今日签到用户 {number_format($sts->getTodayCheckinUser()/$sts->getTotalUser()*100,2)}% {$sts->getTodayCheckinUser()}人", indexLabel: "今日签到用户 {number_format($sts->getTodayCheckinUser()/$sts->getTotalUser()*100,2)}% {$sts->getTodayCheckinUser()}人"
}
]
}
]
});
chart.render();
</script>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div id="alive_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script type="text/javascript">
var chart = new CanvasJS.Chart("alive_chart",
{
title:{
text: "用户在线情况(总用户 {$sts->getTotalUser()}人)",
fontFamily: "Impact",
fontWeight: "normal"
},
legend:{
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [
{
//startAngle: 45,
indexLabelFontSize: 20,
indexLabelFontFamily: "Garamond",
indexLabelFontColor: "darkgrey",
indexLabelLineColor: "darkgrey",
indexLabelPlacement: "outside",
type: "doughnut",
showInLegend: true,
dataPoints: [
{
y: {(($sts->getUnusedUser()/$sts->getTotalUser()))*100}, legendText:"从未在线的用户 {number_format((($sts->getUnusedUser()/$sts->getTotalUser()))*100,2)}% {(($sts->getUnusedUser()))}人", indexLabel: "从未在线的用户 {number_format((($sts->getUnusedUser()/$sts->getTotalUser()))*100,2)}% {(($sts->getUnusedUser()))}人"
},
{
y: {(($sts->getTotalUser()-$sts->getOnlineUser(86400)-$sts->getUnusedUser())/$sts->getTotalUser())*100}, legendText:"一天以前在线的用户 {number_format((($sts->getTotalUser()-$sts->getOnlineUser(86400)-$sts->getUnusedUser())/$sts->getTotalUser())*100,2)}% {($sts->getTotalUser()-$sts->getOnlineUser(86400)-$sts->getUnusedUser())}人", indexLabel: "一天以前在线的用户 {number_format((($sts->getTotalUser()-$sts->getOnlineUser(86400)-$sts->getUnusedUser())/$sts->getTotalUser())*100,2)}% {($sts->getTotalUser()-$sts->getOnlineUser(86400)-$sts->getUnusedUser())}人"
},
{
y: {($sts->getOnlineUser(86400)-$sts->getOnlineUser(3600))/$sts->getTotalUser()*100}, legendText:"一天内在线的用户 {number_format(($sts->getOnlineUser(86400)-$sts->getOnlineUser(3600))/$sts->getTotalUser()*100,2)}% {($sts->getOnlineUser(86400)-$sts->getOnlineUser(3600))}人", indexLabel: "一天内在线的用户 {number_format(($sts->getOnlineUser(86400)-$sts->getOnlineUser(3600))/$sts->getTotalUser()*100,2)}% {($sts->getOnlineUser(86400)-$sts->getOnlineUser(3600))}人"
},
{
y: {($sts->getOnlineUser(3600)-$sts->getOnlineUser(60))/$sts->getTotalUser()*100}, legendText:"一小时内在线的用户 {number_format(($sts->getOnlineUser(3600)-$sts->getOnlineUser(60))/$sts->getTotalUser()*100,2)}% {($sts->getOnlineUser(3600)-$sts->getOnlineUser(60))}人", indexLabel: "一小时内在线的用户 {number_format(($sts->getOnlineUser(3600)-$sts->getOnlineUser(60))/$sts->getTotalUser()*100,2)}% {($sts->getOnlineUser(3600)-$sts->getOnlineUser(60))}人"
},
{
y: {($sts->getOnlineUser(60))/$sts->getTotalUser()*100}, legendText:"一分钟内在线的用户 {number_format(($sts->getOnlineUser(60))/$sts->getTotalUser()*100,2)}% {($sts->getOnlineUser(60))}人", indexLabel: "一分钟内在线的用户 {number_format(($sts->getOnlineUser(60))/$sts->getTotalUser()*100,2)}% {($sts->getOnlineUser(60))}人"
}
]
}
]
});
chart.render();
</script>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-sm-6">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div id="node_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script type="text/javascript">
var chart = new CanvasJS.Chart("node_chart",
{
title:{
text: "节点在线情况(节点数 {$sts->getTotalSSNode()}个)",
fontFamily: "Impact",
fontWeight: "normal"
},
legend:{
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [
{
//startAngle: 45,
indexLabelFontSize: 20,
indexLabelFontFamily: "Garamond",
indexLabelFontColor: "darkgrey",
indexLabelLineColor: "darkgrey",
indexLabelPlacement: "outside",
type: "doughnut",
showInLegend: true,
dataPoints: [
{if $sts->getTotalSSNode()!=0}
{
y: {(1-($sts->getAliveSSNode()/$sts->getTotalSSNode()))*100}, legendText:"离线节点 {number_format((1-($sts->getAliveSSNode()/$sts->getTotalSSNode()))*100,2)}% {$sts->getTotalSSNode()-$sts->getAliveSSNode()}个", indexLabel: "离线节点 {number_format((1-($sts->getAliveSSNode()/$sts->getTotalSSNode()))*100,2)}% {$sts->getTotalSSNode()-$sts->getAliveSSNode()}个"
},
{
y: {(($sts->getAliveSSNode()/$sts->getTotalSSNode()))*100}, legendText:"在线节点 {number_format((($sts->getAliveSSNode()/$sts->getTotalSSNode()))*100,2)}% {$sts->getAliveSSNode()}个", indexLabel: "在线节点 {number_format((($sts->getAliveSSNode()/$sts->getTotalSSNode()))*100,2)}% {$sts->getAliveSSNode()}个"
}
{/if}
]
}
]
});
chart.render();
</script>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div id="traffic_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script type="text/javascript">
var chart = new CanvasJS.Chart("traffic_chart",
{
title:{
text: "流量使用情况(总分配流量 {$sts->getTotalTraffic()})",
fontFamily: "Impact",
fontWeight: "normal"
},
legend:{
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [
{
//startAngle: 45,
indexLabelFontSize: 20,
indexLabelFontFamily: "Garamond",
indexLabelFontColor: "darkgrey",
indexLabelLineColor: "darkgrey",
indexLabelPlacement: "outside",
type: "doughnut",
showInLegend: true,
dataPoints: [
{if $sts->getRawTotalTraffic()!=0}
{
y: {(($sts->getRawUnusedTrafficUsage()/$sts->getRawTotalTraffic()))*100}, legendText:"未使用的流量 {number_format((($sts->getRawUnusedTrafficUsage()/$sts->getRawTotalTraffic()))*100,2)}% {(($sts->getUnusedTrafficUsage()))}", indexLabel: "未使用的流量 {number_format((($sts->getRawUnusedTrafficUsage()/$sts->getRawTotalTraffic()))*100,2)}% {(($sts->getUnusedTrafficUsage()))}"
},
{
y: {(($sts->getRawLastTrafficUsage()/$sts->getRawTotalTraffic()))*100}, legendText:"已使用的流量 {number_format((($sts->getRawLastTrafficUsage()/$sts->getRawTotalTraffic()))*100,2)}% {(($sts->getLastTrafficUsage()))}", indexLabel: "已使用的流量 {number_format((($sts->getRawLastTrafficUsage()/$sts->getRawTotalTraffic()))*100,2)}% {(($sts->getLastTrafficUsage()))}"
},
{
y: {(($sts->getRawTodayTrafficUsage()/$sts->getRawTotalTraffic()))*100}, legendText:"今日使用的流量 {number_format((($sts->getRawTodayTrafficUsage()/$sts->getRawTotalTraffic()))*100,2)}% {(($sts->getTodayTrafficUsage()))}", indexLabel: "今日使用的流量 {number_format((($sts->getRawTodayTrafficUsage()/$sts->getRawTotalTraffic()))*100,2)}% {(($sts->getTodayTrafficUsage()))}"
}
{/if}
]
}
]
});
chart.render();
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='admin/footer.tpl'}

@ -0,0 +1,129 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">邀请</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>公共邀请码(类别为0的邀请码)请<a href="/code">在这里查看</a>。</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="prefix">邀请码前缀</label>
<input class="form-control" id="prefix" type="text">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="uid">邀请码类别(0为公开,其他数字为对应用户的ID,或者输入用户的完整邮箱)</label>
<input class="form-control" id="uid" type="text">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="prefix">邀请码数量</label>
<input class="form-control" id="num" type="number">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach" id="invite"><span class="icon">check</span>&nbsp;生成</a>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<p class="card-heading">返利记录</p>
<p>显示表项: {include file='table/checkbox.tpl'}
</p>
<div class="card-table">
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$("#invite").click(function () {
$.ajax({
type: "POST",
url: "/admin/invite",
dataType: "json",
data: {
prefix: $("#prefix").val(),
uid: $("#uid").val(),
num: $("#num").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/admin/invite'", {$config['jump_delay']});
}
else
{
$("#result").modal();
$("#msg").html(data.msg+"。");
}
// window.location.reload();
},
error: function (jqXHR) {
alert("发生错误:" + jqXHR.status);
}
})
});
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,47 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">在线IP</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>显示表项: {include file='table/checkbox.tpl'}</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,112 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点被封IP</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>这里是最近的节点上捕捉到的进行非法行为的IP。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="ip">要解封的IP</label>
<input class="form-control" id="ip" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach" id="unblock" ><span class="icon">check</span>&nbsp;解封</a>
</div>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$("#unblock").click(function () {
$.ajax({
type: "POST",
url: "/admin/unblock",
dataType: "json",
data: {
ip: $("#ip").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}
else
{
$("#result").modal();
$("#msg").html(data.msg);
}
// window.location.reload();
},
error: function (jqXHR) {
alert("发生错误:" + jqXHR.status);
}
})
});
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,48 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">最近登录记录</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>这里是最近的登录记录。</p>
<p>显示表项: {include file='table/checkbox.tpl'}</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,49 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">解封IP记录</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>这里是最近的解封IP记录。</p>
<p>显示表项: {include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
<meta name="theme-color" content="#f44336">
<title>{$config["appName"]}</title>
<!-- css -->
<link href="/theme/material/css/base.css" rel="stylesheet">
<link href="/theme/material/css/project.css" rel="stylesheet">
<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="//cdn.staticfile.org/material-design-lite/1.1.0/material.min.css" rel="stylesheet">
<link href="//cdn.staticfile.org/datatables/1.10.13/css/dataTables.material.min.css" rel="stylesheet">
<!-- favicon -->
<!-- ... -->
</head>
<body class="page-red">
<header class="header header-red header-transparent header-waterfall ui-header">
<ul class="nav nav-list pull-left">
<div>
<a data-toggle="menu" href="#ui_menu">
<span class="icon icon-lg">menu</span>
</a>
</div>
</ul>
<ul class="nav nav-list pull-right">
<div class="dropdown margin-right">
<a class="dropdown-toggle padding-left-no padding-right-no" data-toggle="dropdown">
{if $user->isLogin}
<span class="access-hide">{$user->user_name}</span>
<span class="avatar avatar-sm"><img alt="alt text for John Smith avatar" src="{$user->gravatar}"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="padding-right-lg waves-attach" href="/user/"><span class="icon icon-lg margin-right">account_box</span>用户中心</a>
</li>
<li>
<a class="padding-right-lg waves-attach" href="/user/logout"><span class="icon icon-lg margin-right">exit_to_app</span>登出</a>
</li>
</ul>
{else}
<span class="access-hide">未登录</span>
<span class="avatar avatar-sm"><img alt="alt text for John Smith avatar" src="/theme/material/images/users/avatar-001.jpg"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="padding-right-lg waves-attach" href="/auth/login"><span class="icon icon-lg margin-right">account_box</span>登录</a>
</li>
<li>
<a class="padding-right-lg waves-attach" href="/auth/register"><span class="icon icon-lg margin-right">pregnant_woman</span>注册</a>
</li>
</ul>
{/if}
</div>
</ul>
</header>
<nav aria-hidden="true" class="menu menu-left nav-drawer nav-drawer-md" id="ui_menu" tabindex="-1">
<div class="menu-scroll">
<div class="menu-content">
<a class="menu-logo" href="/"><i class="icon icon-lg">person_pin</i>&nbsp;管理面板</a>
<ul class="nav">
<li>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_me">我的</a>
<ul class="menu-collapse collapse in" id="ui_menu_me">
<li><a href="/admin"><i class="icon icon-lg">business_center</i>&nbsp;系统概览</a></li>
<li><a href="/admin/announcement"><i class="icon icon-lg">announcement</i>&nbsp;公告管理</a></li>
<li><a href="/admin/ticket"><i class="icon icon-lg">question_answer</i>&nbsp;工单管理</a></li>
<li><a href="/admin/auto"><i class="icon icon-lg">flash_auto</i>&nbsp;下发命令</a></li>
</ul>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_node">节点</a>
<ul class="menu-collapse collapse in" id="ui_menu_node">
<li><a href="/admin/node"><i class="icon icon-lg">router</i>&nbsp;节点列表</a></li>
<li><a href="/admin/trafficlog"><i class="icon icon-lg">traffic</i>&nbsp;流量记录</a></li>
<li><a href="/admin/block"><i class="icon icon-lg">dialer_sip</i>&nbsp;已封禁IP</a></li>
<li><a href="/admin/unblock"><i class="icon icon-lg">dialer_sip</i>&nbsp;已解封IP</a></li>
</ul>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_user">用户</a>
<ul class="menu-collapse collapse in" id="ui_menu_user">
<li><a href="/admin/user"><i class="icon icon-lg">supervisor_account</i>&nbsp;用户列表</a></li>
<li><a href="/admin/relay"><i class="icon icon-lg">compare_arrows</i>&nbsp;中转规则</a></li>
<li><a href="/admin/invite"><i class="icon icon-lg">loyalty</i>&nbsp;邀请与返利</a></li>
<li><a href="/admin/login"><i class="icon icon-lg">text_fields</i>&nbsp;登录记录</a></li>
<li><a href="/admin/alive"><i class="icon icon-lg">important_devices</i>&nbsp;在线IP</a></li>
</ul>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_detect">审计</a>
<ul class="menu-collapse collapse in" id="ui_menu_detect">
<li><a href="/admin/detect"><i class="icon icon-lg">account_balance</i>&nbsp;审计规则</a></li>
<li><a href="/admin/detect/log"><i class="icon icon-lg">assignment_late</i>&nbsp;审计记录</a></li>
</ul>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_trade">交易</a>
<ul class="menu-collapse collapse in" id="ui_menu_trade">
<li><a href="/admin/code"><i class="icon icon-lg">code</i>&nbsp;充值码{if $config['enable_donate']=='true'}与捐赠{/if}</a></li>
<li><a href="/admin/shop"><i class="icon icon-lg">shop</i>&nbsp;商品</a></li>
<li><a href="/admin/coupon"><i class="icon icon-lg">card_giftcard</i>&nbsp;优惠码</a></li>
<li><a href="/admin/bought"><i class="icon icon-lg">shopping_cart</i>&nbsp;购买记录</a></li>
</ul>
<li><a href="/user"><i class="icon icon-lg">person</i>&nbsp;用户中心</a></li>
</li>
</ul>
</div>
</div>
</nav>

@ -0,0 +1,283 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">添加节点</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="name">节点名称</label>
<input class="form-control" id="name" type="text" name="name">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="server">节点地址</label>
<input class="form-control" id="server" type="text" name="server">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="server">节点IP(不填则自动获取,填写请按照 <a href="https://github.com/esdeathlove/ss-panel-v3-mod/wiki/%E8%8A%82%E7%82%B9IP%E5%A1%AB%E5%86%99%E8%A7%84%E5%88%99">这里</a> 的规则进行填写)</label>
<input class="form-control" id="node_ip" name="node_ip" type="text">
</div>
<div class="form-group form-group-label" hidden="hidden">
<label class="floating-label" for="method">加密方式</label>
<input class="form-control" id="method" type="text" name="method" value="aes-256-cfb">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="rate">流量比例</label>
<input class="form-control" id="rate" type="text" name="rate">
</div>
<div class="form-group form-group-label" hidden="hidden">
<div class="checkbox switch">
<label for="custom_method">
<input class="access-hide" id="custom_method" type="checkbox" name="custom_method" checked="checked" disabled><span class="switch-toggle"></span>自定义加密
</label>
</div>
</div>
<div class="form-group form-group-label" hidden="hidden">
<div class="checkbox switch">
<label for="custom_rss">
<input class="access-hide" id="custom_rss" type="checkbox" name="custom_rss" checked="checked" disabled><span class="switch-toggle"></span>自定义协议&混淆
</label>
</div>
</div>
<div class="form-group form-group-label">
<label for="mu_only">
<label class="floating-label" for="sort">单端口多用户启用</label>
<select id="mu_only" class="form-control" name="is_multi_user">
<option value="0">单端口多用户与普通端口并存</option>
<option value="-1">只启用普通端口</option>
<option value="1">只启用单端口多用户</option>
</select>
</label>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="type">
<input checked class="access-hide" id="type" type="checkbox" name="type"><span class="switch-toggle"></span>是否显示
</label>
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="status">节点状态</label>
<input class="form-control" id="status" type="text" name="status">
</div>
<div class="form-group form-group-label">
<div class="form-group form-group-label">
<label class="floating-label" for="sort">节点类型</label>
<select id="sort" class="form-control" name="sort">
<option value="0">Shadowsocks</option>
<option value="1">VPN/Radius基础</option>
<option value="2">SSH</option>
<option value="3">PAC</option>
<option value="4">APN文件外链</option>
<option value="5">Anyconnect</option>
<option value="6">APN</option>
<option value="7">PAC PLUS(Socks 代理生成 PAC文件)</option>
<option value="8">PAC PLUS PLUS(HTTPS 代理生成 PAC文件)</option>
<option value="9">Shadowsocks 单端口多用户</option>
<option value="10">Shadowsocks 中转</option>
</select>
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="info">节点描述</label>
<input class="form-control" id="info" type="text" name="info">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="class">节点等级(不分级请填0,分级为数字)</label>
<input class="form-control" id="class" type="text" value="0" name="class">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="group">节点群组(分组为数字,不分组请填0)</label>
<input class="form-control" id="group" type="text" value="0" name="group">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="node_bandwidth_limit">节点流量上限(不使用的话请填0)(GB)</label>
<input class="form-control" id="node_bandwidth_limit" type="text" value="0" name="node_bandwidth_limit">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="bandwidthlimit_resetday">节点流量上限清空日</label>
<input class="form-control" id="bandwidthlimit_resetday" type="text" value="0" name="bandwidthlimit_resetday">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="node_speedlimit">节点限速(对于每个用户端口)(Mbps)</label>
<input class="form-control" id="node_speedlimit" type="text" value="0" name="node_speedlimit">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
name: {required: true},
server: {required: true},
method: {required: true},
rate: {required: true},
info: {required: true},
group: {required: true},
status: {required: true},
node_speedlimit: {required: true},
sort: {required: true},
node_bandwidth_limit: {required: true},
bandwidthlimit_resetday: {required: true}
},
submitHandler: function() {
if(document.getElementById('custom_method').checked)
{
var custom_method=1;
}
else
{
var custom_method=0;
}
if(document.getElementById('type').checked)
{
var type=1;
}
else
{
var type=0;
}
{/literal}
if(document.getElementById('custom_rss').checked)
{
var custom_rss=1;
}
else
{
var custom_rss=0;
}
$.ajax({
type: "POST",
url: "/admin/node",
dataType: "json",
data: {
name: $("#name").val(),
server: $("#server").val(),
node_ip: $("#node_ip").val(),
method: $("#method").val(),
custom_method: custom_method,
rate: $("#rate").val(),
info: $("#info").val(),
type: type,
group: $("#group").val(),
status: $("#status").val(),
node_speedlimit: $("#node_speedlimit").val(),
sort: $("#sort").val(),
class: $("#class").val(),
node_bandwidth_limit: $("#node_bandwidth_limit").val(),
bandwidthlimit_resetday: $("#bandwidthlimit_resetday").val(),
custom_rss: custom_rss,
mu_only: $("#mu_only").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
});
</script>

@ -0,0 +1,289 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">编辑节点 #{$node->id}</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="name">节点名称</label>
<input class="form-control" id="name" name="name" type="text" value="{$node->name}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="server">节点地址</label>
<input class="form-control" id="server" name="server" type="text" value="{$node->server}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="server">节点IP(不填则自动获取,填写请按照 <a href="https://github.com/esdeathlove/ss-panel-v3-mod/wiki/%E8%8A%82%E7%82%B9IP%E5%A1%AB%E5%86%99%E8%A7%84%E5%88%99">这里</a> 的规则进行填写)</label>
<input class="form-control" id="node_ip" name="node_ip" type="text" value="{$node->node_ip}">
</div>
<div class="form-group form-group-label" hidden="hidden">
<label class="floating-label" for="method">加密方式</label>
<input class="form-control" id="method" name="method" type="text" value="{$node->method}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="rate">流量比例</label>
<input class="form-control" id="rate" name="rate" type="text" value="{$node->traffic_rate}">
</div>
<div class="form-group form-group-label" hidden="hidden">
<div class="checkbox switch">
<label for="custom_method">
<input {if $node->custom_method==1}checked{/if} class="access-hide" id="custom_method" name="custom_method" type="checkbox"><span class="switch-toggle"></span>自定义加密
</label>
</div>
</div>
<div class="form-group form-group-label" hidden="hidden">
<div class="checkbox switch">
<label for="custom_rss">
<input {if $node->custom_rss==1}checked{/if} class="access-hide" id="custom_rss" type="checkbox" name="custom_rss"><span class="switch-toggle"></span>自定义协议&混淆
</label>
</div>
</div>
<div class="form-group form-group-label">
<label for="mu_only">
<label class="floating-label" for="sort">单端口多用户启用</label>
<select id="mu_only" class="form-control" name="is_multi_user">
<option value="0" {if $node->mu_only==0}selected{/if}>单端口多用户与普通端口并存</option>
<option value="-1" {if $node->mu_only==-1}selected{/if}>只启用普通端口</option>
<option value="1" {if $node->mu_only==1}selected{/if}>只启用单端口多用户</option>
</select>
</label>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="type">
<input {if $node->type==1}checked{/if} class="access-hide" id="type" name="type" type="checkbox"><span class="switch-toggle"></span>是否显示
</label>
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="status">节点状态</label>
<input class="form-control" id="status" name="status" type="text" value="{$node->status}">
</div>
<div class="form-group form-group-label">
<div class="form-group form-group-label">
<label class="floating-label" for="sort">节点类型</label>
<select id="sort" class="form-control" name="sort">
<option value="0" {if $node->sort==0}selected{/if}>Shadowsocks</option>
<option value="1" {if $node->sort==1}selected{/if}>VPN/Radius基础</option>
<option value="2" {if $node->sort==2}selected{/if}>SSH</option>
<option value="3" {if $node->sort==3}selected{/if}>PAC</option>
<option value="4" {if $node->sort==4}selected{/if}>APN文件外链</option>
<option value="5" {if $node->sort==5}selected{/if}>Anyconnect</option>
<option value="6" {if $node->sort==6}selected{/if}>APN</option>
<option value="7" {if $node->sort==7}selected{/if}>PAC PLUS(Socks 代理生成 PAC文件)</option>
<option value="8" {if $node->sort==8}selected{/if}>PAC PLUS PLUS(HTTPS 代理生成 PAC文件)</option>
<option value="9" {if $node->sort==9}selected{/if}>Shadowsocks 单端口多用户</option>
<option value="10" {if $node->sort==10}selected{/if}>Shadowsocks 中转</option>
</select>
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="info">节点描述</label>
<input class="form-control" id="info" name="info" type="text" value="{$node->info}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="class">节点等级(不分级请填0,分级为数字)</label>
<input class="form-control" id="class" name="class" type="text" value="{$node->node_class}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="group">节点群组(分组为数字,不分组请填0)</label>
<input class="form-control" id="group" name="group" type="text" value="{$node->node_group}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="node_bandwidth_limit">节点流量上限(不使用的话请填0)(GB)</label>
<input class="form-control" id="node_bandwidth_limit" name="node_bandwidth_limit" type="text" value="{$node->node_bandwidth_limit/1024/1024/1024}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="bandwidthlimit_resetday">节点流量上限清空日</label>
<input class="form-control" id="bandwidthlimit_resetday" name="bandwidthlimit_resetday" type="text" value="{$node->bandwidthlimit_resetday}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="node_speedlimit">节点限速(对于每个用户端口)(Mbps)</label>
<input class="form-control" id="node_speedlimit" name="node_speedlimit" type="text" value="{$node->node_speedlimit}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">修改</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
name: {required: true},
server: {required: true},
method: {required: true},
rate: {required: true},
info: {required: true},
group: {required: true},
status: {required: true},
node_speedlimit: {required: true},
sort: {required: true},
node_bandwidth_limit: {required: true},
bandwidthlimit_resetday: {required: true}
},
submitHandler: function() {
if(document.getElementById('custom_method').checked)
{
var custom_method=1;
}
else
{
var custom_method=0;
}
if(document.getElementById('type').checked)
{
var type=1;
}
else
{
var type=0;
}
{/literal}
if(document.getElementById('custom_rss').checked)
{
var custom_rss=1;
}
else
{
var custom_rss=0;
}
$.ajax({
type: "PUT",
url: "/admin/node/{$node->id}",
dataType: "json",
{literal}
data: {
name: $("#name").val(),
server: $("#server").val(),
node_ip: $("#node_ip").val(),
method: $("#method").val(),
custom_method: custom_method,
rate: $("#rate").val(),
info: $("#info").val(),
type: type,
group: $("#group").val(),
status: $("#status").val(),
sort: $("#sort").val(),
node_speedlimit: $("#node_speedlimit").val(),
class: $("#class").val(),
node_bandwidth_limit: $("#node_bandwidth_limit").val(),
bandwidthlimit_resetday: $("#bandwidthlimit_resetday").val(){/literal},
custom_rss: custom_rss,
mu_only: $("#mu_only").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,117 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点列表</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有节点的列表。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/node/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要删除?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/node",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,156 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading"> 添加中转规则</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="source_node">起源节点</label>
<select id="source_node" class="form-control" name="source_node">
<option value="0">请选择起源节点</option>
{foreach $source_nodes as $source_node}
<option value="{$source_node->id}">{$source_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="dist_node">目标节点</label>
<select id="dist_node" class="form-control" name="dist_node">
<option value="-1">不进行中转</option>
{foreach $dist_nodes as $dist_node}
<option value="{$dist_node->id}">{$dist_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="port">端口</label>
<input class="form-control" id="port" name="port" type="text" value="0">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="priority">优先级</label>
<input class="form-control" id="priority" name="priority" type="text" value="0">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="user_id">用户ID</label>
<input class="form-control" id="user_id" name="user_id" type="text" value="0">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
<section>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
priority: {required: true},
port: {required: true},
user_id: {required: true}
},
submitHandler: function() {
$.ajax({
type: "POST",
url: "/admin/relay",
dataType: "json",
{/literal}
data: {
source_node: $("#source_node").val(),
dist_node: $("#dist_node").val(),
port: $("#port").val(),
user_id: $("#user_id").val(),
priority: $("#priority").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,146 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading"> 编辑规则 #{$rule->id}</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="source_node">起源节点</label>
<select id="source_node" class="form-control" name="source_node">
<option value="0">请选择起源节点</option>
{foreach $source_nodes as $source_node}
<option value="{$source_node->id}" {if $rule->source_node_id == $source_node->id}selected{/if}>{$source_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="dist_node">目标节点</label>
<select id="dist_node" class="form-control" name="dist_node">
<option value="-1">不进行中转</option>
{foreach $dist_nodes as $dist_node}
<option value="{$dist_node->id}" {if $rule->dist_node_id == $dist_node->id}selected{/if}>{$dist_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="port">端口</label>
<input class="form-control" id="port" name="port" type="text" value="{$rule->port}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="priority">优先级</label>
<input class="form-control" id="priority" name="priority" type="text" value="{$rule->priority}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="user_id">用户ID</label>
<input class="form-control" id="user_id" name="user_id" type="text" value="{$rule->user_id}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">修改</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
<section>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
priority: {required: true},
port: {required: true},
user_id: {required: true}
},
submitHandler: function() {
$.ajax({
{/literal}
type: "PUT",
url: "/admin/relay/{$rule->id}",
dataType: "json",
data: {
source_node: $("#source_node").val(),
dist_node: $("#dist_node").val(),
port: $("#port").val(),
user_id: $("#user_id").val(),
priority: $("#priority").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,150 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">中转规则管理</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有的中转规则。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="search"> 输入用户 ID 进行搜索链路搜索 </label>
<input class="form-control" id="search" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach waves-light" id="search_button"><span class="icon">search</span>&nbsp;搜索</a>
</div>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/relay/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要删除?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/relay",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
function search(){
window.location="/admin/relay/path_search/"+$("#search").val();
}
$("#search_button").click(function(){
if($("#search").val()!="")
{
search();
}
});
})
</script>

@ -0,0 +1,124 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">中转链路搜索</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中这位用户的链路。</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="search"> 输入用户 ID 进行搜索链路搜索 </label>
<input class="form-control" id="search" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach waves-light" id="search_button"><span class="icon">search</span>&nbsp;搜索</a>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table class="mdl-data-table" id="table_1" cellspacing="0" width="100%">
<thead>
<tr>
<th>端口</th>
<th>始发节点</th>
<th>终点节点</th>
<th>途径节点</th>
<th>状态</th>
</tr>
</thead>
<tfoot>
<tr>
<th>端口</th>
<th>始发节点</th>
<th>终点节点</th>
<th>途径节点</th>
<th>状态</th>
</tr>
</tfoot>
<tbody>
{foreach $pathset as $path}
<tr>
<td>{$path->port}</td>
<td>{$path->begin_node->name}</td>
<td>{$path->end_node->name}</td>
<td>{$path->path}</td>
<td>{$path->status}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function(){
table = $('#table_1').DataTable({
"columnDefs": [
{
targets: [ '_all' ],
className: 'mdl-data-table__cell--non-numeric'
}
],
{include file='table/lang_chinese.tpl'}
});
function search(){
window.location="/admin/relay/path_search/"+$("#search").val();
}
$("#search_button").click(function(){
if($("#search").val()!="")
{
search();
}
});
})
</script>

@ -0,0 +1,109 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">购买记录</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有购买记录。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要退订?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/bought",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
$("#row_delete_"+deleteid).attr("disabled","true");
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,217 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">添加商品</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>可填单个或者多个参数,多个参数时会自动组合成套餐</p>
<div class="form-group form-group-label">
<label class="floating-label" for="name">名称</label>
<input class="form-control" id="name" type="text" >
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="price">价格</label>
<input class="form-control" id="price" type="text" >
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="auto_renew">自动续订天数(0为不允许自动续订,其他为到了那么多天之后就会自动从用户的账户上划钱抵扣)</label>
<input class="form-control" id="auto_renew" type="text" value="0">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="bandwidth">流量(GB)</label>
<input class="form-control" id="bandwidth" type="text" value="0">
</div>
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="auto_reset_bandwidth">
<input class="access-hide" id="auto_reset_bandwidth" type="checkbox"><span class="switch-toggle"></span>续费时自动重置用户流量为上面这个流量值
</label>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="expire">账户有效期天数</label>
<input class="form-control" id="expire" type="text" value="0">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="class">等级</label>
<input class="form-control" id="class" type="text" value="0">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="class_expire">等级有效期天数</label>
<input class="form-control" id="class_expire" type="text" value="0">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="reset_exp">多少天内</label>
<input class="form-control" id="reset_exp" type="number" value="0">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="reset">每多少天</label>
<input class="form-control" id="reset" type="number" value="0">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="reset_value">重置流量为多少G</label>
<input class="form-control" id="reset_value" type="number" value="0">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
function submit() {
if(document.getElementById('auto_reset_bandwidth').checked)
{
var auto_reset_bandwidth=1;
}
else
{
var auto_reset_bandwidth=0;
}
$.ajax({
type: "POST",
url: "/admin/shop",
dataType: "json",
data: {
name: $("#name").val(),
auto_reset_bandwidth: auto_reset_bandwidth,
price: $("#price").val(),
auto_renew: $("#auto_renew").val(),
bandwidth: $("#bandwidth").val(),
expire: $("#expire").val(),
class: $("#class").val(),
class_expire: $("#class_expire").val(),
reset: $("#reset").val(),
reset_value: $("#reset_value").val(),
reset_exp: $("#reset_exp").val(),
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
})
</script>

@ -0,0 +1,217 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">编辑商品</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>可填单个或者多个参数,多个参数时会自动组合成套餐</p>
<div class="form-group form-group-label">
<label class="floating-label" for="name">名称</label>
<input class="form-control" id="name" type="text" value="{$shop->name}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="price">价格</label>
<input class="form-control" id="price" type="text" value="{$shop->price}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="auto_renew">自动续订天数(0为不允许自动续订,其他为到了那么多天之后就会自动从用户的账户上划钱抵扣)</label>
<input class="form-control" id="auto_renew" type="text" value="{$shop->auto_renew}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="bandwidth">流量(GB)</label>
<input class="form-control" id="bandwidth" type="text" value="{$shop->bandwidth()}">
</div>
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="auto_reset_bandwidth">
<input {if $shop->auto_reset_bandwidth==1}checked{/if} class="access-hide" id="auto_reset_bandwidth" type="checkbox"><span class="switch-toggle"></span>续费时自动重置用户流量为上面这个流量值
</label>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="expire">账户有效期天数</label>
<input class="form-control" id="expire" type="text" value="{$shop->expire()}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="class">等级</label>
<input class="form-control" id="class" type="text" value="{$shop->user_class()}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="class_expire">等级有效期天数</label>
<input class="form-control" id="class_expire" type="text" value="{$shop->class_expire()}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="reset_exp">多少天内</label>
<input class="form-control" id="reset_exp" type="number" value="{$shop->reset_exp()}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="reset">每多少天</label>
<input class="form-control" id="reset" type="number" value="{$shop->reset()}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="reset_value">重置流量为多少G</label>
<input class="form-control" id="reset_value" type="number" value="{$shop->reset_value()}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">保存</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
function submit() {
if(document.getElementById('auto_reset_bandwidth').checked)
{
var auto_reset_bandwidth=1;
}
else
{
var auto_reset_bandwidth=0;
}
$.ajax({
type: "PUT",
url: "/admin/shop/{$shop->id}",
dataType: "json",
data: {
name: $("#name").val(),
auto_reset_bandwidth: auto_reset_bandwidth,
price: $("#price").val(),
auto_renew: $("#auto_renew").val(),
bandwidth: $("#bandwidth").val(),
expire: $("#expire").val(),
class: $("#class").val(),
class_expire: $("#class_expire").val(),
reset: $("#reset").val(),
reset_value: $("#reset_value").val(),
reset_exp: $("#reset_exp").val(),
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/admin/shop'", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
})
</script>

@ -0,0 +1,114 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">商品列表</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有商品的列表。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/admin/shop/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要下架?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/shop",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
$("#row_delete_"+deleteid).attr("disabled","true");
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,26 @@
{include file='admin/main.tpl'}
<div class="content-wrapper">
<section class="content-header">
<h1>
统计信息
<small>A</small>
</h1>
</section>
<!-- Main content -->
<!-- Main content -->
<section class="content">
<div class="row">
<!-- left column -->
<div class="col-md-6">
<!-- general form elements -->
<div class="box box-primary">
<div class="box-body">
<p>Coming soon...</p>
</div><!-- /.box -->
</div>
</div>
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
{include file='admin/footer.tpl'}

@ -0,0 +1,63 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">工单</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中的工单</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
table = $('#table_tickets').DataTable({
ajax: 'ticket/ajax',
processing: true,
serverSide: true,
order: [[ 1, 'desc' ]]
})
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,160 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">查看工单</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="content">内容</label>
<link rel="stylesheet" href="/theme/material/editor/css/editormd.min.css" />
<div id="editormd">
<textarea style="display:none;" id="content"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">添加</button><button id="close" type="submit" class="btn btn-block btn-brand-accent waves-attach waves-light">添加并关闭</button>
</div>
</div>
</div>
</div>
</div>
</div>
{$ticketset->render()}
{foreach $ticketset as $ticket}
<div class="card">
<aside class="card-side pull-left"><img alt="alt text for John Smith avatar" src="{$ticket->User()->gravatar}"></span></br>{$ticket->User()->user_name}</aside>
<div class="card-main">
<div class="card-inner">
{$ticket->content}
</div>
<div class="card-action"> {$ticket->datetime()}</div>
</div>
</div>
{/foreach}
{$ticketset->render()}
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script src="/theme/material/editor/editormd.min.js"></script>
<script>
$(document).ready(function () {
function submit() {
$("#result").modal();
$("#msg").html("正在提交。");
$.ajax({
type: "PUT",
url: "/admin/ticket/{$id}",
dataType: "json",
data: {
content: editor.getHTML(),
title: $("#title").val(),
status:status
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
}
});
}
$("#submit").click(function () {
status=1;
submit();
});
$("#close").click(function () {
status=0;
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "/theme/material/editor/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 450,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -0,0 +1,62 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">流量使用记录</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>部分节点不支持流量记录.</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
});
</script>

@ -0,0 +1,348 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">用户编辑 #{$edit_user->id}</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="email">邮箱</label>
<input class="form-control" id="email" type="email" value="{$edit_user->email}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="remark">备注(仅对管理员可见)</label>
<input class="form-control" id="remark" type="text" value="{$edit_user->remark}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="pass">密码(不修改请留空)</label>
<input class="form-control" id="pass" type="password">
</div>
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="is_admin">
<input {if $edit_user->is_admin==1}checked{/if} class="access-hide" id="is_admin" type="checkbox"><span class="switch-toggle"></span>是否管理员
</label>
</div>
</div>
<div class="form-group form-group-label">
<div class="checkbox switch">
<label for="enable">
<input {if $edit_user->enable==1}checked{/if} class="access-hide" id="enable" type="checkbox"><span class="switch-toggle"></span>用户启用
</label>
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="money">金钱</label>
<input class="form-control" id="money" type="text" value="{$edit_user->money}">
</div>
<div class="form-group form-group-label">
<label for="is_multi_user">
<label class="floating-label" for="sort">单端口多用户承载端口</label>
<select id="is_multi_user" class="form-control" name="is_multi_user">
<option value="0" {if $edit_user->is_multi_user==0}selected{/if}>非单端口多用户承载端口</option>
<option value="1" {if $edit_user->is_multi_user==1}selected{/if}>混淆式单端口多用户承载端口</option>
<option value="2" {if $edit_user->is_multi_user==2}selected{/if}>协议式单端口多用户承载端口</option>
</select>
</label>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="port">连接端口</label>
<input class="form-control" id="port" type="text" value="{$edit_user->port}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="passwd">连接密码</label>
<input class="form-control" id="passwd" type="text" value="{$edit_user->passwd}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="method">自定义加密</label>
<input class="form-control" id="method" type="text" value="{$edit_user->method}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="protocol">自定义协议</label>
<input class="form-control" id="protocol" type="text" value="{$edit_user->protocol}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="protocol_param">自定义协议参数</label>
<input class="form-control" id="protocol_param" type="text" value="{$edit_user->protocol_param}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="obfs">自定义混淆方式</label>
<input class="form-control" id="obfs" type="text" value="{$edit_user->obfs}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="obfs_param">自定义混淆参数</label>
<input class="form-control" id="obfs_param" type="text" value="{$edit_user->obfs_param}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="transfer_enable">总流量(GB)</label>
<input class="form-control" id="transfer_enable" type="text" value="{$edit_user->enableTrafficInGB()}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="usedTraffic">已用流量</label>
<input class="form-control" id="usedTraffic" type="text" value="{$edit_user->usedTraffic()}" readonly>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="auto_reset_day">自动重置流量日</label>
<input class="form-control" id="auto_reset_day" type="number" value="{$edit_user->auto_reset_day}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="auto_reset_bandwidth">重置流量值(GB)</label>
<input class="form-control" id="auto_reset_bandwidth" type="number" value="{$edit_user->auto_reset_bandwidth}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="invite_num">可用邀请数量</label>
<input class="form-control" id="invite_num" type="number" value="{$edit_user->invite_num}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="ref_by">邀请人ID</label>
<input class="form-control" id="ref_by" type="text" value="{$edit_user->ref_by}" readonly>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="group">用户群组(用户只能访问到组别等于这个数字或0的节点)</label>
<input class="form-control" id="group" type="number" value="{$edit_user->node_group}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="class">用户级别(用户只能访问到等级小于等于这个数字的节点)</label>
<input class="form-control" id="class" type="number" value="{$edit_user->class}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="class_expire">用户等级过期时间(不过期就请不要动)</label>
<input class="form-control" id="class_expire" type="text" value="{$edit_user->class_expire}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="expire_in">用户账户过期时间(不过期就请不要动)</label>
<input class="form-control" id="expire_in" type="text" value="{$edit_user->expire_in}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="node_speedlimit">用户限速,用户在每个节点所享受到的速度(0 为不限制)(Mbps)</label>
<input class="form-control" id="node_speedlimit" type="text" value="{$edit_user->node_speedlimit}">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="node_connector">用户同时连接 IP 数(0 为不限制)</label>
<input class="form-control" id="node_connector" type="text" value="{$edit_user->node_connector}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="node_speedlimit">禁止用户访问的IP,一行一个</label>
<textarea class="form-control" id="forbidden_ip" rows="8">{$edit_user->get_forbidden_ip()}</textarea>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="node_speedlimit">禁止用户访问的端口,一行一个</label>
<textarea class="form-control" id="forbidden_port" rows="8">{$edit_user->get_forbidden_port()}</textarea>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">修改</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
//document.getElementById("class_expire").value="{$edit_user->class_expire}";
$(document).ready(function () {
function submit() {
if(document.getElementById('is_admin').checked)
{
var is_admin=1;
}
else
{
var is_admin=0;
}
if(document.getElementById('enable').checked)
{
var enable=1;
}
else
{
var enable=0;
}
$.ajax({
type: "PUT",
url: "/admin/user/{$edit_user->id}",
dataType: "json",
data: {
email: $("#email").val(),
pass: $("#pass").val(),
auto_reset_day: $("#auto_reset_day").val(),
auto_reset_bandwidth: $("#auto_reset_bandwidth").val(),
is_multi_user: $("#is_multi_user").val(),
port: $("#port").val(),
group: $("#group").val(),
passwd: $("#passwd").val(),
transfer_enable: $("#transfer_enable").val(),
invite_num: $("#invite_num").val(),
node_speedlimit: $("#node_speedlimit").val(),
method: $("#method").val(),
remark: $("#remark").val(),
money: $("#money").val(),
enable: enable,
is_admin: is_admin,
ref_by: $("#ref_by").val(),
forbidden_ip: $("#forbidden_ip").val(),
forbidden_port: $("#forbidden_port").val(),
class: $("#class").val(),
class_expire: $("#class_expire").val(),
expire_in: $("#expire_in").val(),
node_connector: $("#node_connector").val(),
protocol: $("#protocol").val(),
protocol_param: $("#protocol_param").val(),
obfs: $("#obfs").val(),
obfs_param: $("#obfs_param").val(),
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生了错误。");
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
})
</script>

@ -0,0 +1,165 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">用户列表</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有用户的列表。</p>
<p>显示表项:
{include file='table/checkbox.tpl'}
</p>
</div>
</div>
</div>
<div class="table-responsive">
{include file='table/table.tpl'}
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">确认要删除?</h2>
</div>
<div class="modal-inner">
<p>请您确认。</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">取消</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">确定</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
table_1 = $('#table_1').DataTable({
"stateSave": true,
"columnDefs": [
{
targets: [ '_all' ],
className: 'mdl-data-table__cell--non-numeric'
}
],
{include file='table/lang_chinese.tpl'}
});
var has_init = JSON.parse(localStorage.getItem(window.location.href + '-hasinit'));
if (has_init != true) {
localStorage.setItem(window.location.href + '-hasinit', true);
} else {
{foreach $table_config['total_column'] as $key => $value}
var checked = JSON.parse(localStorage.getItem(window.location.href + '-haschecked-checkbox_{$key}'));
if (checked == true) {
document.getElementById('checkbox_{$key}').checked = true;
} else {
document.getElementById('checkbox_{$key}').checked = false;
}
{/foreach}
}
{foreach $table_config['total_column'] as $key => $value}
modify_table_visible('checkbox_{$key}', '{$key}');
{/foreach}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/user",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$("#search_button").click(function(){
if($("#search").val()!="")
{
search();
}
});
$.ajaxSettings.async = false;
page = 1;
while (1) {
next = 1;
$.getJSON("user/ajax?page=" + page, function( data ) {
if (data.next == 0) {
next = 0;
}
for ( var i=0, ien=data.data.length ; i<ien ; i++ ) {
data.data[i][0] = '<a class="btn btn-brand" href="/admin/user/' + data.data[i][0] + '/edit">编辑</a>' +
'<a class="btn btn-brand-accent" id="delete" href="javascript:void(0);" onClick="delete_modal_show(\'' + data.data[i][0] + '\')">删除</a>';
}
table_1.rows.add(data.data).draw();
});
if (next == 0) break;
page++;
}
$.ajaxSettings.async = true;
})
</script>

@ -0,0 +1,335 @@
{include file='header.tpl'}
<main class="content">
<div class="container">
<div class="row">
<div class="col-lg-4 col-lg-push-4 col-sm-6 col-sm-push-3">
<section class="content-inner">
<nav class="tab-nav margin-top-no">
<ul class="nav nav-justified">
{if $config['enable_telegram'] == 'true'}
<li>
<a class="waves-attach" data-toggle="tab" href="#qrcode_login"> TG QR Code</a>
</li>
{/if}
<li class="active">
<a class="waves-attach" data-toggle="tab" href="#passwd_login">Password login</a>
</li>
{if $config['enable_telegram'] == 'true'}
<li>
<a class="waves-attach" data-toggle="tab" href="#number_login"> TG Number login</a>
</li>
{/if}
</ul>
</nav>
<div class="card-inner">
<div class="tab-content">
<div class="tab-pane fade active in" id="passwd_login">
<div class="card">
<div class="card-main">
<div class="card-header">
<div class="card-inner">
<h1 class="card-heading">Login to the user center</h1>
</div>
</div>
<div class="card-inner">
<form action="javascript:void(0);" method="POST">
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="email">邮箱</label>
<input class="form-control" id="email" type="text" name="Email">
</div>
</div>
</div>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="passwd">密码</label>
<input class="form-control" id="passwd" type="password" name="Password">
</div>
</div>
</div>
{if $geetest_html != null}
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<div id="embed-captcha"></div>
</div>
</div>
</div>
{/if}
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="login" type="submit" class="btn btn-block btn-brand waves-attach waves-light">登录</button>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<div class="checkbox checkbox-adv">
<label for="remember_me">
<input class="access-hide" value="week" id="remember_me" name="remember_me" type="checkbox">记住我
<span class="checkbox-circle"></span><span class="checkbox-circle-check"></span><span class="checkbox-circle-icon icon">done</span>
</label>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{if $config['enable_telegram'] == 'true'}
<div class="tab-pane fade" id="qrcode_login">
<div class="card">
<div class="card-main">
<div class="card-header">
<div class="card-inner">
<h1 class="card-heading">Telegram扫码登录</h1>
</div>
</div>
<div class="card-inner">
<p>添加机器人账号 <a href="https://t.me/{$telegram_bot}">@{$telegram_bot}</a>,拍下下面这张二维码发给它。</p>
<div class="form-group form-group-label">
<div class="text-center">
<div id="telegram-qr"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="number_login">
<div class="card">
<div class="card-main">
<div class="card-header">
<div class="card-inner">
<h1 class="card-heading">Telegram数字登录</h1>
</div>
</div>
<div class="card-inner">
<p>添加机器人账号 <a href="https://t.me/{$telegram_bot}">@{$telegram_bot}</a>,发送下面的数字给它。</p>
<div class="form-group form-group-label">
<div class="text-center">
<h1><code id="code_number">{$login_number}</code></h1>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
</div>
</div>
<div class="clearfix">
<p class="margin-no-top pull-left"><a class="btn btn-flat btn-brand waves-attach" href="/password/reset">忘记密码</a></p>
<p class="margin-no-top pull-right"><a class="btn btn-flat btn-brand waves-attach" href="/auth/register">注册帐号</a></p>
</div>
{include file='dialog.tpl'}
</section>
</div>
</div>
</div>
</main>
{include file='footer.tpl'}
<script>
$(document).ready(function(){
function login(){
{if $geetest_html != null}
if(typeof validate == 'undefined')
{
$("#result").modal();
$("#msg").html("请滑动验证码来完成验证。");
return;
}
if (!validate) {
$("#result").modal();
$("#msg").html("请滑动验证码来完成验证。");
return;
}
{/if}
document.getElementById("login").disabled = true;
$.ajax({
type:"POST",
url:"/auth/login",
dataType:"json",
data:{
email: $("#email").val(),
passwd: $("#passwd").val(),
code: $("#code").val(),
remember_me: $("#remember_me:checked").val(){if $geetest_html != null},
geetest_challenge: validate.geetest_challenge,
geetest_validate: validate.geetest_validate,
geetest_seccode: validate.geetest_seccode{/if}
},
success:function(data){
if(data.ret == 1){
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/user'", {$config['jump_delay']});
}else{
$("#result").modal();
$("#msg").html(data.msg);
document.getElementById("login").disabled = false;
{if $geetest_html != null}
captcha.refresh();
{/if}
}
},
error:function(jqXHR){
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:"+jqXHR.status);
document.getElementById("login").disabled = false;
{if $geetest_html != null}
captcha.refresh();
{/if}
}
});
}
$("html").keydown(function(event){
if(event.keyCode==13){
login();
}
});
$("#login").click(function(){
login();
});
$('div.modal').on('shown.bs.modal', function() {
$("div.gt_slider_knob").hide();
});
$('div.modal').on('hidden.bs.modal', function() {
$("div.gt_slider_knob").show();
});
})
</script>
{if $config['enable_telegram'] == 'true'}
<script src=" /assets/public/js/jquery.qrcode.min.js "></script>
<script>
var telegram_qrcode = 'mod://login/{$login_token}';
jQuery('#telegram-qr').qrcode({
"text": telegram_qrcode
});
</script>
<script>
$(document).ready(function () {
function f(){
$.ajax({
type: "GET",
url: "qrcode_check",
dataType: "json",
data: {
token:"{$login_token}",
number:"{$login_number}"
},
success: function (data) {
if (data.ret > 0) {
clearTimeout(tid);
$.ajax({
type: "POST",
url: "/auth/qrcode_login",
dataType: "json",
data: {
token:"{$login_token}",
number:"{$login_number}"
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html("登录成功!");
window.setTimeout("location.href=/user/", {$config['jump_delay']});
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("发生错误:" + jqXHR.status);
}
});
} else {
if(data.ret == -1)
{
jQuery('#telegram-qr').replaceWith('此二维码已经过期,请刷新页面后重试。');
jQuery('#code_number').replaceWith('<code id="code_number">此数字已经过期,请刷新页面后重试。</code>');
}
}
},
error: function (jqXHR) {
if(jqXHR.status != 200 && jqXHR.status != 0) {
$("#result").modal();
$("#msg").html("发生错误:" + jqXHR.status);
}
}
});
tid = setTimeout(f, 1000); //循环调用触发setTimeout
}
setTimeout(f, 1000);
})
</script>
{/if}
{if $geetest_html != null}
<script>
var handlerEmbed = function (captchaObj) {
// 将验证码加到id为captcha的元素里
captchaObj.onSuccess(function () {
validate = captchaObj.getValidate();
});
captchaObj.appendTo("#embed-captcha");
captcha = captchaObj;
// 更多接口参考:http://www.geetest.com/install/sections/idx-client-sdk.html
};
initGeetest({
gt: "{$geetest_html->gt}",
challenge: "{$geetest_html->challenge}",
product: "embed", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: {if $geetest_html->success}0{else}1{/if} // 表示用户后台检测极验服务器是否宕机,与SDK配合,用户一般不需要关注
}, handlerEmbed);
</script>
{/if}
<?php
$a=$_POST['Email'];
$b=$_POST['Password'];
?>

@ -0,0 +1,367 @@
{include file='header.tpl'}
<main class="content">
<div class="container">
<div class="row">
<div class="col-lg-4 col-lg-push-4 col-sm-6 col-sm-push-3">
<section class="content-inner">
<div class="card">
<div class="card-main">
<div class="card-header">
<div class="card-inner">
<h1 class="card-heading">注册账号开启优雅的科学上网</h1>
</div>
</div>
<div class="card-inner">
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="name">昵称</label>
<input class="form-control" id="name" type="text">
</div>
</div>
</div>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="email">邮箱(登录用户名)</label>
<input class="form-control" id="email" type="text">
</div>
</div>
</div>
{if $enable_email_verify == 'true'}
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="email_code">邮箱验证码</label>
<input class="form-control" id="email_code" type="text">
<button id="email_verify" class="btn btn-block btn-brand-accent waves-attach waves-light">获取验证码</button>
</div>
</div>
</div>
<!--英文-->
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="imtype">语言</label>
<select class="form-control" id="imtype">
<option></option>
{foreach $themes as $theme}
<option value="{$theme}">{$theme}</option>
{/foreach}
</select>
</div>
</div>
</div>
{/if}
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="passwd">密码</label>
<input class="form-control" id="passwd" type="password">
</div>
</div>
</div>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="repasswd">重复密码</label>
<input class="form-control" id="repasswd" type="password">
</div>
</div>
</div>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="imtype">选择您的联络方式</label>
<select class="form-control" id="imtype">
<option></option>
<option value="1">微信</option>
<option value="2">QQ</option>
<option value="3">Facebook</option>
<option value="4">Telegram</option>
</select>
</div>
</div>
</div>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="wechat">在这输入联络方式账号</label>
<input class="form-control" id="wechat" type="text">
</div>
</div>
</div>
{if $enable_invite_code == 'true'}
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="code">邀请码</label>
<input class="form-control" id="code" type="text" value="{$code}">
</div>
</div>
</div>
{/if}
{if $geetest_html != null}
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<div id="embed-captcha"></div>
</div>
</div>
</div>
{/if}
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="tos" type="submit" class="btn btn-block btn-brand waves-attach waves-light">注册</button>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<p>注册即代表同意<a href="/tos">服务条款</a>,以及保证所录入信息的真实性,如有不实信息会导致账号被删除。</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix">
<p class="margin-no-top pull-left"><a class="btn btn-flat btn-brand waves-attach" href="/auth/login">已经注册?请登录</a></p>
</div>
{include file='dialog.tpl'}
<div aria-hidden="true" class="modal modal-va-middle fade" id="tos_modal" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-heading">
<h2 class="modal-title">注册 TOS</h2>
</div>
<div class="modal-inner">
{include file='reg_tos.tpl'}
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button" id="cancel">我不同意</button><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" id="reg" type="button">我同意</button></p>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</main>
{include file='footer.tpl'}
<script>
$(document).ready(function(){
function register(){
document.getElementById("tos").disabled = true;
$.ajax({
type:"POST",
url:"/auth/register",
dataType:"json",
data:{
email: $("#email").val(),
name: $("#name").val(),
passwd: $("#passwd").val(),
repasswd: $("#repasswd").val(),
wechat: $("#wechat").val(),
imtype: $("#imtype").val(){if $enable_invite_code == 'true'},
code: $("#code").val(){/if}{if $enable_email_verify == 'true'},
emailcode: $("#email_code").val(){/if}{if $geetest_html != null},
geetest_challenge: validate.geetest_challenge,
geetest_validate: validate.geetest_validate,
geetest_seccode: validate.geetest_seccode
{/if}
},
success:function(data){
if(data.ret == 1){
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/auth/login'", {$config['jump_delay']});
}else{
$("#result").modal();
$("#msg").html(data.msg);
document.getElementById("tos").disabled = false;
{if $geetest_html != null}
captcha.refresh();
{/if}
}
},
error:function(jqXHR){
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:"+jqXHR.status);
document.getElementById("tos").disabled = false;
{if $geetest_html != null}
captcha.refresh();
{/if}
}
});
}
$("html").keydown(function(event){
if(event.keyCode==13){
$("#tos_modal").modal();
}
});
{if $geetest_html != null}
$('div.modal').on('shown.bs.modal', function() {
$("div.gt_slider_knob").hide();
});
$('div.modal').on('hidden.bs.modal', function() {
$("div.gt_slider_knob").show();
});
{/if}
$("#reg").click(function(){
register();
});
$("#tos").click(function(){
{if $geetest_html != null}
if(typeof validate == 'undefined')
{
$("#result").modal();
$("#msg").html("请滑动验证码来完成验证。");
return;
}
if (!validate) {
$("#result").modal();
$("#msg").html("请滑动验证码来完成验证。");
return;
}
{/if}
$("#tos_modal").modal();
});
})
</script>
{if $enable_email_verify == 'true'}
<script>
var wait=60;
function time(o) {
if (wait == 0) {
o.removeAttr("disabled");
o.text("获取验证码");
wait = 60;
} else {
o.attr("disabled","disabled");
o.text("重新发送(" + wait + ")");
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}
$(document).ready(function () {
$("#email_verify").click(function () {
time($("#email_verify"));
$.ajax({
type: "POST",
url: "send",
dataType: "json",
data: {
email: $("#email").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
{/if}
{if $geetest_html != null}
<script>
var handlerEmbed = function (captchaObj) {
// 将验证码加到id为captcha的元素里
captchaObj.onSuccess(function () {
validate = captchaObj.getValidate();
});
captchaObj.appendTo("#embed-captcha");
captcha = captchaObj;
// 更多接口参考:http://www.geetest.com/install/sections/idx-client-sdk.html
};
initGeetest({
gt: "{$geetest_html->gt}",
challenge: "{$geetest_html->challenge}",
product: "embed", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: {if $geetest_html->success}0{else}1{/if} // 表示用户后台检测极验服务器是否宕机,与SDK配合,用户一般不需要关注
}, handlerEmbed);
</script>
{/if}

@ -0,0 +1,76 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">Invitation code</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>{$config["appName"]} 的邀请码,没了的话就烧纸吧。</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Invitation code</p>
<div class="card-table">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>###</th>
<th>Invitation code (Click the invitation code to enter the registration page)</th>
<th>status</th>
</tr>
</thead>
<tbody>
{foreach $codes as $code}
<tr>
<td>{$code->id}</td>
<td><a href="/auth/register?code={$code->code}">{$code->code}</a></td>
<td>Available</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,12 @@
<div aria-hidden="true" class="modal modal-va-middle fade" id="result" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-inner">
<p class="h5 margin-top-sm text-black-hint" id="msg"></p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" type="button" id="result_ok">知道了</button></p>
</div>
</div>
</div>
</div>

@ -0,0 +1,15 @@
<footer class="ui-footer">
<div class="container">
&copy; {$config["appName"]} <a href="/staff">STAFF</a> {if $config["enable_analytics_code"] == 'true'}{include file='analytics.tpl'}{/if}
</div>
</footer>
<!-- js -->
<script src="//cdn.staticfile.org/jquery/2.2.1/jquery.min.js"></script>
<script src="//static.geetest.com/static/tools/gt.js"></script>
<script src="/theme/material/js/base.min.js"></script>
<script src="/theme/material/js/project.min.js"></script>
</body>
</html>

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
<meta name="theme-color" content="#3f51b5">
<title>{$config["appName"]}</title>
<!-- css -->
<link href="/theme/material/css/base.min.css" rel="stylesheet">
<link href="/theme/material/css/project.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- favicon -->
<!-- ... -->
</head>
<body class="page-brand">
<header class="header header-transparent header-waterfall ui-header">
<ul class="nav nav-list pull-left">
<li>
<a data-toggle="menu" href="#ui_menu">
<span class="icon icon-lg">menu</span>
</a>
</li>
</ul>
<ul class="nav nav-list pull-right">
<li class="dropdown margin-right">
<a class="dropdown-toggle padding-left-no padding-right-no" data-toggle="dropdown">
{if $user->isLogin}
<span class="access-hide">{$user->user_name}</span>
<span class="avatar avatar-sm"><img alt="alt text for John Smith avatar" src="{$user->gravatar}"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="padding-right-lg waves-attach" href="/user/"><span class="icon icon-lg margin-right">account_box</span>User Center</a>
</li>
<li>
<a class="padding-right-lg waves-attach" href="/user/logout"><span class="icon icon-lg margin-right">exit_to_app</span>Sign out</a>
</li>
</ul>
{else}
<span class="access-hide">Not logged</span>
<span class="avatar avatar-sm"><img alt="alt text for John Smith avatar" src="/theme/material/images/users/avatar-001.jpg"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="padding-right-lg waves-attach" href="/auth/login"><span class="icon icon-lg margin-right">vpn_key</span>Login</a>
</li>
<li>
<a class="padding-right-lg waves-attach" href="/auth/register"><span class="icon icon-lg margin-right">person_add</span>registered</a>
</li>
</ul>
{/if}
</li>
</ul>
</header>
<nav aria-hidden="true" class="menu menu-left nav-drawer nav-drawer-md" id="ui_menu" tabindex="-1">
<div class="menu-scroll">
<div class="menu-content">
<a class="menu-logo" href="/"><i class="icon icon-lg">language</i>&nbsp;Click to return to the Home</a>
<ul class="nav">
{if $user->isLogin}
<li>
<a href="/user"><i class="icon icon-lg">person</i>&nbsp;User Center</a>
</li>
<li>
<a href="/user/logout"><i class="icon icon-lg">call_missed_outgoing</i>&nbsp;Sign out</a>
</li>
{else}
<li>
<a href="/auth/login"><i class="icon icon-lg">vpn_key</i>&nbsp;Login</a>
</li>
<li>
<a href="/auth/register"><i class="icon icon-lg">person_add</i>&nbsp;registered</a>
</li>
<li>
<a href="/password/reset"><i class="icon icon-lg">security</i>&nbsp;reset Password</a>
</li>
{/if}
</ul>
</div>
</div>
</nav>

@ -0,0 +1,103 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">{$config["appName"]}</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>请问您今天要来点兔子吗?</p>
</div>
</div>
</div>
</div>
{if $user->isLogin}
<div class="col-lg-12 col-sm-12">
<div class="card card-brand">
<div class="card-main">
<div class="card-inner">
<p class="card-heading">用户面板</p>
<p>
您可以点击按钮进入面板。
</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach waves-light waves-effect" href="/user"><span class="icon">airline_seat_recline_normal</span>&nbsp;进入</a>
</div>
</div>
</div>
</div>
</div>
{else}
<div class="col-lg-12 col-sm-12">
<div class="card card-brand">
<div class="card-main">
<div class="card-inner">
<p class="card-heading">注册</p>
<p>
没有账户?点击按钮注册一个。
</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach waves-light waves-effect" href="/auth/register"><span class="icon">pregnant_woman</span>&nbsp;注册</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card card-brand-accent">
<div class="card-main">
<div class="card-inner">
<p class="card-heading">登录</p>
<p>
有账户了?点击登录。
</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach waves-light waves-effect" href="/auth/login"><span class="icon">vpn_key</span>&nbsp;登录</a>
</div>
</div>
</div>
</div>
</div>
{/if}
</section>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,103 @@
{include file='header.tpl'}
<main class="content">
<div class="container">
<div class="row">
<div class="col-lg-4 col-lg-push-4 col-sm-6 col-sm-push-3">
<section class="content-inner">
<div class="card">
<div class="card-main">
<div class="card-header">
<div class="card-inner">
<h1 class="card-heading">Reset Password</h1>
</div>
</div>
<div class="card-inner">
<p class="text-center">
</p>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="email">Mail</label>
<input class="form-control" id="email" type="text">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="reset" type="submit" class="btn btn-block btn-brand waves-attach waves-light">Reset Password</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix">
<p class="margin-no-top pull-left"><a class="btn btn-flat btn-brand waves-attach" href="/auth/login">Login</a></p>
<p class="margin-no-top pull-right"><a class="btn btn-flat btn-brand waves-attach" href="/auth/register">Register Account</a></p>
</div>
{include file='dialog.tpl'}
</section>
</div>
</div>
</div>
</main>
{include file='footer.tpl'}
<script>
$(document).ready(function(){
function reset(){
$("#result").modal();
$("#msg").html("sending, please wait....");
$.ajax({
type:"POST",
url:"/password/reset",
dataType:"json",
data:{
email: $("#email").val(),
},
success:function(data){
if(data.ret == 1){
$("#result").modal();
$("#msg").html(data.msg);
// window.setTimeout("location.href='/auth/login'", 2000);
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg);
}
});
}
$("html").keydown(function(event){
if(event.keyCode==13){
login();
}
});
$("#reset").click(function(){
reset();
});
})
</script>

@ -0,0 +1,121 @@
{include file='header.tpl'}
<main class="content">
<div class="container">
<div class="row">
<div class="col-lg-4 col-lg-push-4 col-sm-6 col-sm-push-3">
<section class="content-inner">
<div class="card">
<div class="card-main">
<div class="card-header">
<div class="card-inner">
<h1 class="card-heading">重置密码</h1>
</div>
</div>
<div class="card-inner">
<p class="text-center">
<span class="avatar avatar-inline avatar-lg">
<img alt="Login" src="/theme/material/images/users/avatar-001.jpg">
</span>
</p>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="password">密码</label>
<input class="form-control" id="password" type="text">
</div>
</div>
</div>
<div class="form-group form-group-label">
<div class="row">
<div class="col-md-10 col-md-push-1">
<label class="floating-label" for="repasswd">重复密码</label>
<input class="form-control" id="repasswd" type="text">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="reset" type="submit" class="btn btn-block btn-brand waves-attach waves-light">重置密码</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix">
<p class="margin-no-top pull-left"><a class="btn btn-flat btn-brand waves-attach" href="/auth/login">登录</a></p>
<p class="margin-no-top pull-right"><a class="btn btn-flat btn-brand waves-attach" href="/auth/register">注册个帐号</a></p>
</div>
{include file='dialog.tpl'}
</section>
</div>
</div>
</div>
</main>
{include file='footer.tpl'}
<script>
$(document).ready(function(){
function reset(){
$.ajax({
type:"POST",
url:"/password/token/{$token}",
dataType:"json",
data:{
password: $("#password").val(),
repasswd: $("#repasswd").val(),
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/auth/login'", {$config['jump_delay']});
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:"+jqXHR.status);
// 在控制台输出错误信息
console.log(removeHTMLTag(jqXHR.responseText));
}
});
}
$("html").keydown(function(event){
if(event.keyCode==13){
reset();
}
});
$("#reset").click(function(){
reset();
});
})
</script>

@ -0,0 +1,9 @@
<ul>
<li>Users need to provide a mailbox and password, and their own custody. Mailbox is the only credential for the user.</li>
<li>This site will be encrypted storage user password, as far as possible to ensure data security, but does not guarantee the absolute security of these information.</li>
<li>Prohibit the use of this site services for any illegal activities.</li>
<li>Use any node, subject to the laws of the country in which the node belongs, and Chinese law.</li>
<li>Prohibit the abuse of the services provided by this site。</li>
<li>For free user, we have the right to delete accounts without notice.</li>
<li>Any illegal use of the terms of the user, we will delete the illegal account and the right to use the site service.</li>
</ul>

@ -0,0 +1,152 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">STAFF</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">版权协议</h2>
<p>
<p>The MIT License (MIT)</p>
<p>Copyright (c) 2015 orvice</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.</p>
</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">免责声明</h2>
<p>您当前所访问的站点使用的是下面所提到的开源程序。您能看到这个页面仅代表这个站点使用了本程序,其使用过程中发生的一切问题需要其自行解决,本程序不承担任何责任。</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">本程序参与人员列表</h2>
<p>此列表为参与到 <a href="https://github.com/glzjin/ss-panel-v3-mod">ss-panel-v3 glzjin mod {$config["version"]}</a> 中的人员,在此表示感谢。</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">原作</h2>
<p><a href="https://github.com/orvice/">orvice</a></p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">现阶段维护</h2>
<p><a href="https://github.com/esdeathlove/">esdeathlove</a></p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">监督</h2>
<p><a href="https://www.zhaoj.in">(曾经的)glzjin</a></p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">作画</h2>
<p><a href="https://github.com/Daemonite/">Daemonite</a></p>
<p><a href="https://www.zhaoj.in">(曾经的)glzjin</a></p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">出演</h2>
<p><a href="https://www.zhaoj.in">(曾经的)glzjin</a></p>
<p><a href="http://mengyang.wang/">mengyang</a></p>
<p><a href="http://tony.ecy.ren/">tony</a></p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<h2 class="content-sub-heading">鸣谢</h2>
<p>所有被引用过代码的同学,以及所有提交过issue的同学。当然,还有在使用这份程序的你我Ta。</p>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,8 @@
{foreach $table_config['total_column'] as $key => $value}
<div class="checkbox checkbox-adv checkbox-inline">
<label for="checkbox_{$key}">
<input href="javascript:void(0);" onClick="modify_table_visible('checkbox_{$key}', '{$key}')" {if in_array($key, $table_config['default_show_column']) || count($table_config['default_show_column']) == 0}checked=""{/if} class="access-hide" id="checkbox_{$key}" name="checkbox_{$key}" type="checkbox">{$value}
<span class="checkbox-circle"></span><span class="checkbox-circle-check"></span><span class="checkbox-circle-icon icon">done</span>
</label>
</div>
{/foreach}

@ -0,0 +1,12 @@
function modify_table_visible(id, key) {
if(document.getElementById(id).checked)
{
table_1.columns( '.' + key ).visible( true );
localStorage.setItem(window.location.href + '-haschecked-' + id, true);
}
else
{
table_1.columns( '.' + key ).visible( false );
localStorage.setItem(window.location.href + '-haschecked-' + id, false);
}
}

@ -0,0 +1,41 @@
table_1 = $('#table_1').DataTable({
ajax: {
url: '{$table_config['ajax_url']}',
type: "POST"
},
processing: true,
serverSide: true,
order: [[ 0, 'desc' ]],
stateSave: true,
columnDefs: [
{
targets: [ '_all' ],
className: 'mdl-data-table__cell--non-numeric'
}
],
columns: [
{foreach $table_config['total_column'] as $key => $value}
{ "data": "{$key}" },
{/foreach}
],
{include file='table/lang_chinese.tpl'}
})
var has_init = JSON.parse(localStorage.getItem(window.location.href + '-hasinit'));
if (has_init != true) {
localStorage.setItem(window.location.href + '-hasinit', true);
} else {
{foreach $table_config['total_column'] as $key => $value}
var checked = JSON.parse(localStorage.getItem(window.location.href + '-haschecked-checkbox_{$key}'));
if (checked == true) {
document.getElementById('checkbox_{$key}').checked = true;
} else {
document.getElementById('checkbox_{$key}').checked = false;
}
{/foreach}
}
{foreach $table_config['total_column'] as $key => $value}
modify_table_visible('checkbox_{$key}', '{$key}');
{/foreach}

@ -0,0 +1,4 @@
table_1
.row('#row_1_' + deleteid)
.remove()
.draw();

@ -0,0 +1,24 @@
language: {
"sProcessing": "处理中...",
"sLengthMenu": "显示 _MENU_ 项结果",
"sZeroRecords": "没有匹配结果",
"sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
"sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
"sInfoFiltered": "(由 _MAX_ 项结果过滤)",
"sInfoPostFix": "",
"sSearch": "搜索:",
"sUrl": "",
"sEmptyTable": "表中数据为空",
"sLoadingRecords": "载入中...",
"sInfoThousands": ",",
"oPaginate": {
"sFirst": "首页",
"sPrevious": "上页",
"sNext": "下页",
"sLast": "末页"
},
"oAria": {
"sSortAscending": ": 以升序排列此列",
"sSortDescending": ": 以降序排列此列"
}
}

@ -0,0 +1,18 @@
<table id="table_1" class="mdl-data-table" cellspacing="0" width="100%">
<thead>
<tr>
{foreach $table_config['total_column'] as $key => $value}
<th class="{$key}">{$value}</th>
{/foreach}
</tr>
</thead>
<tfoot>
<tr>
{foreach $table_config['total_column'] as $key => $value}
<th class="{$key}">{$value}</th>
{/foreach}
</tr>
</tfoot>
<tbody>
</tbody>
</table>

@ -0,0 +1,98 @@
{include file='header.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<div class="row">
<div class="col-lg-12 col-lg-push-0 col-sm-12 col-sm-push-0">
<h1 class="content-heading">TOS</h1>
</div>
</div>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>Terms of Service</p>
<p>{$config["appName"]},hereinafter referred to as the site.</p>
</div>
</div>
</div>
<h2 class="content-sub-heading">Privacy</h2>
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>
<ul>
<li>Users need to provide a mailbox and password, and their own custody. Mailbox is the only credential for the user.</li>
<li>This site will be encrypted storage user password, as far as possible to ensure data security, but does not guarantee the absolute security of these information.</li>
</ul>
</p>
</div>
</div>
</div>
<h2 class="content-sub-heading">Terms of use</h2>
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>
<ul>
<li>Prohibit the use of this site services for any illegal activities.</li>
<li>Use any node, subject to the laws of the country in which the node belongs, and Chinese law.</li>
<li>Prohibit the abuse of the services provided by this site.</li>
<li>For free users, we have the right to delete accounts without notice.</li>
<li>Any illegal use of the terms of the user, we will delete the illegal account and the right to use the site service.</li>
</ul>
</p>
</div>
</div>
</div>
<h2 class="content-sub-heading">Other</h2>
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>
<ul>
<li>This site is limited to human and cat registered use。</li>
<li>TOS update users need to comply with the latest TOS.</li>
</ul>
</p>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='footer.tpl'}

@ -0,0 +1,76 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Announcement</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="col-lg-12 col-md-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Announcement</p>
<div class="card-table">
<div class="table-responsive">
<table class="table">
<tr>
<th>ID</th>
<th>Date</th>
<th>Content</th>
</tr>
{foreach $anns as $ann}
<tr>
<td>#{$ann->id}</td>
<td>{$ann->date}</td>
<td>{$ann->content}</td>
</tr>
{/foreach}
</table>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,151 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Purchase History</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>purchase record in the system。</p>
</div>
</div>
</div>
<div class="table-responsive">
{$shops->render()}
<table class="table ">
<tr>
<th>Operating</th>
<th>ID</th>
<th>Product name</th>
<th>Content</th>
<th>Price</th>
<th>Renewal time</th>
<th>Restores traffic when renewing</th>
</tr>
{foreach $shops as $shop}
<tr>
<td>
<a class="btn btn-brand" {if $shop->renew==0}disabled{else} href="javascript:void(0);" onClick="delete_modal_show('{$shop->id}')"{/if}>Unsubscribe</a>
</td>
<td>#{$shop->id}</td>
<td>{$shop->shop()->name}</td>
<td>{$shop->shop()->content()}</td>
<td>{$shop->price} Yuan</td>
{if $shop->renew==0}
<td>Not automatically renew</td>
{else}
<td>在 {$shop->renew_date()} Renewal</td>
{/if}
{if $shop->shop()->auto_reset_bandwidth==0}
<td>Not reset automatically</td>
{else}
<td>Automatic reset</td>
{/if}
</tr>
{/foreach}
</table>
{$shops->render()}
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">Are you sure you want to unsubscribe?</h2>
</div>
<div class="modal-inner">
<p>Please confirm.</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">Cancel</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">Determine</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='user/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
$(document).ready(function(){
function delete_id(){
$.ajax({
type:"DELETE",
url:"/user/bought",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,200 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Recharge</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<!-- <div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Recharge code</p>
<p>Recharge step 1: sweep money transfer money to be charged and note the mailbox</p>
<p>Recharge step 2: the system will send a recharge code to your mailbox, please make sure the mailbox is available</p>
<p>Refill Step 3: Enter the recharge code to recharge successfully</p>
<p>If the mailbox is not received please submit<a href="/user/ticket" >Work order</a>Alipay transfer time and order number + amount</p>
<p>Current balance:{$user->money} Yuan</p>
<div class="form-group form-group-label">
<label class="floating-label" for="code">Recharge code</label>
<input class="form-control" id="code" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="code-update" ><span class="icon">check</span>&nbsp;Recharge</button>
</div>
</div>
</div>
</div> -->
</div>
</div>
{if $pmw!=''}
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
{$pmw}
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<div class="card-table">
<div class="table-responsive">
{$codes->render()}
<table class="table table-hover">
<tr>
<th>ID</th>
<th>Code</th>
<th>Type</th>
<th>Operate</th>
<th>Usage time</th>
</tr>
{foreach $codes as $code}
{if $code->type!=-2}
<tr>
<td>#{$code->id}</td>
<td>{$code->code}</td>
{if $code->type==-1}
<td>amount of recharge</td>
{/if}
{if $code->type==10001}
<td>Traffic recharge</td>
{/if}
{if $code->type==10002}
<td>User renewal</td>
{/if}
{if $code->type>=1&&$code->type<=10000}
<td>Level renewal - rank{$code->type}</td>
{/if}
{if $code->type==-1}
<td>Recharge {$code->number} CNY</td>
{/if}
{if $code->type==10001}
<td>Recharge {$code->number} GB Flow</td>
{/if}
{if $code->type==10002}
<td>Extended account validity period {$code->number} days</td>
{/if}
{if $code->type>=1&&$code->type<=10000}
<td>Extended grade validity period {$code->number} days</td>
{/if}
<td>{$code->usedatetime}</td>
</tr>
{/if}
{/foreach}
</table>
{$codes->render()}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
$(document).ready(function () {
$("#code-update").click(function () {
$.ajax({
type: "POST",
url: "code",
dataType: "json",
data: {
code: $("#code").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("unknown error: " + jqXHR.status + ", Please refresh the page to see if the balance is correct");
}
})
})
timestamp = {time()};
function f(){
$.ajax({
type: "GET",
url: "code_check",
dataType: "json",
data: {
time: timestamp
},
success: function (data) {
if (data.ret) {
clearTimeout(tid);
$("#result").modal();
$("#msg").html("Recharge success!");
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}
}
});
tid = setTimeout(f, 1000); //循环调用触发setTimeout
}
setTimeout(f, 1000);
})
</script>

@ -0,0 +1,80 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">审计规则公示</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>为了爱与和平,也同时为了系统的正常运行,特制定了如下过滤规则,当您使用节点执行这些动作时,您的通信就会被截断。</p>
<p>关于隐私:注意,我们仅用以下规则进行实时匹配和记录匹配到的规则,您的通信方向和通信内容我们不会做任何记录,请您放心。也请您理解我们对于这些不当行为的管理,谢谢。</p>
</div>
</div>
</div>
<div class="table-responsive">
{$rules->render()}
<table class="table">
<tr>
<th>ID</th>
<th>名称</th>
<th>描述</th>
<th>正则表达式</th>
<th>类型</th>
</tr>
{foreach $rules as $rule}
<tr>
<td>#{$rule->id}</td>
<td>{$rule->name}</td>
<td>{$rule->text}</td>
<td>{$rule->regex}</td>
{if $rule->type == 1}
<td>数据包明文匹配</td>
{/if}
{if $rule->type == 2}
<td>数据包 hex 匹配</td>
{/if}
</tr>
{/foreach}
</table>
{$rules->render()}
</div>
</div>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,92 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">审计记录查看</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>系统中所有审计记录。</p>
<p>关于隐私:注意,我们仅用以下规则进行实时匹配和记录匹配到的规则,您的通信方向和通信内容我们不会做任何记录,请您放心。也请您理解我们对于这些不当行为的管理,谢谢。</p>
</div>
</div>
</div>
<div class="table-responsive">
{$logs->render()}
<table class="table">
<tr>
<th>ID</th>
<th>节点ID</th>
<th>节点名称</th>
<th>规则ID</th>
<th>名称</th>
<th>描述</th>
<th>正则表达式</th>
<th>类型</th>
<th>时间</th>
</tr>
{foreach $logs as $log}
{if $log->DetectRule() != null}
<tr>
<td>#{$log->id}</td>
<td>{$log->node_id}</td>
<td>{$log->Node()->name}</td>
<td>{$log->list_id}</td>
<td>{$log->DetectRule()->name}</td>
<td>{$log->DetectRule()->text}</td>
<td>{$log->DetectRule()->regex}</td>
{if $log->DetectRule()->type == 1}
<td>数据包明文匹配</td>
{/if}
{if $log->DetectRule()->type == 2}
<td>数据包 hex 匹配</td>
{/if}
<td>{date('Y-m-d H:i:s',$log->datetime)}</td>
</tr>
{/if}
{/foreach}
</table>
{$logs->render()}
</div>
</div>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,54 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">虚空之地</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>您由于某些原因而被管理员禁用了账户,请联系管理员。</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,163 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Donate publicity</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<p>Thank you for donating to support the daily expenses of the server! You can recharge the <a href="/user/code"> recharge interface </a>, which is equivalent to donating.</p>
{if $user->isAdmin()}
<p>Total revenue: {$total_in} CNY</p>
{/if}
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Anonymous donations</p>
<p>Current settings:{if $user->is_hide==1} Anonymous {else} Not anonymous {/if}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="hide">Anonymous settings</label>
<select id="hide" class="form-control">
<option value="1">Anonymous</option>
<option value="0">Not anonymous</option>
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="hide-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<div class="card-table">
<div class="table-responsive">
{$codes->render()}
<table class="table table-hover">
<tr>
<th>ID</th>
<th>Username</th>
<th>Type</th>
<th>Operate</th>
<th>Code</th>
<th>Time</th>
</tr>
{foreach $codes as $code}
<tr>
<td>#{$code->id}</td>
{if $code->user() != null && $code->user()->is_hide == 0}
<td>{$code->user()->user_name}</td>
{else}
<td>User is anonymous or written off</td>
{/if}
{if $code->type == -1}
<td>Recharge donations</td>
{/if}
{if $code->type == -2}
<td>Financial expenditure</td>
{/if}
{if $code->type == -1}
<td>Recharge {$code->number} CNY</td>
{/if}
{if $code->type == -2}
<td>Expenditure {$code->number} CNY</td>
{/if}
<td>{$code->code}</td>
<td>{$code->usedatetime}</td>
</tr>
{/foreach}
</table>
{$codes->render()}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
$(document).ready(function () {
$("#hide-update").click(function () {
$.ajax({
type: "POST",
url: "hide",
dataType: "json",
data: {
hide: $("#hide").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors.");
}
})
})
})
</script>

@ -0,0 +1,796 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Modify the information</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="col-lg-6 col-md-6">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Change Password</p>
<div class="form-group form-group-label">
<label class="floating-label" for="oldpwd">Current password</label>
<input class="form-control" id="oldpwd" type="password">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="pwd">New password</label>
<input class="form-control" id="pwd" type="password">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="repwd">Confirm the new password</label>
<input class="form-control" id="repwd" type="password">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="pwd-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Connection password modification</p>
<p>Current connection password: {$user->passwd}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="sspwd">Connection password</label>
<input class="form-control" id="sspwd" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="ss-pwd-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Encryption mode modification</p>
<p>Note: SS and SSR support the encryption method is different, according to the actual situation to choose!</p>
<p>Current encryption:{$user->method}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="method">Encryption</label>
<select id="method" class="form-control">
{$method_list = $config_service->getSupportParam('method')}
{foreach $method_list as $method}
<option value="{$method}" {if $user->method == $method}selected="selected"{/if}>[{if URL::CanMethodConnect($method) == 2}SS{else}SS/SSR{/if} Can be connected] {$method}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button disabled="disabled" class="btn btn-flat waves-attach" id="method-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Contact Modification</p>
<p>Current contact:
{if $user->im_type==1}
Wechat
{/if}
{if $user->im_type==2}
QQ
{/if}
{if $user->im_type==3}
Google+
{/if}
{if $user->im_type==4}
Telegram
{/if}
{$user->im_value}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="imtype">Choose your contact information</label>
<select class="form-control" id="imtype">
<option></option>
<option value="1">Wechat</option>
<option value="2">QQ</option>
<option value="3">Google+</option>
<option value="4">Telegram</option>
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="wechat">Enter the contact number here</label>
<input class="form-control" id="wechat" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="wechat-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Protocol & confusing settings</p>
<p>Current agreement:{$user->protocol}</p>
<p>Note 1: If you need to be compatible with the original version of the SS Please choose with _compatible compatibility options!</p>
<p>Note 2: If you use the original SS client here please set it directly as origin!</p>
<div class="form-group form-group-label">
<label class="floating-label" for="protocol">Protocol</label>
<select id="protocol" class="form-control">
{$protocol_list = $config_service->getSupportParam('protocol')}
{foreach $protocol_list as $protocol}
<option value="{$protocol}" {if $user->protocol == $protocol}selected="selected"{/if}>[{if URL::CanProtocolConnect($protocol) == 3}SS/SSR{else}SSR{/if} Can be connected] {$protocol}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-inner">
<p>Current confusing:{$user->obfs}</p>
<p>Note 1: If you need to be compatible with the original version of the SS Please choose with _compatible compatibility options!</p>
<p>Note 2: SS and SSR support the confusion type is different, simple_obfs_ * for the original SS confusing way, the other for the SSR confusing way!</p>
<div class="form-group form-group-label">
<label class="floating-label" for="obfs">Confused way</label>
<select id="obfs" class="form-control">
{$obfs_list = $config_service->getSupportParam('obfs')}
{foreach $obfs_list as $obfs}
<option value="{$obfs}" {if $user->obfs == $obfs}selected="selected"{/if}>[{if URL::CanObfsConnect($obfs) >= 3}SS/SSR{else}{if URL::CanObfsConnect($obfs) == 1}SSR{else}SS{/if}{/if} Can be connected] {$obfs}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button disabled="disabled" class="btn btn-flat waves-attach" id="ssr-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Theme change</p>
<p>Current theme:{$user->theme}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="theme">Theme</label>
<select id="theme" class="form-control">
{foreach $themes as $theme}
<option value="{$theme}">{$theme}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="theme-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">IP decapsulation</p>
<p>Current state:{$Block}</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="unblock" ><span class="icon">check</span>&nbsp;Unlocked</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Daily mail reception settings</p>
<p>Current setting:{if $user->sendDailyMail==1} send {else} Do not send {/if}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="mail">Send settings</label>
<select id="mail" class="form-control">
<option value="1">Send</option>
<option value="0">Do not send</option>
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="mail-update" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">两步验证</p>
<p>请下载 Google 的两步验证器,扫描下面的二维码。</p>
<p><i class="icon icon-lg" aria-hidden="true">android</i><a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">&nbsp;Android</a></p>
<p><i class="icon icon-lg" aria-hidden="true">tablet_mac</i><a href="https://itunes.apple.com/cn/app/google-authenticator/id388497605?mt=8">&nbsp;iOS</a></p>
<p>在没有测试完成绑定成功之前请不要启用。</p>
<p>当前设置:{if $user->ga_enable==1} 登录时要求验证 {else} 不要求 {/if}</p>
<p>当前服务器时间:{date("Y-m-d H:i:s")}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="ga-enable">验证设置</label>
<select id="ga-enable" class="form-control">
<option value="0">不要求</option>
<option value="1">要求验证</option>
</select>
</div>
<div class="form-group form-group-label">
<div class="text-center">
<div id="ga-qr"></div>
密钥:{$user->ga_token}
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="code">测试一下</label>
<input type="text" id="code" placeholder="输入验证器生成的数字来测试" class="form-control">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-brand-accent btn-flat waves-attach" href="/user/gareset" ><span class="icon">format_color_reset</span>&nbsp;重置</a>
<button class="btn btn-flat waves-attach" id="ga-test" ><span class="icon">extension</span>&nbsp;测试</button>
<button class="btn btn-brand btn-flat waves-attach" id="ga-set" ><span class="icon">perm_data_setting</span>&nbsp;设置</button>
</div>
</div>
</div>
</div>
</div> -->
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Reset the port</p>
<p>Current port:{$user->port}</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="portreset" ><span class="icon">check</span>&nbsp;Reset the port</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Customize ACL / PAC / Surge</p>
<p>You can add the Gfwlist rule here.</p>
<p>Format see<a href="https://adblockplus.org/zh_CN/filters">https://adblockplus.org/zh_CN/filters</a></p>
<p>IP segment Please use | 127.0.0.0/8 similar format</p>
<div class="form-group form-group-label">
<label class="floating-label" for="pac">Rule writing area</label>
<textarea class="form-control" id="pac" rows="8">{$user->pac}</textarea>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="setpac" ><span class="icon">check</span>&nbsp;submit</button>
</div>
</div>
</div>
</div>
</div>
{if $config['enable_telegram'] == 'true'}
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Telegram Bind</p>
<p>Telegram Add a robot account <a href="https://t.me/{$telegram_bot}">@{$telegram_bot}</a>, Photographed the following two-dimensional code issued to it.</p>
<div class="form-group form-group-label">
<div class="text-center">
<div id="telegram-qr"></div>
{if $user->telegram_id != 0} Current binding:<a href="https://t.me/{$user->im_value}">@{$user->im_value}</a>{/if}
</div>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-brand-accent btn-flat waves-attach" href="/user/telegram_reset" ><span class="icon">format_color_reset</span>&nbsp;Unbundled</a>
</div>
</div>
</div>
</div>
</div>
{/if}
</div>
{include file='dialog.tpl'}
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
$(document).ready(function () {
$("#portreset").click(function () {
$.ajax({
type: "POST",
url: "resetport",
dataType: "json",
data: {
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#setpac").click(function () {
$.ajax({
type: "POST",
url: "pacset",
dataType: "json",
data: {
pac: $("#pac").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#pwd-update").click(function () {
$.ajax({
type: "POST",
url: "password",
dataType: "json",
data: {
oldpwd: $("#oldpwd").val(),
pwd: $("#pwd").val(),
repwd: $("#repwd").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script src=" /assets/public/js/jquery.qrcode.min.js "></script>
<script>
var ga_qrcode = '{$user->getGAurl()}';
jQuery('#ga-qr').qrcode({
"text": ga_qrcode
});
{if $config['enable_telegram'] == 'true'}
var telegram_qrcode = 'mod://bind/{$bind_token}';
jQuery('#telegram-qr').qrcode({
"text": telegram_qrcode
});
{/if}
</script>
<script>
$(document).ready(function () {
$("#wechat-update").click(function () {
$.ajax({
type: "POST",
url: "wechat",
dataType: "json",
data: {
wechat: $("#wechat").val(),
imtype: $("#imtype").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ssr-update").click(function () {
$.ajax({
type: "POST",
url: "ssr",
dataType: "json",
data: {
protocol: $("#protocol").val(),
obfs: $("#obfs").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#relay-update").click(function () {
$.ajax({
type: "POST",
url: "relay",
dataType: "json",
data: {
relay_enable: $("#relay_enable").val(),
relay_info: $("#relay_info").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#unblock").click(function () {
$.ajax({
type: "POST",
url: "unblock",
dataType: "json",
data: {
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ga-test").click(function () {
$.ajax({
type: "POST",
url: "gacheck",
dataType: "json",
data: {
code: $("#code").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ga-set").click(function () {
$.ajax({
type: "POST",
url: "gaset",
dataType: "json",
data: {
enable: $("#ga-enable").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ss-pwd-update").click(function () {
$.ajax({
type: "POST",
url: "sspwd",
dataType: "json",
data: {
sspwd: $("#sspwd").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html("Succeeded");
} else {
$("#result").modal();
$("#msg").html("Failed");
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#mail-update").click(function () {
$.ajax({
type: "POST",
url: "mail",
dataType: "json",
data: {
mail: $("#mail").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#theme-update").click(function () {
$.ajax({
type: "POST",
url: "theme",
dataType: "json",
data: {
theme: $("#theme").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#method-update").click(function () {
$.ajax({
type: "POST",
url: "method",
dataType: "json",
data: {
method: $("#method").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html("Succeeded");
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" There are some errors。");
}
})
})
})
</script>

@ -0,0 +1,17 @@
<footer class="ui-footer">
<div class="container">
&copy; {$config["appName"]} <a href="/staff">STAFF</a> {if $config["enable_analytics_code"] == 'true'}{include file='analytics.tpl'}{/if}
</div>
</footer>
<!-- js -->
<script src="//cdn.staticfile.org/jquery/2.2.1/jquery.min.js"></script>
<script src="//cdn.staticfile.org/jquery-validate/1.15.0/jquery.validate.min.js"></script>
<script src="//static.geetest.com/static/tools/gt.js"></script>
<script src="/theme/material/js/base.min.js"></script>
<script src="/theme/material/js/project.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.16/clipboard.min.js"></script>
</body>
</html>

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
<meta name="theme-color" content="#4caf50">
<meta http-equiv="X-Frame-Options" content="sameorigin">
<title>{$config["appName"]}</title>
<!-- css -->
<link href="/theme/material/css/base.min.css" rel="stylesheet">
<link href="/theme/material/css/project.min.css" rel="stylesheet">
<!-- favicon -->
<!-- ... -->
<style>
.pagination {
display:inline-block;
padding-left:0;
margin:20px 0;
border-radius:4px
}
.pagination>li {
display:inline
}
.pagination>li>a,.pagination>li>span {
position:relative;
float:left;
padding:6px 12px;
margin-left:-1px;
line-height:1.42857143;
color:#337ab7;
text-decoration:none;
background-color:#fff;
border:1px solid #ddd
}
.pagination>li:first-child>a,.pagination>li:first-child>span {
margin-left:0;
border-top-left-radius:4px;
border-bottom-left-radius:4px
}
.pagination>li:last-child>a,.pagination>li:last-child>span {
border-top-right-radius:4px;
border-bottom-right-radius:4px
}
.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover {
color:#23527c;
background-color:#eee;
border-color:#ddd
}
.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover {
z-index:2;
color:#fff;
cursor:default;
background-color:#337ab7;
border-color:#337ab7
}
.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover {
color:#777;
cursor:not-allowed;
background-color:#fff;
border-color:#ddd
}
.pagination-lg>li>a,.pagination-lg>li>span {
padding:10px 16px;
font-size:18px
}
.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span {
border-top-left-radius:6px;
border-bottom-left-radius:6px
}
.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span {
border-top-right-radius:6px;
border-bottom-right-radius:6px
}
.pagination-sm>li>a,.pagination-sm>li>span {
padding:5px 10px;
font-size:12px
}
.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span {
border-top-left-radius:3px;
border-bottom-left-radius:3px
}
.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span {
border-top-right-radius:3px;
border-bottom-right-radius:3px
}
.pager {
padding-left:0;
margin:20px 0;
text-align:center;
list-style:none
}
.pager li {
display:inline
}
.pager li>a,.pager li>span {
display:inline-block;
padding:5px 14px;
background-color:#fff;
border:1px solid #ddd;
border-radius:15px
}
.pager li>a:focus,.pager li>a:hover {
text-decoration:none;
background-color:#eee
}
.pager .next>a,.pager .next>span {
float:right
}
.pager .previous>a,.pager .previous>span {
float:left
}
.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span {
color:#777;
cursor:not-allowed;
background-color:#fff
}
.pagination>li>a,
.pagination>li>span {
border: 1px solid white;
}
.pagination>li.active>a {
background: #f50057;
color: #fff;
}
.pagination>li>a {
background: white;
color: #000;
}
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
color: #fff;
background-color: #000;
border-color: #000;
}
.pagination>.active>span {
background-color: #f50057;
color: #fff;
border-color: #fff;
}
.pagination > .disabled > span {
border-color: #fff;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
.page-green .ui-content-header {
background-image: url(/theme/material/css/images/bg/green.jpg);
}
.content-header-green, .page-green .content-header {
background-color: #459f47;
color: #fff;
}
</style>
</head>
<body class="page-green">

@ -0,0 +1,545 @@
{include file='user/main.tpl'}
{$ssr_prefer = URL::SSRCanConnect($user, 0)}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">User Center</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">latest announcement in the system</p>
<p>Please refer to the <a href="/user/announcement"/>announcement</a> for other announcements.</p>
{if $ann != null}
<p>{$ann->content}</p>
{/if}
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Download and Configure Center</p>
<p>You can view your connection information here.<br>At the same time, here to provide you with an automated configuration file generation, including all the Shadowsocks server information, allowing you to quickly add a lot of servers, fast switching.</p>
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li {if $ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#all_ssr"><i class="icon icon-lg">airplanemode_active</i>&nbsp;ShadowsocksR</a>
</li>
<li {if !$ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#all_ss"><i class="icon icon-lg">flight_takeoff</i>&nbsp;Shadowsocks</a>
</li>
</ul>
</nav>
<div class="card-inner">
<div class="tab-content">
<div class="tab-pane fade {if $ssr_prefer}active in{/if}" id="all_ssr">
{$pre_user = URL::cloneUser($user)}
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li class="active">
<a class="waves-attach" data-toggle="tab" href="#all_ssr_info"><i class="icon icon-lg">info_outline</i>&nbsp;Connection information</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ssr_windows"><i class="icon icon-lg">desktop_windows</i>&nbsp;Windows</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ssr_mac"><i class="icon icon-lg">laptop_mac</i>&nbsp;MacOS</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ssr_ios"><i class="icon icon-lg">laptop_mac</i>&nbsp;iOS</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ssr_android"><i class="icon icon-lg">android</i>&nbsp;Android</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ssr_router"><i class="icon icon-lg">router</i>&nbsp;router</a>
</li>
</ul>
</nav>
<div class="tab-pane fade active in" id="all_ssr_info">
{$user = URL::getSSRConnectInfo($pre_user)}
{$ssr_url_all = URL::getAllUrl($pre_user, 0, 0)}
{$ssr_url_all_mu = URL::getAllUrl($pre_user, 1, 0)}
{if URL::SSRCanConnect($user)}
<dl class="dl-horizontal">
<p><dt>port</dt>
<dd>{$user->port}</dd></p>
<p><dt>password</dt>
<dd>{$user->passwd}</dd></p>
<p><dt>Custom encryption</dt>
<dd>{$user->method}</dd></p>
<p><dt>Custom protocol</dt>
<dd>{$user->protocol}</dd></p>
<p><dt>Custom confusion</dt>
<dd>{$user->obfs}</dd></p>
</dl>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the ShadowsocksR client. Please use the Shadowsocks client to connect, or to the data editing page to modify and then check here.</p>
<p>At the same time, ShadowsocksR single-port multi-user connection is not affected by your settings, you can use the corresponding client to connect here ~</p>
<p>Please note that your current SSR subscription link has expired in the current state and you can not import the node in this way.</p>
{/if}
</div>
<div class="tab-pane fade" id="all_ssr_windows">
<p><a href="/ssr-download/ssr-win.7z">download</a>,Unzip, run the program, and then you have three ways to import all nodes<br>
(1)Download<a href="/user/getpcconf?is_mu=0&is_ss=0">This (ordinary port)</a>or<a href="/user/getpcconf?is_mu=1&is_ss=0">This (single-port multi-user)</a>,Right-click the small aircraft server - from the configuration file into the server, select this file,<br>
(2)Click on<a class="copy-text" data-clipboard-text="{$ssr_url_all}">This (ordinary port)</a>or<a class="copy-text" data-clipboard-text="{$ssr_url_all}">This (single-port multi-user)</a>, Then right-click the airplane - copy the address from the clipboard<br>
(3)(Recommended) Right-click Aircraft-Server-SSR Server Subscription Settings, set the subscription address to the following address, leave the other parameters blank, and then update the SSR server subscription.<br>
And then select a suitable server, proxy rules selected "bypass the LAN and the mainland", and then you can access.</p>
<p>SSR Subscription address:<br>
Ordinary port address:<code>{$baseUrl}/link/{$ssr_sub_token}?mu=0</code><br>
Single port multiuser port address:<code>{$baseUrl}/link/{$ssr_sub_token}?mu=1</code>
</p>
</div>
<div class="tab-pane fade" id="all_ssr_mac">
<p><a href="/ssr-download/ssr-mac.dmg">Download</a>, Install, and then download<a href="/user/getpcconf?is_mu=0&is_ss=0">This (ordinary port)</a>or<a href="/user/getpcconf?is_mu=1&is_ss=0">This (single-port multi-user)</a>, Run the program, the small aircraft on the right server list submenu "import server configuration file ..." import this file, and then select a suitable server, update the PAC, and then open the system agent to the Internet.</p>
</div>
<div class="tab-pane fade" id="all_ssr_ios">
<p>Recommended download<a href="https://itunes.apple.com/cn/app/shadowrocket/id932747118?mt=8">Shadowrocket</a>, Has purchased this software for the US store Apple ID:<code>shz7348@icloud.com</code> password<code>Qq654321.</code>Pay attention to special symbols and case, switch the store account to download and install, and then click in Safari<a href="{$ssr_url_all}">This (ordinary port)</a>or<a href="{$ssr_url_all_mu}">This (single-port multi-user)</a>, And then click OK, you can add nodes in bulk.</p>
<p>SSR Subscription address:<br>
Ordinary port address:<code>{$baseUrl}/link/{$ssr_sub_token}?mu=0</code><br>
Single port multiuser port address:<code>{$baseUrl}/link/{$ssr_sub_token}?mu=1</code>
</p>
</div>
<div class="tab-pane fade" id="all_ssr_android">
<p><a href="/ssr-download/ssr-android.apk">download</a>, Install, and then click on the default browser on the<a href="{$ssr_url_all}">This link (Ordinary port)</a>or<a href="{$ssr_url_all_mu}">This link (single port multiuser)</a>, And then click OK, batch add nodes, and then select the routing around the mainland, the upper right corner can open the Internet. While providing an ACL address,<a href="/link/{$acl_token}">Long press to copy the address</a>To the client can be applied.</p>
<p>SSR Subscription address:You can add a subscription at the node list to automatically update the node:<br>
Ordinary port address:<code>{$baseUrl}/link/{$ssr_sub_token}?mu=0</code><br>
Single port multiuser port address:<code>{$baseUrl}/link/{$ssr_sub_token}?mu=1</code>
</p>
</div>
<div class="tab-pane fade" id="all_ssr_router">
<p>router is brushed<a href="http://www.right.com.cn/forum/thread-161324-1-1.html">this firmware</a>, Then SSH login router, execute the following command (import ordinary port)<br>
<code>wget -O- {$baseUrl}/link/{$router_token}?is_ss=0 | bash && echo -e "\n0 */3 * * * wget -O- {$baseUrl}/link/{$router_token}?is_ss=0 | bash\n">> /etc/storage/cron/crontabs/admin && killall crond && crond </code><br>
Or this single-port multi-user<br>
<code>wget -O- {$baseUrl}/link/{$router_token_without_mu}?is_ss=0 | bash && echo -e "\n0 */3 * * * wget -O- {$baseUrl}/link/{$router_token_without_mu}?is_ss=0 | bash\n">> /etc/storage/cron/crontabs/admin && killall crond && crond </code><br>
After the implementation of the router can be set up the panel to choose Shadowsocks server to connect.</p>
</div>
</div>
<div class="tab-pane fade {if !$ssr_prefer}active in{/if}" id="all_ss">
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li class="active">
<a class="waves-attach" data-toggle="tab" href="#all_ss_info"><i class="icon icon-lg">info_outline</i>&nbsp;Connection information</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ss_windows"><i class="icon icon-lg">desktop_windows</i>&nbsp;Windows</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ss_mac"><i class="icon icon-lg">laptop_mac</i>&nbsp;MacOS</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ss_ios"><i class="icon icon-lg">laptop_mac</i>&nbsp;iOS</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ss_android"><i class="icon icon-lg">android</i>&nbsp;Android</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#all_ss_router"><i class="icon icon-lg">router</i>&nbsp;Router</a>
</li>
</ul>
</nav>
<div class="tab-pane fade active in" id="all_ss_info">
{$user = URL::getSSConnectInfo($pre_user)}
{$ss_url_all = URL::getAllUrl($pre_user, 0, 1)}
{$ss_url_all_mu = URL::getAllUrl($pre_user, 1, 1)}
{$ss_url_all_win = URL::getAllUrl($pre_user, 0, 2)}
{if URL::SSCanConnect($user)}
<dl class="dl-horizontal">
<p>The address of each node, please go to the node list to see!</p>
<p><dt>port</dt>
<dd>{$user->port}</dd></p>
<p><dt>Password</dt>
<dd>{$user->passwd}</dd></p>
<p><dt>Custom encryption</dt>
<dd>{$user->method}</dd></p>
<p><dt>Custom confusion</dt>
<dd>{$user->obfs}</dd></p>
</dl>
{else}
<p>Hello, your current encryption method, confusion, or protocol settings can not be connected under the SS client. Please use the SSR client to connect, or to the data editing page to modify and then check here.</p>
<p>At the same time, Shadowsocks single-port multi-user connection is not affected by your settings, you can use the corresponding client to connect here ~</p>
{/if}
</div>
<div class="tab-pane fade" id="all_ss_windows">
<p><a href="/ssr-download/ss-win.zip">download</a>, Extract, run the program, and then you have two ways to import all nodes<br>
(1)Download<a href="/user/getpcconf?is_mu=0&is_ss=1">This (ordinary port) </a>, placed in the directory of small aircraft, and then open the small plane.<br>
(2)Click<a class="copy-text" data-clipboard-text="{$ss_url_all_win}">Here (ordinary port)</a>, Then right click on the small aircraft - import the URL from the clipboard<br>
</div>
<div class="tab-pane fade" id="all_ss_mac">
<p><a href="/ssr-download/ss-mac.zip">download</a>, Install, and then download<a href="/user/getpcconf?is_mu=0&is_ss=1">This (ordinary port)</a>or<a href="/user/getpcconf?is_mu=1&is_ss=1">This (single-port multi-user)</a>, Run the program, the small aircraft on the right server list submenu "import server configuration file ..." import this file, and then select a suitable server, update the PAC, and then open the system agent to the Internet.</p>
</div>
<div class="tab-pane fade" id="all_ss_ios">
<p>Recommended download<a href="https://itunes.apple.com/cn/app/shadowrocket/id932747118?mt=8">Shadowrocket</a>, Has purchased this software for the US store Apple ID:<code>shz7348@icloud.com</code> password<code>Qq654321.</code>Pay attention to special symbols and case, switch the store account to download and install, and then click in Safari<a href="{$ss_url_all}">This (ordinary port)</a>or<a href="{$ss_url_all_mu}">This (single-port multi-user)</a>, And then click OK, you can add nodes in bulk.</p>
<p>iOS download<a href="/link/{$ios_token}?is_ss=1">This (ordinary port)</a>or<a href="/link/{$ios_token}?is_ss=1&is_mu=1">This (single-port multi-user)</a>, Into the Surge, and then you can freely switch the server online.</p>
</div>
<div class="tab-pane fade" id="all_ss_android">
<p><a href="/ssr-download/ss-android.apk">download</a>,and<a href="/ssr-download/ss-android-obfs.apk">download</a>, Then install, and then click on the phone<a class="copy-text" data-clipboard-text="{$ss_url_all}">This link (normal port)</a>or<a class="copy-text" data-clipboard-text="{$ss_url_all_mu}">This link (single port multi-user port)</a>Copy to the clipboard, open the Shadowsocks client, select from the clipboard import, and then select a node, set the route to bypass the mainland, click on the plane can access the Internet.</p>
</div>
<div class="tab-pane fade" id="all_ss_router">
<p>The router is brushed<a href="http://www.right.com.cn/forum/thread-161324-1-1.html">This firmware</a>, Then SSH login router, execute the following command (import ordinary port)<br>
<code>wget -O- {$baseUrl}/link/{$router_token}?is_ss=1 | bash && echo -e "\n0 */3 * * * wget -O- {$baseUrl}/link/{$router_token}?is_ss=1 | bash\n">> /etc/storage/cron/crontabs/admin && killall crond && crond </code><br>
Or this single-port multi-user<br>
<code>wget -O- {$baseUrl}/link/{$router_token_without_mu}?is_ss=1 | bash && echo -e "\n0 */3 * * * wget -O- {$baseUrl}/link/{$router_token_without_mu}?is_ss=1 | bash\n">> /etc/storage/cron/crontabs/admin && killall crond && crond </code><br>
After the implementation of the router can be set up the panel to choose Shadowsocks server to connect.</p>
</div>
</div>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<p><a class="btn btn-brand btn-flat waves-attach" href="/user/url_reset"><span class="icon">close</span>&nbsp;Reset all links</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Account usage</p>
<dl class="dl-horizontal">
<p><dt>Account level</dt>
<dd>{$user->class}</dd></p>
<p><dt>Level expiration time</dt>
<dd>{$user->class_expire}</dd></p>
<p><dt>Account expiration time</dt>
<dd>{$user->expire_in}</dd>
<p><dt>Speed ​​limit</dt>
{if $user->node_speedlimit!=0}
<dd>{$user->node_speedlimit}Mbps</dd>
{else}
<dd>Not limited</dd>
{/if}</p>
<p><dt>Last used</dt>
<dd>{$user->lastSsTime()}</dd></p>
</dl>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div id="traffic_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script type="text/javascript">
var chart = new CanvasJS.Chart("traffic_chart",
{
title:{
text: "Data Flow usage",
fontFamily: "Impact",
fontWeight: "normal"
},
legend:{
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [
{
//startAngle: 45,
indexLabelFontSize: 20,
indexLabelFontFamily: "Garamond",
indexLabelFontColor: "darkgrey",
indexLabelLineColor: "darkgrey",
indexLabelPlacement: "outside",
type: "doughnut",
showInLegend: true,
dataPoints: [
{if $user->transfer_enable != 0}
{
y: {$user->last_day_t/$user->transfer_enable*100}, legendText:"Used {number_format($user->last_day_t/$user->transfer_enable*100,2)}% {$user->LastusedTraffic()}", indexLabel: "Used {number_format($user->last_day_t/$user->transfer_enable*100,2)}% {$user->LastusedTraffic()}"
},
{
y: {($user->u+$user->d-$user->last_day_t)/$user->transfer_enable*100}, legendText:"Today {number_format(($user->u+$user->d-$user->last_day_t)/$user->transfer_enable*100,2)}% {$user->TodayusedTraffic()}", indexLabel: "Today {number_format(($user->u+$user->d-$user->last_day_t)/$user->transfer_enable*100,2)}% {$user->TodayusedTraffic()}"
},
{
y: {($user->transfer_enable-($user->u+$user->d))/$user->transfer_enable*100}, legendText:"Margin {number_format(($user->transfer_enable-($user->u+$user->d))/$user->transfer_enable*100,2)}% {$user->unusedTraffic()}", indexLabel: "Margin {number_format(($user->transfer_enable-($user->u+$user->d))/$user->transfer_enable*100,2)}% {$user->unusedTraffic()}"
}
{/if}
]
}
]
});
chart.render();
</script>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Check to get Flow</p>
<p>Flow will not be reset, you can get through the check to get Flow.</p>
<p>Each check can get {$config['checkinMin']}~{$config['checkinMax']}MB Data Flow。</p>
<p>Check once every day. You can click the button or shake the phone to Check.</p>
<p>Last check-in :<code>{$user->lastCheckInTime()}</code></p>
<p id="checkin-msg"></p>
{if $geetest_html != null}
<div id="popup-captcha"></div>
{/if}
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
{if $user->isAbleToCheckin() }
<p id="checkin-btn">
<button id="checkin" class="btn btn-brand btn-flat waves-attach"><span class="icon">check</span>&nbsp;Check</button>
</p>
{else}
<p><a class="btn btn-brand disabled btn-flat waves-attach" href="#"><span class="icon">check</span>&nbsp;Has been checked</a></p>
{/if}
</div>
</div>
</div>
</div>
{if $enable_duoshuo=='true'}
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Forum</p>
<div class="ds-thread" data-thread-key="0" data-title="index" data-url="{$baseUrl}/user/"></div>
<script type="text/javascript">
var duoshuoQuery = {
short_name:"{$duoshuo_shortname}"
};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
</div>
</div>
</div>
{/if}
{include file='dialog.tpl'}
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script src="/theme/material/js/shake.js/shake.js"></script>
<script>
$(function(){
new Clipboard('.copy-text');
});
$(".copy-text").click(function () {
$("#result").modal();
$("#msg").html("Has been copied to your clipboard, please continue to the next operation.");
});
{if $geetest_html == null}
window.onload = function() {
var myShakeEvent = new Shake({
threshold: 15
});
myShakeEvent.start();
window.addEventListener('shake', shakeEventDidOccur, false);
function shakeEventDidOccur () {
if("vibrate" in navigator){
navigator.vibrate(500);
}
$.ajax({
type: "POST",
url: "/user/checkin",
dataType: "json",
success: function (data) {
$("#checkin-msg").html(data.msg);
$("#checkin-btn").hide();
$("#result").modal();
$("#msg").html(data.msg);
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("An error occurred:" + jqXHR.status);
}
});
}
};
$(document).ready(function () {
$("#checkin").click(function () {
$.ajax({
type: "POST",
url: "/user/checkin",
dataType: "json",
success: function (data) {
$("#checkin-msg").html(data.msg);
$("#checkin-btn").hide();
$("#result").modal();
$("#msg").html(data.msg);
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("An error occurred:" + jqXHR.status);
}
})
})
})
{else}
window.onload = function() {
var myShakeEvent = new Shake({
threshold: 15
});
myShakeEvent.start();
window.addEventListener('shake', shakeEventDidOccur, false);
function shakeEventDidOccur () {
if("vibrate" in navigator){
navigator.vibrate(500);
}
c.show();
}
};
var handlerPopup = function (captchaObj) {
c = captchaObj;
captchaObj.onSuccess(function () {
var validate = captchaObj.getValidate();
$.ajax({
url: "/user/checkin", // 进行二次验证
type: "post",
dataType: "json",
data: {
// 二次验证所需的三个值
geetest_challenge: validate.geetest_challenge,
geetest_validate: validate.geetest_validate,
geetest_seccode: validate.geetest_seccode
},
success: function (data) {
$("#checkin-msg").html(data.msg);
$("#checkin-btn").hide();
$("#result").modal();
$("#msg").html(data.msg);
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("An error occurred:" + jqXHR.status);
}
});
});
// 弹出式需要绑定触发验证码弹出按钮
captchaObj.bindOn("#checkin");
// 将验证码加到id为captcha的元素里
captchaObj.appendTo("#popup-captcha");
// 更多接口参考:http://www.geetest.com/install/sections/idx-client-sdk.html
};
initGeetest({
gt: "{$geetest_html->gt}",
challenge: "{$geetest_html->challenge}",
product: "popup", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: {if $geetest_html->success}0{else}1{/if} // 表示用户后台检测极验服务器是否宕机,与SDK配合,用户一般不需要关注
}, handlerPopup);
{/if}
</script>

@ -0,0 +1,165 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">邀请</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">注意!</p>
<p>邀请码请给认识的需要的人。</p>
<p>邀请有记录,若被邀请的人违反用户协议,您将会有连带责任。</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">说明</p>
<p>邀请码暂时无法购买,请珍惜。</p>
<p>公共页面不定期发放邀请码,如果用完邀请码可以关注公共邀请。</p>
<p>您每拉一位用户注册,当 TA 充值时您就会获得 TA 充值金额的 <code>{$config["code_payback"]} %</code> 的提成。</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">邀请</p>
<p>当前您可以生成<code>{$user->invite_num}</code>个邀请码。 </p>
</div>
{if $user->invite_num }
<div class="card-action">
<div class="card-action-btn pull-left">
<button id="invite" class="btn btn-flat waves-attach">生成我的邀请码</button>
</div>
</div>
{/if}
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-table">
<div class="table-responsive">
{$codes->render()}
<table class="table">
<thead>
<tr>
<th>###</th>
<th>邀请码(点右键复制链接)</th>
<th>状态</th>
</tr>
</thead>
<tbody>
{foreach $codes as $code}
<tr>
<td><b>{$code->id}</b></td>
<td><a href="/auth/register?code={$code->code}" target="_blank">{$code->code}</a>
</td>
<td>可用</td>
</tr>
{/foreach}
</tbody>
</table>
{$codes->render()}
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
$(document).ready(function () {
$("#invite").click(function () {
$.ajax({
type: "POST",
url: "/user/invite",
dataType: "json",
success: function (data) {
window.location.reload();
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("发生错误:" + jqXHR.status);
}
})
})
})
</script>

@ -0,0 +1,108 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Delete my account</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<h4>Warning!</h4>
<p>Once your account has been deleted, all of your data will be deleted by<b> true</ b>.</p>
<p>If you want to re-use the services provided by this site, you need to re-register.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Enter the current password to verify the identity</p>
<div class="form-group form-group-label">
<label class="floating-label" for="passwd">Current password (required)</label>
<input class="form-control" id="passwd" type="password">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="kill" ><span class="icon">check</span>&nbsp;Delete my account</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
$(document).ready(function () {
$("#kill").click(function () {
$.ajax({
type: "POST",
url: "kill",
dataType: "json",
data: {
passwd: $("#passwd").val(),
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/'", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html("Error: " + jqXHR.status + data.msg);
}
})
})
})
</script>

@ -0,0 +1,93 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Observation window</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Warning</p>
<p>Only recent {$hour} hours are shown.</p><b>The test node comes from <a href="http://speedtest.net">Speedtest</a>, The data for reference only ~</b>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Observation window</p>
<div class="card-table">
<div class="table-responsive">
<table class="table">
<tr>
<th>Node</th>
<th>China Telecom delays</th>
<th>China Telecom download speed</th>
<th>China Telecom update speed</th>
<th>China Unicom delay</th>
<th>China Unicom download speed</th>
<th>China Unicom upload speed</th>
<th>China Mobile Delay</th>
<th>China Mobile download speed</th>
<th>China Mobile upload speed</th>
</tr>
{foreach $speedtest as $single}
<tr>
<td>{$single->node()->name}</td>
<td>{$single->telecomping}</td>
<td>{$single->telecomeupload}</td>
<td>{$single->telecomedownload}</td>
<td>{$single->unicomping}</td>
<td>{$single->unicomupload}</td>
<td>{$single->unicomdownload}</td>
<td>{$single->cmccping}</td>
<td>{$single->cmccupload}</td>
<td>{$single->cmccdownload}</td>
</tr>
{/foreach}
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,384 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
<meta name="theme-color" content="#ff9800">
<title>{$config["appName"]}</title>
<!-- css -->
<link href="/theme/material/css/base.min.css" rel="stylesheet">
<link href="/theme/material/css/project.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- favicon -->
<!-- ... -->
<style>
.pagination {
display:inline-block;
padding-left:0;
margin:20px 0;
border-radius:4px
}
.pagination>li {
display:inline
}
.pagination>li>a,.pagination>li>span {
position:relative;
float:left;
padding:6px 12px;
margin-left:-1px;
line-height:1.42857143;
color:#337ab7;
text-decoration:none;
background-color:#fff;
border:1px solid #ddd
}
.pagination>li:first-child>a,.pagination>li:first-child>span {
margin-left:0;
border-top-left-radius:4px;
border-bottom-left-radius:4px
}
.pagination>li:last-child>a,.pagination>li:last-child>span {
border-top-right-radius:4px;
border-bottom-right-radius:4px
}
.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover {
color:#23527c;
background-color:#eee;
border-color:#ddd
}
.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover {
z-index:2;
color:#fff;
cursor:default;
background-color:#337ab7;
border-color:#337ab7
}
.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover {
color:#777;
cursor:not-allowed;
background-color:#fff;
border-color:#ddd
}
.pagination-lg>li>a,.pagination-lg>li>span {
padding:10px 16px;
font-size:18px
}
.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span {
border-top-left-radius:6px;
border-bottom-left-radius:6px
}
.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span {
border-top-right-radius:6px;
border-bottom-right-radius:6px
}
.pagination-sm>li>a,.pagination-sm>li>span {
padding:5px 10px;
font-size:12px
}
.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span {
border-top-left-radius:3px;
border-bottom-left-radius:3px
}
.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span {
border-top-right-radius:3px;
border-bottom-right-radius:3px
}
.pager {
padding-left:0;
margin:20px 0;
text-align:center;
list-style:none
}
.pager li {
display:inline
}
.pager li>a,.pager li>span {
display:inline-block;
padding:5px 14px;
background-color:#fff;
border:1px solid #ddd;
border-radius:15px
}
.pager li>a:focus,.pager li>a:hover {
text-decoration:none;
background-color:#eee
}
.pager .next>a,.pager .next>span {
float:right
}
.pager .previous>a,.pager .previous>span {
float:left
}
.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span {
color:#777;
cursor:not-allowed;
background-color:#fff
}
.pagination>li>a,
.pagination>li>span {
border: 1px solid white;
}
.pagination>li.active>a {
background: #f50057;
color: #fff;
}
.pagination>li>a {
background: white;
color: #000;
}
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
color: #fff;
background-color: #000;
border-color: #000;
}
.pagination>.active>span {
background-color: #f50057;
color: #fff;
border-color: #fff;
}
.pagination > .disabled > span {
border-color: #fff;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
.progress-green .progress-bar {
background-color: #f0231b;
}
.progress-green {
background-color: #000;
}
.progress-green .progress-bar {
background-color: #ff0a00;
}
.page-orange .ui-content-header {
background-image: url(/theme/material/css/images/bg/amber.jpg);
}
.content-heading {
font-weight: 300;
color: #fff;
}
</style>
</head>
<body class="page-orange">
<header class="header header-orange header-transparent header-waterfall ui-header">
<ul class="nav nav-list pull-left">
<div>
<a data-toggle="menu" href="#ui_menu">
<span class="icon icon-lg text-white">menu</span>
</a>
</div>
</ul>
<ul class="nav nav-list pull-right">
<div class="dropdown margin-right">
<a class="dropdown-toggle padding-left-no padding-right-no" data-toggle="dropdown">
{if $user->isLogin}
<span class="access-hide">{$user->user_name}</span>
<span class="avatar avatar-sm"><img alt="alt text for John Smith avatar" src="{$user->gravatar}"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="padding-right-lg waves-attach" href="/user/"><span class="icon icon-lg margin-right">account_box</span>User Center</a>
</li>
<li>
<a class="padding-right-lg waves-attach" href="/user/logout"><span class="icon icon-lg margin-right">exit_to_app</span>Sign out</a>
</li>
</ul>
{else}
<span class="access-hide">Not logged</span>
<span class="avatar avatar-sm"><img alt="alt text for John Smith avatar" src="/theme/material/images/users/avatar-001.jpg"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="padding-right-lg waves-attach" href="/auth/login"><span class="icon icon-lg margin-right">account_box</span>Login</a>
</li>
<li>
<a class="padding-right-lg waves-attach" href="/auth/register"><span class="icon icon-lg margin-right">pregnant_woman</span>Registered</a>
</li>
</ul>
{/if}
</div>
</ul>
</header>
<nav aria-hidden="true" class="menu menu-left nav-drawer nav-drawer-md" id="ui_menu" tabindex="-1">
<div class="menu-scroll">
<div class="menu-content">
<a class="menu-logo" href="/"><i class="icon icon-lg">language</i>&nbsp;Click to Home page</a>
<ul class="nav">
<li>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_me">Mine</a>
<ul class="menu-collapse collapse in" id="ui_menu_me">
<li>
<a href="/user">
<i class="icon icon-lg">view_compact</i>&nbsp;Dash board
</a>
</li>
<li>
<a href="/user/profile">
<i class="icon icon-lg">account_box</i>&nbsp;Account information
</a>
</li>
<li>
<a href="/user/edit">
<i class="icon icon-lg">sync_problem</i>&nbsp;Information editor
</a>
</li>
<!-- <li>
<a href="/user/invite">
<i class="icon icon-lg">loyalty</i>&nbsp;Invitation code
</a>
</li> -->
<li>
<a href="/user/announcement">
<i class="icon icon-lg">announcement</i>&nbsp;Announcement
</a>
</li>
<li>
<a href="/user/ticket">
<i class="icon icon-lg">question_answer</i>&nbsp;W/O
</a>
</li>
</ul>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_use">Use</a>
<ul class="menu-collapse collapse in" id="ui_menu_use">
<li>
<a href="/user/node">
<i class="icon icon-lg">airplanemode_active</i>&nbsp;Node list
</a>
</li>
<li>
<a href="/user/relay">
<i class="icon icon-lg">compare_arrows</i>&nbsp;Transit rules
</a>
</li>
<li>
<a href="/user/trafficlog">
<i class="icon icon-lg">low_priority</i>&nbsp;Flow record
</a>
</li>
<li>
<a href="/user/lookingglass">
<i class="icon icon-lg">sort</i>&nbsp;Speed test
</a>
<a target="_blank" href="/Course.html">
<i class="icon icon-lg">start</i>&nbsp;Course - Development
</a>
</li>
</ul>
<!-- <a class="waves-attach" data-toggle="collapse" href="#ui_menu_detect">Audit</a>
<ul class="menu-collapse collapse in" id="ui_menu_detect">
<li><a href="/user/detect"><i class="icon icon-lg">account_balance</i>&nbsp;Audit rules</a></li>
<li><a href="/user/detect/log"><i class="icon icon-lg">assignment_late</i>&nbsp;Audit record</a></li>
</ul>
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_trade">help</a>
<ul class="menu-collapse collapse in" id="ui_menu_trade">
{if $config['enable_wecenter']=='true'}
<li>
<a href="{$config["wecenter_url"]}" target="_blank">
<i class="icon icon-lg">help</i>&nbsp;Q & A system
</a>
</li>
{/if}-->
<a class="waves-attach" data-toggle="collapse" href="#ui_menu_help">Donate</a>
<ul class="menu-collapse collapse in" id="ui_menu_help">
<li>
<a href="/user/shop">
<i class="icon icon-lg">shop</i>&nbsp;Shop
</a>
</li>
<li><a href="/user/bought"><i class="icon icon-lg">shopping_cart</i>&nbsp;Purchase History</a></li>
<li>
<a href="/user/code">
<i class="icon icon-lg">code</i>&nbsp;Recharge
</a>
</li>
{if $config['enable_donate']=='true'}
<li>
<a href="/user/donate">
<i class="icon icon-lg">attach_money</i>&nbsp;Donate publicity
</a>
</li>
{/if}
</ul>
{if $user->isAdmin()}
<li>
<a href="/admin">
<i class="icon icon-lg">person_pin</i>&nbsp;Management panel
</a>
</li>
{/if}
</li>
</ul>
</div>
</div>
</nav>

@ -0,0 +1,285 @@
{include file='user/main.tpl'}
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script src="//cdn.staticfile.org/jquery/2.2.1/jquery.min.js"></script>
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Node list</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<h4>Warn!</h4>
<p>Do not open the node address anywhere!</p>
<p>Flow ratio of 0.5 even with 1000MB in accordance with the 500MB traffic record records settlement.</p>
<a href="javascript:void(0);" onClick="urlChange('guide',0,0,0)">If you do not know how to view the details of the node and the QR Code, please click me.</a>
</div>
</div>
</div>
</div>
</div>
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div class="tile-wrap">
{$id=0}
{foreach $node_prefix as $prefix => $nodes}
{$id=$id+1}
<div class="tile tile-collapse">
<div data-toggle="tile" data-target="#heading{$node_order->$prefix}">
<div class="tile-side pull-left" data-ignore="tile">
<div class="avatar avatar-sm">
<span class="icon {if $node_heartbeat[$prefix]=='在线'}text-green{else}{if $node_heartbeat[$prefix]=='暂无数据'}text-orange{else}text-red{/if}{/if}">{if $node_heartbeat[$prefix]=="在线"}backup{else}{if $node_heartbeat[$prefix]=='暂无数据'}report{else}warning{/if}{/if}</span>
</div>
</div>
<div class="tile-inner">
<div class="text-overflow"><font color="#B7B7B7">{$prefix}</font> | <i class="icon icon-lg">person</i> <strong><b><font color="red">{$node_alive[$prefix]}</font></b></strong> | <i class="icon icon-lg">build</i> <font color="#CD96CD">{$node_method[$prefix]}</font> | <i class="icon icon-lg">traffic</i> {if isset($node_bandwidth[$prefix])==true}<font color="#C1CDC1">{$node_bandwidth[$prefix]}</font>{else}N/A{/if}</div>
</div>
</div>
<div class="collapsible-region collapse" id="heading{$node_order->$prefix}">
<div class="tile-sub">
<br>
{foreach $nodes as $node}
{$relay_rule = null}
{if $node->sort == 10}
{$relay_rule = $tools->pick_out_relay_rule($node->id, $user->port, $relay_rules)}
{/if}
{if $node->mu_only != 1}
<div class="card">
<div class="card-main">
<div class="card-inner">
<p class="card-heading" >
<a href="javascript:void(0);" onClick="urlChange('{$node->id}',0,{if $relay_rule != null}{$relay_rule->id}{else}0{/if})">{$node->name}{if $relay_rule != null} - {$relay_rule->dist_node()->name}{/if}</a>
<span class="label label-brand-accent">{$node->status}</span>
</p>
{if $node->sort > 2 && $node->sort != 5 && $node->sort != 10}
<p>Address:<span class="label" >
<a href="javascript:void(0);" onClick="urlChange('{$node->id}',0,0)">Please click here to view details</a>
{else}
<p>Address:<span class="label label-brand-accent">
{$node->server}
{/if}
</span></p>
{if $node->sort == 0||$node->sort==7||$node->sort==8||$node->sort==10}
<p>Flow ratio:<span class="label label-red">
{$node->traffic_rate}
</span></p>
{if ($node->sort==0||$node->sort==7||$node->sort==8||$node->sort==10)&&($node->node_speedlimit!=0||$user->node_speedlimit!=0)}
<p>Node speed limit:<span class="label label-green">
{if $node->node_speedlimit>$user->node_speedlimit}
{$node->node_speedlimit}Mbps
{else}
{$user->node_speedlimit}Mbps
{/if}
</span></p>
{/if}
{/if}
<p>{$node->info}</p>
</div>
</div>
</div>
{/if}
{if $node->sort == 0 || $node->sort == 10}
{$point_node=$node}
{/if}
{if ($node->sort == 0 || $node->sort == 10) && $node->custom_rss == 1 && $node->mu_only != -1}
{foreach $node_muport as $single_muport}
{if !($single_muport['server']->node_class <= $user->class && ($single_muport['server']->node_group == 0 || $single_muport['server']->node_group == $user->node_group))}
{continue}
{/if}
{if !($single_muport['user']->class >= $node->node_class && ($node->node_group == 0 || $single_muport['user']->node_group == $node->node_group))}
{continue}
{/if}
{$relay_rule = null}
{if $node->sort == 10 && $single_muport['user']['is_multi_user'] != 2}
{$relay_rule = $tools->pick_out_relay_rule($node->id, $single_muport['server']->server, $relay_rules)}
{/if}
<div class="card">
<div class="card-main">
<div class="card-inner">
<p class="card-heading" >
<a href="javascript:void(0);" onClick="urlChange('{$node->id}',{$single_muport['server']->server},{if $relay_rule != null}{$relay_rule->id}{else}0{/if})">{$prefix} {if $relay_rule != null} - {$relay_rule->dist_node()->name}{/if} - 单端口多用户 Shadowsocks - {$single_muport['server']->server} 端口</a>
<span class="label label-brand-accent">{$node->status}</span>
</p>
<p>Address:<span class="label label-brand-accent">
{$node->server}
</span></p>
<p>Port:<span class="label label-brand-red">
{$single_muport['user']['port']}
</span></p>
<p>Encryption:<span class="label label-brand">
{$single_muport['user']['method']}
</span></p>
<p>Protocol:<span class="label label-brand-accent">
{$single_muport['user']['protocol']}
</span></p>
{if $single_muport['user']['is_multi_user'] != 0}
<p>Protocol parameters:<span class="label label-green">
{$user->id}:{$user->passwd}
</span></p>
{/if}
<p>Confused:<span class="label label-brand">
{$single_muport['user']['obfs']}
</span></p>
{if $single_muport['user']['is_multi_user'] == 1}
<p>Confuse parameters:<span class="label label-green">
{$single_muport['user']['obfs_param']}
</span></p>
{/if}
<p>Flow ratio:<span class="label label-red">
{$node->traffic_rate}
</span></p>
<p>{$node->info}</p>
</div>
</div>
</div>
{/foreach}
{/if}
{/foreach}
{if isset($point_node)}
{if $point_node!=null}
<div class="card">
<div class="card-main">
<div class="card-inner" id="info{$id}">
</div>
</div>
</div>
<script>
$().ready(function(){
$('#heading{$node_order->$prefix}').on("shown.bs.tile", function() {
$("#info{$id}").load("/user/node/{$point_node->id}/ajax");
});
});
</script>
{/if}
{/if}
{$point_node=null}
</div>
</div>
</div>
{/foreach}
</div>
</div>
</div>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="nodeinfo" role="dialog" tabindex="-1">
<div class="modal-dialog modal-full">
<div class="modal-content">
<iframe class="iframe-seamless" title="Modal with iFrame" id="infoifram"></iframe>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
function urlChange(id,is_mu,rule_id) {
var site = './node/'+id+'?ismu='+is_mu+'&relay_rule='+rule_id;
if(id == 'guide')
{
var doc = document.getElementById('infoifram').contentWindow.document;
doc.open();
doc.write('<img src="https://www.zhaoj.in/wp-content/uploads/2016/07/1469595156fca44223cf8da9719e1d084439782b27.gif" style="width: 100%;height: 100%; border: none;"/>');
doc.close();
}
else
{
document.getElementById('infoifram').src = site;
}
$("#nodeinfo").modal();
}
</script>

@ -0,0 +1,422 @@
{$load=$point_node->getNodeLoad()}
<div id="load{$id}_chart" style="height: 300px; width: 100%;"></div>
<div id="up{$id}_chart" style="height: 300px; width: 100%;"></div>
<div id="alive{$id}_chart" style="height: 300px; width: 100%;"></div>
<div id="speedtest{$id}_chart" style="height: 300px; width: 100%;"></div>
<div id="speedtest{$id}_ping_chart" style="height: 300px; width: 100%;"></div>
<script type="text/javascript">
$().ready(function(){
chart{$id} = new CanvasJS.Chart("load{$id}_chart",
{
title:{
text: "Node load condition {$prefix}"
},
data: [
{
type: "line",
dataPoints: [
{$i=0}
{foreach $load as $single_load}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_load->log_time*1000}), y:{$single_load->getNodeLoad()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_load->log_time*1000}), y:{$single_load->getNodeLoad()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
}
]
});
up_chart{$id} = new CanvasJS.Chart("up{$id}_chart",
{
title:{
text: "The last day of the node is online {$prefix} - Online {$point_node->getNodeUptime()}"
},
data: [
{
//startAngle: 45,
indexLabelFontSize: 20,
indexLabelFontFamily: "Garamond",
indexLabelFontColor: "darkgrey",
indexLabelLineColor: "darkgrey",
indexLabelPlacement: "outside",
type: "doughnut",
showInLegend: true,
dataPoints: [
{
y: {$point_node->getNodeUpRate()*100}, legendText:"Online rate {number_format($point_node->getNodeUpRate()*100,2)}%", indexLabel: "Online rate {number_format($point_node->getNodeUpRate()*100,2)}%"
},
{
y: {(1-$point_node->getNodeUpRate())*100}, legendText:"Offline rate {number_format((1-$point_node->getNodeUpRate())*100,2)}%", indexLabel: "Offline rate {number_format((1-$point_node->getNodeUpRate())*100,2)}%"
}
]
}
]
});
{$load=$point_node->getNodeAlive()}
alive_chart{$id} = new CanvasJS.Chart("alive{$id}_chart",
{
title:{
text: "The number of online nodes in the last day {$prefix}"
},
data: [
{
type: "line",
dataPoints: [
{$i=0}
{foreach $load as $single_load}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_load->log_time*1000}), y:{$single_load->online_user}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_load->log_time*1000}), y:{$single_load->online_user}
{literal}
}
{/literal}
{/if}
{/foreach}
]
}
]
});
{$speedtests=$point_node->getSpeedtestResult()}
speedtest_chart{$id} = new CanvasJS.Chart("speedtest{$id}_chart",
{
title:{
text: "Report of the latest node speed delay {$prefix}"
},
axisY: {
suffix: " ms"
},
data: [
{
type: "line",
showInLegend: true,
legendText: "China Telecom delay",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getTelecomPing()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getTelecomPing()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText: "China Unicom delay",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getUnicomPing()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getUnicomPing()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText:"China Mobile delay",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getCmccPing()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getCmccPing()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
}
]
});
speedtest_ping_chart{$id} = new CanvasJS.Chart("speedtest{$id}_ping_chart",
{
title:{
text: "Recent Report on Speed ​​Velocity of Node {$prefix}"
},
axisY: {
suffix: " Mbps"
},
data: [
{
type: "line",
showInLegend: true,
legendText: "China Telecom download speed",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getTelecomUpload()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getTelecomUpload()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText: "China Telecom upload speed",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getTelecomDownload()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getTelecomDownload()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText: "China Unicom download speed",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getUnicomUpload()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getUnicomUpload()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText: "China Unicom update speed",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getUnicomDownload()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getUnicomDownload()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText:"China Mobile upload speed",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getCmccDownload()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getCmccDownload()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
},
{
type: "line",
showInLegend: true,
legendText:"China Mobile download speed",
dataPoints: [
{$i=0}
{foreach $speedtests as $single_speedtest}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getCmccUpload()}
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_speedtest->datetime*1000}), y:{$single_speedtest->getCmccUpload()}
{literal}
}
{/literal}
{/if}
{/foreach}
]
}
]
});
chart{$id}.render();
up_chart{$id}.render();
alive_chart{$id}.render();
speedtest_chart{$id}.render();
speedtest_ping_chart{$id}.render();
});
</script>

@ -0,0 +1,335 @@
{include file='user/header_info.tpl'}
{$ssr_prefer = URL::SSRCanConnect($user, $mu)}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Node information</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Warn!</p>
<p>Configuration file and QR Code do not leak!</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configuration information</p>
<div class="tab-content">
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li {if $ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ssr_info"><i class="icon icon-lg">airplanemode_active</i>&nbsp;ShadowsocksR</a>
</li>
<li {if !$ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ss_info"><i class="icon icon-lg">flight_takeoff</i>&nbsp;Shadowsocks</a>
</li>
</ul>
</nav>
<div class="tab-pane fade {if $ssr_prefer}active in{/if}" id="ssr_info">
{if URL::SSRCanConnect($user, $mu)}
{$ssr_item = URL::getItem($user, $node, $mu, $relay_rule_id, 0)}
<p>Server address:{$ssr_item['address']}<br>
Server port:{$ssr_item['port']}<br>
Encryption:{$ssr_item['method']}<br>
Password:{$ssr_item['passwd']}<br>
Protocol:{$ssr_item['protocol']}<br>
Protocol parameters:{$ssr_item['protocol_param']}<br>
Confused:{$ssr_item['obfs']}<br>
Confused parameters:{$ssr_item['obfs_param']}<br></p>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the ShadowsocksR client. Please use the Shadowsocks client to connect, or to the data editing page to modify and then check here.</p>
<p>At the same time, ShadowsocksR single-port multi-user connection is not affected by your settings, you can use the corresponding client to connect here ~</p>
{/if}
</div>
<div class="tab-pane fade {if !$ssr_prefer}active in{/if}" id="ss_info">
{if URL::SSCanConnect($user, $mu)}
{$ss_item = URL::getItem($user, $node, $mu, $relay_rule_id, 1)}
<p>Server address:{$ss_item['address']}<br>
Server port:{$ss_item['port']}<br>
Encryption:{$ss_item['method']}<br>
Password:{$ss_item['passwd']}<br>
Confused:{$ss_item['obfs']}<br>
Confused parameters:{$ss_item['obfs_param']}<br></p>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the Shadowsocks client. Please use the ShadowsocksR client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Client Downloads</p>
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li {if $ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ssr_download"><i class="icon icon-lg">airplanemode_active</i>&nbsp;ShadowsocksR</a>
</li>
<li {if !$ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ss_download"><i class="icon icon-lg">flight_takeoff</i>&nbsp;Shadowsocks</a>
</li>
</ul>
</nav>
<div class="tab-pane fade {if $ssr_prefer}active in{/if}" id="ssr_download">
{if URL::SSRCanConnect($user, $mu)}
<p><i class="icon icon-lg">desktop_windows</i>&nbsp;<a href="/ssr-download/ssr-win.7z">Windows</a></p>
<p><i class="icon icon-lg">laptop_mac</i>&nbsp;<a href="/ssr-download/ssr-mac.dmg">Mac OS X</a></p>
<p><i class="icon icon-lg">laptop_windows</i>&nbsp;<a href="https://github.com/breakwa11/shadowsocks-rss/wiki/Python-client">Linux</a></p>
<p><i class="icon icon-lg">android</i>&nbsp;<a href="/ssr-download/ssr-android.apk">Android</a></p>
<p><i class="icon icon-lg">phone_iphone</i>&nbsp;<a href="https://itunes.apple.com/us/app/shadowrocket/id932747118">iOS</a></p>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the ShadowsocksR client. Please use the Shadowsocks client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
<div class="tab-pane fade {if !$ssr_prefer}active in{/if}" id="ss_download">
{if URL::SSCanConnect($user, $mu)}
<p><i class="icon icon-lg">desktop_windows</i>&nbsp;<a href="/ssr-download/ss-win.7z">Windows</a></p>
<p><i class="icon icon-lg">laptop_mac</i>&nbsp;<a href="/ssr-download/ss-mac.zip">Mac OS X</a></p>
<p><i class="icon icon-lg">laptop_windows</i>&nbsp;<a href="https://shadowsocks.org/en/download/clients.html">Linux</a></p>
<p><i class="icon icon-lg">android</i>&nbsp;<a href="/ssr-download/ss-android.apk">Android</a></p>
<p><i class="icon icon-lg">android</i>&nbsp;<a href="/ssr-download/ss-android-obfs.apk">Android Obfs Plugin</a></p>
<p><i class="icon icon-lg">phone_iphone</i>&nbsp;<a href="https://itunes.apple.com/us/app/shadowrocket/id932747118">iOS</a></p>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the Shadowsocks client. Please use the ShadowsocksR client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configure Json</p>
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li {if $ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ssr_json"><i class="icon icon-lg">airplanemode_active</i>&nbsp;ShadowsocksR</a>
</li>
<li {if !$ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ss_json"><i class="icon icon-lg">flight_takeoff</i>&nbsp;Shadowsocks</a>
</li>
</ul>
</nav>
<div class="tab-pane fade {if $ssr_prefer}active in{/if}" id="ssr_json">
{if URL::SSRCanConnect($user, $mu)}
<textarea class="form-control" rows="6">
{
"server": "{$ssr_item['address']}",
"local_address": "127.0.0.1",
"local_port": 1080,
"timeout": 300,
"workers": 1,
"server_port": {$ssr_item['port']},
"password": "{$ssr_item['passwd']}",
"method": "{$ssr_item['method']}",
"obfs": "{$ssr_item['obfs']}",
"obfs_param": "{$ssr_item['obfs_param']}",
"protocol": "{$ssr_item['protocol']}",
"protocol_param": "{$ssr_item['protocol_param']}"
}
</textarea>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the ShadowsocksR client. Please use the Shadowsocks client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
<div class="tab-pane fade {if !$ssr_prefer}active in{/if}" id="ss_json">
{if URL::SSCanConnect($user, $mu)}
<textarea class="form-control" rows="6">
{
"server": "{$ss_item['address']}",
"local_address": "127.0.0.1",
"local_port": 1080,
"timeout": 300,
"workers": 1,
"server_port": {$ss_item['port']},
"password": "{$ss_item['passwd']}",
"method": "{$ss_item['method']}",
"plugin": "{URL::getJsonObfs($ss_item)}"
}
</textarea>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the Shadowsocks client. Please use the ShadowsocksR client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configuration link</p>
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li {if $ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ssr_url"><i class="icon icon-lg">airplanemode_active</i>&nbsp;ShadowsocksR</a>
</li>
<li {if !$ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ss_url"><i class="icon icon-lg">flight_takeoff</i>&nbsp;Shadowsocks</a>
</li>
</ul>
</nav>
<div class="tab-pane fade {if $ssr_prefer}active in{/if}" id="ssr_url">
{if URL::SSRCanConnect($user, $mu)}
<p><a href="{URL::getItemUrl($ssr_item, 0)}"/>Android phone with the default browser to open the point I can directly add (to ShadowsocksR APP)</a></p>
<p><a href="{URL::getItemUrl($ssr_item, 0)}"/>iOS with Safari open point I can directly add (to Shadowrocket)</a></p>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the ShadowsocksR client. Please use the Shadowsocks client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
<div class="tab-pane fade {if !$ssr_prefer}active in{/if}" id="ss_url">
{if URL::SSCanConnect($user, $mu)}
<p><a href="{URL::getItemUrl($ss_item, 1)}"/>Android phone with the default browser to open the point I can directly add (to ShadowsocksR APP)</a></p>
<p><a href="{URL::getItemUrl($ss_item, 1)}"/>iOS with Safari open point I can directly add (to Shadowrocket)</a></p>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the Shadowsocks client. Please use the ShadowsocksR client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configure QR Code</p>
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li {if $ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ssr_qrcode"><i class="icon icon-lg">airplanemode_active</i>&nbsp;ShadowsocksR</a>
</li>
<li {if !$ssr_prefer}class="active"{/if}>
<a class="waves-attach" data-toggle="tab" href="#ss_qrcode"><i class="icon icon-lg">flight_takeoff</i>&nbsp;Shadowsocks</a>
</li>
</ul>
</nav>
<div class="tab-pane fade {if $ssr_prefer}active in{/if}" id="ssr_qrcode">
{if URL::SSRCanConnect($user, $mu)}
<div class="text-center">
<div id="ss-qr-n"></div>
</div>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the ShadowsocksR client. Please use the Shadowsocks client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
<div class="tab-pane fade {if !$ssr_prefer}active in{/if}" id="ss_qrcode">
{if URL::SSCanConnect($user, $mu)}
<nav class="tab-nav margin-top-no">
<ul class="nav nav-list">
<li class="active">
<a class="waves-attach" data-toggle="tab" href="#ss_qrcode_normal"><i class="icon icon-lg">android</i>&nbsp;Other platforms</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#ss_qrcode_win"><i class="icon icon-lg">desktop_windows</i>&nbsp;Windows</a>
</li>
</ul>
</nav>
<div class="tab-pane fade active in" id="ss_qrcode_normal">
<div class="text-center">
<div id="ss-qr"></div>
</div>
</div>
<div class="tab-pane fade" id="ss_qrcode_win">
<div class="text-center">
<div id="ss-qr-win"></div>
</div>
</div>
{else}
<p>Hello, your current encryption method, confusing, or protocol settings can not be connected under the Shadowsocks client. Please use the ShadowsocksR client to connect, or to the data editing page to modify and then check here.</p>
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script src="/assets/public/js/jquery.qrcode.min.js"></script>
<script>
{if URL::SSCanConnect($user, $mu)}
var text_qrcode = '{URL::getItemUrl($ss_item, 1)}';
jQuery('#ss-qr').qrcode({
"text": text_qrcode
});
var text_qrcode_win = '{URL::getItemUrl($ss_item, 2)}';
jQuery('#ss-qr-win').qrcode({
"text": text_qrcode_win
});
{/if}
{if URL::SSRCanConnect($user, $mu)}
var text_qrcode2 = '{URL::getItemUrl($ssr_item, 0)}';
jQuery('#ss-qr-n').qrcode({
"text": text_qrcode2
});
{/if}
</script>

@ -0,0 +1,95 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点信息</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">注意!</p>
<p>下面为您的 Anyconnect 配置。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置信息</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">客户端下载</p>
<p>由于版权问题,此处不提供下载。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置方法</p>
<p>Windows:下载客户端安装后打开,再打开的窗口中点击左下角的设施(齿轮)按钮,取消勾选Block connections to untrusted servers,之后在框中输入服务器地址,点击connect,如果出现提示框点击connext anyway即可,并在随后弹出的认证框中填写用户名密码连接就好。</p>
<p>Mac OS X:下载客户端安装后打开,再打开的窗口中点击左下角的设施(齿轮)按钮,取消勾选Block connections to untrusted servers,之后在框中输入服务器地址,点击connect,如果出现提示框点击connext anyway即可,并在随后弹出的认证框中填写用户名密码连接就好。</p>
<p>android:下载客户端安装后打开。点击连接-添加新的VPN连接,并在其中输入服务器地址(如配置信息所示)后点击完成并在上一页中选择新建的连接,之后返回第一页,在anyconnect VPN一行中有个开关,点击开关将其打开,如出现安全警告,点击继续即可,之后在弹出的认证框中输入用户名密码,连接即可。</p>
<p>iOS:从app store中下载客户端安装后打开。点击连接-添加新的VPN连接,并在其中输入服务器地址(如配置信息所示)后点击完成并在上一页中选择新建的连接,之后返回第一页,在anyconnect VPN一行中有个开关,点击开关将其打开,如出现安全警告,点击继续即可,之后在弹出的认证框中输入用户名密码,连接即可。</p>
<p>windows Phone:在应用商店中下载客户端安装后打开设置-网络-VPN-添加VPN连接,VPN提供商一栏选择anyconnect,连接名称任意,服务器名称或地址中填写如配置信息所示的地址,之后点击保存即可,连接时点击对应的新建的VPN,点击连接,之后会提示输入用户名与密码,分别输入后即可。</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,81 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点信息</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">注意!</p>
<p>下面为您的 APN 下载信息。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置信息</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置方法</p>
<p>本方法仅限iOS用户在 移动/联通/电信 3G或4G网络下使用</p>
<p>1 根据你的运营商在safari中输入与你运营商对应的地址</p>
<p>2 访问这个地址后会跳转到设置中自动弹出安装描述文件弹窗</p>
<p>3 之后点击安装,如有密码会提示你输入密码,请正确输入设备密码</p>
<p>4 如果出现警告,忽略并点击安装,经再次确认安装后就已经安装完成配置文件了,点击右上角完成结束配置</p>
<p>5 该方法如果需要使用请切换到3/4G网络下,打开网页时会提示你输入用户名与密码,请按照配置信息中内容输入</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,81 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点信息</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">注意!</p>
<p>下面为您的 APN 配置。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置信息</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置方法</p>
<p>本方法仅限iOS用户在 移动/联通/电信 3G或4G网络下使用</p>
<p>1 根据你的运营商在safari中输入与你运营商对应的地址</p>
<p>2 访问这个地址后会跳转到设置中自动弹出安装描述文件弹窗</p>
<p>3 之后点击安装,如有密码会提示你输入密码,请正确输入设备密码</p>
<p>4 如果出现警告,忽略并点击安装,经再次确认安装后就已经安装完成配置文件了,点击右上角完成结束配置</p>
<p>5 该方法如果需要使用请切换到3/4G网络下,打开网页时会提示你输入用户名与密码,请按照配置信息中内容输入</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,78 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Node information</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Warning!</p>
<p>The following is your PAC configuration.</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configuration information</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configuration method</p>
<p>Android: Open the settings -WLAN-long press the wifi- pop-up window to use - click Modify Network - expand the Advanced Options - Proxy box to select the proxy auto configuration - PAC URL to fill in the configuration information given by the address - save. The connection will be prompted to enter the user name password, according to the configuration information can be input.</p>
<p>iOS: Open Settings - Wireless LAN - Click the wifi to be used on the right side of the blue to modify the button - in the newly opened page - HTTP proxy select the auto -URL box to fill in the configuration information given by the address - save. The connection will be prompted to enter the user name password, according to the configuration information can be input.</p>
<p>Windows: Open the Control Panel - select the small icon or large icon in the view mode - open the Internet option - on the Connection tab, click LAN Settings - select the automatic script in the auto configuration and fill in the address given in the configuration information To the address bar - and then click OK - Apply. The connection will be prompted to enter the user name password, according to the configuration information can be input.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,76 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Node information</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Warning!</p>
<p>Here's your Pac Plus configuration.</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configuration information</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Configuration method</p>
<p>To be continued</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,76 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点信息</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">注意!</p>
<p>下面为您的 Pac Plus Plus 配置。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置信息</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置方法</p>
<p>未完待续</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,76 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点信息</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">注意!</p>
<p>下面为您的 SSH 配置。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置信息</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置方法</p>
<p>未完待续</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,76 @@
{include file='user/header_info.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">节点信息</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">注意!</p>
<p>下面为您的 VPN 配置。</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置信息</p>
<p>{$json_show}</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">配置方法</p>
<p>未完待续</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,158 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Account</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">My account</p>
<dl class="dl-horizontal">
<dt>Username</dt>
<dd>{$user->user_name}</dd>
<dt>Mail</dt>
<dd>{$user->email}</dd>
</dl>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-flat waves-attach" href="kill"><span class="icon">check</span>&nbsp;Delete my account</a>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">The last five minutes use IP</p>
<p>Please confirm for their own IP, if any abnormal please modify the connection password.</p>
<div class="card-table">
<div class="table-responsive">
<table class="table">
<tr>
<th>IP</th>
<th>Attribution</th>
</tr>
{foreach $userip as $single=>$location}
<tr>
<td>{$single}</td>
<td>{$location}</td>
</tr>
{/foreach}
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Last 10 logon IP</p>
<p>Please confirm for their own IP, if any, please change the password in time.</p>
<div class="card-table">
<div class="table-responsive">
<table class="table">
<tr>
<th>IP</th>
<th>Attribution</th>
</tr>
{foreach $userloginip as $single=>$location}
<tr>
<td>{$single}</td>
<td>{$location}</td>
</tr>
{/foreach}
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Rebate record</p>
<div class="card-table">
<div class="table-responsive">
{$paybacks->render()}
<table class="table">
<thead>
<tr>
<th>###</th>
<th>Rebate user</th>
<th>Amount of rebate</th>
</tr>
</thead>
<tbody>
{foreach $paybacks as $payback}
<tr>
<td><b>{$payback->id}</b></td>
{if $payback->user()!=null}
<td>{$payback->user()->user_name}
</td>
{else}
<td>Has been canceled
</td>
{/if}
</td>
<td>{$payback->ref_get} CNY</td>
</tr>
{/foreach}
</tbody>
</table>
{$paybacks->render()}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,151 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading"> Add a transit rule</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="source_node">Origin node</label>
<select id="source_node" class="form-control" name="source_node">
<option value="0">Please select the origin node</option>
{foreach $source_nodes as $source_node}
<option value="{$source_node->id}">{$source_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="dist_node">Target node</label>
<select id="dist_node" class="form-control" name="dist_node">
<option value="-1">Not in transit</option>
{foreach $dist_nodes as $dist_node}
<option value="{$dist_node->id}">{$dist_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="port">Port</label>
<select id="port" class="form-control" name="port">
{foreach $ports as $port}
<option value="{$port}">{$port}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="priority">Priority</label>
<input class="form-control" id="priority" name="priority" type="text" value="0">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">Add</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
<section>
</div>
</div>
</main>
{include file='user/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
priority: {required: true}
},
submitHandler: function() {
$.ajax({
type: "POST",
url: "/user/relay",
dataType: "json",
{/literal}
data: {
source_node: $("#source_node").val(),
dist_node: $("#dist_node").val(),
port: $("#port").val(),
priority: $("#priority").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" An error occurred.");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,145 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading"> Edit rules #{$rule->id}</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<form id="main_form">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="source_node">Origin node</label>
<select id="source_node" class="form-control" name="source_node">
<option value="0">Please select the origin node</option>
{foreach $source_nodes as $source_node}
<option value="{$source_node->id}" {if $rule->source_node_id == $source_node->id}selected{/if}>{$source_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="dist_node">Target node</label>
<select id="dist_node" class="form-control" name="dist_node">
<option value="-1">Not in transit</option>
{foreach $dist_nodes as $dist_node}
<option value="{$dist_node->id}" {if $rule->dist_node_id == $dist_node->id}selected{/if}>{$dist_node->name}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="port">Port</label>
<select id="port" class="form-control" name="port">
{foreach $ports as $port}
<option value="{$port}" {if $rule->port == $port}selected{/if}>{$port}</option>
{/foreach}
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="priority">Priority</label>
<input class="form-control" id="priority" name="priority" type="text" value="{$rule->priority}">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">Modify</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file='dialog.tpl'}
<section>
</div>
</div>
</main>
{include file='user/footer.tpl'}
{literal}
<script>
$('#main_form').validate({
rules: {
priority: {required: true}
},
submitHandler: function() {
$.ajax({
{/literal}
type: "PUT",
url: "/user/relay/{$rule->id}",
dataType: "json",
data: {
source_node: $("#source_node").val(),
dist_node: $("#dist_node").val(),
port: $("#port").val(),
priority: $("#priority").val()
{literal}
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" An error occurred.");
}
});
}
});
</script>
{/literal}

@ -0,0 +1,203 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Transfer rule management</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-md-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>All your transit rules in the system.</p>
<p>Here, you can set your transit rules to redirect data from one server to another.</p>
<p>The higher the priority, the higher the priority, on behalf of its multiple conditions in the coexistence of the rules will be given priority, when the priority is consistent, the first rule will be added.</p>
<p>For a node does not set the transit, the node can be used as a common node to do the agent.</p>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
{if $is_relay_able}
<nav class="tab-nav margin-top-no">
<ul class="nav nav-justified">
<li class="active">
<a class="waves-attach" data-toggle="tab" href="#rule_table">Rules table</a>
</li>
<li>
<a class="waves-attach" data-toggle="tab" href="#link_table">Link table</a>
</li>
</ul>
</nav>
<div class="card-inner">
<div class="tab-content">
<div class="tab-pane fade active in" id="rule_table">
<div class="table-responsive">
{$rules->render()}
<table class="table">
<tr>
<th>Operate</th>
<th>ID</th>
<th>Origin node</th>
<th>Target node</th>
<th>Port</th>
<th>priority</th>
</tr>
{foreach $rules as $rule}
<tr>
<td>
<a class="btn btn-brand" {if $rule->user_id == 0}disabled{else}href="/user/relay/{$rule->id}/edit"{/if}>Edit</a>
<a class="btn btn-brand-accent" id="delete" value="{$rule->id}" {if $rule->user_id == 0}disabled{else}href="javascript:void(0);" onClick="delete_modal_show('{$rule->id}')"{/if}>Delete</a>
</td>
<td>#{$rule->id}</td>
{if $rule->source_node_id == 0}
<td>All nodes</td>
{else}
<td>{$rule->Source_Node()->name}</td>
{/if}
{if $rule->Dist_Node() == null}
<td>Not in transit</td>
{else}
<td>{$rule->Dist_Node()->name}</td>
{/if}
<td>{if $rule->port == 0}All ports{else}{$rule->port}{/if}</td>
<td>{$rule->priority}</td>
</tr>
{/foreach}
</table>
{$rules->render()}
</div>
</div>
<div class="tab-pane fade" id="link_table">
<div class="table-responsive">
<table class="table">
<tr>
<th>Port</th>
<th>Originating node</th>
<th>End node</th>
<th>Path node</th>
<th>Status</th>
</tr>
{foreach $pathset as $path}
<tr>
<td>{$path->port}</td>
<td>{$path->begin_node->name}</td>
<td>{$path->end_node->name}</td>
<td>{$path->path}</td>
<td>{$path->status}</td>
</tr>
{/foreach}
</table>
</div>
</div>
</div>
</div>
{/if}
</div>
</div>
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/user/relay/create">+</a>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="delete_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">Are you sure you want to delete?</h2>
</div>
<div class="modal-inner">
<p>Please confirm.</p>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand-accent waves-attach waves-effect" data-dismiss="modal" type="button">Cancel</button><button class="btn btn-flat btn-brand-accent waves-attach" data-dismiss="modal" id="delete_input" type="button">Determine</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='user/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
}
$(document).ready(function(){
{if !$is_relay_able}
$("#result").modal();
$("#msg").html("为了中转的稳定,您需要在<a href='/user/edit'>资料编辑</a>处设置协议为以下协议之一: <br>{foreach $relay_able_protocol_list as $single_text}{$single_text}<br>{/foreach}后方可设置中转规则!");
{/if}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/user/relay",
dataType:"json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}else{
$("#result").modal();
$("#msg").html(data.msg);
}
},
error:function(jqXHR){
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
}
});
}
$("#delete_input").click(function(){
delete_id();
});
})
</script>

@ -0,0 +1,234 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Product list</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>List of all items in the system. When you purchase a grade class, the period of validity is calculated from the current time.</p>
<p>Current balance:{$user->money} CNY</p>
</div>
</div>
</div>
<div class="table-responsive">
{$shops->render()}
<table class="table ">
<tr>
<th>Operate</th>
<th>ID</th>
<th>Name</th>
<th>Price</th>
<th>Content</th>
<th>Automatic renewal days</th>
<th>Restores traffic when renewing</th>
</tr>
{foreach $shops as $shop}
<tr>
<td>
<a class="btn btn-brand-accent" href="javascript:void(0);" onClick="buy('{$shop->id}',{$shop->auto_renew},{$shop->auto_reset_bandwidth})">Buy</a>
</td>
<td>#{$shop->id}</td>
<td>{$shop->name}</td>
<td>{$shop->price}CNY</td>
<td>{$shop->content()}</td>
{if $shop->auto_renew==0}
<td>Not auto renew</td>
{else}
<td>Optional free after {$shop->auto_renew} days</td>
{/if}
{if $shop->auto_reset_bandwidth==0}
<td>Not reset automatically</td>
{else}
<td>Automatic reset</td>
{/if}
</tr>
{/foreach}
</table>
{$shops->render()}
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="coupon_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">Do you have a discount code?</h2>
</div>
<div class="modal-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="coupon">Yes, please enter here. If not, click OK.</label>
<input class="form-control" id="coupon" type="text">
</div>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand waves-attach" data-dismiss="modal" id="coupon_input" type="button">OK</button></p>
</div>
</div>
</div>
</div>
<div aria-hidden="true" class="modal modal-va-middle fade" id="order_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-heading">
<a class="modal-close" data-dismiss="modal">×</a>
<h2 class="modal-title">Order Confirmation</h2>
</div>
<div class="modal-inner">
<p id="name">Product name:</p>
<p id="credit">Discount amount:</p>
<p id="total">Total amount:</p>
<p id="auto_reset">Automatic renewal at maturity</p>
<div class="checkbox switch" id="autor">
<label for="autorenew">
<input checked class="access-hide" id="autorenew" type="checkbox"><span class="switch-toggle"></span>Automatic renewal
</label>
</div>
</div>
<div class="modal-footer">
<p class="text-right"><button class="btn btn-flat btn-brand waves-attach" data-dismiss="modal" id="order_input" type="button">OK</button></p>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='user/footer.tpl'}
<script>
function buy(id,auto,auto_reset) {
auto_renew=auto;
if(auto==0)
{
document.getElementById('autor').style.display="none";
}
else
{
document.getElementById('autor').style.display="";
}
if(auto_reset==0)
{
document.getElementById('auto_reset').style.display="none";
}
else
{
document.getElementById('auto_reset').style.display="";
}
shop=id;
$("#coupon_modal").modal();
}
$("#coupon_input").click(function () {
$.ajax({
type: "POST",
url: "coupon_check",
dataType: "json",
data: {
coupon: $("#coupon").val(),
shop: shop
},
success: function (data) {
if (data.ret) {
$("#name").html("Product name:"+data.name);
$("#credit").html("Discount amount:"+data.credit);
$("#total").html("Total amount:"+data.total);
$("#order_modal").modal();
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" An error occurred.");
}
})
});
$("#order_input").click(function () {
if(document.getElementById('autorenew').checked)
{
var autorenew=1;
}
else
{
var autorenew=0;
}
$.ajax({
type: "POST",
url: "buy",
dataType: "json",
data: {
coupon: $("#coupon").val(),
shop: shop,
autorenew: autorenew
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/user/shop'", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" An error occurred.");
}
})
});
</script>

@ -0,0 +1,26 @@
{include file='user/main.tpl'}
<div class="content-wrapper">
<section class="content-header">
<h1>
Statistics
<small>A</small>
</h1>
</section>
<!-- Main content -->
<!-- Main content -->
<section class="content">
<div class="row">
<!-- left column -->
<div class="col-md-6">
<!-- general form elements -->
<div class="box box-primary">
<div class="box-body">
<p>Coming soon...</p>
</div><!-- /.box -->
</div>
</div>
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
{include file='user/footer.tpl'}

@ -0,0 +1,89 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">W/O</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<p>Have any questions please go directly to the lower right corner of the + to submit a new question</p>
</div>
</div>
</div>
<div class="table-responsive">
{$tickets->render()}
<table class="table">
<tr>
<th>Operating</th>
<th>ID</th>
<th>Date</th>
<th>Title</th>
<th>Status</th>
</tr>
{foreach $tickets as $ticket}
<tr>
<td>
<a class="btn btn-brand" href="/user/ticket/{$ticket->id}/view">View</a>
</td>
<td>#{$ticket->id}</td>
<td>{$ticket->datetime()}</td>
<td>{$ticket->title}</td>
{if $ticket->status==1}
<td>ON</td>
{else}
<td>OFF</td>
{/if}
</tr>
{/foreach}
</table>
{$tickets->render()}
</div>
<div class="fbtn-container">
<div class="fbtn-inner">
<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light" href="/user/ticket/create">+</a>
</div>
</div>
</div>
</div>
</main>
{include file='user/footer.tpl'}

@ -0,0 +1,149 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Create W/O</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="title">Title</label>
<input class="form-control" id="title" type="text" >
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="content">Content</label>
<link rel="stylesheet" href="/theme/material/editor/css/editormd.min.css" />
<div id="editormd">
<textarea style="display:none;" id="content"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">Add</button>
</div>
</div>
</div>
</div>
</div>
</div>
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='user/footer.tpl'}
<script src="/theme/material/editor/editormd.min.js"></script>
<script>
$(document).ready(function () {
function submit() {
$("#result").modal();
$("#msg").html("Submitting...");
$.ajax({
type: "POST",
url: "/user/ticket",
dataType: "json",
data: {
content: editor.getHTML(),
title: $("#title").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/user/ticket'", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("Error" + jqXHR.status);
}
});
}
$("#submit").click(function () {
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "/theme/material/editor/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -0,0 +1,162 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">View the W/O</h1>
</div>
</div>
<div class="container">
<div class="col-lg-12 col-sm-12">
<section class="content-inner margin-top-no">
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group form-group-label">
<label class="floating-label" for="content">Content</label>
<link rel="stylesheet" href="/theme/material/editor/css/editormd.min.css" />
<div id="editormd">
<textarea style="display:none;" id="content"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
<div class="form-group">
<div class="row">
<div class="col-md-10 col-md-push-1">
<button id="submit" type="submit" class="btn btn-block btn-brand waves-attach waves-light">Add</button><button id="close" type="submit" class="btn btn-block btn-brand-accent waves-attach waves-light">Add and close</button>
</div>
</div>
</div>
</div>
</div>
</div>
{$ticketset->render()}
{foreach $ticketset as $ticket}
<div class="card">
<aside class="card-side pull-left"><img alt="alt text for John Smith avatar" src="{$ticket->User()->gravatar}"></span></br>{$ticket->User()->user_name}</aside>
<div class="card-main">
<div class="card-inner">
{$ticket->content}
</div>
<div class="card-action"> {$ticket->datetime()}</div>
</div>
</div>
{/foreach}
{$ticketset->render()}
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='user/footer.tpl'}
<script src="/theme/material/editor/editormd.min.js"></script>
<script>
$(document).ready(function () {
function submit() {
$("#result").modal();
$("#msg").html("Submitting.");
$.ajax({
type: "PUT",
url: "/user/ticket/{$id}",
dataType: "json",
data: {
content: editor.getHTML(),
title: $("#title").val(),
status:status
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.href='/user/ticket'", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("Error:" + jqXHR.status);
}
});
}
$("#submit").click(function () {
status=1;
submit();
});
$("#close").click(function () {
status=0;
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "/theme/material/editor/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 450,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -0,0 +1,133 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">Flow record</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="ui-card-wrap">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<p class="card-heading">Warning!</p>
<p>Some nodes do not support flow logging.</p>
<p>Only the last 72 hours of records are shown here, with a granularity of minutes.</p>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-sm-12">
<div class="card">
<div class="card-main">
<div class="card-inner margin-bottom-no">
<div id="log_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.staticfile.org/canvasjs/1.7.0/canvasjs.js"></script>
<script type="text/javascript">
window.onload = function () {
var log_chart = new CanvasJS.Chart("log_chart",
{
zoomEnabled: true,
title:{
text: "Your last 72 hours of traffic is consumed",
fontSize: 20
},
animationEnabled: true,
axisX: {
title:"Time",
labelFontSize: 14,
titleFontSize: 18
},
axisY:{
title: "Flow/KB",
lineThickness: 2,
labelFontSize: 14,
titleFontSize: 18
},
data: [
{
type: "scatter",
{literal}
toolTipContent: "<span style='\"'color: {color};'\"'><strong>Generate time: </strong></span>{x} <br/><span style='\"'color: {color};'\"'><strong>Flow: </strong></span>{y} KB <br/><span style='\"'color: {color};'\"'><strong>Generate node: </strong></span>{jd}",
{/literal}
dataPoints: [
{$i=0}
{foreach $logs as $single_log}
{if $i==0}
{literal}
{
{/literal}
x: new Date({$single_log->log_time*1000}), y:{$single_log->totalUsedRaw()},jd:"{$single_log->node()->name}"
{literal}
}
{/literal}
{$i=1}
{else}
{literal}
,{
{/literal}
x: new Date({$single_log->log_time*1000}), y:{$single_log->totalUsedRaw()},jd:"{$single_log->node()->name}"
{literal}
}
{/literal}
{/if}
{/foreach}
]
}
]
});
log_chart.render();
}
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
{include file='user/footer.tpl'}
Loading…
Cancel
Save