当前位置: 首页>>代码示例>>PHP>>正文


PHP Statistics::getLines方法代码示例

本文整理汇总了PHP中Statistics::getLines方法的典型用法代码示例。如果您正苦于以下问题:PHP Statistics::getLines方法的具体用法?PHP Statistics::getLines怎么用?PHP Statistics::getLines使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Statistics的用法示例。


在下文中一共展示了Statistics::getLines方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

    case 'statistics':
        include_once LIB_ROOT . '/users/statistics.class.php';
        $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'a';
        if ($type == 'a') {
            $types = array('d', 'w', 'e', 'r', 'b');
            $status = array('1', '2');
        } elseif ($type == 'd') {
            $types = array('d');
            $status = 2;
        } else {
            $types = array($type);
            $status = 1;
        }
        $stats = new Statistics(intval($_REQUEST['id']));
        $stats->select = '*';
        $lines = $stats->getLines($types, $status);
        Project::getInstance()->getSmarty()->assign('lines', $lines);
        Project::getInstance()->getSmarty()->assign('user_id', intval($_REQUEST['id']));
        Project::getInstance()->getSmarty()->display('../default/admin/user_statistics.tpl');
        break;
    case 'bonus':
        if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'save') {
            $_POST = sql_escapeArray($_POST);
            sql_query('
				INSERT INTO translines
				SET
					id=0,
					parent_id=0,
					user_id="' . intval($_POST['id']) . '",
					plan_id=0,
					type="b",
开发者ID:andrii888,项目名称:VFXHYIP,代码行数:31,代码来源:users.php

示例2: Statistics

<?php

$ACCESS_LEVEL = ACCESS_LEVEL_ADMIN;
include_once DOC_ROOT . '/includes/authorization.php';
include_once LIB_ROOT . '/users/statistics.class.php';
$stats = new Statistics();
$stats->select = ' sum(amount) as sum ';
$deposited = $stats->getLines(array('d'), 2);
$reinvested = $stats->getLines(array('i'), 1);
$earned = $stats->getLines(array('e'), 1);
$withdrawn = $stats->getLines(array('w'), 1);
$referral_bonuses = $stats->getLines(array('r'), 1);
Project::getInstance()->getSmarty()->assign('deposited', $deposited[0]['sum'] - abs($reinvested[0]['sum']));
Project::getInstance()->getSmarty()->assign('reinvested', $reinvested[0]['sum']);
Project::getInstance()->getSmarty()->assign('earned', $earned[0]['sum']);
Project::getInstance()->getSmarty()->assign('withdrawn', $withdrawn[0]['sum']);
Project::getInstance()->getSmarty()->assign('referral_bonuses', $referral_bonuses[0]['sum']);
include_once LIB_ROOT . '/liberty.class.php';
$LR = new LibertyReserve(get_setting('lr_api'), get_setting('lr_api_secword'));
Project::getInstance()->getSmarty()->assign('lr_balance', $LR->getBalance(get_setting('lr_account')));
include_once LIB_ROOT . '/perfect.class.php';
$PM = new PerfectMoney(get_setting('pm_member_id'), get_setting('pm_password'));
$balance = $PM->getBalance();
Project::getInstance()->getSmarty()->assign('pm_balance', $balance[get_setting('pm_account')]);
include_once LIB_ROOT . '/php-ofc-library/open-flash-chart-object.php';
Project::getInstance()->getSmarty()->assign('chart', open_flash_chart_object_str(1000, 500, 'chart-data.php', false, '/admin/'));
Project::getInstance()->getSmarty()->display('../default/admin/statistics.tpl');
开发者ID:andrii888,项目名称:VFXHYIP,代码行数:27,代码来源:statistics.php


注:本文中的Statistics::getLines方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。