<?php
/**************************************************
*  Created:  2010-06-08
*
*  文件说明
*
*  @Xweibo (C)1996-2099 SINA Inc.
*  @Author xionghui <xionghui1@staff.sina.com.cn>
*
***************************************************/

class test_tpl
{
	
	function test_tpl(){}
	
	function sess(){
		//echo 1;
		session_start();
		echo "session";
	}
	
	function default_action(){
		$this->out();
	}
	
	
	function ot(){
		print_r(V('g'));
		print_r(V('p'));
	}
	
	function test1(){
		TPL::display('profile');
	}
	
	function test2(){
		TPL::display('profile');
	}
	
	
	function tk(){
		var_dump(APP::F('filter','tets','nick'));
		var_dump(APP::F('filter','ss法轮功www','nick'));
		var_dump(APP::F('filter','ss法*轮*功www','nick'));
		// APP::F('filter','tets','nick')
		// APP::F('filter','tets','nick') === true
	}
	
	
	function tp(){
		APP::tips(array('tpl' => 'error', 
						'msg' => '错误信息错误信息错误信息错误信息错误信息错误信息', 
						'location' => '', 
						'timeout' => 0));

	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	function admin () {
		TPL::display('admin_index','lang1',0,'admin');
	}
	function _before_index(){
		//echo '_before_out';
	}
	
	function _after_index(){
		//echo '_before_out';
	}
	
	function pinfo(){
		echo '<pre>';
		print_r(V('S'));
	}
	
	function out(){
		
		//var_dump(APP::O('test_class'));
		TPL::assign('title','标题测试');
		TPL::assign('arr_var',APP::V('g'));
		TPL::assignExtract( array('a' => 1, 'b' => 2));
		TPL::display('test1','lang1');
	}
	
	function ft(){
		TPL::assign('title','标题测试');
		TPL::assign('arr_var',APP::V('g'));
		TPL::assignExtract( array('a' => 1, 'b' => 2));
		echo "<pre>".htmlspecialchars(TPL::fetch('test1','lang1'))."</pre>";
	}
	
	function s1 (){
		$_SESSION['test_sess'] = array(1,2,3,4,5,6);
	}
	
	function s2(){
		print_r($_SESSION);
	}

	function a(){
		//var_dump(APP::O('test_class'));
		TPL::assign('title','标题测试');
		TPL::assign('arr_var',APP::V('g'));
		TPL::assignExtract( array('a' => 1, 'b' => 2));
		TPL::display('test1','lang1');
		//TPL::display('default/test1','lang1',0,false);
	}
	
	function s(){
		//$T = APP::ADP('http');
		
		
		if ( !defined(ENTRY_CONST_NAME) && constant(ENTRY_CONST_NAME) ) {
			
		}
		
		//echo constant(ENTRY_CONST_NAME);
		print_r(APP::getRuningRoute(1));
	}
	
	function ds(){
		
		$rst = array();
		$rst['url'] = 'http://...'; 
		$rst['w'] = '180'; 
		$rst['h'] = '180'; 
		
		$s = APP::ajaxRst($rst,0,'',1);
		print_r(json_decode($s,1));
		exit;
		echo '<pre>';
		print_r(V('c'));
		print_r($_SESSION);
		//$pager = APP::N('Pager');
		//echo $pager->nav($pname='page', $preText='上一页', $nextText='下一页');
		//nav($preText='上一页', $nextText='下一页')
		//$storage = APP::N('clientUser');
		//$storage->setInfo('uid', $uid189);
	}
}







?>