public function index() { $page = isset($_GET['page']) ? intval($_GET['page']) : '1'; $url = tsurl('feed', 'index', array('page' => '')); $lstart = $page * 20 - 20; $arrFeeds = $this->findAll('feed', null, 'addtime desc', null, $lstart . ',20'); $feedNum = $this->findCount("feed"); $pageUrl = pagination($feedNum, 20, $page, $url); if ($page > 1) { $title = '社区动态 - 第' . $page . '页'; } else { $title = '社区动态'; } foreach ($arrFeeds as $key => $item) { $data = json_decode($item['data'], true); if (is_array($data)) { foreach ($data as $key => $itemTmp) { $tmpkey = '{' . $key . '}'; $tmpdata[$tmpkey] = stripslashes(urldecode($itemTmp)); } } $arrFeed[] = array('user' => aac('user')->getOneUser($item['userid']), 'content' => strtr($item['template'], $tmpdata), 'addtime' => $item['addtime']); } include template('index'); }
public function add() { $js = intval($_GET['js']); $userid = aac('user')->isLogin(1); //判断发布者状态 /* if(aac('user')->isPublisher()==false) { getJson('不好意思,你还没有权限发布内容!',$js); } */ if ($_POST['token'] != $_SESSION['token']) { getJson('非法操作!', $js); } $content = tsClean($_POST['content']); if ($content == '') { getJson('内容不能为空', $js); } $isaudit = 0; //过滤内容开始 aac('system')->antiWord($content); //过滤内容结束 $weiboid = $this->create('weibo', array('userid' => $userid, 'locationid' => aac('user')->getLocationId($userid), 'content' => $content, 'isaudit' => $isaudit, 'addtime' => date('Y-m-d H:i:s'), 'uptime' => date('Y-m-d H:i:s'))); //feed开始 $feed_template = '<span class="pl">说:</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('weibo', 'show', array('id' => $weiboid)), 'content' => cututf8(t($content), '0', '50')); aac('feed')->add($userid, $feed_template, $feed_data); //feed结束 getJson('发布成功!', $js, 2, tsurl('weibo', 'show', array('id' => $weiboid))); }
?> ">最新圖</a></li> <?php if ($ac == 'album' && $ts == 'user') { ?> <li role="presentation" class="active"><a href="<?php echo tsurl('photo', 'album', array(ts => user, userid => $userid)); ?> ">我的圖</a></li> <?php } if ($ts != 'user' && intval($TS_USER['userid']) > '0') { ?> <li role="presentation"><a href="<?php echo tsurl('photo', 'album', array(ts => user, userid => $TS_USER['userid'])); ?> ">我的圖</a></li> <?php } ?> <li role="presentation" <?php if ($ac == 'create') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('photo', 'create'); ?> ">创建圖</a></li> </ul>
} ?> ><a href="<?php echo tsurl('message', 'friend'); ?> "><i class="icon-envelope"></i>私信</a></li> </ul> <ul class="menus"> <li <?php if ($app == 'my' && $ac == 'setting') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('my', 'setting', array('ts' => 'base')); ?> "><i class="icon-gear"></i>账户设置</a></li> <li <?php if ($app == 'my' && $ac == 'score') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('my', 'score'); ?> "><i class="icon-money"></i>积分</a></li> </ul> </div>
<li class="br"><span class="fs14"><a href="<?php echo tsurl('user', 'group', array('id' => $strUser['userid'])); ?> "><?php echo $strUser['count_group']; ?> </a></span><br />文化</li> <li><span class="fs14"><a href="<?php echo tsurl('user', 'follow', array('id' => $strUser['userid'])); ?> "><?php echo $strUser['count_follow']; ?> </a></span><br />关注</li> <li class="br"><span class="fs14"><a href="<?php echo tsurl('user', 'followed', array('id' => $strUser['userid'])); ?> "><?php echo $strUser['count_followed']; ?> </a></span><br />粉丝</li> </ul> <div class="fmore"> <?php if ($strUser['signed']) { echo nl2br(htmlspecialchars($strUser['signed'])); ?> <br /><?php } elseif ($strUser['userid'] == $TS_USER['userid']) { ?> 签名:亲~还没有签名,赶快去写一个吧<br /><?php
?> "><?php echo $item['title']; ?> </a> <?php } else { echo $item['title']; ?> </a> <?php } if ($item['postby'] == 1) { ?> <a href="<?php echo tsurl('home', 'phone'); ?> "><img align="absmiddle" alt="通过Iphone手机端发布" title="通过Iphone手机端发布" src="<?php echo SITE_URL; ?> public/images/ios.jpg" /></a><?php } ?> </div> <div class="topic_info"> <div class="re_desc"><?php echo $item['desc']; ?> </div> </div> </div>
echo tsurl('group', 'edit', array('groupid' => $strGroup['groupid'], 'ts' => 'type')); ?> ">帖子分类</a></li> <li role="presentation" <?php if ($ts == "cate") { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('group', 'edit', array('groupid' => $strGroup['groupid'], 'ts' => 'cate')); ?> ">文化分类</a></li> <?php if ($strGroup['joinway'] == 2) { ?> <li role="presentation" <?php if ($ts == "useraudit") { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('group', 'edit', array('groupid' => $strGroup['groupid'], 'ts' => 'useraudit')); ?> ">成员审核</a></li> <?php } ?> </ul> <div style="height:20px;"></div>
<div class="col-md-4"></div> <div class="col-md-4"> <form role="form" method="POST" action="<?php echo tsurl('photo', 'create', array('ts' => 'do')); ?> "> <div class="form-group"> <input type="text" name="albumname" class="form-control" placeholder="圖名" > </div> <div class="form-group"> <textarea class="form-control" rows="3" name="albumdesc" placeholder="圖介绍"></textarea> </div> <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?> " /> <button class="btn btn-success" type="submit">创建圖</button> <a href="<?php echo tsurl('photo', 'album', array(ts => user, userid => $userid)); ?> ">返回我的圖</a> </form> <p> </p> </div> <div class="col-md-4"></div> </div> </div> </div> </div> <?php include template('footer');
<li role="presentation" <?php if ($ac == 'my') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('message', 'my'); ?> ">最新消息</a></li> <li role="presentation" <?php if ($ac == 'system') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('message', 'system'); ?> ">系统消息</a></li> <li role="presentation" <?php if ($ac == 'friend' || $ac == 'user') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('message', 'friend'); ?> ">好友消息</a></li> </ul>
<div class="form-group"> <input type="hidden" name="jump" value="<?php echo $jump; ?> " /> <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?> " /> <button id="comm-submit" type="submit" class="btn btn-fat btn-success iw">登录</button> </div> <div><a href="<?php echo tsurl('user', 'register'); ?> ">还没有注册?</a> | <a href="<?php echo tsurl('user', 'forgetpwd'); ?> ">忘记密码?</a></div> <div class="form-group"> <div class="checkbox"> <label> <input type="checkbox" name="cktime" value="31536000"> 记住我 </label> </div> </div> </form> <div> <?php doAction('user_login_footer'); ?> </div>
<div class="bc"> <?php include template('menu'); ?> <div class="albumlist"> <ul> <?php foreach ((array) $arrAlbum as $key => $item) { ?> <li> <div> <h2><a href="<?php echo tsurl('attach', 'album', array('id' => $item['albumid'])); ?> "><?php echo $item['title']; ?> </a></h2> <p>作者:<?php echo $item['user']['username']; ?> </p> <p>时间:<?php echo date('Y-m-d', strtotime($item['addtime'])); ?> </p> <p>资料:<?php echo $item['count_attach'];
<?php if ($strUser['face'] == '' && intval($TS_SITE['isface']) == 1) { ?> <div class="alert alert-info">提示:你必须上传头像才可以正常使用本社区</div> <?php } if ($strUser['path']) { ?> <div class="alert alert-success"> 您已经上传头像!现在可以随便点点看看我们的社区! </div> <?php } else { ?> <form method="post" action="<?php echo tsurl('user', 'verify', array('ts' => 'facedo')); ?> " enctype="multipart/form-data"> <div class="form-group"> <label>上传头像:</label> <p><img alt="<?php echo $strUser['username']; ?> " src="<?php echo $strUser['face']; ?> ?v=<?php echo rand(); ?> " width="120" /></p> </div>
</div> <div class="page"><?php echo $pageUrl; ?> </div> </div> <div class="cright"> <div class="bbox"> <div class="btitle">热门标签</div> <div class="bc"> <div class="tags"> <?php foreach ((array) $arrTag as $key => $item) { ?> <a href="<?php echo tsurl('article', 'tag', array('id' => urlencode($item['tagname']))); ?> "><?php echo $item['tagname']; ?> </a> <?php } ?> </div> </div> </div> </div> </div> </div> <?php
<input type="radio" name="iscommentshow" value="1" <?php if ($strTopic['iscommentshow'] == '1') { ?> checked="select"<?php } ?> />需要 </div> <input type="hidden" name="topicid" value="<?php echo $strTopic['topicid']; ?> " /> <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?> " /> <button class="btn btn-success" type="submit">修改</button> <a href="<?php echo tsurl('group', 'topic', array('id' => $strTopic['topicid'])); ?> ">返回</a> <p></p> </form> </div> <div class="col-md-2"></div> </div> </div> </div> </div> <?php include template('footer');
echo $item['user']['face']; ?> " width="16" align="absmiddle" /> <?php echo $item['user']['username']; ?> :<?php echo $item['content']; ?> <a href="<?php echo tsurl('message', 'user', array('touserid' => $item['userid'])); ?> ">[回复]</a><?php } else { ?> 系统消息:<a href="<?php echo tsurl('message', 'system'); ?> ">[查看]</a><?php } ?> </li> <?php } ?> </ul> </div> </div> </div> </div> </div> </div>
?> index.php?app=group&ac=audit&ts=delete&topicid=<?php echo $item['topicid']; ?> &groupid=<?php echo $item['groupid']; ?> " onClick="return confirm('确定删除吗?')">删除</a> </td></tr> <?php } ?> </tbody> </table> </div> </div> </div> <div class="col-md-4"> <div class="bbox"> <div class="bc"> > <a href="<?php echo tsurl('group', 'show', array('id' => $groupid)); ?> ">返回文化</a> </div> </div> </div> </div> </div> <?php include template('footer');
我<?php } else { echo $strUser['username']; } ?> 的圖首页</a> </div> <div class="row"> <?php if ($arrPhoto) { foreach ((array) $arrPhoto as $key => $item) { ?> <div class="col-sm-6 p3"> <div class="thumbnail"> <a href="<?php echo tsurl('photo', 'show', array('id' => $item['photoid'])); ?> "><img src="<?php echo tsXimg($item['photourl'], 'photo', 300, '300', $item['path'], 1); ?> " alt="<?php echo $strAlbum['albumname']; echo $item['photoname']; ?> " class="p3"></a> <div class="caption"> </div> </div> </div> <?php }
<?php defined('IN_TS') or die('Access Denied.'); ?> <ul class="nav nav-tabs nw" role="tablist"> <li role="presentation" <?php if ($ac == 'space') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('user', 'space', array('id' => $strUser['userid'])); ?> ">分享</a></li> <li role="presentation" <?php if ($ac == 'group') { ?> class="active"<?php } ?> ><a href="<?php echo tsurl('user', 'group', array('id' => $strUser['userid'])); ?> ">文化</a></li> </ul> <div class="ht10"></div>
<div class="content"><?php echo nl2br(htmlspecialchars($item['content'])); ?> </div> <p style="text-align:right"> <?php if (intval($TS_USER['userid'] == $strUser['userid'])) { ?> <a href="#reguest" onclick="reguest('<?php echo $item['userid']; ?> ','<?php echo $item['id']; ?> ')">回复</a> <a href="<?php echo tsurl('user', 'guestbook', array('ts' => 'delete', 'gbid' => $item['id'])); ?> " onclick="return confirm('确定删除?')">删除</a> <?php } ?> </p> <!--回复留言--> </div> </li> <?php } ?> </ul> </div> <div class="clear"></div>
"><img src="<?php if ($item['photo']) { echo tsXimg($item['photo'], 'event', '220', '150', $item['path'], '1'); } else { echo SITE_URL; ?> app/event/skins/default/event.jpg<?php } ?> " alt="<?php echo $item['title']; ?> " height="150"></a> <div class="caption"> <h3><a href="<?php echo tsurl('event', 'show', array('id' => $item['eventid'])); ?> "><?php echo cututf8($item['title'], 0, 10, false); ?> </a></h3> <p>开始时间:<?php echo date('Y-m-d H:i', strtotime($item['starttime'])); ?> <br /> 结束时间:<?php echo date('Y-m-d H:i', strtotime($item['endtime'])); ?> <br> <?php echo $item['count_userdo'];
?> <tr> <td><?php echo $item['infoid']; ?> </td> <td><?php echo $item['infokey']; ?> </td> <td><?php echo $item['title']; ?> </td> <td><?php echo tsurl('home', 'info', array('key' => $item['infokey'])); ?> </td> <td><a href="<?php echo SITE_URL; ?> index.php?app=home&ac=admin&mg=info&ts=edit&infoid=<?php echo $item['infoid']; ?> ">修改</a> | <a href="<?php echo SITE_URL; ?> index.php?app=home&ac=admin&mg=info&ts=delete&infoid=<?php echo $item['infoid']; ?> ">删除</a></td>
$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; }
echo tsurl('group', 'my', array('my' => 'index')); ?> ">加入的文化</a></li> <li role="presentation"><a href="<?php echo tsurl('group', 'my', array('my' => 'created')); ?> ">创建的文化</a></li> </ul> <div class="facelist"> <ul> <?php foreach ((array) $arrGroup as $key => $item) { ?> <li> <a href="<?php echo tsurl('group', 'show', array('id' => $item['groupid'])); ?> "> <img alt="<?php echo $item['groupname']; ?> " title="<?php echo $item['groupname']; ?> " src="<?php echo $item['photo']; ?> " width="48" /> <p><?php echo $item['groupname']; ?>
?> </div> </div> <div class="col-md-9"> <div class="my_right"> <div class="rc"> <?php doAction('my_right_top'); include template('setting_menu'); ?> <div style="height:30px;"></div> <div class="row"> <div class="col-md-1"></div> <div class="col-md-7"> <form role="form" method="POST" action="<?php echo tsurl('my', 'setting', array('ts' => 'emaildo')); ?> "> <div class="form-group"> <label>当前Email:</label> <p><?php echo $strUser['email']; ?> </p> </div> <div class="form-group"> <input class="form-control" name="email" type="email" placeholder="新Email"/> </div> <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>
doAction('my_right_top'); ?> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="">我的夢想</a></li> </ul> <table class="table"> <thead> <tr><th>标题</th><th>时间</th><th>操作</th></tr> </thead> <tbody> <?php foreach ((array) $arrArticle as $key => $item) { ?> <tr><td> <a target="_blank" href="<?php echo tsurl('article', 'show', array('id' => $item['articleid'])); ?> "><?php echo $item['title']; ?> </a></td><td><?php echo $item['addtime']; ?> </td><td> <a target="_blank" href="<?php echo SITE_URL; ?> index.php?app=article&ac=edit&articleid=<?php echo $item['articleid']; ?> ">修改</a> |
echo $item['user'][username]; ?> " alt="<?php echo $item['user'][username]; ?> " src="<?php echo $item['user'][face]; ?> " width="48" height="48" /></a> <?php } ?> </li> <li class="mbtr"> <a href="<?php echo tsurl('user', 'space', array('id' => $item['user'][userid])); ?> "><?php echo $item['user'][username]; ?> </a> <?php echo $item['content']; ?> </li> <div class="clear"></div> <?php } ?> </ul>
?> /skins/<?php echo $skin; ?> /photo_album.png<?php } else { echo tsXimg($item['albumface'], 'photo', 170, '170', $item['path'], 1); } ?> " width="170" alt="<?php echo $item['albumname']; ?> " /></a> <div class="albumlst_r"> <p class="pd05"><a target="_blank" href="<?php echo tsurl('photo', 'album', array('id' => $item['albumid'])); ?> "><?php echo $item['albumname']; ?> </a></p> <p class="pd05"> <?php echo $item['count_photo']; ?> 张照片 <br /> <?php echo $item['addtime']; ?> 创建<br>
checked="select"<?php } ?> type="radio" name="ispostaudit" value="0" />不审核 </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <input type="hidden" name="groupid" value="<?php echo $strGroup['groupid']; ?> " /> <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?> " /> <button type="submit" class="btn btn-success">提交修改</button> <a href="<?php echo tsurl('group', 'show', array('id' => $strGroup['groupid'])); ?> ">返回</a> </div> </div> </form> </div> <div class="col-md-4"></div> </div> </div> </div> </div> <?php include template('footer');
<a title="<?php echo $item['title']; ?> " href="<?php echo SITE_URL; echo tsUrl($item['appkey'], $item['appaction'], array('id' => $item['appid'])); ?> "><?php echo $item['title']; ?> </a> <?php } else { ?> <a href="<?php echo tsurl('group', 'topic', array('id' => $item['topicid'])); ?> "><?php echo htmlspecialchars($item['title']); ?> </a> <i><?php echo $item['count_comment']; ?> </i> <?php } ?> </li> <?php } ?>
defined('IN_TS') or die('Access Denied.'); include template('header'); doAction('tseditor'); ?> <div class="container"> <ol class="breadcrumb"> <li><a href="<?php echo SITE_URL; ?> ">首页</a></li> <li><a href="<?php echo tsurl('article'); ?> ">夢想</a></li> <li><a href="<?php echo tsurl('article', 'show', array('id' => $strArticle['articleid'])); ?> "><?php echo $strArticle['title']; ?> </a></li> <li class="active">修改夢想</li> </ol> <div class="panel panel-default"> <div class="panel-body"> <div class="row"> <div class="col-md-2"></div> <div class="col-md-8"> <form method="POST" action="<?php echo SITE_URL; ?>