<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1, user-scalable=0" >
< title > Payment History< / title >
<!-- Google font file. If you want you can change. -->
< link href = "https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,900" rel = "stylesheet" >
<!-- Fontawesome font file css -->
< link rel = "stylesheet" type = "text/css" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" >
<!-- Animate css file for css3 animations. for more : https://daneden.github.io/animate.css -->
<!-- Only use animate action. If you dont use animation, you don't have to add. -->
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/smart-settlement/css/animate.css" >
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/smart-settlement/css/cryptocoins.css" >
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/smart-settlement/plugins/c3-chart/c3.css" >
<!-- Template global css file. Requared all pages -->
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/smart-settlement/css/global.style.css" >
<!-- Swiper slider css file -->
< link rel = "stylesheet" href = "https://cdn.yimian.xyz/smart-settlement/css/swiper.min.css" >
<!-- turbo slider plugin css file -->
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/smart-settlement/css/bootstrap.min.css" >
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/smart-settlement/plugins/turbo-slider/turbo.css" >
< link rel = "stylesheet" type = "text/css" href = "https://cdn.yimian.xyz/shaky/shaky.css" >
< script > var block _aplayer = true ; < / script >
< script type = "text/javascript" src = "https://cdn.yimian.xyz/ushio-js/ushio-head.min.js" > < / script >
< / head >
< body >
< div class = "wrapper " >
< div class = "nav-menu" >
< nav class = "menu" >
<!-- Menu navigation start -->
< div class = "nav-container" >
< ul class = "main-menu" >
< li class = "" >
< a href = "index.html" > < img src = "https://cdn.yimian.xyz/smart-settlement/img/content/icons/1.png" alt = "" > < strong class = "special" > Dashboard< / strong > < / a >
< / li >
< li class = "active" >
< a href = "buy-sell.html" > < img src = "https://cdn.yimian.xyz/smart-settlement/img/content/icons/6.png" alt = "" > < strong class = "special" > History Payment< / strong > < / a >
< / li >
< li class = "" >
< a onclick = "javascript:logout();" href = "#" data-loader = "show" > < img src = "https://cdn.yimian.xyz/smart-settlement/img/content/icons/7.png" alt = "" > < strong > Log out< / strong > < / a >
< / li >
< / ul >
< / div >
<!-- Menu navigation end -->
< / nav >
< / div >
< div class = "wrapper-inline" >
<!-- Header area start -->
< header class = "no-background" > <!-- extra class no - background -->
< a class = "go-back-link" href = "javascript:history.back();" > < i class = "fa fa-arrow-left" > < / i > < / a >
< div class = "search-button" data-search = "open" >
< img id = "no-icon" src = "img/content/notification-no.png" class = "not-icon1" alt = "" >
< img id = "no-icon2" src = "img/content/notification2-no.png" class = "not-icon2" alt = "" >
< / div >
< div class = "navi-menu-button" >
< em > < / em >
< em > < / em >
< em > < / em >
< / div >
< / header >
<!-- Header area end -->
<!-- NOTIFICATION BOX CONTENT START -->
< div class = "search-form" >
< span class = "close-search-form" data-search = "close" > < i class = "fa fa-times" > < / i > < / span >
< form >
< div class = "search-input" >
< br / >
< / div >
< / form >
< ul class = "notification-list list-unstyled" id = "no-content" >
< / ul >
< / div >
<!-- NOTIFICATION BOX CONTENT END -->
<!-- Page content start -->
< main class = "margin mt-0" >
< div class = "dash-balance" >
< div class = "dash-content relative" >
< h3 class = "w-text" > ERP for CP Home< / h3 >
< div class = "notification" >
< h3 class = "w-text" id = "usr" > xxx< / h3 >
< / div >
< / div >
< / div >
< section class = "container" >
< h4 class = "title-main" > Recent Transactions< / h4 >
< ul class = "transaction-list list-unstyled" id = "account-events" >
< / ul >
< / section >
< footer >
< div class = "container" >
< ul >
< li > < a id = "ushio-blog" href = "https://www.eee.dog" > < i class = "fa fa-home" > < / i > < / a > < / li >
< li > < a href = "https://github.com/iotcat" > < i class = "fa fa-github" > < / i > < / a > < / li >
< li > < a href = "mailto:i@yimian.xyz" > < i class = "fa fa-envelope" > < / i > < / a > < / li >
< li > < a href = "https://www.eee.dog/feed" > < i class = "fa fa-rss" > < / i > < / a > < / li >
< / ul >
< p > © 2018-< script type = "text/javascript" > document . write ( new Date ( ) . getFullYear ( ) ) ; < / script > Made with < span class = "shaky" > < i style = "color:red;" class = "fa fa-heart" > < / i > < / span > by < a id = "ushio-tome" href = "https://iotcat.me" > iotcat< / a > < / p >
< / div >
< / footer >
< / main >
<!-- Page content end -->
< / div >
< / div >
<!-- Page loader DOM Elements. Requared all pages -->
< div class = "sweet-loader" >
< div class = "box" >
< div class = "circle1" > < / div >
< div class = "circle2" > < / div >
< div class = "circle3" > < / div >
< / div >
< / div >
< script type = "text/javascript" src = "https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js" > < / script >
<!-- JQuery library file. requared all pages -->
< script src = "https://cdn.yimian.xyz/smart-settlement/js/jquery-3.2.1.min.js" > < / script >
<!-- Swiper JS -->
< script src = "https://cdn.yimian.xyz/smart-settlement/js/swiper.min.js" > < / script >
<!-- Template global script file. requared all pages -->
< script src = "https://cdn.yimian.xyz/smart-settlement/js/global.script.js" > < / script >
< script type = "text/javascript" >
var usr = null;
var usr_arr = ['liu', 'yang', 'li', 'jia', 'zheng'];
if(cookie.get('usr') == null){
usr=prompt("please input your surname","");
cookie.set("usr", usr);
}else{
usr = cookie.get("usr");
}
$('#usr').html(usr);
$.post('https://settlement.yimian.xyz/api/getDetail.php', function(res){
res = JSON.parse(res);
var s = '';
res.data.forEach(function(i, index){
if(index < res.data.length - 1 ) {
s += `
< li >
< div class = "d-flex align-items-center justify-content-between" >
< div class = "d-flex align-items-center" >
< img class = "img-xs" src = "https://cdn.yimian.xyz/smart-settlement/img/content/coin3.png" alt = "coin image" >
< div class = "ml-10" >
< h4 class = "coin-name" > payment`;
s += ' - ' + i.usr;
s += `< / h4 >
< small class = "text-muted" > `;
s += i.datetime;
s += `< / small >
< / div >
< / div >
< div >
`;
s += `< small class = "d-block mb-0 txt-red" > £-`+Number(i.val).toFixed(2) + `< / small > `;
s += `
< small class = "text-muted d-block" > < a href = '`+i.img+`' > see invoice< / a > < / small >
< / div >
< / div >
< / li >
`;
}
$('#account-events').html(s);
});
});
/* notification func */
function timeago(dateTimeStamp){ //dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。
var minute = 1000 * 60; //把分,时,天,周,半个月,一个月用毫秒表示
var hour = minute * 60;
var day = hour * 24;
var week = day * 7;
var halfamonth = day * 15;
var month = day * 30;
var now = new Date().getTime(); //获取当前时间毫秒
var diffValue = now - dateTimeStamp;//时间差
if(diffValue < 0 ) {
return;
}
var minC = diffValue/minute; //计算时间差的分,时,天,周,月
var hourC = diffValue/hour;
var dayC = diffValue/day;
var weekC = diffValue/week;
var monthC = diffValue/month;
if(monthC >= 1 & & monthC < = 3){
result = " " + parseInt(monthC) + "month ago"
}else if(weekC >= 1 & & weekC < = 3){
result = " " + parseInt(weekC) + "week ago"
}else if(dayC >= 1 & & dayC < = 6){
result = " " + parseInt(dayC) + "day ago"
}else if(hourC >= 1 & & hourC < = 23){
result = " " + parseInt(hourC) + "hours ago"
}else if(minC >= 1 & & minC < = 59){
result =" " + parseInt(minC) + "minutes ago"
}else if(diffValue >= 0 & & diffValue < = minute){
result = "just now"
}else {
var datetime = new Date();
datetime.setTime(dateTimeStamp);
var Nyear = datetime.getFullYear();
var Nmonth = datetime.getMonth() + 1 < 10 ? " 0 " + ( datetime . getMonth ( ) + 1 ) : datetime . getMonth ( ) + 1 ;
var Ndate = datetime.getDate() < 10 ? " 0 " + datetime . getDate ( ) : datetime . getDate ( ) ;
var Nhour = datetime.getHours() < 10 ? " 0 " + datetime . getHours ( ) : datetime . getHours ( ) ;
var Nminute = datetime.getMinutes() < 10 ? " 0 " + datetime . getMinutes ( ) : datetime . getMinutes ( ) ;
var Nsecond = datetime.getSeconds() < 10 ? " 0 " + datetime . getSeconds ( ) : datetime . getSeconds ( ) ;
result = Nyear + "-" + Nmonth + "-" + Ndate
}
return result;
}
function confirm(id){
$.post('https://settlement.yimian.xyz/api/?type=confirm& id='+id, function(res){
notice();
});
}
function notice(){
$.post('https://settlement.yimian.xyz/api/getCurrent.php', {'usr': usr}, function(res){
res = JSON.parse(res);
var s = '';
if(!res.data.length){
s += `
< li >
< div class = "d-flex align-items-center justify-content-between" >
< div class = "d-flex align-items-center" >
< div class = "" >
< h5 class = "coin-name" > You have NO notifications!!< / h5 >
< / div >
< / div >
< div >
< a href = "" > < / a >
< / div >
< / div >
< / li > `;
$('#no-content').html(s);
$("#no-icon").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification-no.png');
$("#no-icon2").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification2-no.png');
return;
}
s += `
< li >
< div class = "d-flex align-items-center justify-content-between" >
< div class = "d-flex align-items-center" >
< div class = "" >
< h5 class = "coin-name" > Your last `;
s += res.data.length;
s += ` notifications< / h5 >
< / div >
< / div >
< div >
< a href = "" > < / a >
< / div >
< / div >
< / li > `;
res.data.forEach(function(item){
s += `
< li >
< div class = "d-flex align-items-center justify-content-between" >
< div class = "d-flex align-items-center" >
< div class = "notice-icon ` ;
if(item.usr_to == usr) s += `available`;
if(item.usr_from == usr) s += `away`;
s += `">
< i class = "fa fa- ` ;
if(item.usr_to == usr) s += `check`;
if(item.usr_from == usr) s += `clock-o`;
s += `">< / i >
< / div >
< div class = "ml-10" >
< h4 class = "coin-name" > `;
if(item.usr_to == usr) s += `You will Get £50 from `+ item.usr_from + ` < button style = "color: green;" onClick = "javascript:confirm(`+item.id+`);" > Confirm to Recived< / button > `;
if(item.usr_from == usr) s += `Please Give £50 to `+ item.usr_to;
s += `< / h4 >
< small class = "text-muted" > `;
s += timeago(new Date(item.datetime.replace(/-/g, '/')).getTime());
s += `< / small >
< / div >
< / div >
< / div >
< / li > `;
});
s += `
< li >
< div class = "d-flex align-items-center justify-content-between" >
< div class = "d-flex align-items-center" >
< a href = "" class = "text-muted" > The end of all notifications< / a >
< / div >
< / div >
< / li > `;
$('#no-content').html(s);
$("#no-icon").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification-yes.png');
$("#no-icon2").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification2-yes.png');
});
};
notice();
/* log out */
function logout(){
cookie.del('usr');
cookie.del('val');
location.reload();
}
< / script >
< / body >
< / html >