<?php
/***
*
*@package binzcms
*@version $id:A_CommonClass.php, v 1.0
*@author 斌子
*@Sat Sep 18 13:57:58 GMT 2010
*@copyright (c) 2009-2010 binzcms
*
*/
if(!defined("BINZCMS")) {
	die("hacking");
}
/**
 *
 * A_CommonClass
 * 描述
 * 
 */
class A_CommonClass {
	private $sql_class;
	private $tpl_class;
	private $com_class;

	public function __construct($sql_class,$tpl_class,$com_class) {
		if(SHOW_TYPE != 'admin') return '';
		$this->sql_class	= $sql_class;
		$this->tpl_class	= $tpl_class;
		$this->com_class	= $com_class;
	}
	/**
	 * check_admin_power
	 *
	 * 管理员后台检查管理员权限
	 * @access  public（权限）
	 */
	public function check_admin_power($power) {
		if(!in_array($power,$_SESSION['admin_power']) and $_SESSION['admin_id'] != 1) {
			$this->com_class->admin_msg($this->tpl_class->var_all['common_admin_not_power'],0,$link,$this->tpl_class,true,2);
		}
	}
}

?>