📄 char.asp
字号:
else
str=str&"<tr><td width=60%\>" & easegoodsname & "</td><td width=20%\>" & easecurrentbid & "</td><td width=20%\>" & easegoodsowner & "</td></tr>"
rsindex.movefirst
i=0
do while not rsindex.eof
i=i+1
if i=fval(snum) then exit do
str=str&"<tr><td width=60%\><img src=images/hit.gif><a href=viewitem.asp?aucid="&fval(rsindex(0))&" target=_blank>"&rsindex(1)
if rsindex(2)=1 then
str=str&"<font color=red>(" & easeykjname & ")</font>"
end if
str=str&"</a></td><td>"&rsindex(4)&"</td><td width=20%\>"&rsindex(3)&"</td></tr>"
rsindex.movenext
loop
end if
rsindex.close
set rsindex=nothing
str=str&aspeasetableclose
getindex=str
end function
function newshopindex(snum)
dim strsql,rsindex
strsql="select top "&fval(snum)&" * FROM shops,users where shopownerid=regid order by shopopenDate desc"
set rsindex=server.createobject("adodb.recordset")
rsindex.open strsql,conn,1,1
str="<table border=0 width=95%\>"
if not(rsindex.eof and rsindex.bof) then
rsindex.movefirst
do while not rsindex.eof
str=str&"<tr><td style=padding-left:5px><img src=images/hit.gif><a href=usershop.asp?shopid="& rsindex(0) &" target=_blank>" & rsindex("shopname") & "</a></td></tr>"
rsindex.movenext
loop
else
str=str&"<tr><td>"&easeshopnoshops&"</td></tr>"
end if
rsindex.close
set rsindex=nothing
str=str&"</table>"
newshopindex=str
end function
function chkregValidated()
dim sqlsss,rssss
sqlsss = "select regValidated from users where regValidated='Y' and regid=" & userid
set rssss =conn.execute(sqlsss)
if rssss.eof then
chkregValidated=false
else
chkregValidated=true
end if
rssss.close
set rssss=nothing
end function
function editeasearray(svalue,sarray,stype,formtype,formname)
dim a,i,str
str=""
a=split(sarray,stype)
if formtype="r" then
for i=0 to ubound(a)
str=str&"<input type=""radio"" name="& formname &" value="& a(i)
if a(i)=svalue then
str=str&" checked"
End If
str=str&">"& a(i)
next
else
str=str&"<select name="&formname&">"
for i=0 to ubound(a)
str=str&"<option value="&a(i)
if a(i)=svalue then
str=str&" selected"
End If
str=str&">"&a(i)&"</option>"&chr(10)
next
str=str&"</select>"
end if
editeasearray=str
end function
function easearray(svalue,stype,formtype,formname)
dim a,i,str
str=""
a=split(svalue,stype)
if formtype="r" then
for i=0 to ubound(a)
str=str&"<input type=""radio"" name="& formname &" value="& a(i)
if i=0 then
str=str&" checked"
End If
str=str&">"& a(i)
next
else
str=str&"<select name="&formname&">"
for i=0 to ubound(a)
str=str&"<option value="&a(i)&">"&a(i)&"</option>"&chr(10)
next
str=str&"</select>"
end if
easearray=str
end function
function easearray1(svalue,stype,formtype,formname)
dim a,i,str
str=""
a=split(svalue,stype)
if formtype="r" or formtype="radio" then
for i=0 to ubound(a)
str=str&"<input type=""radio"" name="& formname &" value="&i
If i=0 then
str=str&" checked"
End If
str=str&">"& i
next
elseif formtype="s" or formtype="select" then
str=str&"<select name="&formname&">"
for i=0 to ubound(a)
str=str&"<option value="&i&">"&a(i)&"</option>"&chr(10)
next
str=str&"</select>"
else
str=""
end if
easearray1=str
end function
function editeasearray1(sno,svalue,stype,formtype,formname)
dim a,i,str
str=""
a=split(svalue,stype)
if formtype="r" or formtype="radio" then
for i=0 to ubound(a)
str=str&"<input type=""radio"" name="& formname &" value="&i
if i=fval(sno) then
str=str&" checked"
End If
str=str&">"& i
next
elseif formtype="s" or formtype="select" then
str=str&"<select name="&formname&">"
for i=0 to ubound(a)
str=str&"<option value="&i
if i=fval(sno) then
str=str&" selected"
end if
str=str&">"&a(i)&"</option>"&chr(10)
next
str=str&"</select>"
else
str=str&a(fval(sno))
end if
editeasearray1=str
end function
function easearray2(svalue,stype)
dim a,i,str
a=split(svalue,stype)
str=""
for i=0 to ubound(a)
str=str&"<option value="""&a(i)&""">"&a(i)&"</option>"&chr(10)
next
easearray2=str
end function
function aspeaseaucname(pvaucid)
dim str
if pvaucid=null or trim(pvaucid)="" or isnumeric(pvaucid)=false then
str=null
else
dim rseaseaucname
set rseaseaucname=conn.execute("select auc_itemtitle from auctions where auc_id="&sqlval(pvaucid))
if rseaseaucname.eof then
str=null
else
str=rseaseaucname(0)
end if
rseaseaucname.close
set rseaseaucname=nothing
end if
aspeaseaucname=str
end function
Function ReadFile(psFile)
Dim objFSO
Dim objTS
On Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Err.Number = 0 Then
Set objTS = objFSO.OpenTextFile(psFile)
If Err.Number = 0 Then
sTemp = objTS.ReadAll
objTS.Close
ReadFile = sTemp
Else
ReadFile = ""
End If
Else
ReadFile = ""
End If
Set objTS = Nothing
Set objFSO = Nothing
On Error Goto 0
End Function
Function GetFirstLine(psString)
Dim sLine
Dim lAt
sLine = ""
lAt = Instr(1, psString, Chr(13))
If lAt > 0 Then
sLine = Left(psString, lAt - 1)
psString = Right(psString, Len(psString) - lAt )
If Left(psString, 1) = Chr(10) Then
psString = Right(psString, Len(psString) - 1)
End If
End If
GetFirstLine = sLine
End Function
function checkfpage(psaction,pscatid,psorder,pstype)
dim str
str=""
if psaction<>"" then
str=str&"action="&psaction&""
if pscatid<>"" then
str=str&"&catid="&pscatid&""
if psorder<>"" then
str=str&"&order="&psorder&""
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
else
str=str
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
end if
else
str=str
if psorder<>"" then
str=str&"&order="&psorder&""
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
else
str=str
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
end if
end if
else
str=str
if pscatid<>"" then
str=str&"catid="&pscatid&""
if psorder<>"" then
str=str&"&order="&psorder&""
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
else
str=str
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
end if
else
str=str
if psorder<>"" then
str=str&"order="&psorder&""
if pstype<>"" then
str=str&"&type="&pstype&""
else
str=str
end if
else
str=str
if pstype<>"" then
str=str&"type="&pstype&""
else
str=str
end if
end if
end if
end if
checkfpage=str
end function
function Fpage(postpage,psaction,pscatid,psorder,pstype)
str=aspeasetable1yopen
str=str&" <form name=""frmfpage"" method=""post"" action="
if postpage<>"" then
str=str& postpage &"?"&""
end if
str=str&checkfpage(psaction,pscatid,psorder,pstype)
str=str&"><TR class=tdbg1> "
str=str&" <TD align=""center"" width=""35%"" height=""25"">"
str=str&"<IMG height=""14"" src=""images/cha.gif"" width=""14"" align=absMiddle>"
str=str& easespagefirst&"[<font color=""#FF6666"">"&totalcs&"</font>]"&easespagesecond&" "&easespagethird&"[<font color=""#FF6666"">"&totalpages&"</font>]"&easespagefourth&"</TD>"
str=str&" <TD width=""40%"" align=""center"">"
str=str&"<IMG height=""11"" src=""images/lt.gif"" width=""11"" align=absMiddle>"
if CurrentPage<2 then
str=str&"<font color='999966'>"&easefirstpage&" "&easepreviouspage&"</font> "
else
str=str& "<a href="&postpage&"?"
str=str&checkfpage(psaction,pscatid,psorder,pstype)
if psaction="" and pscatid="" and psorder="" and pstype="" then
str=str&"page=1>"&easefirstpage&"</a> "
else
str=str&"&page=1>"&easefirstpage&"</a> "
end if
str=str& "<a href="&postpage&"?"
str=str&checkfpage(psaction,pscatid,psorder,pstype)
if psaction="" and pscatid="" and psorder="" and pstype="" then
str=str&"page="&CurrentPage-1&">"&easepreviouspage&"</a> "
else
str=str&"&page="&CurrentPage-1&">"&easepreviouspage&"</a> "
end if
end if
if totalpages-currentpage<1 then
str=str&"<font color='999966'>"&easenextpage&" "&easelastpage&"</font>"
else
str=str&"<a href="&postpage&"?"
str=str&checkfpage(psaction,pscatid,psorder,pstype)
if psaction="" and pscatid="" and psorder="" and pstype="" then
str=str&"page="&CurrentPage+1&">"&easenextpage&"</a> "
else
str=str&"&page="&CurrentPage+1&">"&easenextpage&"</a> "
end if
str=str&"<a href="&postpage&"?"
str=str&checkfpage(psaction,pscatid,psorder,pstype)
if psaction="" and pscatid="" and psorder="" and pstype="" then
str=str&"page="&totalpages&">"&easelastpage&"</a> "
else
str=str&"&page="&totalpages&">"&easelastpage&"</a> "
end if
end if
str=str&" <IMG height=""11"" src=""images/gt.gif"" width=""11"" align=absMiddle></TD>"
str=str&" <TD align=""center"" width=""25%"">"
str=str&" <input type=""text"" name=""page"" size=""4"" "
if totalpages<2 then
str=str&"disabled"
end if
str=str&"> <input type=""submit"" name=""sSubmit"" value="&easegotopagebutton&" "
if totalpages<2 then
str=str&"disabled"
end if
str=str&"> </TD></TR> </form>"&aspeasetableclose
Fpage=str
end function
function showallitems(pspagesize)
dim str
str=""
str=str&aspeasetable1yopen
str=str&" <tr> <script language=""JavaScript"" src=""js/setimage.js""></script>"
str=str&" <td width=""85"" nowrap bgcolor=""" & listtop1 & """><div align=""center""><A href=""javascript:"" onclick=SetImg()>" & easeshowhidepic
str=str&"</a></div></td>"
str=str&" <td width=""194"" nowrap bgcolor=""" & listtop2 & """><div align=""center"">" & easegoodsname
str=str&"</div></td>"
str=str&" <td width=""80"" nowrap bgcolor=""" & listtop1 & """>"
str=str&"<div align=""center"">" & easecurrentbid & "</div></td>"
str=str&" <td width=""57"" nowrap bgcolor=""" & listtop2 & """>"
str=str&"<div align=""center"">" & easebidsnum & "</div></td>"
str=str&" <td width=""50"" nowrap bgcolor=""" & listtop1 & """>"
str=str&"<div align=""center"">" & easegoodsleftnum & "</div></td>"
str=str&" <td width=""103"" nowrap bgcolor=""" & listtop2 & """>"
str=str&"<div align=""center"">" & easegoodsowner & "</div></td>"
str=str&" <td width=""92"" nowrap bgcolor=""" & listtop1 & """>"
str=str&"<div align=""center"">" & easegoodsplace & "</div></td>"
str=str&" <td width=""56"" nowrap bgcolor=""" & listtop2 & """>"
str=str&"<div align=""center"">" & easelefttime & "</div></td>"
str=str&" </tr>"
if rs.eof and rs.bof then
str=str&"<tr><td nowrap height=""30"" colSpan=8 class=tdbg2>" & easenogoods & "</td></tr>"
else
if pspagesize="" or pspagesize=null or pspagesize=empty or pspagesize=0 then
pspagesize=10
end if
auction_page=pspagesize%>
<!--#include file="libt.inc"-->
<%str=str&"<tr align=""center"" "
if i mod 2 =0 then
str=str&"class=tdbg2"
else
str=str&"class=tdbg1"
end if
str=str&"> "
str=str&" <td><DIV id=NoImg style=""DISPLAY: none"" align=""center"">"
str=str&"<a href=""" & rs("auc_ImageURL") & """ target=_blank>" & easeseepic & "</a></div>"
str=str&"<DIV id=SeeImg align=""center""><A href=""viewitem.asp?aucid=" & FVal(rs("auc_ID")) & """ target=_blank>"
str=str&"<IMG border=0 height=50 src=""" & rs("auc_ImageURL") & """ width=70></A> </DIV></td>"
str=str&" <td><a href=""viewitem.asp?aucid=" & FVal(rs("auc_ID")) & """ target=_blank>" & rs("auc_ItemTitle")
if FVal(rs("auc_Isbuygoods"))=1 then
str=str&"<b><font color=red>(" & easeykjname & ")</font></b>"
end if
str=str&"</a></td>"
str=str&" <td>" & FVal(rs("auc_CurrentBid")) & "</td>"
str=str&" <td>" & easebidtimes(sqlval(rs("auc_id"))) & "</td>"
str=str&" <td>" & FVal(rs("auc_numleft")) & "</td>"
str=str&" <td>" & aspeaseusername(sqlval(rs("auc_ItemOwner"))) & "</td>"
str=str&" <td>" & easeshowfldvalue("users","regid",sqlval(rs("auc_ItemOwner")),"regState,regCity") & "</td>"
str=str&" <td>" & auclefttime(rs("auc_id"),"short") & "</td>"
str=str&" </tr>" %>
<!--#include file="libf.inc"-->
<%end if
str=str&aspeasetableclose
showallitems=str
end function
function easeshowfldvalue(pvtable,pvid,pvinvalue,pvoutvalue)
dim str,sqlfldvalue,rssqlfldvalue,j
str=""
if pvid=null or pvinvalue=null or pvtable=null or pvoutvalue=null then
str=""
else
sqlfldvalue="select " & pvoutvalue & " from " & pvtable & " where " & pvid & " = " & pvinvalue & ""
set rssqlfldvalue=conn.execute(sqlfldvalue)
if rssqlfldvalue.eof then
str=""
else
pvoutvalue=split(pvoutvalue,",")
for j=0 to ubound(pvoutvalue)
str=str&rssqlfldvalue(pvoutvalue(j))
if j<>ubound(pvoutvalue) then
str=str&","
end if
next
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -