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


PHP tsNotice函数代码示例

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


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

示例1: antiWord

 public function antiWord($text)
 {
     //先干掉所有空格,不管你是所有空格+全角空格
     $text = preg_replace("/\\s| /", "", $text);
     $arrWords = $this->findAll('anti_word');
     foreach ($arrWords as $key => $item) {
         $arrWord[] = $item['word'];
     }
     $strWord = '';
     $count = 1;
     if (is_array($arrWord)) {
         foreach ($arrWord as $item) {
             if ($count == 1) {
                 $strWord .= $item;
             } else {
                 $strWord .= '|' . $item;
             }
             $count++;
         }
         //第一过滤层,大致的扫一下
         if ($text) {
             preg_match("/{$strWord}/i", $text, $matche1);
             if (!empty($matche1[0])) {
                 //tsNotice('提示:内容中存在被禁止使用的词汇:'.$matche1[0]);
                 tsNotice('非法操作');
             }
         }
         //第二过滤层
         preg_match("/{$strWord}/i", t($text), $matche2);
         if (!empty($matche2[0])) {
             //tsNotice('内容中存在被禁止使用的词汇:'.$matche2[0]);
             tsNotice('非法操作');
         }
         //第三过滤层,滤中文中的特殊字符
         $text3 = @preg_replace("/[^\\x{4e00}-\\x{9fa5}]/iu", '', $text);
         preg_match("/{$strWord}/i", t($text3), $matche3);
         if (!empty($matche3[0])) {
             //tsNotice('内容中存在被禁止使用的词汇:'.$matche3[0]);
             tsNotice('非法操作');
         }
         //第四过滤层,过滤QQ号,电话,妈的,老子就不信搞不死你
         $text4 = @preg_replace("/[^\\d]/iu", '', $text);
         preg_match("/{$strWord}/i", t($text4), $matche4);
         if (!empty($matche4[0])) {
             //tsNotice('内容中存在被禁止使用的词汇:'.$matche4[0]);
             tsNotice('非法操作');
         }
     }
     return true;
 }
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:50,代码来源:class.system.php

示例2: defined

<?php

//插件条件入口
defined('IN_TS') or die('Access Denied.');
if (is_file('plugins/' . $app . '/' . $plugin . '/' . $in . '.php')) {
    require_once 'plugins/' . $app . '/' . $plugin . '/' . $in . '.php';
} else {
    tsNotice('sorry:no plugin!');
}
//形如这样
//index.php?app=group&ac=plugin&plugin=qq&in=do
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:11,代码来源:plugin.php

示例3: fileRead

$TS_SITE = fileRead('data/system_options.php');
if ($TS_SITE == '') {
    $TS_SITE = $tsMySqlCache->get('system_options');
}
//加载APP导航
$TS_SITE['appnav'] = fileRead('data/system_appnav.php');
if ($TS_SITE['appnav'] == '') {
    $TS_SITE['appnav'] = $tsMySqlCache->get('system_appnav');
}
if (is_file('data/' . $TS_URL['app'] . '_options.php')) {
    $TS_APP = fileRead('data/' . $TS_URL['app'] . '_options.php');
    if ($TS_APP == '') {
        $TS_APP = $tsMySqlCache->get($TS_URL['app'] . '_options');
    }
    if ($TS_APP['isenable'] == '1' && $TS_URL['ac'] != 'admin') {
        tsNotice($TS_URL['app'] . "应用关闭,请开启后访问!");
    }
}
//定义网站URL
define('SITE_URL', $TS_SITE['site_url']);
//设置时区
date_default_timezone_set($TS_SITE['timezone']);
//接管SESSION,前台用户基本数据,$TS_USER数组
$TS_USER = isset($_SESSION['tsuser']) ? $_SESSION['tsuser'] : '';
//记录日志
if ($TS_CF['logs']) {
    //打印用户日志记录
    userlog($_POST, intval($TS_USER['userid']));
    userlog($_GET, intval($TS_USER['userid']));
}
//控制前台ADMIN访问权限
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:thinksaas.php

示例4: switch

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'] : '中国北京';
        include template('add_map');
        break;
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:add.php

示例5: aac

    //必须上传头像
    case "face":
        $userid = aac('user')->isLogin();
        $strUser = $new['user']->getOneUser($userid);
        $title = '上传头像';
        include template('verify_face');
        break;
    case "facedo":
        $userid = aac('user')->isLogin();
        if ($_FILES['picfile']) {
            //上传
            $arrUpload = tsUpload($_FILES['picfile'], $userid, 'user', array('jpg', 'gif', 'png'));
            if ($arrUpload) {
                $new['user']->update('user_info', array('userid' => $userid), array('path' => $arrUpload['path'], 'face' => $arrUpload['url']));
                $filesize = abs(filesize('uploadfile/user/' . $arrUpload['url']));
                if ($filesize <= 0) {
                    $new['user']->update('user_info', array('userid' => $userid), array('path' => '', 'face' => ''));
                    tsNotice('上传头像失败!');
                } else {
                    //更新缓存头像
                    $_SESSION['tsuser']['face'] = $arrUpload['url'];
                    $_SESSION['tsuser']['path'] = $arrUpload['path'];
                    tsDimg($arrUpload['url'], 'user', '120', '120', $arrUpload['path']);
                    header('Location: ' . tsUrl('user', 'verify', array('ts' => 'face')));
                }
            } else {
                tsNotice('头像修改失败');
            }
        }
        break;
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:verify.php

示例6: tsNotice

             tsNotice('用户已经加入小组!');
         }
         $new['group']->create('group_user', array('userid' => $iuserid, 'groupid' => $groupid, 'addtime' => time()));
         //计算小组会员数
         $count_user = $new['group']->findCount('group_user', array('groupid' => $groupid));
         //更新小组成员统计
         $new['group']->update('group', array('groupid' => $groupid), array('count_user' => $count_user));
         //发送系统消息开始
         $msg_userid = '0';
         $msg_touserid = $iuserid;
         $msg_content = '你被邀请加入一个小组,快去看看吧<br />' . tsUrl('group', 'show', array('id' => $groupid));
         aac('message')->sendmsg($msg_userid, $msg_touserid, $msg_content);
         //发送系统消息end
         header('Location: ' . tsUrl('group', 'show', array('id' => $groupid)));
     } else {
         tsNotice('倒霉了吧?');
     }
     break;
     //usertips
 //usertips
 case "usertips":
     $data = fileRead('data/user_tips.php');
     if ($data == '') {
         $query = $db->fetch_all_assoc("select * from " . dbprefix . "user_info");
         foreach ($query as $user) {
             $usertip[] = array('user' => $user['username'], 'name' => $user['userid']);
         }
         fileWrite('user_tips.php', 'data', json_encode($usertip));
         $data = fileRead('data/user_tips.php');
     }
     echo $data;
开发者ID:GithuberFan,项目名称:ThinkSAAS,代码行数:31,代码来源:do.php

示例7: defined

<?php

defined('IN_TS') or die('Access Denied.');
//用户是否登录
$userid = aac('user')->isLogin();
switch ($ts) {
    //发送消息页面
    case "add":
        $touserid = intval($_GET['touserid']);
        if ($userid == $touserid || !$touserid) {
            tsNotice("Sorry!自己不能给自己发送消息的!& 对方为空!");
        }
        $strUser = $new['user']->getOneUser($userid);
        $strTouser = $new['user']->getOneUser($touserid);
        if (!$strTouser) {
            tsNotice("Sorry!对方不存在!");
        }
        $title = "发送短消息";
        include template("message_add");
        break;
    case "do":
        $msg_userid = $userid;
        $msg_touserid = intval($_POST['touserid']);
        $msg_content = tsFilter($_POST['content']);
        aac('system')->antiWord($msg_content);
        aac('message')->sendmsg($msg_userid, $msg_touserid, $msg_content);
        header("Location: " . tsUrl('message', 'my'));
        break;
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:29,代码来源:message.php

示例8: aac

$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);
            //过滤内容结束
        }
        $albumid = $new['photo']->create('photo_album', array('userid' => $userid, 'albumname' => $albumname, 'albumdesc' => $albumdesc, 'isaudit' => $isaudit, 'addtime' => date('Y-m-d H:i:s'), 'uptime' => date('Y-m-d H:i:s')));
        header("Location: " . tsUrl('photo', 'upload', array('albumid' => $albumid)));
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:create.php

示例9: switch

}
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 = trim($_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);
            //过滤内容结束
        }
        $albumid = $new['photo']->create('photo_album', array('userid' => $userid, 'albumname' => $albumname, 'albumdesc' => $albumdesc, 'isaudit' => $isaudit, 'addtime' => date('Y-m-d H:i:s'), 'uptime' => date('Y-m-d H:i:s')));
        header("Location: " . tsUrl('photo', 'upload', array('albumid' => $albumid)));
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:create.php

示例10: aac

        //添加评论
    //添加评论
    case "comment_do":
        //用户是否登录
        $userid = aac('user')->isLogin();
        $photoid = intval($_POST['photoid']);
        $content = tsClean($_POST['content']);
        if ($TS_USER['isadmin'] == 0) {
            //过滤内容开始
            aac('system')->antiWord($content);
            //过滤内容结束
        }
        $commentid = $new['photo']->create('photo_comment', array('photoid' => $photoid, 'userid' => $userid, 'content' => $content, 'addtime' => time()));
        header("Location: " . tsUrl('photo', 'show', array('id' => $photoid)));
        break;
        //删除评论
    //删除评论
    case "delcomment":
        //用户是否登录
        $userid = aac('user')->isLogin();
        $commentid = intval($_GET['commentid']);
        $strComment = $new['photo']->find('photo_comment', array('commentid' => $commentid));
        $strTopic = $new['photo']->find('photo', array('photoid' => $strComment['photoid']));
        if ($userid == $strPhoto['userid'] || $TS_USER['isadmin'] == '1') {
            $new['photo']->delete('photo_comment', array('commentid' => $commentid));
            tsNotice("删除评论成功!");
        } else {
            tsNotice("非法操作!");
        }
        break;
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:do.php

示例11: intval

        $userid = $new['user']->isLogin();
        $touserid = intval($_POST['touserid']);
        $reid = intval($_POST['reid']);
        $content = tsClean($_POST['content']);
        $arrContent = explode('#', $content);
        $content = $arrContent['1'];
        if ($content == '') {
            tsNotice('留言不能为空!');
        }
        aac('system')->antiWord($content);
        $new['user']->create('user_gb', array('userid' => $userid, 'reid' => $reid, 'touserid' => $touserid, 'content' => $content, 'addtime' => date('Y-m-d H:i:s')));
        //发送系统消息
        $msg_userid = '0';
        $msg_touserid = $touserid;
        $msg_content = '有人在你的留言板上留言了哦,快去看看吧!';
        $msg_tourl = tsUrl('user', 'space', array('id' => $touserid));
        aac('message')->sendmsg($msg_userid, $msg_touserid, $msg_content, $msg_tourl);
        tsNotice('回复成功!');
        break;
        //删除留言
    //删除留言
    case "delete":
        $userid = $new['user']->isLogin();
        $gbid = intval($_GET['gbid']);
        $strGuest = $new['user']->find('user_gb', array('id' => $gbid));
        if ($strGuest['touserid'] == $userid) {
            $new['user']->delete('user_gb', array('id' => $gbid));
        }
        tsNotice('留言删除成功');
        break;
}
开发者ID:fnet123,项目名称:ThinkSAAS,代码行数:31,代码来源:guestbook.php

示例12: unset

        unset($_GET);
        $res = $new['group']->find('user_topic_declare', array('commentid' => $id, 'userid' => $userid));
        if ($res) {
            tsNotice('不要重复评价,请保持良好的心态,有益身体健康!');
        }
        // 增加支持数
        $comment_data = $new['group']->find('group_topic_comment', array('commentid' => $id));
        $support_nums = $comment_data['support'] + 1;
        $new['group']->update('group_topic_comment', array('commentid' => $id), array('support' => $support_nums));
        // 增加评价记录
        $new['group']->create('user_topic_declare', array('commentid' => $id, 'userid' => $userid));
        tsNotice('表态成功!', '点击返回>>', $_SERVER['HTTP_REFERER'], true);
        break;
        // 评论支持
    // 评论支持
    case "oppose":
        $id = isset($_GET['commentid']) && intval($_GET['commentid']) ? intval($_GET['commentid']) : tsNotice('请指定要支持的评论!');
        unset($_GET);
        $res = $new['group']->find('user_topic_declare', array('commentid' => $id, 'userid' => $userid));
        if ($res) {
            tsNotice('不要重复评价,请保持良好的心态,有益身体健康!');
        }
        // 增加支持数
        $comment_data = $new['group']->find('group_topic_comment', array('commentid' => $id));
        $oppose_nums = $comment_data['oppose'] + 1;
        $new['group']->update('group_topic_comment', array('commentid' => $id), array('oppose' => $oppose_nums));
        // 增加评价记录
        $new['group']->create('user_topic_declare', array('commentid' => $id, 'userid' => $userid));
        tsNotice('表态成功!', '点击返回>>', $_SERVER['HTTP_REFERER'], true);
        break;
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:comment.php

示例13: tsNotice

        if ($_POST['token'] != $_SESSION['token']) {
            tsNotice('非法操作!');
        }
        $email = trim($_POST['email']);
        $pwd = trim($_POST['pwd']);
        $cktime = $_POST['cktime'];
        if ($email == '' || $pwd == '') {
            qiMsg("所有输入项都不能为空^_^");
        }
        $countAdmin = $new['system']->findCount('user', array('email' => $email));
        if ($countAdmin == 0) {
            qiMsg('用户Email不存在!');
        }
        $strAdmin = $new['system']->find('user', array('email' => $email));
        if (md5($strAdmin['salt'] . $pwd) !== $strAdmin['pwd']) {
            tsNotice('用户密码错误!');
        }
        $strAdminInfo = $new['system']->find('user_info', array('email' => $email), 'userid,username,isadmin');
        if ($strAdminInfo['isadmin'] != 1) {
            qiMsg("你无权登录后台管理!");
        }
        $_SESSION['tsadmin'] = $strAdminInfo;
        header("Location: " . SITE_URL . "index.php?app=system");
        break;
        //退出
    //退出
    case "out":
        unset($_SESSION['tsadmin']);
        header("Location: " . SITE_URL . "index.php?app=system&ac=login");
        break;
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:login.php

示例14: tsNotice

     break;
     //编辑帖子执行
 //编辑帖子执行
 case "do":
     if ($_POST['token'] != $_SESSION['token']) {
         tsNotice('非法操作!');
     }
     $topicid = intval($_POST['topicid']);
     $typeid = intval($_POST['typeid']);
     $title = trim($_POST['title']);
     //echo br2nl($_POST['content']);exit;
     $content = tsClean($_POST['content']);
     $iscomment = intval($_POST['iscomment']);
     $iscommentshow = intval($_POST['iscommentshow']);
     if ($topicid == '' || $title == '' || $content == '') {
         tsNotice("都不能为空的哦!");
     }
     if ($TS_USER['isadmin'] == 0) {
         //过滤内容开始
         aac('system')->antiWord($title);
         aac('system')->antiWord($content);
         //过滤内容结束
     }
     $strTopic = $new['group']->find('group_topic', array('topicid' => $topicid));
     $strGroup = $new['group']->find('group', array('groupid' => $strTopic['groupid']));
     $strGroupUser = $new['group']->find('group_user', array('userid' => $userid, 'groupid' => $strTopic['groupid']));
     if ($strTopic['userid'] == $userid || $strGroup['userid'] == $userid || $TS_USER['isadmin'] == 1 || $strGroupUser['isadmin'] == 1) {
         $new['group']->update('group_topic', array('topicid' => $topicid), array('typeid' => $typeid, 'title' => $title, 'content' => $content, 'iscomment' => $iscomment, 'iscommentshow' => $iscommentshow));
         //处理标签
         $tag = trim($_POST['tag']);
         if ($tag) {
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:topicedit.php

示例15: tsNotice

if (aac('user')->isPublisher() == false) {
    tsNotice('不好意思,你还没有权限发布内容!');
}
switch ($ts) {
    case "":
        $title = '创建资料库';
        include template('create');
        break;
    case "do":
        $title = trim($_POST['title']);
        $content = tsClean($_POST['content']);
        if (intval($TS_USER['isadmin']) == 0) {
            // 过滤内容开始
            aac('system')->antiWord($title);
            aac('system')->antiWord($content);
            // 过滤内容结束
        }
        //1审核后显示0不审核
        if ($TS_APP['isaudit'] == 1) {
            $isaudit = 1;
        } else {
            $isaudit = 0;
        }
        if ($title && $content) {
            $albumid = $new['attach']->create('attach_album', array('userid' => $userid, 'title' => $title, 'content' => $content, 'isaudit' => $isaudit, 'addtime' => date('Y-m-d H:i:s'), 'uptime' => date('Y-m-d H:i:s')));
            header('Location: ' . tsUrl('attach', 'upload', array('albumid' => $albumid)));
        } else {
            tsNotice('资料库信息填写不完整');
        }
        break;
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:create.php


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