Ejemplo n.º 1
0
    } else {
        echo "<script>alert('操作错误!');history.go(-1);</script>";
        exit;
    }
    //mysql_close();
    $sql = "select * from users where loginname='" . $rowhk['userid'] . "'";
    $query = $db->query($sql);
    $rowuser = $db->fetch_array($query);
    if (is_array($rowuser)) {
    } else {
        echo "<script>alert('会员不存在!');history.go(-1);</script>";
        exit;
    }
    $bdsql = "Update users set amount=amount+" . $rowhk["amount"] . " where id =" . $rowuser['id'] . " ";
    $db->query($bdsql);
    shouzhi($db, $rowuser['loginname'], "管理员取消提现", $rowhk["amount"], "管理员取消提现");
    //$db->query("insert into czlog (who,ip,types,beizhu,addtime) values ('".$_COOKIE["adminname"]."','".$_SERVER["REMOTE_ADDR"]."','取消提现','会员名称:".$rowhk['userid']."','".date("Y-m-d H:i:s")."')");
    $sql = 'delete from getamount WHERE id=' . $_GET["id"] . '';
    $db->query($sql);
    echo "<script>alert('设置成功,现在返回!');window.location.href='?page=" . $_GET['page'] . "';</script>";
    exit;
}
if ($_GET['act'] == "sp") {
    $sql = "select * from getamount where id='" . $_GET["id"] . "' and states=0 ";
    $query = $db->query($sql);
    $rowhk = $db->fetch_array($query);
    if (is_array($rowhk)) {
    } else {
        echo "<script>alert('操作错误!');history.go(-1);</script>";
        exit;
    }
Ejemplo n.º 2
0
        echo "<script>alert('金额有误!');history.go(-1);</script>";
        exit;
    }
    $jine = $_POST['allmoney'];
    if ($jine < 0) {
        $jine = -$jine;
    }
    if ($_POST['leixing'] == "1") {
        if ($_POST['allmoney'] > 0) {
            $asql = "Update users set amount=amount+" . $jine . " where id =" . $row['id'] . " ";
        }
        if ($_POST['allmoney'] < 0) {
            $asql = "Update users set amount=amount-" . $jine . ",allliutongfu=allliutongfu+" . $jine . " where id =" . $row['id'] . " ";
        }
        $db->query($asql);
        shouzhi($db, $row['id'], $row['loginname'], "管理员充值电子币", $_POST["allmoney"], $_POST["allmoney"], 0, $_POST['reason'], 0);
        $sql = "insert into czrecode (wang,userid,jine,types,adddate,addtime,reason) values (1,'" . $_POST['uusername'] . "','" . $_POST['allmoney'] . "','" . $_POST['leixing'] . "','" . date('Y-m-d') . "','" . date("Y-m-d H:i:s") . "','" . $_POST['reason'] . "')";
        $db->query($sql);
        //$db->query("insert into czlog (who,ip,types,beizhu,addtime) values ('".$_COOKIE["adminname"]."','".$_SERVER["REMOTE_ADDR"]."','电子币充值','会员名称:".$_POST['uusername']."充值金额".$_POST['allmoney']."','".date("Y-m-d H:i:s")."')");
        echo "<script>alert('充值电子币成功!');window.location.href='chongzhijilu.php';</script>";
        exit;
    }
}
?>
<html><head>
<title>会员管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="images/css1.css" type="text/css">
<style type="text/css">
<!--
.style1 {color: #000000}