| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729 | <?phpnamespace My;/** * 布局模块驱动 * @author   Devil * @blog     http://gong.gg/ * @version  0.0.1 * @datetime 2017-01-10T21:51:08+0800 */class LayoutModule{	// 数据列表	private $data;	// 参数规则	private $rules;	// 拼接的html	private $html;	// 打开方式	private $blank;	// 图片host	private $image_host;	/**	 * [__construct 私有构造方法]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T17:59:50+0800	 */	private function __construct()	{		// 图片host		$this->image_host = C('IMAGE_HOST');	}	/**	 * [SetInstance 类静态方法入口]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:01:09+0800	 */	public static function SetInstance()	{		static $object = null;		if(!$object) $object = new self();		return $object;	}	/**	 * [GetLayoutMouleWhere 获取布局模块条件]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-14T22:08:22+0800	 * @param    [array]     $data 	[参数条件]	 * @return   [array]            [条件列表]	 */	public function GetLayoutMouleWhere($data)	{		// 条件初始化		$where = array();		// 是否启用		$where['is_enable'] = 1;		// 是否强制带图片		if(isset($data['title_style']) && (in_array($data['title_style'], array(6, 8, 9, 10, 11, 12, 13, 14, 15)) || ($data['title_style'] >= 200)))		{			$where['image_count'] = array('egt', 1);		}		// 是否指定文章id		if(empty($data['article_id']))		{			// 文章分类			if(!empty($data['article_class_id']) && substr($data['article_class_id'], 0, 1) != 0)			{				$where['article_class_id'] = array('in', $data['article_class_id']);			}			// 发布时间			if(!empty($data['add_time_interval']))			{				$where['add_time_interval'] = array('gt', time()-(L('common_view_time_list')[$data['add_time_interval']]['value'])*60);			}			// 更新时间			if(!empty($data['upd_time_interval']))			{				$where['upd_time_interval'] = array('gt', time()-(L('common_view_time_list')[$data['upd_time_interval']]['value'])*60);			}			// 关键字			if(!empty($data['keyword']))			{				$keyword = str_replace(array(';', '—'), array(';', '-'), $data['keyword']);				if(strpos($keyword, ';') === false)				{					$where['title'][] = $this->TitleWhereJoin($keyword);				} else {					$keyword_all = explode(';', $keyword);					foreach($keyword_all as $temp_keyword)					{						$where['title'][] = $this->TitleWhereJoin($temp_keyword);					}				}			}		} else {			$where['id'] = array('in', str_replace(',', ',', $data['article_id']));		}		// 排序方式		$sort = empty($data['sort_type']) ? '' : str_replace('-', ' ', L('common_view_sort_list')[$data['sort_type']]['value']);		// 读取条数		$n = max(1, isset($data['show_number']) ? intval($data['show_number']) : 10);		// 返回数据		return array('where' => $where, 'sort' => $sort, 'n' => $n);	}	/**	 * [TitleWhereJoin 关键字检索条件拼接]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-15T14:07:48+0800	 * @param    [string]      $keyword [需要解析的关键字]	 * @return   [array] 				[拼接完成的关键字]	 */	private function TitleWhereJoin($keyword)	{		// 标记判断, 并且-, 或|		$tag = (strpos($keyword, '-') !== false) ? '-' : ((strpos($keyword, '|') !== false) ? '|' : '');		// 数据处理		if(empty($tag))		{			return array('eq', $keyword);		} else {			$join = ($tag == '-') ? 'AND' : (($tag == '|') ? 'OR' : '');			$temp_all = explode($tag, $keyword);			foreach($temp_all as $k=>$temp_keyword)			{				$temp_all[$k] = '%'.$temp_keyword.'%';			}			return array('like', $temp_all, $join);		}	}	/**	 * [DataInit 数初始化]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:08:20+0800	 * @param    [array]     $data 	[数据列表]	 * @param    [array]     $rules [参数规则]	 */	private function DataInit($data, $rules)	{		// 初始化		$this->data = $data;		$this->rules = $rules;		$this->html = '';		// 规则处理		$this->rules['right_title'] = empty($this->rules['right_title']) ? array() : explode(';', str_replace(';', ';', $this->rules['right_title']));		// 打开方式		$this->blank = (isset($this->rules['link_open_way']) && L('common_view_link_open_way_list')[$this->rules['link_open_way']]['value'] == 'blank') ? 'target="_blank"' : '';	}	/**	 * [GetRules 获取模块规则数据]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-05-12T18:04:43+0800	 * @return   [array] [模块规则]	 */	public function GetRules()	{		$this->rules['blank'] = $this->blank;		return $this->rules;	}	/**	 * [GetTitleContent 获取标题内容]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-22T18:12:12+0800	 * @param   [string] $type [类型(slide幻灯片, list列表)]	 */	private function GetTitleContent($type = '')	{		if(!empty($this->rules['name']) || !empty($this->rules['right_title']))		{			$this->html .= '<div class="am-list-news-hd am-cf ';			switch($type)			{				// 幻灯片添加底部class边距				case 'slide':					$this->html .= 'm-b-10';					break;			}			$this->html .= '">';			if(!empty($this->rules['name']))			{				$this->html .= '<h2>'.$this->rules['name'].'</h2>';			}			if(!empty($this->rules['right_title']))			{				if(isset($this->rules['right_title'][0]))				{					if(isset($this->rules['right_title'][1]))					{						$this->html .= '<a href="'.$this->rules['right_title'][1].'" target="_blank"><span class="am-list-news-more am-fr">'.$this->rules['right_title'][0].'</span></a>';					} else {						$this->html .= '<span class="am-list-news-more am-fr">'.$this->rules['right_title'][0].'</span>';					}				}			}			$this->html .= '</div>';		}	}	/**	 * [ViewTitle 纯标题]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewTitle($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'" class="am-text-truncate" '.$title_color.'>'.$v['title'].'</a></li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewTitleAccess 标题+访问量]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewTitleAccess($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				$this->html .= '<li class="am-g am-list-item-dated">';				$this->html .= '<a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'" class="am-list-item-hd" '.$title_color.'>'.$v['title'].'</a>';				$this->html .= '<span class="am-list-date">'.$v['access_count_text'].'</span>';				$this->html .= '</li>';			}		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewTitleCreateTime 标题+发布时间]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewTitleCreateTime($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				$this->html .= '<li class="am-g am-list-item-dated">';				$this->html .= '<a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'" class="am-list-item-hd" '.$title_color.'>'.$v['title'].'</a>';				$this->html .= '<span class="am-list-date">'.$v['add_time_text'].'</span>';				$this->html .= '</li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewTitleAbstract 标题+摘要]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewTitleAbstract($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				$this->html .= '<li class="am-g am-list-item-desced">';				$this->html .= '<a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'" class="am-text-truncate" '.$title_color.'>'.$v['title'].'</a>';				// 摘要字数				$this->html .= '<div class="am-list-item-text">'.$v['abstract'].'</div>';				$this->html .= '</li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewTitleAbstractOne 标题+第一条摘要]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewTitleAbstractOne($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				$this->html .= '<li class="am-g am-list-item-desced">';				$this->html .= '<a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'" class="am-text-truncate" '.$title_color.'>'.$v['title'].'</a>';				// 第一条带摘要				if($k == 0)				{					$this->html .= '<div class="am-list-item-text">'.$v['abstract'].'</div>';				}				$this->html .= '</li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesContent 图文]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesContent($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				if(empty($v['image'][0]))				{					$this->html .= '<li class="am-g am-list-item-desced">';					$this->html .= '<div class="am-list-main">';				} else {					$this->html .= '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">';					$this->html .= '<div class="am-u-sm-4 am-list-thumb"><a href="'.$v['url'].'" '.$this->blank.'><img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'"/></a></div>';					$this->html .= '<div class="am-u-sm-8 am-list-main">';				}				$this->html .= '<h3 class="am-list-item-hd"><a href="'.$v['url'].'" '.$this->blank.'>'.$v['title'].'</a></h3><div class="am-list-item-text">'.$v['abstract'].'</div></div>';				$this->html .= '</li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewOneIntroductionTwoTitle 一简介+两列标题]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewOneIntroductionTwoTitle($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul class="am-list">';			foreach($data as $k=>$v)			{				// 标题颜色				$title_color = (!empty($v['title_color'])) ? 'style="color:'.$v['title_color'].';"' : '';				// 内容				$this->html .= '<li class="am-g am-list-item-desced">';				$this->html .= '<a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'" class="am-text-truncate" '.$title_color.'>'.$v['title'].'</a>';				// 第一条带摘要				if($k%3 == 0)				{					$this->html .= '<div class="am-list-item-text">'.$v['abstract'].'</div>';				}				$this->html .= '</li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideDefault 幻灯片+幻灯片默认]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideDefault($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-default" data-am-slider=\'{}\' ><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideDefaultTitle 幻灯片+幻灯片默认+标题]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideDefaultTitle($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-default" data-am-slider=\'{}\' ><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc">'.$v['title'].'</div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideDefaultMoreImage 幻灯片+幻灯片默认+多图]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideDefaultMoreImage($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-default" data-am-slider=\'{"animation":"slide","animationLoop":false,"itemWidth":200,"itemMargin":5}\' ><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideDefaultThumbnailImage 幻灯片+缩略图]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideDefaultThumbnailImage($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-default" data-am-slider=\'{"animation":"slide","controlNav":"thumbnails"}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li data-thumb="'.$this->image_host.$v['image'][0].'"><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideRoundPoint 幻灯片+圆形控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideRoundPoint($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlidePartyPoint 幻灯片+方形控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlidePartyPoint($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-a2" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideRoundPointBackBlack 幻灯片+底部黑边圆形控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideRoundPointBackBlack($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-a3" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideRoundPointBackWhite 幻灯片+底部白边圆形控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideRoundPointBackWhite($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-a4" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideLongPoint 幻灯片+长条等分控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideLongPoint($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-a5" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideSquareArrow 幻灯片+方形居中左右箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideSquareArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-b1" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideRoundArrow 幻灯片+圆形居中左右箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideRoundArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-b2" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideOutsideArrow 幻灯片+图片外左右箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideOutsideArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-b3" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideOutsideRoundArrow 幻灯片+图片外左右圆形箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideOutsideRoundArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-b4" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideTitleLongPoint 幻灯片+标题+长条控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideTitleLongPoint($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-c1" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc">'.$v['title'].'</div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideTitlePartyPoint 幻灯片+标题+方形控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideTitlePartyPoint($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-c2" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc">'.$v['title'].'</div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideTitleArrow 幻灯片+标题+居中左右箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideTitleArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-c3" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'"><img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" /></a>';				$this->html .= '<div class="am-slider-desc"><div class="am-slider-counter"><span class="am-active">'.($k+1).'</span>/'.$count.'</div>'.$v['title'].'</div>';				$this->html .= '</li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideTitleBottomArrow 幻灯片+标题+居底左右箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideTitleBottomArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-c4" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc">'.$v['title'].'</div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideTitleBottomRoundArrow 幻灯片+标题+底部圆形左右箭头]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideTitleBottomRoundArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$more = L('common_layout_slider_more_text');			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-d1" data-am-slider=\'{"controlNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc"><h2 class="am-slider-title" style="color:#fff;">'.$v['title'].'</h2><a href="'.$v['url'].'" '.$this->blank.' class="am-slider-more">'.$more.'</a></div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideFloatTitleBottomRoundArrow 幻灯片+标题+底部圆形控制点]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideFloatTitleBottomRoundArrow($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$more = L('common_layout_slider_more_text');			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-d2" data-am-slider=\'{"directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc"><div class="am-slider-content"><h2 class="am-slider-title" style="color:#fff;">'.$v['title'].'</h2><a href="'.$v['url'].'" '.$this->blank.' class="am-slider-more">'.$more.'</a></div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesSlideTitleThumbnailImageNav 幻灯片+标题+缩略图导航]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesSlideTitleThumbnailImageNav($data, $rules)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news am-list-news-default">';		// 标题		$this->GetTitleContent('slide');		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<div data-am-widget="slider" class="am-slider am-slider-d3" data-am-slider=\'{"controlNav":"thumbnails","directionNav":false}\'><ul class="am-slides">';			$count = count($data);			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li data-thumb="'.$this->image_host.$v['image'][0].'"><a href="'.$v['url'].'" '.$this->blank.' title="'.$v['title'].'">';				$this->html .= '<img src="'.$this->image_host.$v['image'][0].'" alt="'.$v['title'].'" />';				$this->html .= '<div class="am-slider-desc"><div class="am-slider-content"><h2 class="am-slider-title" style="color:#fff;">'.$v['title'].'</h2></div>';				$this->html .= '</a></li>';			}			$this->html .= '</ul></div>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}	/**	 * [ViewImagesList112 文章图片列表-112]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList112($data, $rules)	{		return $this->ViewImagesList($data, $rules, 1, 1, 2);	}	/**	 * [ViewImagesList122 文章图片列表-122]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList122($data, $rules)	{		return $this->ViewImagesList($data, $rules, 1, 2, 2);	}	/**	 * [ViewImagesList123 文章图片列表-123]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList123($data, $rules)	{		return $this->ViewImagesList($data, $rules, 1, 2, 3);	}	/**	 * [ViewImagesList222 文章图片列表-222]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList222($data, $rules)	{		return $this->ViewImagesList($data, $rules, 2, 2, 2);	}	/**	 * [ViewImagesList223 文章图片列表-223]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList223($data, $rules)	{		return $this->ViewImagesList($data, $rules, 2, 2, 3);	}	/**	 * [ViewImagesList234 文章图片列表-234]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList234($data, $rules)	{		return $this->ViewImagesList($data, $rules, 2, 3, 4);	}	/**	 * [ViewImagesList236 文章图片列表-236]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	public function ViewImagesList236($data, $rules)	{		return $this->ViewImagesList($data, $rules, 2, 3, 6);	}	/**	 * [ViewImagesList 文章图片列表]	 * @author   Devil	 * @blog     http://gong.gg/	 * @version  0.0.1	 * @datetime 2017-02-20T18:06:08+0800	 * @param    [array]    $data 	[数据列表]	 * @param    [array]    $rules 	[参数规则]	 */	private function ViewImagesList($data, $rules, $sm, $md, $lg)	{		// 数据初始化		$this->DataInit($data, $rules);		// 开始处理数据		$this->html = '<div class="am-list-news layout-images-list">';		// 标题		$this->GetTitleContent();		// 数据列表		$this->html .= '<div class="am-list-news-bd">';		// 自定义内容为空, 并且数据列表不为空		if(empty($this->rules['summary']) && !empty($data))		{			$this->html .= '<ul data-am-widget="gallery" class="am-gallery am-avg-sm-'.$sm.' am-avg-md-'.$md.' am-avg-lg-'.$lg.' am-gallery-overlay layout-gallery-overlay-'.$sm.$md.$lg.'" data-am-gallery="{}">';			foreach($data as $k=>$v)			{				// 内容				$this->html .= '<li><div class="am-gallery-item o-h">';				$this->html .= '<a href="'.$v['url'].'" '.$this->blank.'><img src="'.$this->image_host.$v['image'][0].'"  alt="'.$v['title'].'"/><h3 class="am-gallery-title">'.$v['title'].'</h3></a>';				$this->html .= '</div></li>';			}			$this->html .= '</ul>';		} else {			// 自定义内容			$this->html .= $this->rules['summary'];		}		// 内容收尾处理		$this->html .= '</div></div>';		// 数据返回		return $this->html;	}}?>
 |