<!-- #include file="INCLUDE/config_video.asp" -->
<!-- #include file="include/new_main.asp" -->
<!-- #include file="include/conn.asp" -->
<!-- #include file="carzcm.asp" -->
<%dim zj,caruuser,web_up,MaxPerPage,yzcv,sqladd,sql3,rs3,dayer,usercper,power,paymoney,no,carlasttime,dlr,carno,carpws,p,k
dim integral,unit_num,emoney_1,chk,errs
tit="代理会员页"

call web_head(2,0,0,0,0)
'------------------------------------left----------------------------------
'call left_user()
'----------------------------------left end--------------------------------
call web_center(0)

if request("type")="reg" then
if request("check")="yes" then
zcn=Request("zcn")&s99H
zcv=Request("zcv")
zj=Request.ServerVariables("SERVER_NAME")
if request("zcn")="" or request("zcv")="" then
response.write("<script>alert('注册失败:用户名和注册码不能为空!');history.back();</script>")
error="yes"
elseif len(zcv)>20 then
response.write("<script>alert('注册失败:注册码不能多于20个字符!');history.back();</script>")
elseif IsNumeric(zcv)=false then
response.write("<script>alert('注册失败:注册码只能是数字!');history.back();</script>")
else
zj=left(replace(zj,"www.",""),6)
zj=replace(zj,"0","a")
zj=replace(zj,"1","b")
zj=replace(zj,"2","c")
zj=replace(zj,"3","d")
zj=replace(zj,"4","e")
zj=replace(zj,"5","f")
zj=replace(zj,"6","g")
zj=replace(zj,"7","h")
zj=replace(zj,"8","i")
zj=replace(zj,"9","j")
zj=replace(zj,"aa","40")
zj=replace(zj,"b","41")
zj=replace(zj,"c","52")
zj=replace(zj,"d","53")
zj=replace(zj,"e","64")
zj=replace(zj,"f","65")
zj=replace(zj,"g","76")
zj=replace(zj,"h","77")
zj=replace(zj,"i","88")
zj=replace(zj,"j","89")
zj=replace(zj,"k","20")
zj=replace(zj,"l","21")
zj=replace(zj,"m","22")
zj=replace(zj,"n","23")
zj=replace(zj,"o","24")
zj=replace(zj,"p","25")
zj=replace(zj,"q","26")
zj=replace(zj,"r","27")
zj=replace(zj,"s","28")
zj=replace(zj,"t","29")
zj=replace(zj,"u","30")
zj=replace(zj,"v","31")
zj=replace(zj,"w","32")
zj=replace(zj,"x","33")
zj=replace(zj,"y","34")
zj=replace(zj,"z","35")
zj=replace(zj,"-","36")
zj=replace(zj,".","37")
yzcv=zj*(len(zj)+len(zcn&"s99H"))
Do While yzcv>10000000000
yzcv=yzcv-10000000000
loop
zcv=zcv+0
if yzcv=zcv then
dim fso,ts1
Set FSO = Server.CreateObject("Scripting.FileSystemObject") 
Set TS1 = FSO.CreateTextFile(Server.MapPath("carzcm.asp"), True) 
TS1.write "<"&chr(37)&"dim zcn,zcv"&chr(13)&"zcn="&chr(34)&zcn&chr(34)&chr(13)&"zcv="&zcv&chr(37)&">"
Set TS1 = Nothing 
Set FSO = Nothing
response.write("<script>alert('注册成攻:!!!恭喜!!!您所填写的信息已成功注册!');location.href='caruser.asp'</script>")
response.end
else
response.write("<script>alert('注册失败:用户名或注册码错误!');history.back();</script>")
end if
end if
end if
end if
zj=Request.ServerVariables("SERVER_NAME")
zj=left(replace(zj,"www.",""),6)
zj=replace(zj,"0","a")
zj=replace(zj,"1","b")
zj=replace(zj,"2","c")
zj=replace(zj,"3","d")
zj=replace(zj,"4","e")
zj=replace(zj,"5","f")
zj=replace(zj,"6","g")
zj=replace(zj,"7","h")
zj=replace(zj,"8","i")
zj=replace(zj,"9","j")
zj=replace(zj,"a","40")
zj=replace(zj,"b","41")
zj=replace(zj,"c","52")
zj=replace(zj,"d","53")
zj=replace(zj,"e","64")
zj=replace(zj,"f","65")
zj=replace(zj,"g","76")
zj=replace(zj,"h","77")
zj=replace(zj,"i","88")
zj=replace(zj,"j","89")
zj=replace(zj,"k","20")
zj=replace(zj,"l","21")
zj=replace(zj,"m","22")
zj=replace(zj,"n","23")
zj=replace(zj,"o","24")
zj=replace(zj,"p","25")
zj=replace(zj,"q","26")
zj=replace(zj,"r","27")
zj=replace(zj,"s","28")
zj=replace(zj,"t","29")
zj=replace(zj,"u","30")
zj=replace(zj,"v","31")
zj=replace(zj,"w","32")
zj=replace(zj,"x","33")
zj=replace(zj,"y","34")
zj=replace(zj,"z","35")
zj=replace(zj,"-","36")
zj=replace(zj,".","37")
yzcv=zj*(len(zj)+len(zcn&"s99H"))
Do While yzcv>10000000000
yzcv=yzcv-10000000000
loop
'if yzcv<>zcv then
'response.write"<center><form action=""caruser.asp?type=reg&check=yes"" method=""post"">用户名：<input onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' name=""zcn"" size=""10"" value="""&zcn&"""> 注册号：<input onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' name=""zcv"" size=""10"" value="""&zcv&"""><input onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' type=""submit"" value=""注册""></form></center>"
'response.write("<center><b><font color=""#FF0000"">错误：CSK3000..电.影.系.统.(.ASP.版.8.0)程序尚未注册,发卡功能不能使用!</font></b></center>")
'response.end
'end if%>
<%response.write"<center><a href=""caruser.asp?action=3"">查看未充值卡</a>  <a href=""caruser.asp?action=4"">查看已充值卡</a>"%>
<table border="0" cellspacing="1" style="border-collapse: collapse" width="100%" cellpadding="2"><tr></tr></table><body leftmargin="0" topmargin="0"><%if request("action")<>"1" and request("action")<>"2" and request("action")<>"user" then%><center>
<%MaxPerPage=920
dim totalPut  
dim CurrentPage
dim TotalPages
dim typename  
typename=""
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim rstype
dim typesql
dim typeid,typename1
if not isEmpty(request("typeid")) then
typeid=request("typeid")
else
typeid=0
end if%><table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td width="100%"></td></tr></table>
<%sql="select * from car where dlr='"&login_username&"'"&sqladd
select case action
case "carid"
sql=sql&" order by carid desc"
case "ps"
sql=sql&" order by carpws desc"
case "usercp"
sql=sql&" order by usercp desc"
case "emoney"
sql=sql&" order by paymoney desc"
case "power"
sql=sql&" order by power desc"
case "usertime"
sql=sql&" order by usertime desc"
case "day"
sql=sql&" order by day desc"
case "tim"
sql=sql&" order by tim desc"
case "carlasttime"
sql=sql&" order by carlasttime desc"
case "c_hidden"
sql=sql&" order by c_hidden desc"
case "4"
sql=sql&" and c_hidden=1"
case "3"
sql=sql&" and c_hidden=0"
case "user"
sql=sql&" and dlr='"&carer&"'"
case else
sql=sql&" order by c_id desc"
end select
Set rs= Server.CreateObject("ADODB.Recordset")
    set rs=conn.execute(sql)
if rs.eof and rs.bof then
response.write "<p align='center'>"&login_username&" 还 没 有 任 何 充 值 卡</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"caruser.asp"
showContent
showpage totalput,MaxPerPage,"caruser.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move  (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"caruser.asp"
showContent
showpage totalput,MaxPerPage,"caruser.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"caruser.asp"
showContent
showpage totalput,MaxPerPage,"caruser.asp"
end if
end if
end if
sub showContent
dim i
i=0%><div align="center"><center>
  <table border="1" cellspacing="1" width="700" cellpadding="2">
<tr>
  <td align="center" nowrap><b><a href="caruser.asp?action=carid">卡号</a></b></td>
  <td align="center" nowrap><b><a href="caruser.asp?action=ps">密码</a></b></td>
  <td align="center" nowrap><b><a href="caruser.asp?action=usercp">魅力值</a></b></td>
  <td align="center" nowrap><b><a href="caruser.asp?action=emoney"><%response.write m_unit%></a></b>　</td>
  <td align="center" nowrap><a href="caruser.asp?action=day">卡类型</a></td>
  <td align="center" nowrap><a href="caruser.asp?action=power"><b>会员</b></a></td>
  <td align="center" nowrap><b><a href="caruser.asp?action=tim">时间</a></b></td>
  <td align="center" nowrap><b><a href="caruser.asp?action=carlasttime">过期时间</a></b></td>
  <td align="center" nowrap><a href="caruser.asp?action=c_hidden">使用</a></td>
  <td align="center" nowrap><a href="caruser.asp?action=dlr">代理商/使用者</a></td>
  </tr></tr>
  <%do while not rs.eof%><tr onmouseover="javascript:this.bgColor='#EDEDED';" onmouseout="javascript:this.bgColor='#FFFFFF';">
    <td nowrap><center><b><%=rs("carid")%></b></td>
    <td align="center" nowrap><b><%=rs("carpws")%></b>　</td>
    <td align="center" nowrap><font color="#008000"><%=rs("usercp")%></font> 點</td>
    <td align="center" nowrap><%=rs("paymoney")%>　</td>
    <td align="center" nowrap><span style="font-size: 9pt"><%if rs("day")="30" then%></span><font color="#0000FF">包月卡</font><%elseif rs("day")="90" then%><font color="#008000">包季卡</font><%elseif rs("day")="365" then%><font color="#000080">包年卡</font><%else%><font color="#FF0000">特别會員卡</font><%end if%></td>
    <td align="center" nowrap></font><%if rs("power")="admin" then%>管理员<%elseif rs("power")="vip" then%>vip会员<%elseif rs("power")="gold" then%>黄金会员<%else%>普通會員<%end if%></td>
    <td align="center" nowrap>
    <a title="该卡在<%=rs("tim")%>发行" href="caruser.asp?action=tim">发行</a></td>
    <td align="center" nowrap><%if now()>=rs("tim") + rs("carlasttime") then%><%  response.write "<font color=#808080>过期卡</font>"%><%elseif rs("tim") + 3650<=rs("tim") + rs("carlasttime") then%>无限制<%else%><%=rs("carlasttime") + rs("tim")%><%end if%></td>
    <td align="center" nowrap><%if rs("c_hidden")=0 then
response.write "未使用"
else
response.write "<font class=red>已使用</font>"
end if%>　</td>
    <td align="center" nowrap><%=rs("dlr")%>/<%if rs("caruuser")<>"" then%><a href='user_view.asp?username=<%=rs("caruuser")%>' target=_blank><%=rs("caruuser")%></a><%else%>未使用<%end if%></td>
    </tr><% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop%></table></center></div><%end sub 
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&">"
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
else
response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
end if
response.write "<font color='#000080'>&nbsp;页次：</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>张卡 <b>"&maxperpage&"</b>张卡/页</font> "
response.write " <font color='#000080'>转到：</font><input onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
response.write " <input onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' onmouseover=this.style.borderColor='#486841';this.style.backgroundColor='#E2F1A6' onmouseout=this.style.borderColor='#006D91';this.style.backgroundColor='#EFEFEF' class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form></p>"     
end function
rs.close
set rs=nothing  
end if 

response.write ukong
'---------------------------------center end-------------------------------
call web_end(0)
%>