Esempio n. 1
0
    {
        global $creditdb;
        $this->row2['value'] = $this->row2['value'] - $this->money;
        $costmoney = $this->row2['value'];
        $sexecl = "update pw_membercredit set value='{$costmoney}'  where uid='{$this->tgid}' and cid='{$this->tcid}'";
        $this->db->query($sexecl);
        $gexecl = "update pw_gold set money='{$costmoney}'  where id='{$this->tgid}'";
        if ($this->db->query($gexecl)) {
            echo "<div class=\"costmsg\"><span>资金信息:</span><span class=\"cost\">你支出了 {$this->money} {$creditdb['name']}</span>";
        } else {
            echo "无法提交数据";
        }
    }
}
$ch = new tool($tname, $tgid, $gettool, $getchangegold, $getmsg, $repairid, $help, $db);
$tcid = $ch->getcid();
$creditdb = $db->get_one("SELECT * FROM pw_credits WHERE cid=" . pwEscape($tcid));
$ch->oc == 0 && showmsg('插件已关闭');
if ($gss == $ss) {
    if ($getchangegold != '') {
        $ch->chggold($creditdb);
    }
    if ($gettool != '') {
        $ch->updatatool();
    }
}
$ch->getscore();
$ch->getmsg();
if ($repair == $tgid) {
    showmsg('你不能请自己吃饭或帮自己修理工具,快请你的朋友帮忙吧!');
} elseif ($getmsg != '' or $help != '') {