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


PHP tsUrl函数代码示例

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


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

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

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

示例3: hottopic

function hottopic()
{
    $arrHotTopics = aac('group')->getHotTopic(7);
    echo '<div class="panel panel-default">';
    echo '<div class="panel-heading">热门话题</div>';
    echo '<div class="panel-body 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>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:14,代码来源:hottopic.php

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

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

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

示例7: aac

    }
}
//判断用户是否上传头像,管理员除外
if ($TS_SITE['isface'] == 1 && intval($TS_USER['userid']) > 0 && $TS_URL['app'] != 'system' && $TS_URL['ac'] != 'admin') {
    $faceUser = aac('user')->find('user_info', array('userid' => intval($TS_USER['userid'])));
    if ($faceUser['face'] == '' && $TS_URL['app'] != 'user' && $TS_USER['isadmin'] != 1) {
        tsHeaderUrl(tsUrl('user', 'verify', array('ts' => 'face')));
    }
}
//用户自动登录
if (intval($TS_USER['userid']) == 0 && $_COOKIE['ts_email'] && $_COOKIE['ts_autologin']) {
    $loginUserNum = aac('user')->findCount('user_info', array('email' => $_COOKIE['ts_email'], 'autologin' => $_COOKIE['ts_autologin']));
    if ($loginUserNum > 0) {
        $loginUserData = aac('user')->find('user_info', array('email' => $_COOKIE['ts_email']), 'userid,username,path,face,ip,isadmin,signin,uptime');
        if ($loginUserData['ip'] != getIp() && $TS_URL['app'] != 'user' && $TS_URL['ac'] != 'login') {
            tsHeaderUrl(tsUrl('user', 'login', array('ts' => 'out')));
        }
        //用户session信息
        $_SESSION['tsuser'] = array('userid' => $loginUserData['userid'], 'username' => $loginUserData['username'], 'path' => $loginUserData['path'], 'face' => $loginUserData['face'], 'isadmin' => $loginUserData['isadmin'], 'signin' => $loginUserData['signin'], 'uptime' => $loginUserData['uptime']);
        $TS_USER = $_SESSION['tsuser'];
    }
}
$tsHooks = array();
if ($TS_URL['app'] != 'system' && $TS_URL['app'] != 'pubs') {
    //加载公用插件
    $public_plugins = fileRead('data/pubs_plugins.php');
    if ($public_plugins == '') {
        $public_plugins = $tsMySqlCache->get('pubs_plugins');
    }
    if ($public_plugins && is_array($public_plugins)) {
        foreach ($public_plugins as $item) {
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:thinksaas.php

示例8: defined

<?php

defined('IN_TS') or die('Access Denied.');
include 'userinfo.php';
$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('user', 'topic', array('id' => $strUser['userid'], 'page' => ''));
$lstart = $page * 30 - 30;
$arrTopic = $new['user']->findAll('group_topic', array('userid' => $strUser['userid']), 'addtime desc', null, $lstart . ',30');
$topicNum = $new['user']->findCount('group_topic', array('userid' => $strUser['userid']));
$pageUrl = pagination($topicNum, 30, $page, $url);
$title = $strUser['username'] . '的帖子';
include template('topic');
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:12,代码来源:topic.php

示例9: arr2str

    $sitekey = arr2str($arrTag);
} else {
    $sitekey = $strTopic['title'];
}
//标题
$title = $strTopic['title'];
// 评论列表开始
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$url = tsUrl('group', 'topic', array('id' => $topicid, 'page' => ''));
$lstart = $page * 15 - 15;
$arrComment = $new['group']->findAll('group_topic_comment', array('topicid' => $topicid), 'addtime asc', null, $lstart . ',15');
foreach ($arrComment as $key => $item) {
    $arrTopicComment[] = $item;
    $arrTopicComment[$key]['l'] = ($page - 1) * 15 + $key + 1;
    $arrTopicComment[$key]['user'] = aac('user')->getOneUser($item['userid']);
    $arrTopicComment[$key]['content'] = @preg_replace("/\\[@(.*)\\:(.*)]/U", "<a href='" . tsUrl('user', 'space', array('id' => '$2')) . " ' rel=\"face\" uid=\"\$2\"'>@\$1</a>", tsDecode($item['content']));
    $arrTopicComment[$key]['recomment'] = $new['group']->recomment($item['referid']);
}
$commentNum = $new['group']->findCount('group_topic_comment', array('topicid' => $strTopic['topicid']));
$pageUrl = pagination($commentNum, 15, $page, $url);
// 评论列表结束
//7天内的热门帖子
$arrHotTopic = $new['group']->getHotTopic(7);
//推荐帖子
$arrRecommendTopic = $new['group']->getRecommendTopic();
//本组热门帖子
$arrGroupHotTopic = $new['group']->findAll('group_topic', array('groupid' => $strGroup['groupid'], 'isaudit' => 0), 'count_view desc', null, 10);
$sitedesc = cututf8(t($strTopic['content']), 0, 100);
include template('topic');
// 增加浏览次数
$new['group']->update('group_topic', array('topicid' => $strTopic['topicid']), array('count_view' => $strTopic['count_view'] + 1));
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:topic.php

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

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

示例12: template

    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)));
        break;
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:31,代码来源:create.php

示例13: defined

<?php

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

示例14: defined

<?php

defined('IN_TS') or die('Access Denied.');
switch ($ts) {
    case "":
        include 'userinfo.php';
        $page = isset($_GET['page']) ? intval($_GET['page']) : '1';
        $url = tsUrl('user', 'follow', array('id' => $strUser['userid'], 'page' => ''));
        $lstart = $page * 80 - 80;
        //关注的用户
        $arrUsers = $new['user']->findAll('user_follow', array('userid' => $strUser['userid']), 'addtime desc', null, $lstart . ',80');
        $userNum = $new['user']->findCount('user_follow', array('userid' => $strUser['userid']));
        $pageUrl = pagination($userNum, 80, $page, $url);
        if (is_array($arrUsers)) {
            foreach ($arrUsers as $item) {
                $arrUser[] = $new['user']->getOneUser($item['userid_follow']);
            }
        }
        $title = $strUser['username'] . '关注的人';
        include template("follow");
        break;
        //关注执行
    //关注执行
    case "do":
        $userid = intval($TS_USER['userid']);
        $userid_follow = intval($_GET['userid']);
        if ($_GET['token'] != $_SESSION['token']) {
            echo json_encode(array('status' => 0, 'msg' => '非法操作!'));
            exit;
        }
        if ($userid == 0) {
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:31,代码来源:follow.php

示例15: array

         $groupUserNum = $new['group']->findCount('group_user', array('userid' => $iuserid, 'groupid' => $groupid));
         if ($groupUserNum > 0) {
             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');
开发者ID:GithuberFan,项目名称:ThinkSAAS,代码行数:31,代码来源:do.php


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