<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
	require_once('../ls_admin/inc/conn.php');
	require_once('../ls_admin/inc/constant.php');
	$opendb = new mydb();
	require_once('../ls_admin/inc/ls_syscode.php');
	$uploadfilesPath="ls_admin/";
	//echo "---友情链接". $pro_link['友情链接']."---机构名片". $pro_link['机构名片'];
	require('../ls_admin/inc/char_set.php');
	
	if($_POST['keywords'] != NULL){
		$searchproductName=addslashes($_POST['keywords']);
	}else{
		$searchproductName=addslashes($_GET['keywords']);
	}
	
	
	// 获取当前页数
	if(isset($_GET['page']) ){
	   $page = intval( $_GET['page'] );
	}
	else{
	   $page = 1;
	}
	
	// 获取当前文章页数
	if(isset($_GET['page2']) ){
	   $page2 = intval( $_GET['page2'] );
	}
	else{
	   $page2 = 1;
	}

?>
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/all.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- InstanceBeginEditable name="doctitle" -->
<title>
<translate>{ls_title}</translate>
</title>
<!-- InstanceEndEditable -->
<meta name="Keywords" content="<translate>{ls_keywords}</translate>" />
<meta name="Description" content="<translate>{ls_description}</translate>" />
<link rel="shortcut icon" href="../favicon.ico"/>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/banner2.css" />
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../css/style2.css" />
<link rel="stylesheet" type="text/css" href="../css/lrtk.css" />
<link rel="stylesheet" type="text/css" href="../css/font-awesome.css" />
<link rel="stylesheet" type="text/css" href="../css/animate.css" />
<script type="text/javascript" src="../js/wow.min.js"></script>
<script>
	new WOW().init();
</script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="bootstrap/js/html5shiv.min.js"></script>
      <script src="bootstrap/js/respond.min.js"></script>
    <![endif]-->
<script type="text/javascript" src="../bootstrap/js/jquery.js"></script>
<script type="text/javascript" src="../bootstrap/js/jquery.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap-dropdown-on-hover.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/superslide.2.1.js"></script>
<script type="text/javascript" src="../js/jquery.ba-cond.min.js"></script>
<script type="text/javascript" src="../js/jquery.slitslider.js"></script>

<!--首页常见问题代码结束-->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<hr />
<script>
    $(document).ready(function() {
        $('.dropdown' ).hover(
            function(){
                $(this).children('.menu2').slideDown(200);
            },
            function(){
                $(this).children('.menu2').slideUp(200);
            }
        );
    }); 
</script>

<script type="text/javascript">	
	$(function() {
		var Page = (function() {
			var $nav = $( '#nav-dots > span' ),
				slitslider = $( '#slider' ).slitslider( {
					onBeforeChange : function( slide, pos ) {
						$nav.removeClass( 'nav-dot-current' );
						$nav.eq( pos ).addClass( 'nav-dot-current' );
					}
				} ),
				init = function() {
					initEvents();
				},
				initEvents = function() {
					$nav.each( function( i ) {
						$( this ).on( 'click', function( event ) {
							var $dot = $( this );
							if( !slitslider.isActive() ) {
								$nav.removeClass( 'nav-dot-current' );
								$dot.addClass( 'nav-dot-current' );
							}
							slitslider.jump( i + 1 );
							return false;
						} );
					} );
				};
			return { init : init };
		})();
	Page.init();
});
</script>
	<div class="header-home fixed">
	<div class="fixed-header row">
            <!-  script-nav - >
        <script>
			$("span.menu").click(function(){
				$(".top-nav ul").slideToggle(500, function(){
				});
			});
			</script>
        <!-  //script-nav - >
         <!- script- >
		<script>
			$(document).ready(function(){
				$(".top-nav li a").click(function(){
					$(this).parent().addClass("active");
					$(this).parent().siblings().removeClass("active");
				});
			});
		</script>
			<!-  script-for sticky-nav - >
		<script>
		$(document).ready(function() {
			 var navoffeset=$(".header-home").offset().top;
			 $(window).scroll(function(){
				var scrollpos=$(window).scrollTop(); 
				if(scrollpos >=navoffeset){
					$(".header-home").addClass("fixed");
				}else{
					$(".header-home").removeClass("fixed");
				}
			 });
			 
		});
		</script>

   <div class="container">
    <div class="navbar-header"> 
   <a href="../index.html" class="navbar-brand">
        <translate></translate>
        </a>
        <button type="button" class="navbar-toggle m-toggle" data-toggle="collapse" data-target="#navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> 
        </button> 
      </div>
      <div class="navbar-lg">
        <div class="ss">
          <form name="search" method="post" action="../search.php" class="navbar-form navbar-right search">
            <div class="input-group" style="width:100%;margin-top: 7px;">
              <input type="text" name="keywords" class="form-control search-inp" placeholder="keywords">
              <div class="input-group-btn">
                <button class="btn btn-default search-btn"><span class="glyphicon glyphicon-search"></span></button>
              </div>
            </div>
          </form>

      <ul class="companytname">
       <li>KANG METER TECHNOLOGY CO., LTD.</li>
        
      </ul>
         </div>
        <!-- InstanceBeginEditable name="nav" -->
		
		
		 <div class="nav-padding">
          <div class="collapse navbar-collapse" id="navbar-collapse">
            <ul id="primary-menu" class="nav-default navbar-nav no-responsive sy">
              <li class="active"><a class="daohangtiao" href="../index.html"> <translate>Home</translate></a></li>
              <li><a href="../aboutus.html"> <translate>About Us</translate></a>
                
              </li>
       <!--      <li class="dropdown"><a href="javascript:void(0)" onClick="javascript:woaicssq(1)"  class="dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false"> <translate>Products</translate></a> {ls_s_cate} </li>-->
              <li class="dropdown"><a href="javascript:void(0)" onClick="javascript:woaicssq(1)"  class="dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false"> <translate>Products</translate></a>{ls_cate} </li>
           
             <li><a href="../news.html"> <translate>News</translate></a></li>
               <li><a href="../certificate.html"> <translate>Certificate</translate></a></li>
              <li><a href="../feedback.html"> <translate>Feedback</translate></a></li>
              <li><a href="../contact.html"> <translate>Contact Us</translate></a></li>
              
            </ul>
          </div>
        </div>
		
		
		
		
		
		<!-- InstanceEndEditable -->
         
         
         
       
        
        
        
        
      </div>
      </div>
  <div class="clearfix"> </div>
  </div>
</div>
<!-- InstanceBeginEditable name="banner" -->


    <div id="banner2" class="fullSlide">
  <div class="bd">
    <ul class="slides_container">
      
      <li class="banner-img" _src="url('../images/banner_n.jpg')" style="background:#fff center 0 no-repeat;"></li>
      
    </ul>
  </div>
</div>



<!-- InstanceEndEditable -->





<script type="text/javascript" src="../js/banner.js"></script>




<div class="blue"></div>

<div id="information">
	<div class="container">
		<div class="row">  
        <!-- InstanceBeginEditable name="center" -->
<div class="col-md-9">
        <div class="container-fluid">
          <div class="row">
				<div class="container-fluid">
					<h3 class="title-h3-1" style="margin-top: 31px;">
                    	 <ol class="breadcrumb all-breadcrumb">
                        	<li><a href="../index.html">Home</a></li>
                            <li>Search</li>
                        </ol>
                        <span><translate>Search</translate></span>
                    </h3>
					<div class="all-content">
          <h3 class="proName" align="center" style="padding:10px 0px">About &quot;<font color="#006600"><?=$searchproductName?></font>&quot;  search results</h3>
            <?php 
    if( isset($_GET['page']) ){
           $page = intval( $_GET['page'] );
        }
        else{
           $page = 1;
        }
        // 
        $PageSize = 15;
        
        // 
        /********************************************************************************/
            $sql="select * from ls_products where midcateName is null and cateName is null and cateFolders is null and cateTitle is null and cateKeywords is null and cateDescription is null and catePagePic is null and catePagePicWidth is null and catePagePicHeight is null and cateBrief is null and subcateName is null and subcateFolders is null and subcateBrief is null and subcateID is null ";
			require('ls_admin/inc/char_set.php');
            $products_sql="";
                                        //
            if($cateid!="" && $midcateid=="" && $subcateid=="")
            {
                //大类下有中类
                $displaycatename=$catename;
                $sqlstr1="select ID from ls_products where midcateID =".$cateid." ";
                $query1=$opendb->query($sqlstr1);
                $mynum1=mysql_num_rows($query1);
                if($mynum1!=0)//有中类
                {
                    $i=1;
                    while($myrows1=mysql_fetch_assoc($query1))
                    {
                        $sqlstr2="select ID from ls_products where subcateID =".$myrows1['ID']." ";
                        $query2=$opendb->query($sqlstr2);
                        $mynum2=mysql_num_rows($query2);
                        if($mynum2!=0) //有小类
                        {
                            while($myrows2=mysql_fetch_assoc($query2))
                            {
                                    if($i==1)
                                    {
                                        $productID.=" productID=".$myrows2['ID'];
                                    }
                                    else
                                    {
                                        $productID.=" or productID=".$myrows2['ID'];
                                    }
                                    $i++;
                            }
                        }
                        else //没有小类
                        {
                            if($i==1)
                            {
                                $productID.=" productID=".$myrows1['ID'];
                            }
                            else
                            {
                                $productID.=" or productID=".$myrows1['ID'];
                            }
                            $i++;
                        }
                    }
                    $products_sql.=" and ".$productID;
    
                }
                else
                {
                    $products_sql.=" and productID=".$cateid;
                    
                }
            }
    
            
            //中类
                if($cateid!="" && $midcateid!="" && $subcateid=="")
                {
                //中类下有小类
                $displaycatename=$midcatename;
                $sqlstr="select ID from ls_products where subcateID =".$midcateid." ";
                $query1=$opendb->query($sqlstr);
                $mynum=mysql_num_rows($query1);
                if($mynum!=0)
                {
                    $i=1;
                    while($myrows=mysql_fetch_assoc($query1))
                    {
                        if($i==1)
                        {
                            $productID.=" productID=".$myrows['ID'];
                        }
                        else
                        {
                            $productID.=" or productID=".$myrows['ID'];
                        }
                        $i++;
                    }
                    //	echo $productID."<br>";
                    $products_sql.=" and ".$productID;
                }
                else
                {//中类下没有小类
                    $products_sql.=" and productID=".$midcateid;
                }
            }
                                        
    
                                        
                //小类
                if($cateid!="" && $midcateid!=""&& $subcateid!="")
                {
                    $displaycatename=$subcatename;
                    $products_sql.=" and productID=".$subcateid;
                    
                }
                //echo 	$products_sql;
                if($_GET['keywords']!='') {
                        $keywords=$_GET['keywords'];
                        $searchproductName=$_GET['keywords'];
                    }
                                            
                if($searchproductName!="")
                {
                    $products_sql.=" and (productName like '%".$searchproductName."%' or productItemNo like '%".$searchproductName."%') ";
                }
                if($productid!="" && $productid!="allProducts")
                {
                    $products_sql.=" and productID=".$productid."";
                }
                if($showOn==1)
                {
                    $products_sql.=" and (showOn=2  or showOn=1) ";
                }
                if($showOn==2)
                {
                    $products_sql.=" and showOn=2 ";
                }
                $products_sql.=" order by Num asc ";	
    
                $sql.=$products_sql;
    
                                        
                //echo "products sql".$sql."<br>";
                //$sql = "select * from ls_products where cateName is null and cateFolders is null and cateTitle is null and cateKeywords is null and cateDescription is null and catePagePic is null and catePagePicWidth is null and catePagePicHeight is null and cateBrief is null and subcateName is null and subcateFolders is null and subcateBrief is null and subcateID is null order by Num desc";
                
                $result=$opendb->query($sql);
        
                /********************************************************************************/
                // ȡ
                
                $row = mysql_num_rows($result);
                $amount = $row;
	
	//文章统计
	$PageSize2 = 10;
	$newssql = "SELECT * FROM ls_news WHERE newsTitle LIKE  '%".$searchproductName."%' or newsText LIKE  '%".$searchproductName."%'";
	$news_sql = "SELECT * FROM ls_news WHERE newsTitle LIKE  '%".$searchproductName."%' or newsText LIKE  '%".$searchproductName."%' order by Num  DESC limit ". ($page2-1)*$PageSize2 .",".$PageSize2." ";

    $news_query=$opendb->query($news_sql);
	$result2=$opendb->query($newssql);
    $row2 = mysql_num_rows($result2);

?>
            <div class="search-title">Total station search results: Product
              <?=$amount?>, Article
              <?=$row2?>.</div>
            <?php

                $page_string = getSearchPages($amount, $page, $page2, $PageSize, $searchproductName, "pro");
                    /*\***************************************************************************\*/
                    /*\								ѯݿ					\*/
                    /*\***************************************************************************\*/ 

                $products_sql=$sql." limit ". ($page-1)*$PageSize .",".$PageSize." ";	
    
                //echo "products sql".$products_sql."<br>"; exit;
                $products_query=$opendb->query($products_sql);
                    /*\***************************************************************************\*/
                    /*\								ѯݿ					\*/
                    /*\***************************************************************************\*/ 
                if($displaycatename!="")
                {echo "<div class=\"cateName\">".$displaycatename."</div>";}
        
                if($brief!="")
                {echo "<div id=\"brief\">"."<b>Brief: </b>".$brief."</div>";}
                    
                ?>
            <div class="row pro_list">
              <?
                $i=1;
                if($amount==0){ 
					//echo "没有找到相关的产品信息！";
				}
                while($products_rows=mysql_fetch_assoc($products_query))
                 {
                    
                    ?>
              <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <div class="thumbnail">
                      <div class="img-pic">
                <?
                    
                    $pic_sql="select * from ls_products where ID=".$products_rows['productID']."";
                    $pic_query=$opendb->query($pic_sql);
                    $pic_myrows=mysql_fetch_assoc($pic_query);
    
    
                    if($pic_myrows['subcateFolders']=="")
                    {
                        if($pic_myrows['midcateFolders']=="") //产品在大类下
                        {
                            $picsrc=$pic_myrows['cateFolders']."/".$SmallFoldersProducts."/".$products_rows['productPic'];
                            $piclink=$pic_myrows['cateFolders']."/".pathProName($products_rows['productName'])."-".$products_rows['ID'].".html";
                        }
                        else//产品在中类下
                        {
                        
                            $pic_sql="select * from ls_products where ID=".$pic_myrows['midcateID']."";
                            $pic_query=$opendb->query($pic_sql);
                            $pic_myrows2=mysql_fetch_assoc($pic_query);
    
                            $picsrc=$pic_myrows2['cateFolders']."/".$pic_myrows['midcateFolders']."/".$SmallFoldersProducts."/".$products_rows['productPic'];
                            $piclink=$pic_myrows2['cateFolders']."/".$pic_myrows['midcateFolders']."/".pathProName($products_rows['productName'])."-".$products_rows['ID'].".html";
                        }
                    }
                    else//产品在小类下
                    {
                            $pic_sql="select * from ls_products where ID=".$pic_myrows['subcateID']."";
                            $pic_query=$opendb->query($pic_sql);
                            $pic_myrows2=mysql_fetch_assoc($pic_query);
    
                            $pic_sql="select * from ls_products where ID=".$pic_myrows2['midcateID']."";
                            $pic_query=$opendb->query($pic_sql);
                            $pic_myrows3=mysql_fetch_assoc($pic_query);
                            
                            $picsrc=$pic_myrows3['cateFolders']."/".$pic_myrows2['midcateFolders']."/".$pic_myrows['subcateFolders']."/".$SmallFoldersProducts."/".$products_rows['productPic'];
							
                            $piclink=$pic_myrows3['cateFolders']."/".$pic_myrows2['midcateFolders']."/".$pic_myrows['subcateFolders']."/".pathProName($products_rows['productName'])."-".$products_rows['ID'].".html";
                    }
                    ?>
                <a href="<?=$piclink?>"><img src='<?=trim($picsrc)?>' border="0" alt='<?=$products_rows['productName']?>' /></a>
                </div>
                      <div class="caption pro-name1">
                        <h5><a href="<?=$piclink?>"><?=substr($products_rows['productName'],0,40)?></a></h5>
                      </div>
                    </div>
              </div>
              <? $i++; }?>
            </div>
            <?php if($amount>$PageSize){
                	echo "<div style='width:100%; float:left; padding-bottom:26px; font-size: 13px; '>".$page_string."</div>";
                    }

    $new_str ="<ul class=\"list-unstyled n-list\">";
    while($my_rows=mysql_fetch_assoc($news_query)){
		
		$newscate_sql = "SELECT * FROM ls_functioncates WHERE cateName LIKE '".$my_rows['cate']."'";
		$newscate_query=$opendb->query($newscate_sql);
		$newscate_rows=mysql_fetch_assoc($newscate_query);
		$href = "";
		switch($newscate_rows['functionName']){
			
			case "新闻分类":
				$href = "newspage/news".$newscate_rows['suffStr'].$my_rows['ID'].".html";
			break;
			
			case "常见问题":
				$href = "faqpage/faq".$newscate_rows['suffStr'].$my_rows['ID'].".html";
			break;
			
			case "博客分类":
				$href = "blog/blog".$newscate_rows['suffStr'].$my_rows['ID'].".html";
			break;
			
		}

		$page_string = getSearchPages($row2, $page, $page2, $PageSize2, $searchproductName, "list");
        $new_str .= "<li><span style=\"float:right;\">[".$my_rows['newsDate']."]</span><a href=\"".$href."\" target=\"_blank\">".$my_rows['newsTitle']." &nbsp; </a></li>";

    }
    $new_str .= "</ul>";
    
    if($row2 != 0){
        echo $new_str;
    }else{
        //echo "没有找到相关的文章信息！";
    }

    ?>
            <div id="page" style="width:100%; float:left; padding-bottom:26px; font-size: 13px;">
              <?php if($row2>$PageSize2) {echo $page_string;}?>
            </div>
          </div>
				</div>
		</div>
	</div>
</div>
<!-- InstanceEndEditable -->  
            <div class="col-md-3 info-right hidden-xs hidden-sm">
        		<!--<div class="free">
                
                	<a href="../contact.html">Enquire Now</a>
                	<div class="circle"><a href="../contact.html">GO</a></div>
                </div>-->
                <div class="free">
					<ul>
                	<a href="../contact.html"><li>Enquire Now</li></a>
                	<!--<div class="circle"><a href="../contact.html">GO</a></div>-->
         			</ul>
 				</div>   
                <!--<img src="../images/love.png" style="width: 107px;
margin-bottom: -51px;
margin-left: 63px;
margin-top: 39px;" />-->
				<div class="title"><h3>Products List</h3></div>
        		<div class="side-pro-list"> {ls_p_cate} </div>
                
                
      		</div>    
            
        </div>
    </div>
</div>

<div class="footer">
  <div class="container">
    <div class="row foot">
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 bfoot">
        <h4><translate>PRODUCT CATEGORY </translate></h4>
       <ul class="list">
          <li class="active"><a href="../ndt-instrument/hardness-tester/hardness-tester.html"><translate>NDT INSTRUMENT</translate></a></li>
          <li><a href="../ut-et-ut-pa/ultrasonic-flaw-detector/ultrasonic-flaw-detector.html"><translate>UT / ET /UT PA</translate></a></li>
          <li><a href="../version-inspection/industrial-videoscopes/industrial-videoscopes.html"><translate>VERSION INSPECTION</translate></a></li>
          <li><a href="../hand-held-alloy-analyzer/hand-held-alloy-analyzer/hand-held-alloy-analyzer.html"><translate>HAND-HELD ALLOY ANALYZER</translate></a></li>
          <li><a href="../electric-power-inspection/handheld-thermal-imaging-camera/handheld-thermal-imaging-camera.html"><translate>ELECTRIC POWER INSPECTION</translate></a></li>
        </ul>
      </div>
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 bfoot">
        <h4><translate>CONTACT US</translate></h4>
        <ul class="list">
          <li class="active"><translate>KANG METER TECHNOLOGY CO., LTD</translate></li>
          <li><img src="../images/add.png" /><translate style="padding-left:7px;">Room 2232, Jintuo Building, Xinhua District Shijiazhuang, Hebei, China</translate></li>
          <li><img src="../images/tel.png" /><translate style="padding-left:7px;">+86-13933073115</translate></li>
           <li><img src="../images/email.png" /><a href="mailto:info@kangmeter.com"><translate style="padding-left:7px;">info@kangmeter.com</translate></a><br /></li>
          <li><img src="../images/whatsapp.png" /><translate style="padding-left:7px;">8613933073115( Ian-KANG METER )</translate></li>
          <li><img src="../images/skype.png" /><translate style="padding-left:7px;">kandm-ian</translate></li>
          <li><img src="../images/facebook.jpg" /><translate style="padding-left:7px;">Facebook: Ian Dong</translate></li>
        </ul>
        <div class="hot-pro">
     		{ls_weibo}
     		
    	</div>
      </div>

    </div>
  </div>
</div>
<div class="copyright">
  <div class="container" > <span style="color:#333;"> Copyright &copy;<a href="../index.html">KANG METER TECHNOLOGY CO,. LTD.</a> All Rights Reserved.</span></div>
</div>
</div>
<!--<script type="text/javascript" src="js/line.js"></script>
<div class="side_nav">
  <ul>
    <li class="tel"> <a href="mailto:mer_kaye@163.com" title="Click Send Eemail To Us
"> <span><translate>E-mail</translate></span> </a> </li>
    <li class="QQ"> <a href="javascript:;" title="+86-18632131770"> <span><translate>Whatsapp</translate></span> </a> </li>
    <li class="sub_QR"> <a href="javascript:;" title="Scan, Browse The Mmobile Site
"> <span><img src="images/ewm.png" width="148" /></span> </a> </li>
    <li class="back_top"> <a href="#" title="Back To The Top"> <span>Top</span> </a> </li>
  </ul>
  <div class="c"></div>
</div>
-->
</body>
<!-- InstanceEnd --></html>
