Esempio n. 1
0
/**
 * Generate page
 *
 * @param iMSCP_pTemplate $tpl Template engine
 * @return void
 */
function generatePage($tpl)
{
    $stmt = exec_query('SELECT admin_id FROM admin WHERE created_by = ?', intval($_SESSION['user_id']));
    while ($row = $stmt->fetchRow(PDO::FETCH_ASSOC)) {
        _generateUserStatistics($tpl, $row['admin_id']);
        $tpl->parse('USER_STATISTICS_ENTRY_BLOCK', '.user_statistics_entry_block');
    }
}
/**
 * Generates page
 *
 * @param iMSCP_pTemplate $tpl Template engine instance
 * @param int $resellerId Reseller unique identifier
 * @return void
 */
function generatePage($tpl, $resellerId)
{
    $stmt = exec_query('SELECT admin_id FROM admin WHERE created_by = ?', $resellerId);
    if ($stmt->rowCount()) {
        while ($row = $stmt->fetchRow(PDO::FETCH_ASSOC)) {
            _generateUserStatistics($tpl, $row['admin_id']);
            $tpl->parse('RESELLER_USER_STATISTICS_BLOCK', '.reseller_user_statistics_block');
        }
    } else {
        $tpl->assign('RESELLER_USER_STATISTICS_BLOCK', '');
    }
}