<?php
 /**
 *      [XCECP] (C) COLNET Inc.
 *      This is NOT a freeware, use is subject to license terms
 */
if(!defined("IN_QKWEB")){exit("Access Denied");}
function smarty_function_useramount($params, $template)
{	
	global $_G,$db;
    $id = (isset($params['id']) && settype($params['id'],"integer"))?$params['id']:0;
	if($id && is_numeric($id)){
		$amount = $db->getOne("select sum(amount) from qk_finance where userId='".$id."' and iStatus=1");
		if(!$amount){$amount=0;}
		echo $amount;
	}
    return;
}

?>