<?php
/**
 * 站点首页模板
 */
if (!defined('EMLOG_ROOT')) {exit('error!');}
?>
<div class="joe_container">
	<div class="joe_main">
		<div class="joe_index__banner">
			<?php if($wzpeizhi['config_zdyhuandengp'] != NULL): ?>
			<div class="swiper-container swiper-container-initialized swiper-container-horizontal">
				<div class="swiper-wrapper" style="transform: translate3d(-1990px, 0px, 0px); transition-duration: 0ms;">
				<?php 
				echo preg_replace("/(.*?) \|\| (.*?) \|\| (.*?)/iU", '
				<div class="swiper-slide swiper-slide-duplicate-active swiper-slide-prev swiper-slide-duplicate-next"data-swiper-slide-index="0"style="width: 995px;">
					<a class="item"href="$2">
						<img width="100%"height="100%"class="thumbnail lazyloaded"src="$3"alt="$1">
						<div class="title">$1              
						<div class="swiper-pagination swiper-pagination-bullets">
							<span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span>
						</div>
					</div>
					</a>
				</div>
				', $wzpeizhi['config_zdyhuandengp']);
				?>
			  </div>
			  <div class="swiper-button-next" tabindex="0" role="button" aria-label="Next slide"></div>
			  <div class="swiper-button-prev" tabindex="0" role="button" aria-label="Previous slide"></div>
			  <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
			</div>
			<?php endif; ?>
			<?php if(sywap()){?>
			<?php }else{?>
			<?php 
			$db=MySql::getInstance();$value = $db->fetch_array($db->query("select * from ".DB_PREFIX."blog where  hide='n' AND type='blog' AND sortop='y' order by date DESC limit 0,3"));if($value == NULL): ?>
			<?php else: ?>
			<div class="joe_index__banner-recommend">
			<?php $db=MySql::getInstance();$sql=$db->query("select * from ".DB_PREFIX."blog where  hide='n' AND type='blog' AND sortop='y' order by date DESC limit 0,3");while($value = $db->fetch_array($sql)){?>
			<?php 
			$value['content'] = qinyin_sx($value['content']);
			if(!empty($value['cover'])) {
				$imgurl = $value['cover'];
			} elseif(img_ns($value['content'])) {
			if(strpos(img_ns($value['content']),$wzpeizhi['config_uy']) !== false){ 
				 $imgurl = img_ns($value['content']).$wzpeizhi['config_suocaijian'];
			}else{
				 $imgurl = img_ns($value['content']);
			}
			} else {
				$imgurl = $wzpeizhi['config_suolt1'];
			}
			?>
				<figure class="item">
				  <a class="thumbnail" href="<?php echo Url::log($value['gid']);?>" title="<?php echo $value['title'];?>">
					<img width="100%" height="100%" class="ls-is-cached" src="<?php echo $imgurl;?>" alt="<?php echo $value['title'];?>"></a>
				  <figcaption class="information">
					<div class="text"><?php echo $value['title'];?></div></figcaption>
				</figure>
			<?php }?>
			</div>
			<?php endif; ?>
			<?php }?>
		</div>
		<?php include View::getView('inc/pay_new');?>
		<?php doAction('qinyin_huandengpian'); ?>
		<?php shouye_sl($wzpeizhi['config_rsdjs']);?>
		<div class="ajax-option ajax-replace">
			<div class="flex ac">
				<div class="option-dropdown splitters-this-r dropdown flex0">排序</div>
				<ul class="list-inline scroll-x mini-scrollbar option-items">
					<a class="ajax-next" href="javascript:;" onClick="index_type(1)">更新</a>
					<a class="ajax-next" href="javascript:;" onClick="index_type(2)">热门</a>
					<a class="ajax-next" href="javascript:;" onClick="index_type(3)">评论</a>
					<a class="ajax-next" href="javascript:;" onClick="index_type(4)">点赞</a>
				</ul>
			</div>
		</div>
	<?php if($wzpeizhi['newziduan3']==1){ //判断列表展示模式?>
		<div class="qinyin_live__list" id="qinyin_live__list" data-wow="<?php echo $wzpeizhi['config_texiaolb'];?>">
		<?php doAction('index_loglist_top');if (!empty($logs)):foreach($index_type as $value):$leixing = $value['content'];$value['content'] = qinyin_sx($value['content']);?>
		<?php if(!empty($value['cover'])) {
			$imgurl = $value['cover'];
		} elseif(img_ns($value['content'])) {	
			if(strpos(img_ns($value['content']),$wzpeizhi['config_uy']) !== false){ 
				 $imgurl = img_ns($value['content']).$wzpeizhi['config_suocaijian'];
			}else{
				 $imgurl = img_ns($value['content']);
			}
		} else {
			$imgurl = $wzpeizhi['config_suolt1'];
		}
		?>
		<a class="qinyin_live__list-item animated bounceIn" href="<?php echo $value['log_url']; ?>">
		<div class="thumb">
		<?php kapian_leixing($value['content']);?>
			<img width="100%" height="100%" class="screenshot" data-original="<?php echo $imgurl;?>" alt="<?php echo $value['log_title']; ?>">
		</div>
		  <div class="description">
			<p class="introduction"><?php echo $value['log_title']; ?></p>
			<div class="biaoqian">
				<?php kapblog_sort($value['logid']);?>
				<?php pay_biaoqian($leixing);?>
				<?php vip_biaoqian($leixing);?>
				<?php kapian_tag($value['logid']); ?>
			</div>
			<div class="meta">
				<img src="<?php blog_author4($value['author']); ?>">
				<?php echo formatTime($value['date']);?>
				<span class="name">
					<i class="yincang fa fa-commenting-o"> <?php echo $value['comnum']; ?></i>
					<i class="yincang fa fa-eye"> <?php echo $value['views']; ?></i> 
					<i class="fa fa-thumbs-o-up"> <?php echo getnum($value['logid']);?></i> 
				</span>
			  </div>
		  </div>
		</a>
		 <?php endforeach;else:$keyword = isset($keyword) ? $keyword : '';if ($keyword != '' ) {?>
		<?php }elseif($sort != '' ){ ?>
			<h2 style="text-align:center;">该分类下还没有内容</h2>
				<div class="goback"><a href="javascript:history.go(-1);" class="goback_link">返回</a></div>
			<?php } ?>
			<?php endif; ?>
		</div>
	<?php }elseif($wzpeizhi['newziduan3']==2){ //判断列表展示模式?>
		<!-- 博客模式 -->
		<div class="joe_index__list " data-wow="<?php echo $wzpeizhi['config_texiaolb'];?>">
		<?php doAction('index_loglist_top');if (!empty($logs)):foreach($index_type as $value):$leixing = $value['content'];$value['content'] = qinyin_sx($value['content']);?>
		<?php if(!empty($value['cover'])) {
			$imgurl = $value['cover'];
		} elseif(img_ns($value['content'])) {	
		if(strpos(img_ns($value['content']),$wzpeizhi['config_uy']) !== false){ 
			 $imgurl = img_ns($value['content']).$wzpeizhi['config_suocaijian'];
		}else{
			 $imgurl = img_ns($value['content']);
		}
		} else {
			$imgurl = $wzpeizhi['config_suolt1'];
		}
		?>
			<div class="joe_index">
				<ul class="joe_list">
				<?php if(img_count($value['content']) >=1 && img_count($value['content']) < 3){?>
					<li class="joe_list__item wow default">
						<div class="line"></div>
						<a href="<?php echo $value['log_url']; ?>" class="thumbnail" title="<?php echo $value['log_title']; ?>">
							<img width="100%" height="100%" data-original="<?php echo $imgurl;?>" src="<?php echo $imgurl;?>" alt="<?php echo $value['log_title']; ?>">
							<time datetime="<?php echo gmdate('Y-n-j', $value['date']); ?>"><?php echo gmdate('Y-n-j', $value['date']); ?></time>
							<?php blog_leixing($value['content'] , $value['log_description']);?>
						</a>
						<div class="information">
							<a href="<?php echo $value['log_url']; ?>" class="title" title="<?php echo $value['log_title']; ?>">
								<?php topflg($value['top'], $value['sortop'], isset($sortid) ? $sortid : ''); ?><?php echo $value['log_title']; ?>
							</a>
							<a class="abstract">
								<?php echo geshihua($value['log_description']); ?>
							</a>
							<div class="meta1">
								<ul class="items"><?php blog_tag1($value['logid']); ?></ul>
							</div>
							<div class="meta">
								<ul class="items">
									<li><?php echo formatTime($value['date']);?></li>
									<li><?php echo $value['views']; ?> 阅读</li>
									<li><?php echo $value['comnum']; ?> 评论</li>
								</ul>
								<div class="last" style="display: flex">
									<svg class="icon" viewBox="0 0 1024 1024" width="15" height="15"><path d="M1003.153333 404.96a52.933333 52.933333 0 0 0-42.38-20.96H896V266.666667a53.393333 53.393333 0 0 0-53.333333-53.333334H461.253333a10.573333 10.573333 0 0 1-7.54-3.126666L344.46 100.953333A52.986667 52.986667 0 0 0 306.746667 85.333333H53.333333a53.393333 53.393333 0 0 0-53.333333 53.333334v704a53.393333 53.393333 0 0 0 53.333333 53.333333h796.893334a53.453333 53.453333 0 0 0 51.453333-39.333333l110.546667-405.333334a52.953333 52.953333 0 0 0-9.073334-46.373333zM53.333333 128h253.413334a10.573333 10.573333 0 0 1 7.54 3.126667l109.253333 109.253333A52.986667 52.986667 0 0 0 461.253333 256H842.666667a10.666667 10.666667 0 0 1 10.666666 10.666667v117.333333H173.773333a53.453333 53.453333 0 0 0-51.453333 39.333333L42.666667 715.366667V138.666667a10.666667 10.666667 0 0 1 10.666666-10.666667z m917.726667 312.14l-110.546667 405.333333a10.666667 10.666667 0 0 1-10.286666 7.86H63.226667a10.666667 10.666667 0 0 1-10.286667-13.473333l110.546667-405.333333A10.666667 10.666667 0 0 1 173.773333 426.666667h787a10.666667 10.666667 0 0 1 10.286667 13.473333z" fill="#5C5C66" p-id="2183"></path></svg>
									<?php blog_sort($value['logid']); ?>
								</div>
							</div>
						</div>
					</li>
					<?php }elseif(img_count($value['content']) >= 3){?>
					<li class="joe_list__item wow multiple">
						<div class="line"></div>
						<div class="information">
							<a href="<?php echo $value['log_url']; ?>" class="title" title="<?php echo $value['log_title']; ?>">
								<span class="badge" style="display: none">置顶</span><?php echo $value['log_title']; ?>
							</a>
							<a class="abstract" href="<?php echo $value['log_url']; ?>" title="文章摘要">
							<?php echo geshihua($value['log_description']); ?>
							</a>
						</div>
						<a href="<?php echo $value['log_url']; ?>" class="thumbnail" title="<?php echo $value['log_title']; ?>">
							<?php 
							preg_match_all("/\!\[.*?\]\((http(s)?:\/\/.*?(jpg|jpeg|gif|png|webp))/i", $value['content'], $img);
							for($i=0;$i<3;$i++){
							?>
							<img width="100%" height="100%" class="ls-is-cached" data-original="<?php echo $img[1][$i];?>" src="<?php echo $img[1][$i];?>" alt="<?php echo $value['log_title']; ?>">
							<?php }?>
						</a>
						<div class="meta">
							<ul class="items">
								<li><?php echo formatTime($value['date']);?></li>
								<li><?php echo $value['views']; ?> 阅读</li>
								<li><?php echo $value['comnum']; ?> 评论</li>
							</ul>
							<div class="last" style="display: flex">
								<svg class="icon" viewBox="0 0 1024 1024" width="15" height="15"><path d="M1003.153333 404.96a52.933333 52.933333 0 0 0-42.38-20.96H896V266.666667a53.393333 53.393333 0 0 0-53.333333-53.333334H461.253333a10.573333 10.573333 0 0 1-7.54-3.126666L344.46 100.953333A52.986667 52.986667 0 0 0 306.746667 85.333333H53.333333a53.393333 53.393333 0 0 0-53.333333 53.333334v704a53.393333 53.393333 0 0 0 53.333333 53.333333h796.893334a53.453333 53.453333 0 0 0 51.453333-39.333333l110.546667-405.333334a52.953333 52.953333 0 0 0-9.073334-46.373333zM53.333333 128h253.413334a10.573333 10.573333 0 0 1 7.54 3.126667l109.253333 109.253333A52.986667 52.986667 0 0 0 461.253333 256H842.666667a10.666667 10.666667 0 0 1 10.666666 10.666667v117.333333H173.773333a53.453333 53.453333 0 0 0-51.453333 39.333333L42.666667 715.366667V138.666667a10.666667 10.666667 0 0 1 10.666666-10.666667z m917.726667 312.14l-110.546667 405.333333a10.666667 10.666667 0 0 1-10.286666 7.86H63.226667a10.666667 10.666667 0 0 1-10.286667-13.473333l110.546667-405.333333A10.666667 10.666667 0 0 1 173.773333 426.666667h787a10.666667 10.666667 0 0 1 10.286667 13.473333z" fill="#5C5C66" p-id="2183"></path></svg>
								<?php blog_sort($value['logid']); ?>
							</div>
						</div>
					</li>
					<?php }elseif(img_count($value['content']) == 0){?>
					<li class="joe_list__item wow default">
						<div class="line"></div>
						<a href="<?php echo $value['log_url']; ?>" class="thumbnail" title="<?php echo $value['log_title']; ?>">
							<img width="100%" height="100%" data-original="<?php echo $imgurl;?>" src="<?php echo $imgurl;?>" alt="<?php echo $value['log_title']; ?>">
							<time datetime="<?php echo gmdate('Y-n-j', $value['date']); ?>"><?php echo gmdate('Y-n-j', $value['date']); ?></time><?php blog_leixing($value['content'] , $value['log_description']);?>
						</a>
						<div class="information">
							<a href="<?php echo $value['log_url']; ?>" class="title" title="<?php echo $value['log_title']; ?>">
								<?php topflg($value['top'], $value['sortop'], isset($sortid) ? $sortid : ''); ?><?php echo $value['log_title']; ?>
							</a>
							<a class="abstract"><?php echo geshihua($value['log_description']); ?></a>
							<div class="meta1">
								<ul class="items"><?php blog_tag1($value['logid']); ?></ul>
							</div>
							<div class="meta">
								<ul class="items">
									<li><?php echo formatTime($value['date']);?></li>
									<li><?php echo $value['views']; ?> 阅读</li>
									<li><?php echo $value['comnum']; ?> 评论</li>
								</ul>
								<div class="last" style="display: flex">
									<svg class="icon" viewBox="0 0 1024 1024" width="15" height="15"><path d="M1003.153333 404.96a52.933333 52.933333 0 0 0-42.38-20.96H896V266.666667a53.393333 53.393333 0 0 0-53.333333-53.333334H461.253333a10.573333 10.573333 0 0 1-7.54-3.126666L344.46 100.953333A52.986667 52.986667 0 0 0 306.746667 85.333333H53.333333a53.393333 53.393333 0 0 0-53.333333 53.333334v704a53.393333 53.393333 0 0 0 53.333333 53.333333h796.893334a53.453333 53.453333 0 0 0 51.453333-39.333333l110.546667-405.333334a52.953333 52.953333 0 0 0-9.073334-46.373333zM53.333333 128h253.413334a10.573333 10.573333 0 0 1 7.54 3.126667l109.253333 109.253333A52.986667 52.986667 0 0 0 461.253333 256H842.666667a10.666667 10.666667 0 0 1 10.666666 10.666667v117.333333H173.773333a53.453333 53.453333 0 0 0-51.453333 39.333333L42.666667 715.366667V138.666667a10.666667 10.666667 0 0 1 10.666666-10.666667z m917.726667 312.14l-110.546667 405.333333a10.666667 10.666667 0 0 1-10.286666 7.86H63.226667a10.666667 10.666667 0 0 1-10.286667-13.473333l110.546667-405.333333A10.666667 10.666667 0 0 1 173.773333 426.666667h787a10.666667 10.666667 0 0 1 10.286667 13.473333z" fill="#5C5C66" p-id="2183"></path></svg>
									<?php blog_sort($value['logid']); ?>
								</div>
							</div>
						</div>
					</li>
					<?php }?>
				</ul>
			</div>
			<?php endforeach;else:$keyword = isset($keyword) ? $keyword : '';if ($keyword != '' ) {?>
			<?php }elseif($sort != '' ){ ?>
			<h2 style="text-align:center;">该分类下还没有内容</h2>
			<div class="goback">
				<a href="javascript:history.go(-1);" class="goback_link">返回</a>
			</div>
			<?php } ?>
			<?php endif; ?>
		</div>
		<?php } //判断列表展示模式结束?>
		<ul class="joe_pagination">
		<?php echo sheli_fy($lognum,$index_lognum,$page,$pageurl);?>
		</ul>
		<?php 
		echo preg_replace("/(.*?) \|\| (.*?)/iU", '<div class="joe_index__ad"><a class="joe_index__ad-link"href="$1"><img class="image lazyloaded"src="$2"><span class="icon">广告</span></a></div>', $wzpeizhi['config_ggcms']);
		?>
	</div>	
<?php include View::getView('side'); ?>
<?php doAction('qinyin_cms'); ?>
<?php shouye_cms($wzpeizhi['config_cms_id']);?>
<?php include View::getView('footer');?>