search.php 18.1 KB
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title><?php wp_title( ' ', true, 'right' );  ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link rel="apple-touch-icon-precomposed" href="">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<?php $cdn_setting = get_option('gd_cdn_setting');?>
<?php if($cdn_setting['active_cdn'] == 1){?>
<link href="//cdn.goodao.net/<?php echo $cdn_setting['dir_name'];?>/style/global/style.css" rel="stylesheet">
<link href="//cdn.goodao.net/<?php echo $cdn_setting['dir_name'];?>/style/public/public.css" rel="stylesheet">
<?php }else{?>
<link href="<?php echo home_url('/')?>style/global/style.css" rel="stylesheet">
<link href="<?php echo home_url('/')?>style/public/public.css" rel="stylesheet">
<?php }?>
</head>
<body>
<section class="container">
        <!-- head-wrapper start -->
    	<header class="head-wrapper">
        	<nav class="topbar">
            	<section class="layout">
                    <div class="head-contact">
                        <div class="head-phone"><span data-txt="Phone"><b><?php get_the_field('lianxi_phone_01'); ?></b></span><a href="tel:<?php get_the_field('lianxi_phone_01'); ?>"></a></div>
                        <div class="head-email"><span data-txt="Email"><b><a href="javascript:" class="add_email12"><?php get_the_field('lianxi_mail_01'); ?></a></b></span></div>
                    </div>
                    <ul class="head-social">
<?php $images = get_get_field('sns_gallery'); if( $images ): foreach( $images as $image ): ?>
<?php if($cdn_setting['active_cdn'] == 1){?>
<li><a target="_blank" href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],$image['alt']); ?>"><img src="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],$image['url']); ?>" alt="<?php echo $image['description']; ?>"></a></li>
<?php }else{?>
<li><a target="_blank" href="<?php echo $image['alt']; ?>"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['description']; ?>"></a></li>
<?php }?>
<?php endforeach; endif; ?>
                    </ul>
    			</section>
            </nav>
            <section class="header">
                <section class="layout">
<div class="logo"><a href="<?php echo $cdn_setting['weburl']; ?>"><?php $image = get_get_field('ad_logo');if( !empty($image) ): ?><img src="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],$image['url']); ?>" alt="<?php echo $image['title']; ?>"><?php endif; ?></a></div>
                    <nav class="nav-bar">
                          <section class="nav-wrap">
                             <ul class="nav">
<?php
$menu=str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 31, 'echo' => false)) ));
$menu=str_replace("http://home", home_url("/"),$menu);
$menu=str_replace("/news", home_url("/")."news" ,$menu);
$menu=str_replace("/video", home_url("/")."video" ,$menu);
if($cdn_setting['active_cdn'] == 1){
	$menu=str_replace(home_url("/"), $cdn_setting['weburl'] ,$menu);
	$menu=str_replace(home_url(), $cdn_setting['weburl'] ,$menu);
	$menu=str_replace('href="/"', 'href="'.$cdn_setting['weburl'].'"' ,$menu);
}
echo $menu;
?>
                             </ul>
                        </section>
                       <section class="head-search-wrap">
                            <b class="head-search-ico"></b>
                            <section class="head-search-bg">
                               <div class="head-search">
	<form class="pro-search"  action="<?php echo home_url("/");?>/index.php" method="get">
        <input class="search-ipt" type="text" value="Enter Keywords..." name="s" id="s" />
        <input type="hidden" name="cat" value="490"/>
        <input class="search-btn" type="submit" id="searchsubmit" value="GO" />
	</form>
                               </div>
                           </section>
                       </section>
                    </nav> 
                </section>
            </section>              
        </header>
        <!--// head-wrapper end -->   	
    	<nav class="path-bar">
          <ul class="path-nav">
              <li> <a  href="<?php echo $cdn_setting['weburl']; ?>">Home</a></li><li> <a href="#">Search: "<?php echo wp_specialchars($s, 1); ?>"</a></li>
          </ul>
       </nav>
<section class="index-layout">
   <section class="layout">
   	<!--sidebar start-->   	
	<aside class="aside">
	          <section class="side-widget">
	             <div class="side-tit-bar">
	                <h4 class="side-tit">Products Categories</h4>
	             </div>
	             <div class="side-cate side-hide">
	                <ul>
	               <?php 
	            		if($cdn_setting['weburl']){
	            			echo str_replace(home_url('/'),$cdn_setting['weburl'],str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 4, 'echo' => false)) )));
	            		}else{
	            			echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 4, 'echo' => false)) ));
	            		}
	               ?>
	                </ul>
	             </div>
	          </section>
	
			  <section class="side-widget">
	             <div class="side-tit-bar">
	                <h4 class="side-tit">Feature Products</h4>
	             </div>
	             <section class="products-scroll-list-wrap side-hide">
	             	<a href="javascript:" class="products-scroll-btn-prev"><b></b></a>
	                 <div class="products-scroll-list">
	                    <ul>
	<?php $args = array('showposts' => 18, 'post_type' => 'post', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'special','value' => 'Feature Products','compare' => 'LIKE')));
	$the_query = new WP_Query( $args ); if( $the_query->have_posts() ): while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
	                       <li>
	                          <a href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],get_permalink()); ?>"><img src="<?php $images = get_field('product_gallery'); if( $images ): for($x=0;$x<1; $x++){ ?><?php echo str_replace(home_url('/'),$cdn_setting['weburl'],$images[0]['sizes']['thumbnail']); ?><?php } endif; ?>" alt="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?>"></a>
	                          <div class="pd-info">
	                               <div class="pd-name"><a href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],get_permalink()); ?>"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 55,"..."); ?></a></div>
	                          </div>
	                       </li>
	<?php endwhile; endif;  wp_reset_query(); ?>                  
	                    </ul>
	                  </div>
	                 <a href="javascript:" class="products-scroll-btn-next"><b></b></a> 
	             </section> 
	          </section>  

			  
	<?php $images = get_get_field('ad_sidebar_banner'); if( $images ): foreach( $images as $image ): ?>
	<?php if($cdn_setting['active_cdn'] == 1){?>
		<div class="side-bn"><a href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],$image['alt']); ?>"><img src="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],$image['url']); ?>" alt="<?php echo $image['description']; ?>"></a></div>
	<?php }else{?>
		<div class="side-bn"><a href="<?php echo $image['alt']; ?>"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['description']; ?>" /></a></div>
	<?php }?>
	<?php endforeach; endif; ?>
	
		  </aside>
   	<!--sidebar end-->
       <section class="main">
      <div class="main-tit-bar">
                 <h1 class="title">Search: "<?php echo wp_specialchars($s, 1); ?>"</h1>
      </div>   

      <section class="product-list">
         <ul class="product_list_items">
<?php while ( have_posts() ) : the_post();
$images = get_field('product_gallery');
if( $images ):  foreach( $images as $key=>$image ): 
			if(!is_array($images[$key])){
				$eric_id = $image;
				$eric_urcs = wp_get_attachment_image_src($eric_id);
				$eric_urc = $eric_urcs[0];
				$image = array(
					'id' => $eric_id, 
					'url' => $eric_urc, 
					'sizes' => array('thumbnail' => $eric_urc, )
					);
				$images[$key] = $image;
			}
			if (!$image['sizes']['thumbnail']) $image['sizes']['thumbnail'] = $srcs[0]; endforeach;  endif;?>
   <li class="product_list_item">
            <figure>
              <span class="item_img"><img src="<?php if( $images ): for($x=0;$x<1; $x++){ ?><?php echo $images[0]['sizes']['thumbnail']; ?><?php } endif; ?>" alt="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?>"><a href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],get_permalink()); ?>" title="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,""); ?>"></a> </span>
              <figcaption> 
                <div class="item_information">
                     <h3 class="item_title"><a href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],get_permalink()); ?>" title="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,""); ?>"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,"..."); ?></a></h3>
                <div class="item_info"><?php $short = get_field('short_description');if( !empty($short) ): ?><?php the_field('short_description'); ?><?php else: ?><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 500,"..."); ?><?php endif; ?></div>
                </div>
                <div class="product_btns">
                  <a href="javascript:" class="priduct_btn_inquiry add_email12">inquiry</a><a href="<?php echo str_replace(home_url('/'),$cdn_setting['weburl'],get_permalink()); ?>" class="priduct_btn_detail">detail</a>        
                </div>
              </figcaption>
            </figure>
          </li>
<?php endwhile; wp_reset_query();  ?>
         </ul> 
      </section>     
      <section class="page-bar">
         <div class="pages"><?php echo izt_pagenavi();?></div>
      </section>
   </section>
    </section>

        <!-- footer start -->
    	<footer class="foot-wrapper">
        	<section class="foot-items">
            	<section class="layout">
        			<section class="foot-item foot-contact foot-item-hide">
                        <h2 class="foot-tit"><span>Contact</span> Us</h2>
                        <div class="foot-cont">
                        	<ul>
                	<?php if( get_get_field('lianxi_company') ){ ?><li class="foot-addr"><p><?php get_the_field('lianxi_company'); ?></p></li><?php } ?>
                    <?php if( get_get_field('lianxi_phone_01') ){ ?><li class="foot-phone"><p>Phone: <?php get_the_field('lianxi_phone_01'); ?></p></li><?php } ?>
                    <?php if( get_get_field('lianxi_phone_02') ){ ?><li class="foot-phone"><p>Phone: <?php get_the_field('lianxi_phone_02'); ?></p></li><?php } ?>
                    <?php if( get_get_field('lianxi_mail_01') ){ ?><li class="foot-email"><p>E-mail: <a href="javascript:" class="add_email12"><?php get_the_field('lianxi_mail_01'); ?></a></p></li><?php } ?>
                    <?php if( get_get_field('lianxi_mail_02') ){ ?><li class="foot-email"><p>E-mail: <a href="javascript:" class="add_email12"><?php get_the_field('lianxi_mail_02'); ?></a></p></li><?php } ?>
                    <?php if( get_get_field('lianxi_fax') ){ ?><li class="foot-fax"><p>Fax: <?php get_the_field('lianxi_fax'); ?></p></li><?php } ?>
                    <?php if( get_get_field('lianxi_whatsapp') ){ ?><li class="foot-sky"><p>Whatsapp: <?php get_the_field('lianxi_whatsapp'); ?></p></li><?php } ?>
                        </ul>
                        </div>
                    </section>
                                        <section class="foot-item foot-blog">
                        <h2 class="foot-tit">Latest News</h2>
                        <div class="foot-hide ">
                        	<div class="blog-slides">
                        	<ul class="slides ">
<?php query_posts(array( 'post_type' => 'news','showposts' => 5,'orderby' => 'post_date','order'=> 'DESC') ); while (have_posts()) : the_post();?>
                                <li class="foot-blog-item">
                                   <div class="blog-cont">
                                      <?php $image = get_field('news_img');if( !empty($image) ): ?>
									  <div class="blog-cont-pic"><a href="<?php echo $get_lang?$cdn_setting['weburl']  .$get_lang.'/news/' . $post->post_name:$cdn_setting['weburl'] .'news/' . $post->post_name ; ?>"><img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?>"></a></div>
									  <?php endif; ?>
                                      <div class="blog-cont-detail">
                                      	<h3 class="blog-cont-title"><a href="<?php echo $get_lang?$cdn_setting['weburl']  .$get_lang.'/news/' . $post->post_name:$cdn_setting['weburl'] .'news/' . $post->post_name ; ?>"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 44,"..."); ?></a></h3>
                                        <p><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 220,"..."); ?></p>
                                      </div>
                                   </div>
                                </li>
<?php endwhile; wp_reset_query();  ?>
                             </ul>
                             </div>
                        	
                        </div>
                    </section>
                    <section class="foot-item foot-inquiry foot-item-hide">
                        <h2 class="foot-tit"><span>Inquiry</span> For Pricelist</h2>
                        <div class="foot-cont">
                            <p><?php get_the_field('inquiry_price_text'); ?></p>
                            <div class="subscribe">
                                <div class="subscribe-form">
<a class="email inquiryfoot" href="javascript:" onclick="showMsgPop();">Inquiry For Pricelist</a>
                                </div>
                            </div>
                        </div>    
                    </section>
               </section>
               </section>
            <section class="footer">
                    <div class="copyright"><?php query_posts(array( 'post_type' => 'transall','showposts' => 1,'orderby' => 'post_date','order'=> 'DESC') );  while (have_posts()) : the_post();?><?php if( get_field('自动翻译') ){ ?><div class="transall"></div><?php } ?><?php endwhile; wp_reset_query();  ?><?php get_the_field('about_copyright'); ?> <?php get_the_field('3code_an'); ?> <?php get_the_field('3code_qt'); ?></div>
                    <ul class="foot-nav">
<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 442, 'echo' => false)) ));?>
                    </ul>
            </section>
            </footer>
            <!--// footer end -->
              
<aside class="scrollsidebar" id="scrollsidebar"> 
  <section class="side_content">
    <div class="side_list">
    	<header class="hd"><img src="//cdn.goodao.net/title_pic.png" alt=""/></header>
        <div class="cont">
		<li><a class="email" href="javascript:" onclick="showMsgPop();">Send Email</a></li>
<?php query_posts(array( 'post_type' => 'skype','showposts' => 5,'orderby' => 'post_date','order'=> 'DESC') );  ?>
<?php while (have_posts()) : the_post();?>
		<li><a target="_blank" class="skype" href="skype:<?php the_field('skype_id'); ?>?chat"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?></a></li>
<?php endwhile; wp_reset_query();  ?>
<?php query_posts(array( 'post_type' => 'ww','showposts' => 5,'orderby' => 'post_date','order'=> 'DESC') );  ?>
<?php while (have_posts()) : the_post();?>
		<li class="ww"><?php the_field('ww_code'); ?></li>
<?php endwhile; wp_reset_query();  ?>
	     </div>
		 
      <?php $image = get_get_field('ad_android');if( !empty($image) ): ?><div class="t-code"><a href="<?php echo $image['alt']; ?>"><img width="120px" src="<?php echo $image['url']; ?>" alt="<?php echo $image['description']; ?>"></a><br/><center>Android</center></div><?php endif; ?>
      <?php $image = get_get_field('ad_ios');if( !empty($image) ): ?><div class="t-code"><a href="<?php echo $image['alt']; ?>"><img width="120px" src="<?php echo $image['url']; ?>" alt="<?php echo $image['description']; ?>"></a><br/><center>IOS</center></div></div><?php endif; ?>
        <div class="side_title"><a  class="close_btn"><span>x</span></a></div>
    </div>
  </section>
  <div class="show_btn"></div>
</aside>
            <section class="inquiry-pop-bd">
            <div class="inquiry-pop">
                <i class="ico-close-pop" onclick="hideMsgPop();"></i>
 <script type="text/javascript" src="//www.globalso.site/form.js"></script>
            </div>
            </section>
  
</section>
<?php if($cdn_setting['active_cdn'] == 1){?>
<script type="text/javascript" src="//cdn.goodao.net/<?php echo $cdn_setting['dir_name'];?>/style/global/js/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.goodao.net/<?php echo $cdn_setting['dir_name'];?>/style/global/js/common.js"></script>
<script type="text/javascript" src="//cdn.goodao.net/<?php echo $cdn_setting['dir_name'];?>/style/public/public.js"></script>
<?php }else{?>
<script type="text/javascript" src="<?php echo home_url('/')?>/style/global/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo home_url('/')?>/style/global/js/common.js"></script>
<script type="text/javascript" src="<?php echo home_url('/')?>/style/public/public.js"></script>
<?php }?>
<!--[if lt IE 9]>
<script src="//cdn.goodao.net/cms/style/global/js/html5.js"></script>
<![endif]-->
<?php wp_footer();?>
<script type="text/javascript" src="//cdn.goodao.net/globalso.js"></script></body>
</html>