本文整理汇总了PHP中CMediusers::getTagSoftware方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::getTagSoftware方法的具体用法?PHP CMediusers::getTagSoftware怎么用?PHP CMediusers::getTagSoftware使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::getTagSoftware方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
CValue::setSession("text", $text);
CValue::setSession("server_ip", $server_ip);
CValue::setSession("_datetime_min", $datetime_min);
CValue::setSession("_datetime_max", $datetime_max);
CValue::setSession("order_by", $order_by);
CValue::setSession("group_similar", $group_similar);
CValue::setSession("user_id", $user_id);
CValue::setSession("human", $human);
CValue::setSession("robot", $robot);
CView::enforceSlave();
$where = array();
$error_log = new CErrorLog();
$spec = $error_log->_spec;
$ds = $spec->ds;
if (($human || $robot) && !($human && $robot)) {
$tag = CMediusers::getTagSoftware();
$robots = array();
if ($tag) {
$query = "SELECT users.user_id\r\n FROM users\r\n LEFT JOIN id_sante400 ON users.user_id = id_sante400.object_id\r\n WHERE (id_sante400.object_class = 'CMediusers'\r\n AND id_sante400.tag = ?)\r\n OR users.dont_log_connection = '1'\r\n GROUP BY users.user_id";
$query = $ds->prepare($query, $tag);
} else {
$query = "SELECT users.user_id\r\n FROM users\r\n WHERE users.dont_log_connection = '1'";
}
$robots = $ds->loadColumn($query);
}
if ($human && !$robot) {
if (count($robots)) {
$where["user_id"] = $ds->prepareNotIn($robots);
}
}
if ($robot && !$human) {
示例2: CSpecCPAM
// 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);
$smarty->assign("banques", $banques);
$smarty->assign("object", $object);
$smarty->assign("profiles", $profiles);
$smarty->assign("functions", $functions);
$smarty->assign("disciplines", $disciplines);
$smarty->assign("spec_cpam", $spec_cpam);
$smarty->assign("tag_mediuser", CMediusers::getTagMediusers($group->_id));
$smarty->assign("is_admin", CAppUI::$user->isAdmin());
示例3: isRobot
/**
* Is the user a robot?
*
* @return bool
*/
function isRobot()
{
if (!$this->_id) {
return false;
}
$tag_software = CMediusers::getTagSoftware();
if (CModule::getActive("dPsante400") && $tag_software) {
if (CIdSante400::getMatch($this->_class, $tag_software, null, $this->_id)->_id != null) {
return true;
}
}
if (!$this->_ref_user || !$this->_ref_user->_id) {
$this->loadRefUser();
}
return $this->_ref_user->dont_log_connection;
}