本文整理汇总了PHP中jimplode函数的典型用法代码示例。如果您正苦于以下问题:PHP jimplode函数的具体用法?PHP jimplode怎么用?PHP jimplode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jimplode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Main
function Main()
{
$uid = MEMBER_ID;
if ($uid < 1) {
$this->Messager("请先<a href='index.php?mod=login'>点此登录</a>或者<a href='index.php?mod=member'>点此注册</a>一个帐号", 'index.php?mod=login');
}
$member = jsg_member_info($uid);
$sql = "select * from `" . TABLE_PREFIX . "blacklist` where `uid` = '" . MEMBER_ID . "' ";
$query = $this->DatabaseHandler->Query($sql);
$uids = array();
while (false != ($row = $query->GetRow())) {
$uids[$row['touid']] = $row['touid'];
}
if ($uids) {
$where = "where `uid` in (" . jimplode($uids) . ")";
$member_list = $this->_MemberList($where);
if ($uids && MEMBER_ID > 0) {
$sql = "select `uid`,`tid`,`content`,`dateline` from `" . TABLE_PREFIX . "topic` where `uid` in (" . jimplode($uids) . ") group by `uid` order by `dateline` desc";
$query = $this->DatabaseHandler->Query($sql);
$topic_list = array();
while (false != ($row = $query->GetRow())) {
$row['content'] = cut_str($row['content'], 100);
$row['dateline'] = my_date_format2($row['dateline']);
$topic_list[] = $row;
}
}
}
$group_list = jlogic('buddy_follow_group')->get_my_group(MEMBER_ID);
$this->Title = '黑名单';
include template('social/blacklist');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:blacklist.mod.php
示例2: new_topic
public function new_topic($p)
{
$ps = array('cache_time' => max(0, (int) $p['cache_time']), 'page_url' => $p['page_url']);
if (isset($p['perpage'])) {
$ps['perpage'] = (int) $p['perpage'];
}
$ps['cache_key'] = 'topic-new_topic';
$ps['order'] = ' `dateline` DESC ';
$ps['where'] = ' `type` IN (' . jimplode(get_topic_type()) . ') ';
return $this->_get($ps);
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:11,代码来源:plaza.logic.php
示例3: CategoryUserList
function CategoryUserList($where = '', $limit = '', $query_link = '', $orderby = 'uid')
{
$per_page_num = $limit ? $limit : 20;
$p = array('cache_time' => 300, 'cache_file' => 1, 'sql_where' => $where, 'sql_order' => ' `id` DESC ');
$uds = jtable('validate_category_fields')->get_ids($p, 'uid');
if ($uds) {
$total_record = count($uds);
$page_arr = page($total_record, $per_page_num, $query_link, array('return' => 'array'));
$wherelist = "where `uid` in (" . jimplode($uds) . ") and `city` !='' order by `{$orderby}` desc {$page_arr['limit']} ";
$TopicLogic = jlogic('topic');
$members = $TopicLogic->GetMember($wherelist, "`uid`,`ucuid`,`media_id`,`aboutme`,`username`,`nickname`,`province`,`city`,`face_url`,`face`,`validate`");
$members = buddy_follow_html($members, 'uid', 'follow_html2');
}
$user_ary = array('member' => $members, 'uids' => $uds, 'pagearr' => $page_arr);
return $user_ary;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:validate_category.logic.php
示例4: get_token
function get_token($uids)
{
$token = array();
$uids = is_array($uids) ? $uids : (is_numeric($uids) && $uids > 0 ? array($uids) : ('all' == $uids ? $uids : array()));
if ($uids) {
if ('all' == $uids) {
$query = DB::query("SELECT `token` FROM " . DB::table('ios'));
} else {
$query = DB::query("SELECT `token` FROM " . DB::table('ios') . " where uid IN (" . jimplode($uids) . ")");
}
while ($value = DB::fetch($query)) {
$token[] = $value['token'];
}
}
return $token;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:ios.logic.php
示例5: delete_feed
function delete_feed($p = array())
{
$time = TIMESTAMP;
if ($p['all']) {
DB::Query("delete from " . DB::table('feed_log'));
} elseif ($p['week']) {
$time = $time - 7 * 24 * 3600;
DB::Query("delete from " . DB::table('feed_log') . " where `dateline` < '{$time}'");
} elseif ($p['month']) {
$time = $time - 30 * 24 * 3600;
DB::Query("delete from " . DB::table('feed_log') . " where `dateline` < '{$time}'");
} elseif ($p['ids']) {
$dids = is_array($p['ids']) ? $p['ids'] : (array) $p['ids'];
DB::Query("delete from " . DB::table('feed_log') . " where `id` in(" . jimplode($dids) . ")");
}
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:feed.logic.php
示例6: DoModify
function DoModify()
{
if (($new_module = trim($this->Post['new_module'])) && trim($new_module_name = $this->Post['new_module_name'])) {
jtable('role_module')->replace(array("module" => $new_module, "name" => $new_module_name));
}
$module_list = (array) $this->Post['module'];
foreach ($module_list as $module) {
jtable('role_module')->replace($module);
}
$delete_list = (array) $this->Post['delete'];
if ($delete_list) {
$module_in = " `module` IN (" . jimplode($delete_list) . ") ";
DB::query("DELETE FROM " . TABLE_PREFIX . "role_module where " . $module_in);
$sql = "DELETE FROM " . TABLE_PREFIX . "role_action where " . $module_in;
$this->DatabaseHandler->Query($sql);
}
$this->Messager("修改成功");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:18,代码来源:role_module.mod.php
示例7: attach_list
function attach_list($ids)
{
$ids = $this->get_ids($ids, 0, 1);
$list = array();
if ($ids) {
$query = DB::query("SELECT * FROM " . DB::table('topic_attach') . " WHERE id IN(" . jimplode($ids) . ")");
$candown = jclass('member')->HasPermission('uploadattach', 'down');
$canviewtype = array('doc', 'ppt', 'pdf', 'xls', 'txt', 'docx', 'xlsx', 'pptx');
while ($attach = DB::fetch($query)) {
$attach_img = $attach['filetype'];
$attach_name = $attach['name'];
$attach_size = $attach['filesize'];
$attach_down = $attach['download'];
$attach_size = $attach_size > 1024 * 1024 ? round($attach_size / (1024 * 1024), 2) . 'MB' : ($attach_size == 0 ? '未知' : round($attach_size / 1024, 1) . 'KB');
$attach_score = $attach['score'];
$attach_file = RELATIVE_ROOT_PATH . $attach['file'];
$attach_url = ($attach['site_url'] ? $attach['site_url'] : $GLOBALS['_J']['site_url']) . '/' . str_replace('./', '', $attach['file']);
$list[$attach['id']] = array('id' => $attach['id'], 'attach_img' => 'images/filetype/' . $attach_img . '.gif', 'attach_file' => $attach_file, 'attach_name' => $attach_name, 'attach_score' => $attach_score, 'attach_down' => $attach_down, 'attach_size' => '大小:' . $attach_size, 'url' => $attach_url, 'onlineview' => $candown && in_array($attach_img, $canviewtype) && $attach_score == 0 ? $attach_url : '');
}
}
return $list;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:22,代码来源:attach.logic.php
示例8: app_itemid2tid
function app_itemid2tid($item, $item_id, $options = null)
{
$table_name = app_table($item);
if (!$table_name) {
return array();
}
if ($item == 'talk' && $options['talkwhere']) {
$where_sql = $options['talkwhere'];
} else {
$where_sql = ' 1 ';
}
if (is_array($item_id)) {
$where_sql .= " AND item_id IN (" . jimplode($item_id) . ") ";
} else {
$where_sql .= " AND item_id='{$item_id}' ";
}
$query = DB::query("SELECT tid FROM " . DB::table($table_name) . " WHERE {$where_sql} ");
$tid_ary = array();
while ($value = DB::fetch($query)) {
$tid_ary[] = $value['tid'];
}
return $tid_ary;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:23,代码来源:app.func.php
示例9: iframe_recommend
function iframe_recommend()
{
$ids = (int) (jget('ids') ? jget('ids') : jget('id'));
if ($ids < 1) {
exit('ids is empty');
}
$sql = " select * from `" . TABLE_PREFIX . "share` where `id` = '{$ids}' ";
$query = $this->DatabaseHandler->Query($sql);
$sharelist = $query->GetRow();
if (!$sharelist) {
exit('ids is invalid');
}
$share = @unserialize($sharelist['show_style']);
$topic_charset = $share['topic_charset'];
$share['limit'] = max(0, (int) $share['limit']);
if ($share['limit'] < 1 || $share['limit'] > 200) {
$share['limit'] = 20;
}
$share['string'] = max(0, (int) $share['string']);
$order = ' `dateline` DESC ';
$condition = '';
$rets = $topic_list = array();
if ('live' == $sharelist['type']) {
$rr = jlogic('live')->get_script_out_list(1, $share['limit'], $share['string']);
$rets = $live_list = $rr;
} else {
$user_topic_list = '';
if ('topic' == $sharelist['type']) {
$nickname = '';
if ($sharelist['nickname']) {
$nickname = $sharelist['nickname'];
} else {
$nickname = get_safe_code(jget('nickname'));
}
if ($nickname) {
$ns = explode('|', $nickname);
$uids = jtable('members')->get_ids(array('nickname' => $ns, 'result_count' => count($ns)), 'uid');
if (!$uids) {
exit('nickname is invalid');
}
$user_topic_list = " `uid` IN (" . jimplode($uids) . ") ";
}
}
$tag_condition = '';
if ('tag' == $sharelist['type']) {
$tag = '';
if ($sharelist['tag']) {
$tag = $sharelist['tag'];
} else {
$tag = get_safe_code(jget('tag'));
}
if ($tag) {
$ts = explode('|', $tag);
$tagids = jtable('tag')->get_ids(array('name' => $ts, 'result_count' => count($ts)), 'id');
if (!$tagids) {
exit('tag is invalid');
}
$tids = jtable('topic_tag')->get_ids(array('tag_id' => $tagids, 'result_count' => $share['limit'], 'sql_order' => ' `dateline` DESC '), 'item_id');
if ($tids) {
$tag_condition = " `tid` IN (" . jimplode($tids) . ") ";
$topic_list = jlogic('topic')->Get($tids);
}
}
}
$channel_condition = '';
if ('channel' == $sharelist['type']) {
$cids = array();
if ($share['channel']['name']) {
$cname = $share['channel']['name'];
} else {
$channel_id = jget('channel_id', 'int');
if ($channel_id > 0) {
$cids[$channel_id] = $channel_id;
} else {
$cname = jget('channel') ? jget('channel') : (jget('channel_name') ? jget('channel_name') : jget('ch_name'));
}
}
if ($cname) {
$ns = explode('|', $cname);
$cids = jtable('channel')->get_ids(array('ch_name' => $ns, 'result_count' => count($ns)), 'ch_id');
if (!$cids) {
exit('channel is invalid');
}
}
if ($cids) {
$condition = " `item`='channel' AND `item_id` IN(" . jimplode($cids) . ") ";
}
}
if ('recommend' == $sharelist['type']) {
$p = array('sql_order' => ' `dateline` DESC ', 'result_count' => $share['limit']);
$its = array();
$item = $share['recommend']['item'];
if ($item) {
$its = $share['recommend']['item_id'];
} else {
$item = jget('item', 'txt');
$its = jget('item_id', 'txt');
}
if (in_array($item, array('qun', 'channel')) && $its) {
${$item_id . '_id'} = $its;
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:share.mod.php
示例10: Getguest
function Getguest($ids)
{
$list = array();
$uids = array();
$guests = array();
$ids = is_array($ids) ? $ids : array((int) $ids);
$query = DB::query("SELECT iid,itemid,uid,description,type FROM " . DB::table('item_user') . " WHERE item = 'talk' AND itemid IN(" . jimplode($ids) . ")");
while ($row = DB::fetch($query)) {
$uids[] = $row['uid'];
$guests[$row['itemid']][$row['uid']]['type'] = $row['type'];
$guests[$row['itemid']][$row['uid']]['iid'] = $row['iid'];
$guests[$row['itemid']][$row['uid']]['description'] = $row['description'];
}
$uids = array_unique($uids);
$users = array();
$userss = $this->TopicLogic->GetMember($uids, "`uid`,`ucuid`,`username`,`nickname`,`face`,`face_url`,`fans_count`,`validate`,`validate_category`");
foreach ($userss as $val) {
$users[$val['uid']] = $val;
}
unset($userss);
foreach ($guests as $key => $val) {
$guests_g = array();
$guests_h = array();
$guests_m = array();
$guests_hg = array();
$guests_a = array();
foreach ($val as $k => $v) {
$guests_a[$key][$k] = $guests[$key][$k]['type'];
if ($guests[$key][$k]['type'] == 'guest') {
unset($guests[$key][$k]['type']);
$guests_g[$key][$k] = array_merge($users[$k], $guests[$key][$k]);
$guests_hg[$key][$k] = $users[$k]['nickname'];
} elseif ($guests[$key][$k]['type'] == 'host') {
unset($guests[$key][$k]['type']);
$guests_h[$key][$k] = array_merge($users[$k], $guests[$key][$k]);
$guests_hg[$key][$k] = $users[$k]['nickname'];
} elseif ($guests[$key][$k]['type'] == 'media') {
unset($guests[$key][$k]['type']);
$guests_m[$key][$k] = array_merge($users[$k], $guests[$key][$k]);
}
}
$list[$key]['guest'] = $guests_g[$key];
$list[$key]['host'] = $guests_h[$key];
$list[$key]['media'] = $guests_m[$key];
$list[$key]['host_guest'] = $guests_hg[$key];
$list[$key]['all'] = $guests_a[$key];
}
return $list;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:49,代码来源:talk.logic.php
示例11: getDigUser
function getDigUser()
{
$dateline = time() - 7 * 24 * 3600;
$sql = " SELECT `uid`,count(*) as num FROM `" . DB::table('topic_dig') . "` WHERE `dateline` > '{$dateline}' GROUP BY uid ORDER BY num DESC , dateline DESC ";
$query = DB::query($sql);
$uid = array();
while ($rs = DB::fetch($query)) {
$uid[$rs['uid']] = $rs['uid'];
}
if ($uid) {
$members = jlogic('topic')->GetMember(" WHERE `uid` in (" . jimplode($uid) . ") ORDER BY `fans_count` DESC limit 10 ", "`uid`,`ucuid`,`username`,`validate`,`validate_category`,`face`,`nickname`");
}
return $members;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:14,代码来源:user.logic.php
示例12: delete_ploy
function delete_ploy($ids)
{
$ids = (array) $ids;
$where_sql = jimplode($ids);
DB::query("DELETE FROM " . DB::table('qun_ploy') . " WHERE id IN({$where_sql})");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:6,代码来源:qun.logic.php
示例13: delZone
function delZone()
{
$area = $this->Get['area'];
$city = $this->Get['city'];
$fid = $this->Get['fid'];
$id_arr = array();
if ($fid) {
$id_arr = $this->getNextId($fid);
$id_arr[$fid] = $fid;
}
if ($id_arr) {
$id_list = jimplode($id_arr);
$this->DatabaseHandler->Query("delete from `" . TABLE_PREFIX . "common_district` where id in ({$id_list})");
}
$this->Messager("区域删除成功", "admin.php?mod=city&code=zone&area={$area}&city={$city}");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:city.mod.php
示例14: TagSearch
function TagSearch()
{
$per_page_num = 10;
$topic_parent_disable = false;
$query_link = 'index.php?mod=search&code=tag';
$tag = trim(get_param('tag'));
if ($tag) {
$tag = get_safe_code($tag);
$tag = $this->_filterKeyword($tag);
$search_keyword = $tag;
$_GET['highlight'] = $search_keyword;
$cache_time = 600;
$cache_key = "tag-search-{$tag}";
if (false === ($topic_ids = cache_db('mget', $cache_key))) {
$sql = "select `id` from `" . TABLE_PREFIX . "tag` WHERE " . build_like_query('`name`', $tag) . " ORDER BY `last_post` DESC LIMIT {$this->cache_ids_limit} ";
$query = $this->DatabaseHandler->Query($sql);
$tag_id = array();
while (false != ($row = $query->GetRow())) {
$tag_id[$row['id']] = $row['id'];
}
$topic_ids = array();
if ($tag_id) {
$sql = "SELECT `item_id` FROM `" . TABLE_PREFIX . "topic_tag` WHERE `tag_id` in(" . jimplode($tag_id) . ") ORDER BY `item_id` DESC LIMIT {$this->cache_ids_limit} ";
$query = $this->DatabaseHandler->Query($sql);
while (false != ($row = $query->GetRow())) {
$topic_ids[$row['item_id']] = $row['item_id'];
}
}
cache_db('mset', $cache_key, $topic_ids, $cache_time);
}
$topic_ids = filter_tids($topic_ids);
if ($topic_ids) {
$where = " `tid` in('" . implode("','", $topic_ids) . "') ";
}
$query_link .= "&tag=" . urlencode($tag);
}
if ($where) {
$options = array('where' => $where, 'type' => get_topic_type(), 'order' => ' `dateline` desc ', 'page_url' => $query_link, 'perpage' => $per_page_num);
$info = $this->TopicListLogic->get_data($options);
$topic_list = array();
$total_record = 0;
if (!empty($info)) {
$topic_list = $info['list'];
$total_record = $info['count'];
$page_arr = $info['page'];
}
$topic_list_count = 0;
if ($topic_list) {
$topic_list_count = count($topic_list);
if (!$topic_parent_disable) {
$parent_list = $this->TopicLogic->GetParentTopic($topic_list);
}
}
}
$member = jsg_member_info(MEMBER_ID);
if ($member['medal_id']) {
$medal_list = $this->TopicLogic->GetMedal($member['medal_id'], $member['uid']);
}
$this->Title = "话题搜索";
include template('social/search_list');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:61,代码来源:search.mod.php
示例15: index
function index()
{
$view = empty($this->Get['view']) ? '' : trim($this->Get['view']);
$filter = empty($this->Get['filter']) ? '' : trim($this->Get['filter']);
$uid = empty($this->Get['uid']) ? 0 : intval($this->Get['uid']);
$gets = array('mod' => 'vote', 'view' => $this->Get['view'], 'filter' => $this->Get['filter']);
$page_url = 'index.php?' . url_implode($gets);
$perpage = $this->ShowConfig['vote']['list'];
$perpage = empty($perpage) ? 20 : $perpage;
$tpl = 'vote/vote_index';
$where_sql = " 1 ";
switch ($view) {
case 'new':
$this->Title = '最新投票';
$order_sql = ' ORDER BY dateline DESC ';
break;
case 'me':
if ($uid && $uid != MEMBER_ID) {
$user_info = $this->TopicLogic->GetMember($uid);
$this->Title = $user_info['nickname'] . '发起的投票';
if (empty($user_info)) {
$this->Messager("当前页面不存在", 'index.php?mod=vote');
}
$tpl = 'vote/vote_me';
} else {
$this->_check_login();
$this->Title = '我的投票';
$uid = MEMBER_ID;
}
if ($filter == 'joined') {
$vids = $this->VoteLogic->get_joined($uid);
if (!empty($vids)) {
$where_sql .= " AND `v`.`vid` IN(" . jimplode($vids) . ") ";
} else {
$where_sql = ' 0 ';
}
} else {
if ($filter == 'new_update') {
jlogic('member')->clean_new_remind('vote_new', $uid);
$vids = $this->VoteLogic->get_joined($uid);
if (!empty($vids)) {
$where_sql .= " AND `v`.`vid` IN(" . jimplode($vids) . ") ";
}
$where_sql .= " OR `v`.`uid`='{$uid}' ";
} else {
$where_sql .= " AND `v`.`uid`='{$uid}' ";
$filter = 'created';
}
}
$order_sql = ' ORDER BY lastvote DESC ';
break;
case 'fllow':
$this->_check_login();
$this->Title = '我关注的人的投票';
$buddyids = get_buddyids(MEMBER_ID);
if ($filter == 'joined') {
$vids = $this->VoteLogic->get_joined($buddyids);
if (!empty($vids)) {
$where_sql .= " AND `v`.`vid` IN(" . jimplode($vids) . ") ";
} else {
$where_sql = ' 0 ';
}
} else {
if (!empty($buddyids)) {
$where_sql .= " AND `v`.`uid` IN (" . jimplode($buddyids) . ") ";
} else {
$where_sql = ' 0 ';
}
$filter = 'created';
}
$order_sql = ' ORDER BY dateline DESC ';
break;
default:
$this->Title = '最新参与投票';
$view = 'newjoin';
$where_sql .= " AND v.expiration >= '" . time() . "' AND v.lastvote > 0 ";
$order_sql = ' ORDER BY v.lastvote DESC ';
break;
}
if (!empty($filter)) {
$filter_on[$filter] = 'class="v_on"';
}
$where_sql .= " AND v.verify = 1";
$param = array('where' => $where_sql, 'order' => $order_sql, 'page' => true, 'perpage' => $perpage, 'page_url' => $page_url);
$vote_info = $this->VoteLogic->find($param);
$count = 0;
$vote_list = array();
$page_arr['html'] = '';
$uid_ary = array();
if (!empty($vote_info)) {
$count = $vote_info['count'];
$vote_list = $vote_info['vote_list'];
$page_arr['html'] = $vote_info['page']['html'];
$uid_ary = $vote_info['uids'];
}
if (!empty($uid_ary)) {
$members = $this->TopicLogic->GetMember($uid_ary);
}
$this->Title .= ' | 微博投票';
$active[$view] = 'class="tago"';
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:vote.mod.php
示例16: members
function members()
{
$qid = intval(trim($this->Get['qid']));
if (empty($qid)) {
$this->Messager('错误的操作');
}
$qun_info = $this->QunLogic->get_qun_info($qid);
if (empty($qun_info)) {
$this->Messager('当前' . $this->Config[changeword][weiqun] . '不存在或者已经被删除了');
}
$type = trim($this->Get['type']);
$page = intval(trim($this->Get['page']));
$page = $page == 0 ? 1 : $page;
$perpage = 60;
$gets = array('mod' => 'qun', 'code' => 'members', 'type' => $type, 'qid' => $qid);
$page_url = 'index.php?' . url_implode($gets);
if ($type == 'followed') {
$followed_ids = get_buddyids(MEMBER_ID);
if (empty($followed_ids)) {
$where_sql = ' 0 ';
} else {
$where_sql = " qid='{$qid}' AND uid IN(" . jimplode($followed_ids) . ") ";
}
} else {
if ($page == 1) {
$founder_info = array();
$founderuid = DB::result_first("SELECT uid\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM " . DB::table('qun_user') . "\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE qid='{$qid}' AND level=1");
$founder_info = $this->TopicLogic->GetMember($founderuid, 'uid,username,nickname,face');
$admin_ary = array();
$admin_nums = 0;
$admin_ids = array();
$query = DB::query("SELECT uid FROM " . DB::table('qun_user') . " WHERE qid='{$qid}' AND level=2");
while ($value = DB::fetch($query)) {
$admin_ids[] = $value['uid'];
}
if (!empty($admin_ids)) {
$admin_ary = $this->TopicLogic->GetMember($admin_ids, 'uid,username,nickname,face');
$admin_nums = count($admin_ary);
}
}
$where_sql = " qid='{$qid}' AND level=4 ";
}
$members = $member_ids = array();
$count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('qun_user') . " WHERE {$where_sql} ");
if ($count) {
$_config = array('return' => 'array');
$page_arr = page($count, $perpage, $page_url, $_config);
$query = DB::query("SELECT uid\r\n\t\t\t\t\t\t\t\tFROM " . DB::table('qun_user') . "\r\n\t\t\t\t\t\t\t\tWHERE {$where_sql}\r\n\t\t\t\t\t\t\t\t{$page_arr['limit']} ");
while ($value = DB::fetch($query)) {
$member_ids[] = $value['uid'];
}
$members = $this->TopicLogic->GetMember($member_ids, 'uid,username,nickname,face');
}
$uid = MEMBER_ID;
$buddyids = get_buddyids($uid);
$this->Title = $this->Config[changeword][weiqun] . " - " . $qun_info['name'] . "的成员";
include_once template('qun/members');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:58,代码来源:qun.mod.php
示例17: view
function view()
{
$lid = jget('id', 'int', 'G');
if (!$this->TalkLogic->is_exists($lid)) {
return false;
}
$list = $this->TalkLogic->Getguest($lid);
$this->item = 'talk';
$this->item_id = $item_id = $lid;
$talk = $this->TalkLogic->id2talkinfo($lid, $list);
$uids = array();
$gets = array('mod' => 'talk', 'code' => 'view', 'id' => $lid);
$page_url = 'index.php?' . url_implode($gets);
$perpage = $talk['status_css'] == 'ico_ongoing' ? 1000 : 20;
$options = array('page' => true, 'perpage' => $perpage, 'page_url' => $page_url, 'order' => ' dateline DESC ');
if (empty($talk)) {
$this->Messager('当前访谈不存在!');
} elseif ($talk['all']) {
$defaust_value = ' <font color="#0080c7">我有一个想法和大家分享</font>';
foreach ($talk['all'] as $key => $val) {
$uids[$key] = $key;
}
}
if ($talk['status_css'] == 'ico_ongoing') {
$talklistcss = ' talk-list';
$asklistcss = ' ask-list';
}
$is_talk_hosts = in_array(MEMBER_ID, $uids) ? true : false;
$talkvisit_str = $this->Config['site_url'] . '/index.php?mod=talk&code=view&id=' . $lid;
$cat = $this->TalkLogic->get_category($talk['cat_id'], 'second');
$catp = $this->TalkLogic->get_category($cat['parent_id'], 'first');
$talk_config = jconf::get('talk');
if (MEMBER_STYLE_THREE_TOL) {
$member = $this->TopicLogic->GetMember(MEMBER_ID);
}
$param = array('limit' => '5');
$talk_info = $this->TalkLogic->get_list($param);
if (!empty($talk_info)) {
$talk_count = $talk_info['count'];
$talk_list = $talk_info['list'];
}
jfunc('app');
$options['talkwhere'] = ' uid NOT IN (' . jimplode($uids) . ')';
$topic_info = app_get_topic_list('talk', $lid, $options);
$options['talkwhere'] = ' totid > 0';
$answer_info = app_get_topic_list('talk', $lid, $options);
$options['talkwhere'] = ' istop = 1';
$options['order'] = ' lastupdate DESC ';
$question_info = app_get_topic_list('talk', $lid, $options);
$myanswerids = app_getmyanswerid($lid);
if (!empty($topic_info['list'])) {
$topic_list = $topic_info['list'];
foreach ($topic_list as $key => $val) {
if (in_array($val['tid'], $myanswerids) && $talk[status_css] == 'ico_ongoing') {
$topic_list[$key]['reply_ok'] = true;
}
}
$topic_count = $topic_info['count'];
$topic_page_arr = $topic_info['page'];
}
if (!empty($question_info['list'])) {
$question_list = $question_info['list'];
$ask_count = $question_info['count'];
$ask_page_arr = $question_info['page'];
foreach ($question_list as $key => $val) {
$ask_info = array();
$u_t = $this->TalkLogic->id2usertype($lid, $val['uid'], $list);
if ($u_t == 'guest') {
$question_list[$key]['user_str'] = '本期嘉宾';
} else {
$question_list[$key]['user_str'] = ' ';
}
$question_list[$key]['user_css'] = 'talk' . $u_t;
if (empty($question_list[$key]['touid'])) {
$question_list[$key]['biank_css'] = 'talk_view_ping';
$question_list[$key]['tubiao_css'] = 'talk_view_pin';
} else {
$question_list[$key]['biank_css'] = 'talk_view_wenda';
$question_list[$key]['tubiao_css'] = 'talk_view_wen';
if (!empty($answer_info['list'])) {
foreach ($answer_info['list'] as $k => $v) {
if ($v['totid'] == $val['tid']) {
$ask_info['list'][$k] = $v;
}
}
}
if (!empty($ask_info)) {
$question_list[$key]['ask_list'] = $ask_info['list'];
foreach ($question_list[$key]['ask_list'] as $k => $v) {
$u_ta = $this->TalkLogic->id2usertype($lid, $v['uid'], $list);
if ($u_ta == 'guest') {
$question_list[$key]['ask_list'][$k]['user_str'] = '本期嘉宾';
} else {
$question_list[$key]['ask_list'][$k]['user_str'] = ' ';
}
$question_list[$key]['ask_list'][$k]['tubiao_css'] = 'talk_view_da';
$question_list[$key]['ask_list'][$k]['user_css'] = 'talk' . $u_ta;
}
}
}
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:talk.mod.php
示例18: channeltype
function channeltype()
{
$do = jget('do');
if ('delete' == $do) {
$ids = (array) ($this->Post['ids'] ? $this->Post['ids'] : $this->Get['ids']);
if (!$ids) {
$this->Messager("请指定要删除的对象");
}
$return = jlogic('channel')->delete_channel_type($ids);
if ($return) {
if ($return['noids']) {
$this->Messager("类型[" . jimplode($return['ids']) . "]删除成功,类型[" . jimplode($return['noids']) . "]删除失败");
} else {
$this->Messager("频道类型(模型)删除成功");
}
} else {
$this->Messager("删除失败,类型已被频道使用,不可删除");
}
} elseif ('add' == $do) {
$channel_typename = strip_tags($this->Post['channel_typename']);
$channel_type = strip_tags($this->Post['channel_type']);
if (empty($channel_typename)) {
$this->Messager("请输入类型名称", -1);
}
if (empty($channel_type)) {
$this->Messager("请输入类型标识符", -1);
}
if (!preg_match("/^[a-z]+\$/i", $channel_type)) {
$this->Messager("类型标识符[" . $channel_type . "]不合法", -1);
}
$return = jlogic('channel')->add_channel_type($channel_typename, $channel_type);
if ($return > 0) {
$this->Messager("添加成功", 'admin.php?mod=channel&code=channeltype');
} else {
$this->Messager("频道类型名称已经存在或标识符不唯一", -1);
}
} elseif ('modify' == $do) {
$ids = (int) $this->Get['ids'];
$channel_typelist = jlogic('channel')->get_channel_typebyid($ids);
$feature_list = jlogic('channel')->get_feature_formdata();
$featurehtml = $this->jishigou_form->CheckBox('featureid[]', $feature_list, explode(',', $channel_typelist['featureid']));
} elseif ('domodify' == $do) {
$channel_typeid = (int) $this->Post['channel_typeid'];
$channel_typename = strip_tags($this->Post['channel_typename']);
$oldchannel_typename = $this->Post['oldchannel_typename'];
$template = $this->Post['template'];
$oldtemplate = $this->Post['oldtemplate'];
$child_template = $this->Post['child_template'];
$oldchild_template = $this->Post['oldchild_template'];
$topic_template = $this->Post['topic_template'];
$oldtopic_template = $this->Post['oldtopic_template'];
$featureid = is_array($this->Post['featureid']) ? implode(',', $this->Post['featureid']) : '';
$oldfeatureid = $this->Post['oldfeatureid'];
$default_feature = $this->Post['default_feature'];
$olddefault_feature = $this->Post['olddefault_feature'];
if ($channel_typename != $oldchannel_typename || $template != $oldtemplate || $child_template != $oldchild_template || $topic_template != $oldtopic_template || $featureid != $oldfeatureid || $default_feature != $olddefault_feature) {
if ($channel_typename != $oldchannel_typename) {
$return = jlogic('channel')->check_channel_type_byname($channel_typename);
if ($return) {
$this->Messager("{$channel_typename} 类型已经存在");
}
}
if ($template != $oldtemplate || $child_template != $oldchild_template || $topic_template != $oldtopic_template) {
$this->_checktemplate(array($template, $child_template, $topic_template));
}
jlogic('channel')->modiy_channel_type($channel_typeid, $channel_typename, $template, $child_template, $topic_template, $featureid, $default_feature);
$this->Messager("编辑成功", 'admin.php?mod=channel&code=channeltype');
} else {
$this->Messager("没做任何修改", 'admin.php?mod=channel&code=channeltype');
}
} else {
$per_page_num = min(500, max(20, (int) (isset($_GET['pn']) ? $_GET['pn'] : $_GET['per_page_num'])));
$info = jlogic('channel')->get_channel_typelist($per_page_num);
$total_record = $info['total'];
$page_arr = $info['page'];
$channel_type_list = $info['list'];
}
include template('admin/channel_type');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:79,代码来源:channel.mod.php
示例19: getCommentList
function getCommentList($param)
{
$tid = $param['tid'];
$max_tid = max(0, intval($param['max_tid']));
$limit = intval($param['limit']);
if ($limit < 1) {
$limit = 20;
}
$options['limit'] = $limit;
$offset = $max_tid * $limit;
$p = array('sql_order' => ' `dateline` DESC ', 'sql_limit' => " {$offset}, {$limit} ");
$rets = jtable('topic_relation')->get_tids($tid, $p, 1);
$tids = array();
if ($rets) {
$tids = $rets['ids'];
$total_record = $rets['count'];
}
if (isset($param['topic_parent_disable'])) {
$topic_parent_disable = (bool) $param['topic_parent_disable'];
} else {
$topic_parent_disable = false;
}
if ($tids) {
$condition = " `tid` IN (" . jimplode($tids) . ") ";
$options['where'] = $condition;
$info = $this->TopicListLogic->get_data($options);
$topic_list = array();
if (!empty($info)) {
$topic_list = $info['list'];
$topic_list = array_values($topic_list);
$page_arr = $info['page'];
}
if ($topic_list) {
if (!$topic_parent_disable) {
$parent_list = $this->TopicLogic->GetParentTopic($topic_list, 1);
}
$result = array('total_record' => $total_record, 'topic_list' => $topic_list, 'parent_list' => $parent_list, 'max_tid' => $max_tid + 1, 'next_page' => 0);
if (!empty($page_arr)) {
$result['next_page'] = $page_arr['current_page'] + 1;
}
return $result;
}
}
return 400;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:45,代码来源:mblog.logic.php
-
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1566|2022-08-30
-
avehtari/BDA_m_demos: Bayesian Data Analysis demos for Matlab/Octave
阅读:1117|2022-08-17
-
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:994|2022-11-06
-
splunk/splunk-library-javalogging: Splunk logging appenders for popular Java Log
阅读:865|2022-08-15
-
medfreeman/markdown-it-toc-and-anchor: markdown-it plugin to add a toc and ancho
阅读:1328|2022-08-18
-
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:478|2022-08-16
-
An issue was discovered in yasm version 1.3.0. There is a use-after-free in pp_g
阅读:630|2022-07-29
-
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:357|2022-11-06
-
shem8/MaterialLogin: Login view with material design
阅读:722|2022-08-17
-
damienbod/AspNetCoreLocalization: Localization.SqlLocalizer ASP.NET Core MVC Lo
阅读:290|2022-08-15
|
请发表评论