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


PHP aac函数代码示例

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


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

示例1: 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

示例2: 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

示例3: index

 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');
 }
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:25,代码来源:action.feed.php

示例4: photo

function photo()
{
    $arrAlbum = aac('photo')->findAll('photo_album', array('isrecommend' => 1), 'addtime desc', null, 12);
    foreach ($arrAlbum as $key => $item) {
        $arrAlbum[$key]['albumname'] = tsTitle($item['albumname']);
    }
    include template('photo', 'photo');
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:8,代码来源:photo.php

示例5: 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

示例6: 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

示例7: login

function login()
{
    global $TS_USER;
    if ($TS_USER['userid']) {
        $strUser = aac('user')->getOneUser($TS_USER['userid']);
        $strUser['rolename'] = aac('user')->getRole($strUser['count_score']);
    }
    include template('login', 'login');
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:9,代码来源:login.php

示例8: signuser

function signuser()
{
    $arrUser = aac('user')->getHotUser(20);
    echo '<div class="panel panel-default">';
    echo '<div class="panel-heading">最新签到用户</div>';
    echo '<div class="panel-body facelist"><ul>';
    foreach ($arrUser as $key => $item) {
        echo '<li><a href="' . tsUrl('user', 'space', array('id' => $item['userid'])) . '"><img class="img-circle" src="' . $item['face'] . '" alt="' . $item['username'] . '" width="48" height="48" /></a><div><a href="' . tsUrl('user', 'space', array('id' => $item['userid'])) . '">' . cututf8(t($item['username']), 0, 5, false) . '</a></div></li>';
    }
    echo '</ul></div><div class="clear"></div></div>';
}
开发者ID:rockylo,项目名称:ThinkSAAS,代码行数:11,代码来源:signuser.php

示例9: index

 public function index()
 {
     $strUser = aac('user')->getOneUser($GLOBALS['TS_USER']['userid']);
     $page = isset($_GET['page']) ? intval($_GET['page']) : '1';
     $url = tsUrl('weibo', 'my', array('my' => 'index', 'page' => ''));
     $lstart = $page * 20 - 20;
     $arrWeibo = $this->findAll('weibo', array('userid' => $strUser['userid']), 'uptime desc', null, $lstart . ',20');
     $weiboNum = $this->findCount('weibo', array('userid' => $strUser['userid']));
     $pageUrl = pagination($weiboNum, 20, $page, $url);
     $title = '我的唠叨';
     include template('my/index');
 }
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:12,代码来源:my.weibo.php

示例10: newtopic

function newtopic()
{
    global $db;
    //最新帖子
    $arrTopics = aac('group')->findAll('group_topic', array('isaudit' => 0), 'uptime desc', null, 35);
    foreach ($arrTopics as $key => $item) {
        $arrTopic[] = $item;
        $arrTopic[$key]['title'] = tsTitle($item['title']);
        $arrTopic[$key]['user'] = aac('user')->getOneUser($item['userid']);
        $arrTopic[$key]['group'] = aac('group')->getOneGroup($item['groupid']);
    }
    include template('newtopic', 'newtopic');
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:13,代码来源:newtopic.php

示例11: hottopic

function hottopic()
{
    $arrHotTopics = aac('group')->getHotTopic(7);
    echo '<div class="bs"><div class="bbox">';
    echo '<div class="btitle">热分享</div>';
    echo '<div class="bc commlist">';
    echo '<ul>';
    foreach ($arrHotTopics as $key => $item) {
        echo '<li><a href="' . tsUrl('group', 'topic', array('id' => $item['topicid'])) . '">' . cututf8(stripslashes($item['title']), 0, 20, false) . '</a> (' . $item['count_view'] . ')</li>';
    }
    echo '</ul>';
    echo '</div>';
    echo '</div></div>';
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:14,代码来源:hottopic.php

示例12: getEventComment

 function getEventComment($page = 1, $prePageNum, $eventid)
 {
     $start_limit = !empty($page) ? ($page - 1) * $prePageNum : 0;
     $limit = $prePageNum ? "LIMIT {$start_limit}, {$prePageNum}" : '';
     $arrGroupContentComment = $this->db->fetch_all_assoc("select * from " . dbprefix . "event_comment where eventid='{$eventid}' order by addtime desc {$limit}");
     if (is_array($arrGroupContentComment)) {
         foreach ($arrGroupContentComment as $key => $item) {
             //$arrGroupContentComment[$key]['user'] = $this->getUserData($item['userid']);
             $arrGroupContentComment[$key]['user'] = aac('user')->getOneUser($item['userid']);
             $arrGroupContentComment[$key]['content'] = hview($item['content']);
         }
     }
     return $arrGroupContentComment;
 }
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:14,代码来源:class.event.php

示例13: newgroup

function newgroup()
{
    $arrNewGroups = aac('group')->findAll('group', array('isaudit' => 0), 'addtime desc', null, 10);
    foreach ($arrNewGroups as $key => $item) {
        $arrNewGroup[] = $item;
        $arrNewGroup[$key]['groupname'] = tsTitle($item['groupname']);
        $arrNewGroup[$key]['user'] = aac('user')->find('user_info', array('userid' => $item['userid']), 'userid,username');
    }
    echo '<div class="panel panel-default">';
    echo '<div class="panel-heading">最新创建小组</div>';
    echo '<div class="panel-body commlist"><ul>';
    foreach ($arrNewGroup as $key => $item) {
        echo '<li><a href="' . tsUrl('group', 'show', array('id' => $item['groupid'])) . '">' . $item['groupname'] . '</a> By <a href="' . tsUrl('user', 'space', array('id' => $item['user']['userid'])) . '">' . $item['user']['username'] . '</a></li>';
    }
    echo '</ul></div>';
    echo '</div>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:17,代码来源:newgroup.php

示例14: tag

function tag()
{
    //最新标签
    $arrTag = aac('tag')->findAll('tag', "`count_topic`>'0'", 'uptime desc', null, 30);
    foreach ($arrTag as $key => $item) {
        $arrTag[$key]['tagname'] = tsTitle($item['tagname']);
    }
    //echo '<div class="bbox">'.doAction('gobad','home_left_1').'</div>';
    echo '<div class="panel panel-default">';
    echo '<div class="panel-heading">热门标签<small><a href="' . tsUrl('group', 'tags') . '">更多</a></small></div>';
    echo '<div class="panel-body tags">';
    foreach ($arrTag as $key => $item) {
        echo '<a href="' . tsUrl('group', 'tag', array('id' => urlencode($item['tagname']))) . '">' . $item['tagname'] . '</a>';
    }
    echo '</div></div>';
    //echo '<div class="bbox">'.doAction('gobad','home_left_2').'</div>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:17,代码来源:tag.php

示例15: recommendgroup

function recommendgroup()
{
    $arrRecommendGroup = aac('group')->getRecommendGroup('12');
    echo '<div class="panel panel-default">';
    echo '<div class="panel-heading">推荐小组</div>';
    echo '<div class="panel-body">';
    foreach ($arrRecommendGroup as $key => $item) {
        $count_user = $item['count_user'];
        echo '<div class="sub-item">
	<div class="pic">
	<a href="' . tsUrl('group', 'show', array('id' => $item[groupid])) . '">
	<img src="' . $item['photo'] . '" alt="' . $item['groupname'] . '" title="' . $item['groupname'] . '" />
	</a>
	</div>
	<div class="info">
	<a href="' . tsUrl('group', 'show', array('id' => $item[groupid])) . '">' . $item['groupname'] . '</a> (' . $count_user . ')             
	<p>' . cututf8(t($item['groupdesc']), 0, 50) . '</p>
	</div>
	</div>';
    }
    echo '</div>';
    echo '<div class="clear"></div>';
    echo '</div>';
}
开发者ID:rockylo,项目名称:ThinkSAAS,代码行数:24,代码来源:recommendgroup.php


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