protected function getListPageSize() { $pageSize = MainUtil::getCookie("workflow_pagesize_" . $this->uid); if (is_null($pageSize)) { $pageSize = self::DEFAULT_PAGE_SIZE; } return $pageSize; }
protected function getListPageSize() { $pageSize = MainUtil::getCookie("workflow_pagesize_" . $this->getUid()); if (is_null($pageSize)) { $pageSize = FlowConst::DEF_PAGE_SIZE; } return $pageSize; }
public function init() { $account = Ibos::app()->setting->get("setting/account"); $this->account = $account; $isAutologin = MainUtil::getCookie("autologin"); if (!$isAutologin) { $this->authTimeout = (int) $account["timeout"] * 60; } parent::init(); }
public function actionCheckLogin() { $islogin = false; $isAutologin = MainUtil::getCookie("autologin"); $isGuest = Ibos::app()->user->isGuest; $expires = Ibos::app()->user->getState(ICUser::AUTH_TIMEOUT_VAR); if ($isAutologin) { $islogin = true; } else { if (!$isGuest && ($expires == null || time() < $expires)) { $islogin = true; } } $this->ajaxReturn(array("islogin" => $islogin)); }
private function search() { $type = EnvUtil::getRequest("type"); $conditionCookie = MainUtil::getCookie("condition"); if (empty($conditionCookie)) { MainUtil::setCookie("condition", $this->condition, 10 * 60); } if ($type == "advanced_search") { $this->condition = ArticleUtil::joinSearchCondition($_POST["search"], $this->condition); } elseif ($type == "normal_search") { $keyword = $_POST["keyword"]; $this->condition = " subject LIKE '%{$keyword}%' "; MainUtil::setCookie("keyword", $keyword, 10 * 60); } else { $this->condition = $conditionCookie; } if ($this->condition != MainUtil::getCookie("condition")) { MainUtil::setCookie("condition", $this->condition, 10 * 60); } }
protected function search() { $type = EnvUtil::getRequest("type"); $conditionCookie = MainUtil::getCookie("condition"); if (empty($conditionCookie)) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } if ($type == "advanced_search") { $search = $_POST["search"]; $this->_condition = ReportUtil::joinSearchCondition($search); } elseif ($type == "normal_search") { $keyword = $_POST["keyword"]; MainUtil::setCookie("keyword", $keyword, 10 * 60); $this->_condition = " ( content LIKE '%{$keyword}%' OR subject LIKE '%{$keyword}%' ) "; } else { $this->_condition = $conditionCookie; } if ($this->_condition != MainUtil::getCookie("condition")) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } }
public function actionSearch() { $type = EnvUtil::getRequest("type"); $conditionCookie = MainUtil::getCookie("condition"); if (empty($conditionCookie)) { MainUtil::setCookie("condition", $this->condition, 10 * 60); } if ($type == "advanced_search") { $search = $_POST["search"]; $methodName = "join" . ucfirst($this->id) . "SearchCondition"; $this->condition = RecruitUtil::$methodName($search, $this->condition); } elseif ($type == "normal_search") { $keyword = $_POST["keyword"]; $this->condition = " rd.realname LIKE '%{$keyword}%' "; } else { $this->condition = $conditionCookie; } if ($this->condition != MainUtil::getCookie("condition")) { MainUtil::setCookie("condition", $this->condition, 10 * 60); } $this->actionIndex(); }
private function search() { $conditionCookie = MainUtil::getCookie("condition"); if (empty($conditionCookie)) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } if (EnvUtil::getRequest("search")) { $keyword = EnvUtil::getRequest("keyword"); if (!empty($keyword)) { $this->_condition = " (`subject` LIKE '%{$keyword}%' "; $users = User::model()->fetchAll("`realname` LIKE '%{$keyword}%'"); if (!empty($users)) { $uids = ConvertUtil::getSubByKey($users, "uid"); $uidStr = implode(",", $uids); $this->_condition .= " OR FIND_IN_SET(`designeeuid`, '{$uidStr}') OR FIND_IN_SET( `chargeuid`, '{$uidStr}' ) "; foreach ($uids as $uid) { $this->_condition .= " OR FIND_IN_SET({$uid}, `participantuid`)"; } } $this->_condition .= ")"; } $daterange = EnvUtil::getRequest("daterange"); if (!empty($daterange)) { $time = explode(" - ", $daterange); $starttime = $time[0]; $endtime = $time[1]; $st = strtotime($starttime); $et = strtotime($endtime); $this->_condition = AssignmentUtil::joinCondition($this->_condition, "`starttime` >= {$st} AND `endtime` <= {$et}"); } MainUtil::setCookie("keyword", $keyword, 10 * 60); MainUtil::setCookie("daterange", $daterange, 10 * 60); } else { $this->_condition = $conditionCookie; } if ($this->_condition != MainUtil::getCookie("condition")) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } }
?> </span> </div> </div> </div> <div class="page-list"> <div class="page-list-header"> <form action="<?php echo $this->createUrl('share/index', array('op' => 'personal', 'param' => 'search', 'uid' => $user['uid'])); ?> " method="post"> <div class="search search-config pull-right span3"> <input type="text" name="keyword" placeholder="Search" id="mn_search" nofocus value="<?php if (EnvUtil::getRequest('param') == 'search') { echo MainUtil::getCookie('keyword'); } ?> "> <a href="javascript:;">search</a> <input type="hidden" name="type" value="normal_search"> </div> </form> </div> <div class="page-list-mainer"> <?php if (count($data) > 0) { ?> <ul class="da-list" id="da_list"> <?php foreach ($data as $diary) {
echo ENGINE; ?> " alt=""> </span> <span class="avatar-desc"><strong><?php echo $user['realname']; ?> </strong></span> </a> </li> <?php } ?> <li class="da-bell"> <?php if (MainUtil::getCookie('reminded_' . strtotime($date))) { ?> <a href="javascript:" class=""> <i class="o-da-reminded"></i> <span class="avatar-desc"><strong><?php echo $lang['Reminded']; ?> </strong></span> </a> <?php } else { ?> <a href="javascript:" class="avatar-box" data-action="remindUnderling"> <i class="o-da-bell"></i> <span class="avatar-desc"><strong><?php echo $lang['Remind to write log'];
echo $lang["Write report"]; ?> </a> <button class="btn" data-action="removeReportsFromList"><?php echo $lang["Delete"]; ?> </button> </div> <form action="<?php echo $this->createUrl("default/index", array("param" => "search")); ?> " method="post"> <div class="search search-config pull-right span3"> <input type="text" name="keyword" placeholder="Search" id="mn_search" nofocus value="<?php if (EnvUtil::getRequest("param") == "search") { echo MainUtil::getCookie("keyword"); } ?> "> <a href="javascript:;">search</a> <input type="hidden" name="type" value="normal_search"> </div> </form> </div> <?php if (0 < count($reportList)) { ?> <div class="page-list-mainer"> <ul class="rp-list" id="rp_list"> <?php foreach ($reportList as $k => $report) {
private function checkAccess() { if (isset($this->user["uid"]) && $this->user["uid"] == 0) { $this->_access = 0; } elseif ($this->_isAdministrator) { $lastactivity = MainUtil::getCookie("lastactivity"); $frozenTime = intval(TIMESTAMP - $lastactivity); if ($frozenTime < $this->_cookieLife) { $this->_access = 1; MainUtil::setCookie("lastactivity", TIMESTAMP); } else { $this->_access = -1; } } else { $this->_access = -1; } if ($this->_access == 1) { Ibos::app()->session->update(); } else { $requestUrl = Ibos::app()->getRequest()->getUrl(); $loginUrl = Ibos::app()->getUrlManager()->createUrl($this->loginUrl); if (strpos($requestUrl, $loginUrl) !== 0) { $this->userLogin(); } } }
public function actionPrint() { $expWord = EnvUtil::getRequest("word"); $expHtml = EnvUtil::getRequest("html"); $key = EnvUtil::getRequest("key"); if ($key) { $param = WfCommonUtil::param($key, "DECODE"); $flowid = isset($param["flowid"]) ? intval($param["flowid"]) : 0; $runid = isset($param["runid"]) ? intval($param["runid"]) : 0; $flowprocess = isset($param["flowprocess"]) ? intval($param["flowprocess"]) : 0; } $view = EnvUtil::getRequest("view"); if ($view) { MainUtil::setCookie("flowview", $view, TIMESTAMP + 60 * 60 * 24 * 3000); } else { $view = MainUtil::getCookie("flowview"); if (!$view) { $view = "1234"; } } $data = array("formview" => false, "attachview" => false, "signview" => false, "chartview" => false, "flowid" => $flowid, "runid" => $runid, "key" => $key); $this->checkRunAccess($runid); $flow = new ICFlowType(intval($flowid)); $process = new ICFlowProcess($flow->getID(), $flowprocess); $run = new ICFlowRun($runid); if (strstr($view, "1")) { $data["formview"] = true; $viewer = new ICFlowFormViewer(array("flow" => $flow, "form" => $flow->form, "run" => $run, "process" => $process)); $data = array_merge($data, array("runname" => $run->name, "script" => $flow->form->script, "css" => $flow->form->css), $viewer->render(false, true)); } if (strstr($view, "2")) { $data["attachview"] = true; if ($run->attachmentid !== "") { if ($flow->isFixed()) { if (FlowRunProcess::model()->getHasDownper($runid, $flowid, $this->uid)) { $down = 0; } else { $down = 1; } } else { $down = 1; } $data["prcscache"] = WfCommonUtil::loadProcessCache($flowid); $data["attachData"] = AttachUtil::getAttach($run->attachmentid, $down); } } if (strstr($view, "3")) { $data["signview"] = true; $data["feedback"] = WfHandleUtil::loadFeedback($flowid, $runid, $flow->type, $this->uid, true); } if (strstr($view, "4")) { $data["chartview"] = true; } if ($expHtml || $expWord) { $data["chartview"] = false; } $this->layout = ""; $this->setPageTitle(Ibos::lang("Print preview")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Workflow"), "url" => $this->createUrl("list/index")), array("name" => Ibos::lang("Print preview"), "url" => $this->createUrl("preview/print", array("key" => $key))))); $this->render("print", $data); }
$uid = UserBinding::model()->fetchUidByValue(StringUtil::filterCleanHtml($openId), "bqq"); if ($uid) { $checkCId = strcmp($imCfg["id"], $cid) == 0; $properties = array("company_id" => $cid, "company_token" => $imCfg["token"], "app_id" => $imCfg["appid"], "client_ip" => EnvUtil::getClientIp()); $api = new BQQApi($properties); $status = $api->getVerifyStatus(array("open_id" => $openId, "hashskey" => $hashskey)); if ($status["ret"] == 0) { $config = @(include PATH_ROOT . "/system/config/config.php"); if (empty($config)) { throw new Exception(Ibos::Lang("Config not found", "error")); } else { define("IN_MOBILE", EnvUtil::checkInMobile()); $global = array("clientip" => EnvUtil::getClientIp(), "config" => $config, "timestamp" => time()); Ibos::app()->setting->copyFrom($global); handleloadsyscache(); $saltkey = MainUtil::getCookie("saltkey"); if (empty($saltkey)) { $saltkey = StringUtil::random(8); MainUtil::setCookie("saltkey", $saltkey, 86400 * 30, 1, 1); } $curUser = User::model()->fetchByUid($uid); $identity = new ICUserIdentity($curUser["username"], $curUser["password"]); $identity->setId($uid); $identity->setPersistentStates($curUser); $ip = Ibos::app()->setting->get("clientip"); foreach ($_COOKIE as $k => $v) { $cookiePath = $config["cookie"]["cookiepath"]; $cookieDomain = $config["cookie"]["cookiedomain"]; $secure = $_SERVER["SERVER_PORT"] == 443 ? 1 : 0; @setcookie($k, "", time() - 86400, $cookiePath, $cookieDomain, $secure, false); }
private function search() { $uid = $this->uid; $complete = $this->complete; $type = EnvUtil::getRequest("type"); $conditionCookie = MainUtil::getCookie("condition"); if (empty($conditionCookie)) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } if ($type == "normal_search") { $keyword = EnvUtil::getRequest("keyword"); MainUtil::setCookie("keyword", $keyword, 10 * 60); $pTasks = Tasks::model()->fetchPTasks($uid, $complete, $keyword); $cTasks = Tasks::model()->fetchCTasks($uid, $complete, $keyword); $array = array(); foreach ($pTasks as $task) { $array[] = $task["id"]; } foreach ($cTasks as $task) { $array[] = $task["pid"]; } $pids = array_unique($array); $pidTemp = ""; foreach ($pids as $v) { $pidTemp .= "\"" . $v . "\","; } $pidStr = rtrim($pidTemp, ","); if (!empty($pidStr)) { $this->_condition = " uid='{$uid}' AND id IN({$pidStr}) AND allcomplete='{$complete}'"; } else { $this->_condition = " uid='{$uid}' AND id IN('') AND allcomplete='{$complete}'"; } } else { $this->_condition = $conditionCookie; } if ($this->_condition != MainUtil::getCookie("condition")) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } }
<!-- Template:常用菜单项模板 --> <script type="text/ibos-template" id="mu_item_tpl"> <li data-module="<%=mod%>"> <a href="<%=href%>" title="<%=desc%>"> <div class="posr"> <img width="64" height="64" class="mbs" src="<%=src%>"> <span class="bubble" data-bubble="<%=mod%>"></span> </div> <div class="cm-menu-title"><%=title%></div> </a> </li> </script> <script> Ibos.app.s({ "guideNextTime": <?php if (MainUtil::getCookie('guideNextTime') == md5(Ibos::app()->user->uid)) { echo 1; } else { echo 0; } ?> , "assetUrl": "<?php echo $assetUrl; ?> ", "refreshInterval": 10000 // @debug: 原本为 10000 }) </script> <script src='<?php echo STATICURL;
?> </div> <?php } else { ?> <!-- 空值 --> <div class="in-diary-appraise-empty <?php if (MainUtil::getCookie('reminded_' . strtotime(date('Y-m-d')))) { ?> o-da-reminded<?php } ?> "> <?php if (!MainUtil::getCookie('reminded_' . strtotime(date('Y-m-d')))) { ?> <a href="javascript:" class="da-bell" id="remind_underling"> <i class="o-da-bell"></i> </a> <?php } ?> </div> <?php } ?> </div> <div class="in-diary-right"> <div class="tray in-diary-tray xcbu mb"> <div class="fss xwb"><?php