<?php
	@ini_set('display_errors','0');
	error_reporting (E_ALL & ~E_NOTICE);
	define('DIRCMS_ROOT', str_replace("\\", '/',substr(dirname(__FILE__),0,-7)));
	include DIRCMS_ROOT.'include/common.inc.php';
	$colname=intval($colname);
	$dir_membertypeid=$membertypeid=intval($colname);
	if($membertypeid)
	{
		$r=cache_read('member_type'.$membertypeid.'.cache.php',DIRCMS_ROOT.'data/cache/');
		if(!$r)
		{
			$tamplate='yp';
			$membertypeid=0;
		}
		$dir_membertypename=$typename=$r['type'];
	}
	$template='yp';
	$title=$typeid?$dir_membertypename:'商家黄页';
	$r=cache_read('member_type.cache.php',DIRCMS_ROOT.'data/cache/');
	$dir_postion=$position=$membertypeid?'<a href="'.$DIRCMS['site_url'].'" title="网站首页">首页</a> > <a href="'.$DIRCMS['site_url'].'company">商家黄页</a> > <a href="'.$DIRCMS['site_url'].'company/index.php?colname='.$membertypeid.'">'.$typename.'</a>':'<a href="'.$DIRCMS['site_url'].'" title="网站首页">首页</a> > 商家黄页';
	$head['title'] = $title.'-'.$DIRCMS['site_name'];
	$head['keywords'] = $title.','.$DIRCMS['site_name'];
	$head['description'] = $title;
	$page=intval($page)?intval($page):1;

	$menu=cache_read('menu'.intval($id).'.cache.php',DIRCMS_ROOT.'company/cache/menu/');
	$menu=$menu?$menu:array (
	  1 => array('name'=>'网站首页','url'=>$DIRCMS['site_url'].'company/company_'.$id.'.html'),
	  2 => array('name'=>'公司简介','url'=>$DIRCMS['site_url'].'company/about_'.$id.'.html'),
	  3 => array('name'=>'新闻动态','url'=>$DIRCMS['site_url'].'company/news_'.$id.'_1.html'),
	  4 => array('name'=>'优惠信息','url'=>$DIRCMS['site_url'].'company/coupon_'.$id.'_1.html'),
	  5 => array('name'=>'产品展示','url'=>$DIRCMS['site_url'].'company/product_'.$id.'_1_1.html'),
	  6 => array('name'=>'地图位置','url'=>$DIRCMS['site_url'].'company/map_'.$id.'.html'),
	  7 => array('name'=>'联系方式','url'=>$DIRCMS['site_url'].'company/contact_'.$id.'.html'),
	  8 => array('name'=>'在线留言','url'=>$DIRCMS['site_url'].'company/guestbook_'.$id.'.html'),
	);
	$dir_url=$DIRCMS['site_url'].'company/index.php';
	include template($template);
?>