38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
var sys = null;
|
|
|
|
$(document).ready(function() {
|
|
sys = new SYSTEM('./api.php',1);
|
|
sys.go_state('start');
|
|
//sys.load();
|
|
});
|
|
|
|
function sendInfo(json,toolbar){
|
|
sys.call('call=charcreation&json='+json,
|
|
function(){sys.load(toolbar)},
|
|
{},'json',false);}
|
|
|
|
function init_start(){
|
|
register_login();
|
|
load_visualisation('mojopulse');
|
|
$('#start a').click(function() {
|
|
sys.load('wizard_details');});
|
|
}
|
|
|
|
function register_login(){
|
|
$("#login_form input").not("[type=submit]").jqBootstrapValidation({
|
|
preventSubmit: true,
|
|
submitError: function($form, event, errors) {},
|
|
submitSuccess: function($form, event){
|
|
$.get('./api.php?call=account&action=login&username='+$('#bt_login_user').val()+'&password_sha='+$.sha1($('#bt_login_password').val())+'&password_md5='+$.md5($('#bt_login_password').val()), function (data) {
|
|
if(data == 1){
|
|
$('.help-block').html("Login successfull.</br>");
|
|
window.location.reload();
|
|
} else {
|
|
$('.help-block').html("Login not successfull.</br> User & Password combination wrong.")
|
|
}
|
|
});
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
}
|