Exemplo n.º 1
0
        $orderQuery .= " DESC";
        abr('orderDir', 'asc');
        break;
    default:
        $orderQuery .= " ASC";
        abr('orderDir', 'desc');
}
$data = $cms->getAll(START, LIMIT, $whereQuery, $orderQuery);
if (is_array($data)) {
    #加载佣金分成
    require_once ROOT_PATH . '/apps/percents/models/percents.class.php';
    $percentsClass = new percents();
    #加载余额
    require_once ROOT_PATH . '/apps/users/models/balance.class.php';
    $balanceClass = new balance();
    $percents = $percentsClass->getAll();
    foreach ($data as $k => $d) {
        $comision = $percentsClass->getPercentRow($d);
        $data[$k]['commission'] = $comision['percent'];
        //			if($data[$k]['commission_percent'] < 1) {
        //				foreach($percents as $p) {
        //					if($d['sold'] >= $p['from'] && ($d['sold'] < $p['to'] || $p['to'] == '0')) {
        //						$data[$k]['commission'] = $p['percent'];
        //						break;
        //					}
        //				}
        //			} else {
        //				$data[$k]['commission'] = $data[$k]['commission_percent'];
        //			}
        $data[$k]['sum'] = $balanceClass->getTotalUserBalanceByType($d['user_id']);
    }
Exemplo n.º 2
0
<?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['percents']);
$cms = new percents();
$data = $cms->getAll();
abr('data', $data);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';