<?php 
/*
　* @$Id
　* @
　* @Ver: 2.0
　* @Create: 2009-11-18 8:10
　* @Modify: 
　* @Author: CPWEB http://www.cpweb.net.cn
　* @Copyright (C) 2008 www.cpweb.net.cn. All Rights Reserved.
　* @License CPWEB is free software and use is subject to license terms
　*/
class SitemapAction extends GlobalAction 
{
	function _initialize(){
		parent::_initialize();
		$this->cpweb_model='module';
	}
	public function index()
	{
		$Channel=D('ChannelView');
		$Category=D('CategoryView');
		$list=$Channel->findall();
		foreach ($list AS $key => $value){
			if($value['folder']){
				$map['Channel.id']=$value['id'];
				$list[$key]['category']=$Category->where($map)->findall();
			}
		}
		$this->assign('list',$list);
		$this->cpweb_display('Sitemap:index');
	}
}
?>