[2] ErrorException in File.php line 32

file_put_contents(D:\wwwroot\ok3kxbgdhsj\wwwroot\caches\temp\1591826cb664f6822158f6c768418bcb.php): failed to open stream: Invalid argument

  1. */
  2. public function write($cacheFile, $content)
  3. {
  4. // 检测模板目录
  5. $dir = dirname($cacheFile);
  6. if (!is_dir($dir)) {
  7. mkdir($dir, 0755, true);
  8. }
  9. // 生成模板缓存文件
  10. if (false === file_put_contents($cacheFile, $content)) {
  11. throw new Exception('cache write error:' . $cacheFile, 11602);
  12. }
  13. }
  14. /**
  15. * 读取编译编译
  16. * @param string $cacheFile 缓存的文件名
  17. * @param array $vars 变量数组
  18. * @return void

Exception Datas

Error Context
cacheFile D:\wwwroot\ok3kxbgdhsj\wwwroot\caches\temp\1591826cb664f6822158f6c768418bcb.php
content <?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:46:"./template/default/index/list_product_diy.html";i:1534756257;s:72:"D:\wwwroot\ok3kxbgdhsj\wwwroot\template\default\index\public_header.html";i:1535076067;s:70:"D:\wwwroot\ok3kxbgdhsj\wwwroot\template\default\index\public_left.html";i:1534756258;s:72:"D:\wwwroot\ok3kxbgdhsj\wwwroot\template\default\index\public_footer.html";i:1597539257;}*/ ?> <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="renderer" content="webkit|ie-comp|ie-stand"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title><?php if(strlen($category['seo_title']) != 0): ?><?php echo $category['seo_title']; else: ?><?php echo $category['title']; ?>-<?php echo "安徽快马科技有限公司"; endif; ?></title> <meta name="keywords" content="<?php echo $category['seo_keywords']; ?>"> <meta name="description" content="<?php echo $category['seo_desc']; ?>"> <link rel="stylesheet" href="__PUBLIC__/css/yunu.css"> </head> <body> <?php error_reporting(0); ?> <div class="header"> <div class="center"> <div class="head_top_content"> <div class="head_logo fl"> <img src="<?php echo "/uploads/image/20170929/fbe0415ab900053aef3846e0077c1ef5.jpg"; ?>" alt=""> <div class="head_tit fl"> <h4><?php echo "安徽快马科技有限公司"; ?></h4> <?php $_block = db('block')->where("title='".'head_text1'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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="head_text fl"> <?php $_block = db('block')->where("title='".'head_text2'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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 class="fr"> <img src="__PUBLIC__/img/ren.png" alt=""> <?php $_block = db('block')->where("title='".'head_text3'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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 class="head_nav"> <ul> <?php $cid = isset($cid) ? $cid : 0; ?> <li><a href="<?php echo "http://ok3k.com/bz.html"; ?>" <?php if(!isset($cid)): ?>class="active"<?php endif; ?>>网站首页</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, config('sys.sys_area')); ?> <li><a href="<?php echo $nav['url']; ?>" <?php if($nav['id'] == $cid): ?>class="active"<?php endif; ?> target="<?php echo $nav['target']; ?>"><?php echo $nav['title']; ?></a></li> <?php endforeach;?> </ul> </div> </div> </div> <?php if(!is_array([index])): ?> <div class="banner"> <div class="banner_img" id="wowslider-container"> <div class="ws_images" id="banner"> <ul> <?php $_type = '1'; $_where = []; if ($_type) { $_where['type'] = $_type; } $_limit = "10"; //地区独立内容 $_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, config('sys.sys_area')); ?> <li> <a href="<?php echo $banner['url']; ?>"><img src="<?php echo $banner['pic']; ?>" alt="<?php echo $banner['title']; ?>" width="1920" height="550"></a> </li> <?php endforeach;?> </ul> </div> <!-- <div class="ws_bullets"> <div> <a href="javascript:;"> <span>1</span> </a> <a href="javascript:;"> <span>2</span> </a> </div> </div> <div class="ws_shadow"></div> --> </div> <!-- <script type="text/javascript" src="__PUBLIC__/js/wowslider.js"></script> <script type="text/javascript" src="__PUBLIC__/js/script.js"></script> --> <div class="banner_text"> <div class=" center"> <div class="banner_text_content"> <img class="imgleft" id="imgleft" src="__PUBLIC__/img/jb.png" alt=""> <div class="banner_text_bg"> <?php $_block = db('block')->where("title='".'banner_text'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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> <script type="text/javascript"> $(document).ready(function(){ $('#banner').roll({ height: 550, banner: true, btn: true, center: false }); $('#imgleft').animate({left: "0"},1000); $('#pbottom').animate({top: "0"},1000); $('#fonts').animate({fontSize: "43px"},1000); $('#fonts').animate({opacity: "1"},2000); }); </script> </div> </div> </div> </div> <?php else: ?> <div class="page_banner"> <?php $_block = db('block')->where("title='".'page_banner'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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> <?php endif; ?> <div class="main container"> <div class="center"> <div class="main_l fl" id="main_l"> <p> <span><?php $_type = "parent"; $_typeid = intval($category['id']); $_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['url'] = $_category->getCategoryUrl($type); $type = update_str_dq($type, config('sys.sys_area')); ?><?php echo $type['title']; ?></span> <i>PRODUCT DISPLAY</i> </p> <ul> <?php $_limit = "10"; $_cid = intval($category['id']); $_type = "parent"; $_category = new app\index\model\CategoryModel(); if($_cid == -1) $_cid = input('cid'); $_catlist = $_category->getCategory(1); if (1 == 0) { $_catlist = $_category->clearLink($_catlist);//去除外部链接的栏目 } //type为parent if ($_type == 'parent') { $_parent = $_category->getParents($_catlist, $_cid); $_catlist = $_category->unlimitedForLayer($_catlist, 'child', $_parent[0]['id']); }else{ //type为top,忽略cid if($_cid == 0 || $_type == 'top') { $_catlist = $_category->unlimitedForLayer($_catlist); }else { if ($_type == 'self') { //同级分类 $_typeinfo = $_category->getSelf($_catlist, $_cid ); $_catlist = $_category->unlimitedForLayer($_catlist, 'child', $_typeinfo['pid']); }else { //son,子类列表 $_catlist = $_category->unlimitedForLayer($_catlist, 'child', $_cid); } } } $_limit_list = explode(',', $_limit); foreach($_catlist as $autoindex => $catlist): if(count($_limit_list) > 1){ if(($autoindex < $_limit_list[0]) || ($autoindex > $_limit_list[1])) continue; } else{ if($autoindex >= $_limit_list[0]) break; } $catlist = update_str_dq($catlist, config('sys.sys_area')); ?> <li <?php if($catlist['id'] == $cid || $catlist['id'] == $category['pid']): ?>class="active"<?php endif; ?>><a href="<?php echo $catlist['url']; ?>"><span><?php echo $catlist['title']; ?></span></a> </li> <ul> <?php if(is_array($catlist['child']) || $catlist['child'] instanceof \think\Collection || $catlist['child'] instanceof \think\Paginator): $i = 0; $__LIST__ = $catlist['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?> <li><a href="<?php echo $v['url']; ?>"><?php echo $v['title']; ?></a></li> <?php endforeach; endif; else: echo "" ;endif; ?> </ul> <?php endforeach;?> </ul> <div class="liuyan"> <b> <?php $_type = "son"; $_typeid = intval(30); $_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['url'] = $_category->getCategoryUrl($type); $type = update_str_dq($type, config('sys.sys_area')); ?> <a href="<?php echo $type['url']; ?>"> <img src="__PUBLIC__/img/lxa1.jpg" alt=""> <img src="__PUBLIC__/img/lxa2.jpg" alt=""> </a> </b> <b> <a href="javascript:;"> <img src="__PUBLIC__/img/lya1.jpg" alt=""> <img src="__PUBLIC__/img/lya2.jpg" alt=""> </a> </b> </div> </div> <script type="text/javascript" src="__PUBLIC__/js/jquery-1.12.4.min.js"></script> <script type="text/javascript"> ;(function () { var last_dom = $('#main_l .active').next('ul').show(); $('#main_l>ul>li').filter(function () { var t = $(this), ul = t.next('ul'); if (ul.children().length) { t.on('mouseenter', function () { if (ul.index() != last_dom.index()) { last_dom.slideUp('fast'); last_dom = ul.slideDown('fast'); }; }); }else{ t.addClass('no_child'); } }); })(); </script> <div class="main_r fr"> <div class="crumbs"> <p> <?php $_sname = ""; $_cid = $cid; echo getPosition($_cid, $_sname, "", "&gt;&gt;"); ?> </p> </div> <div class="content_des"> <?php echo $category['desc']; ?> </div> <div class="nav_group"> <div class="nav_group_item"> <div class="item_name">品牌 :</div> <?php $_id = 131; $_group = "131,132,133"; $_noset = true; $_active = "active"; $_db = db('diyfield'); $_fielddata = $_db->where(['id'=>$_id])->find(); if ($_fielddata) { $ff = $_fielddata['field']; $_infolist = explode(" ", $_fielddata['values']); $_garr = []; if ($_group) { $_garrdata = explode(',',$_group); foreach ($_garrdata as $key1 => $value1) { $_gname = $_db->where(['id'=>$value1])->value('field'); $_garr[$_gname] = $_GET[$_gname]; } } $_category = new app\index\model\CategoryModel(); $fieldcate = $_category->getOneCategory($cid); if ($_noset) { array_unshift($_infolist, '不限'); } $_ljstr = config('sys.url_model') == '1' ? "&" : "?"; $_dqfield = $_garr[$ff]; foreach ($_infolist as $autoindex => $val): if ($_fielddata['ftype'] == 'select') { $_garr[$ff] = $val; $field['name'] = $val; $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); if (isset($_GET[$ff]) && $_GET[$ff] != '') { $field['active'] = $_GET[$ff] == $val ? $_active : ''; }else{ $field['active'] = $val == '不限' ? $_active : ''; } }else{ $_callist = explode(',',$_dqfield); $field['name'] = $val; if (isset($_GET[$ff]) && $_GET[$ff] != '') { $field['active'] = in_array($val, $_callist) ? $_active : ''; }else{ $field['active'] = $val == '不限' ? $_active : ''; } if (in_array($val, $_callist)) { $key = array_search($val, $_callist); unset($_callist[$key]); $_garr[$ff] = implode(',', $_callist); $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); }else{ $_callist[] = $val; $_garr[$ff] = implode(',', $_callist); $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); } } ?> <a href="<?php echo $field['url']; ?>" class="<?php echo $field['active']; ?>"><?php echo $field['name']; ?></a> <?php endforeach; } ?> </div> <div class="nav_group_item"> <div class="item_name">类型 :</div> <?php $_id = 132; $_group = "131,132,133"; $_noset = true; $_active = "active"; $_db = db('diyfield'); $_fielddata = $_db->where(['id'=>$_id])->find(); if ($_fielddata) { $ff = $_fielddata['field']; $_infolist = explode(" ", $_fielddata['values']); $_garr = []; if ($_group) { $_garrdata = explode(',',$_group); foreach ($_garrdata as $key1 => $value1) { $_gname = $_db->where(['id'=>$value1])->value('field'); $_garr[$_gname] = $_GET[$_gname]; } } $_category = new app\index\model\CategoryModel(); $fieldcate = $_category->getOneCategory($cid); if ($_noset) { array_unshift($_infolist, '不限'); } $_ljstr = config('sys.url_model') == '1' ? "&" : "?"; $_dqfield = $_garr[$ff]; foreach ($_infolist as $autoindex => $val): if ($_fielddata['ftype'] == 'select') { $_garr[$ff] = $val; $field['name'] = $val; $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); if (isset($_GET[$ff]) && $_GET[$ff] != '') { $field['active'] = $_GET[$ff] == $val ? $_active : ''; }else{ $field['active'] = $val == '不限' ? $_active : ''; } }else{ $_callist = explode(',',$_dqfield); $field['name'] = $val; if (isset($_GET[$ff]) && $_GET[$ff] != '') { $field['active'] = in_array($val, $_callist) ? $_active : ''; }else{ $field['active'] = $val == '不限' ? $_active : ''; } if (in_array($val, $_callist)) { $key = array_search($val, $_callist); unset($_callist[$key]); $_garr[$ff] = implode(',', $_callist); $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); }else{ $_callist[] = $val; $_garr[$ff] = implode(',', $_callist); $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); } } ?> <a href="<?php echo $field['url']; ?>" class="<?php echo $field['active']; ?>"><?php echo $field['name']; ?></a> <?php endforeach; } ?> </div> <div class="nav_group_item"> <div class="item_name">颜色 :</div> <?php $_id = 133; $_group = "131,132,133"; $_noset = true; $_active = "active"; $_db = db('diyfield'); $_fielddata = $_db->where(['id'=>$_id])->find(); if ($_fielddata) { $ff = $_fielddata['field']; $_infolist = explode(" ", $_fielddata['values']); $_garr = []; if ($_group) { $_garrdata = explode(',',$_group); foreach ($_garrdata as $key1 => $value1) { $_gname = $_db->where(['id'=>$value1])->value('field'); $_garr[$_gname] = $_GET[$_gname]; } } $_category = new app\index\model\CategoryModel(); $fieldcate = $_category->getOneCategory($cid); if ($_noset) { array_unshift($_infolist, '不限'); } $_ljstr = config('sys.url_model') == '1' ? "&" : "?"; $_dqfield = $_garr[$ff]; foreach ($_infolist as $autoindex => $val): if ($_fielddata['ftype'] == 'select') { $_garr[$ff] = $val; $field['name'] = $val; $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); if (isset($_GET[$ff]) && $_GET[$ff] != '') { $field['active'] = $_GET[$ff] == $val ? $_active : ''; }else{ $field['active'] = $val == '不限' ? $_active : ''; } }else{ $_callist = explode(',',$_dqfield); $field['name'] = $val; if (isset($_GET[$ff]) && $_GET[$ff] != '') { $field['active'] = in_array($val, $_callist) ? $_active : ''; }else{ $field['active'] = $val == '不限' ? $_active : ''; } if (in_array($val, $_callist)) { $key = array_search($val, $_callist); unset($_callist[$key]); $_garr[$ff] = implode(',', $_callist); $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); }else{ $_callist[] = $val; $_garr[$ff] = implode(',', $_callist); $field['url'] = $_category->getCategoryUrl($fieldcate).$_ljstr.build_query($_garr); } } ?> <a href="<?php echo $field['url']; ?>" class="<?php echo $field['active']; ?>"><?php echo $field['name']; ?></a> <?php endforeach; } ?> </div> </div> <div class="pro_list"> <ul> <?php $_cid = $cid; $_limit = "10"; $_keyword = -1; $_flag = ''; $_areaid = '';//指定地区ID $_top = ''; $_image = '-1'; $_pagesize = 8; $_pagecss = 1; $_tag = -1; $_sql = "131 and 132 and 133"; 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 = array('create_time' => array('LT', time()), 'cid'=> array('IN', $_ids)); }else { $_where = array('create_time' => array('LT', time())); } if ($_keyword != -1) { $_where['title'] = array('LIKE','%'.$_keyword.'%'); } if ($_flag) { $_where['istop'] = $_flag; } 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()]; //地区独立内容 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) { //拼接SQL语句 $_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'); if ($_GET[$_fieldname] != '不限' && $_GET[$_fieldname] != '') { $_filelist = explode(',', $_GET[$_fieldname]); $_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] = $_GET[$_fieldname]; }else{ if ($value1 == 'or') { $_sqlstr = $_sqlstr."or "; } if ($value1 == 'and' ) { $_sqlstr = $_sqlstr."and "; } } } } $_wheresql = $_sqlstr; } //获取模型别名 $_tabname = ""; if ($_cid != -1 && !empty($_cid)) { $_mid = db('category')->where(['id'=>$_cid])->value('mid'); $_tabname = db('diymodel')->where(['id'=>$_mid])->value('tabname'); } $page = "";//分页 if ($_pagesize > 0) { $_pagearr = []; switch (config('sys.url_model')) { case '1'://动态 $param['s'] = request()->pathinfo(); $param = array_merge($param, request()->param()); $_pagearr = ['query' => $param]; break; case '3'://伪静态 $_pagearr = ['query' => []]; break; } $_pagearr['var_link_rows'] = 7; //存在cid情况 if ($_tabname) { $_infolist = db('content') ->alias('con') ->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid') ->where($_where) ->where($_wheresql) ->order("sort asc") ->paginate($_pagesize, false, $_pagearr); }else{ $_infolist = db('content') ->where($_where) ->order("sort asc") ->paginate($_pagesize, false, $_pagearr); } $page = $_infolist->render(); $page = preg_replace("#/([\d]*)page/#", '/page/', $page); //搜索组合参数 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 { //存在cid情况 if ($_tabname) { $_infolist = db('content') ->alias('con') ->join(config('database.prefix').'diy_'.$_tabname.' diy','con.vid = diy.conid') ->where($_where) ->where($_wheresql) ->order("sort asc") ->limit($_limit) ->select(); }else{ $_infolist = db('content') ->where($_where) ->order("sort asc") ->limit($_limit) ->select(); } } //组合筛选修改分页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, config('sys.sys_area')); ?> <li> <a href="<?php echo $list['url']; ?>"> <img src="<?php echo $list['pic']; ?>" alt="<?php echo $list['title']; ?>" width="180" height="190" img-Auto="true"> <span> <?php echo $list['title']; ?><br> 品牌:<?php echo $list['brand']; ?><br> 类型:<?php echo $list['leixing']; ?><br> 颜色:<?php echo $list['color']; ?><br> </span> </a> </li> <?php endforeach;?> </ul> </div> <div class="pages"> <?php echo $page; ?> </div> <div class="flink"> <div class="flink_tit mt30"> <p></p> <span>地区产品</span> </div> <div class="flink_list"> <ul> <?php $_limit = "10"; $_top = intval('0'); $_con = intval('0'); $_url = intval('0'); $_topzm = -1; $_pid = 0; $_conurl = intval(''); $_type = '1'; $_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 == -1 || $_type == "group" || $_type == "1" ) { if ($_area && !$_conurl) { $_where['pid'] = $_area['id']; }else{ $_where['pid'] = $_pid ? $_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); } } } ?> <li><a href="<?php echo $area['url']; ?>"><?php echo $area['title']; ?></a></li> <?php endforeach;?> </ul> </div> </div> </div> </div> </div> <div class="footer"> <div class="center clearfix"> <div class="fl"> <?php $_block = db('block')->where("title='".'logo2'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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 class="foot_contact"> <?php echo "<p>TEL:0551-68625420 MOB:18226657715 EMAIL:1251216886@qq.com</p> <p>版权所有 © 2019 安徽快马科技有限公司(ok3k.com) 保留所有权利 Powered by OK3K.COM v2.0.4</p> "; ?> </div> </div> <div class="fr"> <?php $_block = db('block')->where("title='".'ewm'."'")->find(); $_block = update_str_dq($_block, config('sys.sys_area')); $_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);//清除html再截取 }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> (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> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?a665d4bbcbfd7a00bc706cd9a366e82a"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script type="text/javascript" src="__PUBLIC__/js/mk.js"></script> <script type="text/javascript"> $('img[img-Auto]').imgAuto(); </script> </body> </html>
dir D:\wwwroot\ok3kxbgdhsj\wwwroot\caches\temp