当前位置: 首页>>代码示例>>PHP>>正文


PHP UserUtil::checkIsSub方法代码示例

本文整理汇总了PHP中UserUtil::checkIsSub方法的典型用法代码示例。如果您正苦于以下问题:PHP UserUtil::checkIsSub方法的具体用法?PHP UserUtil::checkIsSub怎么用?PHP UserUtil::checkIsSub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserUtil的用法示例。


在下文中一共展示了UserUtil::checkIsSub方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionSubList

 public function actionSubList()
 {
     if (EnvUtil::getRequest("op") == "getsubordinates") {
         $this->getsubordinates();
         exit;
     }
     $getUid = intval(EnvUtil::getRequest("uid"));
     if (!$getUid) {
         $deptArr = UserUtil::getManagerDeptSubUserByUid(Ibos::app()->user->uid);
         if (!empty($deptArr)) {
             $firstDept = reset($deptArr);
             $uid = $firstDept["user"][0]["uid"];
         } else {
             $this->error(IBos::lang("You do not subordinate"), $this->createUrl("schedule/index"));
         }
     } else {
         $uid = $getUid;
     }
     if (!UserUtil::checkIsSub(Ibos::app()->user->uid, $uid)) {
         $this->error(Ibos::lang("No permission to view schedule"), $this->createUrl("schedule/index"));
     }
     $params = $this->getUnfinishedDataByUid($uid);
     $this->setPageTitle(Ibos::lang("Assignment"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Assignment"), "url" => $this->createUrl("unfinished/index")), array("name" => Ibos::lang("Unfinished list"))));
     $this->render("sublist", $params);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:26,代码来源:UnfinishedController.php

示例2: actionSubSchedule

 public function actionSubSchedule()
 {
     $op = EnvUtil::getRequest("op");
     if ($op == "getsubordinates") {
         $this->getsubordinates();
     } elseif ($op == "list") {
         $this->getList();
     } else {
         $workTime = Ibos::app()->setting->get("setting/calendarworkingtime");
         $workingtime = explode(",", $workTime);
         $setting = array("worktimestart" => $workingtime[0], "worktimeend" => $workingtime[1], "allowAdd" => CalendarUtil::getIsAllowAdd(), "allowEdit" => CalendarUtil::getIsAllowEdit());
         $getUid = EnvUtil::getRequest("uid");
         if (!$getUid) {
             $deptArr = UserUtil::getManagerDeptSubUserByUid($this->uid);
             if (!empty($deptArr)) {
                 $firstDept = reset($deptArr);
                 $uid = $firstDept["user"][0]["uid"];
             } else {
                 $this->error(IBos::lang("You do not subordinate"), $this->createUrl("schedule/index"));
             }
         } else {
             $uid = $getUid;
         }
         if (!UserUtil::checkIsSub(Ibos::app()->user->uid, $uid)) {
             $this->error(Ibos::lang("No permission to view schedule"), $this->createUrl("schedule/index"));
         }
         $data = array("setting" => $setting, "user" => User::model()->fetchByUid($uid), "supUid" => UserUtil::getSupUid($this->uid));
         $this->setPageTitle(Ibos::lang("Subordinate schedule"));
         $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Calendar arrangement"), "url" => $this->createUrl("schedule/index")), array("name" => Ibos::lang("Subordinate schedule"))));
         $this->render("subschedule", $data);
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:32,代码来源:ScheduleController.php

示例3: checkPermission

 public static function checkPermission($report, $uid)
 {
     $toid = explode(",", $report["toid"]);
     if ($report["uid"] == $uid || in_array($uid, $toid) || UserUtil::checkIsSub($uid, $report["uid"])) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:9,代码来源:ICReport.php

示例4: checkIsSup

 protected function checkIsSup($assignment)
 {
     $uid = Ibos::app()->user->uid;
     $participantuid = explode(",", $assignment["participantuid"]);
     if (UserUtil::checkIsSub($uid, $assignment["designeeuid"])) {
         return true;
     }
     if (UserUtil::checkIsSub($uid, $assignment["chargeuid"])) {
         return true;
     }
     foreach ($participantuid as $puid) {
         if (UserUtil::checkIsSub($uid, $puid)) {
             return true;
         }
     }
     return false;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:17,代码来源:AssignmentBaseController.php

示例5: actionSubTask

 public function actionSubTask()
 {
     if (!UserUtil::checkIsSub(Ibos::app()->user->uid, $this->uid)) {
         $this->error(Ibos::lang("No permission to view task"), $this->createUrl("task/index"));
     }
     $postComp = EnvUtil::getRequest("complete");
     $this->complete = empty($postComp) ? 0 : $postComp;
     if (EnvUtil::getRequest("param") == "search") {
         $this->search();
     }
     $this->_condition = CalendarUtil::joinCondition($this->_condition, "uid = " . $this->uid);
     $data = Tasks::model()->fetchTaskByComplete($this->_condition, $this->complete);
     $data["complete"] = $this->complete;
     $data["user"] = User::model()->fetchByUid($this->uid);
     $data["supUid"] = UserUtil::getSupUid($this->uid);
     $data["allowEditTask"] = CalendarUtil::getIsAllowEidtTask();
     $this->setPageTitle(Ibos::lang("Subordinate task"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Calendar arrangement"), "url" => $this->createUrl("schedule/index")), array("name" => Ibos::lang("Subordinate task"))));
     $this->render("subtask", $data);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:20,代码来源:TaskController.php

示例6: personal

 private function personal()
 {
     $uid = Ibos::app()->user->uid;
     $typeid = EnvUtil::getRequest("typeid");
     $getUid = intval(EnvUtil::getRequest("uid"));
     $condition = "uid = '{$getUid}'";
     if (!UserUtil::checkIsSub($uid, $getUid)) {
         $condition .= " AND FIND_IN_SET('{$uid}', toid )";
     }
     if (!empty($typeid)) {
         $condition .= " AND typeid = '{$typeid}'";
     }
     if (EnvUtil::getRequest("param") == "search") {
         $this->search();
     }
     $this->_condition = ReportUtil::joinCondition($this->_condition, $condition);
     $paginationData = Report::model()->fetchAllByPage($this->_condition);
     $params = array("dashboardConfig" => Ibos::app()->setting->get("setting/reportconfig"), "typeid" => $typeid, "pagination" => $paginationData["pagination"], "reportList" => ICReport::handelListData($paginationData["data"]), "reportCount" => Report::model()->count("uid = '{$getUid}'"), "commentCount" => Report::model()->count("uid='{$getUid}' AND isreview=1"), "user" => User::model()->fetchByUid($getUid), "supUid" => UserUtil::getSupUid($getUid));
     $this->setPageTitle(Ibos::lang("Review subordinate report"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Work report"), "url" => $this->createUrl("default/index")), array("name" => Ibos::lang("Subordinate personal report"))));
     $this->render("personal", $params);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:22,代码来源:ReviewController.php

示例7: actionShow

 public function actionShow()
 {
     $diaryid = intval(EnvUtil::getRequest("diaryid"));
     $uid = Ibos::app()->user->uid;
     if (empty($diaryid)) {
         $this->error(Ibos::lang("Parameters error", "error"), $this->createUrl("share/index"));
     }
     $diary = Diary::model()->fetchByPk($diaryid);
     if (empty($diary)) {
         $this->error(Ibos::lang("No data found"), $this->createUrl("share/index"));
     }
     if (!ICDiary::checkScope($uid, $diary)) {
         $this->error(Ibos::lang("You do not have permission to view the log"), $this->createUrl("share/index"));
     }
     Diary::model()->addReaderuidByPK($diary, $uid);
     $data = Diary::model()->fetchDiaryRecord($diary);
     $params = array("diary" => ICDiary::processDefaultShowData($diary), "prevAndNextPK" => Diary::model()->fetchPrevAndNextPKByPK($diary["diaryid"]), "data" => $data);
     if (!empty($diary["attachmentid"])) {
         $params["attach"] = AttachUtil::getAttach($diary["attachmentid"], true, true, false, false, true);
         $params["count"] = 0;
     }
     $params["allowComment"] = $this->issetSharecomment() || UserUtil::checkIsSub($uid, $diary["uid"]) ? 1 : 0;
     if (!empty($diary["readeruid"])) {
         $readerArr = explode(",", $diary["readeruid"]);
         $params["readers"] = User::model()->fetchAllByPk($readerArr);
     } else {
         $params["readers"] = "";
     }
     if (!empty($diary["stamp"])) {
         $params["stampUrl"] = Stamp::model()->fetchStampById($diary["stamp"]);
     }
     $params["sharecomment"] = $this->issetSharecomment();
     $this->setPageTitle(Ibos::lang("Show share diary"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Work diary"), "url" => $this->createUrl("default/index")), array("name" => Ibos::lang("Show share diary"))));
     $this->render("show", $params);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:36,代码来源:ShareController.php

示例8: handleAuid

 private function handleAuid($uid, $attentionUids)
 {
     $aUids = is_array($attentionUids) ? $attentionUids : implode(",", $attentionUids);
     $ret["subUid"] = array();
     $ret["aUid"] = array();
     if (!empty($aUids)) {
         foreach ($aUids as $aUid) {
             if (UserUtil::checkIsSub($uid, $aUid)) {
                 $ret["subUid"][] = $aUid;
             } else {
                 $ret["aUid"][] = $aUid;
             }
         }
     }
     return $ret;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:16,代码来源:DiaryController.php

示例9: remind

 private function remind()
 {
     if (Ibos::app()->request->isAjaxRequest) {
         $date = EnvUtil::getRequest("date");
         $dateTime = strtotime($date);
         $getUids = trim(EnvUtil::getRequest("uids"), ",");
         $uidArr = explode(",", $getUids);
         $uid = Ibos::app()->user->uid;
         if (empty($uidArr)) {
             $this->ajaxReturn(array("isSuccess" => false, "msg" => Ibos::lang("No user to remind")));
         }
         foreach ($uidArr as $subUid) {
             if (!UserUtil::checkIsSub($uid, $subUid)) {
                 $this->ajaxReturn(array("isSuccess" => false, "msg" => Ibos::lang("No permission to remind")));
             }
         }
         $dashboardConfig = $this->getDiaryConfig();
         $config = array("{name}" => User::model()->fetchRealnameByUid($uid), "{title}" => Ibos::lang("Remind title", "", array("y" => date("Y", $dateTime), "m" => date("m", $dateTime), "d" => date("d", $dateTime))), "{content}" => $dashboardConfig["remindcontent"]);
         if (0 < count($uidArr)) {
             Notify::model()->sendNotify($uidArr, "diary_message", $config, $uid);
         }
         $todayTime = strtotime(date("Y-m-d"));
         MainUtil::setCookie("reminded_" . $dateTime, md5($dateTime), $todayTime + 24 * 60 * 60 - TIMESTAMP);
         $this->ajaxReturn(array("isSuccess" => true, "msg" => Ibos::lang("Remind succeed")));
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:26,代码来源:ReviewController.php

示例10: checkTaskPermission

 protected function checkTaskPermission()
 {
     if (!$this->checkIsMe() && (!UserUtil::checkIsSub(Ibos::app()->user->uid, $this->uid) || !CalendarUtil::getIsAllowEidtTask())) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:8,代码来源:CalendarBaseController.php

示例11: checkReviewScope

 public static function checkReviewScope($uid, $diary)
 {
     if (isset($diary["uid"]) && UserUtil::checkIsSub($uid, $diary["uid"])) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:8,代码来源:ICDiary.php

示例12: getIsAllowComment

 protected function getIsAllowComment($controller, $uid, $diary)
 {
     $ret = 0;
     if ($controller == "review") {
         $ret = 1;
     } else {
         if ($controller == "share" || $controller == "attention") {
             $ret = $this->issetSharecomment() || UserUtil::checkIsSub($uid, $diary["uid"]) ? 1 : 0;
         }
     }
     return $ret;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:12,代码来源:DiaryBaseController.php


注:本文中的UserUtil::checkIsSub方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。