window.location.href='./login.php';"); $title='申请提现'; include './head.php'; ?> query("SELECT realmoney from pre_order where uid={$uid} and status=1 and endtime>='$today'"); $order_today=0; while($row = $rs->fetch()) { $order_today+=$row['realmoney']; } $enable_money=round($userrow['money']-$order_today,2); if($enable_money<0)$enable_money=0; }else{ $enable_money=$userrow['money']; } if(isset($_GET['act']) && $_GET['act']=='do'){ if($_POST['submit']=='申请提现'){ $money=daddslashes(strip_tags($_POST['money'])); if(!is_numeric($money) || !preg_match('/^[0-9.]+$/', $money))exit(""); if($enable_money<$conf['settle_money']){ exit(""); } if($money<$conf['settle_money']){ exit(""); } if($userrow['settle']==0){ exit(""); } if($conf['settle_rate']>0){ $fee=round($money*$conf['settle_rate']/100,2); if($fee<$conf['settle_fee_min'])$fee=$conf['settle_fee_min']; if($fee>$conf['settle_fee_max'])$fee=$conf['settle_fee_max']; $realmoney=$money-$fee; }else{ $realmoney=$money; } if($DB->exec("INSERT INTO `pre_settle` (`uid`, `type`, `username`, `account`, `money`, `realmoney`, `addtime`, `status`) VALUES ('{$uid}', '{$userrow['settle_id']}', '{$userrow['username']}', '{$userrow['account']}', '{$money}', '{$realmoney}', '{$date}', '0')")){ changeUserMoney($uid, $money, false, '手动提现'); } exit(""); } } ?>