function.asp
资源名称:1.rar [点击查看]
上传用户:ziqing_518
上传日期:2022-08-09
资源大小:446k
文件大小:56k
源码类别:
多媒体编程
开发平台:
ASP/ASPX
- <%
- '如果你美化的漂亮或者修正了最多只可以同时添加5集和不能修改用户虚拟币的BUG记得联系一下网络游子哟~!我的QQ35325750或者1006389
- %>
- <%
- Response.Expires=0
- '--------------------附加码--------------------
- function index_copyid()
- Randomize
- session("numCopyid")=Int((9999 - 1000 + 1) * Rnd + 1000)
- index_copyid=session("numCopyid")
- end function
- '--------------------显示影片推荐--------------------
- function show_commend()
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.CursorType = adOpenStatic
- rs.CacheSize = cint(numCommend_1)
- sql="select download.id,download.name,download.dateRtime,download.strCommend,download.strPic,download.strShow from download where boolCommend=true order by dateRtime desc"
- rs.open sql, conn,1,1
- if rs.eof then
- response.write("无推荐影片")
- else
- response.write("<table width='100%' border='0' cellspacing='3' cellpadding='0'>")
- for i= 1 to numCommend_1
- numId=rs("id")
- if rs("strPic")="" then
- strPic="./images/nopic.gif"
- else
- strPic=rs("strPic")
- end if
- strName=rs("name")
- select case left(rs("strCommend"),1)
- case "0"
- strCommend="☆☆☆☆☆"
- case "1"
- strCommend="★☆☆☆☆"
- case "2"
- strCommend="★★☆☆☆"
- case "3"
- strCommend="★★★☆☆"
- case "4"
- strCommend="★★★★☆"
- case "5"
- strCommend="★★★★★"
- end select
- strShow=rs("strShow")
- if len(strShow)>numShows_1 then
- strShow=left(strShow,numShows_1) & "..."
- end if
- if i=1 then
- response.write("<tr>"&_
- "<td align='center'><a href='./show.asp?id="&numId&"' target='_blank'><img border='0' src='"&strPic&"' title='影片名称:"&strName&"<br>推荐度:"&strCommend&"' width='120' height='90'></a></td>"&_
- "</tr><tr>"&_
- "<td><p style='text-indent: 20'>"&strShow&"</p></td>"&_
- "</tr><tr>"&_
- "<td>☆<b>以往精品推荐 OLD!</b></td>"&_
- "</tr><tr><td>")
- else
- response.write("<li><a href='./show.asp?id="&numId&"' target='_blank' title='影片名称:"&strName&"<br>推荐度:"&strCommend&"<br>简介:"&strShow&"'>"&strName&"</a></li>")
- end if
- rs.movenext
- if rs.eof then
- exit for
- end if
- next
- response.write("</td></tr></table>")
- end if
- rs.close
- set rs=nothing
- end function
- '--------------------首页分类列表--------------------
- function sort_show()
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select sort.id,sort.sort from sort"
- rs.open sql, conn,1,1
- if rs.eof then
- response.write("<tr align='center'><td width='100%' align='center'>还没有分类内容</td></tr>")
- else
- while not rs.eof
- strSort=rs("sort")
- response.write("<tr align='center'><td width='20%' align='right' valign='top'>"&_
- "<table width='100%' border='0' cellspacing='0' cellpadding='3'>"&_
- "<tr>"&_
- "<td width='100%' align='right' valign='top'>"&strSort&":</td></tr></table>")
- Set rs1 = Server.CreateObject("ADODB.Recordset")
- sql1="select small.id,small.small,small.sortid from small where sortid='"&strSort&"'"
- rs1.open sql1, conn,1,1
- if rs1.eof then
- response.write("<td width='80%'>"&_
- "<table width='100%' border='0' cellspacing='0' cellpadding='3'><tr>"&_
- "<td width='100%'>还没有二级分类内容</td></tr></table>")
- else
- numI=0
- response.write("<td width='80%'>"&_
- "<table width='100%' border='0' cellspacing='0' cellpadding='3'><tr align='center'>")
- while not rs1.eof
- numI=numI+1
- numSmallid=rs1("id")
- strSmall=rs1("small")
- response.write("<td width='25%'><a href='list.asp?type="&numSmallid&"'>"&strSmall&"</a></td>")
- if numI mod 4=0 then
- response.write("</tr><tr align='center'>")
- end if
- rs1.movenext
- wend
- if numI<4 then
- for i= 1 to 4-numI
- response.write("<td width='25%'> </td>")
- next
- end if
- response.write("</tr></table></td>"&_
- "<tr align='center'>"&_
- "<td colspan='5'>"&_
- "<hr align='right' width='92%' size='1' noshade>"&_
- "</td></tr>")
- end if
- rs1.close
- set rs1=nothing
- rs.movenext
- wend
- rs.close
- set rs=nothing
- end if
- end function
- '--------------------首页公告显示--------------------
- function affiche_indexshow()
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select affiche.title,affiche.times from affiche order by times desc"
- rs.open sql,conn,1,1
- if rs.eof then
- response.write("<b><a href='affiche.asp' target='_blank'>还没有添加公告,请去管理区添加公告</a></b>")
- else
- rs.movefirst
- strTitle=rs("title")
- dateTimes=rs("times")
- response.write("<b>最新公告:</b> <a href='affiche.asp' target='_blank'>"&strTitle&"</a> ("&dateTimes&")")
- end if
- rs.close
- set rs=nothing
- end function
- '--------------------列表分类显示--------------------
- function list_sort()
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select sort.id,sort.sort from sort"
- rs.open sql, conn,1,1
- if rs.eof then
- response.write("<option selected>--==没有分类==--</option>")
- else
- if request.QueryString("type")="" then
- response.write("<option value='list.asp' selected>--==影片分类列表==--</option>")
- else
- response.write("<option value='list.asp'>--==影片分类列表==--</option>")
- end if
- while not rs.eof
- strSort=rs("sort")
- response.write("<option value='list.asp'>---"&strSort&"---</option>")
- Set rs1 = Server.CreateObject("ADODB.Recordset")
- sql1="select small.id,small.small,small.sortid from small where sortid='"&strSort&"'"
- rs1.open sql1, conn,1,1
- while not rs1.eof
- numSmallid=cint(rs1("id"))
- strSmall=rs1("small")
- numRequest=cint(request.QueryString("type"))
- if numRequest=numSmallid then
- strSelected="selected"
- else
- strSelected=""
- end if
- response.write("<option "&strSelected&" value='list.asp?type="&numSmallid&"'>"&strSmall&"</option>")
- rs1.movenext
- wend
- rs1.close
- set rs1=nothing
- rs.movenext
- wend
- end if
- rs.close
- set rs=nothing
- end function
- '--------------------列表影片显示--------------------
- function list_soft()
- strType=request.QueryString("type")
- strRang=request.QueryString("rang")
- strTch=request("TTYPE")
- strSearch=request("KEY")
- if request.QueryString("page")<>"" then
- absPageNum=request.QueryString("page")
- else
- absPageNum=1
- end if
- RecordPerPage = numSofts_1
- Set rs3 = Server.CreateObject("ADODB.Recordset")
- rs3.CursorType = adOpenStatic
- rs3.CacheSize = RecordPerPage
- sql3="select * from download"
- if strType<>"" then
- sql3=sql3&" where boolZhen=False and numSortcount="&strType
- else
- if strSearch<>"" then
- if strTch="BYNAME" then
- sql3=sql3&" where boolZhen=False and name like '%"&strSearch&"%'"
- else
- sql3=sql3&" where boolZhen=False and strShow like '%"&strSearch&"%'"
- end if
- else
- sql3=sql3&" where boolZhen=False"
- end if
- end if
- if strRang<>"" then
- sql3=sql3&" order by "&strRang&" desc"
- else
- sql3=sql3&" order by dateRtime desc"
- end if
- rs3.open sql3, conn,1,1
- rs3.PageSize = RecordPerPage
- Tol = rs3.PageCount
- If Not(rs3.EOF) Then
- rs3.AbsolutePage = absPageNum
- End If
- if rs3.eof then
- response.write("<li>该分类还没有影片<li>没找到你要的影片")
- else
- For absRecordNum = 1 to rs3.PageSize
- numRs3id=rs3("id")
- strRs3name=rs3("name")
- dateRs3time=rs3("dateRtime")
- imgRs3commend=("<img src='images/"&rs3("strCommend")&"'>")
- if rs3("strDemo")<>"" then
- strRs3demo=("<a href='"&rs3("strDemo")&"' target=_blank>演示</a>")
- else
- strRs3demo=("<font color='#C0C0C0'>演示</font>")
- end if
- strRs3big=rs3("strBig")
- strRs3sort=rs3("strSort")
- if len(rs3("strShow"))>numShows_1 then
- strRs3show=left(rs3("strShow"),numShows_1) & "..."
- else
- strRs3show=rs3("strShow")
- end if
- strRs3size=rs3("strSize")
- strRs3count=("今日观看:"&rs3("numDaydown")&" 本月观看:"&rs3("numMonthdown")&" 总观看:"&rs3("numDowncount")&" 总浏览:"&rs3("numCounters"))
- if boolHide_1=true then
- if rs3("boolHide")=true then
- strRs3hide=(" <img align='absmiddle' border='0' src='./images/regsoft.gif' alt='观看资金"&rs3("numMoneys")&strMoneyname_1&"(虚拟币)'>")
- else
- strRs3hide=""
- end if
- end if
- response.write("<table width=""95%"" align=""center"" border=""0"" cellpadding=""3"" cellspacing=""2"" bgcolor=""#EEEEEE"">"& vbCRLF & _
- "<tr align=""center"" bgcolor=""#E0E0E0"">"& vbCRLF & _
- "<td width=""30%"" align=""left""><strong>影片名称和简介</strong></td>"& vbCRLF & _
- "<td width=""23%""><strong>分类</strong></td>"& vbCRLF & _
- "<td width=""22%""><strong>更新时间</strong></td>"& vbCRLF & _
- "<td width=""10%""><strong>大小</strong></td>"& vbCRLF & _
- "<td width=""10%""><strong>推荐度</strong></td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr bgcolor=""#D0D0D0"" align=""center"">"& vbCRLF & _
- "<td width=""30%""><a href='show.asp?id="&numRs3id&"'>"&strRs3name&"</a>"&strRs3hide&"</td>"& vbCRLF & _
- "<td width=""23%"">"&strRs3big&"|"&strRs3sort&"</td>"& vbCRLF & _
- "<td width=""22%"">"&dateRs3time&"</td>"& vbCRLF & _
- "<td width=""10%"">"&strRs3size&"</td>"& vbCRLF & _
- "<td width=""10%"">"&imgRs3commend&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr bgcolor=""#E0E0E0"">"& vbCRLF & _
- "<td colspan=""5"">"&strRs3show&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr bgcolor=""#D0D0D0"">"& vbCRLF & _
- "<td colspan=""5"">"&strRs3count&" "&strRs3demo&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</table><br>")
- rs3.movenext
- if rs3.eof then
- exit for
- end if
- next
- end if
- rs3.close
- set rs3=nothing
- numPagenext=absPageNum+1
- numPageup=absPageNum-1
- if numPageup<1 then
- numPageup=1
- end if
- if numPagenext>Tol then
- numPagenext=Tol
- end if
- strPageup=("[<a href='list.asp?page="&numPageup)
- strPagenext=("[<a href='list.asp?page="&numPagenext)
- if strType<>"" then
- if strRang<>"" then
- strPage=("&type="&strType&"&rang="&strRang)
- else
- strPage=("&type="&strType)
- end if
- else
- if strRang<>"" then
- if strSearch<>"" then
- strPage=("&rang="&strRang&"&KEY="&strSearch&"&TTYPE="&strTch)
- else
- strPage=("&rang="&strRang)
- end if
- else
- if strSearch<>"" then
- strPage=("&KEY="&strSearch&"&TTYPE="&strTch)
- else
- strPage=""
- end if
- end if
- end if
- strPageup=(strPageup&strPage&"'>上一页</a>]")
- strPagenext=(strPagenext&strPage&"'>下一页</a>]")
- strSelectPage=("<option value='list.asp' selected>请选择</option>")
- for i=1 to Tol
- strSelectPage=(strSelectPage&"<option value='list.asp?page="&i&strPage&"'>第"&i&"页</option>")
- next
- response.write("<form><table width='90%' border='0' align='center' cellpadding='0' cellspacing='0'>"&_
- "<tr>"&_
- "<td align='right'>"&_
- "当前页:[<font color='#FF0000'><strong>"&absPageNum&"</strong></font>]"&_
- " 共 <font color='#FF0000'><strong>"&Tol&"</strong></font>"&_
- " 页 每页:[<font color='#FF0000'><strong>"&RecordPerPage&"</strong></font>]"&_
- " "&strPageup&" "&strPagenext&" 转到"&_
- " <select name='select2' onChange='window.location=form.select2.options[form.select2.selectedIndex].value' size=1>"&strSelectPage&"</select> 页 </td></table></form><br>")
- end function
- '--------------------相关影片显示--------------------
- function strS_show()
- if IsNumeric(request.QueryString("id"))=False then
- response.write("请勿输入非法字符")
- response.end
- end if
- sql1="select download.id,download.strString,download.numSortcount from download where id="&request.QueryString("id")
- rs1=conn.execute(sql1)
- strGjz=rs1("strString")
- numSortcount=rs1("numSortcount")
- Set rs1 = Server.CreateObject("ADODB.Recordset")
- sql1="select download.id,download.name,download.dateRtime,download.strBig,download.strSort,download.numCounters,download.numDowncount,download.numDaydown,download.numMonthdown,download.strString,download.boolZhen from download where boolZhen=False and strString='"&strGjz&"'"
- rs1.open sql1,conn,1,1
- if rs1.eof then
- response.write("<li>没有相关影片")
- else
- numCount=False
- for i = 1 to numXgsoft_1
- if rs1("id")<>cint(request.QueryString("id")) then
- numRs1id=rs1("id")
- strRs1name=rs1("name")
- dateRs1time=rs1("dateRtime")
- strRs1big=rs1("strBig")
- strRs1sort=rs1("strSort")
- numRs1counters=rs1("numCounters")
- numRs1downcount=rs1("numDowncount")
- numRs1Daydown=rs1("numDaydown")
- numRs1Monthdown=rs1("numMonthdown")
- response.write("<li><a href='show.asp?id="&numRs1id&"' title='"&strRs1name&" - "&strRs1big&"|"&strRs1sort&" "&dateRs1time&"<br>今:"&numRs1Daydown&" 周:"&numRs1Monthdown&" 总:"&numRs1downcount&" 浏:"&numRs1counters&"' target=_blank>"&strRs1name&"</a>")
- numCount=True
- rs1.movenext
- if rs1.eof then
- exit for
- end if
- end if
- next
- if numCount=False then
- response.write("<li>没有相关影片")
- end if
- end if
- rs1.close
- set rs1=nothing
- end function
- '--------------------影片详细资料--------------------
- function soft_show()
- dim strSdown(4)
- if IsNumeric(request.QueryString("id"))=False then
- response.write("请勿输入非法字符")
- response.end
- end if
- sql1="update download set numCounters=numCounters+1 where id="&request.QueryString("id")
- conn.execute sql1
- sql1="select * from download where id="&request.QueryString("id")
- rs1=conn.execute(sql1)
- if rs1("boolZhen")=True then
- response.write("该影片还没有通过超级管理员的验证,您无法访问")
- response.end
- end if
- numSid=rs1("id")
- strSname=rs1("name")
- dateSRtime=rs1("dateRtime")
- strSsize=rs1("strSize")
- strSmode=rs1("strMode")
- strSroof=rs1("strRoof")
- strScommend=rs1("strCommend")
- strShomepage=rs1("strHomepage")
- if strShomepage<>"" then
- strSShomepage=("<a href='"&strShomepage&"' target=_blank>Home Page</a>")
- else
- strSShomepage=("<font color='#C0C0C0'>Home Page</font>")
- end if
- strSdemo=rs1("strDemo")
- if strSdemo<>"" then
- strSSdemo=("<a class='shadow1' href='"&strSdemo&"' target=_blank>演示</a>")
- else
- strSSdemo=("<font color='#C0C0C0'>演示</font>")
- end if
- strSpic=rs1("strPic")
- if strSpic<>"" then
- strSSpic=("<img src='"&strSpic&"' width=""154"" height=""120"">")
- else
- strSSpic=""
- end if
- strSbig=rs1("strBig")
- strSsort=rs1("strSort")
- numSsortcount=rs1("numSortcount")
- if boolUbb_1=False then
- strSshow=HTMLEncode(rs1("strShow"))
- else
- strSshow=UBBCode(rs1("strShow"))
- end if
- numScounters=rs1("numCounters")
- numSdowncount=rs1("numDowncount")
- strSdown(0)=rs1("down1")
- strSdown(1)=rs1("down2")
- strSdown(2)=rs1("down3")
- strSdown(3)=rs1("down4")
- strSdown(4)=rs1("down5")
- boolShide=rs1("boolHide")
- numSmoneys=rs1("numMoneys")
- strSadmin=rs1("strAdmins")
- strSsong=rs1("strSong")
- numSDaydown=rs1("numDaydown")
- numSMonthdown=rs1("numMonthdown")
- dateDaynow=rs1("dateDaynow")
- dateMonthnow=rs1("dateMonthnow")
- if boolShide=TRUE then
- if request.cookies("nicedown")("admin")="" then
- strSSdown=("<font color=#ff0000><b>该影片是注册影片,登陆后才能观看</b></font>")
- else
- for i= 0 to 4
- if strSdown(i)<>"" then
- strSSdown=strSSdown+("<a href='show.asp?id="&numSid&"&down="&i+1&"'>第"&i+1&"集</a> ")
- end if
- next
- strSSdown=strSSdown+("<font color=#ff0000><b>本影片观看会消耗你的虚拟钱币"&numSmoneys&strMoneyname_1&"</b></font>")
- end if
- else
- for i= 0 to 4
- if strSdown(i)<>"" then
- strSSdown=strSSdown+("<a href='show.asp?id="&numSid&"&down="&i+1&"'><font color=#ff0000><b>第"&i+1&"集</a></b></font> ")
- end if
- next
- end if
- if request.QueryString("down")<>"" then
- numDownnow=request.QueryString("down")
- if boolShide=TRUE then
- if request.cookies("nicedown")("admin")<>"" then
- strUser=request.cookies("nicedown")("admin")
- strPws=md5(request.cookies("nicedown")("pws"))
- Set rs2 = Server.CreateObject("ADODB.Recordset")
- sql2="select admin.admin,admin.pws,admin.moneyert from admin where admin='"&strUser&"'"
- rs2.open sql2,conn,1,1
- if rs2.eof then
- strSSdown=("<font color=#ff0000><b>没有该用户,无法执行观看操作</b></font>")
- else
- if clng(rs2("moneyert"))>=clng(numSmoneys) and clng(numSmoneys)>0 then
- strDownload=True
- else
- strDownload=False
- end if
- end if
- rs2.close
- set rs2=nothing
- if strDownload=True then
- sql2="update admin set moneyert=moneyert-"&numSmoneys&" where admin='"&strUser&"'"
- conn.execute sql2
- dateOLDnows=now()
- sql3="update download set numDowncount=numDowncount+1,"
- if DateDiff("d", dateDaynow, dateOLDnows)>=1 then
- if DateDiff("ww", dateMonthnow, dateOLDnows)>=1 then
- sql3=sql3&"dateDaynow='"&dateOLDnows&"',dateMonthnow='"&dateOLDnows&"',numDaydown=1,numMonthdown=1"
- else
- sql3=sql3&"dateDaynow='"&dateOLDnows&"',numDaydown=1,numMonthdown=numMonthdown+1"
- end if
- else
- sql3=sql3&"numDaydown=numDaydown+1,numMonthdown=numMonthdown+1"
- end if
- sql3=sql3&" where id="&request.QueryString("id")
- conn.execute sql3
- response.redirect strSdown(numDownnow-1)
- else
- strSSdown=("<font color=#ff0000><b>您的虚拟币不够观看本影片</b></font>")
- end if
- else
- strSSdown=("<font color=#ff0000><b>请按照正规途径观看该影片</b></font>")
- end if
- else
- dateOLDnows=now()
- sql3="update download set numDowncount=numDowncount+1,"
- if DateDiff("d", dateDaynow, dateOLDnows)>=1 then
- if DateDiff("ww", dateMonthnow, dateOLDnows)>=1 then
- sql3=sql3&"dateDaynow='"&dateOLDnows&"',dateMonthnow='"&dateOLDnows&"',numDaydown=1,numMonthdown=1"
- else
- sql3=sql3&"dateDaynow='"&dateOLDnows&"',numDaydown=1,numMonthdown=numMonthdown+1"
- end if
- else
- sql3=sql3&"numDaydown=numDaydown+1,numMonthdown=numMonthdown+1"
- end if
- sql3=sql3&" where id="&request.QueryString("id")
- conn.execute sql3
- response.redirect strSdown(numDownnow-1)
- end if
- end if
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select * from review where numSoftid="&request.QueryString("id")&" order by dateRtime desc"
- rs.open sql,conn,1,1
- if rs.eof then
- strReview="<li>还没有评论,等待你的添加哦^_^"
- else
- numLong=5
- for i= 1 to numLong
- strName=rs("strName")
- strEmail=rs("strEmail")
- numQQ=rs("numQQ")
- strView=rs("strView")
- dateRtime=rs("dateRtime")
- numAccess=rs("numAccess")
- if strEmail<>"" then
- strEmail="<a href='mailto:"&strEmail&"'><img src='images/email1.gif' border=0 title='给 "&strName&" 发送邮件'></a> "
- end if
- if numQQ<>"0" then
- numQQ="<a href='http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&numQQ&"'><img src='images/oicq.gif' border=0 title='"&numQQ&"'></a> "
- else
- numQQ=""
- end if
- strReview=strReview+"<li>["&numAccess&"]"&strView&" "&strEmail&numQQ&"<img src='images/report.gif' title='"&dateRtime&"'>"
- rs.movenext
- if rs.eof then
- exit for
- end if
- next
- end if
- strReview=strReview+"<p align='right'><a href=""#"" onClick=""MM_openBrWindow('review.asp?id="&request.QueryString("id")&"','影片评论','width=400,height=330')"" title=""影片评论"">添加/查看影片评论</a></p>"
- rs.close
- set rs=nothing
- response.write("<bgsound src='"&strSsong&"' loop='1'><table width=""95%"" border=""0"" cellpadding=""3"" cellspacing=""2"" bgcolor=""#EEEEEE"" align=""center"">"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#E0E0E0"">影片名称:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#E0E0E0"">"&strSname&"</td>"& vbCRLF & _
- "<td width=""40%"" rowspan=""10"" align=""center"">"&strSSpic&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#D0D0D0"">授权方式:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#D0D0D0"">"&strSmode&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#E0E0E0"">影片类别:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#E0E0E0"">"&strSbig&"¦"&strSsort&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#D0D0D0"">文件格式:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#D0D0D0"">"&strSroof&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#E0E0E0"">文件大小:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#E0E0E0"">"&strSsize&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#D0D0D0"">推荐程度:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#D0D0D0""><img src='./images/"&strScommend&"'></td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#E0E0E0"">更新日期:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#E0E0E0"">"&dateSRtime&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#D0D0D0"">出品公司:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#D0D0D0"">"&strSShomepage&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#E0E0E0"">影片统计:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#E0E0E0"">日:"&numSDaydown&" 周:"&numSMonthdown&" 总:"&numSdowncount&" 浏:"&numScounters&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width=""15%"" bgcolor=""#E0E0E0"">添加人员:</td>"& vbCRLF & _
- "<td width=""45%"" bgcolor=""#E0E0E0""> <a href=""#"" onClick=""MM_openBrWindow('view.asp?user="&strSadmin&"','查看资料','width=220,height=200')"" title=""查看 "&strSadmin&" 的资料"">"&strSadmin&"</a>【<a href=""#"" onClick=""MM_openBrWindow('view.asp?user="&strSadmin&"&post=add','用户评分','width=220,height=200')"" title=""给 "&strSadmin&" 送鲜花"">送鲜花</a>¦<a href=""#"" onClick=""MM_openBrWindow('view.asp?user="&strSadmin&"&post=del','用户评分','width=220,height=200')"" title=""向 "&strSadmin&" 扔鸡蛋"">扔鸡蛋</a>】</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td height=""15"" bgcolor=""#D0D0D0"">影片介绍:</td>"& vbCRLF & _
- "<td colspan=""2"" bgcolor=""#D0D0D0"">"&strSshow&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td height=""15"" bgcolor=""#E0E0E0"">观看地址:</td>"& vbCRLF & _
- "<td colspan=""2"" bgcolor=""#E0E0E0"">"&strSSdown&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td height=""15"" bgcolor=""#D0D0D0"">观看说明:</td>"& vbCRLF & _
- "<td colspan=""2"" bgcolor=""#D0D0D0"">"&strSoftshows_1&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td height=""15"" bgcolor=""#D0D0D0"">相关评论:</td>"& vbCRLF & _
- "<td colspan=""2"" bgcolor=""#D0D0D0"">"&strReview&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td colspan=""3"" bgcolor=""#D0D0D0"" align=""center"">"&ADShowFunction(6,strADShow_1(3))&"</td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</table>")
- end function
- '--------------------列表详细信息--------------------
- function list_intor()
- sql2="select count(*) as totles,sum(numCounters) as tcount,sum(numDowncount) as dcount from download"
- if request.QueryString("type")<>"" then
- sql2=sql2&" where numSortcount="&request.QueryString("type")
- end if
- rs2=conn.execute(sql2)
- numTotles=rs2("totles")
- numTcount=rs2("tcount")
- numDcount=rs2("dcount")
- if request.QueryString("type")<>"" then
- strQuer="&type="&request.QueryString("type")
- else
- strQuer=""
- end if
- response.write("<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""2"">"&_
- "<tr>"&_
- "<td width=""35%"">影片数量:</td>"&_
- "<td width=""65%"">"&numTotles&"</td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width=""35%"">观看浏览:</td>"&_
- "<td width=""65%"">"&numDcount&"/"&numTcount&"</td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width=""35%"" valign=""top"">显示排列:</td>"&_
- "<td width=""65%""><a href='list.asp?rang=id"&strQuer&"'>序</a>|<a href='list.asp?rang=dateRtime"&strQuer&"'>时</a>|<a href='list.asp?rang=numCounters"&strQuer&"'>浏</a>|<a href='list.asp?rang=numDowncount"&strQuer&"'>下</a>|<a href='list.asp?rang=strCommend"&strQuer&"'>推</a></td>"&_
- "</tr>"&_
- "</table>")
- end function
- '-------------------EMAIL判定-----------------
- function IsValidEmail(email)
- dim names, name, i, c
- 'Check for valid syntax in an email address.
- IsValidEmail = true
- names = Split(email, "@")
- if UBound(names) <> 1 then
- IsValidEmail = false
- exit function
- end if
- for each name in names
- if Len(name) <= 0 then
- IsValidEmail = false
- exit function
- end if
- for i = 1 to Len(name)
- c = Lcase(Mid(name, i, 1))
- if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
- IsValidEmail = false
- exit function
- end if
- next
- if Left(name, 1) = "." or Right(name, 1) = "." then
- IsValidEmail = false
- exit function
- end if
- next
- if InStr(names(1), ".") <= 0 then
- IsValidEmail = false
- exit function
- end if
- i = Len(names(1)) - InStrRev(names(1), ".")
- if i <> 2 and i <> 3 then
- IsValidEmail = false
- exit function
- end if
- if InStr(email, "..") > 0 then
- IsValidEmail = false
- end if
- end function
- '--------------------首页统计详细信息--------------------
- function index_intor()
- sql2="select count(*) as totles,sum(numCounters) as tcount,sum(numDowncount) as dcount from download"
- if request.QueryString("type")<>"" then
- sql2=sql2&" where numSortcount="&request.QueryString("type")
- end if
- rs2=conn.execute(sql2)
- numTotles=rs2("totles")
- numTcount=rs2("tcount")
- numDcount=rs2("dcount")
- if request.QueryString("type")<>"" then
- strQuer="&type="&request.QueryString("type")
- else
- strQuer=""
- end if
- response.write("<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""2"">"&_
- "<tr>"&_
- "<td width=""35%"">影片数量:</td>"&_
- "<td width=""65%"">"&numTotles&"</td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width=""35%"">观看浏览:</td>"&_
- "<td width=""65%"">"&numDcount&"/"&numTcount&"</td>"&_
- "</tr>"&_
- "</table>")
- end function
- '---------------判定服务器支持的E-MAIL组件-----------
- function pop_email(Objs)
- On Error Resume Next
- pop_email = False
- Err = 0
- Dim Test_email
- Set Test_email = Server.CreateObject(Objs)
- If 0 = Err Then pop_email = True
- Set Test_email = Nothing
- Err = 0
- End Function
- '--------------------用户操作--------------------
- function reg()
- select case request.QueryString("post")
- case "reg"
- if boolRegs_1=False then
- response.write("对不起,暂时无法注册新用户")
- response.end
- end if
- dim Reg_set(5)
- if request.QueryString("save")="ok" then
- for i= 0 to 5
- if request.form("Reg_"&i&"")="" then
- strErrRegs="<li>请填写所有必须选项"
- else
- if i=2 then
- if request.form("Reg_2")<>Reg_set(1) then
- strErrRegs=strErrRegs+"<li>2次输入的密码不符,请重新输入"
- end if
- end if
- if i=5 then
- if IsValidEmail(request.form("Reg_"&i&""))=False then
- strErrRegs=strErrRegs+"<li>E-MAIL输入格式不正确"
- end if
- end if
- Reg_set(i)=request.form("Reg_"&i&"")
- end if
- next
- if strErrRegs<>"" then
- response.write("<tr>"&_
- "<td width='100%' align='center'>"&strErrRegs&"<br><a href=javascript:history.back(-1)>点击返回→</a></td>"&_
- "</tr>")
- else
- sql="select count(id) as numAdmin from admin where admin='"&Reg_set(0)&"'"
- rs=conn.execute(sql)
- if rs("numAdmin")>="1" then
- response.write("<tr>"&_
- "<td width='100%' align='center'><li>输入的用户名已被人使用,请更换<br><a href=javascript:history.back(-1)>点击返回→</a></td>"&_
- "</tr>")
- else
- sql="insert into admin(admin,pws,regemail,useravatar,picwidth,picheight,moneyert,strQuest,strPrint,qx) values('"&Reg_set(0)&"','"&md5(Reg_set(1))&"','"&Reg_set(5)&"','images/pic/noavatar.gif',100,75,"&numMoneys_1&",'"&Reg_set(3)&"','"&md5(Reg_set(4))&"',5)"
- conn.execute sql
- response.write("<tr>"&_
- "<td width='100%' align='center'>注册完成<br><a href=javascript:window.close()>关闭窗口</a></td>"&_
- "</tr>")
- end if
- end if
- else
- dim strRegshow(5)
- strRegshow(0)="账号"
- strRegshow(1)="密码"
- strRegshow(2)="确认"
- strRegshow(3)="问题"
- strRegshow(4)="答案"
- strRegshow(5)="信箱"
- response.write("<form method='post' action='regs.asp?post=reg&save=ok' name='register'>")
- for i= 0 to 5
- if i=1 or i=2 then
- strText="password"
- else
- strText="text"
- end if
- if i=0 then
- numMaxlength="10"
- else
- numMaxlength="20"
- end if
- response.write("<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>"&strRegshow(i)&"</td>"&_
- "<td width='75%' align='center'><input type='"&strText&"' size='20' name='Reg_"&i&"' maxlength='"&numMaxlength&"'></td>"&_
- "</tr>")
- next
- response.write("<tr>"&_
- "<td width='100%' align='center' colspan='2'>"&_
- "<table border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'>"&_
- "<tr>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.submit()'>"&_
- "<img border='0' src='images/20.gif'></a></td>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.reset()'>"&_
- "<img border='0' src='images/17.gif'></a></td>"&_
- "</tr></table></td></tr></form>")
- end if
- case "log"
- if request.QueryString("save")="ok" then
- numAdminip=request.servervariables("remote_addr")
- strUser=request.form("username")
- strPas=request.form("password")
- numCookies=request.form("cookies")
- numRCopyid=request.form("copyid")
- dateTime=now()
- if strUser="" then
- strERR="使用匿名进行登陆"
- else
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select admin.admin,admin.pws,admin.qx from admin where admin='"&strUser&"'"
- rs.open sql,conn,1,1
- if rs.eof then
- strERR="使用未注册的用户账号: "&strUser&" 登陆本系统"
- else
- strRsadmin=rs("admin")
- strRspws=rs("pws")
- strRsqx=rs("qx")
- if md5(strPas)<>strRspws then
- strERR="用户账号: "&strUser&" 使用错误密码登陆本系统"
- else
- if numRCopyid="" then
- strERR="用户账号: "&strUser&" 未输入附加码进行登陆"
- else
- if cint(numRCopyid)<>cint(session("numCopyid")) then
- strERR="用户账号: "&strUser&" 登陆附加码错"
- else
- response.cookies("nicedown")("admin")=strRsadmin
- response.cookies("nicedown")("pws")=strPas
- select case numCookies
- case "day"
- response.cookies("nicedown").expires=dateadd("d","1",date())
- case "month"
- response.cookies("nicedown").expires=dateadd("d","30",date())
- case "year"
- response.cookies("nicedown").expires=dateadd("d","365",date())
- end select
- conn.execute("update admin set lastIP='"& Request.servervariables("remote_addr") &"',lastTime='"& now() &"' where admin='"& strRsadmin &"'")
- end if
- end if
- end if
- end if
- rs.close
- set rs=nothing
- end if
- if strERR<>"" then
- sql="insert into cookies(admin,ipaddress,howtime,whatdo) values('用户登陆','"&numAdminip&"','"&dateTime&"','"&strERR&"')"
- conn.execute sql
- response.write("你的操作出现错误,请检测你输入的数据。你的操作已登记,如果不是恶意操作,请不要担心^_^")
- else
- response.write("<body onunload=""window.opener.location.reload();"">"&_
- "<tr>"&_
- "<td width='100%' align='center'>登陆成功<br><a href=javascript:window.close()>关闭窗口</a></td>"&_
- "</tr>")
- end if
- else
- response.write("<form method='post' action='regs.asp?post=log&save=ok' name='register'>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>账号</td>"&_
- "<td width='75%' align='center'><input type='text' size='20' name='username'></td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>密码</td>"&_
- "<td width='75%' align='center'><input type='password' size='20' name='password'></td>"&_
- "</tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>登陆时间</td>"&_
- "<td width='75%' align='center'>"&_
- "<input type='radio' value='day' checked name='cookies'>一天"&_
- "<input type='radio' value='month' name='cookies'>一个月"&_
- "<input type='radio' value='year' name='cookies'>一年</td><tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>附加码</td>"&_
- "<td width='75%' align='center'>"&_
- "<input name=copyid type=text class=border id='copyid' size=4 maxlength=4>请填写右边的数字"&_
- "<input name=copyids type=text class=border id='copyids' size=3 style='background-color: #FFFFFF; color: #FF0000; border-style: solid; border-color: #FFFFFF' value='"&index_copyid()&"' readonly>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='100%' align='center' colspan='2'>"&_
- "<table border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'>"&_
- "<tr>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.submit()'>"&_
- "<img border='0' src='images/20.gif'></a></td>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.reset()'>"&_
- "<img border='0' src='images/17.gif'></a></td>"&_
- "</tr></table></td></tr></form>")
- end if
- case "lost"
- if request.QueryString("save")="ok" then
- strSend=request.form("username")
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select admin.admin,admin.pws,admin.regemail,admin.strQuest from admin where admin='"&strSend&"'"
- rs.open sql,conn,1,1
- if rs.eof then
- response.write("没有该用户")
- rs.close
- set rs=nothing
- exit function
- else
- strUser=rs("admin")
- strPws=rs("pws")
- strSend=rs("regemail")
- strQuest=rs("strQuest")
- end if
- rs.close
- set rs=nothing
- if request.QueryString("quest")="pass" then
- numPws=request.form("pws")
- numRpws=request.form("rpws")
- if numPws<>numRpws then
- response.write("两次输入的密码不一致,请返回重填<a href=javascript:history.back(-1)>→</a>")
- exit function
- else
- strUser=request.form("username")
- strPrint=md5(request.form("strPrint"))
- sql="select admin.admin,admin.strPrint from admin where admin='"&strUser&"'"
- rs=conn.execute(sql)
- strRprint=rs("strPrint")
- set rs=nothing
- if strPrint<>strRprint then
- response.write("问题回答错误,请返回重填<a href=javascript:history.back(-1)>→</a>")
- exit function
- else
- sql="update admin set pws='"&md5(numRpws)&"' where admin='"&strUser&"'"
- conn.execute sql
- response.write("密码更新完成,请<a href=javascript:window.close()>关闭窗口</a>")
- exit function
- end if
- end if
- else
- response.write("<form method='post' action='regs.asp?post=lost&save=ok&quest=pass' name='register'>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>账号</td>"&_
- "<td width='75%' align='center'><input type='text' size='20' name='username' value='"&strUser&"' readonly></td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>问题</td>"&_
- "<td width='75%' align='center'>"&strQuest&"</td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>回答</td>"&_
- "<td width='75%' align='center'><input type='text' size='20' name='strPrint'></td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>新密码</td>"&_
- "<td width='75%' align='center'><input type='password' size='20' name='pws'></td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>确认</td>"&_
- "<td width='75%' align='center'><input type='password' size='20' name='rpws'></td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='100%' align='center' colspan='2'>"&_
- "<table border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'>"&_
- "<tr>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.submit()'>"&_
- "<img border='0' src='images/20.gif'></a></td>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.reset()'>"&_
- "<img border='0' src='images/17.gif'></a></td>"&_
- "</tr></table></td></tr></form>")
- end if
- else
- response.write("<form method='post' action='regs.asp?post=lost&save=ok' name='register'>"&_
- "<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>账号</td>"&_
- "<td width='75%' align='center'><input type='text' size='20' name='username'></td>"&_
- "</tr>"&_
- "<tr>"&_
- "<td width='100%' align='center' colspan='2'>"&_
- "<table border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'>"&_
- "<tr>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.submit()'>"&_
- "<img border='0' src='images/20.gif'></a></td>"&_
- "<td width='50%' align='center'>"&_
- "<a href='javascript:document.register.reset()'>"&_
- "<img border='0' src='images/17.gif'></a></td>"&_
- "</tr></table></td></tr></form>")
- end if
- case "edit"
- do_ing()
- if request.QueryString("save")="ok" then
- if request.form("Edit_2")<>"" then
- strEdit_2=request.form("Edit_2")
- strEdit_3=request.form("Edit_3")
- if strEdit_2<>strEdit_3 then
- strErr=strErr+"<li>两次输入的密码不一致,请返回重新输入"
- else
- strEdit_pws=md5(strEdit_3)
- end if
- else
- strEdit_pws=request.form("Edit_1")
- end if
- if IsValidEmail(request.form("Edit_4"))=false then
- strErr=strErr+"<li>邮件地址出错"
- else
- strEdit_4=request.form("Edit_4")
- end if
- if request.form("Edit_5")="" then
- strErr=strErr+"<li>密码提示问题不能为空"
- else
- strEdit_5=request.form("Edit_5")
- end if
- if request.form("Edit_6")="" then
- strErr=strErr+"<li>密码提示答案不能为空"
- else
- set rs=conn.execute("select * from admin where admin='"&request.cookies("nicedown")("admin")&"'")
- if rs("strPrint")=request.form("Edit_6") then
- strEdit_6=request.form("Edit_6")
- else
- strEdit_6=md5(request.form("Edit_6"))
- end if
- end if
- if request.form("Edit_7")="" then
- strEdit_7="images/pic/noavatar.gif"
- else
- strEdit_7=request.form("Edit_7")
- end if
- if request.form("Edit_8")="" or request.form("Edit_9")="" then
- strErr=strErr+"<li>自定义头像的高宽不能为空"
- else
- if IsNumeric(request.form("Edit_8"))=False or IsNumeric(request.form("Edit_9"))=False then
- strErr=strErr+"<li>自定义头像的高宽必须为数字类型"
- else
- if cint(request.form("Edit_8"))>cint(numImgsize1_1) or cint(request.form("Edit_9"))>cint(numImgsize2_1) then
- strErr=strErr+"<li>自定义头像的高宽不能超过最大值"
- else
- strEdit_8=request.form("Edit_8")
- strEdit_9=request.form("Edit_9")
- end if
- end if
- end if
- if strErr<>"" then
- response.write(strErr&"<div align=""center""><a href=javascript:history.back(-1)>返回重新输入</a></div>")
- else
- sql="update admin set pws='"&strEdit_pws&"',regemail='"&strEdit_4&"',useravatar='"&strEdit_7&"',picwidth='"&strEdit_8&"',picheight='"&strEdit_9&"',strQuest='"&strEdit_5&"',strPrint='"&strEdit_6&"' where admin='"&request.cookies("nicedown")("admin")&"'"
- conn.execute sql
- response.write("<body onunload=""window.opener.location.reload();"">"&_
- "修改资料完成,请<a href=javascript:window.close()>关闭窗口</a>")
- exit function
- end if
- else
- dim strEditshow(7)
- strEditshow(0)="账号"
- strEditshow(1)="密码"
- strEditshow(2)="新密码"
- strEditshow(3)="确认"
- strEditshow(4)="信箱"
- strEditshow(5)="问题"
- strEditshow(6)="答案"
- strEditshow(7)="头像"
- strCookies=request.cookies("nicedown")("admin")
- strPws=request.cookies("nicedown")("pws")
- sql="select * from admin where admin='"&strCookies&"'"
- rs=conn.execute(sql)
- dim strSqlshow(7)
- strSqlshow(0)=request.cookies("nicedown")("admin")
- strSqlshow(1)=md5(request.cookies("nicedown")("pws"))
- strSqlshow(2)=""
- strSqlshow(3)=""
- strSqlshow(4)=rs("regemail")
- strSqlshow(5)=rs("strQuest")
- strSqlshow(6)=rs("strPrint")
- strSqlshow(7)=rs("useravatar")
- numPicheight=rs("picheight")
- numPicwidth=rs("picwidth")
- set rs=nothing
- response.write("<form method='post' action='regs.asp?post=edit&save=ok' name='edit'>")
- for i= 0 to 7
- if i=1 or i=2 or i=3 then
- strText="password"
- else
- strText="text"
- end if
- if i=0 then
- numMaxlength="10"
- else
- if i=7 then
- numMaxlength="255"
- else
- numMaxlength="20"
- end if
- end if
- if i=0 or i=1 then
- strMessage="readonly"
- else
- strMessage=""
- end if
- response.write("<tr>"&_
- "<td width='25%' align='center'><p style='margin-top: 2'>"&strEditshow(i)&"</td>"&_
- "<td width='75%' align='center'><input type='"&strText&"' size='20' name='Edit_"&i&"' maxlength='"&numMaxlength&"' "&strMessage&" value='"&strSqlshow(i)&"'></td>"&_
- "</tr>")
- next
- response.write("<tr>"& vbCRLF & _
- "<td width='25%' align='center'>大小("&numImgsize1_1&"*"&numImgsize2_1&")</td>"& vbCRLF & _
- "<td width='75%' align='center'>宽:<input type='text' size='3' name='Edit_8' maxlength='3' value='"&numPicwidth&"'> 高:<input type='text' size='3' name='Edit_9' maxlength='3' value='"&numPicheight&"'> <a href=""#"" onClick=""window.open('upload.asp','上传头像','width=400,height=30')"" title=""上传头像"">上传头像</a></td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width='100%' align='center' colspan='2'>"& vbCRLF & _
- "<table border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'>"& vbCRLF & _
- "<tr>"& vbCRLF & _
- "<td width='50%' align='center'><a href='javascript:document.edit.submit()'><img border='0' src='images/20.gif'></a></td>"& vbCRLF & _
- "<td width='50%' align='center'><a href='javascript:document.edit.reset()'><img border='0' src='images/17.gif'></a></td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</table></td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</form>")
- end if
- case "leave"
- do_ing()
- response.cookies("nicedown")("admin")=""
- response.cookies("nicedown")("pws")=""
- response.write("<body onunload=""window.opener.location.reload();"">"&_
- "<tr>"&_
- "<td width='100%' align='center'>退出成功<br><a href=javascript:window.close()>关闭窗口</a></td>"&_
- "</tr>")
- case "help"
- %>
- <li>如何观看影片?</li>
- <p>观看影片分两种类型:会员影片和非会员影片.非会员影片只需点击相应的影片页面中的观看地址即可,如有特殊情况请留意相关页面的观看说明;会员影片必须注册后才会显示观看地址,同时会有观看虚拟金币消耗数,如未达到相应的虚拟金币则无法观看!</p>
- <li>我必须要注册吗?</li>
- <p>不是一定要求注册,但是某些会员影片在未注册状态下无法观看.同时注册更有利于网站管理者的查询于管理.</p>
- <li>注册后能否观看会员影片?</li>
- <p>会员影片只有会员达到一定的虚拟币方能实现影片的观看.</p>
- <li>如何获得虚拟金币?</li>
- <p>获得虚拟币的方法为购买<font color=#ff0000><b>天峰网吧会员卡</b></font>.</p>
- <li>如何才能添加/推荐影片?</li>
- <p>可以向网站管理员提出申请,待申请批准后就可进入管理页面进行影片的添加和推荐.</p>
- <li>如何登陆?</li>
- <p>点击左边的会员登陆,依次输入相关的帐号,密码和验证码即可.请注意为了防止您的注册资料泄漏,请退出网站时点击"退"来退出程序的使用.</p>
- <li>程序是否使用Cookies?</li>
- <p>是的,程序使用Cookies来记录个人的帐号相关信息,所以为了防止注册资料泄漏,请退出网站时点击"退"来退出程序的使用.</p>
- <li>如何使用和上传个性头像?</li>
- <p>根据管理员的设定来决定是否可以使用/上传头像,使用头像只需在注册或者编辑自己的资料时在头像该栏填入相应的头像地址即可;如果管理员允许上传头像只需点击上传头像并选择本地的头像图片文件,然后点击上传后即可,此时程序会自动填入刚上传的头像地址,无需更改.</p>
- <li>遗忘密码如何解决?</li>
- <p>遗忘密码的解决办法暂时只有注册时所填写的问题和答案.因为本程序使用不可逆算的MD5加密方式加密用户密码和问题答案,所以请牢记用户密码和问题答案,在忘记密码时只要记住问题答案就可重新设定用户密码,如果连问题答案都忘记了真是爱莫能助了.</p>
- <li>如何搜索我需要的影片?</li>
- <p>可以使用首页或者相关页面的影片搜索栏,填入你想要搜索的内容,然后选择搜索的范围,点击确定即可.</p>
- <li>我能成为管理员吗?</li>
- <p>这个可以通过联系该网站的管理员,在该网站的管理员通过你的验证之后则会更改你的权限.</p>
- <li>在哪里可以联系到网站管理员?</li>
- <p>你可以到南阳市建设中路<font color=#ff0000><b>天峰网吧</b></font>找到系统管理员,或者QQ35325750联系!也可以到<a href="http://tianfeng.xicp.net">天峰网络</a>留言版给站长留言。</p>
- <%
- end select
- end function
- '--------------------用户登陆--------------------
- function user_login()
- if request.cookies("nicedown")("admin")="" then
- boolLogin=False
- else
- strCookies=request.cookies("nicedown")("admin")
- strPws=request.cookies("nicedown")("pws")
- Set rs2 = Server.CreateObject("ADODB.Recordset")
- sql2="SELECT admin.admin,admin.pws FROM admin where admin='"&strCookies&"'"
- rs2.OPEN sql2, Conn,1,1
- strRscpws=rs2("pws")
- if rs2.eof then
- boolLogin=False
- else
- if strRscpws<>md5(strPws) then
- boolLogin=False
- else
- boolLogin=True
- strUser=rs2("admin")
- conn.execute("update admin set lastIP='"& Request.servervariables("remote_addr") &"',lastTime='"& now() &"' where admin='"& rs2("admin") &"'")
- end if
- end if
- rs2.close
- set rs2=nothing
- end if
- if boolLogin=True then
- response.write("天峰欢迎您,<strong><font color=""#FF0000"">"&strUser&"</font></strong> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=log','用户登陆','width=350,height=130')"" title=""重新登陆你的帐号"">重</a> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=edit','修改资料','width=350,height=250')"" title=""修改已注册的用户资料"">修</a> <a href=""admin/list.asp"" target=""_blank"" title=""管理/编辑自己发布的程序"">管</a> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=help','帮助主题','width=350,height=400,scrollbars=yes')"" title=""提供帮助"">帮</a> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=leave','退出程序','width=350,height=50')"" title=""为避免您的安全问题请退出程序"">退</a>")
- else
- response.write("<a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=reg','欢迎注册','width=350,height=180')"" title=""注册用户账号"">注册账号</a> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=log','用户登陆','width=350,height=130')"" title=""使用注册账号登陆"">用户登陆</a> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=lost','忘记密码','width=350,height=150')"" title=""找回忘记的密码"">忘记密码</a> <a href=""#"" onClick=""MM_openBrWindow('regs.asp?post=help','帮助主题','width=350,height=400,scrollbars=yes')"" title=""提供帮助"">提供帮助</a>")
- end if
- end function
- '--------------------执行判定--------------------
- function do_ing()
- if request.cookies("nicedown")("admin")="" then
- response.write("您不是会员或者还没有登陆,无法执行该操作")
- response.end
- else
- strCookies=request.cookies("nicedown")("admin")
- strPws=md5(request.cookies("nicedown")("pws"))
- Set rs2 = Server.CreateObject("ADODB.Recordset")
- sql2="SELECT admin.admin,admin.pws FROM admin where admin='"&strCookies&"'"
- rs2.OPEN sql2, Conn,1,1
- strRscpws=rs2("pws")
- if rs2.eof then
- response.write("您不是会员或者还没有登陆,无法执行该操作")
- response.end
- else
- if strPws<>strRscpws then
- response.write("您的用户名或者密码出错,无法执行该操作")
- response.end
- end if
- end if
- rs2.close
- set rs2=nothing
- end if
- end function
- '-------------------广告显示(函数)-----------------
- function ADShowFunction(numString,numShows)
- dim FunNumBanner(),FunManBanner()
- FunNumString=numString
- FunNumShows=numShows
- redim FunNumBanner(FunNumShows-1),FunManBanner(FunNumShows-1)
- set rs=conn.execute("select sum(numFirstShow) as SunNumFirstShow from ad where numPlace="& FunNumString)
- FunNumAll=rs("SunNumFirstShow")
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="SELECT * FROM ad where numPlace="& FunNumString
- rs.OPEN sql, Conn,1,1
- if rs.eof then
- select case FunNumString
- case "9"
- ADShowFunction=""
- case "4"
- ADShowFunction="<div id=""dd"" style=""visibility: hidden;""></div>"
- case else
- ADShowFunction="此广告位待租"
- end select
- rs.close
- set rs=nothing
- exit function
- else
- randomize
- for i=0 to FunNumShows-1
- FunNumBanner(i)=Int( Rnd * FunNumAll ) + 1
- FunSumBanner=0
- rs.movefirst
- do while not rs.eof
- FunSumBanner=FunSumBanner+rs("numFirstShow")
- if FunSumBanner>=FunNumBanner(i) then
- FunManBanner(i)=rs("id")
- if i<>0 then
- for x=0 to i-1
- if FunManBanner(i)=FunManBanner(x) then
- blone="True"
- exit for
- else
- blone="False"
- end if
- next
- if blone="True" then
- i=i-1
- end if
- end if
- exit do
- end if
- rs.movenext
- loop
- next
- end if
- rs.close
- set rs=nothing
- for i=0 to FunNumShows-1
- conn.execute("update ad set numShow=numShow+1 where id="& FunManBanner(i))
- set rs=conn.execute("select * from ad where id="& FunManBanner(i))
- if rs("boolADjs")=False then
- select case FunNumString
- case "1"
- ADShowFunction=ADShowFunction &"<a href=""banner.asp?id="& rs("id") &""" target=_blank><img src="""& rs("strImTeAD") &""" alt="""& rs("strADTitle") &""" border=""0""></a>"
- case "2"
- ADShowFunction=ADShowFunction &"<a href=banner.asp?id="& rs("id") &" target=_blank alt="& rs("strADTitle") &">"& rs("strImTeAD") &"</a><br>"
- case "4"
- ADShowFunction="<div id=""dd"" style=""position:absolute; left:28px; top:90px; width:100px; height:100px; z-index:1""><a href=banner.asp?id="& rs("id") &" target=_blank><img src="""& rs("strImTeAD") &""" alt="""& rs("strADTitle") &""" border=""0""></a></div>"
- case "9"
- ADShowFunction=ADShowFunction &"<script language='JavaScript'>window.open('banner.asp?id="& rs("id") &"') ;</script>"
- case else
- ADShowFunction=ADShowFunction &"<a href=""banner.asp?id="& rs("id") &""" target=_blank><img src="""& rs("strImTeAD") &""" alt="""& rs("strADTitle") &""" border=""0""></a><br><br>"
- end select
- else
- select case FunNumString
- case "1"
- ADShowFunction=ADShowFunction & rs("strADurl")
- case "2"
- ADShowFunction=ADShowFunction & rs("strADurl") &"<br>"
- case "4"
- ADShowFunction="<div id=""dd"" style=""position:absolute; left:28px; top:90px; width:100px; height:100px; z-index:1"">"& rs("strADurl") &"</div>"
- case "9"
- ADShowFunction=ADShowFunction &"<script language='JavaScript'>window.open('banner.asp?id="& rs("id") &"') ;</script>"
- case else
- ADShowFunction=ADShowFunction & rs("strADurl") &"<br><br>"
- end select
- end if
- next
- end function
- '------------------受限制IP禁止访问函数-----------------
- function iperr()
- IPaddress=Request.servervariables("remote_addr")
- strIPaddress=Split(IPaddress,".")
- Set ms =Server.CreateObject("ADODB.Recordset")
- msql="select * from ip"
- ms.open msql,conn,1,1
- do while not ms.eof
- numIP=int(ms("numIP")-1)
- strAllIPaddress=""
- for i=0 to UBound(strIPaddress)
- if i>numIP then
- if i=UBound(strIPaddress) then
- strAllIPaddress=strAllIPaddress&"*"
- else
- strAllIPaddress=strAllIPaddress&"*."
- end if
- else
- if i=UBound(strIPaddress) then
- strAllIPaddress=strAllIPaddress+strIPaddress(i)
- else
- strAllIPaddress=strAllIPaddress+strIPaddress(i)&"."
- end if
- end if
- next
- if cstr(strAllIPaddress)=cstr(ms("strIPaddress")) then
- Response.Redirect "errip.htm"
- end if
- ms.movenext
- loop
- ms.close
- set ms=nothing
- end function
- '------------------首页显示友情连接-----------------
- function link_show()
- Set ms =Server.CreateObject("ADODB.Recordset")
- msql="select * from link where boolLinText=False and boolLinShow=True order by dateTimers desc"
- ms.open msql,conn,1,1
- if ms.eof then
- response.write("<tr align='center'><td colspan='2'>还没有LOGO友情连接</td></tr>")
- else
- response.write("<tr align=""center"">")
- for i=1 to 6
- if ms.eof then
- response.write("<td width=""50%""> </td>")
- else
- if ms("boolLinJs")=True then
- response.write("<td width=""50%"">"& ms("strLinTitle") &"</td>")
- else
- response.write("<td width=""50%""><a href=""link.asp?id="& ms("id") &""" target=""_blank""><img src="""& ms("strLinPic") &""" alt=""网站名称:"& ms("strLinName") &"<br>加入时间:"& ms("dateTimers") &"<br>点 击 数:"& ms("numLinDown") &"<br>网站介绍:"& ms("strLinTitle") &""" border=""0""></a></td>")
- end if
- ms.movenext
- end if
- if i mod 2=0 then
- response.write("</tr><tr align=""center"">")
- end if
- next
- response.write("</tr>")
- end if
- ms.close
- set ms=nothing
- response.write("<tr align=""center""><td colspan='2' align='center'>")
- Text_Link_Show()
- response.write("</td></tr>")
- response.write("<tr align='center'><td colspan='2' align='right'>【<a href=link.asp?post=add target=_blank>申请连接</a>】 <a href=link.asp target=_blank>更多连接>></a></td></tr>")
- end function
- '----------------文本友情连接---------------
- function Text_Link_Show()
- response.write("<form><select name=TextLink onChange=""window.open(form.TextLink.options[form.TextLink.selectedIndex].value)""><option value='#'>文本友情连接</option>")
- Set ms =Server.CreateObject("ADODB.Recordset")
- msql="select * from link where boolLinText=True and boolLinShow=True order by dateTimers desc"
- ms.open msql,conn,1,1
- if ms.eof then
- response.write("<option value='#'>还没有文本友情连接</option>")
- else
- do while not ms.eof
- response.write("<option value='link.asp?id="& ms("id") &"'>"& ms("strLinName") &"</option>")
- ms.movenext
- loop
- end if
- ms.close
- set ms=nothing
- response.write("</select></form>")
- end function
- '----------------显示当前所在分类位置-----------------
- function list_now()
- strType=Request.QueryString("type")
- if IsNumeric(strType)=True and cint(strType)<>"0" then
- set rs=conn.execute("select * from small where id="& cint(strType))
- response.write("当前位置:<a href=index.asp>视频首页</a> → "& rs("sortid") &" → ")
- else
- response.write("当前位置:<a href=index.asp>视频首页</a> → 全部分类 转跳:")
- end if
- end function
- '----------------显示当前所在影片位置-----------------
- function show_now()
- strId=Request.QueryString("id")
- set rs=conn.execute("select * from small where id in (select numSortcount from download where id="& strId &")")
- response.write("当前位置:<a href=index.asp>视频首页</a> → "& rs("sortid") &" → <a href=list.asp?type="& rs("id") &">"& rs("small") &"</a> → 影片页面")
- end function
- '----------------测试------------------
- function show_zoom(strName,numSortAll,numCount,numLongName,numClass)
- name=strName'显示类别
- sortall=numSortAll'显示分类号
- mCount=numCount'显示数量
- mLongname=numLongName'显示的字符长度
- mClass=numClass'显示类型
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.CursorType = adOpenStatic
- rs.CacheSize = cint(mCount)
- sql="select * from download"
- select case name
- case "news"
- if sortall<>"" then
- sql=sql&" where boolZhen=False and numSortcount="&sortall
- else
- sql=sql&" where boolZhen=False"
- end if
- sql=sql&" order by dateRtime desc"
- case "down"
- if sortall<>"" then
- sql=sql&" where boolZhen=False and numSortcount="&sortall
- else
- sql=sql&" where boolZhen=False"
- end if
- sql=sql&" order by numDowncount desc"
- case "days"
- sql=sql&" where boolZhen=False order by numDaydown desc"
- case "months"
- sql=sql&" where boolZhen=False order by numMonthdown desc"
- end select
- rs.OPEN sql, Conn,1,1
- if rs.eof then
- response.write("无内容")
- else
- For absRecordNum = 1 to mCount
- numZid=rs("id")
- longname=rs("name")
- if len(longname)>mLongname then
- longname=left(longname,mLongname) & "..."
- end if
- strZbig=rs("strBig")
- strZsort=rs("strSort")
- dateZtime=rs("dateRtime")
- numZday=rs("numDaydown")
- numZmonth=rs("numMonthdown")
- numZdown=rs("numDowncount")
- numZcount=rs("numCounters")
- numZsort=rs("numSortcount")
- if mClass="1" then
- response.write("<li><a href="""&addess&"show.asp?id="&numZid&""" title="""&longname&" - "&strZbig&"|"&strZsort&" "&dateZtime&"<br>今:"&numZday&" 周:"&numZmonth&" 总:"&numZdown&" 浏:"&numZcount&""" target=_blank>"&longname&"</a>")
- else
- response.write("<li>[<a href="""&addess&"list.asp?type="&numZsort&""">"&strZsort&"</a>] <a href="""&addess&"show.asp?id="&numZid&""" title="""&longname&" - "&strZbig&"|"&strZsort&" "&dateZtime&"<br>今:"&numZday&" 周:"&numZmonth&" 总:"&numZdown&" 浏:"&numZcount&""" target=_blank>"&longname&"</a>")
- end if
- rs.movenext
- If rs.EOF Then
- Exit For
- End If
- Next
- end if
- rs.close
- set rs=nothing
- end function
- %>
- <%
- '如果你美化的漂亮或者修正了最多只可以同时添加5集和不能修改用户虚拟币的BUG记得联系一下网络游子哟~!我的QQ35325750或者1006389
- %>