示例#1
0
        if ($savemoney < 1 || $savemoney > $appconfig['inmax']) {
            showmessage($banklang['savemoneymsg'], '', array('inmax' => $appconfig['inmax']), array('showdialog' => 1));
        }
        $optime = C::t('#huxcity#hux_city_bank_log')->fetch_by_uid($uid, 'dateline', 'ORDER BY eid DESC');
        if ($optime && TIMESTAMP - $optime['dateline'] < $appconfig['jiaoyitime']) {
            showmessage($banklang['jiaoyitimemsg'], '', array('jiaoyitime' => $appconfig['jiaoyitime']), array('showdialog' => 1));
        }
        hux_getmoneyop($savemoney, $optype);
        showmessage('huxcity:op_sus', dreferer(), array(), array('showdialog' => 1, 'locationtime' => 0, 'alert' => 'right'));
    }
} elseif ($action == 'draw') {
    $optype = intval($_GET['btype']);
    if (submitcheck('submit')) {
        $drawmoney = intval($_GET['drawmoney']);
        $drawmoneydata = C::t('#huxcity#hux_city_bank')->fetch_by_uid_type($uid, $optype, 'money,dateline,outtime');
        $moneydatedraw = hux_count_days($drawmoneydata['dateline']);
        if ($drawmoney < 1 || $drawmoney > $appconfig['outmax']) {
            showmessage($banklang['savemoneymsg'], '', array('inmax' => $appconfig['outmax']), array('showdialog' => 1));
        }
        $optime = C::t('#huxcity#hux_city_bank_log')->fetch_by_uid($uid, 'dateline', 'ORDER BY eid DESC');
        if ($optime && TIMESTAMP - $optime['dateline'] < $appconfig['jiaoyitime']) {
            showmessage($banklang['jiaoyitimemsg'], '', array('jiaoyitime' => $appconfig['jiaoyitime']), array('showdialog' => 1));
        }
        if ($optype == 1) {
            $drawmoneyall = $drawmoneydata['money'] + intval($drawmoneydata['money'] * $appconfig['hqfeilv'] * $moneydatedraw);
            if (!$drawmoneydata || $drawmoneyall < $drawmoney) {
                showmessage($banklang['no_cunkuan'], '', array(), array('showdialog' => 1));
            }
        } elseif ($optype == 2) {
            $drawmoneyall = $drawmoneydata['money'] + intval($drawmoneydata['money'] * $appconfig['dqfeilv'] * $moneydatedraw);
            if (!$drawmoneydata || TIMESTAMP < $drawmoneydata['outtime'] && $drawmoneydata['money'] < $drawmoney || TIMESTAMP >= $drawmoneydata['outtime'] && $drawmoneyall < $drawmoney) {
示例#2
0
function hux_getbankinfo($uid)
{
    global $appconfig;
    $hqinfo = C::t('#huxcity#hux_city_bank')->fetch_by_uid_type($uid, 1);
    $dqinfo = C::t('#huxcity#hux_city_bank')->fetch_by_uid_type($uid, 2);
    $dkinfo = C::t('#huxcity#hux_city_bank')->fetch_by_uid_type($uid, 3);
    $hqmoneydate = hux_count_days($hqinfo['dateline']);
    $hqlixi = intval($hqinfo['money'] * $appconfig['hqfeilv'] * $hqmoneydate);
    $dqmoneydate = hux_count_days($dqinfo['dateline']);
    $dqlixi = intval($dqinfo['money'] * $appconfig['dqfeilv'] * $dqmoneydate);
    $dkmoneydate = hux_count_days($dkinfo['dateline']);
    $dklixi = intval($dkinfo['money'] * $appconfig['dkfeilv'] * $dkmoneydate);
    if ($hqinfo) {
        $hqtrue = 1;
    } else {
        $hqtrue = 0;
    }
    if ($dqinfo) {
        $dqtrue = 1;
    } else {
        $dqtrue = 0;
    }
    if ($dkinfo) {
        $dktrue = 1;
    } else {
        $dktrue = 0;
    }
    $infofields = array('hqmoney' => $hqinfo['money'], 'dqmoney' => $dqinfo['money'], 'dkmoney' => $dkinfo['money'], 'hqtime' => $hqinfo['dateline'], 'dqtime' => $dqinfo['dateline'], 'dktime' => $dkinfo['dateline'], 'outtime' => $dqinfo['outtime'], 'dkouttime' => $dkinfo['outtime'], 'hqlixi' => $hqlixi, 'dqlixi' => $dqlixi, 'dklixi' => $dklixi, 'hqtrue' => $hqtrue, 'dqtrue' => $dqtrue, 'dktrue' => $dktrue);
    return $infofields;
}