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

📄 char.asp

📁 AspEase Auction System Ver2.0/动易拍卖系统 Ver2.0
💻 ASP
📖 第 1 页 / 共 3 页
字号:
		end if	
	rssqlfldvalue.close
	set rssqlfldvalue=nothing
end if
easeshowfldvalue=str
end function
function aspeaseusername(pvuserid)
	if pvuserid="" or not isnumeric(pvuserid) then
		str=null
	else
		set rsaspeaseusername=conn.execute("select regusername from users where regid="&sqlval(pvuserid))
		if rsaspeaseusername.eof then
			str=null
		else
			str=rsaspeaseusername(0)
		end if
	end if
rsaspeaseusername.close
set rsaspeaseusername=nothing
aspeaseusername = str
end function
function auctopnav(pspage,pscatid,psorder,pstype)
dim topnav
topnav=aspeasetable1yopen 
topnav=topnav&"<FORM action=""search.asp"" name=""myform"" method=""post"" onsubmit=""return isok(this)""> <tr class=tdbg1> <td height=25>"
topnav=topnav&" <a href="&pspage&"?"
topnav=topnav&"action=auc"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"
topnav=topnav&easeaucname
topnav=topnav&"</a>|<a href="&pspage&"?"
topnav=topnav&"action=buy"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"
topnav=topnav&easeykjname
topnav=topnav&"</a> |<a href="&pspage&"?"
topnav=topnav&"action=all"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"&easeallgoods&"</a>|<a href="&pspage&"?"
topnav=topnav&"action=new"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"&easenewgoods&"</a>|<a href="&pspage&"?"

topnav=topnav&"action=hot"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"&easehotgoods&"</a>|<a href="&pspage&"?"
topnav=topnav&"action=closing"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"&easeclosinggoods&"</a>|<a href="&pspage&"?"
topnav=topnav&"action=end"
if pscatid<>"" then
topnav=topnav&"&catid="&pscatid&""
end if
if psorder<>"" then
topnav=topnav&"&order="&psorder&""
end if
if pstype<>"" then
topnav=topnav&"&type="&pstype&""
end if
topnav=topnav&">"&easeclosedgoods&"</a>"
topnav=topnav&"</td>"
topnav=topnav&"<td><INPUT name=name1 onfocus=""if(this.value=='"&insearchbox&"')this.value='';"""
topnav=topnav&" size=10 value="&insearchbox&">"
topnav=topnav&" <select name=""searchtype"">"
topnav=topnav&"    <option value=""0"" selected>"&searchname&"</option>"
topnav=topnav&"    <option value=""1"">"&searchdesc&"</option>"
topnav=topnav&"    <option value=""2"">"&searchaucid&"</option>"
topnav=topnav&"    <option value=""3"">"&searchseller&"</option>"
topnav=topnav&"  </select><INPUT name=submit type=submit value="& searchbtn1 &">"
topnav=topnav&"&nbsp;&nbsp;&nbsp;<a href=sell.asp?catid="& fval(catid) &">" & easetosell & "</a></td>"
topnav=topnav&"    </tr></form>	" & aspeasetableclose
topnav=topnav&"<script language=""javascript"">"
topnav=topnav&chr(10)
topnav=topnav&"<!--"
topnav=topnav&chr(10)
topnav=topnav&"function isok(theform)"
topnav=topnav&chr(10)
topnav=topnav&"{"
topnav=topnav&chr(10)
topnav=topnav&"if ((theform.name1.value=="""") || (theform.name1.value=="""&insearchbox&"""))"
topnav=topnav&chr(10)
topnav=topnav&"  {"
topnav=topnav&chr(10)
topnav=topnav&"    alert("""&insearchbox&easenotnullname&"!"");"
topnav=topnav&chr(10)
topnav=topnav&"    theform.name1.focus();"
topnav=topnav&chr(10)
topnav=topnav&"    return (false);"
topnav=topnav&chr(10)
topnav=topnav&"  }"
topnav=topnav&chr(10)
topnav=topnav&"return (true);"
topnav=topnav&chr(10)
topnav=topnav&"}"
topnav=topnav&chr(10)
topnav=topnav&"-->"
topnav=topnav&chr(10)
topnav=topnav&"</script>"
auctopnav=topnav
end function
function checkuser(pvuserid)
if trim(pvuserid)="" or pvuserid=null or pvuserid=empty or isnumeric(pvuserid)=false then
	checkuser=false
else
	sqlchk="select regid from users where regid="&sqlval(pvuserid)
	set rschk=conn.execute(sqlchk)
	if rschk.eof then
		checkuser=false
	else
		checkuser=true
	end if
end if
end function
function ugrade(id)
dim rsgrade,rs1grade,rs1gradevalue,str
if id=null or isnumeric(id)=false then
	str=null
else
set rsgrade=conn.execute("select reggrade from users where regid="&sqlval(id))
set rs1grade=conn.execute("select grade_name from grade where grade_value="&sqlval(rsgrade(0)))
	if rs1grade.eof then
		rs1gradevalue=easeuserlevel1
	else
		rs1gradevalue=rs1grade(0)
	end if
	str="<a href=usercredit.asp?userid="&id&"><img alt=""" & easecreditpicalt1 & rs1gradevalue & easecreditpicalt2 & """ border=0 src=""images/"&rsgrade(0)&"star.gif""></a>"
end if
ugrade= str
rs1grade.close
rsgrade.close
end function
function aucgoods()
set rs=conn.execute("select count(auc_id) from auctions where auc_itemowner="&sqlval(userid))
    aucgoods=rs(0)
	set rs=nothing
	if isnull(aucgoods) then aucgoods=0
end function

function ahref(pvurl,pvtarget,pvalue)
str="<a href="""&pvurl&""" target=""_"&pvtarget&""">"&pvalue&"</a>"
ahref=str
end function
function uhaoping(pvid)
if isnull(pvid) or trim(pvid)="" or (not isnumeric(pvid)) then
	uhaoping="no"
else
	set rsuhp=conn.execute("select reghaoping,regzhongping,regchaping from users where regid="&sqlval(pvid))
	if rsuhp.eof then
		uhaoping="no"
	else
		if FVal(rsuhp("reghaoping"))+FVal(rsuhp("regzhongping"))+FVal(rsuhp("regchaping"))<>0 then
			uhaoping=round(FVal(rsuhp("reghaoping"))/(FVal(rsuhp("reghaoping"))+FVal(rsuhp("regzhongping"))+FVal(rsuhp("regchaping")))*100,2)&"%"
		else
			uhaoping="no"
		end if
	end if
rsuhp.close
set rsuhp=nothing
end if
end function
function ucredit(pvid)
dim str,rscrd
if isnull(pvid) or trim(pvid)="" or (not isnumeric(pvid)) then
	str="no"
else
	set rscrd=conn.execute("select regcredit from users where regid="&sqlval(pvid))
	if rscrd.eof then
		str="no"
	else
		str=rscrd(0)
	end if
rscrd.close
set rscrd=nothing
end if
ucredit=str
end function
function usellingall(id)
	dim sqlselling,rsselling,str
	sqlselling="select count(*) as sellnum from auctions where auc_ItemOwner="&id&" and auc_ended='N'"
	set rsselling=conn.execute(sqlselling)
		if not rsselling.eof then  
			str=FVal(rsselling(0))
		else 
			str= "0"
		end if
	rsselling.close
	set rsselling=nothing
	usellingall=str
end function
function uonline(id)
	dim rsonline,str
	set rsonline=conn.execute("select userid from online where userid="&id)
		if rsonline.eof then
			str="<img src=""images/offline.gif"" width=""60"" border=""0"" alt=""" & easeselleroffline & """>"
		else
			str="<img src=""images/online.gif"" width=""60"" border=""0"" height=""16"" alt=""" & easeselleronline & """>"
		end if
	rsonline.close
	set rsonline=nothing
	uonline=str
end function
function pjtype(pvtype)
if isnull(pvtype) or trim(pvtype)="" or (not isnumeric(pvtype)) then
	str=null
else
	dim str
	select case pvtype
		case 1
			str=easepingjiahao
		case 0
			str=easepingjiazhong
		case -1
			str=easepingjiacha
		case else
			str="NULL"
	end select
end if
pjtype=str
end function
function seeauctitle(id)
seesql="select auc_ItemTitle,auc_ended,auc_numleft,auc_AvailDate,auc_CloseDate from auctions where auc_id="&id
set rssee=conn.execute(seesql)
if not rssee.eof then
	str="<a href=""viewitem.asp?aucid="&id&""" target=_blank>"
	if evalbool(rssee("auc_ended")) or FVal(rssee("auc_numleft"))<=0 then
		str=str & " <font color=red>"&chkbadwords(rssee("auc_ItemTitle"),"goods")&" (" & easeclosedgoods & ") </font>"
	else
		str=str & "<font color=#dc6900>"&chkbadwords(rssee("auc_ItemTitle"),"goods")&"</font>"
	end if
	str=str & "</a>"
end if
seeauctitle=str
rssee.close
set rssee=nothing
end function
function SplitTd(pvnum,pvalue,palign)
if pvnum<1 then pvnum=1
if palign="" then palign="center"
dim sp,sp1,str
sp=split(pvalue,",")
str="<tr>"
for i=0 to ubound(sp) 
sp1=split(sp(i),"|")
str=str&"<td align="&palign&" class=tdbody1 width="&sp1(0)&">"&sp1(1)&"</td>"
next
str=str&"</tr>"
splittd=str
end function
function SplitTh(pvnum,pvalue,palign)
if pvnum<1 then pvnum=1
if palign="" then palign="center"
dim sp,sp1,str
sp=split(pvalue,",")
str="<tr>"
for i=0 to ubound(sp) 
sp1=split(sp(i),"|")
str=str&"<th align="&palign&" width="&sp1(0)&">"&sp1(1)&"</th>"
next
str=str&"</tr>"
splitth=str
end function
function easebidtimes(pvid)
if isnull(pvid) or isnumeric(pvid)=false then easebidtimes="0"
sql3="select count(*) as Bnum from bids where bidItemID="&sqlval(pvid)
set rs3=conn.execute(sql3)
if rs3.eof then 
	easebidtimes="0"
else
	easebidtimes=rs3("Bnum")
end if
rs3.close
set rs3=nothing
end function
class Cache
	private obj			'cache内容
	private expireTime		'过期时间
	private expireTimeName	'过期时间application名
	private cacheName		'cache内容application名
	private path			'uri	
	private sub class_initialize()
		path=request.servervariables("url")
		path=left(path,instrRev(path,"/"))
	end sub
	
	private sub class_terminate()
	end sub
	
	public property get blEmpty
		'是否为空
		if isempty(obj) then
			blEmpty=true
		else
			blEmpty=false
		end if
	end property
	
	public property get valid
		'是否可用(过期)
		if isempty(obj) or not isDate(expireTime) then
			valid=false
		elseif CDate(expireTime)<now then
				valid=false
		else
			valid=true
		end if
	end property
	
	public property let name(str)
		'设置cache名
		cacheName=str & path
		obj=application(cacheName)
		expireTimeName=str & "expires" & path
		expireTime=application(expireTimeName)
	end property
	
	public property let expires(tm)
		'重设置过期时间
		expireTime=tm
		application.lock
		application(expireTimeName)=expireTime
		application.unlock
	end property
	
	public sub add(var,expire)
		'赋值
		if isempty(var) or not isDate(expire) then
			exit sub
		end if
		obj=var
		expireTime=expire
		application.lock
		application(cacheName)=obj
		application(expireTimeName)=expireTime
		application.unlock
	end sub
	
	public property get value
		'取值
		if isempty(obj) or not isDate(expireTime) then
			value=null
		elseif CDate(expireTime)<now then
			value=null
		else
			value=obj
		end if
	end property
	
	public sub makeEmpty()
		'释放application
		application.lock
		application(cacheName)=empty
		application(expireTimeName)=empty
		application.unlock
		obj=empty
		expireTime=empty
	end sub
	
	public function equal(var2)
		'比较
		if typename(obj)<>typename(var2) then
			equal=false
		elseif typename(obj)="Object" then
			if obj is var2 then
				equal=true
			else
				equal=false
			end if
		elseif typename(obj)="Variant()" then
			if join(obj,"^")=join(var2,"^") then
				equal=true
			else
				equal=false
			end if
		else
			if obj=var2 then
				equal=true
			else
				equal=false
			end if
		end if
	end function
end class%> 

⌨️ 快捷键说明

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