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


PHP CMediusers::loadUsers方法代码示例

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


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

示例1: CUserLog

 * @version    $Revision$
 */
CCanDo::checkRead();
$start = CValue::get("start", 0);
CView::enforceSlave();
$filter = new CUserLog();
$filter->date = CValue::get("date", CMbDT::dateTime());
$filter->_date_max = CMbDT::dateTime($filter->date);
$filter->_date_min = CMbDT::dateTime("-1 week", $filter->date);
$filter->user_id = CValue::get("user_id");
$filter->ip_address = CValue::get("ip_address", "255.255.255.255");
$order_col = CValue::getOrSession("order_col", "date_max");
$order_way = CValue::getOrSession("order_way", "DESC");
$order_way_alt = $order_way == "ASC" ? "DESC" : "ASC";
$user = new CMediusers();
$listUsers = $user->loadUsers();
$where = array("ip_address IS NOT NULL AND ip_address != ''");
$where[] = "date >= '{$filter->_date_min}'";
$where[] = "date <= '{$filter->_date_max}'";
$where[] = "user_id " . CSQLDataSource::prepareIn(array_keys($listUsers), $filter->user_id);
$order = "{$order_col} {$order_way}";
$group = "ip_address";
$total_list_count = $filter->countMultipleList($where, $order, $group, null, array("ip_address", "MAX(date) AS date_max, GROUP_CONCAT(DISTINCT user_id SEPARATOR '|') AS user_list"));
foreach ($total_list_count as $key => $_log) {
    if (inet_ntop($_log["ip_address"]) != inet_ntop($_log["ip_address"] & inet_pton($filter->ip_address))) {
        unset($total_list_count[$key]);
    }
}
$total_list = array_slice($total_list_count, $start, 30);
foreach ($total_list as &$_log) {
    $_log["ip"] = inet_ntop($_log["ip_address"]);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:view_network_address.php

示例2: array

}
$can_edit = CCanDo::edit();
$planning->guid = $user->_guid;
$planning->hour_min = "07";
$planning->hour_max = "20";
$planning->pauses = array("07", "12", "19");
$planning->dragndrop = $planning->resizable = $can_edit ? 1 : 0;
$planning->hour_divider = 60 / CAppUI::conf("dPcabinet CPlageconsult minutes_interval");
$planning->no_dates = 0;
$plage = new CPlageconsult();
$whereHP["plageop_id"] = " IS NULL";
$users = array();
$conges_day = array();
if ($user->_id) {
    $muser = new CMediusers();
    $users = $muser->loadUsers(PERM_READ, $user->function_id);
}
for ($i = 0; $i < $nbDays; $i++) {
    $jour = CMbDT::date("+{$i} day", $debut);
    $is_holiday = array_key_exists($jour, $bank_holidays);
    $planning->addDayLabel($jour, '<span style="font-size: 1.4em">' . CMbDT::format($jour, "%a %d %b") . '</span>');
    // conges dans le header
    if (count($users)) {
        if (CModule::getActive("dPpersonnel")) {
            $_conges = CPlageConge::loadForIdsForDate(array_keys($users), $jour);
            foreach ($_conges as $key => $_conge) {
                $_conge->loadRefUser();
                $conges_day[$i][] = $_conge->_ref_user->_shortview;
            }
        }
    }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_vw_planning.php

示例3: CMediusers

/** @var CMediusers $object */
$object = new CMediusers();
$user = CMediusers::get();
$use_edit = CAppUI::pref("useEditAutocompleteUsers");
if (!$edit && $use_edit) {
    $edit = 1;
}
// Droits sur les utilisateurs retournés
$permType = $edit ? PERM_EDIT : PERM_READ;
// Récupération de la liste des utilisateurs
if ($rdv) {
    $listUsers = $object->loadProfessionnelDeSanteByPref($permType, null, $keywords);
} elseif ($praticiens) {
    $listUsers = $object->loadPraticiens($permType, null, $keywords);
} else {
    $listUsers = $object->loadUsers($permType, null, $keywords);
}
if ($compta) {
    $listUsersCompta = CConsultation::loadPraticiensCompta();
    foreach ($listUsers as $_user) {
        if (!isset($listUsersCompta[$_user->_id])) {
            unset($listUsers[$_user->_id]);
        }
    }
}
$template = $object->getTypedTemplate("autocomplete");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign('matches', $listUsers);
$smarty->assign('field', $field);
$smarty->assign('view_field', $view_field);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_users_autocomplete.php

示例4: CMediusers

<?php

/**
 * $Id$
 *  
 * @category Drawing
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
// users
$user = new CMediusers();
$users = $user->loadUsers(PERM_EDIT);
// functions
$function = new CFunctions();
$functions = $function->loadListWithPerms(PERM_EDIT);
// smarty
$smarty = new CSmartyDP();
$smarty->assign("users", $users);
$smarty->assign("functions", $functions);
$smarty->display("vw_categories.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:24,代码来源:vw_categories.php


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