本文整理汇总了PHP中get_groupimg函数的典型用法代码示例。如果您正苦于以下问题:PHP get_groupimg函数的具体用法?PHP get_groupimg怎么用?PHP get_groupimg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_groupimg函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_cache_forumrecommend
function build_cache_forumrecommend()
{
$data = array();
$fids = C::t('forum_forum')->fetch_all_fids();
foreach ($fids as $row) {
require_once libfile('function/group');
$recommendlist = C::t('forum_forum')->fetch_all_recommend_by_fid($row['fid']);
foreach ($recommendlist as $info) {
$group = array('fid' => $info['fid'], 'name' => $info['name'], 'threads' => $info['threads'], 'lastpost' => $info['lastpost'], 'icon' => $info['icon'], 'membernum' => $info['membernum'], 'description' => $info['description']);
$group['icon'] = get_groupimg($group['icon'], 'icon');
$lastpost = array(0, 0, '', '');
$group['lastpost'] = is_string($group['lastpost']) ? explode("\t", $group['lastpost']) : $group['lastpost'];
$group['lastpost'] = count($group['lastpost']) != 4 ? $lastpost : $group['lastpost'];
list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = $group['lastpost'];
if ($lastpost['tid']) {
$lastpost['dateline'] = dgmdate($lastpost['dateline'], 'Y-m-d H:i:s');
if ($lastpost['author']) {
$lastpost['encode_author'] = rawurlencode($lastpost['author']);
}
$group['lastpost'] = $lastpost;
} else {
$group['lastpost'] = '';
}
$data[$row['fid']][] = $group;
}
}
savecache('forumrecommend', $data);
}
示例2: build_cache_forumrecommend
function build_cache_forumrecommend()
{
$data = array();
$query = DB::query("SELECT fid FROM " . DB::table('forum_forum') . " WHERE type<>'group' AND status<>3");
while ($row = DB::fetch($query)) {
require_once libfile('function/group');
$squery = DB::query("SELECT f.fid, f.name, f.threads, f.lastpost, ff.icon, ff.membernum, ff.description FROM " . DB::table('forum_forum') . " f LEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid WHERE recommend='{$row['fid']}'");
while ($group = DB::fetch($squery)) {
$group['icon'] = get_groupimg($group['icon'], 'icon');
$lastpost = array(0, 0, '', '');
$group['lastpost'] = is_string($group['lastpost']) ? explode("\t", $group['lastpost']) : $group['lastpost'];
$group['lastpost'] = count($group['lastpost']) != 4 ? $lastpost : $group['lastpost'];
list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = $group['lastpost'];
if ($lastpost['tid']) {
$lastpost['dateline'] = dgmdate($lastpost['dateline'], 'Y-m-d H:i:s');
if ($lastpost['author']) {
$lastpost['encode_author'] = rawurlencode($lastpost['author']);
}
$group['lastpost'] = $lastpost;
} else {
$group['lastpost'] = '';
}
$data[$row['fid']][] = $group;
}
}
save_syscache('forumrecommend', $data);
}
示例3: build_cache_forumrecommend
function build_cache_forumrecommend()
{
$data = array();
$query = DB::query("SELECT fid FROM " . DB::table('forum_forum') . " WHERE type<>'group' AND status<>3");
while ($row = DB::fetch($query)) {
require_once libfile('function/group');
$squery = DB::query("SELECT f.fid, f.name, ff.icon FROM " . DB::table('forum_forum') . " f LEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid WHERE recommend='{$row['fid']}'");
while ($group = DB::fetch($squery)) {
$group['icon'] = get_groupimg($group['icon'], 'icon');
$data[$row['fid']][] = $group;
}
}
save_syscache('forumrecommend', $data);
}
示例4: loadcache
loadcache('groupindex');
$randgroupdata = $_G['cache']['groupindex']['randgroupdata'];
if ($randgroupdata) {
foreach ($randgroupdata as $groupid => $rgroup) {
if ($rgroup['iconstatus']) {
$randgrouplist[$groupid] = $rgroup;
}
}
}
if (count($randgrouplist) > 9) {
foreach (array_rand($randgrouplist, 9) as $fid) {
$randgroup[] = $randgrouplist[$fid];
}
} elseif (count($randgrouplist)) {
$randgroup = $randgrouplist;
}
require_once libfile('function/friend');
$frienduid = friend_list($_G['uid'], 50);
if ($frienduid && is_array($frienduid)) {
foreach ($frienduid as $friend) {
$frienduidarray[] = $friend['fuid'];
}
$fids = C::t('forum_groupuser')->fetch_all_fid_by_uids($frienduidarray);
$query = C::t('forum_forum')->fetch_all_info_by_fids($fids, 0, 9);
foreach ($query as $group) {
$icon = get_groupimg($group['icon'], 'icon');
$friendgrouplist[$group['fid']] = array('fid' => $group['fid'], 'name' => $group['name'], 'icon' => $icon);
}
}
$navtitle = $_G['username'] . lang('core', 'title_of') . $_G['setting']['navs'][3]['navname'];
include_once template("diy:group/group_my");
示例5: getgpc
$metadescription = $_G['forum']['description'];
$_G['seokeywords'] = $_G['setting']['seokeywords']['group'];
$_G['seodescription'] = $_G['setting']['seodescription']['group'];
$action = getgpc('action') ? $_G['gp_action'] : 'list';
require_once libfile('function/group');
$status = groupperm($_G['forum'], $_G['uid']);
if ($status == -1) {
showmessage('forum_not_group', 'group.php');
} elseif ($status == 1) {
showmessage('forum_group_status_off');
} elseif ($status == 2) {
showmessage('forum_group_noallowed', 'forum.php?mod=group&fid=' . $_G['fid']);
} elseif ($status == 3) {
showmessage('forum_group_moderated', 'forum.php?mod=group&fid=' . $_G['fid']);
}
$_G['forum']['icon'] = get_groupimg($_G['forum']['icon'], 'icon');
$_G['grouptypeid'] = $_G['forum']['fup'];
$_G['forum']['dateline'] = dgmdate($_G['forum']['dateline'], 'd');
$nav = get_groupnav($_G['forum']);
$groupnav = $nav['nav'];
$onlinemember = grouponline($_G['fid']);
$groupmanagers = $_G['forum']['moderators'];
$groupcache = getgroupcache($_G['fid'], array('replies', 'views', 'digest', 'lastpost', 'ranking', 'activityuser', 'newuserlist'));
$seotype = 'grouppage';
$seodata['first'] = $nav['first']['name'];
$seodata['second'] = $nav['second']['name'];
$seodata['gdes'] = $_G['forum']['description'];
$forumseoset = array();
}
$_G['forum']['banner'] = get_forumimg($_G['forum']['banner']);
list($navtitle, $metadescription, $metakeywords) = get_seosetting($seotype, $seodata, $forumseoset);
示例6: cacherecommend
function cacherecommend($fidstr, $return = true)
{
require_once libfile('function/group');
$group_recommend = array();
$recommend_num = 8;
$recommends = $fidstr ? explode(',', $fidstr) : array();
if ($recommends) {
$query = C::t('forum_forum')->fetch_all_info_by_fids($recommends, 3);
foreach ($query as $val) {
$row = array();
if ($val['type'] == 'sub') {
$row = array('fid' => $val['fid'], 'name' => $val['name'], 'description' => $val['description'], 'icon' => $val['icon']);
$row['icon'] = get_groupimg($row['icon'], 'icon');
$temp[$row[fid]] = $row;
}
}
foreach ($recommends as $key) {
if (!empty($temp[$key])) {
$group_recommend[$key] = $temp[$key];
}
}
}
if (count($group_recommend) < $recommend_num) {
$query = C::t('forum_forum')->fetch_all_default_recommend($recommend_num);
foreach ($query as $row) {
$row['icon'] = get_groupimg($row['icon'], 'icon');
if (count($group_recommend) == $recommend_num) {
break;
} elseif (empty($group_recommend[$row[fid]])) {
$group_recommend[$row[fid]] = $row;
}
}
}
if ($return) {
return $group_recommend;
} else {
C::t('common_setting')->update_batch(array('group_recommend' => $group_recommend));
}
}
示例7: libfile
if ($forumarr['fup']) {
DB::query("UPDATE " . DB::table('forum_forumfield') . " SET groupnum=groupnum+'1' WHERE fid='{$forumarr['fup']}'");
DB::query("UPDATE " . DB::table('forum_forumfield') . " SET groupnum=groupnum+'-1' WHERE fid='" . $_G['forum']['fup'] . "'");
require_once libfile('function/cache');
updatecache('grouptype');
}
}
$iconsql = '';
$deletebanner = $_G['gp_deletebanner'];
$iconnew = upload_icon_banner($_G['forum'], $_FILES['iconnew'], 'icon');
$bannernew = upload_icon_banner($_G['forum'], $_FILES['bannernew'], 'banner');
if ($iconnew) {
$iconsql .= ", icon='{$iconnew}'";
$group_recommend = unserialize($_G['setting']['group_recommend']);
if ($group_recommend[$_G['fid']]) {
$group_recommend[$_G['fid']]['icon'] = get_groupimg($iconnew);
DB::query("UPDATE " . DB::table('common_setting') . " SET svalue = '" . serialize($group_recommend) . "' WHERE skey = 'group_recommend' LIMIT 1");
include libfile('function/cache');
updatecache('setting');
}
}
if ($bannernew && empty($deletebanner)) {
$iconsql .= ", banner='{$bannernew}'";
} elseif ($deletebanner) {
$iconsql .= ", banner=''";
@unlink($_G['forum']['banner']);
}
$_G['gp_descriptionnew'] = nl2br(dhtmlspecialchars(censor(trim($_G['gp_descriptionnew']))));
$_G['gp_jointypenew'] = intval($_G['gp_jointypenew']);
if ($_G['gp_jointypenew'] == '-1' && $_G['uid'] != $_G['forum']['founderuid']) {
showmessage('group_close_only_founder');
示例8: get_viewedgroup
function get_viewedgroup()
{
$groupviewed_list = $list = array();
$groupviewed = getcookie('groupviewed');
$groupviewed = $groupviewed ? explode(',', $groupviewed) : array();
if ($groupviewed) {
$query = DB::query("SELECT f.fid, f.name, ff.icon, ff.membernum FROM " . DB::table('forum_forum') . " as f LEFT JOIN " . DB::table('forum_forumfield') . " as ff ON ff.fid=f.fid WHERE f.fid IN(" . dimplode($groupviewed) . ")");
while ($row = DB::fetch($query)) {
$row['icon'] = get_groupimg($row['icon'], 'icon');
$list[$row['fid']] = $row;
}
}
foreach ($groupviewed as $fid) {
$groupviewed_list[$fid] = $list[$fid];
}
return $groupviewed_list;
}
示例9: get_viewedgroup
function get_viewedgroup()
{
$groupviewed_list = $list = array();
$groupviewed = getcookie('groupviewed');
$groupviewed = $groupviewed ? explode(',', $groupviewed) : array();
if ($groupviewed) {
$query = C::t('forum_forum')->fetch_all_info_by_fids($groupviewed);
foreach ($query as $row) {
$icon = get_groupimg($row['icon'], 'icon');
$list[$row['fid']] = array('fid' => $row['fid'], 'name' => $row['name'], 'icon' => $icon, 'membernum' => $row['membernum']);
}
}
foreach ($groupviewed as $fid) {
$groupviewed_list[$fid] = $list[$fid];
}
return $groupviewed_list;
}
示例10: elseif
} elseif ($operation == 'editgroup') {
require_once libfile('function/group');
$fid = intval($_G['gp_fid']);
if (empty($fid)) {
cpmsg('group_nonexist', 'action=group&operation=manage', 'error');
} else {
$condition = "f.fid='{$fid}'";
}
$group = DB::fetch_first("SELECT f.fid, f.fup, f.name, f.status, f.displayorder, ff.* FROM " . DB::table('forum_forum') . " f LEFT JOIN " . DB::table('forum_forumfield') . " ff ON f.fid=ff.fid WHERE status='3' AND type='sub' AND {$condition}");
if (!$group) {
cpmsg('group_nonexist', '', 'error');
}
require_once libfile('function/group');
require_once libfile('function/discuzcode');
$groupicon = get_groupimg($group['icon'], 'icon');
$groupbanner = get_groupimg($group['banner']);
$jointypeselect = array(array('-1', cplang('closed')), array('0', cplang('public')), array('1', cplang('invite')), array('2', cplang('moderate')));
if (!submitcheck('editsubmit')) {
$groupselect = get_groupselect(0, $group['fup'], 0);
shownav('group', 'nav_group_manage');
showsubmenu('nav_group_manage');
showformheader("group&operation=editgroup&fid={$fid}", 'enctype');
showtableheader();
showsetting('groups_editgroup_name', 'namenew', $group['name'], 'text');
showsetting('groups_editgroup_category', '', '', '<select name="fupnew">' . $groupselect . '</select>');
showsetting('groups_editgroup_jointype', array('jointypenew', $jointypeselect), $group['jointype'], 'select');
showsetting('groups_editgroup_visible_all', 'gviewpermnew', $group['gviewperm'], 'radio');
showsetting('groups_editgroup_description', 'descriptionnew', $group['description'], 'textarea');
if ($groupicon) {
$groupicon = '<input type="checkbox" class="checkbox" name="deleteicon" value="yes" /> ' . $lang['delete'] . '<br /><img src="' . $groupicon . '?' . random(6) . '" width="48" height="48" />';
}
示例11: getgpc
$metakeywords = $_G['forum']['metakeywords'];
$metadescription = $_G['forum']['metadescription'];
$action = getgpc('action') ? $_G['gp_action'] : 'list';
require_once libfile('function/group');
$status = groupperm($_G['forum'], $_G['uid']);
if ($status == -1) {
showmessage('forum_not_group', 'group.php');
} elseif ($status == 1) {
showmessage('forum_group_status_off');
} elseif ($status == 2) {
showmessage('forum_group_noallowed', 'forum.php?mod=group&fid=' . $_G['fid']);
} elseif ($status == 3) {
showmessage('forum_group_moderated', 'forum.php?mod=group&fid=' . $_G['fid']);
}
$_G['forum']['icon'] = get_groupimg($_G['forum']['icon'], 'icon');
$_G['forum']['banner'] = get_groupimg($_G['forum']['banner']);
$_G['grouptypeid'] = $_G['forum']['fup'];
$_G['forum']['dateline'] = dgmdate($_G['forum']['dateline'], 'd');
$groupnav = get_groupnav($_G['forum']);
$onlinemember = grouponline($_G['fid']);
$groupmanagers = $_G['forum']['moderators'];
$groupcache = getgroupcache($_G['fid'], array('replies', 'views', 'digest', 'lastpost', 'ranking', 'activityuser', 'newuserlist'));
}
if ($_G['forum']['status'] == 1) {
$_G['forum']['banner'] = get_forumimg($_G['forum']['banner']);
}
if ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm']) && !$_G['forum']['allowview']) {
showmessagenoperm('viewperm', $_G['fid'], $_G['forum']['formulaperm']);
} elseif ($_G['forum']['formulaperm']) {
formulaperm($_G['forum']['formulaperm']);
}