function.asp
资源名称:1.rar [点击查看]
上传用户:ziqing_518
上传日期:2022-08-09
资源大小:446k
文件大小:73k
源码类别:
多媒体编程
开发平台:
ASP/ASPX
- <%
- '如果你美化的漂亮或者修正了最多只可以同时添加5集和不能修改用户虚拟币的BUG记得联系一下网络游子哟~!我的QQ35325750或者1006389
- %>
- <%
- Response.Expires=0
- '--------------------附加码--------------------
- function index_copyid()
- Randomize
- session("numCopyid")=Int((9999 - 1000 + 1) * Rnd + 1000)
- Response.Write(session("numCopyid"))
- end function
- '--------------------登陆判定--------------------
- function index_creak()
- 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
- set rs4=conn.execute("select * from config where id="&int(strRsqx))
- if rs4("boolAdmin")=False 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='"& numAdminip &"',lastTime='"& dateTime &"' where admin='"&strUser&"'")
- end if
- end if
- end if
- rs4.close
- set rs4=nothing
- 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.Redirect "list.asp"
- end if
- end function
- '--------------------显示影片列表--------------------
- function list_show()
- 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 = cint(numSofts_1)
- 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 = cint(numSofts_1)
- Tol = rs3.PageCount
- If Not(rs3.EOF) Then
- rs3.AbsolutePage = absPageNum
- End If
- if rs3.eof then
- response.write("<form name=""strDelForm"" method=""post"" action=""edit.asp?post=del"">该分类还没有影片")
- 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
- strRs3count=("<a href='#' title='浏:"&rs3("numCounters")&" 总:"&rs3("numDowncount")&" 月:"&rs3("numMonthdown")&" 日:"&rs3("numDaydown")&"'>影片统计</a>")
- 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("<form name=""strDelForm"" method=""post"" action=""edit.asp?post=del""><table width='90%' border='0' cellpadding='2' cellspacing='1' bgcolor='#000000'>"&_
- "<tr bgcolor='#bcbcbc'>"&_
- "<td colspan='2' bgcolor='#bcbcbc'>"&_
- "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"&_
- "<tr>"&_
- "<td><input type=""checkbox"" name=""id"" value='"& numRs3id &"'><a href='../show.asp?id="&numRs3id&"' target=_blank>"&strRs3name&"</a> "&strRs3hide&"</td>"&_
- "</tr>"&_
- "</table></td>"&_
- "<td colspan='2' align='right' bgcolor='#bcbcbc'>"&_
- "<a href=""edit.asp?id="&numRs3id&"&post=edit"">编辑</a> ¦ "&_
- "<a href=""edit.asp?id="&numRs3id&"&post=del"" onclick=""{if(confirm('您确定执行的操作吗?')){return true;}return false;}"">删除</a>"&_
- "</td></tr>"&_
- "<tr bgcolor='#DBDBDB'>"&_
- "<td width='20%' align='center' bgcolor='#efefef'>更新日期</td>"&_
- "<td width='30%'>"&dateRs3time&"</td>"&_
- "<td width='20%' align='center' bgcolor='#efefef'>影片类别</td>"&_
- "<td width='30%'>"&strRs3big&"┃"&strRs3sort&"</td>"&_
- "</tr>"&_
- "<tr bgcolor='white'>"&_
- "<td colspan='4'><p style='text-indent: 40'>"&strRs3show&"</p></td>"&_
- "</tr></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("<table width='90%' border='0' align='center' cellpadding='0' cellspacing='0'>"&_
- "<tr>"&_
- "<td align='right'><a href='javascript:document.strDelForm.submit()' onclick=""{if(confirm('将删除你所选择的影片是否执行操作?')){return true;}return false;}""><img src=""../images/bbs_close.gif"" width=""21"" height=""21"" align=""absmiddle"" border=""0""></a> "&_
- "当前页:[<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 edit_aedit()
- dim strRs2down(4)
- if request.QueryString("id")<>"" then
- sql="select * from download where id="&request.QueryString("id")
- rs=conn.execute(sql)
- numRs2id=rs("id")
- strRs2name=rs("name")
- dateRs2time=rs("dateRtime")
- strRs2size=rs("strSize")
- strRs2mode=rs("strMode")
- strRs2roof=rs("strRoof")
- strRs2commend=rs("strCommend")
- strRs2homepage=rs("strHomepage")
- strRs2demo=rs("strDemo")
- strRs2pic=rs("strPic")
- strRs2big=rs("strBig")
- strRs2sort=rs("strSort")
- numRs2sortcount=rs("numSortcount")
- strRs2show=rs("strShow")
- numRs2counters=rs("numCounters")
- numRs2downcount=rs("numDowncount")
- strRs2down(0)=rs("down1")
- strRs2down(1)=rs("down2")
- strRs2down(2)=rs("down3")
- strRs2down(3)=rs("down4")
- strRs2down(4)=rs("down5")
- boolRs2hide=rs("boolHide")
- numRs2moneys=rs("numMoneys")
- strRs2admin=rs("strAdmins")
- strRs2song=rs("strSong")
- dateRs2day=rs("dateDaynow")
- dateRs2month=rs("dateMonthnow")
- numRs2day=rs("numDaydown")
- numRs2month=rs("numMonthdown")
- boolRs2commend=rs("boolCommend")
- strRs2string=rs("strString")
- set rs=nothing
- else
- numRs2id=""
- strRs2name=""
- dateRs2time=now()
- strRs2size=""
- strRs2mode=""
- strRs2roof=""
- strRs2commend=""
- strRs2homepage=""
- strRs2demo=""
- strRs2pic=""
- strRs2big=""
- strRs2sort=""
- numRs2sortcount=""
- strRs2show=""
- numRs2counters=""
- numRs2downcount=""
- strRs2down(0)=""
- strRs2down(1)=""
- strRs2down(2)=""
- strRs2down(3)=""
- strRs2down(4)=""
- boolRs2hide=false
- numRs2moneys=""
- strRs2admin=""
- strRs2song=""
- dateRs2day=""
- dateRs2month=""
- numRs2day=""
- numRs2month=""
- boolRs2commend=false
- strRs2string=""
- end if
- if boolRs2hide=true then
- if rs4("boolMoney")=False then
- response.write("该影片是注册类型,你没有权限编辑该影片")
- response.end
- exit function
- end if
- end if
- response.write("<center>"&_
- "<table cellpadding=""3"" cellspacing=""1"" bordercolor=""#000000"" bgcolor=""#000000"" width=500>"&_
- "<col width=100><col width=400>"&_
- "<tr bgcolor=#f7f7f7>"&_
- "<form action=""edit.asp?")
- if numRs2id<>"" then
- response.write("id="&numRs2id&"&")
- end if
- response.write("post=save"" method=""POST"" name=""frmAnnounce"" onSubmit=submitonce(this)>"&_
- "<td align=right>编号:</td>"&_
- "<td><input type=text name=id size=15 value='"&numRs2id&"' style='color:#000000; border:0px; background-color:#f7f7f7' readonly></td>"&_
- "</tr><tr bgcolor=#ffffff>"&_
- "<td align=right>名称:</td>"&_
- "<td><input type=text name=name size=25 value='"&strRs2name&"'>(*50字符内,'""@&特殊字符无法输入)</td>"&_
- "</tr><tr bgcolor=#f7f7f7>"&_
- "<td align=right>更新日期:</td>"&_
- "<td><input type=text name=time size=20 value='"&dateRs2time&"'></td>"&_
- "</tr><tr bgcolor=#ffffff>"&_
- "<td align=right>文件大小:</td>"&_
- "<td><input type=text name=size size=20 value='"&strRs2size&"'></td>"&_
- "</tr><tr bgcolor=#f7f7f7>"&_
- "<td align=right>授权方式:</td>"&_
- "<td><input type=text name=mode size=20 value='"&strRs2mode&"'></td>"&_
- "</tr><tr bgcolor=#ffffff>"&_
- "<td align=right>文件格式:</td>"&_
- "<td><input type=text name=roof size=20 value='"&strRs2roof&"'></td>"&_
- "</tr><tr bgcolor=#f7f7f7>"&_
- "<td align=right>推荐程度:</td>"&_
- "<td><select size=6 name=commend>")
- for i = 0 to 5
- response.write("<option value='"&i&"'")
- if strRs2commend<>"" then
- if cint(left(strRs2commend,1))=i then
- response.write(" selected")
- end if
- end if
- response.write(">"&i&" 颗星</option>")
- next
- if boolRs2commend=true then
- strCommend1="checked"
- strCommend2=""
- else
- strCommend1=""
- strCommend2="checked"
- end if
- response.write("</select>"&_
- "</td></tr>"&_
- "<tr bgcolor=#ffffff>"&_
- "<td align=right>首页推荐:</td>"&_
- "<td><input type=""radio"" value=""true"" "&strCommend1&" name=""boolCommend"">是"&_
- "<input type=""radio"" value=""false"" "&strCommend2&" name=""boolCommend"">否</td>")
- if rs4("boolMoney")=True then
- if boolHide_1=true then
- if boolRs2hide=true then
- strChecked1="checked"
- strChecked2=""
- else
- strChecked1=""
- strChecked2="checked"
- end if
- response.write("<tr bgcolor=#ffffff>"&_
- "<td align=right>注册观看:</td>"&_
- "<td><input type=""radio"" value=""true"" "&strChecked1&" name=""hide"">是"&_
- "<input type=""radio"" value=""false"" "&strChecked2&" name=""hide"">否</td></tr>"&_
- "<tr bgcolor=#f7f7f7>"&_
- "<td align=right>货币大小:</td>"&_
- "<td><input type=text name=moneys size=5 value='"&numRs2moneys&"'>(设定观看该影片所需的虚拟货币)</td>"&_
- "</tr>")
- end if
- end if
- response.write("<tr bgcolor=#ffffff>"&_
- "<td align=right>关 键 字:</td>"&_
- "<td><input type=text name=strString size=10 value='"&strRs2string&"'>(搜索相关影片,必填)</td>"&_
- "</tr>"&_
- "<tr bgcolor=#ffffff>"&_
- "<td align=right>出品公司主页:</td>"&_
- "<td><input type=text name=homepage size=50 value='"&strRs2homepage&"'></td>"&_
- "</tr><tr bgcolor=#f7f7f7>"&_
- "<td align=right>演示地址:</td>"&_
- "<td><input type=text name=demo size=50 value='"&strRs2demo&"'></td>"&_
- "</tr><tr bgcolor=#ffffff>"&_
- "<td align=right>图片地址:</td>"&_
- "<td><input type=text name=pic size=40 value='"&strRs2pic&"'>(注:大小154*120)</td>"&_
- "</tr>")
- if boolSoftsong_1=true then
- response.write("<tr bgcolor=#ffffff>"&_
- "<td align=right>背景音乐:</td>"&_
- "<td><input type=text name=song size=30 value='"&strRs2song&"'>(*只允许.mid音乐格式)</td>"&_
- "</tr>")
- end if
- response.write("<tr bgcolor=#f7f7f7>"&_
- "<td align=right>影片分类:</td>"&_
- "<td><select size=1 name=sort2id>")
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="SELECT small.id,small.small,small.sortid FROM small"
- rs.OPEN sql, Conn,1,1
- if rs.eof then
- response.write("<option value=""0"" selected>还没有分类</option>")
- else
- rs.movefirst
- strOneSmall=split(rs4("strOneSmall"),", ")
- while not rs.eof
- numSmallid=rs("id")
- if rs4("strOneSmall")<>"0" then
- for i=0 to UBound(strOneSmall)
- if numSmallid=cint(strOneSmall(i)) then
- boolSortsShow=True
- exit for
- else
- boolSortsShow=False
- end if
- next
- else
- boolSortsShow=True
- end if
- if boolSortsShow=True then
- strSmall=rs("small")
- strSortid=rs("sortid")
- if strSmall=strRs2sort then
- strTsele="selected"
- else
- strTsele=""
- end if
- response.write("<option value='"&numSmallid&"' "&strTsele&">"&_
- strSmall&"("&strSortid&")</option>")
- end if
- rs.movenext
- wend
- end if
- rs.close
- set rs=nothing
- response.write("</select></tr>"&_
- "<tr bgcolor=#ffffff>"&_
- "<td width=131 valign=top valign=top align=right>影片简介:</td>"&_
- "<td>")
- if boolUbb_1=true then
- response.write("<img border=""0"" onclick=bold() src=""../images/btg/bold.gif"" alt=""粗体"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=italicize() src=""../images/btg/italicize.gif"" alt=""斜体"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=underline() src=""../images/btg/underline.gif"" alt=""下划线"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=showcode() src=""../images/btg/code.gif"" alt=""插入代码"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=quote() src=""../images/btg/quote.gif"" alt=""引用"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=setfly() src=""../images/btg/fly.gif"" alt=""飞行字"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=glow() src=""../images/btg/glow.gif"" alt=""发光字"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=move() src=""../images/btg/move.gif"" alt=""移动字"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=shadow() src=""../images/btg/shadow.gif"" alt=""阴影字"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=list() src=""../images/btg/list.gif"" alt=""列表"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=center() src=""../images/btg/center.gif"" alt=""居中"" width=""23"" height=""22"">"&_
- "<br>"&_
- "<img border=""0"" onclick=showsize() src=""../images/btg/font.gif"" alt=""改变字体大小"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=hyperlink() src=""../images/btg/url.gif"" alt=""插入连接"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=image() src=""../images/btg/image.gif"" alt=""插入图片"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=flash() src=""../images/btg/swf.gif"" alt=""插入FLASH"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=email() src=""../images/btg/email.gif"" alt=""插入E-mail"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=showface() src=""../images/btg/smilie.gif"" alt=""心情图标"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=mp() src=""../images/btg/media.gif"" alt=""Media Player视频文件"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=rm() src=""../images/btg/real.gif"" alt=""realplay视频文件"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=qt() src=""../images/btg/qs.gif"" alt=""QuickTime视频文件"" width=""23"" height=""22"">"&_
- "<img border=""0"" onclick=sk() src=""../images/btg/shockwave.gif"" alt=""Shockwave文件"" width=""23"" height=""22"">"&_
- "<img border=""0"" src=""../images/btg/help.gif"" alt=""在线帮助"" width=""23"" height=""22"">")
- end if
- response.write("<textarea rows=8 name=brief cols=50>"&strRs2show&"</textarea>"&_
- "</td></tr>")
- if boolUnload_1=true then
- response.write("<tr bgcolor=#f7f7f7>"&_
- "<td align=right>影片上传:</td>"&_
- "<td>"&_
- "<IFRAME SRC=../soft.asp MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO WIDTH=100% HEIGHT=25></IFRAME>"&_
- "</td></tr>")
- end if
- for i= 0 to 4
- if i=0 then
- strErrmsg="(*不能为空)"
- else
- strErrmsg=""
- end if
- response.write("<tr bgcolor=#f7f7f7>"&_
- "<td align=right>第"&i+1&"集地址:</td>"&_
- "<td><input type='text' name='down"&i+1&"' size='40' value='"&strRs2down(i)&"'>"&strErrmsg&"</td>"&_
- "</tr>")
- next
- response.write("<tr bgcolor=#ffffff>"&_
- "<td width=492 colspan=2 align=center>"&_
- "<input type=submit value=提交 name=sendadd> "&_
- "<input type=reset value=重填></td>"&_
- "</form></tr></table></center>"&_
- "<div align='center'>"&_
- "<center>")
- if boolUnload_1=true then
- response.write("<table border=""0"" width=""90%"" cellspacing=""0"" cellpadding=""2"">"&_
- "<tr>"&_
- "<td width=""100%"" align=""right"">"&_
- "<font color=""#FF0000"">*</font>"&_
- "上传类型:"&strLeixin_1&" 上传大小:"&numUnsize_1*1024&"字节"&_
- "</td></tr></table>")
- end if
- response.write("</center></div><br><br>")
- end function
- '--------------------保存影片--------------------
- function edit_save()
- dim strMode(3)
- dim strRs2down(4)
- strErrmsgbox=""
- strPecial="'""@&"
- if request.form("id")<>"" then
- numRs2id=request.form("id")
- set db=conn.execute("select count(id) as numDBid from download where id="&numRs2id&" and strAdmins='"&strCookies&"'")
- if db("numDBid")>="1" then
- if rs4("boolDel")=False then
- strErrmsgbox=strErrmsgbox+"<li>对不起你没有权限编辑影片"
- end if
- else
- if rs4("boolOrtherDel")=False then
- strErrmsgbox=strErrmsgbox+"<li>对不起你没有权限编辑别人添加的影片"
- end if
- end if
- db.close
- set db=nothing
- else
- numRs2id=""
- if rs4("boolAdd")=False then
- strErrmsgbox=strErrmsgbox+"<li>对不起你没有添加影片的权限"
- end if
- end if
- if request.form("name")<>"" then
- if len(request.form("name"))>50 then
- strErrmsgbox=strErrmsgbox+"<li>输入的影片名称太长,应控制在50个字符以内"
- else
- errAddress=false
- for i= 1 to 4
- strMode(i-1)=mid(strPecial,i,1)
- if Instr(request.form("name"),strMode(i-1))>1 then
- errAddress=True
- exit for
- end if
- next
- if errAddress=True then
- strErrmsgbox=strErrmsgbox+"<li>输入的影片不得包含'""@&特殊字符"
- else
- strRs2name=request.form("name")
- end if
- end if
- else
- strErrmsgbox=strErrmsgbox+"<li>请输入影片的名称"
- end if
- if request.form("time")<>"" then
- if IsDate(request.form("time"))=False then
- strErrmsgbox=strErrmsgbox+"<li>输入的影片添加日期变量表达式类型错误"
- else
- dateRs2time=request.form("time")
- end if
- else
- dateRs2time=now()
- end if
- if request.form("size")<>"" then
- strRs2size=request.form("size")
- else
- strRs2size="不详"
- end if
- if request.form("mode")<>"" then
- strRs2mode=request.form("mode")
- else
- strRs2mode="不详"
- end if
- if request.form("roof")<>"" then
- strRs2roof=request.form("roof")
- else
- strRs2roof="不详"
- end if
- strRs2commend=(request.form("commend")&"stars.gif")
- if request.form("homepage")<>"" then
- strRs2homepage=request.form("homepage")
- else
- strRs2homepage=""
- end if
- if request.form("demo")<>"" then
- strRs2demo=request.form("demo")
- else
- strRs2demo=""
- end if
- if request.form("pic")<>"" then
- strRs2pic=request.form("pic")
- else
- strRs2pic=""
- end if
- numRs2sortcount=cint(request.form("sort2id"))
- if numRs2sortcount="0" then
- strErrmsgbox=strErrmsgbox+"<li>还没有添加影片分类,<a href=sort.asp>请添加</a>"
- else
- sql="select small.id,small.small,small.sortid from small where id="&numRs2sortcount
- rs=conn.execute(sql)
- strRs2big=rs("sortid")
- strRs2sort=rs("small")
- end if
- if request.form("brief")<>"" then
- strRs2show=replace(request.form("brief"),"'","''")
- else
- strRs2show="不详"
- end if
- for i = 0 to 4
- if i=0 then
- if request.form("down"&i+1&"")="" then
- strErrmsgbox=strErrmsgbox+"<li>观看地址1不能为空"
- exit for
- end if
- end if
- if request.form("down"&i+1&"")<>"" then
- strRs2down(i)=request.form("down"&i+1&"")
- else
- strRs2down(i)=""
- end if
- next
- if request.form("hide")="true" then
- boolRs2hide=True
- if request.form("moneys")<>"" then
- if IsNumeric(request.form("moneys"))=True then
- numRs2moneys=request.form("moneys")
- else
- strErrmsgbox=strErrmsgbox+"<li>影片观看金额变量类型错误"
- end if
- else
- strErrmsgbox=strErrmsgbox+"<li>启用影片注册功能时请务必设定影片观看金额"
- end if
- else
- boolRs2hide=False
- numRs2moneys="0"
- end if
- strRs2admin=strCookies
- if request.form("song")<>"" then
- strRs2song=request.form("song")
- else
- strRs2song=""
- end if
- if request.form("boolCommend")="true" then
- boolRs2commend=True
- else
- boolRs2commend=False
- end if
- if request.form("strString")<>"" then
- strRs2string=request.form("strString")
- else
- strErrmsgbox=strErrmsgbox+"<li>请输入影片关键字"
- end if
- if rs4("boolTatt")=True then
- boolZhen=True
- else
- boolZhen=False
- end if
- if strErrmsgbox="" then
- if numRs2id<>"" then
- sql="update download set name='"&strRs2name&"',dateRtime='"&dateRs2time&"',strSize='"&strRs2size&"',strMode='"&strRs2mode&"',strRoof='"&strRs2roof&"',strCommend='"&strRs2commend&"',strHomepage='"&strRs2homepage&"',strDemo='"&strRs2demo&"',strPic='"&strRs2pic&"',strBig='"&strRs2big&"',strSort='"&strRs2sort&"',numSortcount="&numRs2sortcount&",strShow='"&strRs2show&"',down1='"&strRs2down(0)&"',down2='"&strRs2down(1)&"',down3='"&strRs2down(2)&"',down4='"&strRs2down(3)&"',down5='"&strRs2down(4)&"',boolHide="&boolRs2hide&",numMoneys="&numRs2moneys&",strAdmins='"&strRs2admin&"',strSong='"&strRs2song&"',boolCommend="&boolRs2commend&",strString='"&strRs2string&"',boolZhen="&boolZhen&" where id="&numRs2id
- else
- sql="insert into download(name,dateRtime,strSize,strMode,strRoof,strCommend,strHomepage,strDemo,strPic,strBig,strSort,numSortcount,strShow,numCounters,numDowncount,down1,down2,down3,down4,down5,boolHide,numMoneys,strAdmins,strSong,dateDaynow,dateMonthnow,numDaydown,numMonthdown,boolCommend,strString,boolZhen) values('"&strRs2name&"','"&dateRs2time&"','"&strRs2size&"','"&strRs2mode&"','"&strRs2roof&"','"&strRs2commend&"','"&strRs2homepage&"','"&strRs2demo&"','"&strRs2pic&"','"&strRs2big&"','"&strRs2sort&"',"&numRs2sortcount&",'"&strRs2show&"',0,0,'"&strRs2down(0)&"','"&strRs2down(1)&"','"&strRs2down(2)&"','"&strRs2down(3)&"','"&strRs2down(4)&"',"&boolRs2hide&","&numRs2moneys&",'"&strRs2admin&"','"&strRs2song&"','"&dateRs2time&"','"&dateRs2time&"',0,0,"&boolRs2commend&",'"&strRs2string&"',"&boolZhen&")"
- conn.execute("update admin set moneyert=moneyert+"& cint(numMoneyset_1) &" where admin='"& strAdmins &"'")
- end if
- conn.execute sql
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=list.asp'>")
- response.end
- else
- response.write(strErrmsgbox)
- end if
- end function
- '-----------------删除影片------------------
- function edit_del()
- if request.form("id")<>"" then
- if rs4("boolAllDel")=False then
- response.write("<li>对不起你没有权限批量删除影片")
- response.end
- end if
- numEditDel=split(request.form("id"),", ")
- for i= 0 to UBound(numEditDel)
- conn.execute("update admin set moneyert=moneyert-"& cint(numMoneydele_1) &" where admin in (select strAdmins from download where id="& numEditDel(i) &")")
- next
- sql="delete from [download] where id in ("&replace(request.form("id"),"'","")&")"
- else
- if request("id")<>"" then
- if IsNumeric(request("id"))=False then
- response.write("<li>对不起输入的ID编号错误,请勿添加非法字符")
- response.end
- end if
- else
- response.write("<li>对不起输入的ID编号错误,请勿添加非法字符")
- response.end
- end if
- set db=conn.execute("select count(id) as numDBid from download where id="&request("id")&" and strAdmins='"&strCookies&"'")
- if db("numDBid")>="1" then
- if rs4("boolDel")=False then
- response.write("<li>对不起你没有权限删除影片")
- response.end
- end if
- else
- if rs4("boolOrtherDel")=False then
- response.write("<li>对不起你没有权限删除别人添加的影片")
- response.end
- end if
- end if
- db.close
- set db=nothing
- conn.execute("update admin set moneyert=moneyert-"& cint(numMoneydele_1) &" where admin in (select strAdmins from download where id="& request("id") &")")
- sql="delete from download where id="&request("id")
- end if
- conn.execute sql
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=list.asp'>")
- response.end
- end function
- '-------------------显示大分类-----------------
- function sort_sbig()
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="SELECT sort.id,sort.sort FROM sort"
- rs.OPEN sql, Conn,1,1
- while not rs.eof
- numBid=rs("id")
- strBsort=rs("sort")
- response.write("<option value='"&strBsort&"'>"&strBsort&"</option>")
- rs.movenext
- wend
- 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><td width='100%' bgcolor='#E3E3E3'>还没有分类</td></tr>"
- else
- while not rs.eof
- numSoid=rs("id")
- strSosort=rs("sort")
- response.write "<tr><td width='100%' bgcolor='#E3E3E3'>【"&strSosort&"】 <a href=sort.asp?big="&numSoid&"&post=edit>编辑</a> <a href=sort.asp?big="&numSoid&"&post=del onclick=""{if(confirm('您确定执行的操作吗?')){return true;}return false;}"">删除</a></td></tr>"
- Set rs1 = Server.CreateObject("ADODB.Recordset")
- sql1="SELECT small.id,small.small,small.sortid FROM small where sortid='"&strSosort&"'"
- rs1.OPEN sql1, Conn,1,1
- if rs1.eof then
- response.write "<tr><td width='100%' bgcolor='#ffffff' style='text-indent: 40'>还没有分类</td></tr>"
- else
- while not rs1.eof
- numSmid=rs1("id")
- strSmsmall=rs1("small")
- response.write "<tr><td width='100%' bgcolor='#ffffff' style='text-indent: 40'>>> "&strSmsmall&" <a href=sort.asp?sort="&numSmid&"&post=edit>编辑</a> <a href=sort.asp?sort="&numSmid&"&post=del onclick=""{if(confirm('您确定执行的操作吗?')){return true;}return false;}"">删除</a></td></tr>"
- rs1.movenext
- wend
- end if
- rs1.close
- set rs1=nothing
- rs.movenext
- wend
- end if
- rs.close
- set rs=nothing
- end function
- '-------------------删除分类-----------------
- function sort_del()
- numBig=request.QueryString("big")
- numSort=request.QueryString("sort")
- if numBig<>"" then
- sql="select sort.id,sort.sort from sort where id="&numBig
- rs=conn.execute(sql)
- strBsort=rs("sort")
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select small.id,small.small,small.sortid from small where sortid='"&strBsort&"'"
- rs.open sql,conn,1,1
- while not rs.eof
- numSmall=rs("id")
- sql="delete from download where numSortcount="&numSmall
- conn.execute sql
- rs.movenext
- wend
- rs.close
- set rs=nothing
- sql="delete from small where sortid='"&strBsort&"'"
- conn.execute sql
- sql="delete from sort where id="&numBig
- conn.execute sql
- elseif numSort<>"" then
- sql="delete from download where numSortcount="&numSort
- conn.execute sql
- sql="delete from small where id="&numSort
- conn.execute sql
- end if
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=sort.asp'>")
- response.end
- end function
- '-------------------编辑分类-----------------
- function sort_edit1()
- numBig=request.QueryString("big")
- numSort=request.QueryString("sort")
- if numBig<>"" then
- sql="select sort.id,sort.sort from sort where id="&numBig
- rs=conn.execute(sql)
- response.write "<form method='POST' action='sort.asp?big="&numBig&"&post=save'><table border='0' width='100%' cellspacing='0' cellpadding='3'><tr><td width='100%' align='center'><p style='margin-top: 80'>编辑大类: <input type='text' name='editbig' size='15' style='background-color: #F3F3F3; border: 1 solid #000000' value="&rs("sort")&"> <input type='submit' value='提交' name='sub' style='background-color: #F3F3F3; border: 1 solid #000000' onclick=""{if(editbig.value.length<1){alert('大类的名字不能为空');editbig.focus();return (false);}}""></td></tr></table>"
- set rs=nothing
- elseif numSort<>"" then
- sql="select small.id,small.small,small.sortid from small where id="&numSort
- rs=conn.execute(sql)
- response.write "<form method='POST' action='sort.asp?sort="&numSort&"&post=save'><table border='0' width='100%' cellspacing='0' cellpadding='3'><tr><td width='100%' align='center'><p style='margin-top: 80'>编辑小类: <input type='text' name='editsort' size='15' style='background-color: #F3F3F3; border: 1 solid #000000' value="&rs("small")&"> 所属大类: <select size='1' name='ebigid' style='background-color: #F3F3F3; border: 1 solid #000000'>"
- Set rs1 = Server.CreateObject("ADODB.Recordset")
- sql1="SELECT sort.id,sort.sort from sort"
- rs1.OPEN sql1, Conn,1,1
- do while not rs1.eof
- if rs("sortid")=rs1("sort") then
- response.write "<option value='"&rs1("sort")&"' selected>"&rs1("sort")&"</option>"
- else
- response.write "<option value='"&rs1("sort")&"'>"&rs1("sort")&"</option>"
- end if
- rs1.movenext
- loop
- rs1.close
- set rs1=nothing
- response.write "</select> <input type='submit' value='提交' name='sub' style='background-color: #F3F3F3; border: 1 solid #000000' onclick=""{if(editsort.value.length<1){alert('小类的名字不能为空');editsort.focus();return (false);}}""></td></tr></table>"
- set rs=nothing
- else
- response.write "<table border='0' width='100%' cellspacing='0' cellpadding='3'><tr><td width='100%' align='center'>程序执行错误</td></tr></table>"
- end if
- end function
- '-------------------保存分类-----------------
- function sort_save()
- numBig=request.QueryString("big")
- numSort=request.QueryString("sort")
- if numBig<>"" then
- strEditbig=request.form("editbig")
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select sort from sort where sort='"&strEditbig&"'"
- rs.open sql,conn,1,1
- if rs.eof then
- rs.close
- set rs=nothing
- sql="update sort set sort='"&strEditbig&"' where id="&numBig
- else
- rs.close
- set rs=nothing
- response.write("错误操作,修改的分类名已存在")
- response.end
- end if
- else
- if numSort<>"" then
- strEditsort=request.form("editsort")
- strEditbig=request.form("ebigid")
- numCountid=0
- set rs=Server.CreateObject("ADODB.Recordset")
- sql="select small,sortid from small where sortid='"&strEditbig&"'"
- rs.open sql,conn,1,1
- do while not rs.eof
- if rs("small")=request.form("editsort") then
- numCountid=numCountid+1
- end if
- rs.movenext
- loop
- rs.close
- set rs=nothing
- if numCountid=0 then
- sql="update small set small='"&strEditsort&"',sortid='"&strEditbig&"' where id="&numSort
- conn.execute("update download set strBig='"&strEditbig&"' where numSortcount="&numSort)
- else
- response.write("操作错误,添加的分类已存在")
- response.end
- end if
- else
- if request.form("big")<>"" and request.form("sort")<>"" then
- response.write("操作失败,请确认输入的数据,每次只能添加一个大分类或小分类")
- exit function
- else
- if request.form("big")="" and request.form("sort")="" then
- response.write("请确认输入的数据,需要添加的大小分类都为空,不能执行操作")
- exit function
- else
- if request.form("big")<>"" then
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select sort from sort where sort='"&request.form("big")&"'"
- rs.open sql,conn,1,1
- if rs.eof then
- rs.close
- set rs=nothing
- sql="insert into sort(sort) values('"&request.form("big")&"')"
- else
- rs.close
- set rs=nothing
- response.write("错误操作,添加的分类名已存在")
- response.end
- end if
- else
- numCountid=0
- set rs=Server.CreateObject("ADODB.Recordset")
- sql="select small,sortid from small where sortid='"&request.form("bigid")&"'"
- rs.open sql,conn,1,1
- do while not rs.eof
- if rs("small")=request.form("sort") then
- numCountid=numCountid+1
- end if
- rs.movenext
- loop
- rs.close
- set rs=nothing
- if numCountid=0 then
- sql="insert into small(small,sortid) values('"&request.form("sort")&"','"&request.form("bigid")&"')"
- else
- response.write("操作错误,添加的分类已存在")
- response.end
- end if
- end if
- end if
- end if
- end if
- end if
- conn.execute sql
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=sort.asp'>")
- response.end
- 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 setup_save()
- boolOpen=request.form("boolOpen")
- if boolOpen="False" then
- if request.form("strHtml")="" then
- errMsg=errMsg+"<li>如不开放请签写维护说明"
- else
- strHtml=request.form("strHtml")
- end if
- else
- strHtml="系统维护中……"
- end if
- if request.form("strHomepage")="" then
- errMsg=errMsg+"<li>请填写主页名称"
- else
- strHomepage=request.form("strHomepage")
- end if
- if request.form("strUrl")="" then
- errMsg=errMsg+"<li>请填写主页地址"
- else
- if instr(request.form("strUrl"),"http://")<0 then
- errMsg=errMsg+"<li>主页地址格式不对,请以http://开头"
- else
- strUrl=request.form("strUrl")
- end if
- end if
- if request.form("strAddess")="" then
- errMsg=errMsg+"<li>请填写程序所在地址"
- else
- if instr(request.form("strAddess"),"http://")<0 then
- errMsg=errMsg+"<li>程序所在地址格式不对,请以http://开头"
- else
- strAddess=request.form("strAddess")
- end if
- end if
- if request.form("strTitle")="" then
- strTitle="天峰视频系统V1.0免费版"
- end if
- if request.form("strEstate")="" then
- strEstate="天峰视频系统V1.0免费版"
- else
- strEstate=request.form("strEstate")
- end if
- if request.form("strAdminemail")="" then
- errMsg=errMsg+"<li>请填写管理员E-MAIL地址"
- else
- if IsValidEmail(request.form("strAdminemail"))=False then
- errMsg=errMsg+"<li>输入的管理员E-MAIL不符合E-MAIL标准,请返回重新输入"
- else
- strAdminemail=request.form("strAdminemail")
- end if
- end if
- if request.form("numSofts")="" then
- errMsg=errMsg+"<li>请填写每页影片显示数"
- else
- if IsNumeric(request.form("numSofts"))=False then
- errMsg=errMsg+"<li>请确认输入的每页影片显示数是否为数字形式"
- else
- numSofts=CInt(request.form("numSofts"))
- end if
- end if
- if request.form("numXgsoft")="" then
- errMsg=errMsg+"<li>请填写相关影片显示数"
- else
- if IsNumeric(request.form("numXgsoft"))=False then
- errMsg=errMsg+"<li>请确认输入的相关影片显示数是否为数字形式"
- else
- numXgsoft=CInt(request.form("numXgsoft"))
- end if
- end if
- if request.form("numShows")="" then
- errMsg=errMsg+"<li>请填写简介大小"
- else
- if IsNumeric(request.form("numShows"))=False then
- errMsg=errMsg+"<li>请确认输入的简介大小是否为数字形式"
- else
- numShows=CInt(request.form("numShows"))
- end if
- end if
- if request.form("numCommend")="" then
- errMsg=errMsg+"<li>请填写首页推荐影片个数"
- else
- if IsNumeric(request.form("numCommend"))=False then
- errMsg=errMsg+"<li>请确认输入的首页推荐影片个数是否为数字形式"
- else
- numCommend=CInt(request.form("numCommend"))
- end if
- end if
- boolReview=request.form("boolReview")
- boolRegs=request.form("boolRegs")
- boolAdmins=True
- boolDelete=False
- boolLoad=False
- boolAttestation=False
- boolSoftatt=request.form("boolSoftatt")
- boolPwssend=False
- numForget="0"
- boolHide=request.form("boolHide")
- if boolHide="True" then
- if request.form("numMoneys")="" then
- errMsg=errMsg+"<li>如果启用会员影片设置请设置最初货币项目"
- else
- if IsNumeric(request.form("numMoneys"))=False then
- errMsg=errMsg+"<li>请确认输入的最初货币项目是否为数字形式"
- else
- numMoneys=CInt(request.form("numMoneys"))
- end if
- end if
- if request.form("numMoneyset")="" then
- errMsg=errMsg+"<li>如果启用会员影片设置请设置增加货币项目"
- else
- if IsNumeric(request.form("numMoneyset"))=False then
- errMsg=errMsg+"<li>请确认输入的增加货币项目是否为数字形式"
- else
- numMoneyset=CInt(request.form("numMoneyset"))
- end if
- end if
- if request.form("numMoneydele")="" then
- errMsg=errMsg+"<li>如果启用会员影片设置请设置扣减货币项目"
- else
- if IsNumeric(request.form("numMoneydele"))=False then
- errMsg=errMsg+"<li>请确认输入的扣减货币项目是否为数字形式"
- else
- numMoneydele=CInt(request.form("numMoneydele"))
- end if
- end if
- if request.form("strMoneyname")="" then
- errMsg=errMsg+"<li>如果启用会员影片设置请设置货币单位项目"
- else
- strMoneyname=request.form("strMoneyname")
- end if
- else
- numMoneys="1000"
- numMoneyset="100"
- numMoneydele="200"
- strMoneyname="元"
- end if
- boolAffiche=True
- boolUbb=request.form("boolUbb")
- boolSoftimg=request.form("boolSoftimg")
- boolSoftsong=request.form("boolSoftsong")
- boolSoftsize=request.form("boolSoftsize")
- boolSoftreal=request.form("boolSoftreal")
- boolSoftflash=request.form("boolSoftflash")
- boolSoftmedia=request.form("boolSoftmedia")
- boolAdminimg=True
- if boolAdminimg="True" then
- boolImgunload=True
- if boolImgunload="True" then
- if request.form("strImgsize4")="" then
- errMsg=errMsg+"<li>请设置头像上传目录项目"
- else
- strImgsize4=request.form("strImgsize4")
- end if
- if request.form("numImgsize3")="" then
- errMsg=errMsg+"<li>请设置头像大小项目"
- else
- if IsNumeric(request.form("numImgsize3"))=False then
- errMsg=errMsg+"<li>请确认输入的头像大小项目是否为数字形式"
- else
- numImgsize3=CInt(request.form("numImgsize3"))
- end if
- end if
- else
- strImgsize4="/"
- numImgsize3="500"
- end if
- if request.form("numImgsize1")="" then
- errMsg=errMsg+"<li>请设置头像宽度项目"
- else
- if IsNumeric(request.form("numImgsize1"))=False then
- errMsg=errMsg+"<li>请确认输入的头像宽度项目是否为数字形式"
- else
- numImgsize1=CInt(request.form("numImgsize1"))
- end if
- end if
- if request.form("numImgsize2")="" then
- errMsg=errMsg+"<li>请设置头像高度项目"
- else
- if IsNumeric(request.form("numImgsize2"))=False then
- errMsg=errMsg+"<li>请确认输入的头像高度项目是否为数字形式"
- else
- numImgsize2=CInt(request.form("numImgsize2"))
- end if
- end if
- else
- boolImgunload="False"
- strImgsize4="/"
- numImgsize3="500"
- numImgsize1="100"
- numImgsize2="100"
- end if
- boolUnload=request.form("boolUnload")
- if boolUnload="True" then
- if request.form("strLeixin")="" then
- errMsg=errMsg+"<li>如果启用上传文件设置请填写上传的文件类型"
- else
- if instr(request.form("strLeixin"),".")<0 then
- errMsg=errMsg+"<li>程序检查出上传的文件类型填写格式错误,请返回重新填写"
- else
- strLeixin=request.form("strLeixin")
- end if
- end if
- if request.form("strLujing")="" then
- errMsg=errMsg+"<li>如果启用上传文件设置请填写上传目录"
- else
- if instr(request.form("strLujing"),"/")<0 then
- errMsg=errMsg+"<li>程序检查出上传目录填写格式错误,请返回重新填写"
- else
- strLujing=request.form("strLujing")
- end if
- end if
- if request.form("numUnsize")="" then
- errMsg=errMsg+"<li>如果启用上传文件设置请限制上传大小"
- else
- if IsNumeric(request.form("numUnsize"))=False then
- errMsg=errMsg+"<li>请确认输入的上传文件大小项目是否为数字形式"
- else
- numUnsize=CInt(request.form("numUnsize"))
- end if
- end if
- else
- strLeixin=".*"
- strLujing="/"
- numUnsize="500"
- end if
- boolSoftemail=False
- if request.form("imgTitles")="" then
- imgTitles="./images/title.gif"
- else
- imgTitles=request.form("imgTitles")
- end if
- if request.form("imgBanner")="" then
- imgBanner="./images/banners.gif"
- else
- imgBanner=request.form("imgBanner")
- end if
- if request.form("strSoftshows")="" then
- strSoftshows="暂无说明"
- else
- strSoftshows=request.form("strSoftshows")
- end if
- for i=0 to 6
- strADShow=strADShow &"|"& Request.Form("select"& i &"")
- next
- strADShow=right(strADShow,len(strADShow)-1)
- if request.form("strPersonalityReg")="" then
- errMsg=errMsg+"<li>请按照给定的授权号码填写,否则你将无法正常使用程序"
- else
- if len(request.form("strPersonalityReg"))<>12 then
- errMsg=errMsg+"<li>请按照给定的授权号码填写,否则你将无法正常使用程序"
- else
- strPersonalityReg=request.form("strPersonalityReg")
- end if
- end if
- if errMsg<>"" then
- response.write(errMsg&"<p><a href=javascript:history.back(-1)>点击返回→</a>")
- response.end
- exit function
- else
- sql="update setup set boolOpen="&boolOpen&",strHtml='"&strHtml&"',strHomepage='"&strHomepage&"',strUrl='"&strUrl&"',strAddess='"&strAddess&"',strTitle='"&strTitle&"',strEstate='"&strEstate&"',strAdminemail='"&strAdminemail&"',numSofts='"&numSofts&"',numXgsoft='"&numXgsoft&"',numShows='"&numShows&"',numCommend='"&numCommend&"',boolReview="&boolReview&",boolRegs="&boolRegs&",boolAdmins="&boolAdmins&",boolDelete="&boolDelete&",boolLoad="&boolLoad&",boolAttestation="&boolAttestation&",boolSoftatt="&boolSoftatt&",boolPwssend="&boolPwssend&",numForget='"&numForget&"',boolHide="&boolHide&",numMoneys='"&numMoneys&"',numMoneyset='"&numMoneyset&"',numMoneydele='"&numMoneydele&"',strMoneyname='"&strMoneyname&"',boolAffiche="&boolAffiche&",boolUbb="&boolUbb&",boolSoftimg="&boolSoftimg&",boolSoftsong="&boolSoftsong&",boolSoftsize="&boolSoftsize&",boolSoftreal="&boolSoftreal&",boolSoftflash="&boolSoftflash&",boolSoftmedia="&boolSoftmedia&",boolAdminimg="&boolAdminimg&",boolImgunload="&boolImgunload&",strImgsize4='"&strImgsize4&"',numImgsize3='"&numImgsize3&"',numImgsize1='"&numImgsize1&"',numImgsize2='"&numImgsize2&"',boolUnload="&boolUnload&",strLeixin='"&strLeixin&"',strLujing='"&strLujing&"',numUnsize='"&numUnsize&"',boolSoftemail="&boolSoftemail&",strSoftshows='"&strSoftshows&"',imgTitles='"&imgTitles&"',imgBanner='"&imgBanner&"',strADShow='"&strADShow&"',strPersonalityReg='"&strPersonalityReg&"'"
- conn.execute sql
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=setup.asp'>")
- response.end
- end if
- end function
- '-------------------用户管理(显示全体用户资料)-----------------
- function ShowAllUser()
- if request.QueryString("page")<>"" then
- absPageNum=request.QueryString("page")
- else
- absPageNum=1
- end if
- response.write("<form name=""adminUser"" method=""post"" action=""user.asp"">"& vbCRLF & _
- "<tr align=""center"" bgcolor=""#EFEFEF"">"& vbCRLF & _
- "<td width=""15%"">用户名</td>"& vbCRLF & _
- "<td width=""25%"">Email</td>"& vbCRLF & _
- "<td width=""8%"">权限</td>"& vbCRLF & _
- "<td width=""20%"">最后IP</td>"& vbCRLF & _
- "<td width=""25%"">最后登陆时间</td>"& vbCRLF & _
- "<td width=""7%"">操作</td>"& vbCRLF & _
- "</tr>")
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.CursorType = adOpenStatic
- rs.CacheSize = 20
- sql="select * from admin"
- if Request.Form("UserPost")="4" and Request.Form("strSearchUser")<>"" then
- sql=sql&" where admin='"& Request.Form("strSearchUser") &"'"
- end if
- sql=sql&" order by lastTime desc"
- rs.open sql,conn,1,1
- RecordPerPage=20
- rs.PageSize = RecordPerPage
- Tol = rs.PageCount
- If Not(rs.EOF) Then
- rs.AbsolutePage = absPageNum
- End If
- if rs.eof then
- response.write("<tr bgcolor=""#FFFFFF"">"& vbCRLF & _
- "<td colspan=""6""><li>没有该管理员或者程序操作错误!</td>"& vbCRLF & _
- "</tr>")
- else
- for i = 1 to rs.PageSize
- numUid=rs("id")
- strUadmin=rs("admin")
- if rs("qx")<=5 then
- strImgUadmin="<img src=""../images/"& rs("qx") &".gif"" align=""absmiddle""><a href=""#"" onClick=""window.open('../view.asp?user="&strUadmin&"','查看资料','width=220,height=200')"" title=""查看 "&strUadmin&" 的资料"">"&strUadmin&"</a>"
- else
- strImgUadmin="<img src=""../images/6.gif"" align=""absmiddle""><a href=""#"" onClick=""window.open('../view.asp?user="&strUadmin&"','查看资料','width=220,height=200')"" title=""查看 "&strUadmin&" 的资料"">"&strUadmin&"</a>"
- end if
- strUemail=rs("regemail")
- strUlastIP=rs("lastIP")
- dateUlastTime=rs("lastTime")
- response.write("<tr bgcolor=""#FFFFFF"">"& vbCRLF & _
- "<td width=""15%"">"&strImgUadmin&"</td>"& vbCRLF & _
- "<td width=""25%""><a href=""mailto:"&strUemail&"""><img src=""../images/email1.gif"" width=""16"" height=""16"" border=""0"" align=""absmiddle"">"&strUemail&"</a></td>"& vbCRLF & _
- "<td width=""8%"" align=""center""><a href='purview.asp?post=edit&Userid="&strUadmin&"'>编辑</a></td>"& vbCRLF & _
- "<td width=""20%"" align=""center""><a href=userip.asp?ip="&strUlastIP&" alt=点击进行IP操作>"&strUlastIP&"</a></td>"& vbCRLF & _
- "<td width=""25%"" align=""center"">"&dateUlastTime&"</td>"& vbCRLF & _
- "<td width=""7%"" align=""center""><input type=""checkbox"" name=""userid"" value="""&numUid&"""></td>"& vbCRLF & _
- "</tr>")
- rs.movenext
- if rs.eof then
- exit for
- end if
- next
- end if
- rs.close
- set rs=nothing
- response.write("<tr bgcolor=""#FFFFFF"" align=""center"">"& vbCRLF & _
- "<td colspan=""6"">"& vbCRLF & _
- "<input name=""UserPost"" type=""radio"" value=""1"" checked> 删除"& vbCRLF & _
- "<input type=""radio"" name=""UserPost"" value=""2"">"& vbCRLF & _
- "<select size=""1"" name=""UserQx"">"& vbCRLF & _
- "<option value=""0"" selected>移动用户组</option>")
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select * from config order by id"
- rs.open sql,conn,1,1
- do while not rs.eof
- response.write("<option value='"& rs("id") &"'>"& rs("strAname") &"</option>")
- rs.movenext
- loop
- rs.close
- set rs=nothing
- response.write("</select>"& vbCRLF & _
- "<input type=""radio"" name=""UserPost"" value=""3""> 群发邮件"& vbCRLF & _
- "<input type=""radio"" name=""UserPost"" value=""4""> 搜索用户"& vbCRLF & _
- "<input name=""strSearchUser"" type=""text"" size=""12"">"& vbCRLF & _
- "<input type=""submit"" name=""Submit"" value=""提交"" onclick=""{if(confirm('您确定执行的操作吗?')){return true;}return false;}""></td>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</form>")
- 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='user.asp?page="&numPageup&"'>上一页</a>]")
- strPagenext=("[<a href='user.asp?page="&numPagenext&"'>下一页</a>]")
- strSelectPage=("<option value='user.asp' selected>请选择</option>")
- for i=1 to Tol
- strSelectPage=(strSelectPage&"<option value='user.asp?page="&i&strPage&"'>第"&i&"页</option>")
- next
- response.write("<form>"& vbCRLF & _
- "<tr bgcolor=""#FFFFFF"" align=""right"">"& vbCRLF & _
- "<td colspan=""6"">当前页:[<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>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</form>")
- end function
- '----------------------用户组操作---------------------
- function UserPost()
- if rs4("boolUser")=False then
- response.write("<li>对不起,你没有权限操作用户组")
- response.end
- end if
- select case request.form("UserPost")
- case "1"
- strUseridFun=split(request.form("userid"),", ")
- for i= 0 to UBound(strUseridFun)
- if strUseridFun(i)="1" then
- response.write("对不起,拥有超级管理员权限的用户无法删除")
- response.end
- exit for
- end if
- next
- conn.execute("delete from [admin] where id in ("&replace(request.form("userid"),"'","")&")")
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=user.asp'>")
- case "2"
- if request.form("UserQx")="0" then
- response.write("<li>对不起,你移动用户组时输入错误的参数,请返回重新输入")
- else
- conn.execute("update [admin] set qx="& request.form("UserQx") &" where id in ("&replace(request.form("userid"),"'","")&")")
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=user.asp'>")
- end if
- case "3"
- if Request.QueryString("send")="ok" then
- AllEmailSend(request.form("userid"))
- else
- %>
- <form name="form1" method="post" action="user.asp?send=ok">
- <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#000000">
- <tr align="center" bgcolor="#E0E0E0">
- <td colspan="2">邮件群发(不要发垃圾邮件啊^_^)</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="20%">标题:</td>
- <td><input name="strEtitle" type="text" id="strEtitle" size="50" maxlength="100">
- <input type="hidden" name="userid" value="<%=request.form("userid")%>"><input type="hidden" name="UserPost" value="3"></td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="20%">内容:</td>
- <td><textarea name="strEarticle" cols="50" rows="8" id="strEarticle"></textarea></td>
- </tr>
- <tr align="center" bgcolor="#FFFFFF">
- <td colspan="2">
- <input type="submit" name="Submit2" value="发送">
- </td>
- </tr>
- </table>
- </form>
- <%
- end if
- end select
- 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
- '--------------E-MAIL群发函数--------------
- function AllEmailSend(strEmailAddress)
- funEmailAddress=Split(strEmailAddress,", ")
- dim XP_email(2)
- XP_email(0) = "JMail.SMTPMail"
- XP_email(1) = "CDONTS.NewMail"
- XP_email(2) = "Persits.MailSender"
- for i= 0 to UBound(funEmailAddress)
- set rs=conn.execute("select * from admin where id="&funEmailAddress(i))
- if IsValidEmail(rs("regemail"))=false then
- response.write(rs("admin")&"邮件地址错误...<br>")
- else
- if pop_email(XP_email(0)) then
- Set JMail=Server.CreateObject("JMail.SMTPMail")
- JMail.Logging=True
- JMail.Charset="gb2312"
- JMail.ContentType = "text/html"
- JMail.ServerAddress="smtp.21cn.com"
- JMail.Sender=strAdminemail_1
- JMail.Subject=Request.Form("strEtitle")
- JMail.Body=Request.Form("strEarticle")
- JMail.AddRecipient rs("regemail")
- JMail.Priority=3
- JMail.Execute
- Set JMail=nothing
- if err then
- response.write "发送给"& rs("admin") &"的邮件出现错误...<br>"
- err.clear
- else
- response.write "发送给"& rs("admin") &"的邮件完成!<br>"
- end if
- elseif pop_email(XP_email(1)) then
- Set mail = Server.CreateObject("CDONTS.NewMail")
- mail.TO = rs("regemail")
- mail.From = strAdminemail_1
- mail.Subject =Request.Form("strEtitle")
- mail.Body =Request.Form("strEarticle")
- mail.Send
- Set mail = Nothing
- if err then
- response.write "发送给"& rs("admin") &"的邮件出现错误...<br>"
- err.clear
- else
- response.write "发送给"& rs("admin") &"的邮件完成!<br>"
- end if
- elseif pop_email(XP_email(2)) then
- Set mailer=Server.CreateObject("ASPMAIL.ASPMailCtrl.1")
- recipient=rs("regemail")
- sender=strAdminemail_1
- subject=Request.Form("strEtitle")
- message=Request.Form("strEarticle")
- mailserver="smtp.21cn.com"
- result=mailer.SendMail(mailserver, recipient, sender, subject, message)
- Set mailer = Nothing
- if err then
- response.write "发送给"& rs("admin") &"的邮件出现错误...<br>"
- err.clear
- else
- response.write "发送给"& rs("admin") &"的邮件完成!<br>"
- end if
- else
- response.write "你的服务器不支持E-MAIL组件"
- exit for
- end if
- end if
- next
- end function
- '-----------------显示广告-----------------
- function showAD()
- if request.QueryString("page")<>"" then
- absPageNum=request.QueryString("page")
- else
- absPageNum=1
- end if
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.CursorType = adOpenStatic
- rs.CacheSize = 8
- sql="select * from ad order by dateAddTime desc"
- rs.open sql,conn,1,1
- RecordPerPage= 8
- rs.PageSize = RecordPerPage
- Tol = rs.PageCount
- If Not(rs.EOF) Then
- rs.AbsolutePage = absPageNum
- End If
- if rs.eof then
- response.write("还没有广告内容,请<a href='ad.asp?post=add'>添加→</a>")
- else
- for i = 1 to rs.PageSize
- strADID=rs("id")
- boolADtext=rs("boolADtext")
- boolADjs=rs("boolADjs")
- boolADmonth=rs("boolADmonth")
- if boolADmonth=True then
- strADmonth="包月"
- else
- strADmonth="点击"
- end if
- numMaxBig=rs("numMaxBig")
- select case numMaxBig
- case "1"
- strMaxBig="文本"
- case "2"
- strMaxBig="100*100"
- case "3"
- strMaxBig="160*70"
- case "4"
- strMaxBig="480*60"
- case "5"
- strMaxBig="760*60"
- case "6"
- strMaxBig="跳窗"
- end select
- numShow=rs("numShow")
- if boolADjs=True then
- if numMaxBig<"5" then
- strADurl=rs("strADurl")
- else
- if numMaxBig="6" then
- strADurl="由于广告大小过大,请点击查看广告浏览该广告<span><textarea rows=""2"" cols=""50"" id=""code"& strADID &""" readonly><script language=""JavaScript"">window.open('"& rs("strADurl") &"') ;</script></textarea><input value=""查看广告"" type=""button"" onclick=runHtml() name=""daoshuai""></span>"
- else
- strADurl="由于广告大小过大,请点击查看广告浏览该广告<span><textarea rows=""2"" cols=""50"" id=""code"& strADID &""" readonly>"& rs("strADurl") &"</textarea><input value=""查看广告"" type=""button"" onclick=runHtml() name=""daoshuai""></span>"
- end if
- end if
- numSelect="无"
- numMaxRate="无"
- numNowRate="无"
- strADTitle=""
- strImTeAD=""
- if boolADmonth=True then
- numRate=rs("numRate")
- else
- numRate="无"
- end if
- else
- if numMaxBig<"5" then
- if numMaxBig="1" then
- strADurl="<a href="""& rs("strADurl") &""" alt="""& rs("strADTitle") &""">"& rs("strImTeAD") &"</a>"
- else
- strADurl="<a href="""& rs("strADurl") &"""><img src="""& rs("strImTeAD") &""" alt="""& rs("strADTitle") &""" border=""0""></a>"
- end if
- else
- strADurl="由于广告大小过大,请点击查看广告浏览该广告<span><textarea rows=""2"" cols=""50"" id=""code"& strADID &""" readonly><a href="""& rs("strADurl") &"""><img src="""& rs("strImTeAD") &""" alt="""& rs("strADTitle") &""" border=""0""></a></textarea><input value=""查看广告"" type=""button"" onclick=runHtml() name=""daoshuai""></span>"
- end if
- numSelect=rs("numSelect")
- numMaxRate=rs("numMaxRate")
- if numShow="0" then
- numNowRate="0"
- else
- numNowRate=round(int(numSelect)/int(numShow),2)
- end if
- if boolADmonth=True then
- numRate=rs("numRate")
- else
- numRate=CDbl(numSelect)/1000*CDbl(rs("numRate"))
- end if
- end if
- numPlace=rs("numPlace")
- select case numPlace
- case "1"
- strPlace="<img src=""../images/fav.gif"" alt=""首页固定广告栏480*60"">"
- case "2"
- strPlace="<img src=""../images/fav.gif"" alt=""每页文本广告栏"">"
- case "3"
- strPlace="<img src=""../images/fav.gif"" alt=""160*70右边广告栏(首页特定)"">"
- case "4"
- strPlace="<img src=""../images/fav.gif"" alt=""页面滚动广告栏(100*100)"">"
- case "5"
- strPlace="<img src=""../images/fav.gif"" alt=""影片页左边160*70广告栏"">"
- case "6"
- strPlace="<img src=""../images/fav.gif"" alt=""影片页480*60广告栏"">"
- case "7"
- strPlace="<img src=""../images/fav.gif"" alt=""每页底部760*60夹层广告栏"">"
- case "8"
- strPlace="<img src=""../images/fav.gif"" alt=""顶端每页760*60夹层广告栏"">"
- case "9"
- strPlace="<img src=""../images/fav.gif"" alt=""跳窗式广告"">"
- end select
- numFirstShow=rs("numFirstShow")
- dateAddTime="<img src=""../images/report.gif"" alt="""& rs("dateAddTime") &""">"
- strALLShow=numShow&"/"&numSelect&"/"&strXNum(numNowRate)&"/"&strXNum(numMaxRate)
- %>
- <table width="100%" border="0" cellpadding="2" cellspacing="0">
- <tr align="center">
- <td colspan="7"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="90%" align="center"><%=strADurl%></td>
- <td width="10%"><p><a href="ad.asp?post=add"><img src="../images/a_add.gif" width="52" height="16" border="0"></a><br>
- <a href="ad.asp?post=edit&id=<%=strADID%>"><img src="../images/a_edit.gif" width="52" height="16" border="0"></a><br>
- <a href="ad.asp?post=del&id=<%=strADID%>" onclick="{if(confirm('将删除你所选择的广告是否执行操作?')){return true;}return false;}"><img src="../images/a_delete.gif" width="52" height="16" border="0"></a>
- </p>
- </td>
- </tr>
- </table></td>
- </tr>
- <tr align="center">
- <td width="40%">显/点/比/设:<%=strALLShow%></td>
- <td width="14%">大小:<%=strMaxBig%></td>
- <td width="12%">类型:<%=strADmonth%></td>
- <td width="14%">收入:¥<%=strXNum(numRate)%></td>
- <td width="10%">优先率:<%=numFirstShow%></td>
- <td width="5%"><%=dateAddTime%></td>
- <td width="5%"><%=strPlace%></td>
- </tr>
- </table><br><br>
- <%
- rs.movenext
- if rs.eof then
- exit for
- end if
- next
- end if
- rs.close
- set rs=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='ad.asp?page="&numPageup&"'>上一页</a>]")
- strPagenext=("[<a href='ad.asp?page="&numPagenext&"'>下一页</a>]")
- strSelectPage=("<option value='ad.asp' selected>请选择</option>")
- for i=1 to Tol
- strSelectPage=(strSelectPage&"<option value='ad.asp?page="&i&strPage&"'>第"&i&"页</option>")
- next
- response.write("<form>"& vbCRLF & _
- "<tr bgcolor=""#FFFFFF"" align=""right"">"& vbCRLF & _
- "<td colspan=""6"">当前页:[<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>"& vbCRLF & _
- "</tr>"& vbCRLF & _
- "</form>")
- end function
- '----------------转换小数--------------
- function strXNum(num)
- numXNum=num
- if instr(numXNum,".")="1" then
- numXNum="0"&numXNum
- end if
- strXNum=numXNum
- end function
- '-----------------广告相关操作---------------
- function ad_Doing()
- if Request.QueryString("save")<>"ok" then
- select case Request.QueryString("post")
- case "add"
- strAction="ad.asp?post=add&save=ok"
- strSubmit="添加广告"
- boolADjsb="checked"
- boolADtextb="checked"
- boolADmonthb="checked"
- numPlace="0"
- numFirstShow="0"
- numMaxBig="0"
- case "edit"
- set rs=conn.execute("select * from ad where id="& Request.QueryString("id"))
- strADurl=rs("strADurl")
- if rs("boolADjs")=True then
- boolADjsa="checked"
- else
- boolADjsb="checked"
- end if
- if rs("boolADtext")=True then
- boolADtexta="checked"
- else
- boolADtextb="checked"
- end if
- strImTeAD=rs("strImTeAD")
- strADTitle=rs("strADTitle")
- numPlace=rs("numPlace")
- if rs("boolADmonth")=True then
- boolADmontha="checked"
- else
- boolADmonthb="checked"
- end if
- numRate=rs("numRate")
- numFirstShow=rs("numFirstShow")
- numMaxRate=rs("numMaxRate")
- numMaxBig=rs("numMaxBig")
- strAction="ad.asp?post=edit&id="& Request.QueryString("id") &"&save=ok"
- strSubmit="编辑广告"
- case "del"
- conn.execute("delete from ad where id="&Request.QueryString("id"))
- Response.write("操作完成,2秒钟后返回程序设置, 请重新设置广告相关<META HTTP-EQUIV=REFRESH CONTENT='2;URL=setup.asp'>")
- response.end
- end select
- else
- if Request.Form("strADurl")="" then
- strERRMsgBox=strERRMsgBox&"<li>广告地址不能为空"
- else
- strADurl=Request.Form("strADurl")
- end if
- if Request.Form("strImTeAD")="" then
- strERRMsgBox=strERRMsgBox&"<li>文字名称/图片地址不能为空"
- else
- strImTeAD=Request.Form("strImTeAD")
- end if
- if Request.Form("numPlace")="0" then
- strERRMsgBox=strERRMsgBox&"<li>请选择广告所在位置"
- else
- numPlace=Request.Form("numPlace")
- end if
- if Request.Form("numRate")<>"" then
- if IsNumeric(Request.Form("numRate"))=True then
- numRate=Request.Form("numRate")
- else
- strERRMsgBox=strERRMsgBox&"<li>千次点击单价/包月费必须为数字形式"
- end if
- else
- numRate="0"
- end if
- if Request.Form("numFirstShow")="0" then
- strERRMsgBox=strERRMsgBox&"<li>请选择优先显示权"
- else
- numFirstShow=Request.Form("numFirstShow")
- end if
- if Request.Form("numMaxRate")<>"" then
- if IsNumeric(Request.Form("numMaxRate"))=True then
- numMaxRate=Request.Form("numMaxRate")
- else
- strERRMsgBox=strERRMsgBox&"<li>显示点击比率必须为数字形式"
- end if
- else
- numMaxRate="0"
- end if
- if Request.Form("numMaxBig")="0" then
- strERRMsgBox=strERRMsgBox&"<li>请选择广告条大小"
- else
- numMaxBig=Request.Form("numMaxBig")
- end if
- if strERRMsgBox="" then
- select case Request.QueryString("post")
- case "add"
- conn.execute("insert into ad(strADurl,boolADjs,boolADtext,strImTeAD,strADTitle,numPlace,boolADmonth,numRate,numFirstShow,numMaxRate,dateAddTime,numSelect,numShow,numMaxBig) values('"& strADurl &"',"& Request.Form("boolADjs") &","& Request.Form("boolADtext") &",'"& strImTeAD &"','"& Request.Form("strADTitle") &"',"& numPlace &","& Request.Form("boolADmonth") &","& numRate &","& numFirstShow &","& numMaxRate &",'"& now() &"',0,0,"& numMaxBig &")")
- case "edit"
- conn.execute("update ad set strADurl='"& strADurl &"',boolADjs="& Request.Form("boolADjs") &",boolADtext="& Request.Form("boolADtext") &",strImTeAD='"& strImTeAD &"',strADTitle='"& Request.Form("strADTitle") &"',numPlace="& numPlace &",boolADmonth="& Request.Form("boolADmonth") &",numRate="& numRate &",numFirstShow="& numFirstShow &",numMaxRate="& numMaxRate &",numMaxBig="& numMaxBig &" where id="& Request.QueryString("id"))
- case else
- response.write("操作出现错误,请确认是否操作正确")
- response.end
- end select
- Response.write("操作完成,2秒钟后返回<META HTTP-EQUIV=REFRESH CONTENT='2;URL=ad.asp'>")
- response.end
- else
- response.write strERRMsgBox
- response.end
- end if
- end if
- %>
- <form name="strADFrom" method="post" action="<%=strAction%>">
- <table width="100%" border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td width="35%">广告代码/点击地址</td>
- <td width="65%">
- <textarea name="strADurl" cols="35" rows="5" id="strADTitle"><%=strADurl%></textarea> *</td>
- </tr>
- <tr>
- <td width="35%">是否为JS/Flash</td>
- <td width="65%">
- <input type="radio" name="boolADjs" value="True" <%=boolADjsa%>>
- 是
- <input name="boolADjs" type="radio" value="False" <%=boolADjsb%>>
- 否</td>
- </tr>
- <tr>
- <td width="35%">文字广告</td>
- <td width="65%">
- <input type="radio" name="boolADtext" value="True" <%=boolADtexta%>>
- 是
- <input name="boolADtext" type="radio" value="False" <%=boolADtextb%>>
- 否</td>
- </tr>
- <tr>
- <td width="35%">文字名称/图片地址</td>
- <td width="65%">
- <input name="strImTeAD" type="text" id="strImTeAD" size="35" maxlength="255" value="<%=strImTeAD%>"> *</td>
- </tr>
- <tr>
- <td width="35%">广告介绍</td>
- <td width="65%">
- <textarea name="strADTitle" cols="35" rows="5" id="strADTitle"><%=strADTitle%></textarea></td>
- </tr>
- <tr>
- <td width="35%">广告位置</td>
- <td width="65%">
- <select name="numPlace" size="1" id="numPlace">
- <%
- dim strPlaces(9)
- strPlaces(0)="请选择广告所在位置"
- strPlaces(1)="首页固定广告栏480*60"
- strPlaces(2)="每页文本广告栏"
- strPlaces(3)="160*70右边广告栏(首页特定)"
- strPlaces(4)="页面滚动广告栏(100*100)"
- strPlaces(5)="影片页左边160*70广告栏"
- strPlaces(6)="影片页480*60广告栏"
- strPlaces(7)="每页底部760*60夹层广告栏"
- strPlaces(8)="顶端每页760*60夹层广告栏"
- strPlaces(9)="跳窗式广告"
- for i=0 to 9
- if int(numPlace)=int(i) then
- response.write("<option value="""& i &""" selected>"& strPlaces(i) &"</option>")
- else
- response.write("<option value="""& i &""">"& strPlaces(i) &"</option>")
- end if
- next
- %>
- </select></td>
- </tr>
- <tr>
- <td width="35%">是否包月</td>
- <td width="65%">
- <input type="radio" name="boolADmonth" value="True" <%=boolADmontha%>>
- 是
- <input name="boolADmonth" type="radio" value="False" <%=boolADmonthb%>>
- 否</td>
- </tr>
- <tr>
- <td width="35%">千次点击单价/包月费</td>
- <td width="65%">
- <input name="numRate" type="text" id="numRate" size="5" maxlength="9" value="<%=numRate%>">
- RMB</td>
- </tr>
- <tr>
- <td width="35%">优先显示权</td>
- <td width="65%">
- <select name="numFirstShow" size="1" id="numFirstShow">
- <%
- dim strFirstShow(5)
- strFirstShow(0)="请选择优先显示权"
- strFirstShow(1)="1.极少显示"
- strFirstShow(2)="2.较少显示"
- strFirstShow(3)="3.一般显示"
- strFirstShow(4)="4.较多显示"
- strFirstShow(5)="5.极多显示"
- for i=0 to 5
- if int(numFirstShow)=int(i) then
- response.write("<option value="""& i &""" selected>"& strFirstShow(i) &"</option>")
- else
- response.write("<option value="""& i &""">"& strFirstShow(i) &"</option>")
- end if
- next
- %>
- </select></td>
- </tr>
- <tr>
- <td width="35%">显示点击比率</td>
- <td width="65%"> <input name="numMaxRate" type="text" id="numMaxRate" size="5" maxlength="4" value="<%=numMaxRate%>">
- (小数表示,例如 .86/0.86 都可)</td>
- </tr>
- <tr>
- <td width="35%">广告条大小</td>
- <td width="65%">
- <select name="numMaxBig" size="1" id="numMaxBig">
- <%
- dim strMaxBig(6)
- strMaxBig(0)="请选择广告条大小"
- strMaxBig(1)="文本"
- strMaxBig(2)="100*100"
- strMaxBig(3)="160*70"
- strMaxBig(4)="480*60"
- strMaxBig(5)="760*60"
- strMaxBig(6)="跳窗"
- for i=0 to 6
- if int(numMaxBig)=int(i) then
- response.write("<option value="""& i &""" selected>"& strMaxBig(i) &"</option>")
- else
- response.write("<option value="""& i &""">"& strMaxBig(i) &"</option>")
- end if
- next
- %>
- </select>(跳窗广告请在"是否为JS/Flash"选"是")</td>
- </tr>
- <tr align="center">
- <td colspan="2">
- <input type="submit" name="Submit" value="<%=strSubmit%>">
- </td>
- </tr>
- </table>
- </form>
- <%
- 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 zhen_show()
- 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 = cint(numSofts_1)
- sql3="select * from download where boolZhen=True order by dateRtime desc"
- rs3.open sql3, conn,1,1
- rs3.PageSize = cint(numSofts_1)
- Tol = rs3.PageCount
- If Not(rs3.EOF) Then
- rs3.AbsolutePage = absPageNum
- End If
- if rs3.eof then
- response.write("<form name=""strZhenForm"" method=""post"" action=""zhen.asp"">该分类还没有影片")
- 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
- strRs3count=("<a href='#' title='浏:"&rs3("numCounters")&" 总:"&rs3("numDowncount")&" 月:"&rs3("numMonthdown")&" 日:"&rs3("numDaydown")&"'>影片统计</a>")
- 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("<form name=""strZhenForm"" method=""post"" action=""zhen.asp""><table width='90%' border='0' cellpadding='2' cellspacing='1' bgcolor='#000000'>"&_
- "<tr bgcolor='#bcbcbc'>"&_
- "<td colspan='2' bgcolor='#bcbcbc'>"&_
- "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"&_
- "<tr>"&_
- "<td><input type=""checkbox"" name=""id"" value='"& numRs3id &"'><a href='../show.asp?id="&numRs3id&"' target=_blank>"&strRs3name&"</a> "&strRs3hide&"</td>"&_
- "</tr>"&_
- "</table></td>"&_
- "<td colspan='2' align='right' bgcolor='#bcbcbc'>"&_
- "<a href=""edit.asp?id="&numRs3id&"&post=edit"">编辑</a> ¦ "&_
- "<a href=""edit.asp?id="&numRs3id&"&post=del"" onclick=""{if(confirm('您确定执行的操作吗?')){return true;}return false;}"">删除</a>"&_
- "</td></tr>"&_
- "<tr bgcolor='#DBDBDB'>"&_
- "<td width='20%' align='center' bgcolor='#efefef'>更新日期</td>"&_
- "<td width='30%'>"&dateRs3time&"</td>"&_
- "<td width='20%' align='center' bgcolor='#efefef'>影片类别</td>"&_
- "<td width='30%'>"&strRs3big&"┃"&strRs3sort&"</td>"&_
- "</tr>"&_
- "<tr bgcolor='white'>"&_
- "<td colspan='4'><p style='text-indent: 40'>"&strRs3show&"</p></td>"&_
- "</tr></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='zhen.asp?page="&numPageup)
- strPagenext=("[<a href='zhen.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='zhen.asp' selected>请选择</option>")
- for i=1 to Tol
- strSelectPage=(strSelectPage&"<option value='zhen.asp?page="&i&strPage&"'>第"&i&"页</option>")
- next
- response.write("<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>"&_
- "<tr>"&_
- "<td align='right'><input type='radio' name='zhen' value='1'> 认证 <input type='radio' name='zhen' value='2'> 删 <input type='submit' name='Submit' value='提交'> "&_
- "当前页:[<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
- %>
- <%
- '如果你美化的漂亮或者修正了最多只可以同时添加5集和不能修改用户虚拟币的BUG记得联系一下网络游子哟~!我的QQ35325750或者1006389
- %>