<?php
defined('CML_PATH') || exit();
class IndexController extends CmlController {
		//首页
	public function index(){
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
		//分类文章
	  foreach ($classdata as $aclassid){
		//头条
		$headdataall[$aclassid['id']]=$IndexModel->indexarticle($aclassid['id'],0,1,2);
		//推荐
		$rcedataall[$aclassid['id']]=$IndexModel->indexarticle($aclassid['id'],0,$pagesize,1);
		//最新
		$articledataall[$aclassid['id']]=$IndexModel->indexarticle($aclassid['id'],0,$pagesize,0);
	  }
		CmlView::assign('headall',$headdataall);  
		CmlView::assign('rceall',$rcedataall);
		CmlView::assign('articleall',$articledataall);
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display();
	}		
	
	//文章分类
	public function indexblog(){
		
		//echo '欢迎使用';
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);

		$countdata=$IndexModel->countarticle('');
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/index',array('p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledatai=$IndexModel->indexarticle(-1,$sqlfirst,$pagesize,-1);
		CmlView::assign('article',$articledatai);
	  CmlView::assign('page',$pageer);

		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display();
	}		
	//文章列表
	public function pagelist(){
		
		//echo '欢迎使用';
	  $IndexModel = new IndexModel();
	  //输出分类
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
	  		
		if(getGp('id')){$classid=getGp('id');}else $classid='';
		$countdata=$IndexModel->countarticle($classid);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/pagelist',array('id'=>$classid,'p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->indexarticle($classid,$sqlfirst,$pagesize,-1);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
		//输出标题
		if($classid==''){
	  $listtitle='分类不存在';
	  }else{
	  foreach ($classdata as $aclassid){
	  	if($classid==$aclassid['id']){
	  		$listtitle=$aclassid['classname'];
	  		$listseon=$aclassid['classseo'];
	    }
	  }
	  }
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('list');
	}
		
	//标签、归档、搜索文章列表
	public function word(){
		
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
		
	  if(getGp('tag')!=''){
	  	
	  $key=getGp('tag');
	  
		if(getGp('id')){$classid=getGp('id');}else $classid='';
		$countdata=$IndexModel->countsearch($key,1);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/word',array('tag'=>$key,'p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->searchtags($key,$sqlfirst,$pagesize,1);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
	  //输出标题
	  $listtitle=$key;
	  $listseon='Tags';
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
	  }elseif(getGp('date')!=''){
			  	
	  $key=getGp('date');
	  
		if(getGp('id')){$classid=getGp('id');}else $classid='';
		$countdata=$IndexModel->countsearch($key,2);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/word',array('date'=>$key,'p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->searchtags($key,$sqlfirst,$pagesize,2);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
	  //输出标题
	  $listtitle=$key;
	  $listseon='Date';
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
	  }else{
			  	
	  $key=getGp('key');
	  
		if(getGp('id')){$classid=getGp('id');}else $classid='';
		$countdata=$IndexModel->countsearch($key,0);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/word',array('key'=>$key,'p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->searchtags($key,$sqlfirst,$pagesize,0);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
	  //输出标题
		if($key!=''){
	  $listtitle=$key;
	  $listseon='搜索结果';
		}else{
	  $listtitle='最新文章';
	  $listseon='news';
		}
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
	  }
		
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('list');
	}
		
		
	//头条文章列表
	public function head(){
	  $IndexModel = new IndexModel();
	  //输出分类
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
	  
		$countdata=$IndexModel->countarticle2(2);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/head',array('p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->indexarticle(-1,$sqlfirst,$pagesize,2);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
		//输出标题
		$listtitle='头条';
		$listseon='headlines';
		
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('list');
	}
				
	//推荐文章列表
	public function rec(){
	  $IndexModel = new IndexModel();
	  //输出分类
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
	  
		$countdata=$IndexModel->countarticle2(1);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/head',array('p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->indexarticle(-1,$sqlfirst,$pagesize,1);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
		//输出标题
		$listtitle='推荐';
		$listseon='recommend';
		
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('list');
	}

	public function item(){
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$id=getGp('id');
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
		$articledata=$IndexModel->article($id);
	  CmlView::assign('article',$articledata);
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
		CmlView::display('');
	}
	
	public function onepage(){
		$id=getGp('id');
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
	  
		$pagedata=$IndexModel->indexpage($id);
	  CmlView::assign('pagedata',$pagedata);
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
		
		CmlView::display($pagedata['0']['oname']);
	}	
	public function page(){
		$id=getGp('id');
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
	  
		$pagedata=$IndexModel->indexpage($id);
	  CmlView::assign('pagedata',$pagedata);
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
		
		CmlView::display();
	}
	
	public function placeonfile(){
		//当前时间
		$str = date("Y-m-d");
		//echo substr($str,0,4);
		
		$placeonfile='';
		//取建站日期
		$i=substr(C('SITE_SATRT'),0,4);
		while($i<=substr($str,0,4))
		{
			$placeonfile=$placeonfile.'<a href="'.U('Index/Index/word',array('date'=>$i),true,0).'" target="_blank" class="color'.substr($i,3,1).'">'. $i .'年</a>';
			
			if ($i==substr($str,0,4))
			{
				$placeonfile=$placeonfile.'<br style="clear:both;" />';
				$placeonfile=$placeonfile.'<br style="clear:both;" />';
				$itemp=$i;
				//取开始月份
				$ii=substr(C('SITE_SATRT'),5,2);
				while($ii<=substr($str,5,2))
				{
					if($ii<=9)
					{
						$placeonfile=$placeonfile.'<a href="'.U('Index/Index/word',array('date'=>$itemp.'-0'.$ii),true,0).'" target="_blank" class="color'.substr($ii,0,1).'">'.$itemp.'年0'.$ii.'月</a>';
						}else{
							$placeonfile=$placeonfile.'<a href="'.U('Index/Index/word',array('date'=>$itemp.'-'.$ii),true,0).'" target="_blank" class="color'.substr($ii,0,1).'">'.$itemp.'年'.$ii.'月</a>';
							}
							$ii++;
							}
			}
			$i++;
		}
  $placeonfile=$placeonfile.'<br style="clear:both;" />';
  
  $title='归档';
  CmlView::assign('title',$title);
  CmlView::assign('datas',$placeonfile);
  CmlView::display('tags');
	}	
		
	public function hottags(){
		//读取30个标签
		$IndexModel = new IndexModel();
	  $tagsdata=$IndexModel->indextags(0,30);
		$tempdatas='';
		$i=1;
	  foreach($tagsdata as $tags){
	  	$tempdatas=$tempdatas.'<a href="'.U('Index/Index/word',array('tag'=>$tags['tag']),true,0).'" target="_blank" class="color'.substr($i,0,1).'">'. $tags['tag'] .'</a>';
			$i++;
	  }
		$tempdatas=$tempdatas.'<br style="clear:both;" />';
	  $title='标签';
	  CmlView::assign('title',$title);
	  CmlView::assign('datas',$tempdatas);
	  CmlView::display('tags');
	}			
	public function pages(){
		//读取单页列表
		$IndexModel = new IndexModel();
	  $tagsdata=$IndexModel->pagelist(0,100);
		$tempdatas='';
		$i=1;
	  foreach($tagsdata as $tags){
	  	$tempdatas=$tempdatas.'<a href="'.U('Index/Index/page',array('id'=>$tags['id']),true,0).'" target="_blank" class="color'.substr($i,0,1).'">'. $tags['title'] .'</a>';
			$i++;
	  }
		$tempdatas=$tempdatas.'<br style="clear:both;" />';
	  $title='单页';
	  CmlView::assign('title',$title);
	  CmlView::assign('datas',$tempdatas);
	  CmlView::display('tags');
	}	
	//图片模块
	public function pic(){
		//读取最新图集
	  $IndexModel = new IndexModel();
	  $picdata=$IndexModel->indexpv(0,32);
		CmlView::assign('picdata',$picdata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display();
	}
	public function pics(){
		$id=getGp('id');
	  $IndexModel = new IndexModel();
	  $picdata=$IndexModel->indexpvs($id);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('pic');
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
	}
	
	public function search(){
	  $IndexModel = new IndexModel();
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('');
	}
	
	public function searchk(){
						
		if(isset($_POST['submit']) && CmlSecure::checkToken()==true){
	  $IndexModel = new IndexModel();
	  $classdata=$IndexModel->indexclass();
	  CmlView::assign('class',$classdata);
		
	  $key=getGp('key',2);	  
		if(getGp('id')){$classid=getGp('id');}else $classid='';
		$countdata=$IndexModel->countsearch($key,0);
		$pagesize=C('SITE_PAGESIZE'); //每页显示的页数
		$page = new page($countdata['0'],$pagesize);
		$pageer=$page->getPage(U('Index/Index/word',array('key'=>$key,'p'=>''),true,0));
		if(getGp('p')){
			$pagenum=getGp('p');
			}else $pagenum=1;
		$sqlfirst=($pagenum-1)*$pagesize;
		$articledata=$IndexModel->searchtags($key,$sqlfirst,$pagesize,0);
		CmlView::assign('article',$articledata);
	  CmlView::assign('page',$pageer);
	  //输出标题
		if($key!=''){
	  $listtitle=$key;
	  $listseon='搜索结果';
		}else{
	  $listtitle='最新文章';
	  $listseon='news';
		}
		CmlView::assign('title',$listtitle);
		CmlView::assign('seoname',$listseon);
		
		//最新文章
		$articledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('articlenew',$articledata);
		//推荐文章
		$recarticledata=$IndexModel->indexarticle(-1,0,$pagesize,1);
		CmlView::assign('recarticle',$recarticledata);
		//头条文章
		$headarticledata=$IndexModel->indexarticle(-1,0,$pagesize,2);
		CmlView::assign('headarticle',$headarticledata);
		
		//导航
		$navdata=$IndexModel->indexnav();
		CmlView::assign('navs',$navdata);
		//读取标签
	  $tagsdata=$IndexModel->indextags(0,30);
		CmlView::assign('tags',$tagsdata);
		//读取焦点图
	  $slidedata=$IndexModel->indexslide();
		CmlView::assign('slidedata',$slidedata);
		//读取最新图集
	  $picdata=$IndexModel->indexpv(0,5);
		CmlView::assign('picdata',$picdata);
	  CmlView::display('list');
	  
		}else
		{ 
				$this->error('非法提交','Index/Index');
		}
	}
	
}
