You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
413 B
JavaScript

5 years ago
protocol = window.location.protocol;
function check_login(){
$.ajax({
url:protocol+"//" + window.location.host + "/api/check_login.php?callback=?",
dataType:"jsonp",
jsonp: "callback",
success:function(data){
if(data != 'no'){
$("#no_login").hide();
$("#ok_login").show();
$("#user").html(data);
}else{
$("#no_login").show();
$("#ok_login").hide();
}
}
});
}