本文整理汇总了PHP中tsDecode函数的典型用法代码示例。如果您正苦于以下问题:PHP tsDecode函数的具体用法?PHP tsDecode怎么用?PHP tsDecode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tsDecode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getOneComment
public function getOneComment($commentid)
{
$strComment = $this->find('weibo_comment', array('commentid' => $commentid));
$strComment['content'] = tsDecode($strComment['content']);
$strComment['user'] = aac('user')->getOneUser($strComment['userid']);
return $strComment;
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:7,代码来源:class.weibo.php
示例2: recommendtopic
function recommendtopic()
{
$arrTopics = aac('group')->findAll('group_topic', array('isaudit' => 0, 'isrecommend' => 1), 'uptime desc', null, 10);
foreach ($arrTopics as $key => $item) {
$arrTopic[$key] = $item;
$arrTopic[$key]['title'] = tsTitle($item['title']);
// 标题过滤
$arrTopic[$key]['desc'] = tsCutContent(strip_tags($item['content']), 50);
// 简介
$arrTopic[$key]['user'] = aac('user')->getOneUser($item['userid']);
// 用户信息
$arrTopic[$key]['group'] = aac('group')->getOneGroup($item['groupid']);
// 群组信息
/* 匹配标题图片 */
$pattern = "/<[img|IMG].*?src=[\\'|\"](.*?(?:[\\.gif|\\.jpg|\\.png]))[\\'|\"].*?[\\/]?>/";
preg_match($pattern, tsDecode($item['content']), $match);
if (!$match[1]) {
// 内容里面没有图片
$match[0] = '<img src="/plugins/home/recommendtopic/images/default.png" />';
$match[1] = '/plugins/home/recommendtopic/images/default.png';
}
$arrTopic[$key]['thumb'] = $match;
}
include template('recommendtopic', 'recommendtopic');
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:25,代码来源:recommendtopic.php
示例3: article
function article()
{
$arrArticle = aac('article')->findAll('article', array('isaudit' => 0), 'addtime desc', null, 10);
foreach ($arrArticle as $key => $item) {
$arrArticle[$key]['title'] = tsTitle($item['title']);
$arrArticle[$key]['content'] = tsDecode($item['content']);
}
include template('article', 'article');
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:9,代码来源:article.php
示例4: weibo
function weibo()
{
$arrWeibo = aac('weibo')->findAll('weibo', null, 'addtime desc', null, 10);
foreach ($arrWeibo as $key => $item) {
$arrWeibo[$key]['content'] = tsDecode($item['content']);
$arrWeibo[$key]['user'] = aac('user')->getOneUser($item['userid']);
}
include template('weibo', 'weibo');
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:9,代码来源:weibo.php
示例5: index
public function index()
{
//dump($GLOBALS);
$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('weibo', 'index', array('page' => ''));
$lstart = $page * 20 - 20;
$arrWeibo = $this->findAll('weibo', array('isaudit' => 0), 'uptime desc', null, $lstart . ',20');
foreach ($arrWeibo as $key => $item) {
$arrWeibo[$key]['user'] = aac('user')->getOneUser($item['userid']);
$arrWeibo[$key]['content'] = tsDecode($item['content']);
}
$weiboNum = $this->findCount('weibo', array('isaudit' => 0));
$pageUrl = pagination($weiboNum, 20, $page, $url);
$title = '唠叨';
include template('index');
}
开发者ID:GithuberFan,项目名称:ThinkSAAS,代码行数:16,代码来源:action.weibo.php
示例6: show
public function show()
{
$weiboid = intval($_GET['id']);
$strWeibo = $this->getOneWeibo($weiboid);
if ($weiboid == 0 || $strWeibo == '') {
ts404();
}
if ($strWeibo['isaudit'] == 1) {
tsNotice('内容审核中...');
}
//comment
$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('weibo', 'show', array('id' => $weiboid, 'page' => ''));
$lstart = $page * 20 - 20;
$arrComments = $this->findAll('weibo_comment', array('weiboid' => $weiboid), 'addtime desc', 'commentid', $lstart . ',20');
foreach ($arrComments as $key => $item) {
$arrComment[] = $this->getOneComment($item['commentid']);
}
$commentNum = $this->findCount('weibo_comment', array('weiboid' => $weiboid));
$pageUrl = pagination($commentNum, 20, $page, $url);
$title = cututf8(t(tsDecode($strWeibo['content'])), 0, 100, false);
include template('show');
}
开发者ID:omusico,项目名称:ThinkSAAS,代码行数:23,代码来源:action.weibo.php
示例7: foreach
foreach ($arrFeeds as $key => $item) {
$data = json_decode($item['data'], true);
if (is_array($data)) {
foreach ($data as $key => $itemTmp) {
$tmpkey = '{' . $key . '}';
$tmpdata[$tmpkey] = tsTitle(urldecode($itemTmp));
}
}
}
$arrFeeds = aac('group')->findAll('group_topic', array('userid' => $strUser['userid']), 'addtime desc', null, 25);
foreach ($arrFeeds as $key => $item) {
$arrFeed[$key] = $item;
$arrFeed[$key]['title'] = tsTitle($item['title']);
// 标题过滤
$arrFeed[$key]['desc'] = tsCutContent(strip_tags($item['content']), 90);
// 简介
$arrFeed[$key]['user'] = aac('user')->getOneUser($item['userid']);
// 用户信息
$arrFeed[$key]['group'] = aac('group')->getOneGroup($item['groupid']);
// 群组信息
/* 匹配标题图片 */
$pattern = "/<[img|IMG].*?src=[\\'|\"](.*?(?:[\\.gif|\\.jpg|\\.png]))[\\'|\"].*?[\\/]?>/";
preg_match($pattern, tsDecode($item['content']), $match);
if (!$match[1]) {
// 内容里面没有图片
$match[0] = '<img src="/plugins/home/newtopics/images/default.png" />';
$match[1] = '/plugins/home/newtopics/images/default.png';
}
$arrFeed[$key]['thumb'] = $match;
}
include template("space");
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:space.php
示例8: defined
<?php
defined('IN_TS') or die('Access Denied.');
$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('photo', 'my', array('my' => 'index', 'page' => ''));
$lstart = $page * 6 - 6;
$arrAlbum = $new['photo']->findAll('photo_album', array('userid' => $strUser['userid']), 'albumid desc', null, $lstart . ',6');
foreach ($arrAlbum as $key => $item) {
$arrAlbum[$key]['albumname'] = tsDecode($item['albumname']);
$arrAlbum[$key]['albumdesc'] = tsDecode($item['albumdesc']);
}
$albumNum = $new['photo']->findCount('photo_album', array('userid' => $strUser['userid']));
$pageUrl = pagination($albumNum, 6, $page, $url);
$title = '我的圖';
include template('my/index');
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:15,代码来源:index.php
示例9: array
$topicTypeNum = $new['group']->findCount('group_topic', array('typeid' => $typeid));
$new['group']->update('group_topic_type', array('typeid' => $typeid), array('count_topic' => $topicTypeNum));
}
// 处理标签
aac('tag')->addTag('topic', 'topicid', $topicid, $tag);
// 统计需要审核的帖子
$count_topic_audit = $new['group']->findCount('group_topic', array('groupid' => $groupid, 'isaudit' => '1'));
// 统计小组下帖子数并更新
$count_topic = $new['group']->findCount('group_topic', array('groupid' => $groupid));
// 统计今天发布帖子数
$today_start = strtotime(date('Y-m-d 00:00:00'));
$today_end = strtotime(date('Y-m-d 23:59:59'));
$count_topic_today = $new['group']->findCount('group_topic', "`groupid`='{$groupid}' and `addtime`='{$today_start}'");
$new['group']->update('group', array('groupid' => $groupid), array('count_topic' => $count_topic, 'count_topic_audit' => $count_topic_audit, 'count_topic_today' => $count_topic_today, 'uptime' => time()));
// 对积分进行处理
aac('user')->doScore($TS_URL['app'], $TS_URL['ac'], $TS_URL['ts']);
// feed开始
if ($strGroup['joinway'] == 0) {
$feed_template = '<span class="pl">发布了帖子:<a href="{link}">{title}</a></span><div class="quote"><span class="inq">{content}</span> <span><a class="j a_saying_reply" href="{link}" rev="unfold">回应</a></span></div>';
$feed_data = array('link' => tsurl('group', 'topic', array('id' => $topicid)), 'title' => $title, 'content' => cututf8(t(tsDecode($content)), '0', '50'));
aac('feed')->add($userid, $feed_template, $feed_data);
// feed结束
}
// QQ分享
$arrShare = array('content' => $title . '[ThinkSAAS社区]' . tsUrl('group', 'topic', array('id' => $topicid)));
doAction('qq_share', $arrShare);
// 微博分享
doAction('weibo_share', $title . '[ThinkSAAS社区]' . tsUrl('group', 'topic', array('id' => $topicid)));
header("Location: " . tsUrl('group', 'topic', array('id' => $topicid)));
break;
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:add.php
示例10: tsXimg
<div class="content">
<?php
if ($item['photo']) {
?>
<a target="_blank" href="<?php
echo SITE_URL;
?>
uploadfile/weibo/<?php
echo $item['photo'];
?>
"><img src="<?php
echo tsXimg($item['photo'], 'weibo', 240, '', $item['path']);
?>
" /></a><?php
}
echo tsDecode($item['content']);
?>
</div>
<p style="text-align:right;">
<a href="<?php
echo tsurl('weibo', 'show', array('id' => $item['weiboid']));
?>
"><?php
if ($item['count_comment'] > '0') {
?>
(<?php
echo $item['count_comment'];
?>
)<?php
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:index.tpl.php
示例11: array
//小组分类
$arrGroupCate = $new['group']->findAll('group_cate', array('referid' => 0));
// 所有小组
$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$lstart = $page * 24 - 24;
$url = tsUrl('group', 'index', array('page' => ''));
$arr = array('isaudit' => 0);
if ($cateid) {
$strCate = $new['group']->find('group_cate', array('cateid' => $cateid));
$url = tsUrl('group', 'index', array('cateid' => $cateid, 'page' => ''));
$arr = array('cateid' => $cateid, 'isaudit' => 0);
}
$arrGroup = $new['group']->findAll('group', $arr, 'isrecommend desc,addtime asc', null, $lstart . ',24');
foreach ($arrGroup as $key => $item) {
$arrGroup[$key]['groupname'] = tsTitle($item['groupname']);
$arrGroup[$key]['groupdesc'] = cututf8(t(tsDecode($item['groupdesc'])), 0, 35);
}
$groupNum = $new['group']->findCount('group', $arr);
$pageUrl = pagination($groupNum, 24, $page, $url);
// 我加入的小组
$myGroup = array();
if ($TS_USER['userid']) {
$myGroups = $new['group']->findAll('group_user', array('userid' => $TS_USER['userid']), null, 'groupid');
foreach ($myGroups as $item) {
$myGroup[] = $item['groupid'];
}
}
// 最新10个小组
$arrNewGroup = $new['group']->getNewGroup('10');
// 热门帖子
$arrTopics = $new['group']->findAll('group_topic', null, 'count_comment desc', 'groupid,topicid,title,count_comment', 10);
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:index.php
示例12: tsNotice
tsNotice('留言内容不能为空!');
}
aac('system')->antiWord($content);
$new['user']->create('user_gb', array('userid' => $userid, 'touserid' => $touserid, 'content' => $content, 'addtime' => date('Y-m-d H:i:s')));
//发送系统消息
$msg_userid = '0';
$msg_touserid = $touserid;
$msg_content = '有人在你的留言板上留言了哦,快去看看吧!<br />' . tsUrl('user', 'space', array('id' => $touserid));
aac('message')->sendmsg($msg_userid, $msg_touserid, $msg_content);
tsNotice('留言成功!');
break;
case "redo":
$userid = $new['user']->isLogin();
$touserid = intval($_POST['touserid']);
$reid = intval($_POST['reid']);
$content = tsDecode($_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 = '有人在你的留言板上留言了哦,快去看看吧!<br />' . tsUrl('user', 'space', array('id' => $touserid));
aac('message')->sendmsg($msg_userid, $msg_touserid, $msg_content);
tsNotice('回复成功!');
break;
//删除留言
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:guestbook.php
示例13: defined
<?php
defined('IN_TS') or die('Access Denied.');
switch ($ts) {
case "":
$userid = aac('user')->isLogin();
$albumid = intval($_GET['albumid']);
$strAlbum = $new['attach']->find('attach_album', array('albumid' => $albumid));
$strAlbum['title'] = tsTitle($strAlbum['title']);
$strAlbum['content'] = tsDecode($strAlbum['content']);
if ($strAlbum['userid'] == $userid || $TS_USER['isadmin'] == 1) {
$title = '上传资料';
include template('upload');
} else {
tsNotice('非法操作!');
}
break;
case "do":
$albumid = intval($_POST['albumid']);
$verifyToken = md5('unique_salt' . $addtime);
$strAlbum = $new['attach']->find('attach_album', array('albumid' => $albumid));
if ($albumid == 0 || $_POST['tokens'] != $verifyToken || $strAlbum == '') {
echo 00;
exit;
}
$attachid = $new['attach']->create('attach', array('albumid' => $strAlbum['albumid'], 'userid' => $strAlbum['userid'], 'addtime' => date('Y-m-d H:i:s')));
//上传
$arrUpload = tsUpload($_FILES['Filedata'], $attachid, 'attach', array('xls', 'xlsx', 'pptx', 'docx', 'pdf', 'jpg', 'gif', 'png', 'rar', 'zip', 'doc', 'ppt', 'txt'));
if ($arrUpload) {
$new['attach']->update('attach', array('attachid' => $attachid), array('attachname' => $arrUpload['name'], 'attachtype' => $arrUpload['type'], 'attachurl' => $arrUpload['url'], 'attachsize' => $arrUpload['size']));
//统计
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:upload.php
示例14: tsCutContent
function tsCutContent($text, $length = 50)
{
$text = cututf8(t(tsDecode($text)), 0, $length);
return $text;
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:5,代码来源:tsFunction.php
示例15: defined
defined('IN_TS') or die('Access Denied.');
// 用户是否登录
$userid = aac('user')->isLogin();
//普通不用不允许编辑内容
if ($TS_SITE['isallowedit'] && $TS_USER['isadmin'] == 0) {
tsNotice('系统不允许用户编辑内容,请联系管理员编辑!');
}
switch ($ts) {
case "":
$articleid = intval($_GET['articleid']);
$cateid = intval($_GET['cateid']);
$strArticle = $new['article']->find('article', array('articleid' => $articleid));
if ($strArticle['userid'] == $userid || $TS_USER['isadmin'] == 1) {
$strArticle['title'] = stripslashes($strArticle['title']);
$strArticle['content'] = tsDecode($strArticle['content']);
// 找出TAG
$arrTags = aac('tag')->getObjTagByObjid('article', 'articleid', $articleid);
foreach ($arrTags as $key => $item) {
$arrTag[] = $item['tagname'];
}
$strArticle['tag'] = arr2str($arrTag);
$title = '修改文章';
include template('edit');
} else {
tsNotice('非法操作!');
}
break;
case "do":
if ($_POST['token'] != $_SESSION['token']) {
tsNotice('非法操作!');
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:30,代码来源:edit.php
示例16: defined
<?php
defined('IN_TS') or die('Access Denied.');
$goodsid = intval($_GET['id']);
$strGoods = $new['redeem']->find('redeem_goods', array('goodsid' => $goodsid));
$strGoods['content'] = tsDecode($strGoods['content']);
//谁兑换
$arrUsers = $new['redeem']->findAll('redeem_user', array('goodsid' => $goodsid));
foreach ($arrUsers as $key => $item) {
if (aac('user')->isUser($item['userid']) == false) {
$new['redeem']->delete('redeem_user', array('userid' => $item['userid'], 'goodsid' => $item['goodsid']));
} else {
$arrUser[$key] = aac('user')->getOneUser($item['userid']);
$arrUser[$key]['isreturn'] = $item['isreturn'];
}
}
//最新兑换
$arrNewGoods = $new['redeem']->findAll('redeem_goods', null, 'addtime desc', null, 10);
$title = $strGoods['title'];
include template('goods');
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:20,代码来源:goods.php
示例17: intval
case "":
$albumid = intval($_GET['id']);
$strAlbum = $new['photo']->find('photo_album', array('albumid' => $albumid));
//404
if ($strAlbum == '') {
header("HTTP/1.1 404 Not Found");
header("Status: 404 Not Found");
$title = '404';
include pubTemplate("404");
exit;
}
if ($strAlbum['isaudit'] == 1) {
tsNotice('内容审核中...');
}
$strAlbum['albumname'] = tsTitle($strAlbum['albumname']);
$strAlbum['albumdesc'] = tsDecode($strAlbum['albumdesc']);
$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('photo', 'album', array('id' => $albumid, 'page' => ''));
$lstart = $page * 30 - 30;
$strUser = aac('user')->getOneUser($strAlbum['userid']);
$arrPhoto = $new['photo']->findAll('photo', array('albumid' => $albumid), 'photoid desc', null, $lstart . ',30');
foreach ($arrPhoto as $key => $item) {
$arrPhoto[$key]['photodesc'] = stripslashes($item['photodesc']);
}
$photoNum = $new['photo']->findCount('photo', array('albumid' => $albumid));
$pageUrl = pagination($photoNum, 30, $page, $url);
if ($TS_USER['userid'] == $strAlbum['userid']) {
$title = '' . $strAlbum['albumname'];
} else {
$title = $strAlbum['albumname'];
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:album.php
示例18: defined
defined('IN_TS') or die('Access Denied.');
switch ($ts) {
case "":
$cateid = intval($_GET['id']);
$strCate = $new['article']->find('article_cate', array('cateid' => $cateid));
// 列表
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$url = tsUrl('article', 'cate', array('id' => $cateid, 'page' => ''));
$lstart = $page * 10 - 10;
$arrArticles = $new['article']->findAll('article', array('cateid' => $cateid, 'isaudit' => 0), 'addtime desc', null, $lstart . ',10');
$articleNum = $new['article']->findCount('article', array('cateid' => $cateid, 'isaudit' => 0));
$pageUrl = pagination($articleNum, 10, $page, $url);
foreach ($arrArticles as $key => $item) {
$arrArticle[] = $item;
$arrArticle[$key]['title'] = stripslashes($item['title']);
$arrArticle[$key]['content'] = cututf8(t(tsDecode($item['content'])), 0, 150);
$arrArticle[$key]['user'] = aac('user')->getOneUser($item['userid']);
}
// 推荐阅读
$arrRecommend = $new['article']->getRecommendArticle();
// 一周热门
$arrHot7 = $new['article']->getHotArticle(7);
// 一月热门
$arrHot30 = $new['article']->getHotArticle(30);
$title = $strCate['catename'];
// SEO优化
$sitekey = $strCate['catename'];
$sitedesc = $strCate['catename'] . ' - 文章';
include template('cate');
break;
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:cate.php
示例19: defined
<?php
defined('IN_TS') or die('Access Denied.');
$keys = tsUrlCheck($_GET['key']);
$strInfo = $new['home']->find('home_info', array('infokey' => $keys));
$strInfo['content'] = nl2br(tsDecode($strInfo['content']));
$arrInfo = $new['home']->findAll('home_info');
$title = $strInfo['title'];
include template('info');
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:9,代码来源:info.php
示例20: defined
<?php
defined('IN_TS') or die('Access Denied.');
//资料库
$arrAlbum = $new['attach']->findAll('attach_album', array('isaudit' => 0), 'addtime desc', null, 15);
foreach ($arrAlbum as $key => $item) {
$arrAlbum[$key]['title'] = tsTitle($item['title']);
$arrAlbum[$key]['content'] = tsDecode($item['content']);
$arrAlbum[$key]['user'] = aac('user')->getOneUser($item['userid']);
$new['attach']->update('attach_album', array('albumid' => $item['albumid']), array('count_attach' => $arrAlbum[$key]['count_attach']));
}
$arrAttach = $new['attach']->findAll('attach', null, 'addtime desc', null, 20);
foreach ($arrAttachs as $key => $item) {
$arrAttach[$key]['user'] = aac('user')->getOneUser($item['userid']);
}
$sitekey = $TS_APP['appkey'];
$sitedesc = $TS_APP['appdesc'];
include template("index");
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:18,代码来源:index.php
注:本文中的tsDecode函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论