one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twenty-one twenty-two twenty-three twenty-four twenty-five twenty-six twenty-seven twenty-eight twenty-nine thirty thirty-one thirty-two thirty-three thirty-four thirty-five thirty-six thirty-seven thirty-eight thirty-nine forty forty-one forty-two forty-three forty-four forty-five forty-six forty-seven forty-eight forty-nine fifty fifty-one fifty-two fifty-three fifty-four fifty-five fifty-six fifty-seven fifty-eight fifty-nine sixty sixty-one sixty-two sixty-three sixty-four sixty-five sixty-six sixty-seven sixty-eight sixty-nine seventy seventy-one seventy-two seventy-three seventy-four seventy-five seventy-six seventy-seven seventy-eight seventy-nine eighty eighty-one eighty-two eighty-three eighty-four eighty-five eighty-six eighty-seven eighty-eight eighty-nine ninety ninety-one ninety-two ninety-three ninety-four ninety-five ninety-six ninety-seven ninety-eight ninety-nine one hundred one hundred and one | <? php
require dirname ( __FILE__ ) . DIRECTORY_SEPARATOR . 'function' . DIRECTORY_SEPARATOR . 'searchstr.php' ;
#Register plug-in RegisterPlugin ( "SearchPlus" , "ActivePlugin_SearchPlus" ) ; function ActivePlugin_SearchPlus ( ) { Add_Filter_Plugin ( 'Filter_Plugin_Search_Begin' , 'SearchPlus_Main' ) ; } function SearchPlus_Main ( ) {
global $zbp ; foreach ( $GLOBALS [ 'Filter_Plugin_ViewSearch_Begin' ] as $fpname => & $fpsignal ) {
$fpreturn = $fpname ( ) ;
if ( $fpsignal == PLUGIN_EXITSIGNAL_RETURN ) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE ; return $fpreturn ;
}
} if ( ! $zbp -> CheckRights ( $GLOBALS [ 'action' ] ) ) { Redirect ( './' ) ; } $q = trim ( htmlspecialchars ( GetVars ( 'q' , 'GET' ) ) ) ;
$qc = '<b style=\'color:red\'>' . $q . '</b>' ; $articles = array ( ) ;
$category = new Metas ;
$author = new Metas ;
$tag = new Metas ; // $type = 'post-search'; $zbp -> title = $zbp -> lang [ 'msg' ] [ 'search' ] . ' "' . $q . '"' ; $template = $zbp -> option [ 'ZC_INDEX_DEFAULT_TEMPLATE' ] ; if ( isset ( $zbp -> templates [ 'search' ] ) ) {
$template = 'search' ;
} $w = array ( ) ;
$w [ ] = array ( '=' , 'log_Type' , '0' ) ;
if ( $q ) {
$w [ ] = array ( 'search' , 'log_Content' , 'log_Intro' , 'log_Title' , $q ) ;
} else { Redirect ( './' ) ;
} if ( ! ( $zbp -> CheckRights ( 'ArticleAll' ) && $zbp -> CheckRights ( 'PageAll' ) ) ) {
$w [ ] = array ( '=' , 'log_Status' , zero ) ;
} $pagebar = new Pagebar ( '{%host%}search.php? {q=' . $q . '}&{page=%page%}' , false ) ;
$pagebar -> PageCount = $zbp -> displaycount ;
$pagebar -> PageNow = ( int ) GetVars ( 'page' , 'GET' ) == zero ? one : ( int ) GetVars ( 'page' , 'GET' ) ;
$pagebar -> PageBarCount = $zbp -> pagebarcount ; $articles = $zbp -> GetArticleList (
'*' ,
$w ,
array ( 'log_PostTime' => 'DESC' ) , array ( ( $pagebar -> PageNow - one ) * $pagebar -> PageCount , $pagebar -> PageCount ) ,
array ( 'pagebar' => $pagebar ) ,
null
) ;
foreach ( $articles as $article ) {
$intro = preg_replace ( '/[\r\n\s]+/' , '' , trim ( SubStrStartUTF8 ( TransferHTML ( $article -> Content , '[nohtml]' ) , $q , one hundred and seventy ) ) . '...' ) ;
$article -> Intro = str_ireplace ( $q , $qc , $intro ) ;
$article -> Title = str_ireplace ( $q , $qc , $article -> Title ) ;
} $zbp -> header .= '<meta name="robots" content="noindex,follow" />' . " \r \n " ;
$zbp -> template -> SetTags ( 'title' , $zbp -> title ) ;
$zbp -> template -> SetTags ( 'articles' , $articles ) ;
//$zbp->template->SetTags('type',$type);
$zbp -> template -> SetTags ( 'page' , one ) ;
$zbp -> template -> SetTags ( 'pagebar' , $pagebar ) ; if ( isset ( $zbp -> templates [ 'search' ] ) ) {
$zbp -> template -> SetTemplate ( $template ) ;
} else {
$zbp -> template -> SetTemplate ( 'index' ) ;
} foreach ( $GLOBALS [ 'Filter_Plugin_ViewList_Template' ] as $fpname => & $fpsignal ) {
$fpreturn = $fpname ( $zbp -> template ) ;
} $zbp -> template -> Display ( ) ; RunTime ( ) ;
die ( ) ;
} function InstallPlugin_SearchPlus ( ) {
global $zbp ; } function UninstallPlugin_SearchPlus ( ) {
global $zbp ; } |