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


PHP eZSession::countActive方法代码示例

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


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

示例1: count

    if (strlen($filterSQL) + strlen($expirationFilterSQL) > 0) {
        $whereSQL = 'WHERE';
    }
    $db = eZDB::instance();
    $query = "SELECT count( DISTINCT ezsession.user_id ) AS count\n              FROM ezsession\n              {$whereSQL}\n              {$filterSQL}\n              {$expirationFilterSQL}";
    $rows = $db->arrayQuery($query);
    return $rows[0]['count'];
}
$param['sortby'] = false;
$param['filter_type'] = $filterType;
$param['expiration_filter'] = $expirationFilterType;
$param['user_id'] = $userID;
if (isset($viewParameters['sortby'])) {
    $param['sortby'] = $viewParameters['sortby'];
}
$sessionsActive = eZSession::countActive();
$sessionsCount = eZFetchActiveSessionCount($param);
$sessionsList = eZFetchActiveSessions($param);
if ($param['offset'] >= $sessionsActive and $sessionsActive != 0) {
    $module->redirectTo('/setup/session');
}
$tpl->setVariable("gc_sessions_completed", $gcSessionsCompleted);
$tpl->setVariable("sessions_removed", $sessionsRemoved);
$tpl->setVariable("sessions_active", $sessionsActive);
$tpl->setVariable("sessions_count", $sessionsCount);
$tpl->setVariable("sessions_list", $sessionsList);
$tpl->setVariable("page_limit", $param['limit']);
$tpl->setVariable("view_parameters", $viewParameters);
$tpl->setVariable("form_parameter_string", $viewParameters);
$tpl->setVariable('filter_type', $filterType);
$tpl->setVariable('expiration_filter_type', $expirationFilterType);
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:31,代码来源:session.php

示例2: collection

        $cli->output( "Removing all sessions" );
        eZSession::cleanup();
    }
}

if ( $clean['expired_session'] )
{
    if ( !eZSession::getHandlerInstance()->hasBackendAccess() )
    {
        $cli->output( "Could not remove expired sessions, current session handler does not support session garbage collection (not backend based)." );
    }
    else
    {
        $cli->output( "Removing expired sessions,", false );
        eZSession::garbageCollector();
        $activeCount = eZSession::countActive();
        $cli->output( " " . $cli->stylize( 'emphasize', $activeCount ) . " left" );
    }
}

if ( $clean['preferences'] )
{
    $cli->output( "Removing all preferences" );
    eZPreferences::cleanup();
}

if ( $clean['browse'] )
{
    $cli->output( "Removing all recent items and bookmarks for browse page" );
    eZContentBrowseRecent::cleanup();
    eZContentBrowseBookmark::cleanup();
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:cleanup.php

示例3: count

    if (strlen($filterSQL) + strlen($expirationFilterSQL) > 0) {
        $whereSQL = 'WHERE';
    }
    $db = eZDB::instance();
    $query = "SELECT count( DISTINCT ezsession.user_id ) AS count\n              FROM ezsession\n              {$whereSQL}\n              {$filterSQL}\n              {$expirationFilterSQL}";
    $rows = $db->arrayQuery($query);
    return $rows[0]['count'];
}
$param['sortby'] = false;
$param['filter_type'] = $filterType;
$param['expiration_filter'] = $expirationFilterType;
$param['user_id'] = $userID;
if (isset($viewParameters['sortby'])) {
    $param['sortby'] = $viewParameters['sortby'];
}
$sessionsActive = eZSession::countActive($param);
$sessionsCount = eZFetchActiveSessionCount($param);
$sessionsList = eZFetchActiveSessions($param);
if ($param['offset'] >= $sessionsActive and $sessionsActive != 0) {
    $module->redirectTo('/setup/session');
}
$tpl->setVariable("gc_sessions_completed", $gcSessionsCompleted);
$tpl->setVariable("sessions_removed", $sessionsRemoved);
$tpl->setVariable("sessions_active", $sessionsActive);
$tpl->setVariable("sessions_count", $sessionsCount);
$tpl->setVariable("sessions_list", $sessionsList);
$tpl->setVariable("page_limit", $param['limit']);
$tpl->setVariable("view_parameters", $viewParameters);
$tpl->setVariable("form_parameter_string", $viewParameters);
$tpl->setVariable('filter_type', $filterType);
$tpl->setVariable('expiration_filter_type', $expirationFilterType);
开发者ID:nlenardou,项目名称:ezpublish,代码行数:31,代码来源:session.php


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