$object = $_perm->loadRefDBObject(); $permsObject[$object->_class][$object->_id]["profil"] = $_perm; } // Droit sur l'utilisateur foreach ($permObject->loadList($whereUser, $order) as $_perm) { $permsObjectCount++; $_perm->_owner = "user"; $object = $_perm->loadRefDBObject(); $permsObject[$object->_class][$object->_id]["user"] = $_perm; } // Chargement des utilisateurs du profil courant ou de celui de l'utilisateur $profileUser = new CUser(); $profilesList = array(); if ($user->profile_id) { $profileUser->profile_id = $user->profile_id; $profilesList = $profileUser->loadMatchingList('user_last_name'); } if ($user->template) { $profileUser->profile_id = $user->_id; $profilesList = $profileUser->loadMatchingList('user_last_name'); } $classes = CApp::getInstalledClasses(); $module_classes = CApp::groupClassesByModule($classes); // Création du template $smarty = new CSmartyDP(); $smarty->assign("user", $user); $smarty->assign("modulesInstalled", $modulesInstalled); $smarty->assign("isAdminPermSet", $isAdminPermSet); $smarty->assign("classes", $classes); $smarty->assign("module_classes", $module_classes); $smarty->assign("permsModule", $permsModule);
if (class_exists("CBanque")) { $order = "nom ASC"; $banque = new CBanque(); $banques = $banque->loadList(null, $order); } // Récupération des disciplines $discipline = new CDiscipline(); $disciplines = $discipline->loadList(); // Récupération des spécialités CPAM $spec_cpam = new CSpecCPAM(); $spec_cpam = $spec_cpam->loadList(null, 'spec_cpam_id ASC'); // Récupération des profils $profile = new CUser(); $profile->template = 1; /** @var CUser[] $profiles */ $profiles = $profile->loadMatchingList(); // Creation du tableau de profil en fonction du type $tabProfil = array(); foreach ($profiles as $profil) { $tabProfil[$profil->user_type][] = $profil->_id; } $tag = false; if ($object->_id) { $tag = CIdSante400::getMatch($object->_class, CMediusers::getTagSoftware(), null, $object->_id)->id400; } $password_info = CAppUI::$user->_specs['_user_password']->minLength > 4 ? "Le mot de passe doit être composé d'au moins 6 caractères, comprenant des lettres et au moins un chiffre." : "Le mot de passe doit être composé d'au moins 4 caractères."; // Création du template $smarty = new CSmartyDP(); $smarty->assign("tabProfil", $tabProfil); $smarty->assign("utypes", CUser::$types); $smarty->assign("ps_types", CUser::$ps_types);
<?php /** * $Id: check_siblings.php 19947 2013-07-17 10:47:45Z rhum1 $ * * @category Admin * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 19947 $ * @link http://www.mediboard.org */ CCanDo::checkAdmin(); $user = new CUser(); // Find duplicates $query = "SELECT `user_username`, COUNT(*) AS `user_count`\n FROM `users`\n GROUP BY `user_username`\n ORDER BY `user_count` DESC"; $ds = $user->_spec->ds; $user_counts = $ds->loadHashList($query); $siblings = array(); foreach ($user_counts as $user_name => $user_count) { // Only duplicates if ($user_count == 1) { break; } $user->user_username = $user_name; $siblings[$user_name] = $user->loadMatchingList(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("siblings", $siblings); $smarty->display("check_siblings.tpl");
$praticien = new CMediusers(); $secretaire = new CMediusers(); $praticiens = array(); for ($a = 1; $a <= $max_prat; $a++) { $praticiens[] = $praticien; } $secretaires = array(); for ($a = 1; $a <= $max_sec; $a++) { $secretaires[] = $secretaire; } //profils $profile = new CUser(); $profile->template = 1; //profils prat $profile->user_type = 13; $profiles_medecin = $profile->loadMatchingList(); //profiles secretaire $profile->user_type = 10; $profiles_secretaire = $profile->loadMatchingList(); //no profile ? stop if (!count($profiles_secretaire) || !count($profiles_medecin)) { CAppUI::stepAjax("No_profiles_yet", UI_MSG_ERROR); } //------------------------------------------------- //smarty $smarty = new CSmartyDP(); $smarty->assign("function", $function); $smarty->assign("praticiens", $praticiens); $smarty->assign("max_prat", $max_prat); $smarty->assign("profiles_prat", $profiles_medecin); $smarty->assign("secretaires", $secretaires);
<?php /** * $Id$ * * @category System * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @link http://www.mediboard.org */ CCanDo::checkAdmin(); $log = new CLongRequestLog(); $log->_date_min = CValue::get("_date_min", CMbDt::date("-1 MONTH") . ' 00:00:00'); $log->_date_max = CValue::get("_date_max"); $log->user_id = CValue::get("user_id"); $log->duration = CValue::get("duration"); $duration_operand = CValue::get("duration_operand"); $user = new CUser(); $user->template = "0"; $order = "user_last_name, user_first_name"; $user_list = $user->loadMatchingList($order); $smarty = new CSmartyDP(); $smarty->assign("user_list", $user_list); $smarty->assign("log", $log); $smarty->assign("duration_operand", $duration_operand); $smarty->display("vw_purge_long_request_logs.tpl");
$debug_content = null; $debug_size = 0; if (file_exists(CMbDebug::DEBUG_PATH)) { $debug_size = filesize(CMbDebug::DEBUG_PATH); $debug_size_limit = CMbDebug::DEBUG_SIZE_LIMIT; $offset = -1; if ($debug_size > $debug_size_limit) { $offset = $debug_size - $debug_size_limit; } $debug_content = file_get_contents(CMbDebug::DEBUG_PATH, false, null, $offset); } // Récupération de la liste des utilisateurs disponibles $user = new CUser(); $user->template = "0"; $order = "user_last_name, user_first_name"; $list_users = $user->loadMatchingList($order); // Création du template $smarty = new CSmartyDP(); $smarty->assign("log", $log_content); $smarty->assign("log_size", CMbString::toDecaBinary($log_size)); $smarty->assign("debug", $debug_content); $smarty->assign("debug_size", CMbString::toDecaBinary($debug_size)); $smarty->assign("error_log", $error_log); $smarty->assign("error_type", $error_type); $smarty->assign("server_ip", $server_ip); $smarty->assign("order_by", $order_by); $smarty->assign("group_similar", $group_similar); $smarty->assign("error_types", CError::getErrorTypesByCategory()); $smarty->assign("user_id", $user_id); $smarty->assign("list_users", $list_users); $smarty->assign("human", $human);
/** * get profiles * * @return CUser[] */ static function getProfiles() { // Récupération des profils $profile = new CUser(); $profile->template = 1; return $profile->loadMatchingList(); }