本文整理汇总了PHP中CMediusers::countList方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::countList方法的具体用法?PHP CMediusers::countList怎么用?PHP CMediusers::countList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::countList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$where["service.group_id"] = " = '{$current_group}'";
$res_current_etab["CLit"] = $lit->countList($where, null, $ljoin);
// - Chambres
$ljoin = array();
$where = array();
$chambre = new CChambre();
$ljoin["service"] = "chambre.service_id = service.service_id";
$where["service.group_id"] = " = '{$current_group}'";
$res_current_etab["CChambre"] = $chambre->countList($where, null, $ljoin);
// - Utilisateurs
$ljoin = array();
$where = array();
$mediuser = new CMediusers();
$ljoin["functions_mediboard"] = "users_mediboard.function_id = functions_mediboard.function_id";
$where["functions_mediboard.group_id"] = " = '{$current_group}'";
$res_current_etab["CMediusers"] = $mediuser->countList($where, null, $ljoin);
$smarty->assign("res_current_etab", $res_current_etab);
$smarty->display("inc_metrique_current_etab.tpl");
} else {
$ds = CSQLDataSource::get("std");
$etab = CGroups::loadCurrent();
$result = array();
$listeClasses = CApp::getInstalledClasses();
foreach ($listeClasses as $class) {
$object = new $class();
if ($object->_spec->measureable) {
$sql = "SHOW TABLE STATUS LIKE '{$object->_spec->table}'";
$statusTable = $ds->loadList($sql);
if ($statusTable) {
$result[$class] = $statusTable[0];
$result[$class]["Update_relative"] = CMbDate::relative($result[$class]["Update_time"]);
示例2: CMediusers
$intervenants = $intervenant->loadList(null, "code");
$mediuser = new CMediusers();
$ljoin = array();
$ljoin["users"] = "users.user_id = users_mediboard.user_id";
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["users_mediboard.actif"] = "= '1'";
$where["functions_mediboard.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
if ($interv) {
$last_space = strrpos($interv, " ");
$last_name = substr($interv, 0, $last_space);
$where[] = "users.user_last_name = '{$last_name}'\n OR users.user_last_name = '{$last_name}'";
}
$limit = "{$current}, {$step}";
$order = "users.user_last_name ASC, users.user_first_name ASC";
$total = $mediuser->countList($where, null, $ljoin);
/** @var CMediusers[] $mediusers */
$mediusers = $mediuser->loadList($where, $order, $limit, null, $ljoin);
foreach ($mediusers as $_mediuser) {
$_mediuser->loadRefFunction();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("mediuser", $mediuser);
$smarty->assign("intervenants", $intervenants);
$smarty->assign("interv", $interv);
$smarty->assign("mediusers", $mediusers);
$smarty->assign("current", $current);
$smarty->assign("step", $step);
$smarty->assign("total", $total);
$smarty->assign("exclude_without_code", $exclude_without_code);
示例3: getDoctor
/**
* Return or create the doctor of the message
*
* @param DOMNode $node Node
*
* @return CMediusers|int|null
*/
function getDoctor($node)
{
$xpath = new CHPrimSanteMessageXPath($node ? $node->ownerDocument : $this);
$nodeDoctor = $xpath->query("P.13", $node);
$code = null;
$nom = null;
$prenom = null;
$type_code = null;
foreach ($nodeDoctor as $_node_doctor) {
$code = $xpath->queryTextNode("CNA.1", $_node_doctor);
$nom = $xpath->queryTextNode("CNA.2/PN.1", $_node_doctor);
$prenom = $xpath->queryTextNode("CNA.2/PN.2", $_node_doctor);
$type_code = $xpath->queryTextNode("CNA.3", $_node_doctor);
if ($code && $nom) {
break;
}
}
$mediuser = new CMediusers();
$mediuser->_user_last_name = $nom;
switch ($type_code) {
case "R":
$mediuser->rpps = $code;
break;
case "A":
$mediuser->adeli = $code;
break;
default:
if (strlen($code) == 9 && luhn($code)) {
$mediuser->adeli = $code;
}
if (strlen($code) == 11 && luhn($code)) {
$mediuser->rpps = $code;
}
}
// Cas où l'on a aucune information sur le médecin
if (!$mediuser->rpps && !$mediuser->adeli && !$mediuser->_id && !$mediuser->_user_last_name) {
return null;
}
$sender = $this->_ref_sender;
$ds = $mediuser->getDS();
$ljoin = array();
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
if ($mediuser->rpps || $mediuser->adeli) {
if ($mediuser->rpps) {
$where[] = $ds->prepare("rpps = %", $mediuser->rpps);
}
if ($mediuser->adeli) {
$where[] = $ds->prepare("adeli = %", $mediuser->adeli);
}
// Dans le cas où le praticien recherché par son ADELI ou RPPS est multiple
if ($mediuser->countList($where, null, $ljoin) > 1) {
$ljoin["users"] = "users_mediboard.user_id = users.user_id";
$where[] = $ds->prepare("users.user_last_name = %", $nom);
}
$mediuser->loadObject($where, null, null, $ljoin);
if ($mediuser->_id) {
return $mediuser;
}
}
$user = new CUser();
$ljoin = array();
$ljoin["users_mediboard"] = "users.user_id = users_mediboard.user_id";
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
$where[] = $ds->prepare("users.user_first_name = %", $prenom);
$where[] = $ds->prepare("users.user_last_name = %", $nom);
$order = "users.user_id ASC";
if ($user->loadObject($where, $order, null, $ljoin)) {
return $user->loadRefMediuser();
}
$mediuser->_user_first_name = $prenom;
$mediuser->_user_last_name = $nom;
return $this->createDoctor($mediuser);
}