Merge from NimaQu/dev

master
Sukka 8 years ago committed by GitHub
commit afa0c6dbef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -593,8 +593,7 @@ class Job
Radius::Delete($user->email);
}
if (strtotime($user->expire_in) < time() && $user->transfer_enable > 0 ) {
if (strtotime($user->expire_in) < time()&&!file_exists(BASE_PATH."/storage/".$user->id.".expire_in")) {
$user->transfer_enable = 0;
$user->u = 0;
$user->d = 0;
@ -611,7 +610,15 @@ class Job
} catch (\Exception $e) {
echo $e->getMessage();
}
$myfile = fopen(BASE_PATH."/storage/".$user->id.".expire_in", "w+") or die("Unable to open file!");
$txt = "1";
fwrite($myfile, $txt);
fclose($myfile);
}
elseif (strtotime($user->expire_in) > time()&&file_exists(BASE_PATH."/storage/".$user->id.".expire_in")) {
unlink(BASE_PATH."/storage/".$user->id.".expire_in");
}
//余量不足检测
if(!file_exists(BASE_PATH."/storage/traffic_notified/")){
@ -663,7 +670,7 @@ class Job
) {
$subject = Config::get('appName')."-您的用户账户已经被删除了";
$to = $user->email;
$text = "您好,系统发现您的账号已经过期 ".Config::get('account_expire_delete_days')." 天了,帐号已经被删除。" ;
$text = "您好,系统发现您的账户已经过期 ".Config::get('account_expire_delete_days')." 天了,帐号已经被删除。" ;
try {
Mail::send($to, $subject, 'news/warn.tpl', [
"user" => $user,"text" => $text

@ -304,10 +304,11 @@ class URL
}
public static function getAllUrl($user, $is_mu, $is_ss = 0, $enter = 0) {
$return_url = '';
if ($user->transfer_enable >0){
$return_url .= URL::getUserTraffic($user, $is_mu).($enter == 0 ? ' ' : "\n");
$return_url .= URL::getUserClassExpiration($user, $is_mu).($enter == 0 ? ' ' : "\n");
}
$return_url .= URL::getUserTraffic($user, $is_mu).($enter == 0 ? ' ' : "\n");
$return_url .= URL::getUserClassExpiration($user, $is_mu).($enter == 0 ? ' ' : "\n");
if(strtotime($user->expire_in)<time()){
return $return_url;
}
$items = URL::getAllItems($user, $is_mu, $is_ss);
foreach($items as $item) {
$return_url .= URL::getItemUrl($item, $is_ss).($enter == 0 ? ' ' : "\n");
@ -375,8 +376,13 @@ class URL
$item['tls'] = 'tls';
}
}
if (count($node_explode) >= 5 and in_array($item['net'], array("kcp", "http"))) {
$item['type'] = $node_explode[4];
if (count($node_explode) >= 5 ) {
if (in_array($item['net'], array("kcp", "http"))){
$item['type'] = $node_explode[4];
} else if ($node_explode[4]=='ws'){
$item['net'] = 'ws';
}
}
if (count($node_explode) >= 6) {
@ -618,7 +624,7 @@ class URL
if(!Config::get('mergeSub') and $is_mu == 1){
$group_name .= ' - 单端口';
}
if($user->class !=0){
if(strtotime($user->expire_in)>time()){
$ssurl = "www.google.com:1:auth_chain_a:chacha20:tls1.2_ticket_auth:YnJlYWt3YWxs/?obfsparam=&protoparam=&remarks=".Tools::base64_url_encode("剩余流量:".number_format(($user->transfer_enable-($user->u+$user->d))/$user->transfer_enable*100,2)."% ".$user->unusedTraffic())."&group=".Tools::base64_url_encode($group_name);
}else{
$ssurl = "www.google.com:1:auth_chain_a:chacha20:tls1.2_ticket_auth:YnJlYWt3YWxs/?obfsparam=&protoparam=&remarks=".Tools::base64_url_encode("账户已过期,请续费后使用")."&group=".Tools::base64_url_encode($group_name);
@ -631,7 +637,7 @@ class URL
if(!Config::get('mergeSub') and $is_mu == 1){
$group_name .= ' - 单端口';
}
if($user->class !=0){
if(strtotime($user->expire_in)>time()){
$ssurl = "www.google.com:2:auth_chain_a:chacha20:tls1.2_ticket_auth:YnJlYWt3YWxs/?obfsparam=&protoparam=&remarks=".Tools::base64_url_encode("过期时间:".$user->class_expire)."&group=".Tools::base64_url_encode($group_name);
}else{
$ssurl = "www.google.com:2:auth_chain_a:chacha20:tls1.2_ticket_auth:YnJlYWt3YWxs/?obfsparam=&protoparam=&remarks=".Tools::base64_url_encode("账户已过期,请续费后使用")."&group=".Tools::base64_url_encode($group_name);

File diff suppressed because one or more lines are too long

@ -1,14 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -74,35 +66,38 @@
</div>
</main>
{include file='admin/footer.tpl'}
<script src="https://cdn.jsdelivr.net/npm/editor.md@1.5.0/editormd.min.js"></script>
<script>
$(document).ready(function () {
(() => {
editor = editormd("editormd", {
path : "https://cdn.jsdelivr.net/npm/editor.md@1.5.0/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
})();
window.addEventListener('load', () => {
function submit(page = -1) {
if(document.getElementById('issend').checked)
{
if ($$.getElementById('issend').checked) {
var issend=1;
}
else
{
} else {
var issend=0;
}
if(page == -1){
sedPage = 1;
}else {
sedPage = page;
if (page === -1) {
sedPage = 1;
} else {
sedPage = page;
}
$.ajax({
type: "POST",
@ -110,49 +105,34 @@
dataType: "json",
data: {
content: editor.getHTML(),
markdown: editor.getMarkdown(),
vip: $("#vip").val(),
issend: issend,
page:sedPage
markdown: editor.getMarkdown(),
vip: $$getValue('vip'),
issend,
page: sedPage
},
success: function (data) {
if (data.ret == 1) {
success: data => {
if (data.ret === 1) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else if (data.ret == 2){
submit(data.msg);
}else {
} else if (data.ret === 2) {
submit(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("#submit").click(function () {
submit();
});
$$.getElementById('submit').addEventListener('click', ()=>{
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "https://cdn.jsdelivr.net/npm/editor.md@1.5.0/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -49,7 +49,24 @@
<script src="https://cdn.jsdelivr.net/npm/editor.md@1.5.0/editormd.min.js"></script>
<script>
$(document).ready(function () {
(() => {
editor = editormd("editormd", {
path : "https://cdn.jsdelivr.net/npm/editor.md@1.5.0/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true,
emoji : true
});
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
})();
window.addEventListener('load', () => {
function submit() {
$.ajax({
type: "PUT",
@ -59,44 +76,25 @@
content: editor.getHTML(),
markdown: editor.getMarkdown()
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
document.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("#submit").click(function () {
submit();
});
});
$(function() {
editor = editormd("editormd", {
path : "https://cdn.jsdelivr.net/npm/editor.md@1.5.0/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 720,
saveHTMLToTextarea : true,
emoji : true
});
$$.getElementById('submit').addEventListener('click', submit);
/*
// or
var editor = editormd({
id : "editormd",
path : "../lib/"
});
*/
});
</script>

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -66,22 +60,18 @@
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
deleteid = id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
@ -93,25 +83,24 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
})
</script>

@ -1,14 +1,7 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -68,55 +61,42 @@
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
window.addEventListener('load', () => {
function submit() {
$.ajax({
type: "POST",
url: "/admin/auto",
dataType: "json",
data: {
content: $("#content").val(),
sign: $("#sign").val()
content: $$getValue('content'),
sign: $$getValue('sign')
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
$$.getElementById('msg-error-p').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("#submit").click(function () {
submit();
});
$$.getElementById('submit').addEventListener('click', submit);
});
</script>

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -65,23 +59,18 @@
</div>
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
deleteid = id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
function delete_id(){
$.ajax({
type:"DELETE",
@ -90,25 +79,24 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
}else{
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
{include file='table/js_2.tpl'}
})

@ -1,14 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -18,10 +10,7 @@
<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">
@ -36,16 +25,10 @@
<input class="form-control maxwidth-edit" id="number" type="text" >
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
@ -70,56 +53,46 @@
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
window.addEventListener('load', () => {
function submit() {
$.ajax({
type: "POST",
url: "/admin/code",
dataType: "json",
data: {
amount: $("#amount").val(),
number: $("#number").val()
amount: $$getValue('amount'),
number: $$getValue('number')
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = 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);
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
$("html").keydown(event => {
if (event.keyCode === 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
$$.getElementById('submit').addEventListener('click', submit);
})
</script>

@ -1,14 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -18,10 +10,7 @@
<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">
@ -42,20 +31,12 @@
<label class="floating-label" for="amount">金额</label>
<input class="form-control maxwidth-edit" id="amount" type="text" >
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
@ -74,63 +55,51 @@
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
function submit() {
window.addEventListener('load', () => {
let submit = () => {
$.ajax({
type: "POST",
url: "/admin/donate",
dataType: "json",
data: {
amount: $("#amount").val(),
code: $("#code").val(),
type: $("#type").val()
amount: $$getValue("amount"),
code: $$getValue("code"),
type: $$getValue("type")
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = 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);
$$.getElementById('msg-error-p').innerHTML = data.msg;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
$("html").keydown(event => {
if (event.keyCode === 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
$$.getElementById('submit').addEventListener('click', submit);
})
</script>

@ -1,17 +1,5 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -110,30 +98,15 @@
</main>
{include file='admin/footer.tpl'}
<script>
function randomWord() {
return Math.random().toString(36).substr(2);
}
let randomWord = () => Math.random().toString(36).substr(2);
{include file='table/js_1.tpl'}
function submitCoupon(code) {
let submitCoupon = code => {
$.ajax({
type: "POST",
url: "/admin/coupon",
@ -141,40 +114,40 @@ function submitCoupon(code) {
data: {
// prefix: $("#prefix").val(),
prefix: code,
credit: $("#credit").val(),
shop: $("#shop").val(),
onetime: $("#count").val(),
expire: $("#expire").val()
credit: $$getValue('credit'),
shop: $$getValue('shop'),
onetime: $$getValue('count'),
expire: $$getValue('expire'),
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href='/admin/coupon'", {$config['jump_delay']});
}
// window.location.reload();
},
error: function (jqXHR) {
alert("发生错误:" + jqXHR.status);
error: jqXHR => {
alert(`发生错误:${ldelim}jqXHR.status{rdelim}`);
}
})
}
$(document).ready(function () {
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
$("#coupon").click(function () {
var couponCode = $("#prefix").val();
$$.getElementById('coupon').addEventListener('click', () => {
let couponCode = $$.getElementById('prefix').value;
submitCoupon(couponCode);
})
})
$("#coupon-random").click(function () {
var couponCode = randomWord();
$$.getElementById('coupon-random').addEventListener('click', () => {
let couponCode = randomWord();
submitCoupon(couponCode);
})
$("#coupon-prefix-random").click(function () {
var couponCode = $("#prefix").val().concat(randomWord());
$$.getElementById('coupon-random').addEventListener('click', () => {
let couponCode = $$.getElementById('prefix').value.concat(randomWord());
submitCoupon(couponCode);
})

@ -1,14 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -26,8 +18,7 @@
<label class="floating-label" for="name">规则名称</label>
<input class="form-control maxwidth-edit" 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 maxwidth-edit" id="text" name="text" type="text">
@ -37,9 +28,7 @@
<label class="floating-label" for="regex">规则正则表达式</label>
<input class="form-control maxwidth-edit" 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>
@ -49,13 +38,11 @@
</select>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-main">
<div class="card-inner">
@ -74,74 +61,53 @@
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
{literal}
$('#main_form').validate({
rules: {
name: {required: true},
text: {required: true},
regex: {required: true}
name: {required: true},
text: {required: true},
regex: {required: true}
},
{/literal}
submitHandler: function() {
{literal}
$.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+" 发生错误了。");
}
});
}
});
type: "POST",
url: "/admin/detect",
dataType: "json",
data: {
name: $$getValue("name"),
text: $$getValue("text"),
regex: $$getValue("regex"),
type: $$getValue("type")
},
{/literal}
success: data => {
if (data.ret) {
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
});
</script>
{/literal}

@ -93,49 +93,42 @@
{include file='admin/footer.tpl'}
{literal}
<script>
<script>
$('#main_form').validate({
{literal}
rules: {
name: {required: true},
text: {required: true},
regex: {required: true}
},
{/literal}
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}
name: $$getValue("name"),
text: $$getValue("text"),
regex: $$getValue("regex"),
type: $$getValue("type")
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
@ -143,5 +136,3 @@
</script>
{/literal}

@ -81,7 +81,7 @@ function delete_modal_show(id) {
}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
function delete_id(){
@ -92,25 +92,27 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
success: data => {
if(data.ret){
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
{include file='table/js_delete.tpl'}
}else{
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
$("#delete_input").click(function(){
$$.getElementById('delete_input').addEventListener('click',()=>{
delete_id();
});
})
});
</script>

@ -1,11 +1,5 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -38,7 +32,7 @@
<div id="check_chart" style="height: 300px; width: 100%;"></div>
<script src="//cdn.jsdelivr.net/gh/YihanH/canvasjs.js@v2.2/canvasjs.min.js"></script>
<script type="text/javascript">
<script>
var chart = new CanvasJS.Chart("check_chart",
{
title:{
@ -79,29 +73,28 @@
chart.render();
function chartRender(chart){
chart.render();
chart.ctx.shadowBlur = 8;
chart.ctx.shadowOffsetX = 4;
chart.ctx.shadowColor = "black";
chart.render();
chart.ctx.shadowBlur = 8;
chart.ctx.shadowOffsetX = 4;
chart.ctx.shadowColor = "black";
for (var i = 0; i < chart.plotInfo.plotTypes.length; i++) {
var plotType = chart.plotInfo.plotTypes[i];
for (var j = 0; j < plotType.plotUnits.length; j++) {
var plotUnit = plotType.plotUnits[j];
//For Column Chart
if (plotUnit.type === "doughnut"){
chart.renderDoughnut(plotUnit);
}
//For Bar Chart
else if (plotUnit.type === "bar"){
chart.renderBar(plotUnit);
}
}
}
chart.ctx.shadowBlur = 0;
chart.ctx.shadowOffsetX = 0;
chart.ctx.shadowColor = "transparent";
}
for (let i in chart.plotInfo.plotTypes) {
let plotType = chart.plotInfo.plotTypes[i];
for (let j in plotType.plotUnits) {
let plotUnit = plotType.plotUnits[j];
if (plotUnit.type === "doughnut") {
// For Column Chart
chart.renderDoughnut(plotUnit);
} else if (plotUnit.type === "bar") {
// For Bar Chart
chart.renderBar(plotUnit);
}
}
}
chart.ctx.shadowBlur = 0;
chart.ctx.shadowOffsetX = 0;
chart.ctx.shadowColor = "transparent";
}
</script>
</div>
@ -295,15 +288,4 @@
{include file='admin/footer.tpl'}

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -76,50 +70,40 @@
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$("#invite").click(function () {
$$.getElementById('invite').addEventListener('click', () => {
$.ajax({
type: "POST",
url: "/admin/invite",
dataType: "json",
data: {
prefix: $("#prefix").val(),
uid: $("#uid").val(),
num: $("#num").val()
prefix: $$.getElementById('invite').value,
uid: $$.getElementById('uid').value,
num: $$.getElementById('num').value,
},
success: function (data) {
success: 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+"。");
}
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href='/admin/invite'", {$config['jump_delay']} );
} else {
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
}
// window.location.reload();
},
error: function (jqXHR) {
alert("发生错误:" + jqXHR.status);
error: jqXHR => {
alert(`发生错误:${ldelim}jqXHR.status{rdelim}`);
}
})
});
})
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
});
</script>

@ -1,11 +1,5 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -41,7 +35,7 @@
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
{include file='table/js_2.tpl'}
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
});
</script>

@ -1,13 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -63,50 +56,39 @@
</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);
}
$.ajax({
type: "POST",
url: "/admin/unblock",
dataType: "json",
data: {
ip: $$getValue('ip')
},
success: data => {
if (data.ret) {
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=window.location.href", {$config['jump_delay']});
} else {
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
}
// window.location.reload();
},
error: function (jqXHR) {
alert("发生错误:" + jqXHR.status);
}
})
},
error: jqXHR => {
alert(`发生错误:${ldelim}jqXHR.status{rdelim}`);
}
})
});
$(document).ready(function(){
{include file='table/js_2.tpl'}
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
});
</script>

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -42,7 +36,7 @@
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
});
</script>

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -43,7 +37,7 @@
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
});
</script>

@ -169,102 +169,81 @@
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
<script>
{literal}
$('#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}
name: {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)
{
submitHandler: () => {
if ($$.getElementById('custom_method').checked) {
var custom_method=1;
}
else
{
} else {
var custom_method=0;
}
if(document.getElementById('type').checked)
{
if ($$.getElementById('type').checked) {
var type=1;
}
else
{
} else {
var type=0;
}
{/literal}
if(document.getElementById('custom_rss').checked)
{
{/literal}
if ($$.getElementById('custom_rss').checked) {
var custom_rss=1;
}
else
{
} 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()
name: $$getValue('name'),
server: $$getValue('server'),
node_ip: $$getValue('node_ip'),
method: $$getValue('method'),
custom_method,
rate: $$getValue('rate'),
info: $$getValue('info'),
type,
group: $$getValue('group'),
status: $$getValue('status'),
node_speedlimit: $$getValue('node_speedlimit'),
sort: $$getValue('sort'),
class: $$getValue('class'),
node_bandwidth_limit: $$getValue('node_bandwidth_limit'),
bandwidthlimit_resetday: $$getValue('bandwidthlimit_resetday'),
custom_rss,
mu_only: $$getValue('mu_only')
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}

@ -165,16 +165,6 @@
</div>
</main>
{include file='admin/footer.tpl'}
@ -183,91 +173,81 @@
$('#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}
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;
submitHandler: () => {
if ($$.getElementById('custom_method').checked) {
var custom_method = 1;
} else {
var custom_method = 0;
}
if(document.getElementById('type').checked)
{
var type=1;
if ($$.getElementById('type').checked) {
var type = 1;
} else {
var type = 0;
}
else
{
var type=0;
}
{/literal}
if(document.getElementById('custom_rss').checked)
{
var custom_rss=1;
}
else
{
var custom_rss=0;
{/literal}
if ($$.getElementById('custom_rss').checked) {
var custom_rss = 1;
} else {
var custom_rss = 0;
}
$.ajax({
type: "PUT",
url: "/admin/node/{$node->id}",
dataType: "json",
{literal}
{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}
name: $$getValue('name'),
server: $$getValue('server'),
node_ip: $$getValue('node_ip'),
method: $$getValue('method'),
custom_method,
rate: $$getValue('rate'),
info: $$getValue('info'),
type,
group: $$getValue('group'),
status: $$getValue('status'),
sort: $$getValue('sort'),
node_speedlimit: $$getValue('node_speedlimit'),
class: $$getValue('class'),
node_bandwidth_limit: $$getValue('node_bandwidth_limit'),
bandwidthlimit_resetday: $$getValue('bandwidthlimit_resetday')
{/literal},
custom_rss: custom_rss,
mu_only: $$getValue('mu_only')
{literal}
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
$$.getElementById('msg').innerHTML = data.msg;
{/literal}
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
@ -275,4 +255,3 @@
</script>
{/literal}

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -66,52 +60,46 @@
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
deleteid = id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
function delete_id(){
$.ajax({
type:"DELETE",
url:"/admin/node",
dataType:"json",
type: "DELETE",
url: "/admin/node",
dataType: "json",
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret){
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
{include file='table/js_delete.tpl'}
}else{
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
})
</script>

@ -113,53 +113,59 @@
<script>
$(document).ready(function () {
function submit() {
if (document.getElementById('AliPay_Status').checked) var AliPay_Status = 1;
else var AliPay_Status = 0;
if (document.getElementById('WxPay_Status').checked) var WxPay_Status = 1;
else var WxPay_Status = 0;
$.ajax({
type: "POST",
url: "/admin/saveConfig",
dataType: "json",
data: {
AliPay_Status: AliPay_Status,
WxPay_Status: WxPay_Status,
Notice_EMail: $("#Notice_EMail").val(),
AliPay_QRcode: $("#AliPay_QRcode").val(),
AliPay_Cookie: $("#AliPay_Cookie").val(),
WxPay_Url: $("#WxPay_Url").val(),
WxPay_QRcode: $("#WxPay_QRcode").val(),
WxPay_Cookie: $("#WxPay_Cookie").val(),
Pay_Price: $("#Pay_Price").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
window.setTimeout("location.reload()", {$config['jump_delay']});
} else {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html(data.msg);
}
},
error: function (jqXHR) {
window.addEventListener('load', () => {
function submit() {
if ($$.getElementById('AliPay_Status').checked) {
var AliPay_Status = 1;
} else {
var AliPay_Status = 0;
}
if ($$.getElementById('WxPay_Status').checked) {
var WxPay_Status = 1
} else {
var WxPay_Status = 0
};
$.ajax({
type: "POST",
url: "/admin/saveConfig",
dataType: "json",
data: {
AliPay_Status,
WxPay_Status,
Notice_EMail: $$.getElementById('Notice_EMail').value,
AliPay_QRcode: $$.getElementById('AliPay_QRcode').value,
AliPay_Cookie: $$.getElementById('AliPay_Cookie').value,
WxPay_Url: $$.getElementById('WxPay_Url').value,
WxPay_QRcode: $$.getElementById('WxPay_QRcode').value,
WxPay_Cookie: $$.getElementById('WxPay_Cookie').value,
Pay_Price: $$.getElementById('Pay_Price').value,
},
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg + " 发生错误了。");
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.reload()", {$config['jump_delay']});
} else {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$$.getElementById('msg-error-p').innerHTML = data.msg;
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
},
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
$("#submit").click(function () {
submit();
});
}
$("html").keydown(event => {
if (event.keyCode == 13) {
login();
}
});
$$.getElementById('submit').addEventListener('click', submit);
})
})
</script>

@ -1,14 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -89,68 +81,50 @@
</div>
</main>
{include file='admin/footer.tpl'}
{literal}
<script>
<script>
{literal}
$('#main_form').validate({
rules: {
priority: {required: true},
port: {required: true},
user_id: {required: true}
},
{/literal}
submitHandler: () => {
submitHandler: function() {
$.ajax({
$.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}
source_node: $$getValue('source_node'),
dist_node: $$getValue('dist_node'),
port: $$getValue('port'),
user_id: $$getValue('user_id'),
priority: $$getValue('priority')
},
success: data => {
if (data.ret) {
$("#result").modal();
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
} else {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = data.msg;
}
});
},
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
});
}
});
</script>
{/literal}

@ -1,15 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -84,8 +75,6 @@
</div>
</div>
</main>
@ -93,54 +82,45 @@
{include file='admin/footer.tpl'}
{literal}
<script>
<script>
{literal}
$('#main_form').validate({
rules: {
priority: {required: true},
port: {required: true},
user_id: {required: true}
},
{/literal}
submitHandler: () => {
submitHandler: function() {
$.ajax({
{/literal}
type: "PUT",
$.ajax({
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) {
source_node: $$getValue('source_node'),
dist_node: $$getValue('dist_node'),
port: $$getValue('port'),
user_id: $$getValue('user_id'),
priority: $$getValue('priority')
},
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
{/literal}
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
{literal}
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
} else {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = data.msg;
}
});
},
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
});
}
});
</script>
{/literal}

@ -1,14 +1,7 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -85,24 +78,19 @@
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
deleteid = id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
@ -114,37 +102,34 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
{include file='table/js_delete.tpl'}
}else{
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了。`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
function search(){
window.location="/admin/relay/path_search/"+$("#search").val();
}
let search = () => {
window.location = `/admin/relay/path_search/${ldelim}$$.getElementById('search').value{rdelim}`;
}
$("#search_button").click(function(){
if($("#search").val()!="")
{
search();
}
});
$$.getElementById('search_button').addEventListener('click', () => {
if ($$.getElementById('search').value !== "") {
search();
}
})
})
</script>

@ -1,14 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -86,39 +78,29 @@
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function(){
window.addEventListener('load', () => {
table = $('#table_1').DataTable({
"columnDefs": [
{
targets: [ '_all' ],
className: 'mdl-data-table__cell--non-numeric'
}
],
"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();
}
let search = () => {
window.location = `/admin/relay/path_search/${$$.getElementById('search').value}`
}
$("#search_button").click(function(){
if($("#search").val()!="")
{
search();
}
});
$$.getElementById('search_button').addEventListener('click', () => {
if ($$.getElementById('search').value !== "") {
search();
}
})
})
</script>

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -60,21 +54,17 @@
</main>
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
deleteid = id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
function delete_id(){
@ -85,25 +75,24 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$("#row_delete_"+deleteid).attr("disabled","true");
}else{
$$.getElementById('msg').innerHTML = data.msg;
$$.getElementById(`row_delete_${ldelim}deleteid{rdelim}`).setAttribute('disabled', 'true')
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生错误了`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
})
</script>

@ -1,12 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -165,8 +159,6 @@
{include file='dialog.tpl'}
</div>
@ -174,34 +166,20 @@
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
window.addEventListener('load', () => {
function submit() {
if(document.getElementById('auto_reset_bandwidth').checked)
{
var auto_reset_bandwidth=1;
}
else
{
var auto_reset_bandwidth=0;
}
if ($$.getElementById('auto_reset_bandwidth').checked) {
var auto_reset_bandwidth = 1;
} else {
var auto_reset_bandwidth = 0;
}
let contentExtra = $("#content_extra").val();
if (contentExtra=='') {
let contentExtra = $$.getElementById('content_extra').value;
if (contentExtra === '') {
contentExtra = 'check-全球节点分布;check-快速客服响应;check-全平台客户端';
}
@ -210,45 +188,42 @@
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(),
speedlimit: $("#speedlimit").val(),
connector: $("#connector").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(),
name: $$getValue('name'),
auto_reset_bandwidth,
price: $$getValue('price'),
auto_renew: $$getValue('auto_renew'),
bandwidth: $$getValue('bandwidth'),
speedlimit: $$getValue('speedlimit'),
connector: $$getValue('connector'),
expire: $$getValue('expire'),
class: $$getValue('class'),
class_expire: $$getValue('class_expire'),
reset: $$getValue('reset'),
reset_value: $$getValue('reset_value'),
reset_exp: $$getValue('reset_exp'),
content_extra: contentExtra,
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
}
});
$("#submit").click(function () {
submit();
$("html").keydown(event => {
if (event.keyCode == 13) login();
});
$$.getElementById('submit').addEventListener('click', submit);
})
</script>

@ -1,12 +1,6 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -177,34 +171,21 @@
</div>
</main>
{include file='admin/footer.tpl'}
<script>
$(document).ready(function () {
window.addEventListener('load', () => {
function submit() {
if(document.getElementById('auto_reset_bandwidth').checked)
{
if ($$.getElementById('auto_reset_bandwidth').checked) {
var auto_reset_bandwidth=1;
}
else
{
} else {
var auto_reset_bandwidth=0;
}
let contentExtra = $("#content_extra").val();
if (contentExtra=='' || contentExtra=='-') {
let contentExtra = $$getValue('content_extra');
if (contentExtra === '' || contentExtra === '-') {
contentExtra = 'check-全球节点分布;check-快速客服响应;check-全平台客户端';
}
@ -213,45 +194,45 @@
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(),
speedlimit: $("#speedlimit").val(),
connector: $("#connector").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(),
content_extra: contentExtra,
name: $$getValue('name'),
auto_reset_bandwidth,
price: $$getValue('price'),
auto_renew: $$getValue('auto_renew'),
bandwidth: $$getValue('bandwidth'),
speedlimit: $$getValue('speedlimit'),
connector: $$getValue('connector'),
expire: $$getValue('expire'),
class: $$getValue('class'),
class_expire: $$getValue('class_expire'),
reset: $$getValue('reset'),
reset_value: $$getValue('reset_value'),
reset_exp: $$getValue('reset_exp'),
content_extra: contentExtra,
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href='/admin/shop'", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
$("html").keydown(event => {
if (event.keyCode === 13) {
login();
}
});
$("#submit").click(function () {
submit();
});
$$.getElementById('submit').addEventListener('click', submit);
})
</script>

@ -72,14 +72,15 @@
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
deleteid = id;
$("#delete_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
table_1 = $('#table_1').DataTable({
ajax: {
url: '{$table_config['ajax_url']}',
@ -101,18 +102,17 @@ $(document).ready(function(){
})
var has_init = JSON.parse(localStorage.getItem(window.location.href + '-hasinit'));
if (has_init != true) {
localStorage.setItem(window.location.href + '-hasinit', true);
var has_init = JSON.parse(localStorage.getItem(`${ldelim}window.location.href{rdelim}-hasinit`));
if (has_init !== true) {
localStorage.setItem(`${ldelim}window.location.href{rdelim}-hasinit`, true);
}
else {
{foreach $table_config['total_column'] as $key => $value}
var checked = JSON.parse(localStorage.getItem(window.location.href + '-haschecked-checkbox_{$key}'));
var checked = JSON.parse(localStorage.getItem(`${ldelim}window.location.href{rdelim}-haschecked-checkbox_{$key}`));
if (checked == true) {
document.getElementById('checkbox_{$key}').checked = true;
}
else {
document.getElementById('checkbox_{$key}').checked = false;
$$.getElementById('checkbox_{$key}').checked = true;
} else {
$$.getElementById('checkbox_{$key}').checked = false;
}
{/foreach}
}
@ -130,25 +130,24 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data =>{
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$("#row_delete_"+deleteid).attr("disabled","true");
}else{
$$.getElementById('msg').innerHTML = data.msg;
$$.getElementById(`row_delete_${ldelim}deleteid{rdelim}`).setAttribute('disabled', 'true')
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生了错误。`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
})
</script>

@ -1,9 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
@ -41,17 +36,14 @@
</main>
{include file='admin/footer.tpl'}
<script>
{include file='table/js_1.tpl'}
$(document).ready(function(){
table = $('#table_tickets').DataTable({
window.addEventListener('load', () => {
table = $('#table_tickets').DataTable({
ajax: 'ticket/ajax',
processing: true,
serverSide: true,

@ -1,14 +1,5 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -30,9 +21,6 @@
</div>
</div>
</div>
</div>
</div>
@ -77,8 +65,6 @@
<div class="card-main">
<div class="card-inner">
{$ticket->content}
</div>
<div class="card-action"> {$ticket->datetime()}</div>
</div>
@ -89,67 +75,54 @@
{include file='dialog.tpl'}
</div>
</div>
</main>
{include file='admin/footer.tpl'}
<script src="https://cdn.jsdelivr.net/npm/editor.md@1.5.0/editormd.min.js"></script>
<script>
function changetouser_modal_show() {
$("#changetouser_modal").modal();
}
$(document).ready(function () {
function changetouser_modal_show() {
$("#changetouser_modal").modal();
}
window.addEventListener('load', () => {
function submit() {
$("#result").modal();
$("#msg").html("正在提交。");
$$.getElementById('msg').innerHTML = `正在提交。`;
$.ajax({
type: "PUT",
url: "/admin/ticket/{$id}",
dataType: "json",
data: {
content: editor.getHTML(),
title: $("#title").val(),
status:status
status
},
success: function (data) {
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: function (jqXHR) {
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:" + jqXHR.status);
error: jqXHR => {
$("#result").modal();
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("#submit").click(function () {
status=1;
$$.getElementById('submit').addEventListener('click', () => {
status = 1;
submit();
});
$("#close").click(function () {
status=0;
$$.getElementById('close').addEventListener('click', () => {
status = 0;
submit();
});
@ -159,37 +132,39 @@
url:"/admin/user/changetouser",
dataType:"json",
data:{
userid: {$ticket->User()->id},
adminid: {$user->id},
local: '/admin/ticket/'+{$ticket->id}+'/view'
userid: {$ticket->User()->id},
adminid: {$user->id},
local: '/admin/ticket/' + {$ticket->id} + '/view'
},
success:function(data){
if(data.ret){
success: data =>{
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href='/user'", {$config['jump_delay']});
}else{
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
}
$("#changetouser_input").click(function(){
$$.getElementById('changetouser_input').addEventListener('click', ()=>{
changetouser_id();
});
});
$(function() {
});
(() => {
editor = editormd("editormd", {
path : "https://cdn.jsdelivr.net/npm/editor.md@1.5.0/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 450,
saveHTMLToTextarea : true,
emoji : true
path : "https://cdn.jsdelivr.net/npm/editor.md@1.5.0/lib/", // Autoload modules mode, codemirror, marked... dependents libs path
height: 450,
saveHTMLToTextarea : true,
emoji : true
});
/*
@ -199,12 +174,6 @@
path : "../lib/"
});
*/
});
</script>
})();
</script>

@ -1,10 +1,4 @@
{include file='admin/main.tpl'}
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
@ -41,14 +35,6 @@
</main>
{include file='admin/footer.tpl'}
<script>
@ -56,7 +42,7 @@
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
{include file='table/js_2.tpl'}
});
</script>

@ -259,108 +259,88 @@
</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;
}
if(document.getElementById('ga_enable').checked)
{
var ga_enable=1;
}
else
{
var ga_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,
ga_enable: ga_enable,
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+" 发生了错误。");
}
});
window.addEventListener('load', () => {
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;
}
if (document.getElementById('ga_enable').checked) {
var ga_enable = 1;
} else {
var ga_enable=0;
}
$("html").keydown(function (event) {
if (event.keyCode == 13) {
login();
$.ajax({
type: "PUT",
url: "/admin/user/{$edit_user->id}",
dataType: "json",
data: {
email: $$getValue('email'),
pass: $$getValue('pass'),
auto_reset_day: $$getValue('auto_reset_day'),
auto_reset_bandwidth: $$getValue('auto_reset_bandwidth'),
is_multi_user: $$getValue('is_multi_user'),
port: $$getValue('port'),
group: $$getValue('group'),
passwd: $$getValue('passwd'),
transfer_enable: $$getValue('transfer_enable'),
invite_num: $$getValue('invite_num'),
node_speedlimit: $$getValue('node_speedlimit'),
method: $$getValue('method'),
remark: $$getValue('remark'),
money: $$getValue('money'),
enable,
is_admin,
ga_enable,
ref_by: $$getValue('ref_by'),
forbidden_ip: $$getValue('forbidden_ip'),
forbidden_port: $$getValue('forbidden_port'),
class: $$getValue('class'),
class_expire: $$getValue('class_expire'),
expire_in: $$getValue('expire_in'),
node_connector: $$getValue('node_connector'),
protocol: $$getValue('protocol'),
protocol_param: $$getValue('protocol_param'),
obfs: $$getValue('obfs'),
obfs_param: $$getValue('obfs_param'),
},
success: data => {
if (data.ret) {
$("result").modal();
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});
} else {
$("result").modal();
$$.getElementById('msg').innerHTML = data.msg;
}
},
error: jqXHR => {
$("result").modal();
$$.getElementById('msg').innerHTML = `发生错误:${ldelim}jqXHR.status{rdelim}`;
}
});
$("#submit").click(function () {
submit();
});
}
$("html").keydown(event => {
if (event.keyCode == 13) login();
});
$$.getElementById('submit').addEventListener('click', submit);
})
})
</script>

@ -1,9 +1,5 @@
{include file='admin/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
@ -79,85 +75,89 @@
{include file='admin/footer.tpl'}
<script>
function delete_modal_show(id) {
deleteid=id;
$("#delete_modal").modal();
deleteid = id;
$("#delete_modal").modal();
}
function changetouser_modal_show(id) {
changetouserid=id;
$("#changetouser_modal").modal();
changetouserid = id;
$("#changetouser_modal").modal();
}
{include file='table/js_1.tpl'}
$(document).ready(function(){
window.addEventListener('load', () => {
table_1 = $('#table_1').DataTable({
order:[[1, 'asc' ]],
stateSave: true,
serverSide: true,
ajax: {
url :"/admin/user/ajax",
type: "POST",
},
columns: [
{ "data": "op" ,"orderable":false},
{ "data": "id" },
{ "data": "user_name" },
{ "data": "remark" },
{ "data": "email" },
{ "data": "money" },
{ "data": "im_type" },
{ "data": "im_value" },
{ "data": "node_group" },
{ "data": "expire_in" },
{ "data": "class" },
{ "data": "class_expire" },
{ "data": "passwd" },
{ "data": "port" },
{ "data": "method" },
{ "data": "protocol" },
{ "data": "obfs" },
{ "data": "online_ip_count" ,"orderable":false},
{ "data": "last_ss_time" ,"orderable":false},
{ "data": "used_traffic" ,"orderable":false},
{ "data": "enable_traffic" ,"orderable":false},
{ "data": "last_checkin_time" ,"orderable":false},
{ "data": "today_traffic" ,"orderable":false},
{ "data": "enable" },
{ "data": "reg_date" },
{ "data": "reg_ip" },
{ "data": "auto_reset_day" },
{ "data": "auto_reset_bandwidth" },
{ "data": "ref_by" },
{ "data": "ref_by_user_name" ,"orderable":false}
],
"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);
order:[[1, 'asc' ]],
stateSave: true,
serverSide: true,
ajax: {
url :"/admin/user/ajax",
type: "POST",
},
columns: [
{ "data": "op" ,"orderable":false},
{ "data": "id" },
{ "data": "user_name" },
{ "data": "remark" },
{ "data": "email" },
{ "data": "money" },
{ "data": "im_type" },
{ "data": "im_value" },
{ "data": "node_group" },
{ "data": "expire_in" },
{ "data": "class" },
{ "data": "class_expire" },
{ "data": "passwd" },
{ "data": "port" },
{ "data": "method" },
{ "data": "protocol" },
{ "data": "obfs" },
{ "data": "online_ip_count" ,"orderable":false},
{ "data": "last_ss_time" ,"orderable":false},
{ "data": "used_traffic" ,"orderable":false},
{ "data": "enable_traffic" ,"orderable":false},
{ "data": "last_checkin_time" ,"orderable":false},
{ "data": "today_traffic" ,"orderable":false},
{ "data": "enable" },
{ "data": "reg_date" },
{ "data": "reg_ip" },
{ "data": "auto_reset_day" },
{ "data": "auto_reset_bandwidth" },
{ "data": "ref_by" },
{ "data": "ref_by_user_name" ,"orderable":false}
],
"columnDefs": [
{
targets: [ '_all' ],
className: 'mdl-data-table__cell--non-numeric'
}
],
{include file='table/lang_chinese.tpl'}
});
var has_init = JSON.parse(localStorage.getItem(`${ldelim}window.location.href{rdelim}-hasinit`));
if (has_init !== true) {
localStorage.setItem(`${ldelim}window.location.href{rdelim}-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;
if (checked) {
$$.getElementById('checkbox_{$key}').checked = true;
} else {
document.getElementById('checkbox_{$key}').checked = false;
$$.getElementById('checkbox_{$key}').checked = false;
}
{/foreach}
}
{foreach $table_config['total_column'] as $key => $value}
modify_table_visible('checkbox_{$key}', '{$key}');
modify_table_visible('checkbox_{$key}', '{$key}');
{/foreach}
function delete_id(){
function delete_id() {
$.ajax({
type:"DELETE",
url:"/admin/user",
@ -165,33 +165,30 @@ $(document).ready(function(){
data:{
id: deleteid
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
{include file='table/js_delete.tpl'}
}else{
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生了错误。`;
}
});
}
$("#delete_input").click(function(){
delete_id();
});
$("#search_button").click(function(){
if($("#search").val()!="")
{
search();
}
});
$$.getElementById('delete_input').addEventListener('click', delete_id);
// $$.getElementById('search_button').addEventListener('click', () => {
// if ($$.getElementById('search') !== '') search();
// });
function changetouser_id(){
$.ajax({
@ -199,29 +196,28 @@ $(document).ready(function(){
url:"/admin/user/changetouser",
dataType:"json",
data:{
userid: changetouserid,
adminid: {$user->id},
local: '/admin/user'
userid: changetouserid,
adminid: {$user->id},
local: '/admin/user'
},
success:function(data){
if(data.ret){
success: data => {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
window.setTimeout("location.href='/user'", {$config['jump_delay']});
}else{
} else {
$("#result").modal();
$("#msg").html(data.msg);
$$.getElementById('msg').innerHTML = data.msg;
}
},
error:function(jqXHR){
error: jqXHR => {
$("#result").modal();
$("#msg").html(data.msg+" 发生错误了。");
$$.getElementById('msg').innerHTML = `${ldelim}data.msg{rdelim} 发生了错误。`;
}
});
}
$("#changetouser_input").click(function(){
changetouser_id();
});
$$.getElementById('changetouser_input').addEventListener('click', changetouser_id);
})

@ -59,21 +59,19 @@
{include file='admin/footer.tpl'}
<script>
function goto(type) {
var countPage = $("#countPage").val();
var currentPage = $("#currentPage").val();
if ("pre" == type){
if (currentPage == 1 || currentPage == ""){
}else {
var countPage = $$.getElementById('countPage').value,
currentPage = $$.getElementById('currentPage').value;
if ("pre" === type) {
if (currentPage !== 1 && currentPage !== "") {
window.location.href = "/admin/yftOrder?page=" + {$currentPage -1};
}
}else if ("next" == type){
if (currentPage == countPage){
}else {
} else if ("next" === type) {
if (currentPage !== countPage) {
window.location.href = "/admin/yftOrder?page=" + {$currentPage +1};
}
}else if ("end" == type){
if (countPage == currentPage){
}else {
} else if ("end" == type) {
if (countPage !== currentPage) {
window.location.href = "/admin/yftOrder?page=" + countPage;
}
}

Loading…
Cancel
Save