public function depositIsPay($deposit_id, $recharge_type) { global $mysql, $langArray, $config; $row = $this->get($deposit_id); if ($row) { //订单已成功 if ($row['paid'] == 'true') { return; } //对用户进行充值 添加到充值余额 同时增加总余额 $mysql->query("\n\t\t\t\tUPDATE `users`\n\t\t\t\tSET `deposit` = `deposit` + '" . sql_quote($row['deposit']) . "',\n\t\t\t\t\t\t`total` = `total` + '" . sql_quote($row['deposit']) . "'\n\t\t\t\tWHERE `user_id` = '" . intval($row['user_id']) . "'\n\t\t\t\tLIMIT 1\n\t\t\t"); //资金流动类 require_once ROOT_PATH . '/apps/users/models/transaction_details.class.php'; $logClass = new transaction_details(); //记录资金流动(uid,type,value,info) if (floatval($row['deposit']) > 0) { $logClass->addRecord(intval($row['user_id']), 'deposit', floatval($row['deposit']), $langArray['deposit_type'] . ':' . $recharge_type); } $user_deposit = floatval($_SESSION['user']['deposit']) + floatval($row['deposit']); $user_total = floatval($_SESSION['user']['total']) + floatval($row['deposit']); //改变充值订单状态 $mysql->query("\n\t\t\t\tUPDATE `deposit`\n\t\t\t\tSET \n\t\t\t\t`paid` = 'true'\n\t\t\t\tWHERE `id` = '" . intval($deposit_id) . "'\n\t\t\t"); //检测用户登录状态 更新session if (isset($_SESSION['user'])) { $_SESSION['user']['deposit'] = $user_deposit; $_SESSION['user']['total'] = $user_total; } require_once ROOT_PATH . '/classes/history.class.php'; $historyClass = new history(); //添加到充值记录 $historyClass->add($langArray['deposit_history'] . $row['deposit'], $deposit_id, $row['user_id']); #CHECK REFERAL require_once ROOT_PATH . '/apps/users/models/users.class.php'; $usersClass = new users(); $user = $usersClass->get($row['user_id']); if ($user['referal_id'] != '0') { //对推荐人进行分成 (暂时关闭对充值进行分成) //$this->referalMoney($row, $user); } } }
public function pathList() { load_class('history'); session_start(); //re start $session = isset($_SESSION['history']) ? $_SESSION['history'] : false; $user_path = $this->in['path']; if (is_array($session)) { $hi = new history($session); if ($user_path == "") { $user_path = $hi->getFirst(); } else { $hi->add($user_path); $_SESSION['history'] = $hi->getHistory(); } } else { $hi = new history(array(), 20); if ($user_path == "") { $user_path = '/'; } $hi->add($user_path); $_SESSION['history'] = $hi->getHistory(); } //回收站不记录前进后退 if ($this->in['path'] != '*recycle*/' && (!isset($this->in['type']) || $this->in['type'] !== 'desktop')) { $_SESSION['this_path'] = $user_path; } $list = $this->path($this->path); $list['history_status'] = array('back' => $hi->isback(), 'next' => $hi->isnext()); show_json($list); }
public function pathList() { load_class('history'); session_start(); //re start $session = $_SESSION['history']; $user_path = $this->in['path']; if (is_array($session)) { $hi = new history($session); if ($user_path == "") { $user_path = $hi->getFirst(); } else { $hi->add($user_path); $_SESSION['history'] = $hi->getHistory(); } } else { $hi = new history(array(), 20); if ($user_path == "") { $user_path = '/'; } $hi->add($user_path); $_SESSION['history'] = $hi->getHistory(); } $_SESSION['this_path'] = $user_path; $list = $this->path($this->path); $list['history_status'] = array('back' => $hi->isback(), 'next' => $hi->isnext()); show_json($list); }