content |
<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:61:"D:\1\v5082538\wwwroot\template\default\index\index_index.html";i:1603184695;s:63:"D:\1\v5082538\wwwroot\template\default\index\public_header.html";i:1664171570;s:63:"D:\1\v5082538\wwwroot\template\default\index\public_footer.html";i:1594431869;}*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo "探(Tan)伤(Shang)仪(Yi)-超(Chao)声(Sheng)波(Bo)探(Tan)伤(Shang)仪(Yi)-涡(Wo)流(Liu)探(Tan)伤(Shang)仪(Yi)-裂(Lie)纹(Wen)-焊(Han)缝(Feng)"; ?>-<?php echo "苏(Su)州(Zhou)福(Fu)尔(?)特(Te)电(Dian)子(Zi)科(Ke)技(Ji)有(You)限(Xian)公(Gong)司(Si)"; ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="<?php echo "探(Tan)伤(Shang)仪(Yi),超(Chao)声(Sheng)波(Bo)探(Tan)伤(Shang)仪(Yi),涡(Wo)流(Liu)探(Tan)伤(Shang)仪(Yi),焊(Han)缝(Feng)探(Tan)伤(Shang)仪(Yi),裂(Lie)纹(Wen)探(Tan)伤(Shang)仪(Yi),探(Tan)伤(Shang)仪(Yi)厂(Chang)家(Jia),超(Chao)声(Sheng)波(Bo)探(Tan)伤(Shang)仪(Yi)厂(Chang)家(Jia),涡(Wo)流(Liu)探(Tan)伤(Shang)仪(Yi)厂(Chang)家(Jia),焊(Han)缝(Feng)探(Tan)伤(Shang)仪(Yi)厂(Chang)家(Jia),裂(Lie)纹(Wen)探(Tan)伤(Shang)厂(Chang)家(Jia)"; ?>" />
<meta name="description" content="<?php echo "苏(Su)州(Zhou)福(Fu)尔(?)特(Te)电(Dian)子(Zi)科(Ke)技(Ji)有(You)限(Xian)公(Gong)司(Si)从(Cong)事(Shi)各(Ge)系(Xi)列(Lie)探(Tan)伤(Shang)仪(Yi),超(Chao)声(Sheng)波(Bo)探(Tan)伤(Shang)仪(Yi),涡(Wo)流(Liu)探(Tan)伤(Shang)仪(Yi),裂(Lie)纹(Wen)探(Tan)伤(Shang)仪(Yi),焊(Han)缝(Feng)探(Tan)伤(Shang)仪(Yi)等(Deng),产(Chan)品(Pin)远(Yuan)销(Xiao)海(Hai)内(Nei)外(Wai),如(Ru)有(You)需(Xu)要(Yao)请(Qing)电(Dian)话(Hua)咨(Zi)询(Xun)."; ?>" />
<meta name="baidu-site-verification" content="U9tjYpsts6" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/style/css/style.css">
<script type="text/javascript" src="__PUBLIC__/style/js/jquery-1.6.4.min.js"></script>
<script type="text/javascript">
//图(Tu)片(Pian)滚(Gun)动(Dong) 调(Diao)用(Yong)方(Fang)法(Fa) imgscroll({speed: 30,amount: 1,dir: "up"});
$.fn.imgscroll = function(o){
var defaults = {
speed: 40,
amount: 0,
width: 1,
dir: "left"
};
o = $.extend(defaults, o);
return this.each(function(){
var _li = $("li", this);
_li.parent().parent().css({overflow: "hidden", position: "relative"}); //div
_li.parent().css({margin: "0", padding: "0", overflow: "hidden", position: "relative", "list-style": "none"}); //ul
_li.css({position: "relative", overflow: "hidden"}); //li
if(o.dir == "left") _li.css({float: "left"});
//初(Chu)始(Shi)大(Da)小(Xiao)
var _li_size = 0;
for(var i=0; i<_li.size(); i++)
_li_size += o.dir == "left" ? _li.eq(i).outerWidth(true) : _li.eq(i).outerHeight(true);
//循(Xun)环(Huan)所(Suo)需(Xu)要(Yao)的(De)元(Yuan)素(Su)
if(o.dir == "left") _li.parent().css({width: (_li_size*3)+"px"});
_li.parent().empty().append(_li.clone()).append(_li.clone()).append(_li.clone());
_li = $("li", this);
//滚(Gun)动(Dong)
var _li_scroll = 0;
function goto(){
_li_scroll += o.width;
if(_li_scroll > _li_size)
{
_li_scroll = 0;
_li.parent().css(o.dir == "left" ? { left : -_li_scroll } : { top : -_li_scroll });
_li_scroll += o.width;
}
_li.parent().animate(o.dir == "left" ? { left : -_li_scroll } : { top : -_li_scroll }, o.amount);
}
//开(Kai)始(Shi)
var move = setInterval(function(){ goto(); }, o.speed);
_li.parent().hover(function(){
clearInterval(move);
},function(){
clearInterval(move);
move = setInterval(function(){ goto(); }, o.speed);
});
});
};
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?93901b164f315970cf058dcb714c1abb";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<?php error_reporting(0); ?>
<div id="hhh">
<div class="hhh">
您(Nin)好(Hao)!(?)欢(Huan)迎(Ying)您(Nin)访(Fang)问(Wen)"<?php echo "苏(Su)州(Zhou)福(Fu)尔(?)特(Te)电(Dian)子(Zi)科(Ke)技(Ji)有(You)限(Xian)公(Gong)司(Si)"; ?>"企(Qi)业(Ye)网(Wang)站(Zhan)!(?)
<ul>
<li><a href="#">设(She)为(Wei)首(Shou)页(Ye)</a></li>
<li><a href="#">加(Jia)入(Ru)收(Shou)藏(Cang)</a></li>
<li><a href="#">联(Lian)系(Xi)我(Wo)们(Men)</a></li>
</ul>
</div>
</div>
<div id="head">
<div class="head">
<a href="/"><img src="<?php echo "/uploads/image/20221118/4c2bfff2b7ffbf774fa50c7cef315c34.png"; ?>"/></a>
<div class="pho">
<span>咨(Zi)询(Xun)热(Re)线(Xian)</span>
<p><?php
$_block = db('block')->where("title='".'head_text3'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></p>
</div>
</div>
</div>
<div id="daohang">
<ul id="webmenu" class="first-menu">
<li><a href="/" class="on">网(Wang)站(Zhan)首(Shou)页(Ye)</a></li>
<?php
$_limit = "10";
$_typeid = intval('1');
$_category = new app\index\model\CategoryModel();
$_navlist = $_category->getCategory('', $_typeid, true);
$_navlist = $_category->unlimitedForLayer($_navlist);
foreach($_navlist as $autoindex => $nav):
$_limit_list = explode(',', $_limit);
if(count($_limit_list) > 1){
if(($autoindex < $_limit_list[0]) || ($autoindex > $_limit_list[1])) continue;
} else{
if($autoindex >= $_limit) break;
}
$navmainurl = $nav['catmainurl'] ? false : true;
$nav['url'] = $_category->getCategoryUrl($nav, [] , $navmainurl);
$nav = update_str_dq($nav, session('sys_areainfo'));
?>
<li > <a href="<?php echo $nav['url']; ?>" target="<?php echo $nav['target']; ?>" <?php if($nav['id'] == $cid): ?>class="on"<?php endif; ?>> <?php echo $nav['title']; ?> </a>
<?php if($nav['child']): ?>
<ul style="display:none;" class="second-menu">
<?php if(is_array($nav['child']) || $nav['child'] instanceof \think\Collection || $nav['child'] instanceof \think\Paginator): $i = 0; $__LIST__ = $nav['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
<li><a href="<?php echo $v['url']; ?>" id="arrow"><?php echo $v['title']; ?></a></li>
<?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach;?>
</ul>
</div>
<div id="banner">
<div class="fullSlide">
<div class="bd">
<ul>
<?php
$_type = '1';
$_where = [];
if ($_type) {
$_where['type'] = $_type;
}
$_limit = "10";
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
$_infolist = db('banner')->where($_where)->order("sort desc")->limit($_limit)->select();
foreach ($_infolist as $k => $banner):
$banner = update_str_dq($banner, session('sys_areainfo'));
?>
<li _src="url(<?php echo $banner['pic']; ?>)" style="background:#fff center 0 no-repeat;" alt="<?php echo $banner['title']; ?>"><a href="<?php echo $banner['url']; ?>"></a></li>
<?php endforeach;?>
</ul>
</div>
<div class="hd"><ul></ul></div>
<span class="prev"></span>
<span class="next"></span>
</div>
</div>
<div id="hezuo">
<span class="big_title ">
福(Fu)尔(?)特(Te)<span style="color:#339efb;">合(He)作(Zuo)客(Ke)户(Hu)</span><br/>
<span class="small_title">fuerte Cooperative client</span>
</span>
<div class="scrollleft">
<ul>
<?php
$_cid = 84;
$_limit = "12";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(12) $list['title'] = str2sub($list['title'], 12, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<li>
<a href="<?php echo $list['nourl']; ?>"><img alt="<?php echo $list['title']; ?>" src="<?php echo $list['pic']; ?>"/></a>
</li>
<?php endforeach;?>
</ul>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".scrollleft").imgscroll({
speed: 40, //图(Tu)片(Pian)滚(Gun)动(Dong)速(Su)度(Du)
amount: 0, //图(Tu)片(Pian)滚(Gun)动(Dong)过(Guo)渡(Du)时(Shi)间(Jian)
width: 1, //图(Tu)片(Pian)滚(Gun)动(Dong)步(Bu)数(Shu)
dir: "left" // "left" 或(Huo) "up" 向(Xiang)左(Zuo)或(Huo)向(Xiang)上(Shang)滚(Gun)动(Dong)
});
});
</script>
</div>
<div id="mian">
<div class="product w100 ">
<div class="center w1200">
<span class="big_title ">
福(Fu)尔(?)特(Te)<span style="color:#339efb;">产(Chan)品(Pin)中(Zhong)心(Xin)</span><br/>
<span class="small_title">fuerte Product line</span>
</span>
<div class="lanrenzhijia">
<div class="tabbg">
<div class="tab" id="tab">
<a href="javascript:;" style="margin-left:165px;">涡(Wo)流(Liu)探(Tan)伤(Shang)仪(Yi)</a>
<a href="javascript:;">涡(Wo)流(Liu)分(Fen)选(Xuan)仪(Yi)</a>
<a href="javascript:;">超(Chao)声(Sheng)波(Bo)探(Tan)伤(Shang)仪(Yi)</a>
<a href="javascript:;">钢(Gang)丝(Si)绳(Sheng)探(Tan)伤(Shang)仪(Yi)</a>
<a href="javascript:;">磁(Ci)粉(Fen)探(Tan)伤(Shang)仪(Yi)</a>
<a href="javascript:;">X射(She)线(Xian)探(Tan)伤(Shang)仪(Yi)</a>
</div>
</div>
<div class="content">
<ul>
<li>
<?php
$_cid = 87;
$_limit = "8";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(10) $list['title'] = str2sub($list['title'], 10, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<div class="tabbox"><i></i><a href="<?php echo $list['url']; ?>"><img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>"/><span><?php echo $list['title']; ?></span></a></div>
<?php endforeach;?>
</li>
<li>
<?php
$_cid = 91;
$_limit = "8";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(10) $list['title'] = str2sub($list['title'], 10, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<div class="tabbox"><i></i><a href="<?php echo $list['url']; ?>"><img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>"/><span><?php echo $list['title']; ?></span></a></div>
<?php endforeach;?>
</li>
<li>
<?php
$_cid = 88;
$_limit = "8";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(10) $list['title'] = str2sub($list['title'], 10, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<div class="tabbox"><i></i><a href="<?php echo $list['url']; ?>"><img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>"/><span><?php echo $list['title']; ?></span></a></div>
<?php endforeach;?>
</li>
<li>
<?php
$_cid = 89;
$_limit = "8";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(10) $list['title'] = str2sub($list['title'], 10, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<div class="tabbox"><i></i><a href="<?php echo $list['url']; ?>"><img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>"/><span><?php echo $list['title']; ?></span></a></div>
<?php endforeach;?>
</li>
<li>
<?php
$_cid = 90;
$_limit = "8";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(10) $list['title'] = str2sub($list['title'], 10, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<div class="tabbox"><i></i><a href="<?php echo $list['url']; ?>"><img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>"/><span><?php echo $list['title']; ?></span></a></div>
<?php endforeach;?>
</li>
<li>
<?php
$_cid = 92;
$_limit = "8";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(10) $list['title'] = str2sub($list['title'], 10, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<div class="tabbox"><i></i><a href="<?php echo $list['url']; ?>"><img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>"/><span><?php echo $list['title']; ?></span></a></div>
<?php endforeach;?>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="MMBc">
<span>24小(Xiao)时(Shi)咨(Zi)询(Xun)热(Re)线(Xian):(?)<?php
$_block = db('block')->where("title='".'head_text3'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></span>
<p>目(Mu)前(Qian)检(Jian)测(Ce)产(Chan)品(Pin)除(Chu)了(Liao)国(Guo)内(Nei)市(Shi)场(Chang),(?)同(Tong)时(Shi)也(Ye)销(Xiao)往(Wang)美(Mei)国(Guo),(?)印(Yin)度(Du),(?)巴(Ba)基(Ji)斯(Si)坦(Tan),(?)越(Yue)南(Nan),(?)日(Ri)本(Ben)等(Deng)世(Shi)界(Jie)各(Ge)地(Di)</p>
</div>
<div id="ABCD">
<ul>
<li>
<?php
$_type = "son";
$_typeid = intval(20);
$_category = new app\index\model\CategoryModel();
$_catlist = $_category->getCategory(1);
if ($_type == 'parent') {
$_parent = $_category->getParents($_catlist, $_typeid);
$_typeid = $_parent[0]['id'];
}
$type = $_category->getOneCategory($_typeid);
$type = $_category->getCategoryArea($type);
$type = update_str_dq($type, session('sys_areainfo'));
?>
<a href="<?php echo $type['url']; ?>">
<i></i><img src="__PUBLIC__/style/img/bn11.png" />
<div class="a1">企(Qi)业(Ye)概(Gai)况(Kuang)</div>
<div class="a2">GROUP PROFILE</div>
<div class="a3"><?php echo $type['desc']; ?></div>
<div class="a11">更(Geng)多(Duo)</div>
</a>
</li>
<li>
<?php
$_type = "son";
$_typeid = intval(20);
$_category = new app\index\model\CategoryModel();
$_catlist = $_category->getCategory(1);
if ($_type == 'parent') {
$_parent = $_category->getParents($_catlist, $_typeid);
$_typeid = $_parent[0]['id'];
}
$type = $_category->getOneCategory($_typeid);
$type = $_category->getCategoryArea($type);
$type = update_str_dq($type, session('sys_areainfo'));
?>
<a href="<?php echo $type['url']; ?>">
<i></i><img src="__PUBLIC__/style/img/bn12.png" />
<div class="a1">检(Jian)测(Ce)案(An)例(Li)</div>
<div class="a2">CASE</div>
<div class="a3"><?php echo $type['desc']; ?></div>
<div class="a11">更(Geng)多(Duo)</div>
</a>
</li>
<li>
<?php
$_type = "son";
$_typeid = intval(85);
$_category = new app\index\model\CategoryModel();
$_catlist = $_category->getCategory(1);
if ($_type == 'parent') {
$_parent = $_category->getParents($_catlist, $_typeid);
$_typeid = $_parent[0]['id'];
}
$type = $_category->getOneCategory($_typeid);
$type = $_category->getCategoryArea($type);
$type = update_str_dq($type, session('sys_areainfo'));
?>
<a href="<?php echo $type['url']; ?>">
<i></i><img src="__PUBLIC__/style/img/bn13.png" />
<div class="a1">服(Fu)务(Wu)与(Yu)支(Zhi)持(Chi)</div>
<div class="a2">SERVICE</div>
<div class="a3"><?php echo $type['desc']; ?></div>
<div class="a11">更(Geng)多(Duo)</div>
</a>
</li>
<li>
<?php
$_type = "son";
$_typeid = intval(83);
$_category = new app\index\model\CategoryModel();
$_catlist = $_category->getCategory(1);
if ($_type == 'parent') {
$_parent = $_category->getParents($_catlist, $_typeid);
$_typeid = $_parent[0]['id'];
}
$type = $_category->getOneCategory($_typeid);
$type = $_category->getCategoryArea($type);
$type = update_str_dq($type, session('sys_areainfo'));
?>
<a href="<?php echo $type['url']; ?>">
<i></i><img src="__PUBLIC__/style/img/bn14.png" />
<div class="a1">检(Jian)测(Ce)视(Shi)频(Pin)</div>
<div class="a2">VIDEO</div>
<div class="a3"><?php echo $type['desc']; ?></div>
<div class="a11">更(Geng)多(Duo)</div>
</a>
</li>
</ul>
</div>
<div id="youshi">
<span class="big_title ">
六(Liu)大(Da)<span style="color:#339efb;">核(He)心(Xin)优(You)势(Shi)</span><br/>
<span class="small_title">SIX CORE STRENGTHS</span>
</span>
<ul>
<li>
<div class="cd">
<img src="__PUBLIC__/style/img/bn22.png" />
<div class="qnm">
<?php
$_block = db('block')->where("title='".'lyone'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
</div>
<div class="qnm1"><?php
$_block = db('block')->where("title='".'lyonec'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</li>
<li>
<div class="cd">
<img src="__PUBLIC__/style/img/bn23.png" />
<div class="qnm">
<?php
$_block = db('block')->where("title='".'lytwo'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
</div>
<div class="qnm1"><?php
$_block = db('block')->where("title='".'lytwoc'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</li>
<li>
<div class="cd">
<img src="__PUBLIC__/style/img/bn24.png" />
<div class="qnm">
<?php
$_block = db('block')->where("title='".'lythree'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
</div>
<div class="qnm1"><?php
$_block = db('block')->where("title='".'lythreec'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</li>
<li>
<div class="cd">
<img src="__PUBLIC__/style/img/bn25.png" />
<div class="qnm">
<?php
$_block = db('block')->where("title='".'lyfour'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
</div>
<div class="qnm1"><?php
$_block = db('block')->where("title='".'lyfourc'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</li>
<li>
<div class="cd">
<img src="__PUBLIC__/style/img/bn26.png" />
<div class="qnm">
<?php
$_block = db('block')->where("title='".'lyfive'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
</div>
<div class="qnm1"><?php
$_block = db('block')->where("title='".'lyfivec'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</li>
<li>
<div class="cd">
<img src="__PUBLIC__/style/img/bn22.png" />
<div class="qnm">
<?php
$_block = db('block')->where("title='".'lysix'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
</div>
<div class="qnm1"><?php
$_block = db('block')->where("title='".'lysixc'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</li>
</ul>
</div>
<div class="news" >
<div class="center w1200">
<div class="newsL">
<div class="cdtil"> 新(Xin)闻(Wen)资(Zi)讯(Xun)
<?php
$_type = "son";
$_typeid = intval(93);
$_category = new app\index\model\CategoryModel();
$_catlist = $_category->getCategory(1);
if ($_type == 'parent') {
$_parent = $_category->getParents($_catlist, $_typeid);
$_typeid = $_parent[0]['id'];
}
$type = $_category->getOneCategory($_typeid);
$type = $_category->getCategoryArea($type);
$type = update_str_dq($type, session('sys_areainfo'));
?>
<a href="<?php echo $type['url']; ?>" > 查(Cha)看(Kan)更(Geng)多(Duo)</a>
</div>
<div class="newsL_T">
<?php
$_cid = 93;
$_limit = "1";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(0) $list['title'] = str2sub($list['title'], 0, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<a href="<?php echo $list['url']; ?>" title="<?php echo $list['title']; ?>"><img src="<?php echo $list['pic']; ?>" onerror="javascript:this.src='/uploads/image/20200808/80758b7144102a6c6933d3ea9d998fad.jpg';" alt="<?php echo $list['title']; ?>"/></a>
<div class="rr">
<span><a href="<?php echo $list['url']; ?>" title="<?php echo $list['title']; ?>"><?php echo $list['title']; ?></a></span>
<p><a href="<?php echo $list['url']; ?>" title="<?php echo $list['title']; ?>"><?php echo str2sub($list['desc'],90, true); ?></a></p>
<div class="more"><a href="<?php echo $list['url']; ?>">查(Cha)看(Kan)更(Geng)多(Duo)</a></div>
</div>
<?php endforeach;?>
</div>
<div class="newsL_B">
<UL>
<?php
$_cid = 93;
$_limit = "7";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("update_time desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("update_time desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("update_time desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("update_time desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(0) $list['title'] = str2sub($list['title'], 0, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<li><a href="<?php echo $list['url']; ?>" title="<?php echo $list['title']; ?>">◎(?) <?php echo $list['title']; ?></a>[<?php echo date('Y-m-d',$list['update_time']); ?>]</li>
<?php endforeach;?>
</UL>
</div>
</div>
<div class="newsR">
<div class="cdtil"> 常(Chang)见(Jian)问(Wen)题(Ti)<?php
$_type = "son";
$_typeid = intval(95);
$_category = new app\index\model\CategoryModel();
$_catlist = $_category->getCategory(1);
if ($_type == 'parent') {
$_parent = $_category->getParents($_catlist, $_typeid);
$_typeid = $_parent[0]['id'];
}
$type = $_category->getOneCategory($_typeid);
$type = $_category->getCategoryArea($type);
$type = update_str_dq($type, session('sys_areainfo'));
?>
<a href="<?php echo $type['url']; ?>" > 查(Cha)看(Kan)更(Geng)多(Duo)</a>
</div>
<ul>
<?php
$_cid = 95;
$_limit = "4";
$_keyword = -1;
$_flag = '1';
$_time = '';
$_areaid = '';//指(Zhi)定(Ding)地(Di)区(Qu)ID
$_top = '';
$_image = '-1';
$_pagesize = 0;
$_pagecss = 1;
$_tag = -1;
$_sql = "-1";
if($_cid == -1) $_cid = input('cid');
if ($_cid > 0 || substr($_cid, 0, 1) == '$') {
$_category = new app\index\model\CategoryModel();
if (strpos($_cid, ',')) {
$_cidarr = explode(',', $_cid);
$_ids = [];
foreach ($_cidarr as $_k => $_v) {
$_ids = array_merge($_ids, $_category->getChildsId($_category->getCategory(), $_v, true));
}
}else{
$_ids = $_category->getChildsId($_category->getCategory(), $_cid, true);
}
$_where = ['create_time' => ['LT', time()]];
$_where[] = function ($_q) use($_ids){
$_q->where(['cid' => ['IN', $_ids]])->whereor("CONCAT(',',addcid,',') REGEXP CONCAT(',(',REPLACE('".implode(',', $_ids)."',',','|'),'),')");
};
}else {
$_where = array('create_time' => array('LT', time()));
}
if ($_keyword != -1) {
$_where['title'] = array('LIKE','%'.$_keyword.'%');
}
if ($_flag) {
$_where['istop'] = $_flag;
}
if ($_time) {
$_where['update_time'] = ['GT', time()-$_time];
}
if ($_top) {
$_where['top'] = $_top;
}
if ($_image != -1) {
$_where['pic'] = $_image ? ['NEQ', ''] : ['EQ', ''];
}
if ($_tag != -1) {
$_jgf = ',';
$_jgf = strpos($_tag, ',(?)') ? ',(?)' : $_jgf;
$_taglist = explode($_jgf,$_tag);
if (count($_taglist) > 1) {
$_tagarr = array();
foreach ($_taglist as $_k => $_v) {
$_tagarr[] = ['LIKE','%'.$_v.'%'];
}
$_tagarr[] = 'or';
$_where['tag'] = $_tagarr;
}else{
$_where['tag'] = ['LIKE','%'.$_tag.'%'];
}
}
$_where['create_time'] = ['LT', time()];
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
if ($_areaid) {
$_arealist = explode(',', $_areaid);
$_areawhere = [];
foreach ($_arealist as $key => $value) {
if ($value) {
$_areawhere[] = ['LIKE','%,'.$value.',%'];
}
}
if (count($_areawhere) > 1) {
$_areawhere[] = 'or';
$_where['area'] = $_areawhere;
}else{
$_where['area'] = $_areawhere[0];
}
}else{
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
}
$_wheresql = '';
$_pageurlarr = [];
if ($_sql != -1) {
//拼(Pin)接(Jie)SQL语(Yu)句(Ju)
$_db = db('diyfield');
$_sqlstrlist = explode(" ", $_sql);
$_sqlstr = ' ';
if ($_sqlstrlist) {
foreach ($_sqlstrlist as $key1 => $value1) {
if (is_numeric($value1)) {
$_fieldname = $_db->where(['id'=>$value1])->value('field');
$_newfieldname = isset($_GET[$_fieldname]) ? $_GET[$_fieldname] : '';
if ($_newfieldname != '不(Bu)限(Xian)' && $_newfieldname != '' && $_newfieldname != ',不(Bu)限(Xian)') {
$_filelist = explode(',', $_newfieldname);
$_instr = "";
foreach ($_filelist as $key2 => $value2) {
if ($value2) {
$_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
}
}
$_sqlstr = $_sqlstr."($_instr) ";
}else{
$_sqlstr = $_sqlstr."( 1 = 1 ) ";
}
$_pageurlarr[$_fieldname] = $_newfieldname;
}else{
if ($value1 == 'or') {
$_sqlstr = $_sqlstr."or ";
}
if ($value1 == 'and' ) {
$_sqlstr = $_sqlstr."and ";
}
}
}
}
$_wheresql = $_sqlstr;
}
//获(Huo)取(Qu)模(Mo)型(Xing)别(Bie)名(Ming)
$_tabname = "";
if ($_cid != -1 && !empty($_cid)) {
$_mid = db('category')->where(['id'=>$_cid])->value('mid');
$_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname');
}
$page = "";//分(Fen)页(Ye)
if ($_pagesize > 0) {
$_pagearr = [];
switch (config('sys.url_model')) {
case '1'://动(Dong)态(Tai)
$param['s'] = request()->pathinfo();
$param = array_merge($param, request()->param());
$_pagearr = ['query' => $param];
break;
case '3'://伪(Wei)静(Jing)态(Tai)
$_pagearr = ['query' => []];
break;
}
$_pagearr['var_link_rows'] = 7;
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->paginate($_pagesize, false, $_pagearr);
}
$page = $_infolist->render();
$page = preg_replace("#/([\d]*)page/#", '/page/', $page);
//搜(Sou)索(Suo)组(Zu)合(He)参(Can)数(Shu)
if (config('sys.url_model') == 3 && $_keyword && !isset($_GET['key']) && input('key')) {
$page = str_replace("/page/", '/key/'.input('key').'/page/', $page);
}
if (config('sys.url_model') == 3 && $_area) {
if ($_area['isurl'] == 0) {
//$_ctitle = input('ctitle', '', 'trim');
//$page = str_replace($_ctitle."/", $_area['etitle'].'_'.$_ctitle."/", $page);
}
}
if (!$_pagecss) {
$page = preg_replace('#<style([\s\S]*)</style>#', "", $page);
}
}else {
//存(Cun)在(Zai)cid情(Qing)况(Kuang)
if ($_tabname) {
$_infolist = db('content')
->alias('con')
->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid')
->where($_where)
->where($_wheresql)
->order("sort desc")
->limit($_limit)
->select();
}else{
$_infolist = db('content')
->where($_where)
->order("sort desc")
->limit($_limit)
->select();
}
}
//组(Zu)合(He)筛(Shai)选(Xuan)修(Xiu)改(Gai)分(Fen)页(Ye)URL
if ($_pageurlarr) {
$_ljstr = config('sys.url_model') == '1' ? "&" : "?";
$page = preg_replace('/href=[\'|\"](\S+)[\'|\"]/i', 'href=$1'.$_ljstr.build_query($_pageurlarr), $page);
}
$_content = new app\index\model\ContentModel();
foreach ($_infolist as $k => $list):
$list = $_content->getContentByCon($list);
$list['alltitle'] = $list['title'];
if(0) $list['title'] = str2sub($list['title'], 0, 0);
$list = $_content->getContentArea($list);
$list = update_str_dq($list, session('sys_areainfo'));
?>
<li>
<div class="t1"><a href="<?php echo $list['url']; ?>" title="<?php echo $list['title']; ?>">问(Wen):(?)<?php echo $list['title']; ?></a></div>
<div class="t2"><a href="<?php echo $list['url']; ?>" title="<?php echo $list['title']; ?>">答(Da):(?)<?php echo str2sub($list['desc'],80, true); ?></a></div>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
</div>
<div id="llink">
<p>友(You)情(Qing)链(Lian)接(Jie)</p>
<?php
$_type = '1';
$_flag = '';
$_where = [];
if ($_type) {
$_where['type'] = $_type;
}
if ($_flag) {
$_where['pic'] = $_flag == 'true' ? ['NEQ', ''] : ['EQ', ''];
}
//地(Di)区(Qu)独(Du)立(Li)内(Nei)容(Rong)
$_area = session('sys_areainfo');
if ($_area) {
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,'.$_area['id'].',%'], 'or'];
}else{
$_where['area'] = [['exp',' is NULL'],['eq',''],['eq',',,'],['LIKE','%,88888888,%'], 'or'];
}
$_limit = "10";
$_infolist = db('link')->where($_where)->order("id DESC")->limit($_limit)->select();
foreach ($_infolist as $k => $link):
$link = update_str_dq($link, session('sys_areainfo'));
?>
<a href="<?php echo $link['url']; ?>" ><?php echo $link['title']; ?></a>
<?php endforeach;?>
</div>
<div id="llink">
<p>城(Cheng)市(Shi)分(Fen)站(Zhan)</p>
<?php
$_limit = "10";
$_top = intval('1');
$_con = intval('0');
$_url = intval('0');
$_topzm = -1;
$_pid = 0;
$_conurl = intval('');
$_type = 'level';
$_where = [];
if ($_top) {
$_where['istop'] = $_top;
}
if ($_con) {
$_where['iscon'] = $_con;
}
if ($_url) {
$_where['isurl'] = $_url;
}
if ($_topzm != -1) {
$_where['etitle'] = ['LIKE', $_topzm.'%'];
}
$_area = session('sys_areainfo');
if ($_type == "current") {
$_where['id']= $_area ? $_area['id'] : '';
}
if ($_type == "province") {
$_where['id']= $_area ? getprovince($_area['id']) : '';
}
if ($_type == -1 || $_type == "group" || $_type == "1" ) {
if ($_pid) {
$_where['pid'] = $_pid;
}else{
if ($_area && !$_conurl) {
$_where['pid'] = $_area['id'];
}else{
$_where['pid'] = 0;
}
}
}
$_where['isopen'] = 1;
$_limit = "10";
$_infolist = db('area')->where($_where)->order("sort asc")->limit($_limit)->select();
if (empty($_infolist)) {
if ($_area && !$_conurl) {
$_where['pid'] = $_area['pid'];
$_infolist = db('area')->where($_where)->order("sort asc")->limit($_limit)->select();
}
}
$_areamodel = new app\index\model\AreaModel();
$_category = new app\index\model\CategoryModel();
$_content = new app\index\model\ContentModel();
foreach($_infolist as $autoindex => $area):
$area['ys_url'] = $_areamodel->getAreaUrl($area);
$area['ys_title'] = $area['title'];
$area['ys_stitle'] = $area['stitle'];
if ($_conurl) {
$area['url'] = $_areamodel->getAreaUrl($area);
}else{
if (isset($content)) {
$_data = $_content->getContentArea($content, $area);
$area['url'] = $_data['url'];
$area['title'] = $area['stitle'].$content['ys_title'];
}else{
if (isset($category)){
$_data = $_category->getCategoryArea($category, $area);
$area['url'] = $_data['url'];
$area['title'] = $area['stitle'].$category['ys_title'];
}else{
$area['url'] = $_areamodel->getAreaUrl($area);
}
}
}
?>
<a href="<?php echo $area['url']; ?>" ><?php echo $area['title']; ?></a>
<?php endforeach;?>
</div>
<div id="footer">
<div class="bnav">
<ul>
<li><a href="/">网(Wang)站(Zhan)首(Shou)页(Ye)</a></li>
<?php
$_limit = "10";
$_typeid = intval('1');
$_category = new app\index\model\CategoryModel();
$_navlist = $_category->getCategory('', $_typeid, true);
$_navlist = $_category->unlimitedForLayer($_navlist);
foreach($_navlist as $autoindex => $nav):
$_limit_list = explode(',', $_limit);
if(count($_limit_list) > 1){
if(($autoindex < $_limit_list[0]) || ($autoindex > $_limit_list[1])) continue;
} else{
if($autoindex >= $_limit) break;
}
$navmainurl = $nav['catmainurl'] ? false : true;
$nav['url'] = $_category->getCategoryUrl($nav, [] , $navmainurl);
$nav = update_str_dq($nav, session('sys_areainfo'));
?>
<li><a href="<?php echo $nav['url']; ?>"><?php echo $nav['title']; ?></a></li>
<?php endforeach;?>
</ul>
</div>
<div class="bfoot">
<div class="blogo"><img src="__PUBLIC__/style/img/logob.png" /></div>
<div class="blian">
<?php
$_block = db('block')->where("title='".'ccc'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?6c8bdf4d348a1423cef5a28add123e3e";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</div>
<div class="erwm"><?php
$_block = db('block')->where("title='".'ewm'."'")->find();
$_block = update_str_dq($_block, session('sys_areainfo'));
$_block_content = '';
if ($_block) {
if ($_block['type'] == 2) {
if (!0) {
$_block_content = '<img src="'. $_block['content'] .'" />';
}else {
$_block_content = $_block['content'];
}
}else {
if(0) {
$_block_content = str2sub(strip_tags($_block['content']), 0, 0);//清(Qing)除(Chu)html再(Zai)截(Jie)取(Qu)
}else {
$_block_content = $_block['content'];
}
}
$_blockurl = '';
if ($_block['url']) {
$_blockurl = $_block['url'];
if (substr($_blockurl, 0,1) == '@') {
$_catemodel = new app\index\model\CategoryModel();
$_category = $_catemodel->getOneCategory(substr($_blockurl, 1));
if ($_category) {
$_blockurl = $_catemodel->getCategoryUrl($_category);
}
}
$_block_content= "<a href='".$_blockurl."' target='_blank'>".$_block_content."</a>";
}
}
echo $_block_content;
?></div>
</div>
</div>
<SCRIPT type="text/javascript" src="__PUBLIC__/style/js/lrscroll.js"></SCRIPT>
<!----banner--->
<script type="text/javascript" src="__PUBLIC__/style/js/superslide.2.1.js"></script>
<!----bannerend--->
<script>
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
<!--hot_product-->
<script src="__PUBLIC__/style/js/jscarousel.js" type="text/javascript"></script>
<!--hot_product_end--->
<script type="text/javascript" src="__PUBLIC__/style/js/heji.js"></script>
<script src="http://www.szrongbang.com/theme/boge/js/zxkefu.js"></script>
</body>
</html>
|