<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
	require_once('../../ru/ls_admin/inc/conn.php');
	require_once('../../ru/ls_admin/inc/constant.php');
	$opendb = new mydb();
	require_once('../../ru/ls_admin/inc/ls_syscode.php');
	$uploadfilesPath="ls_admin/";
	//echo "---友情链接". $pro_link['友情链接']."---机构名片". $pro_link['机构名片'];
	require('../../ru/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" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>{ls_title}</title>
<!-- InstanceEndEditable -->
<meta name="Keywords" content="{ls_keywords}" />
<meta name="Description" content="{ls_description}" />
<link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="../../css/style.css" />
<link type="text/css" rel="stylesheet" href="../../css/banner.css" />
<script src="../../bootstrap/js/jquery.js"></script>
<script src="../../bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../bootstrap/js/bootstrap-dropdown-on-hover.js" type="text/javascript"></script>
<script src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/jquery.themepunch.plugins.min.js"></script>
<script type="text/javascript" src="../../js/jquery.themepunch.revolution.min.js"></script>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>

<body style="background-color:#eee">
<div id="top">
	<div id="top1">
      <table width="100%" border="0">
        <tr>
          <td width="50%">{ls_weibo}</td>
          <td width="23%" align="right" ><img src="../../images/gq.jpg" width="112" height="24" border="0" usemap="#Map" /></td>
        </tr>
      </table>
    </div>
</div>
<div id="hhead">
<div id="head">
	<div class="logo">
    	<a href="../../index.html"><img src="../../images/logo_11.jpg" /><h2>Hebei Creedy Pharma-Tech Co.,Ltd.</h2></a>
    </div>
    <div class="search">
    	<table width="100%" border="0">
        	<tr>
            	<td><img src="../../images/tel_28.png" /> +86-311-87542246</td>
            </tr>
            <tr>
            	<td><img src="../../images/eml_32.png" />&nbsp;&nbsp;<a href="mailto:info@hbcptc.com">info@hbcptc.com</a></td>
            </tr>
            <tr>
              <td><FORM name="search" method="post" action="../../search.php" >
                  <table width="100%" border="0">
                    <tr>
                      <td width="72%" align="right"><input type="text" id="searchbox" size="30" value="" name="keywords"
      onfocus="if (this.value==this.defaultValue) this.value=''; else this.select()"
      onblur="if (!this.value) this.value=this.defaultValue" />
                        <script type="text/javascript">
                    document.getElementById('searchbox').defaultValue = ' Search...';
                    document.getElementById('searchbox').value = ' Search...';
                </script></td>
                      <td width="28%"><input id="anniu" border="0" value="Search" type="submit" name="Submit" /></td>
                    </tr>
                  </table>
                </FORM></td>
            </tr>
          </table>
    </div>
</div>
</div>
<div id="nav">
	<div id="nav1">
    	<div class="dh">
    	<ul>
        	<li><a href="../../index.html">Home</a></li>
            <li><a href="../../aboutus.html">About us</a></li>
             <li class="dropdown"><a href="../../{ls_addprolink}" class="dropdown-toggle blue" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Products <span class="caret"></span></a>
              {ls_s_cate}
              </li>
            <li><a href="../../certificate.html">Certificates</a></li>
            <li><a href="../../news.html">News</a></li>
            <li><a href="../../contact.html">Contact us</a></li>
        </ul>
        </div>
    </div>
</div>
<script type="text/javascript">
//弹出切换class
$(document).ready(function(){
  $(".apply-pup").click(function(){
  $("#apply-pup-icon").slideToggle();
  });
});
</script>
<div id="myCarousel">
  <div class="tp-banner-container">
    <div class="tp-banner">
      <ul>
        <li data-transition="slideleft" data-slotamount="14"> <img src="../../images/banner1_02.png" alt="Rev Full">
          <div class="tp-caption lft stb stl"
					 data-x="0"
					 data-y="150"
					 data-speed="900"
					 data-start="500"
					 data-easing="easeOutExpo" data-end="6000" data-endspeed="500"><img src="../../images/z1_04.png" alt="Image 1"></div>
        </li>
        <li data-transition="boxslide" data-slotamount="7" data-masterspeed="300" > <img src="../../images/banner2.jpg"  alt="darkblurbg"   data-fullwidthcentering="on">
        </li>
        <li data-transition="boxslide" data-slotamount="7" data-masterspeed="300" > <img src="../../images/banner3.jpg"  alt="darkblurbg"   data-fullwidthcentering="on">
        </li>
        
      </ul>
      <div class="tp-bannertimer"></div>
    </div>
  </div>
  <!--<![endif]-->
  <script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('.tp-banner').revolution({
		delay:6000,
		startwidth:1000,
		startheight:430,
		hideThumbs:2,
		fullWidth:"on",
		forceFullWidth:"on"
	});
});
</script>
</div>
<!-- InstanceBeginEditable name="main" -->

<div id="information">
	<div class="container">
		<div class="row">
			<div class="col-md-9">
				<div class="container-fluid">
					<h3><b>Search</b></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 = 6;
        
        // 
        /********************************************************************************/
            $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('../../ru/Templates1/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']."/".$showproductsFolders."/".$showproductsFolders."/".$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']."/".$showproductsFolders."/".$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']."/".$showproductsFolders."/".$pic_myrows['subcateFolders']."/".$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-name">
                        <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);

		$page_string = getSearchPages($row2, $page, $page2, $PageSize2, $searchproductName, "list");
        $new_str .= "<li><span style=\"float:right;\">[".$my_rows['newsDate']."]</span><a href=\"newspage/news".$newscate_rows['suffStr'].$my_rows['ID'].".html\" 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 class="col-md-3 info-right hidden-xs hidden-sm">
           	  <div class="side-title">
                    <blockquote>
                        <h3>Products List</h3>
                    </blockquote>
                </div>
                <div class="side-pro-list">
                	{ls_p_cate}
                </div>
			</div>
		</div>
	</div>
</div>

<!-- InstanceEndEditable -->
<div id="footer">
	<div id="foot">
    	<div class="f_new">
        	<h2><a href="../../news.html">News</a></h2>
            <ul>
            	{ls_news}
            </ul>
        </div>
        <div class="f_contact">
        	<h2>Contact us</h2>
            <div id="sycon_con">
          <ul>
            <li>
              <label><img src="../../images/eml_29.png" /></label>
              <span> <a href="mailto:info@hbcptc.com">info@hbcptc.com</a></span></li>
            <li>
              <label><img src="../../images/tel_32.png" /></label>
              <span> +86-311-87542246</span></li>
            <li>
              <label><img src="../../images/skype_35.png" /></label>
              <span><a href="skype:hbcptc?chat"> hbcptc</a></span></li>
            <li>
              <label><img src="../../images/adress_38.png" /></label>
              <span> No.188, Xiyuan Street, Shenze County,<br />&nbsp;&nbsp;&nbsp;&nbsp;
Shijiazhuang City, China.</span></li>
          </ul>
        </div>
        </div>
        <div id="sy_fd">
        <h2>Feedback</h2>
        <div id="fd_con">
          <form action='../../sendmail.php' id="feedback-form" name="sendmailform" method='post' onSubmit="return check(this);">
            <ul class="list-unstyled m_form fl " id="leavewordform">
              <li>
                <label> <img src="../../images/people_22.png" /></label>
                <input class="iptTxt"
                                    type="text" id="txtname" name="Name" value="Name" onBlur="if(this.value==''){this.value='Name'}"
                                    onfocus="if(this.value=='Name'){this.value=''}" />
              </li>
              <li>
                <label> <img src="../../images/email.png" /></label>
                <input class="iptTxt"
                                    type="text" id="txtemail" name="Mail" value="Email" onBlur="if(this.value==''){this.value='Email'}"
                                    onfocus="if(this.value=='Email'){this.value=''}" />
              </li>
              <li>
                <label> <img src="../../images/tel.png"  /></label>
                <input class="iptTxt"
                                    type="text" id="txtemail" name="Tel" value="Tel" onBlur="if(this.value==''){this.value='Tel'}"
                                    onfocus="if(this.value=='Tel'){this.value=''}" />
              </li>
              <li class="areLi">
                <label> <img src="../../images/mess.png" /></label>
                <textarea class="txtAre" name="Comments"
                                    id="txtshortdesc" onBlur="if(this.value==''){this.value='Message'}" onFocus="if(this.value=='Message'){this.value=''}">Message</textarea>
              </li>
              <li>
                <label><img src="../../images/yzm.png" /></label>
                <input class="iptTxt2" type="text" id="input1" name="code" />
                &nbsp; <img src="../../ls_admin/inc/code.php" id="codeImg" /> 
                <input type="hidden" name="ls2" value="sendmail" />
                <input class="btnSubmit" type="submit" value="SEND" /></li>
             
            </ul>
          </form>
        </div>
      </div>
      	
    </div>
</div>
<div id="copy">&copy; 2016 Hebei Creedy Pharma -Tech Co.,Ltd.  All Rights Reserved. Design by: <a href="http://www.lanscend.com">lanscend</a></div>
<map name="Map" id="Map">
  <area shape="rect" coords="1,2,32,24" href="http://pmg.lanscend.cn/hbcptc.com" />
  <area shape="rect" coords="42,2,72,22" href="http://pmg.lanscend.cn/hbcptc.com/cn" />
  <area shape="rect" coords="81,1,113,21" href="http://pmg.lanscend.cn/hbcptc.com/ru" />
</map>
<div class="side_nav">
  <ul>
    <li class="tel"> <a href="mailto: info@hbcptc.com" title="Click Send Email To Us
"> <span>E-mail</span> </a> </li>
    <li class="skype"> <a href="skype:hbcptc?chat" title="Sherry"> <span>Skype</span> </a> </li>
    <li class="sub_QR"> <a href="javascript:;" title="Scan, Browse The Mobile Site
"> <span><img src="../../images/ewm.jpg"  /></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>
<script src="../../js/jquery.easing.js" type="text/javascript"></script>
<script type="text/javascript" src="../../js/line.js"></script>
<script src="../../js/reload.js" type="text/javascript"></script>
<script>
$("#codeImg").click(function(){$("#codeImg").attr('src','../ls_admin/inc/code.php?m='+Math.random());});
</script>
</body>
<!-- InstanceEnd --></html>
