Warning: mkdir(): No space left on device in /www/wwwroot/T2T3Z8.COM/func.php on line 127
Warning: file_put_contents(./cachefile_yuan/yrxcz.com/cache/9f/a69fa/3527a.html): failed to open stream: No such file or directory in /www/wwwroot/T2T3Z8.COM/func.php on line 115
<%
''' SDCMS 搜索
''' ==================================================================
''' 版权所有 http://www.sdcms.cn
''' ------------------------------------------------------------------
''' 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用;
''' 未经授权不允许对程序代码以任何形式任何目的的再发布。
''' ==================================================================
''' 编写: IT平民
''' 修改:IT平民 in 2014.07 dim sql_where:sql_where=""
dim classid:classid=sdcms.getint(sdcms.fget("classid",0),0)
dim key:key=sdcms.enhtml(sdcms.fget("key",0))
dim keylen:keylen=sdcms.strlen(key)
if keylen<=0 then
dim errormsg:errormsg="关键字不能为空"
end if
if keylen<2 then
errormsg="关键字不能小于2个字符"
end if
if keylen>10 then
errormsg="关键字不能大于10个字符"
end if
if errormsg<>"" then
sdcms.show theme_404,""
sdcms.die
end if
if datatype then
sql_where=sql_where&" and instr(1,lcase(title),lcase('"&key&"'),0)<>0"
else
sql_where=sql_where&" and title like '%"&key&"%'"
end if
if classid<>0 then
sql_where=sql_where&"and classid in("&sdcms.get_sonid(classid)&")"
end if
sdcms.show theme_search,""
if html_page_total<>0 and page=1 then
addsearchkey key
end if
sdcms.db.dbclose
sub addsearchkey(byval t0)
if sdcms.loadcookie("search_keyword_"&t0)="" then
dim rs
set rs=server.createobject("adodb.recordset")
rs.open "select title,hits,islock from sd_expand_keyword where title='"&t0&"'",sdcms.db.conn,1,3
if rs.eof then
rs.addnew
rs(0)=t0
rs(1)=1
rs(2)=1
else
rs.update
rs(1)=rs(1)+1
end if
rs.update
rs.close
set rs=nothing
sdcms.setcookie "search_keyword_"&t0,t0
end if
end sub
%>