<?php

/*

		用户偏好加载

*/

if(!defined('VI_BASE')) {
	exit('Access Denied');
}

///////////////////////////////////

//圣诞节（共5天）
if( $xmas ){

	//圣诞帽
	if( $config["ui-head"] != "N" ){
		echo '<div id="newyear"><img id="lanternPoint" src="image/hat.png" alt="圣诞节快乐！" /></div>';	
	}

	//下雪花
	if( $config["ui-snow"] != "N" ){

		echo '<script src="source/snow/jsized.snow.min.js" type="text/javascript"></script>        
		<script type="text/javascript">createSnow("source/snow/", 60);</script>';

		//积雪
		echo '<div id="snow"></div>';

	}

}

/***********************/

//农历春节（共30天）
$lunar = new Lunar();

//得到今年春节的日期
$date = $lunar->Lunar2Solar(date("Y").'-12-30',1);

//var_dump( date('Y-m-d',$date) );

//15天
$day15 = 3600*24*10;

//前后15天，共30天
if( $date - $day15 <= time() && $date + $day15 >= time() ){

	//圣诞帽
	echo '<div id="newyear" class="spring"><img id="lanternPoint" src="image/spring.png" alt="农历春节！" /></div>';

}

/***********************/

/*云服务*/
echo '<script type="text/javascript">';
switch( $config["ext-input"] ){
		
	case "pinyin":
	
		echo "(function(q){!!q?q.toggle():(function(d,j){j=d.createElement('script');j.src='http://ime.qq.com/fcgi-bin/getjs';j.setAttribute('ime-cfg','lt=2');d.getElementsByTagName('head')[0].appendChild(j)})(document)})(window.QQWebIME);";				
	
	break;	
	
	case "wubi":
	
		echo "(function(q){!!q?q.toggle():(function(d,j){j=d.createElement('script');j.src='http://ime.qq.com/fcgi-bin/getjs';j.setAttribute('ime-cfg','lt=2&im=212');d.getElementsByTagName('head')[0].appendChild(j)})(document)})(window.QQWebIME);";
	
	break;	
	
	case "yingwen":
	
		echo "(function(q){!!q?q.toggle():(function(d,j){j=d.createElement('script');j.src='http://ime.qq.com/fcgi-bin/getjs';j.setAttribute('ime-cfg','lt=2&im=012');d.getElementsByTagName('head')[0].appendChild(j)})(document)})(window.QQWebIME);";
	
	break;	

}
echo '</script>';

//用户偏好设置_结束
?>