<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->

<%
Server.ScriptTimeOut = 999999

act=SafeRequest("act")

if act="setkamiku" then
	id=SafeRequest("id")
	
	sql="select * from ayquanju" 
	rs.open sql,conn,1,3
	rs("kamishuju")=id
	rs.update
	rs.close
	call PopErr2("修改成功","index.asp")

end if



%>

<title><%=webname%>-最高权限-管理首页</title> 
<SCRIPT LANGUAGE="JavaScript">
var xmlhttp;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e){try{xmlhttp=new XMLHttpRequest();}catch (e){}}}
function chaku(str)
{
//alert(str);
document.getElementById(str).innerHTML="<img src='<%=ossurl%>images/jload.gif'/>";

	xmlhttp.open("get","/inc/aoto2.asp?act="+str);
	xmlhttp.onreadystatechange=function()
	{	
		if(200==xmlhttp.status)
		{
			if(xmlhttp.responseText=="ok")
			{
			document.getElementById(str).innerHTML="OK";
			}
		}
	};
xmlhttp.send(null);
}

//卡转移
function kazhuanyi(str)
{
//alert(str);
document.getElementById(str).innerHTML="<img src='<%=ossurl%>images/jload.gif'/>";

	xmlhttp.open("get","/inc/aoto2.asp?act=kazhuanyi&ku="+str);
	xmlhttp.onreadystatechange=function()
	{	
		if(200==xmlhttp.status)
		{
			darrStr=xmlhttp.responseText.split("|");
			
			if(darrStr[0]=="ok")
			{
			document.getElementById(str).innerHTML="转移"+darrStr[1]+"条";
			}
			
		}
	};
xmlhttp.send(null);
}

//查库存
function chaku2(str,ka,ku)
{
document.getElementById(str).innerHTML="<img src='<%=ossurl%>images/jload.gif'/>";

	xmlhttp.open("get","adminchaku.asp?id="+str+"&ku="+ku+"&act=ka2");
	xmlhttp.onreadystatechange=function()
	{	
		if(200==xmlhttp.status)
		{
		document.getElementById(str).innerHTML=xmlhttp.responseText+"条";	
		}
	};
	xmlhttp.send(null);
}


function maijiazhuanyi(str)
{
//alert(str);
document.getElementById(str).innerHTML="<img src='<%=ossurl%>images/jload.gif'/>";

	xmlhttp.open("get","/inc/aoto2.asp?act=maijiazhuanyi");
	xmlhttp.onreadystatechange=function()
	{	
		if(200==xmlhttp.status)
		{
			darrStr=xmlhttp.responseText.split("|");
			
			if(darrStr[0]=="ok")
			{
			document.getElementById(str).innerHTML="转移"+darrStr[1]+"条";
			}
			
		}
	};
xmlhttp.send(null);
}



function chauser(str,str2) 
{
//alert(str);
document.getElementById(str).innerHTML="<img src='<%=ossurl%>images/jload.gif'/>";

	xmlhttp.open("get","adminxiaoshou_buquan_u.asp?jid="+str2);
	xmlhttp.onreadystatechange=function()
	{	
		if(200==xmlhttp.status)
		{
			if(xmlhttp.responseText=="ok")
			{
			document.getElementById(str).innerHTML="OK";
			}
		}
	};
xmlhttp.send(null);
}
</script>
<DIV id=main1200> 
<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>

<DIV class=right_titleadmin>&nbsp;&nbsp;管理首页</DIV>
<DIV class=main>
<form action="?act=edit" method="post" name="form" id="form">
  <TABLE width="100%" align="center" class=table_style_2>
  <TBODY>
  <TR>
    <TD width="1014" align="center">
    <br><br>
    <br>爱卡自动发卡平台系统<br>
    <br>官方网址：<a href="http://www.ikpay.cn" target="_blank">www.ikpay.cn</a><br>
    <br>平台搭建QQ：121807184<br>
    <br>
    <br><a href="http://www.ikpay.cn/buy/xuliehao.html" target="_blank" style="color:#FF0000">【官方SQL版 购买充值卡】</a><br>
    <br><a href="http://id.ikpay.cn/newpage/login.asp" target="_blank" style="color:#FF0000">【程序注册/登录/绑定域名/续费】</a><br>
    
    <br><br><br>
<span style="color: #FF0000; font-weight: bold">当日首次运行此页面 处理速度可能会比较慢 请耐心等待</span><br>
<br>

<span id="tongji"><img src="<%=ossurl%>images/jload.gif" />平台账务统计运行中</span>&nbsp;
<span id="dingdanqingli"><img src="<%=ossurl%>images/jload.gif" />订单清理中</span>&nbsp;
<span id="caiwujilu"><img src="<%=ossurl%>images/jload.gif" />财务记录清理中</span>&nbsp;
<span id="maichukami"><img src="<%=ossurl%>images/jload.gif" />卖出卡密清理中</span>&nbsp;<br><br>

<span id="vip"><img src="<%=ossurl%>images/jload.gif" />VIP过期时间处理中</span>&nbsp;
<span id="yanzhengma"><img src="<%=ossurl%>images/jload.gif" />系统验证码清理中</span>&nbsp;
<span id="guoqiyouhuiquan"><img src="<%=ossurl%>images/jload.gif" />过期优惠券清理中</span>&nbsp;
<span id="zhanneixin"><img src="<%=ossurl%>images/jload.gif" />站内信清理中</span>&nbsp;<br><br>

<span id="rizhi"><img src="<%=ossurl%>images/jload.gif" />日志清理中</span>&nbsp;
<span id="maijia"><img src="<%=ossurl%>images/jload.gif" />买家联系方式清理中</span>&nbsp;
<span id="weixinopen"><img src="<%=ossurl%>images/jload.gif" />微信接收卡密清理中</span>&nbsp;


<span id="session"><img src="<%=ossurl%>images/jload.gif" />session清理中</span>&nbsp;

<!--
<br><br>
<strong><span style="color:#F30">提前清理</span></strong>
<br><br>
<span>[成功订单 <span id="dingdanqingli2" style="cursor:pointer;" onClick="chaku('dingdanqingli2')">清理</span>]</span>
<span>[财务记录 <span id="caiwujilu2" style="cursor:pointer;" onClick="chaku('caiwujilu2')">清理</span>]</span>
<span>[卖出卡密 <span id="maichukami2" style="cursor:pointer;" onClick="chaku('maichukami2')">清理</span>]</span>
<span>[已删除卡密 <span id="delka2" style="cursor:pointer;" onClick="chaku('delka2')">清理</span>]</span>
-->

<br><br>
<strong style="color:#F30">按需清理</strong>
<br><br>
[商户统计信息 <span id="tongjiqingli" style="cursor:pointer;" onClick="chaku('tongjiqingli')">清理</span>]
[未支付订单 <span id="weizhifudingdan" style="cursor:pointer;" onClick="chaku('weizhifudingdan')">清理</span>]
[失败订单 <span id="shibaidingdan" style="cursor:pointer;" onClick="chaku('shibaidingdan')">清理</span>]
[详细结算日志 <span id="xiangxijiesuan" style="cursor:pointer;" onClick="chaku('xiangxijiesuan')">清理</span>]
[销售统计 <span id="xiaoshoutongji" style="cursor:pointer;" onClick="chaku('xiaoshoutongji')">清理</span>]
[结算记录 <span id="jiesuan3" style="cursor:pointer;" onClick="chaku('jiesuan3')">清理</span>]


<!--
[投诉率更新 <span id="tousulv" style="cursor:pointer;" onClick="chaku('tousulv')">清理</span>]
-->
<br><br>
<strong style="color:#F30">商家销售统计</strong>
<br><br>
<%
n=1
rs.open "select * from ayujb where ayujbgid<>9 order by ayjbpaixu asc",conn,1,1
if not(rs.bof and rs.eof) then
do while not rs.eof
%>
[<%=trim(rs("ayujbname"))%><span id="j<%=rs("ayujbgid")%>" style="cursor:pointer;" onClick="chauser('j<%=rs("ayujbgid")%>','<%=rs("ayujbgid")%>')"> 统计</span>]&nbsp;
<%if n=10 or n=20 then response.Write "<br><br>"%>
<%
rs.movenext
n=n+1
loop
end if
rs.close
%>  
 
<br><br>
<strong style="color:#F30">买家联系库转移转移</strong>
<br><br>
[开始转移买家联系库,当前设置<%=maichukazhuanyi%>天 <span style="cursor:pointer;" id="maijiazhuanyi" onClick="maijiazhuanyi('maijiazhuanyi')">转移</span>]

<br><br>
<strong style="color:#F30">已卖出卡密转移,当前设置<%=maichukazhuanyi%>天</strong>
<br><br>
[ayka<span style="cursor:pointer;" id="ayka" onClick="kazhuanyi('ayka')">转移</span>]<br><br>
<%For sum=1 To 40 %>
[ayka<%=Right(("00"&sum),2)%><span style="cursor:pointer;" id="ayka<%=Right(("00"&sum),2)%>" onClick="kazhuanyi('ayka<%=Right(("00"&sum),2)%>')">转移</span>]
<%if sum=10 or sum=20 or sum=30 then response.Write "<br><br>"%>
<%next%>



</TD>
    </TR>
  </TBODY></TABLE>
	</form>



</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<%
Set fso=Server.CreateObject("Scripting.FileSystemObject")
set txt=fso.opentextfile(server.mappath("\updata\istongji.txt"),1,true) 
sito=txt.readline
txt.close

'sito=now()

if DateDiff("d",sito,now())>0 then%>

<script type="text/javascript">
var xmlhttp;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e){try{xmlhttp=new XMLHttpRequest();}catch (e){}}}
window.onload = function(){jihua1();}

function jihua1(){xmlhttp.open("get","/inc/aoto.asp?act=tongji");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{tongji.innerHTML="<img src='/images/ico_ok.png'/>平台账务统计成功";return jihua2();}}};xmlhttp.send(null);}
		
function jihua2(){xmlhttp.open("get","/inc/aoto2.asp?act=dingdanqingli");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){	if(xmlhttp.responseText=="ok")
{dingdanqingli.innerHTML="<img src='/images/ico_ok.png'/>订单清理成功";return jihua3();}}};xmlhttp.send(null);}

function jihua3(){xmlhttp.open("get","/inc/aoto2.asp?act=caiwujilu");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{caiwujilu.innerHTML="<img src='/images/ico_ok.png'/>财务记录清理成功";return jihua4();}}};xmlhttp.send(null);}

function jihua4(){xmlhttp.open("get","/inc/aoto2.asp?act=maichukami");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{maichukami.innerHTML="<img src='/images/ico_ok.png'/>卖出卡密清理成功";return jihua5();}}};xmlhttp.send(null);}	

function jihua5(){xmlhttp.open("get","/inc/aoto2.asp?act=yanzhengma");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{yanzhengma.innerHTML="<img src='/images/ico_ok.png'/>系统验证码清理成功";return jihua6();}}};xmlhttp.send(null);}	

function jihua6(){xmlhttp.open("get","/inc/aoto2.asp?act=vip");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{vip.innerHTML="<img src='/images/ico_ok.png'/>VIP到期时间清理成功";return jihua7();}}};xmlhttp.send(null);}

function jihua7(){xmlhttp.open("get","/inc/aoto2.asp?act=guoqiyouhuiquan");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{guoqiyouhuiquan.innerHTML="<img src='/images/ico_ok.png'/>过期优惠券清理成功";return jihua8();}}};xmlhttp.send(null);}

function jihua8(){xmlhttp.open("get","/inc/aoto2.asp?act=zhanneixin");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{zhanneixin.innerHTML="<img src='/images/ico_ok.png'/>站内信清理成功";return jihua9();}}};xmlhttp.send(null);}

function jihua9(){xmlhttp.open("get","/inc/aoto2.asp?act=rizhi");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{rizhi.innerHTML="<img src='/images/ico_ok.png'/>日志清理成功";return jihua10();}}};xmlhttp.send(null);}

function jihua10(){xmlhttp.open("get","/inc/aoto2.asp?act=maijia");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{maijia.innerHTML="<img src='/images/ico_ok.png'/>买家联系方式清理成功";return jihua11();}}};xmlhttp.send(null);}

function jihua11(){xmlhttp.open("get","/inc/aoto2.asp?act=weixinopen");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{weixinopen.innerHTML="<img src='/images/ico_ok.png'/>微信接收卡密清理成功";return jihua12();}}};xmlhttp.send(null);}



function jihua12(){xmlhttp.open("get","/inc/aoto2.asp?act=session");xmlhttp.onreadystatechange=function(){if(200==xmlhttp.status){if(xmlhttp.responseText=="ok")
{session.innerHTML="<img src='/images/ico_ok.png'/>session清理成功";}}};xmlhttp.send(null);}
</script>

<%else%>

<script type="text/javascript">
tongji.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>平台账务统计成功";
dingdanqingli.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>订单清理成功";
caiwujilu.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>财务记录清理成功";
maichukami.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>卖出卡密清理成功";
vip.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>VIP到期时间清理成功";

yanzhengma.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>系统验证码清理成功";
guoqiyouhuiquan.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>过期优惠券清理成功";
zhanneixin.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>站内信清理成功";
rizhi.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>日志清理成功";
maijia.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>买家联系方式清理成功";
weixinopen.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>微信接收卡密清理成功";

session.innerHTML="<img src='<%=ossurl%>images/ico_ok.png'/>session清理成功";
</script>

<%end if%>



<!--#include virtual="/show/footadmin.asp"-->

