This commit is contained in:
Abdulrahman
2019-02-07 11:49:12 +03:00
parent f0dac81b08
commit 4f368775eb
2 changed files with 8 additions and 5 deletions

View File

@@ -14,8 +14,8 @@
setTimeout(function(){ setTimeout(function(){
$.ajax({ $.ajax({
url: './?cp=p_check_update&smt=check&_ajax_=1', url: './?cp=p_check_update&smt=check&_ajax_=1',
dataType: 'json', dataType: 'json'})
success: function (data) { .done(function (data) {
if(data.content){ if(data.content){
var info = data.content.split(":::"); var info = data.content.split(":::");
$('#updateInfo').html(info[1]).addClass(info[0] == 1 ? 'alert-warning' : 'alert-info'); $('#updateInfo').html(info[1]).addClass(info[0] == 1 ? 'alert-warning' : 'alert-info');
@@ -23,11 +23,10 @@
this.fail(); this.fail();
} }
<IF NAME="showMessage"> location.href = './?update_done=1'; </IF> <IF NAME="showMessage"> location.href = './?update_done=1'; </IF>
}, })
fail: function() { .fail(function() {
$('#updateInfo').html('{lang.ERROR_CHECK_VER}').addClass('alert-warning'); $('#updateInfo').html('{lang.ERROR_CHECK_VER}').addClass('alert-warning');
<IF NAME="showMessage"> location.href = './?update_done=1'; </IF> <IF NAME="showMessage"> location.href = './?update_done=1'; </IF>
}
}); });
}, 300); }, 300);
</script> </script>

View File

@@ -55,6 +55,10 @@ if($current_smt == 'check'):
{ {
$text = $lang['U_USE_PRE_RE']; $text = $lang['U_USE_PRE_RE'];
} }
else
{
$text = $lang['ERROR_CHECK_VER'] . ' [code: ' . htmlspecialchars($version_data) .']';
}
} }
$data = array( $data = array(