init: 从宝塔同步到 Gitea
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{$lang['system_name']}</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/static/agent/css/font.css">
|
||||
<link rel="stylesheet" href="/static/agent/css/xadmin.css">
|
||||
<script type="text/javascript" src="/static/agent/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/static/agent/lib/layui/layui.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="/static/agent/js/xadmin.js"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.layui-form-item .layui-input-inline {
|
||||
width: 260px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['superior_account']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="agent_parent" value="{$user_info.username}({$user_info.nickname})"
|
||||
autocomplete="off" class="layui-input layui-username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['username']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="username" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<button class="layui-btn" type="button" id="createUsername">{$lang['automatically']}</button>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['nickname']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="nickname" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['password']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="password" autocomplete="off" class="layui-input" onfocus="this.type='password'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['confirm_password']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="repassword" autocomplete="off" class="layui-input" onfocus="this.type='password'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['sub_account_function']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<select type="text" id="account_type" autocomplete="off" class="layui-select">
|
||||
<option value="1">{$lang['account_management']}</option>
|
||||
<option value="2">{$lang['supply_and_drainage_management']}</option>
|
||||
<option value="3">{$lang['report_management']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="" class="layui-form-label">
|
||||
</label>
|
||||
<button class="layui-btn" type="button" id="submit">{$lang['submit_now']}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
var lang = {$jsonlang};
|
||||
// 系统随机生成用户名
|
||||
$('#createUsername').click(function(){
|
||||
var rand = '';
|
||||
var num = '';
|
||||
for(var i = 0; i < 6; i++){
|
||||
num = Math.floor(Math.random() * 10);
|
||||
rand += num;
|
||||
}
|
||||
$('#username').val(rand);
|
||||
});
|
||||
|
||||
|
||||
// 提交添加会员
|
||||
$('#submit').click(function(){
|
||||
// 获取数据
|
||||
var query = new Object();
|
||||
query.username = $('#username').val();
|
||||
query.nickname = $('#nickname').val();
|
||||
query.password = $('#password').val();
|
||||
query.repassword = $('#repassword').val();
|
||||
query.account_type = $('#account_type').val();
|
||||
|
||||
// 验证数据
|
||||
if(query.username.length == 0 || query.username == undefined){
|
||||
layer.alert(lang.empty_username);
|
||||
return false;
|
||||
}
|
||||
if(query.nickname.length == 0 || query.nickname == undefined){
|
||||
layer.alert(lang.empty_nickname);
|
||||
return false;
|
||||
}
|
||||
if(query.password.length == 0 || query.password == undefined){
|
||||
layer.alert(lang.empty_password);
|
||||
return false;
|
||||
}
|
||||
if(query.password.length < 6){
|
||||
layer.alert(lang.new_pass_limit);
|
||||
return false;
|
||||
}
|
||||
if(query.password != query.repassword){
|
||||
layer.alert(lang.pass_diff);
|
||||
return false;
|
||||
}
|
||||
if(query.account_type.length == 0 || query.account_type == undefined){
|
||||
layer.alert(lang['select_account_function']);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 发送数据给后台创建代理
|
||||
$.ajax({
|
||||
url:'/sub/do_add',
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
success:function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg);
|
||||
}else if(data.code == 1){
|
||||
layer.alert(data.msg,function(index){
|
||||
layer.close(index);
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{$lang['system_name']}</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/static/agent/css/font.css">
|
||||
<link rel="stylesheet" href="/static/agent/css/xadmin.css">
|
||||
<script type="text/javascript" src="/static/agent/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/static/agent/lib/layui/layui.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="/static/agent/js/xadmin.js"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.relation{ text-decoration: underline;}
|
||||
.relation:hover{ color:#807362}
|
||||
.self{ background:rgb(199, 182, 151)}
|
||||
.self:hover{ background:rgb(199, 182, 151) !important;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="iframeClass scroll-wrapper">
|
||||
<div class="x-body">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lang['username']}</th>
|
||||
<th>{$lang['nickname']}</th>
|
||||
<th>{$lang['sub_account_function']}</th>
|
||||
<th>{$lang['create_time']}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="$sub_list" item="vo"}
|
||||
<tr>
|
||||
<td>{$vo.username}</td>
|
||||
<td>{$vo.nickname}</td>
|
||||
<td>{$vo.account_type}</td>
|
||||
<td>{$vo.create_time}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(count($sub_list) == 0): ?>
|
||||
<div style="text-align:center;width:100%;">{$lang['no_data']}</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{$lang['system_name']}</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/static/agent/css/font.css">
|
||||
<link rel="stylesheet" href="/static/agent/css/xadmin.css">
|
||||
<script type="text/javascript" src="/static/agent/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/static/agent/lib/layui/layui.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="/static/agent/js/xadmin.js"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.layui-form-label {
|
||||
width: 150px;
|
||||
}
|
||||
.layui-form-item .layui-input-inline {
|
||||
width: 320px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['superior_account']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="agent_parent" value="{$user_info.username}({$user_info.nickname})"
|
||||
autocomplete="off" class="layui-input layui-username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['username']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="username" autocomplete="off" class="layui-input readonly" value={$sub_info.username} readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['nickname']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="nickname" autocomplete="off" class="layui-input" value={$sub_info.nickname}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['password']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="password" autocomplete="off" class="layui-input" onfocus="this.type='password'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['confirm_password']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="repassword" autocomplete="off" class="layui-input" onfocus="this.type='password'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="username" class="layui-form-label">{$lang['sub_account_function']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<select type="text" id="account_type" autocomplete="off" class="layui-select">
|
||||
<option value="1" <?php if($sub_info['account_type'] == 1) echo 'selected="selected"'; ?>>{$lang['account_management']}</option>
|
||||
<option value="2" <?php if($sub_info['account_type'] == 2) echo 'selected="selected"'; ?>>{$lang['supply_and_drainage_management']}</option>
|
||||
<option value="3" <?php if($sub_info['account_type'] == 3) echo 'selected="selected"'; ?>>{$lang['report_management']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="" class="layui-form-label">
|
||||
</label>
|
||||
<button class="layui-btn" type="button" id="submit">{$lang['submit_now']}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
// 提交添加会员
|
||||
var lang = {$jsonlang};
|
||||
$('#submit').click(function(){
|
||||
// 获取数据
|
||||
var query = new Object();
|
||||
query.sub_id = {$sub_info['id']};
|
||||
query.nickname = $('#nickname').val();
|
||||
query.password = $('#password').val();
|
||||
query.repassword = $('#repassword').val();
|
||||
query.account_type = $('#account_type').val();
|
||||
if(query.nickname.length == 0 || query.nickname == undefined){
|
||||
layer.alert(lang.empty_nickname);
|
||||
return false;
|
||||
}
|
||||
if(query.password.length > 0){
|
||||
if(query.password.length < 6){
|
||||
layer.alert(lang.new_pass_limit);
|
||||
return false;
|
||||
}
|
||||
if(query.password != query.repassword){
|
||||
layer.alert(lang.pass_diff);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(query.account_type.length == 0 || query.account_type == undefined){
|
||||
layer.alert(lang.select_account_function);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 发送数据给后台创建代理
|
||||
$.ajax({
|
||||
url:'/sub/do_edit',
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
success:function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg);
|
||||
}else if(data.code == 1){
|
||||
layer.alert(data.msg,function(index){
|
||||
layer.close(index);
|
||||
parent.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{$lang['system_name']}</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/static/agent/css/font.css">
|
||||
<link rel="stylesheet" href="/static/agent/css/xadmin.css">
|
||||
<script type="text/javascript" src="/static/agent/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/static/agent/lib/layui/layui.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="/static/agent/js/xadmin.js"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.relation{ text-decoration: underline;}
|
||||
.relation:hover{ color:#807362}
|
||||
.self{ background:rgb(199, 182, 151)}
|
||||
.self:hover{ background:rgb(199, 182, 151) !important;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="iframeClass scroll-wrapper">
|
||||
<div class="x-body">
|
||||
<div class="layui-form">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lang['username']}</th>
|
||||
<th>{$lang['nickname']}</th>
|
||||
<th>{$lang['sub_account_function']}</th>
|
||||
<th>{$lang['create_time']}</th>
|
||||
<th>{$lang['operate']}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="$sub_list" item="vo"}
|
||||
<tr>
|
||||
<td>{$vo.username}</td>
|
||||
<td>{$vo.nickname}</td>
|
||||
<td>{$vo.account_type}</td>
|
||||
<td>{$vo.create_time}</td>
|
||||
<td>
|
||||
<a class="layui-btn layui-operation" href="javascript:;" onclick="x_admin_show('{$lang.edit_sub_account}','/sub/edit_sub?id={$vo.id}',800,430)">{$lang['edit_sub_account']}</a>
|
||||
<a class="layui-btn layui-operation" href="javascript:;" onclick="del({$vo.id})">{$lang['delete_sub_account']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(count($sub_list) == 0): ?>
|
||||
<div style="text-align:center;width:100%;">{$lang['no_data']}</div>
|
||||
<?php else: ?>
|
||||
<div class="page">{$sub_list->render()}</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var lang = {$jsonlang};
|
||||
function del(id){
|
||||
layer.confirm(lang.is_delete_sub_account, {
|
||||
title: lang.delete_sub_account,
|
||||
btn: [lang.yse,lang.no] //按钮
|
||||
}, function(){
|
||||
var query = new Object();
|
||||
query.sub_id = id;
|
||||
$.ajax({
|
||||
url:'/sub/do_del',
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
success:function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{
|
||||
title:lang.message,
|
||||
});
|
||||
}else if(data.code == 1){
|
||||
layer.alert(data.msg,{
|
||||
title:lang.message,
|
||||
},function(index){
|
||||
layer.close(index);
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}, function(){
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user