本文整理汇总了PHP中UserUtil::getAllSubs方法的典型用法代码示例。如果您正苦于以下问题:PHP UserUtil::getAllSubs方法的具体用法?PHP UserUtil::getAllSubs怎么用?PHP UserUtil::getAllSubs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserUtil
的用法示例。
在下文中一共展示了UserUtil::getAllSubs方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadSetting
public function loadSetting()
{
$subUidArr = UserUtil::getAllSubs(Ibos::app()->user->uid, "", true);
if (0 < count($subUidArr)) {
return array("name" => "diary", "title" => "工作日志", "style" => "in-diary", "tab" => array(array("name" => "diaryPersonal", "title" => "个人", "icon" => "o-da-personal"), array("name" => "diaryAppraise", "title" => "评阅", "icon" => "o-da-appraise")));
} else {
return array("name" => "diary", "title" => "工作日志", "style" => "in-diary", "tab" => array(array("name" => "diaryPersonal", "title" => "个人", "icon" => "o-da-personal")));
}
}
示例2: getsubordinates
protected function getsubordinates()
{
if (Ibos::app()->request->isAjaxRequest) {
$uid = intval(EnvUtil::getRequest("uid"));
$getItem = EnvUtil::getRequest("item");
$item = empty($getItem) ? 5 : $getItem;
$users = UserUtil::getAllSubs($uid);
$subAlias = "application.modules.assignment.views.unfinished.subview";
$subView = $this->renderPartial($subAlias, array("users" => $users, "item" => $item, "uid" => $uid), true);
echo $subView;
}
}
示例3: handleUserListByPurv
private function handleUserListByPurv($list)
{
if (Ibos::app()->user->isadministrator) {
return $this->grantManagePermission($list, 1);
}
$uid = Ibos::app()->user->uid;
$curUser = User::model()->fetchByUid($uid);
$viewPurv = $this->getMaxPurv($uid, $curUser["positionid"], "organization/user/view");
$ret = array();
switch ($viewPurv) {
case 0:
break;
case 1:
foreach ($list as $user) {
if ($user["uid"] == $uid) {
$ret[] = $user;
break;
}
}
break;
case 2:
$subUids = UserUtil::getAllSubs($uid, "", true);
array_push($subUids, $uid);
$accordUid = array_unique($subUids);
foreach ($list as $user) {
if (in_array($user["uid"], $accordUid)) {
$ret[] = $user;
}
}
break;
case 4:
$branch = Department::model()->getBranchParent($curUser["deptid"]);
if (!empty($branch)) {
$childDeptIds = Department::model()->fetchChildIdByDeptids($branch["deptid"], true);
$accordUid = User::model()->fetchAllUidByDeptids($childDeptIds, false);
foreach ($list as $user) {
if (in_array($user["uid"], $accordUid)) {
$ret[] = $user;
}
}
} else {
$ret = $list;
}
break;
case 8:
$ret = $list;
break;
default:
break;
}
return $this->handleUserManage($ret);
}
示例4: getsubordinates
private function getsubordinates()
{
if (Ibos::app()->request->isAjaxRequest) {
$uid = $_GET["uid"];
$getItem = EnvUtil::getRequest("item");
$item = empty($getItem) ? 5 : $getItem;
$users = UserUtil::getAllSubs($uid);
if (EnvUtil::getRequest("act") == "stats") {
$theUrl = "report/stats/review";
} else {
$theUrl = "report/review/index";
}
$htmlStr = "<ul class=\"mng-trd-list\">";
$num = 0;
foreach ($users as $user) {
if ($num < $item) {
$htmlStr .= "<li class=\"mng-item\">\r\n <a href=\"" . Ibos::app()->urlManager->createUrl($theUrl, array("op" => "personal", "uid" => $user["uid"])) . "\">\r\n <img src=\"" . $user["avatar_middle"] . "\" alt=\"\">\r\n " . $user["realname"] . "\r\n </a>\r\n </li>";
$num++;
}
}
$subNums = count($users);
if ($item < $subNums) {
$htmlStr .= "<li class=\"mng-item view-all\" data-uid=\"" . $uid . "\">\r\n <a href=\"javascript:;\">\r\n <i class=\"o-da-allsub\"></i>\r\n " . Ibos::lang("View all subordinate") . "\r\n </a>\r\n </li>";
}
$htmlStr .= "</ul>";
echo $htmlStr;
}
}
示例5: getsubordinates
private function getsubordinates()
{
if (Ibos::app()->request->isAjaxRequest) {
$uid = $_GET["uid"];
$getItem = EnvUtil::getRequest("item");
$item = empty($getItem) ? 5 : $getItem;
$users = UserUtil::getAllSubs($uid);
$htmlStr = "<ul class=\"mng-trd-list\">";
$num = 0;
foreach ($users as $user) {
if ($num < $item) {
$htmlStr .= '<li class="mng-item sub">
<a href="' . $this->createUrl("schedule/subSchedule", array("uid" => $user["uid"])) . '">
<img src="' . $user["avatar_middle"] . '" alt="">' . $user["realname"] . '
<a href="' . $this->createUrl("schedule/subschedule", array("uid" => $user["uid"])) . '" class="o-cal-calendar pull-right mlm" title="日程"></a>
<a href="' . $this->createUrl("task/subtask", array("uid" => $user["uid"])) . '" class="o-cal-todo pull-right" title="任务"></a>
</a>
</li>';
//$htmlStr .= "<li class=\"mng-item sub\">\r\n <a href=\"" . $this->createUrl("schedule/subSchedule", array("uid" => $user["uid"])) . "\">\r\n <img src=\"" . $user["avatar_middle"] . "\" alt=\"\">\r\n " . $user["realname"] . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"" . $this->createUrl("schedule/subschedule", array("uid" => $user["uid"])) . "\" class=\"o-cal-calendar pull-right mlm\" title=\"日程\"></a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"" . $this->createUrl("task/subtask", array("uid" => $user["uid"])) . "\" class=\"o-cal-todo pull-right\" title=\"任务\"></a>\r\n </a>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n </li>";
}
$num++;
}
$subNums = count($users);
if ($item < $subNums) {
$htmlStr .= '<li class="mng-item view-all" data-uid="' . $uid . '" sub-nums="' . $subNums . '">
<a href="javascript:;">
<i class="o-cal-allsub"></i>' . Ibos::lang("View all subordinate") . '
</a>
</li>';
//$htmlStr .= "<li class=\"mng-item view-all\" data-uid=\"" . $uid . "\" sub-nums=\"" . $subNums . "\">\r\n <a href=\"javascript:;\">\r\n <i class=\"o-cal-allsub\"></i>\r\n " . Ibos::lang("View all subordinate") . "\r\n </a>\r\n </li>";
}
$htmlStr .= "</ul>";
echo $htmlStr;
}
}
示例6: getsubordinates
private function getsubordinates()
{
if (Ibos::app()->request->isAjaxRequest) {
$uid = $_GET["uid"];
$getItem = EnvUtil::getRequest("item");
$item = empty($getItem) ? 5 : $getItem;
$users = UserUtil::getAllSubs($uid);
if (EnvUtil::getRequest("act") == "stats") {
$theUrl = "diary/stats/review";
} else {
$theUrl = "diary/review/personal";
}
$htmlStr = "<ul class=\"mng-trd-list\">";
$num = 0;
foreach ($users as $user) {
if ($num < $item) {
//$htmlStr .= "<li class=\"mng-item\">\r\n <a href=\"" . Ibos::app()->urlManager->createUrl($theUrl, array("uid" => $user["uid"])) . "\">\r\n <img src=\"" . $user["avatar_middle"] . "\" alt=\"\">\r\n " . $user["realname"] . "\r\n </a>";
$htmlStr .= '<li class="mng-item">
<a href="' . Ibos::app()->urlManager->createUrl($theUrl, array("uid" => $user["uid"])) . '">
<img src="' . $user["avatar_middle"] . '" alt="">' . $user["realname"] . '</a>';
}
if (DiaryUtil::getIsAttention($user["uid"])) {
$htmlStr .= "<a href=\"javascript:;\" class=\"o-gudstar pull-right\" data-action=\"toggleAsteriskUnderling\" data-id=\"" . $user["uid"] . "\" data-param='{\"id\": \"" . $user["uid"] . "\"}'></a>";
} else {
$htmlStr .= "<a href=\"javascript:;\" class=\"o-udstar pull-right\" data-action=\"toggleAsteriskUnderling\" data-id=\"" . $user["uid"] . "\" data-param='{\"id\": \"" . $user["uid"] . "\"}'></a>";
}
$htmlStr .= "</li>";
$num++;
}
$subNums = count($users);
if ($item < $subNums) {
//$htmlStr .= "<li class=\"mng-item view-all\" data-uid=\"" . $uid . "\">\r\n <a href=\"javascript:;\">\r\n <i class=\"o-da-allsub\"></i>\r\n " . Ibos::lang("View all subordinate") . "\r\n </a>\r\n </li>";
$htmlStr .= '<li class="mng-item view-all" data-uid="' . $uid . '">
<a href="javascript:;"><i class="o-da-allsub"></i>' . Ibos::lang("View all subordinate") . '</a>
</li>';
}
$htmlStr .= "</ul>";
echo $htmlStr;
}
}
示例7: checkShowPurview
public static function checkShowPurview($uid, $author)
{
$flag = false;
if ($uid == $author) {
return true;
}
$subUidArr = UserUtil::getAllSubs($uid, "", true);
if (StringUtil::findIn($author, implode(",", $subUidArr))) {
$flag = true;
}
return $flag;
}