⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qqcf_rec.asp

📁 功 能: 1.系统分别为每个网站注册会员分配了一个推广链接
💻 ASP
字号:
<%
'==================================
' 乘风网站推广系统v3.83 Access版
' 制 作:乘 风
' 开发网站:乘风原创程序
' 网站网址: http://www.qqcf.com
' 程序演示:http://www.qqcf.com/?action=try
' 最新版本下载:http://www.qqcf.com/?action=down
' 使用帮助:http://www.qqcf.com/?action=help&help=cfwztg
' 声 明:	
' 本软件系免费程序,提供给个人免费使用。
' Access免费版缺少防止用户作弊的功能,如需要此功能请购买正式版本。
' 作者为付费版用户提供全面升级服务和技术支持,免费版用户提供有限的升级服务和技术支持。
' 免费版用户在程序首页保留乘风原创程序版权和链接。
' 未经作者许可禁止用于任何商业用途。
' 乘风其它作品:乘风多用户计数器Access版、MsSql版、Php版、.Net版,乘风电影程序、
'        乘风网站推广系统Mssql版、乘风网址程序,乘风广告管理系统、乘风论坛等。
' 此段版权注释不会影响网页打开速度,请勿删除!
'                       2006年9月14日									
'===================================
%>
<!--#Include File="QQCF_Conn.asp"-->
<!--#Include File="QQCF_ChkStr.asp"-->
<!--#Include File="QQCF_MyFunCtion.asp"-->
<%
Tmp=HttpPath(2)

Action=Request("Action")			   
%>

<%If Action="" Then%>
<%
If RsSet("RegType")=2 Then
 Connstr_Rec="DBQ="+server.mappath(RsSet("AccessPath"))+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
 Set conn_Rec= Server.CreateObject ("ADODB.Connection")
 Conn_Rec.Open Connstr_Rec
 User_Name=Chkstr(Request("User_Name"))
 Password=Chkstr(Request("Password"))
 Sql="Select Count(*) From "&RsSet("SaveRegTable")&" where "&RsSet("SaveRegUserName")&"='"&User_Name&"' And "&RsSet("SaveRegPassword")&"='"&Password&"'"
 Set Rs=Conn_Rec.ExeCute(Sql)
 If Rs(0)>0 Then Session("CfWztgUser")=User_Name
ElseIf RsSet("RegType")=3 Then
 Connstr_rec="DRIVER={SQL Server};SERVER="&RsSet("SqlServerIP")&";UID="&RsSet("SqlServerLinkName")&";PWD="&RsSet("SqlServerLinkPassword")&";DATABASE="&RsSet("SqlServerDbName")&""
 Set Conn_Rec= Server.CreateObject ("ADODB.Connection")
 Conn_Rec.Open Connstr_rec
 User_Name=Chkstr(Request("User_Name"))
 Password=Chkstr(Request("Password"))
 Sql="Select Count(*) From "&RsSet("SaveRegTable")&" where "&RsSet("SaveRegUserName")&"='"&User_Name&"' And "&RsSet("SaveRegPassword")&"='"&Password&"'"
 Set Rs=Conn_Rec.ExeCute(Sql)
 If Rs(0)>0 Then Session("CfWztgUser")=User_Name
ElseIf RsSet("RegType")=4 Then
 User_Name=Chkstr(Request("User_Name"))
 Session("CfWztgUser")=User_Name
End if
%>
<html>
<head>
<title><%=RsSet("Title")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="QQCf_Pic/ok3.css" rel="stylesheet" type="text/css">
</head>
<body>

<table width="120" border="0" cellpadding="0" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
  <tr> 
    <td width="579" bgcolor="D6DFF5"><div align="center"><strong><font color="#FF0000">推广让你获利</font></strong></div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" nowrap>

<%If Session("CfWztgUser")="" Then%>
<%
If RsSet("RegType")=1 Then
 Rurl="Reg.asp"
Else
  Rurl=RsSet("RegUrl")
End If
 %>
<br>&nbsp;<a href="<%=Rurl%>" target="_blank"><b>现在就开始注册吧!</b></a><br><br>
&nbsp;<a href="<%=Tmp&"Index.asp"%>" target="_blank"><b>已经注册我要登陆!</b><br><br></a>
<%
Else
%>
<%
 Set Rs= Server.CreateObject("ADODB.Recordset")
 Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_RegUser Where User_Name='"&User_Name&"'"
 Rs.Open Sql,Conn,3,2
 IF Rs(0)=0 Then
  Sql="Insert Into WWW_QQCF_COM_CfWztg_RegUser (User_Name) Values ('"&User_Name&"')"
 End If
 Rs.Close
 Conn.Execute Sql
%>

<%
Set Rs= Server.CreateObject("ADODB.Recordset")
Sql="Select * From WWW_QQCF_COM_CfWztg_RegUser Where User_Name='"&User_Name&"'"
Rs.Open Sql,Conn,1,1

If RsSet("RegType")=4 Then'为mysql接口时都要到首页登陆
 Session("CfWztgUser")=""
 ManageUrl="Index.asp"
Else
 ManageUrl="Manage.asp"
End If
%>	
<br>&nbsp;你好:<b><%=User_Name%></b><br>&nbsp;你的推广剩余金额:<br>&nbsp;<%=Rs("Spare_Cent")/1000%>元<br>
 <br>
 &nbsp;<strong><a href="<%=ManageUrl%>" target="_blank">更多设置点击进入</a></strong>
<%End If%></td>
  </tr>
</table>
</body>
</html>

<%End If%>
<%If Action="float" Then%>
<%
RecType=Cint(Request("RecType"))
If RecType=0 Then
 iframecode="<iframe id='cfrec' src="&Tmp&"qqcf_rec.asp frameBorder=0 width=110 height=100 marginheight=0 marginwidth=0 scrolling=no></iframe>"
ElseIf RecType=1 Then
 iframecode="<iframe id='cfrec' src="&Tmp&"qqcf_rec.asp?user_name="&Request("user_name")&"&password="&Request("password")&" frameBorder=0 width=120 height=100 marginheight=0 marginwidth=0 scrolling=no></iframe>"
End If
 %>
document.write("<div id='float' style='right:0px;POSITION:absolute;TOP:200px;;left: 0px'> ");

document.write("<TABLE cellSpacing=0 cellPadding=0 border=0>");
document.write("    <TR> ");
document.write("      <TD width=160><%=iframecode%></TD>");
document.write("    </TR>");
document.write("</TABLE>");

document.write("</div>");
var iframeids=["cfrec"]
 var iframehide="yes"
 function dyniframesize() 
 {
  var dyniframe=new Array()
  for (i=0; i<iframeids.length; i++)
  {
   if (document.getElementById)
   {
    dyniframe[dyniframe.length] = document.getElementById(iframeids[i]);
    if (dyniframe[i] && !window.opera)
    {
     dyniframe[i].style.display="block"
     if (dyniframe[i].contentDocument && dyniframe[i].contentDocument.body.offsetHeight)
      dyniframe[i].height = dyniframe[i].contentDocument.body.offsetHeight; 
     else if (dyniframe[i].Document && dyniframe[i].Document.body.scrollHeight)
      dyniframe[i].height = dyniframe[i].Document.body.scrollHeight;
    }
   }
   if ((document.all || document.getElementById) && iframehide=="no")
   {
    var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
    tempobj.style.display="block"
   }
  }
 }

 if (window.addEventListener)
 window.addEventListener("load", dyniframesize, false)
 else if (window.attachEvent)
 window.attachEvent("onload", dyniframesize)
 else
 window.onload=dyniframesize
 

        var lastScrollY = 0;
        function floatRefresh() {
                diffY = document.body.scrollTop;
                percent =.1*(diffY-lastScrollY);
                if(percent>0){
                        percent = Math.ceil(percent);
                }else{
                        percent = Math.floor(percent);
                }
                document.all.float.style.pixelTop += percent;
                lastScrollY = lastScrollY + percent;
        }
        window.setInterval("floatRefresh()",1);
<%End If%>


<%If Action="lowreg" Then%>
<%
LowUser_name=Chkstr(Request("LowUser_name"))'为下线的注册用户名

Ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If Ip = "" Then Ip=Request.ServerVariables("REMOTE_ADDR")

If Instr(Application("AdUpUser"),Ip)>0 Then
 MyArray=Split(Application("AdUpUser"),","&Ip)
 MyArray_2=Split(MyArray(0),"|")
 MyStr=MyArray_2(Ubound(MyArray_2))'取出了Ad_ID和User_Name
 MyArray_3=Split(MyStr,",")
 Ad_ID=Int(MyArray_3(0))
 User_Name=MyArray_3(1)
End If

If User_Name<>"" And Ad_ID>0 Then
 Sql="Select * From WWW_QQCF_COM_CfWztg_AD Where ID="&Ad_ID
 Set RsAd=Conn.ExeCute(Sql)
 
 If RsAd("AdState")=2 And RsAd("AdRegUserState")=-1 Then
  
  '点击广告每天记数开始
  Set Rs=Server.CreateObject("Adodb.RecordSet")
  Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Day Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
  Rs.Open Sql,Conn,3,2
  IF Rs(0)=0 Then
   Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Day (User_Name,Ad_ID,Reg_Counter) Values ('"&User_Name&"',"&Ad_ID&",1)"
  Else
   Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Day Set Reg_Counter=Reg_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"#"
  End If
  Conn.ExeCute Sql
  '点击广告天记数结束
  	
  '点击广告每小时记数开始
  Set Rs=Server.CreateObject("Adodb.RecordSet")
  Sql="Select Count(ID) From WWW_QQCF_COM_CfWztg_AD_Counter_Hour Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
  Rs.Open Sql,Conn,3,2
  IF Rs(0)=0 Then
   Sql="Insert Into WWW_QQCF_COM_CfWztg_AD_Counter_Hour (User_Name,Ad_ID,Reg_Counter,AddHour) Values ('"&User_Name&"',"&Ad_ID&",1,"&hour(now)&")"
  Else
   Sql="Update WWW_QQCF_COM_CfWztg_AD_Counter_Hour Set Reg_Counter=Reg_Counter+1 Where User_Name='"&User_Name&"' And Ad_ID="&Ad_ID&" And AddDate=#"&Date()&"# And AddHour="&hour(now)
  End If
  Conn.ExeCute Sql
  '点击广告每小时记数结束

  Set Rs= Server.CreateObject("ADODB.Recordset")
  Sql="Select Top 1 * From WWW_QQCF_COM_CfWztg_LowUser"
  Rs.Open Sql,Conn,3,2
  Rs.AddNew
  Rs("Ad_ID")=Ad_ID
  Rs("User_Name")=User_Name
  Rs("LowUser_Name")=LowUser_Name
  Rs.Update
 
  '更新用户总注册数,收入及广告消耗开始
  Sql="Update WWW_QQCF_COM_CfWztg_RegUser Set ComReg=ComReg+1,Total_Cent=Total_Cent+"&RsAD("Unit_Cent")*RsAD("AdRegUserDouble")&",Spare_Cent=Spare_Cent+"&RsAD("Unit_Cent")*RsAD("AdRegUserDouble")&" Where User_Name='"&User_Name&"'"
  Conn.ExeCute Sql
 
  If RsAD("OverClick")>=RsAD("TotalClick") Then'完成了点击时
   Sql="Update WWW_QQCF_COM_CfWztg_AD Set AdState=4 Where ID="&Ad_ID
   Conn.ExeCute Sql
  End If
 
  Sql="Update WWW_QQCF_COM_CfWztg_AD Set OverClick=OverClick+"&RsAD("AdRegUserDouble")&" Where ID="&Ad_ID
  Conn.ExeCute Sql
  '更新用户总注册数及收入结束
 End If
 Application("AdUpUser")=Replace(Application("AdUpUser"),Ad_ID&","&User_Name&","&Ip&"|","")'清空缓存中的记录
End If
Call ConnClose()
%>
<%End If%>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -