<?php
/**
 * 二手房源
 *
 * @author 阿一 yandy@yanwee.com
 * @package package
 * @version $Id$
 */

require('../common.inc.php');
$page->dir  = 'company';//目录名
$page->addCss('common.css');
$page->addCss('broker.css');
$page->addCss('header.css');
$page->addCss('Home_Home2.css');
$member = new Member($query);
$realname = $_COOKIE['AUTH_MEMBER_REALNAME'] ? $_COOKIE['AUTH_MEMBER_REALNAME'] :$_COOKIE['AUTH_MEMBER_NAME'];
$page->tpl->assign('username',$realname);

if($_COOKIE['AUTH_MEMBER_STRING']){
	$member = new Member($query);
	$user_type = $member->getAuthInfo('user_type');
	$page->tpl->assign('user_type',$user_type);
}

$newMsgCount = 0;
if($_COOKIE['AUTH_MEMBER_NAME']){
	$innernote = new Innernote($query);
	$newMsgCount = $innernote->getCount(' to_del=0 and is_new = 1 and msg_to = \''.$_COOKIE['AUTH_MEMBER_NAME'].'\'');
}
$page->tpl->assign('msgCount',$newMsgCount);
//全站头部广告
$params= array('id'=>4);
$topAd = insert_ads($params);
$page->tpl->assign('topAd', $topAd[0]);

$params= array('id'=>7);
$searchAd = insert_ads($params);
$page->tpl->assign('searchAd', $searchAd[0]);
?>