<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/10)+1;
if($L_count%10 ==0){
  $page_num=$page_num-1;
}
</fh-function>
<!DOCTYPE HTML>
<html class="">
<head>
<meta name="renderer" content="webkit">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="generator" content="author"  data-variable="/,cn,10001,,10001,M1156014" />
<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]" />

<link rel='stylesheet' href='template/t13/skin/css/index.css'>
<link href="css/Pager.css" rel="stylesheet" type="text/css" />
<style>
.search_pic{padding:5px;border:#CCCCCC solid 1px;width:100%;max-width:150px;min-width:100px;}
table{width: 100%;}
.search_area{}
.search_area .list{padding: 10px;}
.search_area td{padding: 10px;}
</style>
</head>

<body>
<!--[if lte IE 8]>
<div class="text-center padding-top-50 padding-bottom-50 bg-blue-grey-100">
  <p class="browserupgrade font-size-18">
	你正在使用一个<strong>过时</strong>的浏览器。请<a href="http://browsehappy.com/" target="_blank">升级您的浏览器</a>，以提高您的体验。
  </p>
</div>
<![endif]-->
<div class="load-box"></div>
<header>
  <div class="head-box" style="background: #ffffff;height: 70px;">
    <div class="container">
      <div class="head-left">
        <div class="head-left-wrapper">
          <div class="head-left-slide">
            <div class="logo-box" style="height: 70px;line-height: 70px;"> <a href="./" title="[fh_title]"> <img src="media/[fh_logo]" alt="[fh_title]" style="max-height: 70px"> </a> </div>
            <div class="search-box hidden-xs" style="margin: 15px ">
          <div class="search-cut">
            <form  name="formsearch" action="./?type=search" method="post" style="border: solid 1px #EEEEEE;border-radius: 20px; ">
              <input type="text" name="keyword" value="<fh-function>$api=$api.$keyword;</fh-function>" placeholder="输入关键词" style="border-radius: 20px;border: none;height: 40px">
              <button class="fa fa-search" type="submit" style="border-radius: 25px;border: none;height: 40px;line-height: 38px"></button>
            </form>
          </div>
        </div>
          </div>
        </div>
      </div>
      <div style="position: absolute;top: 15px;right: 10px;">
        <div style="display: inline-block;" class="hidden-xs">
        <a href="member/history.php?type=2">学习记录</a> &nbsp;|&nbsp; 
        <a href="member/vip.php">会员特权</a>&nbsp; &nbsp; &nbsp; 
      </div>
      
      <div style="background: #FFD500;border-radius: 20px;padding: 0 20px;top:15px;display: inline-block;"> 
        <fh-function>
      if($_SESSION["M_login"]==""){
        $api="<a class=\"login\" href=\"member/login.php\">登录</a>
              &nbsp;|&nbsp;
              <a class=\"login\" href=\"member/reg.php\">注册</a>";
      }else{
        $api="<a class=\"login\" href=\"member\">".$_SESSION["M_login"]."</a>
              &nbsp;|&nbsp;
              <a class=\"login\" href=\"member/login.php?action=unlogin\">退出</a>";
      }
      </fh-function>
      </div>
      </div>
    </div>
  </div>
  <nav>
    <div class="neck-box" style="background: #f7f7f7">
      <div class="container">
        <div class="nav-box index" style="margin: 5px;float: left;">
          
          <div class="nav-cut">
            <ul class="nav-ul">

              <fh-function>
                $sql="select * from sl_menu where U_hide=0 and U_del=0 and U_sub=0 order by U_order,U_id desc";
                s[[
                  if($type==$row["U_type"] && $id==$row["U_typeid"]){
                    $class="nav-li active";
                  }else{
                    $class="nav-li margin-left-0";
                  }

                  if($row["U_type"]=="link"){
                    $link=$row["U_link"];
                    $target="_blank";
                  }else{
                    $link="?type=".$row["U_type"]."&id=".$row["U_typeid"];
                    $target="_self";
                  }
                    $api=$api."<li class=\"".$class."\"><a href=\"".$link."\" target=\"".$target."\" title=\"".$row["U_title"]."\" >".$row["U_title"]."</a></li>";
                ]]

              </fh-function>
            </ul>
          </div>
          <div class="nav-hover">

            <fh-function>
            $sql="select * from sl_menu where U_hide=0 and U_del=0 and U_sub=0 order by U_order,U_id desc";
                s[[
                $api=$api."<ul>";

                    $sql2="select * from sl_menu where U_hide=0 and U_del=0 and U_sub=".$row["U_id"]." order by U_order,U_id desc";
                    s2[[
                      
                      if($row2["U_type"]=="link"){
                        $link2=$row2["U_link"];
                        $target="_blank";
                      }else{
                        $link2="?type=".$row2["U_type"]."&id=".$row2["U_typeid"];
                        $target="_self";
                      }
                            $api=$api."<li><a href=\"".$link2."\" target=\"".$target."\" title=\"".$row2["U_title"]."\" >".$row2["U_title"]."</a></li>";
                        ]]

                  $api=$api."</ul>";
                    ]]
            </fh-function>
            
          </div>
        </div>
      </div>
    </div>
  </nav>
  <div class="met-banner-ny vertical-align text-center" style=''>
    <h1 class="vertical-align-middle" style='color:#ffffff;'>搜索“<fh-function> $api=$api.$keyword;</fh-function>”</h1>
  </div>
</header>

<section class="met-show animsition">
  <div class="container">
    <div class="met-editor lazyload clearfix search_area">
      <fh-function>
if($keyword==""){
  $api=$api."请输入要查询的关键词！";
}else{

$sql="select id,title,pic,content,type 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 limit ".(($page-1)*10).",10";

$result = mysqli_query($conn,  $sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
        $search_info=$search_info."<div class='list'><table><tr><td colspan='2' ><a href='?type=".$row["type"]."&id=".$row["id"]."' target='_blank'><font size='+1' color='#0066ff'><u>".str_Replace($keyword,"<font color='red'>".$keyword."</font>",$row["title"])."</u></font></a></td></tr><tr><td width='20%' align='center' valign='middle'><a href='?type=".$row["type"]."&id=".$row["id"]."' target='_blank'><img src='".pic(splitx($row["pic"],"|",0))."' class='search_pic'></a></td><td width='80%'>".str_replace($keyword,"<font color='red'>".$keyword."</font>",mb_substr(strip_tags($row["content"]),0,100,"utf-8"))."...<br><font color='#006600'>".$_SERVER["HTTP_HOST"]."/?type=".$row["type"]."&id=".$row["id"]."</font><br> <font color='#777777'>位置：<a href='./'>".$C_title."</a> - <a href='?type=".$row["type"]."&id=".$row["id"]."'>".$row["title"]."</a></font></td></tr></table></div>";
    }
  $api=$api.$search_info;
}else{
  $api=$api."抱歉！未找到“".$keyword."”的相关内容，请尝试其他关键词！";
}
}

</fh-function>
    	<div id="pager"></div>
 </div>
  </div>
</section>
<div style="padding-top: 20px;">
<div class="container">
  
<p>
<img src="media/[fh_logo]" alt="[fh_title]" style="margin-bottom: 10px;max-width: 200px">
</p>
<p>
<fh-function>
                $sql="select * from sl_menu where U_hide=0 and not U_type='index' and not U_type='link' and U_del=0 and U_sub=0 order by U_order,U_id desc";
                s[[
                  $api=$api."<a style=\"margin-right:20px\" target=\"_blank\" href=\"?type=".$row["U_type"]."&id=".$row["U_typeid"]."\"  title=\"".$row["U_title"]."\">".$row["U_title"]."</a> ";
                  ]]

            
        </fh-function>
</p>
<img src="media/[fh_qrcode]" style="width: 80px;float: right;margin-top: -120px">

  
</div>
<hr>

  <div class="container">
    <div class="met-links">
      <ol class="breadcrumb">
        <a style="margin-right:30px;font-size:13px;">友情链接 :</a>
        <fh-function>
        $sql="select * from sl_link where L_del=0 order by L_id desc";
        s[[$api=$api."<a style=\"margin-right:30px;font-size:13px;\" href=\"".$row["L_link"]."\" target=\"_blank\">".$row["L_title"]."</a>";]]
        </fh-function>
      </ol>
    </div>

<div style="margin: 20px 0;">
    [fh_copyright][fh_beian][fh_code] 在线客服：<a href="?type=contact">联系客服</a>
  </div>

  </div>
</div>
<button type="button" class="btn btn-icon btn-primary btn-squared met-scroll-top hide"><i class="icon wb-chevron-up" aria-hidden="true"></i></button>
<button type="button" onclick="window.location.href='member/cart.php'" class="btn btn-icon btn-primary btn-squared met-scroll-top hide" style="bottom: 50px;"><i class="icon wb-shopping-cart" aria-hidden="true"></i></button>
<script src="template/t13/skin/js/shop_lang_cn.js"></script> 
<script src="template/t13/skin/js/index.js"></script> 
<script src="template/t13/skin/js/shop_v3.js"></script>
<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_kefu]
</body>
</html>