本文整理汇总了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",
示例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');