• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP topic_get函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ckstart

    ckstart($start, $perpage);
    $list = array();
    $cid = empty($_GET['cid']) ? 0 : intval($_GET['cid']);
    $csql = $cid ? "cid='{$cid}' AND" : '';
    $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('comment') . " WHERE {$csql} id='{$id}' AND idtype='sid'"), 0);
    if ($count) {
        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('comment') . " WHERE {$csql} id='{$id}' AND idtype='sid' ORDER BY dateline LIMIT {$start},{$perpage}");
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            realname_set($value['authorid'], $value['author']);
            $list[] = $value;
        }
    }
    // pagination
    $multi = multi($count, $perpage, $page, "space.php?uid={$share['uid']}&do=share&id={$id}", '', 'comment_ul');
    //相关 hot value
    $topic = topic_get($share['topicid']);
    realname_get();
    $tpl_title = getstr($share['title_template'], 0, 0, 0, 0, 0, -1);
    include_once template("space_share_view");
} else {
    if (empty($_GET['view']) && $space['friendnum'] < $_SCONFIG['showallfriendnum']) {
        $_GET['view'] = 'all';
        //默认显示
    }
    $perpage = 20;
    //Check start number
    $start = ($page - 1) * $perpage;
    ckstart($start, $perpage);
    //处理查询
    $f_index = '';
    if ($_GET['view'] == 'all') {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:space_share.php


示例2: intval

		// 活动查看数加 1
		if($event['uid'] != $_SGLOBAL['supe_uid']){
			$_SGLOBAL['db']->query("UPDATE ".tname("event")." SET viewnum=viewnum+1 WHERE eventid='$eventid'");
			$event['viewnum'] += 1;
		}

		//活动开始倒计时
		if($event['starttime'] > $_SGLOBAL['timestamp']) {
			$countdown = intval((mktime(0,0,0,gmdate('m',$event['starttime']),gmdate('d',$event['starttime']),gmdate('Y',$event['starttime'])) -
						mktime(0,0,0,gmdate('m',$_SGLOBAL['timestamp']),gmdate('d',$_SGLOBAL['timestamp']),gmdate('Y',$_SGLOBAL['timestamp']))) / 86400);
		}
	}


	//相关热点
	$topic = topic_get($event['topicid']);

	realname_get();

	$menu = array($view => ' class="active"');

	$_TPL['css'] = 'event';
	include template("space_event_view");

} else {// 活动列表

	if(!in_array($view, array("friend","me","all","recommend","city"))){
		$view = "all";
	}
	if($view == "friend" && !$space['friendnum']) {
		$view = "me";
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:space_event.php


示例3: topic_check

function topic_check($topicid, $type) {
	global $_SGLOBAL, $space;
	
	$topicid = intval($topicid);
	$newtopcid = $topicid;
	if($topic = topic_get($topicid)) {
		if($topic['joingid']) {
			if(!in_array($space['groupid'], $topic['joingid'])) $newtopcid = 0;
		}
		if($topic['jointype']) {
			if(!in_array($type, $topic['jointype'])) $newtopcid = 0;
		}
	} else {
		$newtopcid = 0;
	}
	return $newtopcid;
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:17,代码来源:function_cp.php


示例4: while

        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            $value['pic'] = pic_get($value['pic'], $value['thumb'], $value['remote']);
            $value['lastpost'] = sgmdate('m-d H:i', $value['lastpost']);
            $value['dateline'] = sgmdate('m-d H:i', $value['dateline']);
            $value['endtime'] = $value['endtime'] ? sgmdate('m-d H:i', $value['endtime']) : '';
            $value['message'] = getstr($value['message'], 200, 0, 0, 0, 0, -1);
            realname_set($value['uid'], $value['username']);
            $list[] = $value;
        }
        $multi = multi($count, $perpage, $page, 'space.php?do=topic');
    }
    realname_get();
    $_TPL['css'] = 'event';
    include_once template('space_topic_list');
} else {
    if (!($topic = topic_get($topicid))) {
        showmessage('topic_no_found');
    }
    if ($topic['uid'] == $_SGLOBAL['supe_uid']) {
        $managetopic = 1;
    }
    $page = intval($_GET['page']);
    if ($page < 1) {
        $page = 1;
    }
    realname_set($topic['uid'], $topic['username']);
    $bloglist = $piclist = $threadlist = $polllist = $eventlist = $sharelist = $spacelist = array();
    $perpages = array();
    $start = 0;
    if ($_GET['view'] && in_array($_GET['view'], $topic['jointype'])) {
        $perpages[$_GET['view']] = 30;
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:space_topic.php


示例5: elseif

    if ($blog['friend'] == 4) {
        $passwordstyle = '';
    } elseif ($blog['friend'] == 2) {
        $selectgroupstyle = '';
        if ($blog['target_ids']) {
            $names = array();
            $query = $_SGLOBAL['db']->query("SELECT username FROM " . tname('space') . " WHERE uid IN ({$blog['target_ids']})");
            while ($value = $_SGLOBAL['db']->fetch_array($query)) {
                $names[] = $value['username'];
            }
            $blog['target_names'] = implode(' ', $names);
        }
    }
    $blog['message'] = str_replace('&amp;', '&amp;amp;', $blog['message']);
    $blog['message'] = shtmlspecialchars($blog['message']);
    $allowhtml = checkperm('allowhtml');
    //好友组
    $groups = getfriendgroup();
    //参与热点
    $topic = array();
    $topicid = $_GET['topicid'] = intval($_GET['topicid']);
    if ($topicid) {
        $topic = topic_get($topicid);
    }
    if ($topic) {
        $actives = array('blog' => ' class="active"');
    }
    //菜单激活
    $menuactives = array('space' => ' class="active"');
}
include_once template("cp_blog");
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:cp_blog.php


示例6: array

        if ($value['clicknum'] > $maxclicknum) {
            $maxclicknum = $value['clicknum'];
        }
        $clicks[$key] = $value;
    }
    //点评
    $clickuserlist = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . "\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\n\t\tORDER BY dateline DESC\n\t\tLIMIT 0,18");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $value['clickname'] = $clicks[$value['clickid']]['name'];
        $clickuserlist[] = $value;
    }
    //热点
    $topic = topic_get($bwzt['topicid']);
    //实名
    realname_get();
    $_TPL['css'] = 'bwzt';
    //include_once template("space_bwzt_view");
    $commenttip = array("commentsubmit" => true, "formhash" => formhash(), "id" => $bwzt[bwztid], "idtype" => "bwztid", "message" => "", "refer" => "");
    $bwzt["replylist"] = $list;
    $bwzt["comment"] = $commenttip;
    //增加发布者头像地址
    $bwzt['avatar_url'] = avatar($bwzt['uid'], 'middle', TRUE);
    $bwzt['message'] = strip_tags($bwzt['message']);
    //剥去字符串中的 HTML 标签
    capi_showmessage_by_data("do_success", 0, array('bwzt' => $bwzt));
} else {
    //分页
    $perpage = 10;
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:space_bwzt.php


示例7: array

        if ($value['clicknum'] > $maxclicknum) {
            $maxclicknum = $value['clicknum'];
        }
        $clicks[$key] = $value;
    }
    //点评
    $clickuserlist = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . "\r\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\r\n\t\tORDER BY dateline DESC\r\n\t\tLIMIT 0,18");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $value['clickname'] = $clicks[$value['clickid']]['name'];
        $clickuserlist[] = $value;
    }
    //热点
    $topic = topic_get($blog['topicid']);
    //实名
    realname_get();
    //获取标签
    $ntags = getntags($blog['uid'], $_GET['do'], $id);
    $_TPL['css'] = 'blog';
    include_once template("space_blog_view");
} else {
    //分页
    $perpage = 10;
    $perpage = mob_perpage($perpage);
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);
    //摘要截取
    $summarylen = 300;
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:space_blog.php


示例8: array

        if ($value['clicknum'] > $maxclicknum) {
            $maxclicknum = $value['clicknum'];
        }
        $clicks[$key] = $value;
    }
    //点评
    $clickuserlist = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . "\r\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\r\n\t\tORDER BY dateline DESC\r\n\t\tLIMIT 0,18");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $value['clickname'] = $clicks[$value['clickid']]['name'];
        $clickuserlist[] = $value;
    }
    //热闹
    $topic = topic_get($pic['topicid']);
    if (empty($eventid)) {
        //实名
        realname_get();
        $ntags = getntags($pic['uid'], $_GET['do'], $picid);
        $_TPL['css'] = 'album';
        include_once template("space_album_pic");
    }
} else {
    //相册列表
    $perpage = 12;
    $perpage = mob_perpage($perpage);
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);
    //权限过滤
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:space_album.php


示例9: tname

    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('poll') . " ORDER BY dateline DESC LIMIT 0, 10");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $newpoll[] = $value;
    }
    //取出最热的投票
    $timerange = $_SGLOBAL['timestamp'] - 2592000;
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('poll') . " WHERE lastvote >= '{$timerange}' ORDER BY voternum DESC LIMIT 0, 10");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $hotpoll[] = $value;
    }
    //相关热点
    $topic = topic_get($poll['topicid']);
    //实名
    realname_get();
    //获取标签
    $ntags = getntags($poll['uid'], $_GET['do'], $pid);
    $_TPL['css'] = 'poll';
    include_once template("space_poll_view");
} else {
    $_GET['view'] = $_GET['view'] ? trim($_GET['view']) : 'new';
    if ($_GET['view'] == 'all') {
        $_GET['view'] = 'new';
    }
    //分页
    $perpage = 10;
    $start = ($page - 1) * $perpage;
    //检查开始数
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:space_poll.php


示例10: array

        if ($value['clicknum'] > $maxclicknum) {
            $maxclicknum = $value['clicknum'];
        }
        $clicks[$key] = $value;
    }
    //点评
    $clickuserlist = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . "\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\n\t\tORDER BY dateline DESC\n\t\tLIMIT 0,18");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $value['clickname'] = $clicks[$value['clickid']]['name'];
        $clickuserlist[] = $value;
    }
    //热闹
    $topic = topic_get($thread['topicid']);
    //实名
    realname_get();
    $_TPL['css'] = 'thread';
    include_once template("space_thread_view");
} else {
    $perpage = 30;
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);
    if (!in_array($_GET['view'], array('hot', 'new', 'me', 'all'))) {
        $_GET['view'] = 'hot';
    }
    //话题列表
    $wheresql = $f_index = '';
    if ($_GET['view'] == 'hot') {
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:space_thread.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP topic_link函数代码示例发布时间:2022-05-23
下一篇:
PHP topic_generate_pagination函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap