init: 从宝塔同步到 Gitea
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user