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


PHP StringUtil::filterCleanHtml方法代码示例

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


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

示例1: actionIndex

 public function actionIndex()
 {
     $shareInfo["sid"] = intval(EnvUtil::getRequest("sid"));
     $shareInfo["stable"] = StringUtil::filterCleanHtml(EnvUtil::getRequest("stable"));
     $shareInfo["initHTML"] = StringUtil::filterDangerTag(EnvUtil::getRequest("initHTML"));
     $shareInfo["curid"] = StringUtil::filterCleanHtml(EnvUtil::getRequest("curid"));
     $shareInfo["curtable"] = StringUtil::filterCleanHtml(EnvUtil::getRequest("curtable"));
     $shareInfo["module"] = StringUtil::filterCleanHtml(EnvUtil::getRequest("module"));
     $shareInfo["isrepost"] = intval(EnvUtil::getRequest("isrepost"));
     if (empty($shareInfo["stable"]) || empty($shareInfo["sid"])) {
         echo "类型和资源ID不能为空";
         exit;
     }
     if (!($oldInfo = Source::getSourceInfo($shareInfo["stable"], $shareInfo["sid"], false, $shareInfo["module"]))) {
         echo "此信息不可以被转发";
         exit;
     }
     empty($shareInfo["module"]) && ($shareInfo["module"] = $oldInfo["module"]);
     if (empty($shareInfo["initHTML"]) && !empty($shareInfo["curid"])) {
         if ($shareInfo["curid"] != $shareInfo["sid"] && $shareInfo["isrepost"] == 1) {
             $curInfo = Source::getSourceInfo($shareInfo["curtable"], $shareInfo["curid"], false, "weibo");
             $userInfo = $curInfo["source_user_info"];
             $shareInfo["initHTML"] = " //@" . $userInfo["realname"] . ":" . $curInfo["source_content"];
             $shareInfo["initHTML"] = str_replace(array("\n", "\r"), array("", ""), $shareInfo["initHTML"]);
         }
     }
     $shareInfo["shareHtml"] = !empty($oldInfo["shareHtml"]) ? $oldInfo["shareHtml"] : "";
     $data = array("shareInfo" => $shareInfo, "oldInfo" => $oldInfo);
     $this->renderPartial("index", $data);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:30,代码来源:ShareController.php

示例2: actionDestroy

 public function actionDestroy()
 {
     $id = EnvUtil::getRequest("id");
     $runId = StringUtil::filterStr(StringUtil::filterCleanHtml($id));
     WfHandleUtil::destroy($runId);
     $this->ajaxReturn(array("isSuccess" => true));
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:7,代码来源:RecycleController.php

示例3: addDigg

 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;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:33,代码来源:FeedDigg.php

示例4: actionIndex

 public function actionIndex()
 {
     if (isset($_GET["pagesize"])) {
         $this->setListPageSize($_GET["pagesize"]);
     }
     $key = StringUtil::filterCleanHtml(EnvUtil::getRequest("keyword"));
     $fields = array("frp.runid", "frp.processid", "frp.flowprocess", "frp.flag", "frp.opflag", "frp.processtime", "ft.freeother", "ft.flowid", "ft.name as typeName", "ft.type", "ft.listfieldstr", "fr.name as runName", "fr.beginuser", "fr.begintime", "fr.endtime", "fr.focususer");
     $sort = "frp.processtime";
     $group = "frp.runid";
     $condition = array("and", "fr.delflag = 0", "frp.childrun = 0", sprintf("frp.uid = %d", $this->uid), sprintf("FIND_IN_SET(fr.focususer,'%s')", $this->uid));
     if ($key) {
         $condition[] = array("like", "fr.runid", "%{$key}%");
         $condition[] = array("or like", "fr.name", "%{$key}%");
     }
     $count = Ibos::app()->db->createCommand()->select("count(*) as count")->from("{{flow_run_process}} frp")->leftJoin("{{flow_run}} fr", "frp.runid = fr.runid")->leftJoin("{{flow_type}} ft", "fr.flowid = ft.flowid")->where($condition)->group($group)->queryScalar();
     $pages = PageUtil::create($count, $this->getListPageSize());
     if ($key && $count) {
         $pages->params = array("keyword" => $key);
     }
     $offset = $pages->getOffset();
     $limit = $pages->getLimit();
     $list = Ibos::app()->db->createCommand()->select($fields)->from("{{flow_run_process}} frp")->leftJoin("{{flow_run}} fr", "frp.runid = fr.runid")->leftJoin("{{flow_type}} ft", "fr.flowid = ft.flowid")->where($condition)->order($sort)->group($group)->offset($offset)->limit($limit)->queryAll();
     $data = array_merge(array("pages" => $pages), $this->handleList($list));
     $this->setPageTitle(Ibos::lang("My focus"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Workflow")), array("name" => Ibos::lang(Ibos::lang("My focus")), "url" => $this->createUrl("focus/index")), array("name" => Ibos::lang("List"))));
     $this->render("index", $data);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:27,代码来源:FocusController.php

示例5: actionIndex

 public function actionIndex()
 {
     $unit = Setting::model()->fetchSettingValueByKey("unit");
     $formSubmit = EnvUtil::submitCheck("unitSubmit");
     if ($formSubmit) {
         $postData = array();
         if (!empty($_FILES["logo"]["name"])) {
             !empty($unit["logourl"]) && FileUtil::deleteFile($unit["logourl"]);
             $postData["logourl"] = $this->imgUpload("logo");
         } elseif (!empty($_POST["logourl"])) {
             $postData["logourl"] = $_POST["logourl"];
         } else {
             $postData["logourl"] = "";
         }
         $keys = array("phone", "fullname", "shortname", "fax", "zipcode", "address", "adminemail", "systemurl");
         foreach ($keys as $key) {
             if (isset($_POST[$key])) {
                 $postData[$key] = StringUtil::filterCleanHtml($_POST[$key]);
             } else {
                 $postData[$key] = "";
             }
         }
         Setting::model()->updateSettingValueByKey("unit", $postData);
         CacheUtil::update(array("setting"));
         $this->success(Ibos::lang("Save succeed", "message"));
     } else {
         $license = Setting::model()->fetchSettingValueByKey("license");
         $data = array("unit" => unserialize($unit), "license" => $license);
         $this->render("index", $data);
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:UnitController.php

示例6: updateKey

 public function updateKey($key, $nums, $add = true, $uid = "")
 {
     if ($nums == 0) {
         $this->addError("updateKey", Ibos::lang("Dont need to modify", "message.default"));
         return false;
     }
     $nums < 0 && ($add = false);
     $key = StringUtil::filterCleanHtml($key);
     $data = $this->getUserData($uid);
     if (empty($data) || !$data) {
         $data = array();
         $data[$key] = $nums;
     } else {
         $data[$key] = $add ? (int) @$data[$key] + abs($nums) : (int) @$data[$key] - abs($nums);
     }
     $data[$key] < 0 && ($data[$key] = 0);
     $map["uid"] = empty($uid) ? Ibos::app()->user->uid : $uid;
     $map["key"] = $key;
     $this->deleteAll("`key` = :key AND uid = :uid", array(":key" => $key, ":uid" => $map["uid"]));
     $map["value"] = $data[$key];
     $map["mtime"] = date("Y-m-d H:i:s");
     $this->add($map);
     CacheUtil::rm("userData_" . $map["uid"]);
     return $data;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:25,代码来源:UserData.php

示例7: actionUnFollow

 public function actionUnFollow()
 {
     if (EnvUtil::submitCheck("formhash")) {
         $fid = StringUtil::filterCleanHtml($_POST["fid"]);
         $res = Follow::model()->unFollow(Ibos::app()->user->uid, intval($fid));
         $this->ajaxReturn(array("isSuccess" => !!$res, "msg" => Follow::model()->getError("unFollow")));
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:8,代码来源:ApiController.php

示例8: actionSetText

 public function actionSetText()
 {
     $formID = intval(EnvUtil::getRequest("formid"));
     $field = StringUtil::filterCleanHtml(EnvUtil::getRequest("field"));
     $content = EnvUtil::getRequest("content");
     Ibos::app()->db->createCommand()->update("{{flow_form_type}}", array($field => $content), "formid = " . $formID);
     exit("1");
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:8,代码来源:ApiController.php

示例9: actionLicense

 public function actionLicense()
 {
     if (EnvUtil::submitCheck("formhash")) {
         $licensekey = StringUtil::filterCleanHtml(EnvUtil::getRequest("licensekey"));
         $filename = PATH_ROOT . "/data/licence.key";
         @file_put_contents($filename, $licensekey);
         $this->success(Ibos::lang("Save succeed", "message"));
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:9,代码来源:IndexController.php

示例10: beforeSave

 protected function beforeSave()
 {
     $viewExtFields = StringUtil::filterStr($_POST["viewextfields"]);
     $sumFields = StringUtil::filterStr($_POST["sumfields"]);
     $flowConditions = array("flowquerytype" => $_POST["flow_query_type"], "beginuser" => StringUtil::getId($_POST["begin_user"]), "runname" => StringUtil::filterCleanHtml($_POST["run_name"]), "flowstatus" => $_POST["flow_status"], "time1" => $_POST["time1"], "time2" => $_POST["time2"], "time3" => $_POST["time3"], "time4" => $_POST["time4"], "attachname" => StringUtil::filterCleanHtml($_POST["attach_name"]));
     $groupbyFields = array("field" => $_POST["group_field"], "order" => $_POST["group_sort"]);
     $name = StringUtil::filterCleanHtml($_POST["tplname"]);
     $sid = intval(EnvUtil::getRequest("sid"));
     $data = array("flowid" => $this->flowid, "uid" => $this->uid, "tplname" => $this->tplNameExists($name, $sid) ? $name . StringUtil::random(3) : $name, "viewextfields" => $viewExtFields, "sumfields" => $sumFields, "flowconditions" => serialize($flowConditions), "groupbyfields" => serialize($groupbyFields), "condformula" => $_POST["condformula"]);
     return $data;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:11,代码来源:QuerytplController.php

示例11: actionGetCommentList

 public function actionGetCommentList()
 {
     if (EnvUtil::submitCheck("formhash")) {
         $module = StringUtil::filterCleanHtml($_POST["module"]);
         $table = StringUtil::filterCleanHtml($_POST["table"]);
         $rowid = intval($_POST["rowid"]);
         $moduleuid = intval($_POST["moduleuid"]);
         $properties = array("module" => $module, "table" => $table, "attributes" => array("rowid" => $rowid, "limit" => 10, "moduleuid" => $moduleuid));
         $widget = Ibos::app()->getWidgetFactory()->createWidget($this, "IWWeiboComment", $properties);
         $list = $widget->fetchCommentList();
         $this->ajaxReturn(array("isSuccess" => true, "data" => $list));
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:13,代码来源:CommentController.php

示例12: sendSms

 public function sendSms($data)
 {
     $s["uid"] = intval($data["uid"]);
     $s["touid"] = intval($data["touid"]);
     $s["mobile"] = StringUtil::filterCleanHtml($data["mobile"]);
     $s["posturl"] = StringUtil::filterCleanHtml($data["posturl"]);
     $s["node"] = StringUtil::filterCleanHtml($data["node"]);
     $s["module"] = StringUtil::filterCleanHtml($data["module"]);
     $s["return"] = StringUtil::filterCleanHtml($data["return"]);
     $s["content"] = StringUtil::filterDangerTag($data["content"]);
     $s["ctime"] = time();
     return $this->add($s, true);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:13,代码来源:NotifySms.php

示例13: addPlans

 public function addPlans($plans, $repid, $begindate, $enddate, $uid, $type, $exedetail = "")
 {
     foreach ($plans as $plan) {
         $remindDate = empty($plan["reminddate"]) ? 0 : strtotime($plan["reminddate"]);
         $record = array("repid" => $repid, "content" => StringUtil::filterCleanHtml($plan["content"]), "uid" => $uid, "flag" => isset($plan["process"]) && $plan["process"] == 10 ? 1 : 0, "planflag" => $type, "process" => isset($plan["process"]) ? $plan["process"] : 0, "exedetail" => StringUtil::filterCleanHtml($exedetail), "begindate" => $begindate, "enddate" => $enddate, "reminddate" => $remindDate);
         $rid = $this->add($record, true);
         $isInstallCalendar = ModuleUtil::getIsEnabled("calendar");
         if ($isInstallCalendar && $remindDate) {
             $calendar = array("subject" => $record["content"], "starttime" => $remindDate, "endtime" => $remindDate, "uid" => $uid, "upuid" => $uid, "lock" => 1, "category" => 4, "isalldayevent" => 1);
             $cid = Calendars::model()->add($calendar, true);
             CalendarRepRecord::model()->add(array("rid" => $rid, "cid" => $cid, "repid" => $repid));
         }
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:14,代码来源:ReportRecord.php

示例14: actionGetCommentList

 public function actionGetCommentList()
 {
     if (EnvUtil::submitCheck("formhash")) {
         $module = StringUtil::filterCleanHtml($_POST["module"]);
         $table = StringUtil::filterCleanHtml($_POST["table"]);
         $limit = EnvUtil::getRequest("limit");
         $offset = EnvUtil::getRequest("offset");
         $rowid = intval($_POST["rowid"]);
         $type = EnvUtil::getRequest("type");
         $properties = array("module" => $module, "table" => $table, "attributes" => array("rowid" => $rowid, "limit" => $limit ? intval($limit) : 10, "offset" => $offset ? intval($offset) : 0, "type" => $type));
         $widget = Ibos::app()->getWidgetFactory()->createWidget($this, "IWOfficialdocComment", $properties);
         $list = $widget->fetchCommentList();
         $this->ajaxReturn(array("isSuccess" => true, "data" => $list));
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:15,代码来源:CommentController.php

示例15: sendMessage

 public function sendMessage($data)
 {
     if (empty($data["uid"])) {
         return false;
     }
     $s["uid"] = intval($data["uid"]);
     $s["node"] = StringUtil::filterCleanHtml($data["node"]);
     $s["module"] = StringUtil::filterCleanHtml($data["module"]);
     $s["isread"] = 0;
     $s["title"] = StringUtil::filterCleanHtml($data["title"]);
     $s["body"] = StringUtil::filterDangerTag($data["body"]);
     $s["ctime"] = time();
     $s["url"] = $data["url"];
     return $this->add($s, true);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:15,代码来源:NotifyMessage.php


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