301 lines
13 KiB
Bash
Executable File
301 lines
13 KiB
Bash
Executable File
#!/bin/bash
|
|
while read kos
|
|
do
|
|
[ "${#kos}" -le "1" ]&&break;
|
|
koss="$kos
|
|
$koss"
|
|
done
|
|
|
|
ck=($(echo "$koss"|awk -F'[|:]' '{IGNORECASE=1}$1=="Cookie"{print $3}'))
|
|
sqlstart="SELECT passd,grups,isok,feilv,ckuser,ckname,ckkey,tixian,shouyi FROM user WHERE userid = '${ck[2]}'"
|
|
dada="$($MYSQLS -e "$sqlstart" 2>>$0.errlog)"
|
|
sdata=($dada)
|
|
cksec=${ck[4]}
|
|
yunse=$(echo -n "$REMOTE_HOST${sdata[2]}${sdata[1]}${ck[2]}${sdata[0]}${dateddd:0:6}"|md5sum|tr -dc [0-9])
|
|
|
|
|
|
[ "$yunse" = "$cksec" ]||{
|
|
echo "HTTP/1.1 302 Moved temporarily
|
|
Connection: close
|
|
Pragma: no-cache
|
|
Cache-Control: no-cache
|
|
Cache-Control: no-store
|
|
Cache-Control: private
|
|
Server: kos-1.0
|
|
Content-Type: text/html;charset=utf-8
|
|
Location: login.xhtml
|
|
"
|
|
exit 0
|
|
}
|
|
|
|
echo "HTTP/1.1 200 ok
|
|
Connection: close
|
|
Pragma: no-cache
|
|
Cache-Control: no-cache
|
|
Cache-Control: no-store
|
|
Cache-Control: private
|
|
Server: kos-1.0
|
|
Content-Language:zh-CN,zh
|
|
Content-Type: text/html;charset=utf-8
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<center>
|
|
<head>
|
|
<script type=\"text/javascript\">
|
|
var ckname='${sdata[5]}';
|
|
var tixian='${sdata[7]}';
|
|
var shouyi='${sdata[8]}';
|
|
var ifeilv='${sdata[3]}';
|
|
</script>
|
|
<title>支付明细$titles</title>
|
|
<script type=\"text/javascript\" src=\"md5.js\"></script>
|
|
$(cat $rpath/www/man 2>/dev/null)
|
|
<style>
|
|
|
|
.mytable {width:100%;border:0;text-align:center;border-collapse:collapse;border-spacing:0;}
|
|
.mytable th{background:#0090D7;font-weight:normal;line-height:30px;font-size:14px;color:#FFF;}
|
|
.mytable tr:nth-child(odd){background:#F4F4F4;}
|
|
.mytable td:nth-child(even){color:#C00;}
|
|
.mytable tr:hover{background:#73B1E0;color:#FFF;}
|
|
.mytable td,.mytable th{border:1px solid #EEE;}
|
|
|
|
@media only screen and (max-width:800px) {
|
|
.mytable{width:100%;border:0;text-align:center;border-collapse:collapse;border-spacing:0;}
|
|
.mytable th{background:#0090D7;font-weight:normal;line-height:30px;font-size:14px;color:#FFF;}
|
|
.mytable tr:nth-child(odd){background:#F4F4F4;}
|
|
.mytable tr:hover{background:#73B1E0;color:#FFF;}
|
|
.mytable td:nth-child(even){color:#C00;font-size:10px;word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
|
.mytable td,.mytable th{border:1px solid #EEE;font-size:10px;word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
<body>
|
|
|
|
|
|
<input type=\"text\" placeholder=\"根据订单号筛选\" minlength=\"32\" maxlength=\"32\" id=\"ddh\"/>+<input type=\"date\" placeholder=\"根据时间筛选\" id=\"user_date\"/> <button id='butto' type=\"button\" onclick =\"chaxun('1')\" style=\"cursor: pointer;\" >筛选</button>
|
|
|
|
<div style=\"width: 100%; overflow-x: auto;\">
|
|
<table class=\"mytable\" width=\"100%\" border=\"1\" id=\"tabl22\">
|
|
<tr>
|
|
<th colspan=\"4\">创建订单</th>
|
|
<th colspan=\"3\">支付</th>
|
|
<th id=\"ycl\" colspan=\"3\">到账</th>
|
|
<th colspan=\"2\">异步通知</th>
|
|
<th colspan=\"1\">单笔</th>
|
|
</tr>
|
|
<tr>
|
|
<th>订单号</th>
|
|
<th>appid</th>
|
|
<th>金额</th>
|
|
<th>时间</th>
|
|
<th>方式</th>
|
|
<th>状态</th>
|
|
<th>时间</th>
|
|
<th id=\"ycl1\">状态</th>
|
|
<th id=\"ycl2\">账号</th>
|
|
<th id=\"ycl3\">时间</th>
|
|
<th>次数</th>
|
|
<th>状态</th>
|
|
<th>收益</th>
|
|
</tr>
|
|
<tbody id=\"tabl\"></tbody>
|
|
</table>
|
|
</div>
|
|
<div id=\"barcon\" name=\"barcon\"></div>
|
|
<hr>
|
|
<font color=\"#008000\">个人支付接口调用明细。</font>
|
|
<hr>
|
|
<script type = 'text/javascript'>
|
|
//document.getElementById('h5towx').style.background='#444359';
|
|
document.getElementById('tongjibaobiao').style.color='#b63b4d';
|
|
document.getElementById('tongjibaobiao-zhifumingxi').style.color='white';
|
|
document.getElementById('tongjibaobiao-zhifumingxi').style.background='#b63b4d';
|
|
var date = new Date();
|
|
var year = date.getFullYear();
|
|
var month = date.getMonth() + 1;
|
|
var day = date.getDate();
|
|
if (month < 10) {
|
|
month = \"0\" + month;
|
|
}
|
|
if (day < 10) {
|
|
day = \"0\" + day;
|
|
}
|
|
var vadte=year+\"-\"+month+\"-\"+day;
|
|
document.getElementById(\"user_date\").value=vadte;
|
|
var ddh,rq,ltime,toly,tols,pg;
|
|
function chaxun(kbcc){
|
|
if (kbcc==1){
|
|
ddh=document.getElementById(\"ddh\").value;
|
|
rq=document.getElementById(\"user_date\").value;
|
|
ltime=Date.parse(new Date())/1000;
|
|
pg='0';
|
|
}
|
|
|
|
var reqe = new XMLHttpRequest();
|
|
reqe.onreadystatechange = function () {
|
|
if (reqe.readyState == 4 && reqe.status == 200) {
|
|
var ztm=reqe.getResponseHeader('ztm');
|
|
if (kbcc==1){
|
|
toly=reqe.getResponseHeader('toly');
|
|
tols=reqe.getResponseHeader('tols');
|
|
}
|
|
if (ztm === \"noes\"){
|
|
alert('登录失效,请重登录!');
|
|
window.location.href='login.xhtml';
|
|
return
|
|
}
|
|
if (ztm === \"okay\"){
|
|
var str =reqe.responseText;
|
|
var rowArray = str.split(\"\n\");
|
|
// alert(rowArray);
|
|
var tabl = document.getElementById(\"tabl\");
|
|
var rowNum=tabl.rows.length;
|
|
for (ii=0;ii<rowNum;ii++)
|
|
{
|
|
tabl.deleteRow(ii);
|
|
rowNum=rowNum-1;
|
|
ii=ii-1;
|
|
}
|
|
for (var i = 0; i < rowArray.length-1; i++) {
|
|
rowArray[i] = rowArray[i].split(\"\\t\"); //将行数组的第i位 按照","分割 变成二维数组
|
|
var iiii,i8,i13
|
|
switch (rowArray[i][4])
|
|
{
|
|
case '00':
|
|
iiii='PC支';
|
|
break;
|
|
case '01':
|
|
iiii='H5支';
|
|
break;
|
|
case '10':
|
|
iiii='PC微';
|
|
break;
|
|
case '11':
|
|
iiii='H5微';
|
|
break;
|
|
case '12':
|
|
iiii='jsapi';
|
|
break;
|
|
}
|
|
switch (rowArray[i][8])
|
|
{
|
|
case '0':
|
|
if (rowArray[i][5]==1){
|
|
i8='等待';
|
|
}else{
|
|
i8='待付';
|
|
}
|
|
|
|
break;
|
|
case '1':
|
|
i8='成功';
|
|
break;
|
|
case '2':
|
|
i8='<abbr title='+rowArray[i][11]+'>失败</abbr>';
|
|
break;
|
|
case '3':
|
|
i8='<abbr title='+rowArray[i][11]+'>禁用</abbr>';
|
|
break;
|
|
}
|
|
switch (rowArray[i][13])
|
|
{
|
|
case '0':
|
|
if (rowArray[i][12]>0){
|
|
i13='等待';
|
|
}else{
|
|
i13='待付';
|
|
}
|
|
break;
|
|
case '1':
|
|
i13='成功';
|
|
break;
|
|
case '2':
|
|
i13='超时';
|
|
break;
|
|
}
|
|
var row = tabl.insertRow('-1');
|
|
row.insertCell(0).innerHTML = rowArray[i][0];
|
|
row.insertCell(1).innerHTML = rowArray[i][1];
|
|
row.insertCell(2).innerHTML = rowArray[i][2];
|
|
row.insertCell(3).innerHTML = rq?new Date(parseInt(rowArray[i][3]*1000)).toLocaleTimeString('chinese',{hour12:false}):new Date(parseInt(rowArray[i][3]*1000)).toLocaleString('chinese',{hour12:false});
|
|
row.insertCell(4).innerHTML = iiii;
|
|
row.insertCell(5).innerHTML = rowArray[i][5]=='1'?'已付':'待付';
|
|
row.insertCell(6).innerHTML = rowArray[i][6]!='NULL'?new Date(parseInt(rowArray[i][6]*1000)).toLocaleTimeString('chinese',{hour12:false}):null;
|
|
if('${ck[3]}'=='0'){
|
|
row.insertCell(7).innerHTML = i8;
|
|
row.insertCell(8).innerHTML = rowArray[i][9];
|
|
row.insertCell(9).innerHTML = rowArray[i][10]!='NULL'?new Date(parseInt(rowArray[i][10]*1000)).toLocaleTimeString('chinese',{hour12:false}):null;
|
|
row.insertCell(10).innerHTML = rowArray[i][12];
|
|
row.insertCell(11).innerHTML = i13;
|
|
row.insertCell(12).innerHTML = rowArray[i][14];
|
|
}else{
|
|
row.insertCell(7).innerHTML = rowArray[i][12];
|
|
row.insertCell(8).innerHTML = i13;
|
|
row.insertCell(9).innerHTML = rowArray[i][14];
|
|
}
|
|
}
|
|
if (kbcc==1&&tols>30)fenye(0);
|
|
|
|
}
|
|
|
|
}else if(reqe.readyState == 4 && reqe.status != 200){
|
|
alert(\"网络错误!\"+xmlhttp.readyState+\"|\"+xmlhttp.status);
|
|
}
|
|
};
|
|
|
|
reqe.open('POST', 'zhifumingxi.xjs', true);
|
|
reqe.send(kbcc+'|'+ddh+'|'+rq+'|'+ltime+'|'+pg);
|
|
}
|
|
|
|
function fenye(pgs){
|
|
var pageEnd = document.getElementById(\"pageEnd\");
|
|
if(pgs==0){
|
|
pgs=1;
|
|
}else{
|
|
pg=(pgs-1)*toly;
|
|
chaxun('0');
|
|
}
|
|
if(tols/toly > parseInt(tols/toly)){
|
|
var ys=parseInt(tols/toly)+1;
|
|
}else{
|
|
var ys=parseInt(tols/toly);
|
|
}
|
|
//var tempStr = \"<span>共\"+tols+\"页</span>\";
|
|
if(pgs>1){
|
|
var tempStr = \"<span href=\\\"#\\\" style='cursor: pointer;' onMousemove='this.style.backgroundColor = \\\"green\\\";' onmouseout='this.style.backgroundColor = \\\"\\\";' ontouchstart='this.style.backgroundColor = \\\"red\\\";' ontouchend='this.style.backgroundColor = \\\"\\\";' onmousedown='this.style.backgroundColor = \\\"red\\\";' onClick=\\\"fenye(\"+(1)+\")\\\">首页</span> \";
|
|
tempStr += \"<span href=\\\"#\\\" style='cursor: pointer;' onMousemove='this.style.backgroundColor = \\\"green\\\";' onmouseout='this.style.backgroundColor = \\\"\\\";' ontouchstart='this.style.backgroundColor = \\\"red\\\";' ontouchend='this.style.backgroundColor = \\\"\\\";' onmousedown='this.style.backgroundColor = \\\"red\\\";' onClick=\\\"fenye(\"+(pgs-1)+\")\\\">上一页</span> \";
|
|
}
|
|
else
|
|
{
|
|
var tempStr = \"<span style='color:#ccc'>首页</span> \";
|
|
tempStr += \"<span style='color:#ccc'>上一页</span> \";
|
|
}
|
|
if(pgs<ys){
|
|
tempStr += \"<a><span href=\\\"#\\\" style='cursor: pointer;' onMousemove='this.style.backgroundColor = \\\"green\\\";' onmouseout='this.style.backgroundColor = \\\"\\\";' ontouchstart='this.style.backgroundColor = \\\"red\\\";' ontouchend='this.style.backgroundColor = \\\"\\\";' onmousedown='this.style.backgroundColor = \\\"red\\\";' onClick=\\\"fenye(\"+(pgs+1)+\")\\\">下一页</span></a> \";
|
|
tempStr += \"<span href=\\\"#\\\" style='cursor: pointer;' onMousemove='this.style.backgroundColor = \\\"green\\\";' onmouseout='this.style.backgroundColor = \\\"\\\";' ontouchstart='this.style.backgroundColor = \\\"red\\\";' ontouchend='this.style.backgroundColor = \\\"\\\";' onmousedown='this.style.backgroundColor = \\\"red\\\";' onClick=\\\"fenye(\"+ys+\")\\\">尾页 </span>\";
|
|
}else{
|
|
tempStr += \"<span style='color:#ccc'>下一页 </span>\";
|
|
tempStr += \"<span style='color:#ccc'>尾页 </span>\";
|
|
}
|
|
tempStr += \"<span>第\"+pgs+\"页/共\"+ys+\"页</span>\";
|
|
document.getElementById(\"barcon\").innerHTML = tempStr;
|
|
|
|
}
|
|
chaxun('1');
|
|
//alert(Math.trunc(1/2));
|
|
if('${ck[3]}'!='0'){
|
|
document.getElementById(\"ycl\").style.display=\"none\";
|
|
document.getElementById(\"ycl1\").style.display=\"none\";
|
|
document.getElementById(\"ycl2\").style.display=\"none\";
|
|
document.getElementById(\"ycl3\").style.display=\"none\";
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</center>
|
|
|
|
</html>
|
|
" |