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

📄 tipscls.asp

📁 足球推荐程序 功能齐全 还 不错 界面漂亮 容易修改
💻 ASP
字号:
<!--#include file="../com/SqlStr.asp"-->
<!--#include file="../com/md5.asp"-->
<!--#include file="../com/ComCls.asp"-->
<%
    Set AdoCn=Server.CreateObject("Adodb.Connection")
    Set AdoRs=Server.CreateObject("Adodb.RecordSet")
    Set FunCls=New FunctionClass
    Dim SQL,Page,JieGuo(4),xxary(10)
	JieGuo(1)="等"
	JieGuo(2)="赢"
	JieGuo(3)="输"
	JieGuo(4)="和"
	xxary(1)="一星"
	xxary(2)="二星"
	xxary(3)="三星"
	xxary(4)="四星"
	xxary(5)="五星"
	xxary(6)="六星"
	xxary(7)="七星"
	xxary(8)="八星"
	xxary(9)="九星"
	xxary(10)="十星"
	
	
'-------------------------------------------------------    
	Class tipsCls
		Public Sub Class_Initialize()
			On Error Resume Next
			AdoCn.Open AdoSql
			If Err.Number<>0 Then
				FunCls.ErrMessage Err.Description
			End If   
		End Sub
'------------------------------------------------------------
		Public Sub RsClose()
			If AdoRs.State=1 Then
				AdoRs.Close
			End If
		End Sub
'------------------------------------------------------------
		public sub tipsAdd(sdate,sdate2,st1,xt1,tj,bf,jg,pk,typeid,xx)'新增推荐
			if request("tipsadd")<>"" then
				sdate=funcls.sift_str(sdate,2)
				sdate2=funcls.sift_str(sdate2,2)
				st1=funcls.sift_str(st1,2)
				
				xt1=funcls.sift_str(xt1,2)
				
				tj=funcls.sift_str(tj,2)
				
				bf=funcls.sift_str(bf,2)
				jg=funcls.sift_str(jg,1)
				pk=funcls.sift_str(pk,2)
				
				typeid=funcls.sift_str(typeid,1)
				xx=funcls.sift_str(xx,1)
				
				if xx="" then
					xx=5
				end if
				SQL="INSERT INTO ztsm_tips(sdate,sdate2,st1,xt1,tj,bf,jg,pk,typeid,xx) values('"&sdate&"','"&sdate2&"','"&st1&"','"&xt1&"','"&tj&"','"&bf&"',"&jg&",'"&pk&"',"&typeid&","&xx&")"
				
				AdoCn.execute(SQL)
				response.write "<script language=""javascript"">alert('新增成功');window.location.href=""tipsadd.asp"";</script>"
				
				response.end
			end if
		end sub
'-------------------------------------------------------
		public sub tipslistshow(page,typeid)'显示推荐信息
			typeid=funcls.sift_str(typeid,1)
			if typeid="" then
				typeid=1
			end if
			SQL="SELECT id,sdate,st1,pk,xt1,tj,bf,jg FROM ztsm_tips where typeid="&typeid&"  order by sdate desc"
			AdoRs.Open SQL ,AdoCn,1,1
			if not AdoRs.eof then
				FunCls.divpage 20,page
				pagestr=FunCls.Showpage
				Do While Not AdoRs.Eof and RowCount>0
					
					
					body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf 
                 	body=body&"<td>"&AdoRs(1)&"</td>"&vbcrlf 
					body=body&"<td>"&AdoRs(2)&"</td>"&vbcrlf 
                 	body=body&"<td>"&AdoRs(3)&"</td>"&vbcrlf 
					body=body&"<td>"&AdoRs(4)&"</td>"&vbcrlf 
                 	body=body&"<td>"&AdoRs(5)&"</td>"&vbcrlf 
                 	body=body&"<td>"&AdoRs(6)&"</td>"&vbcrlf 
					body=body&"<td>"&JieGuo(adors(7))&"</td>"&vbcrlf 
					body=body&"<td><a href=""tipsedit.asp?tipsid="&AdoRs("id")&""">修改</a> <a href=""#"" onclick=""return IsDel("&AdoRs("id")&");"">删除</a></td>"&vbcrlf 
					body=body&"</tr>"&vbcrlf 
                 	AdoRs.MoveNext
					RowCount=RowCount-1
				Loop 
				body=body&"<tr bgcolor=""#CCCCCC""><td colspan=""9"">"&pagestr&"</td></tr>"&vbcrlf 
			else
				body="<tr bgcolor=""#CCCCCC""><td colspan=""9"">暂无记录</td></tr>"&vbcrlf 
			end if
			RsClose
			response.write body
		end sub
'--------------------------------------------------------
		public sub tipsshow(tipsid)'显示单个推荐信息
			SQL="SELECT id,sdate,sdate2,st1,xt1,tj,bf,jg,pk,typeid,xx FROM ztsm_tips where id="&tipsid&" "
			set AdoRs=AdoCn.execute(SQL)
			if not AdoRs.eof and not AdoRs.bof then
				body="<input type=""hidden"" name=""tipsid"" value="""&AdoRs(0)&""">"&vbcrlf 
				body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf 
				body=body&"<td>开赛时间:</td>"&vbcrlf
				body=body&"<td><input type=""text"" name=""sdate"" value="""&AdoRs(1)&""" size=""30""></td>"&vbcrlf
				body=body&"<td>公布时间:</td>"&vbcrlf
				body=body&"<td><input type=""text"" name=""sdate2"" value="""&AdoRs(2)&""" size=""30""></td>"&vbcrlf
				body=body&"</tr>"&vbcrlf
				body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf
				body=body&"<td>上盘球队名:</td>"&vbcrlf
				body=body&"<td><input type=""text"" name=""st1"" value="""&AdoRs("st1")&""" size=""30""> </td>"&vbcrlf
				body=body&"<td>下盘球队名:</td>"&vbcrlf
				body=body&"<td><input type=""text"" name=""xt1"" value="""&AdoRs("xt1")&""" size=""30""> </td>"&vbcrlf
				body=body&"</tr>"&vbcrlf
				body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf
				body=body&"<td>盘口:</td>"&vbcrlf
				body=body&"<td><input type=""text"" name=""pk"" value="""&AdoRs("pk")&""" size=""30""></td>"&vbcrlf
				body=body&"<td>推荐:</td>"&vbcrlf
				body=body&"<td><input type=""text"" name=""tj"" value="""&AdoRs("tj")&""" size=""30""></td>"&vbcrlf
				body=body&"</tr>"&vbcrlf
				
				
				
				body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf
				
				body=body&"<td>比 分:</td>"&vbcrlf
				body=body&"<td colspan=3><input type=""text"" name=""bf"" value="""&AdoRs("bf")&"""></td>"&vbcrlf
				body=body&"</tr>"&vbcrlf
				body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf
				body=body&"<td>结 果:</td>"&vbcrlf
				body=body&"<td>"&vbcrlf
				body=body&"<select name=""jg"">"&vbcrlf
				body=body&"<option value=""1"""
				if AdoRs("jg")=1 then
					body=body&" selected "
				end if
				body=body&">等待</option>"&vbcrlf
				body=body&"<option value=""2"""
				if AdoRs("jg")=2 then
					body=body&" selected "
				end if
				body=body&">赢盘</option>"&vbcrlf
				body=body&"<option value=""3"" "
				if AdoRs("jg")=3 then
					body=body&" selected "
				end if
				body=body&">输</option>"&vbcrlf
				body=body&"<option value=""4"" "
				if AdoRs("jg")=4 then
					body=body&" selected "
				end if
				body=body&">和</option>"&vbcrlf
				body=body&"</select>"&vbcrlf
				body=body&"</td>"&vbcrlf
				body=body&"<td>信 心:</td>"&vbcrlf
				body=body&"<td >"&vbcrlf
				body=body&"<select name=""xx"">"&vbcrlf
				for k=1 to 10
					if adors("xx")=k then
						body=body&"<option value="""&k&""" selected>"&xxary(k)&"</option>"
					else
						body=body&"<option value="""&k&""">"&xxary(k)&"</option>"
					end if
				next
				
				body=body&"</select>"&vbcrlf
				body=body&"</td>"&vbcrlf
				body=body&"</tr>"&vbcrlf
				
				
				
			else 
				body="暂无数据"
			end if
			RsClose
			response.write body
		end sub
'------------------------------------------------------
		public sub tipseditsave(sdate,sdate2,st1,xt1,tj,bf,jg,pk,id,xx)'保存修改推荐信息
			if request("submitedit")<>"" then
				id=funcls.sift_str(id,1)
				sdate=funcls.sift_str(sdate,2)
				sdate2=funcls.sift_str(sdate2,2)
				st1=funcls.sift_str(st1,2)
				
				xt1=funcls.sift_str(xt1,2)
				
				tj=funcls.sift_str(tj,2)
				
				bf=funcls.sift_str(bf,2)
				jg=funcls.sift_str(jg,1)
				pk=funcls.sift_str(pk,2)
				
				xx=funcls.sift_str(xx,1)
				
				if xx="" or xx=0 then
					xx=5
				end if
				
				SQL="UPDATE ztsm_tips set sdate='"&sdate&"',sdate2='"&sdate2&"',st1='"&st1&"',xt1='"&xt1&"',tj='"&tj&"',bf='"&bf&"',jg="&jg&",pk='"&pk&"',xx="&xx&" where id="&id&" "
				AdoCn.execute(SQL)
				response.Redirect "tipsAdmin.asp"
				response.end
			end if 
		end sub
'-------------------------------------------------------
		public sub CommendDel(commendid)'删除推荐
			if request("status")="commenddel" then
				SQL="DELETE FROM ztsm_tips where id="&Commendid&" "
				AdoCn.execute(SQL)
				Response.write "<script language>alert('删除成功!!!');window.location.href=""tipsadmin.asp"";;</script>"
				response.end
			end if
		end sub
'----------------------------------------------------
		
'------------------------------------------------------
		public sub infoshow(infotype) '显示信息 首页左边,首页右边,入会细则
			sql="select top 1 id,infobody1,infobody2,infobody3,infobody4 from ztsm_info "
			set adors=adocn.execute(sql)
			if not adors.eof and not adors.bof then
				infotype=funcls.sift_str(infotype,1)
				if infotype="" or infotype=0 then
					infotype=1
				end if
				contenttemp=""
				if AdoRs(int(infotype))<>"" then
					contenttemp=Replace(AdoRs(int(infotype)),"""","")
				end if 
				response.write "<INPUT type=""hidden"" name=""body"" id=""Body"" value="""&contenttemp&""">"
			end if
			rsclose
			response.write body
		end sub
'------------------------------------------------------
		public sub infosave(infobody,infotype)
			if request("infosubmit")<>"" then
				select case infotype
					case 1
						sql="update ztsm_info set infobody1='"&infobody&"'"
					case 2
						sql="update ztsm_info set infobody2='"&infobody&"'"
					case 3
						sql="update ztsm_info set infobody3='"&infobody&"'"
					case 4
						sql="update ztsm_info set infobody4='"&infobody&"'"
					
				end select
				
				adocn.execute(sql)
				response.write "<font color=red>更新成功</font>"
			end if
		end sub
'----------------------------------------------------------
		public sub tellist(page)
			SQL="SELECT id,tel,adddate FROM ztsm_mobile  order by adddate desc"
			AdoRs.Open SQL ,AdoCn,1,1
			if not AdoRs.eof then
				FunCls.divpage 20,page
				pagestr=FunCls.Showpage
				Do While Not AdoRs.Eof and RowCount>0
					
					
					body=body&"<tr bgcolor=""#CCCCCC"">"&vbcrlf 
                 	body=body&"<td>"&AdoRs(2)&"</td>"&vbcrlf 
					body=body&"<td>"&AdoRs(1)&"</td>"&vbcrlf 
                 	
					body=body&"<td> <a href=""#"" onclick=""return IsDel("&AdoRs("id")&");"">删除</a></td>"&vbcrlf 
					body=body&"</tr>"&vbcrlf 
                 	AdoRs.MoveNext
					RowCount=RowCount-1
				Loop 
				body=body&"<tr bgcolor=""#CCCCCC""><td colspan=""9"">"&pagestr&"</td></tr>"&vbcrlf 
			else
				body="<tr bgcolor=""#CCCCCC""><td colspan=""9"">暂无记录</td></tr>"&vbcrlf 
			end if
			RsClose
			response.write body
		end sub 
'---------------------------------------------------------
		public sub telDel(telid)'删除推荐
			if request("status")="teldel" then
				telid=funcls.sift_str(telid,1)
				SQL="DELETE FROM ztsm_mobile where id="&telid&" "
				AdoCn.execute(SQL)
				Response.write "<script language>alert('删除成功!!!');window.location.href=""teladmin.asp"";;</script>"
				response.end
			end if
		end sub
'------------------------------------------------------- 
		Public Sub Class_Terminate()
			If AdoRs.State=1 Then
				AdoRs.Close
			End If
			If Not AdoRs Is Nothing Then
				Set AdoRs=Nothing
			End If
			If AdoCn.State=1 Then
				Adocn.Close
			End If
			If Not AdoCn Is Nothing Then
				Set AdoCn=Nothing
			End If
			Set FunCls=Nothing
		End Sub
	End Class
'-------------------------------------------------------  
%>

⌨️ 快捷键说明

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