function success(msg){
var html = '
'+msg+'
';
if(!$('#toast').length) $('body').append(html);
settimeout(function(){
$('#toast').addclass('show');
settimeout(function(){
$('#toast').removeclass('show');
settimeout(function(){
$('#toast').remove();
},300)
},1500);
},50)
}
function error(msg){
var html = ''+msg+'
';
if(!$('#toast').length) $('body').append(html);
settimeout(function(){
$('#toast').addclass('show');
settimeout(function(){
$('#toast').removeclass('show');
settimeout(function(){
$('#toast').remove();
},300)
},1500);
},50)
}
function timetrans(date){
var date = new date(date*1000);
var y = date.getfullyear() + '-';
var m = (date.getmonth()+1 < 10 ? '0'+(date.getmonth()+1) : date.getmonth()+1) + '-';
var d = (date.getdate() < 10 ? '0' + (date.getdate()) : date.getdate()) + ' ';
var h = (date.gethours() < 10 ? '0' + date.gethours() : date.gethours()) + ':';
var m = (date.getminutes() <10 ? '0' + date.getminutes() : date.getminutes()) + ':';
var s = (date.getseconds() <10 ? '0' + date.getseconds() : date.getseconds());
return y+m+d;
}