Пример #1
0
 public final function __construct($attach, $module = "temp")
 {
     if (!is_array($attach) || empty($attach) || !$this->isUploadFile($attach["tmp_name"]) || trim($attach["name"]) == "" || $attach["size"] == 0) {
         $this->_attach = array();
         $this->_errorCode = -1;
         return false;
     } else {
         $attach["type"] = $this->checkDirType($module);
         $attach["size"] = intval($attach["size"]);
         $attach["name"] = trim($attach["name"]);
         $attach["thumb"] = "";
         $attach["ext"] = StringUtil::getFileExt($attach["name"]);
         $attach["name"] = StringUtil::ihtmlSpecialChars($attach["name"], ENT_QUOTES);
         if (90 < strlen($attach["name"])) {
             $attach["name"] = StringUtil::cutStr($attach["name"], 80, "") . "." . $attach["ext"];
         }
         $attach["isimage"] = $this->isImageExt($attach["ext"]);
         $attach["attachdir"] = $this->getTargetDir($attach["type"]);
         $attach["attachname"] = $this->getTargetFileName() . "." . $attach["ext"];
         $attach["attachment"] = $attach["attachdir"] . $attach["attachname"];
         $attach["target"] = FileUtil::getAttachUrl() . "/" . $attach["type"] . "/" . $attach["attachment"];
         $this->_attach =& $attach;
         $this->_errorCode = 0;
         return true;
     }
 }
Пример #2
0
 public function addDigg($feedId, $uid)
 {
     $data["feedid"] = $feedId;
     $data["uid"] = $uid;
     $data["uid"] = !$data["uid"] ? Ibos::app()->user->uid : $data["uid"];
     if (!$data["uid"]) {
         $this->addError("addDigg", "未登录不能赞");
         return false;
     }
     $isExit = $this->getIsExists($feedId, $uid);
     if ($isExit) {
         $this->addError("addDigg", "你已经赞过");
         return false;
     }
     $data["ctime"] = time();
     $res = $this->add($data);
     if ($res) {
         $feed = Source::getSourceInfo("feed", $feedId);
         Feed::model()->updateCounters(array("diggcount" => 1), "feedid = " . $feedId);
         Feed::model()->cleanCache($feedId);
         $user = User::model()->fetchByUid($uid);
         $config["{user}"] = $user["realname"];
         $config["{sourceContent}"] = StringUtil::filterCleanHtml($feed["source_body"]);
         $config["{sourceContent}"] = str_replace("◆", "", $config["{sourceContent}"]);
         $config["{sourceContent}"] = StringUtil::cutStr($config["{sourceContent}"], 34);
         $config["{url}"] = $feed["source_url"];
         $config["{content}"] = Ibos::app()->getController()->renderPartial("application.modules.message.views.remindcontent", array("recentFeeds" => Feed::model()->getRecentFeeds()), true);
         Notify::model()->sendNotify($feed["uid"], "message_digg", $config);
         UserUtil::updateCreditByAction("diggweibo", $uid);
         UserUtil::updateCreditByAction("diggedweibo", $feed["uid"]);
     }
     return $res;
 }
Пример #3
0
 public static function processListData($interviewList)
 {
     foreach ($interviewList as $k => $interview) {
         $interviewList[$k]["interviewtime"] = date("Y-m-d", $interview["interviewtime"]);
         $interviewList[$k]["interviewer"] = User::model()->fetchRealnameByUid($interview["interviewer"]);
         $interviewList[$k]["process"] = StringUtil::cutStr($interview["process"], 12);
         $interviewList[$k]["realname"] = ResumeDetail::model()->fetchRealnameByResumeId($interview["resumeid"]);
     }
     return $interviewList;
 }
Пример #4
0
 protected function getShowNames($uids)
 {
     $uids = is_array($uids) ? $uids : explode(",", $uids);
     $names = User::model()->fetchRealnamesByUids($uids);
     $nums = count($uids);
     if (4 <= $nums) {
         $show = StringUtil::cutStr($names, 30) . " 等{$nums人}";
     } else {
         $show = $names;
     }
     $ret = array("show" => $show, "title" => $names);
     return $ret;
 }
Пример #5
0
 private function loadNewSchedules()
 {
     $uid = Yii::app()->user->uid;
     $st = time();
     $schedules = Calendars::model()->fetchNewSchedule($uid, $st);
     if (!empty($schedules)) {
         foreach ($schedules as $k => $schedule) {
             $schedules[$k]["dateAndWeekDay"] = CalendarUtil::getDateAndWeekDay(date("Y-m-d", $schedule["starttime"]));
             $schedules[$k]["category"] = Calendars::model()->handleColor($schedule["category"]);
             $schedules[$k]["cutSubject"] = StringUtil::cutStr($schedule["subject"], 30);
         }
     }
     return $schedules;
 }
Пример #6
0
 public static function processListData($contactList)
 {
     foreach ($contactList as $k => $contact) {
         $contactList[$k]["realname"] = ResumeDetail::model()->fetchRealnameByResumeid($contact["resumeid"]);
         $contactList[$k]["inputtime"] = date("Y-m-d", $contact["inputtime"]);
         $contactList[$k]["detail"] = StringUtil::cutStr($contact["detail"], 12);
         if ($contactList[$k]["input"]) {
             $contactList[$k]["input"] = User::model()->fetchRealnameByUid($contact["input"]);
         } else {
             $contactList[$k]["input"] = "";
         }
     }
     return $contactList;
 }
Пример #7
0
 public static function getView($view)
 {
     $currentController = Yii::app()->getController();
     $basePath = "application.modules.vote.views.default.";
     $relatedModule = Ibos::getCurrentModuleName();
     $relatedId = EnvUtil::getRequest($relatedModule . "id");
     if ($view == "articleView") {
         $voteData = Vote::model()->fetchVote($relatedModule, $relatedId);
         $votes = VoteUtil::processVoteData($voteData);
         if (!empty($votes)) {
             $voteItemList = $votes["voteItemList"];
             $voteType = $voteItemList[0]["type"];
             if ($voteType == 1) {
                 $view = "articleTextView";
             } elseif ($voteType == 2) {
                 $view = "articleImageView";
             }
             $selectView = $basePath . $view;
             $votePeopleNumber = Vote::model()->fetchUserVoteCount($relatedModule, $relatedId);
             $userHasVote = VoteUtil::checkVote($relatedModule, $relatedId);
             $mothedName = "get" . ucfirst($relatedModule) . "Vote";
             $voteStatus = ICVotePlugManager::$mothedName()->getStatus($relatedModule, $relatedId, $votes["vote"]);
             $votes["vote"]["subject"] = StringUtil::cutStr($votes["vote"]["subject"], 60);
             $data = array("voteData" => $votes, "votePeopleNumber" => $votePeopleNumber, "userHasVote" => $userHasVote, "voteStatus" => $voteStatus, "attachUrl" => Yii::app()->setting->get("setting/attachurl"));
             if ($voteStatus == 2) {
                 $partView = null;
             } else {
                 $partView = $currentController->renderPartial($selectView, $data, true);
             }
         } else {
             $partView = null;
         }
     } elseif ($view == "articleAdd") {
         $selectView = $basePath . $view;
         $partView = $currentController->renderPartial($selectView, array("uploadConfig" => AttachUtil::getUploadConfig()), true);
     } elseif ($view == "articleEdit") {
         $selectView = $basePath . $view;
         $voteData = Vote::model()->fetchVote($relatedModule, $relatedId);
         if (!empty($voteData) && isset($voteData["voteItemList"])) {
             foreach ($voteData["voteItemList"] as $k => $voteItem) {
                 $voteData["voteItemList"][$k]["thumburl"] = FileUtil::fileName($voteItem["picpath"]);
             }
         }
         $data = array("voteData" => $voteData, "uploadConfig" => AttachUtil::getUploadConfig());
         $partView = $currentController->renderPartial($selectView, $data, true);
     }
     return $partView;
 }
Пример #8
0
 public static function processShareListData($uid, $data)
 {
     $result = array();
     $attentions = DiaryAttention::model()->fetchAllByAttributes(array("uid" => $uid));
     $auidArr = ConvertUtil::getSubByKey($attentions, "auid");
     foreach ($data as $diary) {
         $diary["content"] = StringUtil::cutStr(strip_tags($diary["content"]), 255);
         $diary["realname"] = User::model()->fetchRealnameByUid($diary["uid"]);
         $diary["addtime"] = ConvertUtil::formatDate($diary["addtime"], "u");
         $isattention = in_array($diary["uid"], $auidArr);
         $diary["isattention"] = $isattention ? 1 : 0;
         $diary["user"] = User::model()->fetchByUid($diary["uid"]);
         $result[] = $diary;
     }
     return $result;
 }
Пример #9
0
 private function update()
 {
     if (Yii::app()->request->isAjaxRequest) {
         $contactid = EnvUtil::getRequest("contactid");
         $data = ICResumeContact::processAddOrEditData($_POST);
         $modifySuccess = ResumeContact::model()->modify($contactid, $data);
         if ($modifySuccess) {
             $contact = ResumeContact::model()->fetchByPk($contactid);
             $contact["inputtime"] = date("Y-m-d", $contact["inputtime"]);
             $contact["input"] = User::model()->fetchRealnameByUid($contact["input"]);
             $contact["fullname"] = ResumeDetail::model()->fetchRealnameByResumeid($contact["resumeid"]);
             $contact["detail"] = StringUtil::cutStr($contact["detail"], 12);
             $this->ajaxReturn($contact);
         } else {
             $this->ajaxReturn(array("isSuccess" => 0));
         }
     }
 }
Пример #10
0
 private function update()
 {
     if (Yii::app()->request->isAjaxRequest) {
         $interviewid = EnvUtil::getRequest("interviewid");
         $data = ICRecruitInterview::processAddOrEditData($_POST);
         $modifySuccess = ResumeInterview::model()->modify($interviewid, $data);
         if ($modifySuccess) {
             $interview = ResumeInterview::model()->fetchByPk($interviewid);
             $interview["fullname"] = ResumeDetail::model()->fetchRealnameByResumeid($interview["resumeid"]);
             $interview["interviewtime"] = date("Y-m-d", $interview["interviewtime"]);
             $interview["interviewer"] = User::model()->fetchRealnameByUid($interview["interviewer"]);
             $interview["process"] = StringUtil::cutStr($interview["process"], 12);
             $this->ajaxReturn($interview);
         } else {
             $this->ajaxReturn(array("isSuccess" => 0));
         }
     }
 }
Пример #11
0
 public static function handelListData($reports)
 {
     $return = array();
     foreach ($reports as $report) {
         $report["cutSubject"] = StringUtil::cutStr(strip_tags($report["subject"]), 60);
         $report["user"] = User::model()->fetchByUid($report["uid"]);
         $readeruid = $report["readeruid"];
         $report["readercount"] = empty($readeruid) ? 0 : count(explode(",", trim($readeruid, ",")));
         $report["content"] = StringUtil::cutStr(strip_tags($report["content"]), 255);
         $report["addtime"] = ConvertUtil::formatDate($report["addtime"], "u");
         if ($report["stamp"] != 0) {
             $path = Stamp::model()->fetchIconById($report["stamp"]);
             $report["stampPath"] = FileUtil::fileName(Stamp::STAMP_PATH . $path);
         }
         $return[] = $report;
     }
     return $return;
 }
Пример #12
0
 public static function getListData($datas, $uid)
 {
     $listDatas = array();
     $checkTime = 3 * 86400;
     $readArtIds = ArticleReader::model()->fetchReadArtIdsByUid($uid);
     foreach ($datas as $data) {
         $data["subject"] = StringUtil::cutStr($data["subject"], 50);
         $data["readStatus"] = in_array($data["articleid"], $readArtIds) ? 1 : -1;
         if ($data["readStatus"] === -1 && TIMESTAMP - $checkTime < $data["uptime"]) {
             $data["readStatus"] = 2;
         }
         $data["author"] = User::model()->fetchRealnameByUid($data["author"]);
         if (empty($data["uptime"])) {
             $data["uptime"] = $data["addtime"];
         }
         $data["uptime"] = ConvertUtil::formatDate($data["uptime"], "u");
         $keyword = EnvUtil::getRequest("keyword");
         if (!empty($keyword)) {
             $data["subject"] = preg_replace("|({$keyword})|i", "<span style='color:red'>\$1</span>", $data["subject"]);
         }
         if ($data["ishighlight"] == "1") {
             $highLightStyle = $data["highlightstyle"];
             $hiddenInput = "<input type='hidden' id='{$data["articleid"]}_hlstyle' value='{$highLightStyle}'/>";
             $data["subject"] .= $hiddenInput;
             $highLightStyleArr = explode(",", $highLightStyle);
             $color = $highLightStyleArr[1];
             $isB = $highLightStyleArr[0];
             $isI = $highLightStyleArr[2];
             $isU = $highLightStyleArr[3];
             $isB && ($data["subject"] = "<b>{$data["subject"]}</b>");
             $isU && ($data["subject"] = "<u>{$data["subject"]}</u>");
             $fontStyle = "";
             $color != "" && ($fontStyle .= "color:{$color};");
             $isI && ($fontStyle .= "font-style:italic;");
             $fontStyle != "" && ($data["subject"] = "<font style='{$fontStyle}'>{$data["subject"]}</font>");
         }
         $listDatas[] = $data;
     }
     return $listDatas;
 }
Пример #13
0
 private function handleLoops($loops)
 {
     if (!empty($loops)) {
         foreach ($loops as $k => $v) {
             $loops[$k]["subject"] = StringUtil::cutStr($v["subject"], 12);
             $loops[$k]["uptime"] = date("Y-m-d H:i", $v["uptime"]);
             $time = date("H:i", $v["starttime"]) . "至" . date("H:i", $v["endtime"]);
             switch ($v["recurringtype"]) {
                 case "week":
                     $recurringtime = CalendarUtil::digitalToDay($v["recurringtime"]);
                     $loops[$k]["cycle"] = "每周" . $recurringtime . " " . $time;
                     break;
                 case "month":
                     $loops[$k]["cycle"] = "每月" . $v["recurringtime"] . "号 " . $time;
                     break;
                 case "year":
                     $monthDay = explode("-", $v["recurringtime"]);
                     $loops[$k]["cycle"] = "每年" . $monthDay[0] . "月" . $monthDay[1] . "号 " . $time;
                     break;
             }
         }
     }
     return $loops;
 }
Пример #14
0
 public function getList($type = 1, $catid = 0, $search = "")
 {
     $gUid = Ibos::app()->user->uid;
     $childCatIds = "";
     if (!empty($catid)) {
         $this->catid = $catid;
         $childCatIds = ArticleCategory::model()->fetchCatidByPid($this->catid, true);
     }
     if (!empty($search)) {
         $this->condition = "subject like '%{$search}%'";
     }
     $articleidArr = ArticleReader::model()->fetchArticleidsByUid(Ibos::app()->user->uid);
     $this->condition = ArticleUtil::joinListCondition($type, $articleidArr, $childCatIds, $this->condition);
     $datas = Article::model()->fetchAllAndPage($this->condition);
     $listData = $datas["datas"];
     foreach ($listData as $key => $value) {
         $value["content"] = StringUtil::cutStr(strip_tags($value["content"]), 30);
         $listData[$key] = array_filter($value);
         $listData[$key]["readstatus"] = ArticleReader::model()->checkIsRead($value["articleid"], $gUid);
     }
     $return["datas"] = $listData;
     $return["pages"] = array("pageCount" => $datas["pages"]->getPageCount(), "page" => $datas["pages"]->getCurrentPage(), "pageSize" => $datas["pages"]->getPageSize());
     return $return;
 }
Пример #15
0
    foreach ($history as $log) {
        ?>
    
									<?php 
        $row = json_decode($log["message"], true);
        ?>
    
									<tr>
										<td>
											<?php 
        echo ConvertUtil::formatDate($log["logtime"], "u");
        ?>
</td>
										<td>
											<?php 
        echo StringUtil::cutStr(!empty($row["address"]) ? $row["address"] : ConvertUtil::convertIp($row["ip"]), 7);
        ?>
</td>
										<td>
											<?php 
        echo $row["ip"];
        ?>
</td>
										<td>
											<?php 
        echo $terminal[$row["terminal"]];
        ?>
</td>
									</tr>
								<?php 
    }
Пример #16
0
 private function save()
 {
     if (EnvUtil::submitCheck("formhash")) {
         $postData = $_POST;
         $uid = Ibos::app()->user->uid;
         $postData["uid"] = $uid;
         $postData["subject"] = StringUtil::filterCleanHtml($_POST["subject"]);
         $toidArr = StringUtil::getId($postData["toid"]);
         $postData["toid"] = implode(",", $toidArr);
         $postData["begindate"] = strtotime($postData["begindate"]);
         $postData["enddate"] = strtotime($postData["enddate"]);
         $reportData = ICReport::handleSaveData($postData);
         $repid = Report::model()->add($reportData, true);
         if ($repid) {
             if (!empty($postData["attachmentid"])) {
                 AttachUtil::updateAttach($postData["attachmentid"]);
             }
             $orgPlan = $outSidePlan = array();
             if (array_key_exists("orgPlan", $_POST)) {
                 $orgPlan = $_POST["orgPlan"];
             }
             if (!empty($orgPlan)) {
                 foreach ($orgPlan as $recordid => $val) {
                     $updateData = array("process" => intval($val["process"]), "exedetail" => StringUtil::filterCleanHtml($val["exedetail"]));
                     if ($updateData["process"] == self::COMPLETE_FALG) {
                         $updateData["flag"] = 1;
                     }
                     ReportRecord::model()->modify($recordid, $updateData);
                 }
             }
             if (array_key_exists("outSidePlan", $_POST)) {
                 $outSidePlan = array_filter($_POST["outSidePlan"], create_function("\$v", "return !empty(\$v[\"content\"]);"));
             }
             if (!empty($outSidePlan)) {
                 ReportRecord::model()->addPlans($outSidePlan, $repid, $postData["begindate"], $postData["enddate"], $uid, 1);
             }
             $nextPlan = array_filter($_POST["nextPlan"], create_function("\$v", "return !empty(\$v[\"content\"]);"));
             ReportRecord::model()->addPlans($nextPlan, $repid, strtotime($_POST["planBegindate"]), strtotime($_POST["planEnddate"]), $uid, 2);
             $wbconf = WbCommonUtil::getSetting(true);
             if (isset($wbconf["wbmovement"]["report"]) && $wbconf["wbmovement"]["report"] == 1) {
                 $userid = $postData["toid"];
                 $supUid = UserUtil::getSupUid($uid);
                 if (0 < intval($supUid) && !in_array($supUid, explode(",", $userid))) {
                     $userid = $userid . "," . $supUid;
                 }
                 $data = array("title" => Ibos::lang("Feed title", "", array("{subject}" => $postData["subject"], "{url}" => Ibos::app()->urlManager->createUrl("report/review/show", array("repid" => $repid)))), "body" => StringUtil::cutStr($_POST["content"], 140), "actdesc" => Ibos::lang("Post report"), "userid" => trim($userid, ","), "deptid" => "", "positionid" => "");
                 WbfeedUtil::pushFeed($uid, "report", "report", $repid, $data);
             }
             UserUtil::updateCreditByAction("addreport", $uid);
             if (!empty($toidArr)) {
                 $config = array("{sender}" => User::model()->fetchRealnameByUid($uid), "{subject}" => $reportData["subject"], "{url}" => Ibos::app()->urlManager->createUrl("report/review/show", array("repid" => $repid)));
                 Notify::model()->sendNotify($toidArr, "report_message", $config, $uid);
             }
             $this->success(Ibos::lang("Save succeed", "message"), $this->createUrl("default/index"));
         } else {
             $this->error(Ibos::lang("Save faild", "message"), $this->createUrl("default/index"));
         }
     }
 }
Пример #17
0
					<a href="<?php 
    echo $licenseUrl;
    ?>
" class="o-anchor" target="_blank">立即申请授权码</a>
				</div>
<?php 
} else {
    ?>
				<div class="license licensed" data-click="showAuthInfo">
					<span>授权企业:</span>
					<!-- 公司全称 -->
					<strong title="<?php 
    echo LICENCE_FULLNAME;
    ?>
"><?php 
    echo StringUtil::cutStr(LICENCE_FULLNAME, 30);
    ?>
</strong>
					&nbsp;
					<span><?php 
    echo $lang['The number of users'];
    ?>
</span>
					<em><?php 
    echo LICENCE_LIMIT;
    ?>
</em>
					<?php 
    if (LICENCE_VER == 'Standard') {
        ?>
						<span class="label pull-right"><?php 
Пример #18
0
    echo $value['id'];
    ?>
]" type="text" value="<?php 
    echo $value['sort'];
    ?>
" /></td>
										<td><?php 
    echo $value['author'];
    ?>
</td>
										<td><?php 
    echo $value['subject'];
    ?>
</td>
										<td><?php 
    echo StringUtil::cutStr($value['message'], 50);
    ?>
</td>
										<td><?php 
    echo $typeDesc[$value['type']];
    ?>
</td>
										<td><?php 
    echo date('Y-m-d H:i', $value['starttime']);
    ?>
</td>
										<td><?php 
    echo date('Y-m-d H:i', $value['endtime']);
    ?>
</td>
										<td>
Пример #19
0
								<input type="checkbox" name="id[]" value="<?php 
        echo $run["runid"];
        ?>
"/>
							</label>
						</td>
						<td>
							<div class="com-list-name">
								<em class="text-nowrap"><a class="xcm" title="<?php 
        echo $run["runName"];
        ?>
" href="<?php 
        echo Ibos::app()->createUrl("workflow/preview/print", array("key" => $run["key"]));
        ?>
" target="_blank"><?php 
        echo StringUtil::cutStr($run["runName"], 50);
        ?>
</a></em>
								<span class="fss tcm posa">[<?php 
        echo $run["runid"];
        ?>
]<?php 
        echo $run["typeName"];
        ?>
</span>
							</div>
						</td>
						<td>
							<span class="fss"><?php 
        echo $run["user"]["realname"];
        ?>
Пример #20
0
 private function addMessageList($data, $fromUid)
 {
     if (!$data["content"] || !is_array($data["users"]) || !$fromUid) {
         return false;
     }
     $list["fromuid"] = $fromUid;
     $list["title"] = isset($data["title"]) ? StringUtil::filterCleanHtml($data["title"]) : StringUtil::filterCleanHtml(StringUtil::cutStr($data["content"], 20));
     $list["usernum"] = count($data["users"]);
     $list["type"] = is_numeric($data["type"]) ? $data["type"] : (2 == $list["usernum"] ? 1 : 2);
     $list["minmax"] = $this->getUidMinMax($data["users"]);
     $list["mtime"] = $data["mtime"];
     $list["lastmessage"] = serialize(array("fromuid" => $fromUid, "content" => StringUtil::filterDangerTag($data["content"])));
     $listRec = MessageList::model()->findByAttributes(array("type" => $list["type"], "minmax" => $list["minmax"]));
     $listId = !empty($listRec) ? $listRec["listid"] : null;
     if ($list["type"] == 1 && $listId) {
         $_list["usernum"] = $list["usernum"];
         $_list["lastmessage"] = $list["lastmessage"];
         $saved = MessageList::model()->updateAll($_list, "`type` = :type AND `minmax` = :minmax AND `listid`=:listid", array(":type" => $list["type"], ":minmax" => $list["minmax"], ":listid" => $listId));
         if (!$saved) {
             $listId = false;
         }
     } else {
         $listId = MessageList::model()->add($list, true);
     }
     return $listId;
 }
Пример #21
0
 public static function getListDatas($datas)
 {
     $listDatas = array();
     $users = Ibos::app()->setting->get("cache/users");
     $uid = Ibos::app()->user->uid;
     $checkTime = 3 * 86400;
     $readDocIds = OfficialdocReader::model()->fetchReadArtIdsByUid($uid);
     $signedDocIds = OfficialdocReader::model()->fetchSignArtIdsByUid($uid);
     foreach ($datas as $data) {
         $data["subject"] = StringUtil::cutStr($data["subject"], 50);
         $data["readStatus"] = in_array($data["docid"], $readDocIds) ? 1 : -1;
         if ($data["readStatus"] === -1 && TIMESTAMP - $checkTime < $data["uptime"]) {
             $data["readStatus"] = 2;
         }
         $data["signNum"] = OfficialdocReader::model()->count("issign = 1 AND docid = {$data["docid"]}");
         $data["signStatus"] = in_array($data["docid"], $signedDocIds) ? 1 : 0;
         $data["author"] = isset($users[$data["author"]]) ? $users[$data["author"]]["realname"] : "";
         $data["uptime"] = empty($data["uptime"]) ? $data["addtime"] : $data["uptime"];
         $data["uptime"] = ConvertUtil::formatDate($data["uptime"], "u");
         $keyword = EnvUtil::getRequest("keyword");
         if (!empty($keyword)) {
             $data["subject"] = preg_replace("|({$keyword})|i", "<span style='color:red'>\$1</span>", $data["subject"]);
         }
         if ($data["ishighlight"] == "1") {
             $highLightStyle = $data["highlightstyle"];
             $hiddenInput = "<input type='hidden' id='{$data["docid"]}_hlstyle' value='{$highLightStyle}'/>";
             $data["subject"] .= $hiddenInput;
             $highLightStyleArr = explode(",", $highLightStyle);
             $color = $highLightStyleArr[1];
             $isB = $highLightStyleArr[0];
             $isI = $highLightStyleArr[2];
             $isU = $highLightStyleArr[3];
             $isB && ($data["subject"] = "<b>{$data["subject"]}</b>");
             $isU && ($data["subject"] = "<u>{$data["subject"]}</u>");
             $fontStyle = "";
             $color != "" && ($fontStyle .= "color:{$color};");
             $isI && ($fontStyle .= "font-style:italic;");
             $fontStyle != "" && ($data["subject"] = "<font style='{$fontStyle}'>{$data["subject"]}</font>");
         }
         $listDatas[] = $data;
     }
     return $listDatas;
 }
Пример #22
0
            ?>
											<strong><?php 
            echo $row['lastmessage']['user']['realname'];
            ?>
</strong> <?php 
            echo $lang['To'], $lang['Me'], $lang['Say'];
            ?>
											<?php 
        }
        ?>
											<!-- 单行,过长时截断字符 -->
											<a href="<?php 
        echo $this->createUrl('pm/detail', array('id' => $row['listid'], 'type' => $row['type']));
        ?>
" class="xcm"><?php 
        echo StringUtil::parseHtml(StringUtil::cutStr($row['lastmessage']['content'], 100));
        ?>
</a>
										</p>
										<div>
											<div class="pull-left">
												<label class="checkbox checkbox-inline mbz">
													<input type="checkbox" value="<?php 
        echo $row['listid'];
        ?>
" name="pm">
												</label>
												<span class="tcm fss"><?php 
        echo ConvertUtil::formatDate($row['listctime'], 'u');
        ?>
</span>
Пример #23
0
        echo $followState['user']['realname'];
        ?>
</strong><?php 
        if (!empty($followState['user']['posname'])) {
            ?>
<span>&nbsp;·&nbsp;</span><span><?php 
            echo $followState['user']['posname'];
            ?>
</span><?php 
        }
        ?>
					</div>
					<div class="wb-fans-from">
						<?php 
        if (!empty($followState['user']['bio'])) {
            echo StringUtil::cutStr($followState['user']['bio'], 20);
        } else {
            ?>
TA什么都没有写<?php 
        }
        ?>
					</div>
				</div>
				<div class="rdb wbc-box2">
					<span class="wb-cb followedboth">
						<?php 
        if (!$followState['following']) {
            ?>
							<a href="javascript:;" class="btn btn-small btn-warning" data-action="follow" data-param='{"fid": <?php 
            echo $followState['user']['uid'];
            ?>
Пример #24
0
					</td>
					<td>
						<a title="<?php 
        echo $email['subject'];
        ?>
" href="<?php 
        echo Yii::app()->urlManager->createUrl('email/content/show', array('id' => $email['emailid']));
        ?>
" <?php 
        if (!$email['isread']) {
            ?>
class="xwb"<?php 
        }
        ?>
><?php 
        echo StringUtil::cutStr($email['subject'], 25);
        ?>
</a>
					</td>
					<td width="80">
						<span class="<?php 
        if (!$email['isread']) {
            ?>
xwb<?php 
        }
        ?>
 fss"><?php 
        echo $email['realname'];
        ?>
</span>
					</td>
Пример #25
0
echo $email['fromName'];
?>
 <?php 
echo $lang['At'];
?>
 <?php 
echo $email['dateTime'];
?>
 ( <?php 
echo $lang['Week'] . $weekDay;
?>
 ) <?php 
echo $lang['Send to'];
?>
 <?php 
echo StringUtil::cutStr(implode('、', $allUsers), 45);
?>
 <?php 
if (count($allUsers) > 1) {
    echo $lang['Such as'];
    echo count($allUsers);
    echo $lang['People'];
}
?>
。
						</p>
						<div id="mal_info_detail" style="display:none;">
							<div><?php 
echo $lang['Sender'];
?>
:<?php 
Пример #26
0
            echo $row['ip'];
            ?>
</td>
                                                <td><?php 
            echo date('y-n-j H:i', $value['logtime']);
            ?>
</td>
                                                <td><?php 
            echo $actionDesc;
            ?>
</td>
                                                <td><span title="<?php 
            echo $row['param'];
            ?>
"><?php 
            echo StringUtil::cutStr($row['param'], 100);
            ?>
</span></td>
                                            </tr>
                                        <?php 
        }
        ?>
                                        <?php 
        break;
    case 'illegal':
        ?>
        <?php 
        foreach ($log as $key => $value) {
            ?>
            <?php 
            $row = json_decode($value['message'], true);
Пример #27
0
 private function getcommentlist()
 {
     if (Ibos::app()->request->isAjaxRequest) {
         $diaryid = EnvUtil::getRequest("diaryid");
         $records = Comment::model()->fetchAll(array("select" => array("uid", "content", "ctime"), "condition" => "module=:module AND `table`=:table AND rowid=:rowid AND isdel=:isdel ORDER BY ctime DESC LIMIT 0,5", "params" => array(":module" => "diary", ":table" => "diary", ":rowid" => $diaryid, ":isdel" => 0)));
         $htmlStr = "<div class=\"pop-comment\"><ul class=\"pop-comment-list\">";
         if (!empty($records)) {
             foreach ($records as $record) {
                 $record["realname"] = User::model()->fetchRealnameByUid($record["uid"]);
                 $content = StringUtil::cutStr($record["content"], 45);
                 //$htmlStr .= "<li class=\"media\">\n\t\t\t\t\t\t\t\t\t<a href=\"" . Ibos::app()->createUrl("user/home/index", array("uid" => $record["uid"])) . "\" class=\"pop-comment-avatar pull-left\">\n\t\t\t\t\t\t\t\t\t\t<img src=\"avatar.php?uid=" . $record["uid"] . "&size=small&engine=" . ENGINE . "\" title=\"" . $record["realname"] . "\" class=\"img-rounded\"/>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t<div class=\"media-body\">\n\t\t\t\t\t\t\t\t\t\t<p class=\"pop-comment-body\"><em>" . $record["realname"] . ": </em>" . $content . "</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</li>";
                 $htmlStr .= '<li class="media">
                                 <a href="' . Ibos::app()->createUrl("user/home/index", array("uid" => $record["uid"])) . '" class="pop-comment-avatar pull-left">
                                     <img src="avatar.php?uid=' . $record["uid"] . '&size=small&engine=' . ENGINE . '" title="' . $record["realname"] . '" class="img-rounded"/>
                                 </a>
                                 <div class="media-body">
                                     <p class="pop-comment-body"><em>' . $record["realname"] . ': </em>' . $content . '</p>
                                 </div>
                             </li>';
             }
         } else {
             $htmlStr .= '<li align="middle">' . Ibos::lang("Has not comment") . '</li>';
         }
         $htmlStr .= "</ul></div>";
         echo $htmlStr;
     }
 }
Пример #28
0
				<a data-toggle="usercard" data-param="uid=<?php 
        echo $user['uid'];
        ?>
" href="<?php 
        echo $user['space_url'];
        ?>
" title="<?php 
        echo $user['realname'];
        ?>
">
					<span class="avatar-circle">
						<img src="<?php 
        echo $user['avatar_middle'];
        ?>
" alt="<?php 
        echo $user['realname'];
        ?>
" />
					</span>
					<p><?php 
        echo StringUtil::cutStr($user['realname'], 10);
        ?>
</p>
				</a>
			</li>
		<?php 
    }
    ?>
	</ul>
<?php 
}
Пример #29
0
								<?php 
        }
        ?>
							<?php 
    }
    ?>
						</div>
					<?php 
}
?>
					<!-- Nav end -->
					<div class="usi">
						<div class="btn-group">
							<a href="javascript:;" data-toggle="dropdown" id="user_login_ctrl">
								<?php 
echo StringUtil::cutStr(Ibos::app()->user->realname, 6);
?>
								<i class="caret caret-small"></i>
							</a>
						</div>
						<a href="<?php 
echo Ibos::app()->createUrl('message/mention/index');
?>
" class="cbtn o-message"><?php 
echo Ibos::lang('Message', 'default');
?>
</a>
					</div>
					<div class="posr">
						<div id="message_container" class="reminder" style="display: none;">
							<a href="javascript:void(0)" onclick="Ibosapp.dropnotify.hide()" class="o-close-small"></a>
Пример #30
0
</span>
							<a href="<?php 
        echo Yii::app()->urlManager->createUrl('article/default/index', array('op' => 'show', 'articleid' => $article['articleid']));
        ?>
" class="title xcm"><?php 
        echo $article['subject'];
        ?>
</a>
							<?php 
        if ($index == 0) {
            ?>
								<div class="content mbs"><a href="<?php 
            echo Yii::app()->urlManager->createUrl('article/default/index', array('op' => 'show', 'articleid' => $article['articleid']));
            ?>
"><?php 
            echo StringUtil::cutStr(StringUtil::filterCleanHtml($article['content']), 114);
            ?>
</a></div>
							<?php 
        }
        ?>
						</div>
					</td>
				</tr>
			<?php 
    }
    ?>
		</tbody>
	</table>
	<div class="mbox-base">
		<div class="fill-hn xac">