<% ''' 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,"" sdcms.db.dbclose %>