<?php // +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- _setView(__FILE__); _setTitle($langArray['withdraws']); $cms = new deposit(); $data = $cms->getWithdraws(START, LIMIT); if (is_array($data)) { require_once ROOT_PATH . '/apps/users/models/users.class.php'; $usersClass = new users(); $users = $usersClass->getAll(0, 0, $cms->usersWhere); abr('users', $users); } abr('data', $data); $p = paging("?m=" . $_GET['m'] . "&c=withdraws&p=", "", PAGE, LIMIT, $cms->foundRows); abr('paging', $p); require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
require_once $config['root_path'] . '/core/functions.php'; include_once $config['system_core'] . "/initEngine.php"; admin_login(); if (isset($_POST['deleteUser']) && isset($_POST['id']) && isset($_SESSION['user']['access']['users'])) { require_once ROOT_PATH . "/apps/users/models/users.class.php"; $cms = new users(); $cms->delete(intval($_POST['id'])); die(json_encode(array_merge($_POST, array('status' => 'true')))); } elseif (isset($_POST['deleteUserGroup']) && isset($_POST['id']) && isset($_SESSION['user']['access']['users'])) { require_once ROOT_PATH . "/apps/users/models/groups.class.php"; $cms = new groups(); $cms->delete(intval($_POST['id'])); die(json_encode(array_merge($_POST, array('status' => 'true')))); } elseif (isset($_POST['deleteWithdraw']) && isset($_POST['id']) && isset($_SESSION['user']['access']['users'])) { require_once ROOT_PATH . "/apps/users/models/deposit.class.php"; $cms = new deposit(); $cms->deleteWithdraw(intval($_POST['id'])); die(json_encode(array_merge($_POST, array('status' => 'true')))); } elseif (isset($_POST['deleteComment']) && isset($_POST['id']) && isset($_SESSION['user']['access']['users'])) { require_once ROOT_PATH . "/apps/items/models/comments.class.php"; $cms = new comments(); $cms->delete(intval($_POST['id'])); die(json_encode(array_merge($_POST, array('status' => 'true')))); } elseif (isset($_POST['deleteBalance']) && isset($_POST['id']) && isset($_SESSION['user']['access']['users'])) { require_once ROOT_PATH . "/apps/users/models/balance.class.php"; $cms = new balance(); $cms->delete(intval($_POST['id'])); die(json_encode(array_merge($_POST, array('status' => 'true')))); } echo json_encode(array_merge($_POST, array('status' => 'unknown error'))); die;
if ($_POST['replace']) { $row = explode("|", $_POST['fstring']); $field = explode(".", $row[$_POST['fposition']]); $field[1] = $_POST['GOAL']; $row[$_POST['fposition']] = implode(".", $field); $data = implode("|", $row); } else { $data = $_POST['input']; } } $template->set_filenames(array('body' => 'final.html')); $template->assign_vars(array('HIDDEN' => $data)); $row = explode("|", $data); if (sizeof($row) > 1) { include "classes/deposit.php"; $test = new deposit(); for ($j = 0; $j < sizeof($row) - 1; $j++) { $field = explode(".", $row[$j]); //==Pulls an entry and verifies that the customer is a customer in the zone $field[2] = $test->is_cust($field[0]); if (!$field[2]) { $template->assign_block_vars('error', array('CLIENT_ID' => $field[0], 'GOAL' => $field[1], 'POSITION' => $j)); $template->assign_block_vars('error.switch_who_the_hell', array()); continue; } //==Pulls an entries goal out of the db and tests to see if the deposit is round $field[3] = $test->is_goal_round($field[2], $field[1]); //==Compares each entry to look for double customers $field[4] = $test->is_double($field[0], $row); if (!$field[2] || !$field[3] || !$field[4]) { $template->assign_block_vars('error', array('CLIENT_ID' => $field[0], 'GOAL' => $field[1], 'POSITION' => $j));
// | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- _setView(__FILE__); _setTitle($langArray['make_payment_setTitle']); $deposit_id = 0; if (isset($_SESSION['tmp']['deposit_id'])) { $deposit_id = (int) $_SESSION['tmp']['deposit_id']; } require_once ROOT_PATH . '/apps/users/models/deposit.class.php'; $cms = new deposit(); $deposit_info = $cms->get($deposit_id); //充值信息 if ($deposit_info) { $payments = glob(dirname(dirname(dirname(__FILE__))) . '/payments/controllers/*.php'); $payments_data = array(); //充值方式 if ($payments) { $order_obj = array(); $key = 'chinabank'; require_once ROOT_PATH . '/apps/payments/models/' . $key . '.class.php'; $order_obj[$key] = new $key(); $payments_data[$key] = array('title' => '网银在线', 'description' => '网银在线订单支付', 'form' => $order_obj[$key]->generateDepositForm($deposit_info), 'logo' => ''); if ($payments_data) { abr('payments_data', $payments_data); } else {
refresh('/' . $languageURL . 'sign_in/'); } if (isset($_SESSION['tmp']['deposit_id']) && $_SESSION['tmp']['deposit_id']) { $_SESSION['tmp']['deposit_id'] = 0; } if ($command == 'success' && $depositID) { $depositClass = new deposit(); $info = $depositClass->get($depositID); if ($info && $info['paid'] == 'true') { refresh('http://' . $config['domain'] . '/' . $languageURL . 'deposit/', $langArray['complete_deposit'], 'complete'); } else { refresh('http://' . $config['domain'] . '/' . $languageURL . 'deposit/', $langArray['error_deposit'], 'error'); } } if (isset($_POST['amount'])) { $depositClass = new deposit(); $depositID = $depositClass->add(); if ($depositID !== FALSE) { if (isset($_SESSION['tmp']['order_id'])) { unset($_SESSION['tmp']['order_id']); } $_SESSION['tmp']['deposit_id'] = $depositID; refresh('/' . $languageURL . 'users/payment/'); } } #面包屑 abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'users/deposit/" title="">' . $langArray['deposit'] . '</a>'); $discount = array(); if ($meta['prepaid_price_discount']) { if (strpos($meta['prepaid_price_discount'], '%')) { $discount = $meta['prepaid_price_discount'];
} if (!$_SESSION['zone']) { if ($_SESSION['access'] > 1) { include_once "view_all_clients.php"; } else { $template->set_filenames(array('body' => 'zone_error.html')); $template->pparse('body'); } } else { include 'classes/my_customers.php'; $List = new client(); if ($_GET['pageload'] == 7) { $template->set_filenames(array('body' => 'view_client.html')); if ($_GET['cid'] || $_POST['cid'] || $_POST['scid']) { include "classes/deposit.php"; $test = new deposit(); $cid = $_GET['cid'] + $_POST['cid']; if ($_POST['scid']) { $cid = $test->is_cust($_POST['scid'], $_POST['szone']); if ($cid == 0) { $template->assign_vars(array('ERROR' => "Votre donnee n'est pas valide")); $template->assign_block_vars('switch_cust_search', array()); if ($_SESSION['access'] > 1) { $template->assign_block_vars('switch_cust_search.switch_zone', array()); } $template->pparse('body'); $template->set_filenames(array('footer' => 'footer.html')); $template->pparse('footer'); exit; } }
// +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- _setView(__FILE__); _setTitle($langArray['edit']); if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { refresh('?m=' . $_GET['m'] . '&c=withdraws', 'INVALID ID', 'error'); } $cms = new deposit(); $data = $cms->getWithdraw($_GET['id']); abr('data', $data); $usersClass = new users(); $user = $usersClass->get($data['user_id']); abr('user', $user); if (isset($_POST['edit'])) { $status = $cms->payoutWithdraw(); if ($status !== true) { addErrorMessage($status, '', 'error'); } else { refresh("?m=" . $_GET['m'] . "&c=withdraws", $langArray['complete_withdraw']); } } else { $_POST = $data; }
abr('user', $user); /* * 查询未完成提现 */ $checkWithdraw = $usersClass->checkWithdraw($_SESSION['user']['user_id']); if ($checkWithdraw) { $checkWithdraw = 1; } else { $checkWithdraw = 0; } abr('checkWithdraw', $checkWithdraw); $date['year'] = date('Y'); $date['month'] = date('n'); $date['day'] = date("t"); abr('date', $date); if (isset($_POST['submit'])) { $depositClass = new deposit(); $s = $depositClass->addWithdraw(); if ($s === true) { refresh('/' . $languageURL . 'withdrawal/', $langArray['complete_add_withdrawal'], 'complete'); } else { $message = '<ul>'; foreach ($s as $e) { $message .= '<li>' . $e . '</li>'; } $message .= '</ul>'; addErrorMessage($message, '', 'error'); } } #面包屑 abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'users/dashboard/" title="">' . $langArray['my_account'] . '</a> \\ <a href="/' . $languageURL . 'users/withdrawal/" title="">' . $langArray['withdrawal'] . '</a>');
$sales['referal'] = $ref['receive']; $sales['win'] = floatval($sales['total']) - floatval($sales['receive']) - floatval($sales['referal']); abr('sales', $sales); } unset($ref); #LOAD USERS COUNT require_once ROOT_PATH . '/apps/users/models/users.class.php'; $usersClass = new users(); // $users['month'] = $usersClass->getUsersCount(" `register_datetime` > '".date('Y-m')."-01 00:00:00' AND `status` = 'activate' "); // $users['total'] = $usersClass->getUsersCount(" `status` = 'activate' "); abr('users', $users); $topAuthors = $usersClass->getAll(0, 5, " `status` = 'activate' ", "`sales` DESC"); abr('topAuthors', $topAuthors); #LOAD WITHDRAW require_once ROOT_PATH . '/apps/users/models/deposit.class.php'; $depositClass = new deposit(); $withdraw['no'] = $depositClass->getWithdrawCount(" `paid` = 'false' AND `datetime` > '" . date('Y-m') . "-01 00:00:00' "); $withdraw['paid'] = $depositClass->getWithdrawCount(" `paid` = 'true' AND `paid_datetime` > '" . date('Y-m') . "-01 00:00:00' "); abr('withdraw', $withdraw); #LOAD THEMES require_once ROOT_PATH . '/apps/items/models/items.class.php'; $itemsClass = new items(); $items = $itemsClass->getAll(0, 10, " `status` = 'queue' "); abr('items', $items); $updated_items = $itemsClass->getAllForUpdate(0, 10); abr('updated_items', $updated_items); #LOAD LAST REQUEST require_once ROOT_PATH . '/apps/contacts/models/contacts.class.php'; $contactsClass = new contacts(); $lastContact = $contactsClass->getAll(0, 10, " `answer` = '' "); abr('lastContact', $lastContact);
$order_id = $the_order[1]; if ($order_type == '0') { //支付宝直接购买订单 require_once ROOT_PATH . '/apps/items/models/orders.class.php'; $cms = new orders(); $order_info = $cms->get($order_id); if ($order_info['paid'] == 'false') { $cms->orderIsPay($order_id, '支付宝支付'); } else { echo "success"; //请不要修改或删除 } } elseif ($order_type == 1) { //充值订单 require_once ROOT_PATH . '/apps/users/models/deposit.class.php'; $cms = new deposit(); $order_info = $cms->get($order_id); if ($order_info['paid'] == 'false') { $cms->depositIsPay($order_id, '支付宝'); } else { echo 'success'; } } //echo "success"; //请不要修改或删除 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } else { //验证失败 echo "fail"; //调试用,写文本函数记录程序运行情况是否正常 //logResult("这里写入想要调试的代码变量值,或其他运行的结果记录"); }