install.html 2.35 KB
Newer Older
jose's avatar
jose committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="robots" content="noindex,nofollow">
		<title>{{data['lan']['TITLE']}}</title>
		<link href="/static/css/install.css" rel="stylesheet">
		<script type="text/javascript" src="/static/js/jquery.js"></script>
		<script type="text/javascript" src="/static/layer/layer.js"></script>
	</head>
	<body>
		<div class="main">
		{% if data['status'] %}
			<div class="warp">
				<div class="title">{{data['lan']['INIT_PANEL']}}</div>
				<form class="form" action="/install?action=install" method="post" onsubmit="return checkSubmit()">
					<fieldset>
						<legend>{{data['lan']['SET_ADMIN']}}</legend>
						<p><span class="tit">{{data['lan']['USER_NAME']}}</span><input type="text" name="bt_username" value="{{data['username']}}" /> {{data['lan']['SET_ADMIN_NAME']}}</p>
						<p><span class="tit">{{data['lan']['MAM_PASS']}} </span><input type="password" name="bt_password1" value="" /> {{data['lan']['SET_ADMIN_NAME']}}</p>
						<p><span class="tit">{{data['lan']['REPEAT_PASS']}} </span><input type="password" name="bt_password2" value="" /> {{data['lan']['SET_ADMIN_PASS']}}</p>
					</fieldset>
					<input class="submit-btn" type="submit" value="{{data['lan']['CONFIRM']}}" />
				</form>
			</div>
		{% else %}
			<div class="success">
			<p>{{data['lan']['INIT_PANEL_SUCCESS']}}</p>
			<a href="/login">{{data['lan']['LOGIN_PAGE']}}</a>
			</div>
        {% endif %}
		</div>
		<div class="copyright">Copyright © 2014-2099 <a href="http://www.bt.cn" target="_blank">{{data['lan']['BT']}}</a>{{data['lan']['PS1']}}(<a href="http://www.bt.cn" target="_blank">www.bt.cn</a>) All Rights Reserved</div>
		<script>
			function checkSubmit(){
				var username = $("input[name='bt_username']").val();
				var password1 = $("input[name='bt_password1']").val();
				var password2 = $("input[name='bt_password2']").val();
				if(username == '' || password1 == ''){
					layer.msg(lan.install.passwd_cant_empty,{icon:5});
					return false;
				}
				
				if(password1 != password2){
					layer.msg(lan.install.passwd_not_same,{icon:5});
					return false;
				}
				layer.msg(lan.install.setting_up,{icon:16,time:0});
				return true;
			}
			var main = $(".main");
			$(window).resize(function () {
			  var wh = $(window).height();
			  main.height(wh);
			}).resize();
		</script>
	</body>
</html>