• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tsClean函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tsClean函数的典型用法代码示例。如果您正苦于以下问题:PHP tsClean函数的具体用法?PHP tsClean怎么用?PHP tsClean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: defined

defined('IN_TS') or die('Access Denied.');
$userid = aac('user')->isLogin();
switch ($ts) {
    case "":
        $title = '发布活动';
        include template("add");
        break;
    case "do":
        $title = trim($_POST['title']);
        $typeid = intval($_POST['typeid']);
        $starttime = trim($_POST['starttime']);
        $endtime = trim($_POST['endtime']);
        $address = trim($_POST['address']);
        $coordinate = trim($_POST['coordinate']);
        //坐标
        $content = tsClean($_POST['content']);
        if ($title == '' || $content == '') {
            tsNotice('标题和内容不能为空');
        }
        $eventid = $new['event']->create('event', array('userid' => $userid, 'title' => $title, 'typeid' => $typeid, 'starttime' => $starttime, 'endtime' => $endtime, 'address' => $address, 'coordinate' => $coordinate, 'content' => $content, 'isaudit' => 1, 'addtime' => time()));
        //上传
        $arrUpload = tsUpload($_FILES['photo'], $eventid, 'event', array('jpg', 'gif', 'png'));
        if ($arrUpload) {
            $new['event']->update('event', array('eventid' => $eventid), array('path' => $arrUpload['path'], 'photo' => $arrUpload['url']));
        }
        header("Location: " . tsUrl('event', 'show', array('id' => $eventid)));
        break;
        //地图
    //地图
    case "map":
        $dd = isset($_GET['dd']) ? $_GET['dd'] : '中国北京';
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:add.php


示例2: array

     }
     if ($TS_APP['iscreate'] == 0 || $TS_USER['isadmin'] == 1) {
         //小组分类
         $arrCate = $new['group']->findAll('group_cate', array('referid' => 0));
         $title = '创建小组';
         include template("create");
     } else {
         tsNotice('系统不允许会员创建小组!');
     }
     break;
     //执行创建小组
 //执行创建小组
 case "do":
     if ($TS_APP['iscreate'] == 0 || $TS_USER['isadmin'] == 1) {
         $groupname = trim($_POST['groupname']);
         $groupdesc = tsClean($_POST['groupdesc']);
         if ($groupname == '' || $groupdesc == '') {
             tsNotice('小组名称和介绍不能为空!');
         }
         //过滤内容开始
         if ($TS_USER['isadmin'] != 1) {
             aac('system')->antiWord($groupname);
             aac('system')->antiWord($groupdesc);
         }
         //过滤内容结束
         //配置文件是否需要审核
         $isaudit = intval($TS_APP['isaudit']);
         if ($TS_USER['isadmin'] == 1) {
             $isaudit = 0;
         }
         $isGroup = $new['group']->findCount('group', array('groupname' => $groupname));
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:create.php


示例3: defined

<?php

defined('IN_TS') or die('Access Denied.');
//修改单个图片信息
$userid = aac('user')->isLogin();
switch ($ts) {
    case "":
        $photoid = intval($_GET['photoid']);
        $strPhoto = $new['photo']->find('photo', array('photoid' => $photoid));
        $strPhoto['photoname'] = stripslashes($strPhoto['photoname']);
        $strPhoto['photodesc'] = stripslashes($strPhoto['photodesc']);
        if ($strPhoto['userid'] == $userid || $TS_USER['isadmin'] == 1) {
            $title = '修改图片信息';
            include template('photo_edit');
        } else {
            tsNotice('非法操作!');
        }
        break;
    case "do":
        if ($_POST['token'] != $_SESSION['token']) {
            tsNotice('非法操作!');
        }
        $photoid = intval($_POST['photoid']);
        $photoname = tsClean($_POST['photoname']);
        $photodesc = tsClean($_POST['photodesc']);
        $new['photo']->update('photo', array('photoid' => $photoid), array('photoname' => $photoname, 'photodesc' => $photodesc));
        header('Location: ' . tsUrl('photo', 'show', array('id' => $photoid)));
        break;
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:29,代码来源:edit.php


示例4: defined

defined('IN_TS') or die('Access Denied.');
//用户是否登录
$userid = aac('user')->isLogin();
switch ($ts) {
    case "":
        $title = '创建圖';
        include template("create");
        break;
    case "do":
        if ($_POST['token'] != $_SESSION['token']) {
            tsNotice('非法操作!');
        }
        //用户是否登录
        $userid = aac('user')->isLogin();
        $albumname = trim($_POST['albumname']);
        $albumdesc = tsClean($_POST['albumdesc']);
        if ($albumname == '') {
            tsNotice("圖名称不能为空!");
        }
        //1审核后显示0不审核
        if ($TS_APP['isaudit'] == 1) {
            $isaudit = 1;
        } else {
            $isaudit = 0;
        }
        if ($TS_USER['isadmin'] == 0) {
            //过滤内容开始
            aac('system')->antiWord($albumname);
            aac('system')->antiWord($albumdesc);
            //过滤内容结束
        }
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:create.php


示例5: aac

     $userid = aac('user')->isLogin();
     $albumid = intval($_POST['albumid']);
     $albumface = trim($_POST['albumface']);
     $arrPhotoId = $_POST['photoid'];
     $arrPhotoDesc = $_POST['photodesc'];
     if ($TS_USER['isadmin'] == 0) {
         foreach ($arrPhotoDesc as $key => $item) {
             //过滤内容开始
             aac('system')->antiWord($item);
             //过滤内容结束
         }
     }
     foreach ($arrPhotoDesc as $key => $item) {
         if ($item) {
             $photoid = intval($arrPhotoId[$key]);
             $new['photo']->update('photo', array('photoid' => $photoid), array('photodesc' => tsClean($item)));
         }
     }
     //更新圖封面
     if ($albumface) {
         $new['photo']->update('photo_album', array('userid' => $userid, 'albumid' => $albumid), array('albumface' => $albumface));
     }
     header("Location: " . tsUrl('photo', 'album', array('id' => $albumid)));
     break;
     //删除圖
 //删除圖
 case "del":
     //用户是否登录
     $userid = aac('user')->isLogin();
     $albumid = intval($_GET['albumid']);
     $strAlbum = $new['photo']->find('photo_album', array('albumid' => $albumid));
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:album.php


示例6: header

     }
     //回到文化管理首页
     header("Location: " . SITE_URL . "index.php?app=group&ac=admin&mg=group&ts=list");
     break;
     //文化编辑
 //文化编辑
 case "edit":
     $groupid = intval($_GET['groupid']);
     $arrGroup = $db->once_fetch_assoc("select * from " . dbprefix . "group where groupid='{$groupid}'");
     include template("admin/group_edit");
     break;
     //文化编辑执行
 //文化编辑执行
 case "edit_do":
     $groupid = intval($_POST['groupid']);
     $new['group']->update('group', array('groupid' => $groupid), array('groupname' => t($_POST['groupname']), 'groupdesc' => tsClean($_POST['groupdesc']), 'userid' => intval($_POST['userid']), 'ispost' => intval($_POST['ispost'])));
     qiMsg("文化信息修改成功!");
     break;
     //文化删除
 //文化删除
 case "del":
     $groupid = intval($_GET['groupid']);
     if ($groupid == 1) {
         qiMsg("默认文化不能删除!");
     }
     $topicNum = $db->once_fetch_assoc("select count(*) from " . dbprefix . "group_topic where `groupid`='{$groupid}'");
     if ($topicNum['count(*)'] > 0) {
         qiMsg("本文化还有帖子,不允许删除。");
     }
     $db->query("DELETE FROM " . dbprefix . "group WHERE groupid = '{$groupid}'");
     $db->query("DELETE FROM " . dbprefix . "group_user WHERE groupid = '{$groupid}'");
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:group.php


示例7: addcomment

 public function addcomment()
 {
     if ($_POST['token'] != $_SESSION['token']) {
         tsNotice('非法操作!');
     }
     //用户是否登录
     $userid = aac('user')->isLogin();
     $weiboid = intval($_POST['weiboid']);
     $touserid = intval($_POST['touserid']);
     $content = tsClean($_POST['content']);
     if ($content == '') {
         tsNotice('内容不能为空');
     }
     if ($GLOBALS['TS_USER']['isadmin'] == 0) {
         //过滤内容开始
         aac('system')->antiWord($content);
         //过滤内容结束
     }
     $commentid = $this->create('weibo_comment', array('userid' => $userid, 'touserid' => $touserid, 'weiboid' => $weiboid, 'content' => $content, 'addtime' => date('Y-m-d H:i:s')));
     //计算评论总数
     $commentNum = $this->findCount('weibo_comment', array('weiboid' => $weiboid));
     $this->update('weibo', array('weiboid' => $weiboid), array('count_comment' => $commentNum));
     $strWeibo = $this->find('weibo', array('weiboid' => $weiboid));
     if ($strWeibo['userid'] != $userid) {
         $msg_userid = '0';
         $msg_touserid = $strWeibo['userid'];
         $msg_content = '你的微博新增一条回复,快去看看给个回复吧^_^ <br />' . tsUrl('weibo', 'show', array('id' => $weiboid));
         aac('message')->sendmsg($msg_userid, $msg_touserid, $msg_content);
     }
     tsHeaderUrl(tsUrl('weibo', 'show', array('id' => $weiboid)));
 }
开发者ID:omusico,项目名称:ThinkSAAS,代码行数:31,代码来源:action.weibo.php


示例8: tsNotice

 case "":
     if ($TS_APP['allowpost'] == 0 && $TS_USER['isadmin'] == 0) {
         tsNotice('系统设置不允许会员发文章!');
     }
     $cateid = intval($_GET['cateid']);
     $title = '发布文章';
     include template('add');
     break;
 case "do":
     if ($_POST['token'] != $_SESSION['token']) {
         tsNotice('非法操作!');
     }
     $cateid = intval($_POST['cateid']);
     $title = trim($_POST['title']);
     $content = tsClean($_POST['content']);
     $tag = tsClean($_POST['tag']);
     $addtime = date('Y-m-d H:i:s');
     if (intval($TS_USER['isadmin']) == 0) {
         // 过滤内容开始
         aac('system')->antiWord($title);
         aac('system')->antiWord($content);
         aac('system')->antiWord($tag);
         // 过滤内容结束
     }
     if ($title == '' || $content == '') {
         tsNotice("标题和内容都不能为空!");
     }
     //1审核后显示0不审核
     if ($TS_APP['isaudit'] == 1) {
         $isaudit = 1;
     } else {
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:add.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tsDecode函数代码示例发布时间:2022-05-23
下一篇:
PHP ts函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap