?> > <img src="avatar.php?uid=<?php echo $aUser['uid']; ?> &size=middle&engine=<?php echo ENGINE; ?> " alt=""> <?php echo $aUser['realname']; ?> </a> <!-- if 未关注 --> <?php if (DiaryUtil::getIsAttention($aUser['uid'])) { ?> <a href="javascript:;" data-node-type="udstar" class="o-gudstar pull-right" data-action="toggleAsteriskUnderling" data-param='{"id": "<?php echo $aUser['uid']; ?> "}'></a> <?php } else { ?> <a href="javascript:;" data-node-type="udstar" class="o-udstar pull-right" data-action="toggleAsteriskUnderling" data-param='{"id": "<?php echo $aUser['uid']; ?> "}'></a> <?php } ?>
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; } }