<fh-function>
$keyword=t($_REQUEST["keyword"]);
$page=$_GET["page"];
if($page==""){
  $page=1;
}

$sql="select count(*) as L_count from
(select N_id as id,N_title as title,N_pic as pic,N_content as content,'newsinfo' as type from sl_news where N_del=0 and N_sh=1 and (N_title like '%".$keyword."%' or N_content like '%".$keyword."%' )
union select S_id as id,S_title as title,S_pic as pic,S_content as content,'news' as type from sl_nsort where S_del=0 and (S_title like '%".$keyword."%' or S_content like '%".$keyword."%' )
union select C_id as id,C_title as title,C_pic as pic,C_content as content,'courseinfo' as type from sl_course where C_del=0 and (C_title like '%".$keyword."%' or C_content like '%".$keyword."%' )
union select S_id as id,S_title as title,S_pic as pic,S_content as content,'course' as type from sl_usort where S_del=0 and (S_title like '%".$keyword."%' or S_content like '%".$keyword."%' )
union select P_id as id,P_title as title,P_pic as pic,P_content as content,'productinfo' as type from sl_product where P_del=0 and P_sh=1 and (P_title like '%".$keyword."%' or P_content like '%".$keyword."%' )
union select S_id as id,S_title as title,S_pic as pic,S_content as content,'product' as type from sl_psort where S_del=0 and (S_title like '%".$keyword."%' or S_content like '%".$keyword."%' )
union select T_id as id,T_title as title,T_pic as pic,T_content as content,'text' as type from sl_text where T_del=0 and (T_title like '%".$keyword."%' or T_content like '%".$keyword."%' ))a";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
$L_count=$row["L_count"];

$page_num=intval($L_count/20)+1;
if($L_count%20 ==0){
  $page_num=$page_num-1;
}
</fh-function>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">
<title>搜索<fh-function> $api=$api.$keyword;</fh-function> -[fh_title]</title>
<link href="media/[fh_ico]" rel="shortcut icon" />
<meta name="description" content="[fh_description]" />
<meta name="keywords" content="[fh_keyword]" />
<meta name='robots' content='max-image-preview:large' />
<link rel='stylesheet' id='app-css'  href='template/t15/wp-content/themes/fh/assets/css/app.css?ver=8.7.0' type='text/css' media='all' />
<link rel='stylesheet' id='ripro_chlid_style-css'  href='template/t15/wp-content/themes/fh2/diy.css?ver=5.7.2' type='text/css' media='all' />
<link rel='stylesheet' id='pure-highlightjs-style-css'  href='template/t15/wp-content/plugins/Pure-Highlightjs-master/highlight/styles/default.css?ver=0.9.2' type='text/css' media='all' />
<link rel='stylesheet' id='pure-highlightjs-css-css'  href='template/t15/wp-content/plugins/Pure-Highlightjs-master/assets/pure-highlight.css?ver=0.1.0' type='text/css' media='all' />
<link rel='stylesheet' id='external-css'  href='template/t15/wp-content/themes/fh/assets/css/external.css?ver=8.7.0' type='text/css' media='all' />
<link rel='stylesheet' id='sweetalert2-css'  href='template/t15/wp-content/themes/fh/assets/css/sweetalert2.min.css?ver=8.7.0' type='text/css' media='all' />
<link rel='stylesheet' id='diy-css'  href='template/t15/wp-content/themes/fh/assets/css/diy.css?ver=8.7.0' type='text/css' media='all' />
<script type='text/javascript' src='template/t15/wp-content/themes/fh/assets/js/jquery-2.2.4.min.js?ver=2.2.4' id='jquery-js'></script>
<script type='text/javascript' src='template/t15/wp-content/themes/fh/assets/js/plugins/sweetalert2.min.js?ver=8.7.0' id='sweetalert2-js'></script>
<link href="css/Pager.css" rel="stylesheet" type="text/css" />
<style type="text/css">@media (min-width: 1200px) { .container,.container-lg,.container-md,.container-sm,.container-xl { max-width:1300px } }
.footer-links {
    text-align: center;
}</style>	<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
      <script src="template/t15/wp-content/themes/fh/assets/js/html5shiv.js"></script>
      <script src="template/t15/wp-content/themes/fh/assets/js/respond.min.js"></script>
    <![endif]-->
    <script>
	if(("standalone" in window.navigator) && window.navigator.standalone){
		var noddy, remotes = false;
		document.addEventListener('click', function(event) {
			noddy = event.target;
			while(noddy.nodeName !== "A" && noddy.nodeName !== "HTML") {
				noddy = noddy.parentNode;
			}
			if('href' in noddy && noddy.href.indexOf('http') !== -1 && (noddy.href.indexOf(document.location.host) !== -1 || remotes)){
				event.preventDefault();
				document.location.href = noddy.href;
			}
	
		},false);
	}
	</script>
</head>

<body class="archive category category-9  max_width hfeed navbar-sticky navbar-slide sidebar-none pagination-infinite_button">

<div class="site">
    
[fh_header]

<div class="header-gap"></div><div class="term-bar lazyload visible" data-bg="[S_pic]">
  <h1 class="term-title">搜索“<fh-function> $api=$api.$keyword;</fh-function>”</h1></div>    
    <div class="site-content">
    

<div class="container">
<div class="filter--content">
    <form class="mb-0" method="get" action="">
        <input type="hidden" name="s">
        <div class="form-box search-properties mb-0">
            <!-- 一级分类 -->

            <div class="filter-item">
                                   

            </div>
            
            <!-- .row end -->
        </div>
        <!-- .form-box end -->
    </form>
</div>



  <div class="row">
    <div class="col-lg-12">
      <div class="content-area">
        <main class="site-main">
                      <div class="row posts-wrapper">


<fh-function>
if($keyword==""){
  $api=$api."请输入要查询的关键词！";
}else{

$sql="select id,title,pic,content,type from(
select P_id as id,P_title as title,P_pic as pic,P_content as content,'productinfo' as type from sl_product where P_del=0 and P_sh=1 and (P_title like '%".$keyword."%' or P_content like '%".$keyword."%' )
union select S_id as id,S_title as title,S_pic as pic,S_content as content,'product' as type from sl_psort where S_del=0 and (S_title like '%".$keyword."%' or S_content like '%".$keyword."%' )
union select N_id as id,N_title as title,N_pic as pic,N_content as content,'newsinfo' as type from sl_news where N_del=0 and N_sh=1 and (N_title like '%".$keyword."%' or N_content like '%".$keyword."%' )
union select S_id as id,S_title as title,S_pic as pic,S_content as content,'news' as type from sl_nsort where S_del=0 and (S_title like '%".$keyword."%' or S_content like '%".$keyword."%' )
union select C_id as id,C_title as title,C_pic as pic,C_content as content,'courseinfo' as type from sl_course where C_del=0 and (C_title like '%".$keyword."%' or C_content like '%".$keyword."%' )
union select S_id as id,S_title as title,S_pic as pic,S_content as content,'course' as type from sl_usort where S_del=0 and (S_title like '%".$keyword."%' or S_content like '%".$keyword."%' )

union select T_id as id,T_title as title,T_pic as pic,T_content as content,'text' as type from sl_text where T_del=0 and (T_title like '%".$keyword."%' or T_content like '%".$keyword."%' ))a limit ".(($page-1)*20).",20";

$result = mysqli_query($conn,  $sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {

        $search_info=$search_info.'<div class="col-lg-1-5 col-6 col-sm-6 col-md-4 col-lg-3">
  <article id="post-10742" class="post post-grid post-10742 type-post status-publish format-standard has-post-thumbnail hentry category-uncategorized tag-65">
      <div class="entry-media">
    <div class="placeholder" style="padding-bottom: 60%;">
      <a  href="?type='.$row['type'].'&id='.$row['id'].'" >
        <img class="lazyload" data-src="'.pic(splitx($row['pic'],'|',0)).'" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="'.$row['title'].'">  
      </a>
          </div>
      </div>
      <div class="entry-wrapper">
              <a class="grid_author_avt" href="?type='.$row['type'].'&id='.$row['id'].'" ><div class="grid_author_bggo avatar bg-cover" style="background-image: url('.$author_pic.');"></div> </a>
            
  <header class="entry-header">          <div class="entry-meta">

      </div>
    
    <h2 class="entry-title"><a href="?type='.$row['type'].'&id='.$row['id'].'" title="'.$row['title'].'" rel="bookmark">'.str_Replace($keyword,'<font color=\'red\'>'.$keyword.'</font>',$row['title']).'</a></h2>  </header>             
    <div class="entry-excerpt u-text-format">'.str_replace($keyword,'<font color=\'red\'>'.$keyword.'</font>',mb_substr(strip_tags($row['content']),0,100,'utf-8')).'</div>
            <div class="entry-footer">

</div>    </div>
  </article>
</div>';

    }
  $api=$api.$search_info;
}else{
  $api=$api."抱歉！未找到“".$keyword."”的相关内容，请尝试其他关键词！";
}
}
                    
</fh-function>

            </div>
            
  <div class="infinite-scroll-status">
    <div class="infinite-scroll-request"></div>
  </div>
  <div class="infinite-scroll-action">
    <div id="pager"></div>
  </div>
                  </main>
      </div>
    </div>

    

      </div>



</div>
</div><!-- end sitecoent --> 
<script src="js/jquery.pager.js" type="text/javascript"></script>
<script>


$(document).ready(function() {
    $("#pager").pager({ pagenumber: <fh-function> $api=$api.$page;</fh-function>, pagecount: <fh-function> $api=$api.$page_num;</fh-function>, buttonClickCallback: PageClick });
});

PageClick = function(pageclickednumber) {
  window.location="?type=search&keyword=<fh-function> $api=$api.$keyword;</fh-function>&page="+pageclickednumber;
}
</script>
	[fh_footer]
</body>
</html>