<?php
/**
 * 文件名：product.logic.php
 * 版本号：1.0
 * 作者：管乐<guan19861986@yahoo.com.cn>
 * 功能描述: 支付
 */
class PayLogic{	
	var $DatabaseHandler;
	var $Config;
	
	function PayLogic(){
		$this->DatabaseHandler = &Obj::registry("DatabaseHandler");
		$this->Config = &Obj::registry("config");
	}
	
	function payType(){		$sql='select *  from '.TABLE_PREFIX.'tttuangou_payment where is_online = 1 order by pay_order asc ';
		$query = $this->DatabaseHandler->Query($sql);
		$pay=$query->GetAll();
				foreach($pay as $i => $value){
			if($value['pay_config']=='' && $value['is_cod']!=1){
				unset($pay[$i]);
			}
		}
		return $pay;
	}
	
	function payChoose($type){		$sql='select * from '.TABLE_PREFIX.'tttuangou_payment where pay_id   = '.intval($type);
		$query = $this->DatabaseHandler->Query($sql);
		$pay=$query->GetRow();
		return $pay;
	}
	
}

?>