| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 696 人关注过本帖
标题:请高手帮忙修改下代码,主要是用Dreamweaver打开后的最后一行数据“每点击需 ...
只看楼主 加入收藏
yangle0916
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-6-4
结帖率:0
收藏
 问题点数:0 回复次数:1 
请高手帮忙修改下代码,主要是用Dreamweaver打开后的最后一行数据“每点击需”后面的
<%
if not kgtuiguang then
    Response.write "<SCRIPT language=JavaScript>alert('对不起!推广网站任务暂停!!请与客服联系!!');"
    Response.Write "this.location.href='M_extendad_2.asp';</SCRIPT>"
    Response.End
end if

if not login then
    Response.write "<SCRIPT language=JavaScript>"
    Response.Write "this.location.href='login.asp';</SCRIPT>"
    Response.End
end if

mm=int(request("mm"))
if mm=1 then
mm=0
    title=ops(trim(request.form("title")))
    url=Lcase(trim(request.form("url")))
    image=trim(request.form("image"))
    question=request.form("question")
    answer=ops(trim(request.form("answer")))
    fangan=int(request.form("fangan"))
        
    if fangan=1 then jine=commend_ljine
    if fangan=2 then jine=commend_ljine2
    if fangan=3 then jine=commend_ljine3
   
    dnum=int(request.form("dnum"))
    dtaday=int(request.form("dtaday"))
    jiangli=int(request.form("jiangli"))
    zongjine=dnum*(jine+jiangli)
    if dtaday=0 then
    dtaday=9999
    end if



'''''''''''''''''处理投放时间'''''''''''''''''''''
djtime=trim(request.form("djtime"))
djtime=", "&djtime&", "
for i=1 to 14
    if inStr(djtime,", "&cstr(i)&", ") then
        temp=temp&"1"
    else
        temp=temp&"0"
    end if
    if i<14 then
        temp=temp&"|"
    end if
next
    if inStr(djtime,", 15, ") then
    temp="1|"&temp
    else
    temp="0|"&temp
    end if
djtime=temp

''''''''''''''''''''''''''''''''''''''''''''''''''




    if dnum<commend_lnum then
        Response.write "<SCRIPT language=JavaScript>alert('对不起,发布失败!\n\n原因:广告推广最少发布 "&commend_lnum&" 次!');"
        Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
        Response.End
    end if
    if title="" or url="" or url="http://" or image="" or image="http://" or answer=""  or dnum=0  or djtime="" then
        Response.write "<SCRIPT language=JavaScript>alert('请将信息填写完整!!');"
        Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
        Response.End
    end if
   
    if  left(url,7)<>"http://" or left(image,7)<>"http://"  then
        Response.write "<SCRIPT language=JavaScript>alert('网站地址或者网站图片地址无效!!请修改后再提交!!');"
        Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
        Response.End
    end if
   
   
            
    if image<>"http://" and right(image,1)="/" then
        image=left(image,len(image)-1)
    end if
   
    if url<>"http://" and right(url,1)="/" then
        url=left(url,len(url)-1)
    end if
            
    exect="select * from kaixinjz_commend where title='"&title&"'"
    set rsabt=server.createobject("adodb.recordset")
    rsabt.open exect,conn,1,1
    if not (rsabt.eof and rsabt.bof) then
    Response.write "<SCRIPT language=JavaScript>alert('该广告标题已经存在!!请修改后重新提交');"
    Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
    Response.End
    end if
    rsabt.close
    set rsabt=nothing
   
   
    if ischkurl then
    if not kaixinjz_CheckURL(image) then
    Response.write "<SCRIPT language=JavaScript>alert('网站图片地址无效,请重新修改!!');"
        Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
        Response.End
    end if
    end if
   
   
    if ischkurl then
        if not kaixinjz_CheckURL(url) then
        Response.write "<SCRIPT language=JavaScript>alert('网站网址无效,请重新修改!!');"
        Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
        Response.End
        end if
    end if
   
   
    if zongjine>int(ajine) then
        Response.write "<SCRIPT language=JavaScript>alert('对不起!点击"&dnum&"次推广广告需要"&zongjine&adbname&"\n\您帐号现有"&ajine&adbname&",还差"&zongjine-ajine&adbname&"!');"
        Response.Write "this.location.href='vbscript:history.back()';</SCRIPT>"
        Response.End
    else
    '''''''''''''''''''''''''检查广告网址是否重复,如果重复,就在URL后面加上"#"号'''''''''''''''''''''''
chk=1
do while chk=1
        exechk="select * from kaixinjz_commend where url='"&url&"'"
        set rschk=server.createobject("adodb.recordset")
        rschk.open exechk,conn,1,1
        if not rschk.eof then
        url=url+"#"
        else
        chk=0
        end if
        rschk.close
        set rschk=nothing
loop
''''''''''''''''''''''''''''''''''''''''''''''''
   
   
        call kaixinjz_EditJine(kaixinjzusername,zongjine,0,"发布推广任务("&dnum&"次"&jine+jiangli&adbname&"推广)")

        exec="select * from kaixinjz_commend"
        set rsab=server.createobject("adodb.recordset")
        rsab.open exec,conn,1,3
        rsab.addnew
        rsab("username")=kaixinjzusername
        rsab("title")=title
        rsab("url")=left(url,250)
        rsab("image")=left(image,250)
        rsab("answer")=answer
        rsab("jine")=int(jine+jiangli)
        rsab("fangan")=fangan
        rsab("dnum")=dnum
        rsab("dtaday")=dtaday
        rsab("djtime")=djtime
        rsab("question")=question
        rsab("okdnum")=0
        rsab.update
        rsab.close
        set rsab=nothing
    end if
    Response.write "<SCRIPT language=JavaScript>alert('恭喜您!推广任务发布成功!');"
    Response.Write "this.location.href='commend_M.asp';</SCRIPT>"
    Response.End
end if
%>

<%
topt=2
toptd=2
toptt=21
%>


<div align="center">
    <table border="0" width="600" id="table6" cellspacing="0"  height="164" align="center">
        <tr>
            <td width="600" valign="top">
            <table border="0" width="100%" id="table13" cellspacing="0" cellpadding="0">
            
                <tr>
                    <td>
            <table border="0" width="100%" id="table14" cellspacing="0" bgcolor="#D4E2E9">
               
                <tr>
                    <td bgcolor="#FFFFFF" valign="top">
                <table border="0" width="600" id="table16" cellspacing="0" cellpadding="5">
                    
                    
<tr>
    <td height="25"  class="b">
                       <font color="#0099FF">发布推广任务 </font></td>
                    </tr>
                    <tr>
                        <td align="center">
                        <form method="POST">
                            <table border="0" width="700" id="table17" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC">
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    推广标题:</td>
                                    <td width="594" bgcolor="#FFFFFF"><input type="text" name="title" size="33"></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    网站网址:</td>
                                  <td bgcolor="#FFFFFF"><input type="text" name="url" size="33" value="http://"></td>
                                </tr>
                                    <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    网站图片:</td>
                                    <td bgcolor="#FFFFFF" ><input name="image" type="text" id="image" value="http://" size="33">
                                      <span style="color: #0099FF">(让人一看就知道是你的站, 图片大小一律为468*60) </span></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">推广问题:</td>
                                  <td bgcolor="#FFFFFF">
                                  <input name="question" type="text" id="question" size="33">
                                  <span style="color: #0099FF">(问题设置要合理, 要很容易让会员找到答案,答案必须唯一和客观)</span></td>
                                </tr>
                                    <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">问题答案:</td>
                                    <td bgcolor="#FFFFFF"><input name="answer" type="text" id="answer" size="33">
                                      <span style="color: #0099FF">(请正确填写相应的答案!!)</span></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    点击方案:</td>
                                  <td bgcolor="#FFFFFF">
                                    <input name="fangan" type="radio" onClick="getValue();" value="1" checked>
                                    <strong>                                    一天内相同IP不重复点击(<%=commend_ljine%> <%=adbname%>)<br>
                                    <input name="fangan" type="radio" onClick="getValue();" value="2">                                    
                                    一天内相同网段不重复点击(<%=commend_ljine2%> <%=adbname%>)<br>
                                    <input name="fangan" type="radio" onClick="getValue();" value="3">                                    
                                    三天内相同网段不重复点击(<%=commend_ljine3%> <%=adbname%>)<br><br>
&nbsp;&nbsp;如IP:222.246.45.X (X=0~255) 为相同网段</strong></td>
                                </tr>
                                <tr id="t01">
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    点击时间:</td>
                                    <td bgcolor="#FFFFFF">
                                    <input name="djtime" type="checkbox" value="1" checked>07:00~08:00&nbsp;
                                    <input name="djtime" type="checkbox" value="2" checked>08:00~09:00&nbsp;
                                    <input name="djtime" type="checkbox" value="3" checked>09:00~10:00&nbsp;
                                    <input name="djtime" type="checkbox" value="4" checked>10:00~11:00&nbsp;
                                    <input name="djtime" type="checkbox" value="5" checked>11:00~12:00&nbsp;<br>
                                    <input name="djtime" type="checkbox" value="6" checked>12:00~13:00&nbsp;
                                    <input name="djtime" type="checkbox" value="7" checked>13:00~14:00&nbsp;
                                    <input name="djtime" type="checkbox" value="8" checked>14:00~15:00&nbsp;
                                    <input name="djtime" type="checkbox" value="9" checked>15:00~16:00&nbsp;
                                    <input name="djtime" type="checkbox" value="10" checked>16:00~17:00&nbsp;<br>
                                    <input name="djtime" type="checkbox" value="11" checked>17:00~18:00&nbsp;
                                    <input name="djtime" type="checkbox" value="12" checked>18:00~19:00&nbsp;
                                    <input name="djtime" type="checkbox" value="13" checked>19:00~20:00&nbsp;
                                    <input name="djtime" type="checkbox" value="14" checked>20:00~21:00&nbsp;
                                    <input name="djtime" type="checkbox" value="15" checked>21:00~07:00</td>
                                </tr>
                                <tr id="t02">
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    每日点击:</td>
                                    <td bgcolor="#FFFFFF">
                                   <input type="text" name="dtaday" size="7" onKeyUp='this.value=this.value.replace(/\D/gi,"");' value="0">
                                   (每日最高点击量,输入0则为不限制)</td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    点击数量:</td>
                                    <td bgcolor="#FFFFFF">
                                    <input name="dnum" type="text" onkeyup='this.value=this.value.replace(/\D/gi,"");getValue();' value="0" size="7">
                                    (最少发布 <font color="#FF0000"><%=commend_lnum%></font> 次点击)</td>
                                </tr>
                                <tr>
                                  <td bgcolor="#FFFFFF" width="81" align="center">竞价奖励:</td>
                                    <td bgcolor="#FFFFFF">
                                    <input name="jiangli" type="text" id="jiangli" onkeyup='this.value=this.value.replace(/\D/gi,"");getValue();' value="0" size="7">
                                    <%=adbname%>(奖励越高,排名越靠前)
                                    <input type="hidden" name="fangan2" id="fangan2"></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                  所需<%=adbname%>:</td>
                                    <td bgcolor="#FFFFFF">
                                    <input type="text" name="zhongjine" size="7" style="background-color: #DBDBDB" onkeyup='this.value=this.value.replace(/\D/gi,"")' maxlength="6" readonly=true>                                     <%=adbname%>(发布该广告所需要的<%=adbname%>数)&nbsp;折合成人民币:<b><span id="rmb">0</span>元</td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" width="81" align="center">
                                    当前汇率:</td>
                                    <td bgcolor="#FFFFFF">
                                    <b><%=adbili%> <%=adbname%>=1元人民币</b>&nbsp;<b><%=adbili*5%> <%=adbname%>=5元人民币</b></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#FFFFFF" align="center" colspan="2">
                                    <input type="submit" value=" 发布广告 " name="B1"></td>
                                </tr>
                            </table>
                            <input type="hidden" name="mm" value="1">
<SCRIPT LANGUAGE="JavaScript">
//选radio值
function getValue()
{
var jine=0;
   for(i=0,len=document.all.fangan.length;i<len;i++)
   {
       if(document.all.fangan[i].checked)
       {
       var jine_=document.all.fangan[i].value;
       if(jine_==1){jine=<%=commend_ljine%>;}
       if(jine_==2){jine=<%=commend_ljine2%>;}
       if(jine_==3){jine=<%=commend_ljine3%>;}
       if(jine_==0){
       document.getElementById("t01").style.display="none";
       document.getElementById("t02").style.display="none";
       }else{
       document.getElementById("t01").style.display="";
       document.getElementById("t02").style.display="";
       }
       document.all.zhongjine.value=(jine+parseInt(document.all.jiangli.value))*document.all.dnum.value;
       document.all.rmb.innerText=document.all.zhongjine.value/<%=adbili%>;
       }
   }
}
</script>
                        </form>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">                        
                        <table border="0" width="700" id="table9" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC">
                            <tr>
                                <td bgcolor="#FFFFFF" width="85" align="center">
                                点击方案:</td>
                                <td bgcolor="#FFFFFF" align="center" width="201">
                                1天内相同IP不重复点击</td>
                                <td bgcolor="#FFFFFF" align="center" width="201">
                                1天内相同网段不重复点击</td>
                                <td bgcolor="#FFFFFF" align="center" width="201">
                                  <span style="color: #0099FF">3天内相同网段不重复点击</span></td>
                            </tr>
                            <tr>
                                <td bgcolor="#FFFFFF" width="85" align="center">
                                每点击需:</td>
                                <td bgcolor="#FFFFFF" align="center" width="201">
                              <%=commend_ljine%>  <%=adbname%>/点击</td>
                                <td bgcolor="#FFFFFF" align="center" width="201">
                              <%=commend_ljine2%>  <%=adbname%>/点击</td>
                                <td bgcolor="#FFFFFF" align="center" width="201">
                                  <span style="color: #0099FF"><%=commend_ljine3%>  <%=adbname%>/点击</span></td>
                            </tr>
                           
                           
                        </table></td>
                        
                    </tr>
                    
                <tr>
                        <td height="30" background="image/bt_bj.gif">
                          <div align="center"><font color="#0099FF">注意:            任务中任何环节涉及任何与法律相抵触的信息,我们有权删除您的广告,并封闭帐号余款不退。</font></div></td>
                    </tr>

                </table>
                    </td>
                </tr>
            </table>
                    </td>
                </tr>
            </table>
             </td>
        </tr>
    </table>
</div>

</body>

</html>
搜索更多相关主题的帖子: request title 
2012-06-14 21:24
laokui
Rank: 2
等 级:新手上路
威 望:3
帖 子:149
专家分:8
注 册:2008-12-11
收藏
得分:0 
你这个是ASP

学习项目管理中
2012-09-02 22:28
快速回复:请高手帮忙修改下代码,主要是用Dreamweaver打开后的最后一行数据“每 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.068974 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved