拉下线奖励积分的asp程序怎么写?
admin 发表于 2010-08-28 | 来源:互联网 | 阅读:

拉一个下线奖励300积分的asp程序怎么写,我是这样写的,为什么会是错误的呢?

<%
Set rsb=Server.CreateObject("ADODB.recordset")
mysq="select * from imlm_user where yesno and sx1=’"&imlmusername&"’"
rsb.open mysq,conn,1,1
response.write rsb.recordcount&" 人"
update imlm_user set ajine=’rsb.recordcount*300+ajine’ where yesno and username=’imlmusername’
rsb.close
set rsb=nothing%>

‘imlm_user是表名,sx1是上线字段,ajine是积分字段!

错误信息如下:

Microsoft VBScript 编译器错误 错误 ‘800a0401′ 

语句未结束 

/accounts.asp,行 79 update imlm_user set ajine=’rsb.recordcount*300+ajine’ where yesno and username=’imlmusername’ 

 

已经有9 个评论
  1. 302天堂在线 说:

    HTML code

    <%
    dim num
    Set rsb=Server.CreateObject("ADODB.recordset")
    mysq="select count(*) from imlm_user where yesno and sx1=’"&imlmusername&"’"
    rsb.open mysq,conn,1,1
    num=rsb(0);
    rsb.close
    mysq="update imlm_user set ajine="&num*300&"+ajine where yesno and username="&imlmusername&"’"
    conn.execute(mysq)
    set rsb=nothing%>

  2. xslxld 说:

    楼主基础先练好了再写吧

  3. ccbq2006 说:

    我换成了你的代码还是不对啊!

  4. 心之约 说:

    这个也能拉下线,难道楼主要搞传销?

  5. 302天堂在线 说:

    怎么个不对?提示什么错误?

  6. ssrq 说:

    reg.asp文件时这样写的JScript code
    <!–#include file="inc/conn.asp"–>
    <!–#include file="inc/md5.asp"–>
    <%
    mm=request.Form("mm")
    if mm=1 then
    username=request.Form("username")
    password=request.Form("password")
    passwordto=request.Form("passwordto")

    name=request.Form("name")
    oicq=request.Form("oicq")
    mail=request.Form("mail")
    alipay=request.Form("alipay")
    introducer=request("introducer")

    if username="" or password="" or passwordto="" or name="" or oicq="" or mail="" or alipay="" then
    Response.write "<SCRIPT language=JavaScript>alert(‘请将信息填写完整!’);"
    Response.Write "this.location.href=’http://topic.csdn.net/u/20100822/11/vbscript:history.back()’;</SCRIPT>"
    Response.End
    end if

    if password<>passwordto then
    Response.write "<SCRIPT language=JavaScript>alert(‘两次输入密码不一致!’);"
    Response.Write "this.location.href=’http://topic.csdn.net/u/20100822/11/vbscript:history.back()’;</SCRIPT>"
    Response.End
    end if

    ‘检查帐号是否被注册
    exec="select * from imlm_user where username=’"&username&"’ or alipay=’"&alipay&"’"
    set rsc=server.createobject("adodb.recordset")
    rsc.open exec,conn,1,3
    if not rsc.eof then ‘查看要注册的用户是否已经存在
    addok=0
    else
    addok=1 ‘未
    end if
    rsc.close
    set rsc=nothing
    if addok=1 then

    exec="select * from imlm_user"
    set rs=server.createobject("adodb.recordset")
    rs.open exec,conn,1,3
    rs.addnew
    rs("username")=username
    rs("password")=md5(password)
    rs("name")=name
    rs("oicq")=oicq
    rs("alipay")=alipay
    rs("jine")=2000
    rs("sx1")=introducer
    rs("sx2")=sx2
    rs("sx3")=sx3
    rs("sx4")=sx4
    rs("sx5")=sx5
    rs("yesno")=true
    rs.update
    rs.close
    set rs=nothing
    else
    Response.write "<SCRIPT language=JavaScript>alert(‘对不起!用户名已被注册!’);"
    Response.Write "this.location.href=http://topic.csdn.net/u/20100822/11/’vbscript:history.back()’;</SCRIPT>"
    Response.End
    end if
    mm=0
    Session("imlmusername")=username
    Response.write "<SCRIPT language=JavaScript>alert(‘恭喜您!注册用户成功!’);"
    Response.Write "this.location.href=http://topic.csdn.net/u/20100822/11/’accounts.asp’;</SCRIPT>"
    Response.End
    end if
    %><!–#include file="top.asp"–>
    <table border="0" width="950" id="table12" cellspacing="0" cellpadding="5" align="center">
    <tr>
    <td background="image/weizhi_bj.jpg" height="32">当前位置:<a href=http://topic.csdn.net/u/20100822/11/"index.asp">首页</a>
    &gt;&gt; 会员注册</td>
    </tr>
    <tr>
    <td height="5"></td>
    </tr>
    </table>
    <div align="center">
    <table border="0" width="950" id="table6" cellspacing="0" cellpadding="0" height="164" align="center">
    <tr>
    <td width="720" valign="top">
    <table border="0" width="720" id="table13" cellspacing="1" bgcolor="#D4E2E9">
    <tr>
    <td class="b" height="30">  <span style="color: #FFFFFF">会员注册</span></td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" valign="top">
    <table border="0" width="720" id="table14" cellspacing="0" cellpadding="5">
    <tr>
    <td align="center">
    <form method="POST">

    <div align="center">
    <table id="table1" borderColor="#cccccc" cellSpacing="0" cellPadding="0" width="720" border="0">
    <tr>
    <td align="middle">
    <table id="table15" cellSpacing="0" cellPadding="5" width="682" border="0">
    <tr>
    <td>
    <p align="center">&nbsp;<b><font color="#FF0000" size="5" face="宋体">注册 <%=adtitle%> 条款</font></b></p>
    <p>&nbsp;
    首先感谢您选择本站,不管您是作为用户身份还是广告商的身份加入,都请遵守以下规则。</p>
    <p>·保证您的注册资料真实可靠;</p>
    <p>·允许本站向您的邮箱内发送邮件;</p>
    <p>·不的利用任何变相手段传播任何与法律相抵触的信息;</p>
    <p>·禁止一人注册多个帐号,一经发现一律删除;</p>
    <p>·我已阅读条款并保证没有违约或作弊,如有违约,管理员有权暂停或删除帐号.
    </td>
    </tr>

    <tr>
    </table>
    </td>
    </tr>
    </table>
    </div><HR>
    <table border="0" width="488" id="table3" cellspacing="0" cellpadding="5">
    <tr>
    <td width="106"> </td>
    <td width="340" colspan="2"> </td>
    </tr>
    <tr>
    <td width="106" align="right">用 户 名:</td>
    <td colspan="2">
    <input type="text" name="username" size="20" class="form" maxlength="16">(5-16位英文+数字)</td>
    </tr>
    <tr>
    <td width="106" align="right">登录密码:</td>
    <td colspan="2">
    <input type="password" name="password" size="20" class="form">(请保持6-16位)</td>
    </tr>
    <tr>
    <td width="106" align="right">重复密码:</td>
    <td colspan="2">
    <input type="password" name="passwordto" size="20" class="form">(重复输入密码)</td>
    </tr>
    <tr>
    <td width="106" align="right">电子邮箱:</td>
    <td colspan="2">
    <input type="text" name="mail" size="20" class="form">*必填</td>
    </tr>
    <tr>
    <td width="106" align="right">QQ 号码:</td>
    <td colspan="2">
    <input type="text" name="oicq" size="20" class="form" maxlength="12" onkeyup=’this.value=this.value.replace(/\D/gi,"")’>*必填</td>
    </tr>
    <tr>
    <td width="106" align="right">支 付 宝:</td>
    <td colspan="2">
    <input type="text" name="alipay" size="20" class="form">*必填</td>
    </tr>
    <tr>
    <td width="106" align="right">真实姓名:</td>
    <td colspan="2">
    <input type="text" name="name" size="20" class="form">*(必须与支付宝同名,否则不与申请提现)</td>
    </tr>
    <td colspan="3" align="center">
    <input type="submit" value=http://topic.csdn.net/u/20100822/11/" 注 册 " name="B1"></td>
    </tr>
    <tr>
    <td colspan="3" align="center">
     </td>
    </tr>
    </table>
    <input type="hidden" name="mm" value="1">
    <script language="JScript.Encode">#@~^ZwEAAA==@#@&@!Z O@#@&/mD,Ot{^WK3rn,’P9Gm!:+ O mKW0kni@#@&7l.P(.W0+Um1WWVrPxPD4{^KW0k+c/askD`E9S+rE*i@#@&-lMPkssh{Nhk~’~8MWV+ mmKWVr$!DI@#@&-lM~(DG0+ {mKW0r+,’~ksVhmNh+b /aVkDcEksVsR^xxE*i@#@&7CD,khss{LAnbPxP(.K3n {1WW0k,FYi@#@&7l.~b:VsmLS+k,x~E +kmCwncb:s:|%hkbI@#@&NG^!:nxD SDrD+vJ@!bxa;Y,Yzw’v4bNNUB,xlsnxBbxDDGN;^DvP7CV!+xvr_khss{%hr3Jv@*J*i@#@&O @*@#@&0nAAAA==^#~@</SCRIPT>
    </form>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td width="4" valign="top"> </td>
    <td width="210" valign="top">
    <table border="0" width="100%" id="table21" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <table border="0" width="100%" id="table22" cellspacing="1" bgcolor="#D4E2E9">
    <tr>
    <td class="b" height="30">  开始赚钱</td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" align="center" valign="top">
    <table border="0" width="100%" id="table24" cellspacing="0" cellpadding="0">
    <tr>
    <td height="30" align="center"><a href=http://topic.csdn.net/u/20100822/11/"surf_list.asp">
    冲浪赚钱</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="profit.asp">
    浏览赚钱</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="ddad.asp">
    点击赚钱</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="task.asp">
    奖励赚钱</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="ask.asp">
    问答赚钱</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="game.asp">
    游戏赚钱</a></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
     </td>
    </tr>
    <tr>
    <td>
    <table border="0" width="100%" id="table26" cellspacing="1" bgcolor="#D4E2E9">
    <tr>
    <td class="b" height="30">  发布广告</td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" align="center" valign="top">
    <table border="0" width="100%" id="table27" cellspacing="0" cellpadding="0">
    <tr>
    <td height="30" align="center"><a href="surf_publish.asp">
    发布冲浪任务</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="faad.asp">
    发布浏览广告</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="faddad.asp">
    发布点击广告</a></td>
    </tr>
    <tr>
    <td height="30" align="center">
    <a href="addtask.asp">发布奖励任务</a></td>
    </tr>
    <tr>
    <td height="30" align="center"><a href="faask.asp">
    发布商家问答</a></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
     </td>
    </tr>
    <tr>
    <td>
    <table border="0" width="100%" id="table30" cellspacing="1" bgcolor="#D4E2E9">
    <tr>
    <td class="b" height="30">  管理广告</td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" align="center" valign="top">
    <table border="0" width="100%" id="table31" cellspacing="0" cellpadding="0">
    <tr>
    <td height="30" align="center">
    <a href="surf_liebiao.asp">冲浪任务管理</a></td>
    </tr>
    <tr>
    <td height="30" align="center">
    <a href="adliebiao.asp">浏览广告管理</a></td>
    </tr>
    <tr>
    <td height="30" align="center">
    <a href="ddadliebiao.asp">点击广告管理</a></td>
    </tr>
    <tr>
    <td height="30" align="center">
    <a href="taskliebiao.asp">奖励任务管理</a></td>
    </tr>
    <tr>
    <td height="30" align="center">
    <a href="askliebiao.asp">商家问答管理</a></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </div>
    <!–#include file="bottom.asp"–>
    </body>

    </html>

    就是如果有一个人通过introducer的链接注册成功之后,就给这个introducer增加300积分!

  7. xuepiao 说:

    没看到你更新积分的代码啊?我给你的那段你运行哪里出错啊?

  8. satan 说:

    首先感谢你的回答.我替换成你的代码之后提示信息如图所示accounts.asp文件的部分主要代码如下:HTML code
    <!–#include file="inc/conn.asp"–>
    <!–#include file="imlm.asp"–>
    <!–#include file="top.asp"–>
    <%
    if not login then
    Response.write "<SCRIPT language=JavaScript>alert(‘对不起!请先登陆!’);"
    Response.Write "this.location.href=’http://topic.csdn.net/u/20100822/11/index.asp’;</SCRIPT>"
    Response.End
    end if
    %>
    <table border="0" width="950" id="table12" cellspacing="0" cellpadding="5" align="center">
    <tr>
    <td background="image/weizhi_bj.jpg" height="32">当前位置:<a href="index.asp">首页</a>
    &gt;&gt; 我的帐户</td>
    </tr>
    <tr>
    <td height="5"></td>
    </tr>
    </table>
    <div align="center">
    <table border="0" width="950" id="table6" cellspacing="0" cellpadding="0" height="164" align="center">
    <tr>
    <td width="740" valign="top">
    <table border="0" width="100%" id="table13" cellspacing="0" cellpadding="0">
    <tr>
    <td height="50" valign="top">
    <table border="0" width="100%" id="table18" cellspacing="1" cellpadding="5" class="2b">

    <tr>
    <td class="2b" background="image/weizhi_bj.jpg" height="32">【<a href="accounts.asp">帐号</a>/<a href="data.asp">资料</a>】【<a href="payment.asp"><font color="#FF6600">充值</font></a>/<a href="change.asp">提现</a>】【<a href="commend.asp">下线数</a>】【<a href="log.asp">奖励记录</a>】【<a href="surf_log.asp"><font color="#FF6600">冲浪记录</font></a>】【<a href="task_log.asp">注册记录</a>】【<a href="profit_log.asp">浏览记录</a>】【<a href="ddad_log.asp">点击记录</a>】【<a href="ask_log.asp">问答记录</a>】【<a href="game_log.asp">游戏记录</a>】</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    <table border="0" width="100%" id="table16" cellspacing="1" bgcolor="#D4E2E9">

    <tr>
    <td bgcolor="#FFFFFF" valign="top">
    <table border="0" width="100%" id="table17" cellspacing="0" cellpadding="5">

    <tr>
    <td>
    您的推广链接:<font color="#0099FF"><b><span style="cursor:hand;" onClick="clipboardData.setData(‘text’,'http://<%=adurl%>/reg.asp?introducer=<%=imlmusername%>’);alert(‘复制成功!’);">http://<%=adurl%>/reg.asp?introducer=<%=imlmusername%>&nbsp;&nbsp;推荐给您的朋友!</span></b></font>
    <a href="commend.asp"><img border="0" src="image/commendbu.gif"></a><a href="commendcode.asp"></a></td>
    </tr>

    <tr>
    <td colspan="2"><p> &nbsp;<span style="color: #999999">尊敬的<font color="#FF9900"><b>&nbsp;&nbsp;<%=aname%>&nbsp;&nbsp;</b></font>先生/女士, 你好!&nbsp;&nbsp;&nbsp;&nbsp;您的ID是:&nbsp;<b><%=imlmusername%></b></span></p>
    </td>
    </tr>

    <tr>
    <td valign="top" align="center">
    <table border="0" width="720" id="table19" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC">
    <tr>
    <td colspan="2" class="b">我的帐户&nbsp;&nbsp;(<%if avip then response.write "VIP会员" else response.write "普通会员&nbsp;<A href=http://topic.csdn.net/u/20100822/11/""vip.asp"" target=_blank><font color=""#ffff00"">[点此自助升级VIP]</font></a>" end if%>
    )<font color="#ffffff">(升级</font><span style="color: #FFFF00">vip</span><font color="#ffffff">需要</font><span style="color: #FFFF00">10</span><font color="#ffffff">元)</font></td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" width="397">帐号余额:<%=formatnumber(ajine,2)%>&nbsp;<%=adbname%>&nbsp;(<font color="#FF0000"> <b><%=formatnumber(ajine/adbili,2)%></b></font> 元&nbsp;)&nbsp;&nbsp;[<a href="payment.asp">充值</a>|<a href="change.asp">提现</a>]</td>
    <td bgcolor="#FFFFFF" width="300">vip奖励:&nbsp;<%=aviptj%>&nbsp;<%=adbname%>&nbsp;&nbsp;
    vip累计奖励:<%=axjine%>&nbsp;<%=adbname%></td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" width="397">充值总额:<%=acjine%>&nbsp;<%=adbname%></td>
    <td bgcolor="#FFFFFF" width="300">登陆次数:<%=aloginnum%> 次</td>
    </tr>
    <tr>
    <td bgcolor="#FFFFFF" width="397">提现总额:<%=atjine%>&nbsp;<%=adbname%>&nbsp;(<%=atjine/adbili%>&nbsp;元)</td>
    <td bgcolor="#FFFFFF" width="300">下线数量:<%
    dim num
    Set rsb=Server.CreateObject("ADODB.recordset")
    mysq="select count(*) from imlm_user where yesno and sx1=’"&imlmusername&"’"
    rsb.open mysq,conn,1,1
    num=rsb(0)
    response.write num
    rsb.close
    mysq="select * from imlm_user where yesno and username=’"&imlmusername&"’"
    mysq="update imlm_user set ajine=’"&num*300&"’+ajine where yesno and username=’"&imlmusername&"’"
    conn.execute(mysq)
    set rsb=nothing%>
    &nbsp;[<a href="commend.asp">详情</a>]

  9. 302天堂在线 说:

    谢谢,问题已解决!

我要评论

评论功能因故关闭!

请加入我们的QQ群一起参与讨论:群号59400482(500人超级群)


返回首页 | 关于我们 | 联系我们 | 广告合作 | 网站地图 | 友情链接 | 版权声明