<?php
require('path.inc.php');
$page->title =  $page->title.' - 用户余额';
$member = new Member($query);
$page->name = 'changeMoney';
$id = intval($_GET['id']);
$datainfo = $member->getInfo($id,'*',false);
$page->tpl->assign('datainfo', $datainfo);
$page->tpl->assign('id', $id);
if($page->action == 'update'){
try{
	$id = intval($_POST['id']);
	$money = intval($_POST['money']);
	$member->updatemoney($id,$money);
	$page->goto('index.php','充值成功');
	}catch (Exception $e){
		$page->back("充值失败");
	}
	exit;
}
$page->show();
?>
