本文整理汇总了PHP中block_getclass函数的典型用法代码示例。如果您正苦于以下问题:PHP block_getclass函数的具体用法?PHP block_getclass怎么用?PHP block_getclass使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了block_getclass函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showformfooter
showformfooter();
} else {
showsubtitle(array('block_name', 'block_script', 'block_style', 'block_dateline', 'block_page', 'operation'));
$multipage = '';
$count = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('common_block') . " b LEFT JOIN " . DB::table('common_template_block') . " tb ON tb.bid=b.bid WHERE {$wheresql}"), 0);
if ($count) {
$query = DB::query("SELECT b.*, tb.targettplname FROM " . DB::table('common_block') . " b LEFT JOIN " . DB::table('common_template_block') . " tb ON b.bid=tb.bid WHERE {$wheresql} {$ordersql} LIMIT {$start},{$perpage}");
while ($value = DB::fetch($query)) {
if ($value['targettplname']) {
$diyurl = block_getdiyurl($value['targettplname']);
$diyurl = $diyurl['url'];
$tplname = isset($_G['cache']['diytemplatename'][$value['targettplname']]) ? $_G['cache']['diytemplatename'][$value['targettplname']] : $value['targettplname'];
$diypage[$value['bid']][$value['targettplname']] = $diyurl ? '<a href="' . $diyurl . '" target="_blank">' . $tplname . '</a>' : $tplname;
}
$list[$value['bid']] = $value;
}
if ($list) {
foreach ($list as $bid => $value) {
$inpage = empty($diypage[$bid]) ? cplang('block_page_unused') : implode('<br/>', $diypage[$bid]);
$theclass = block_getclass($value['blockclass'], true);
showtablerow('', '', array($value['name'] ? $value['name'] : cplang('block_name_null'), $theclass['script'][$value['script']], $value['styleid'] ? $theclass['style'][$value['styleid']]['name'] : lang('portalcp', 'blockstyle_diy'), !empty($value['dateline']) ? dgmdate($value['dateline']) : cplang('block_dateline_null'), $inpage, "<a href=\"portal.php?mod=portalcp&ac=block&op=block&bid={$value['bid']}&from=cp\" target=\"_blank\" onclick=\"showWindow('showblock',this.href);return false;\">" . cplang('block_setting') . "</a>  " . "<a href=\"portal.php?mod=portalcp&ac=block&op=data&bid={$value['bid']}&from=cp\" target=\"_blank\" onclick=\"showWindow('showblock',this.href);return false;\">" . cplang('block_data') . "</a>  " . $diyop . " <a href=\"" . ADMINSCRIPT . "?action=block&operation=perm&bid={$value['bid']}\">" . cplang('portalcategory_perm') . '</a>'));
}
}
$multipage = multi($count, $perpage, $page, $mpurl);
}
showsubmit('', '', '', '<input type="submit" class="btn" name="clearsubmit" value="' . cplang('block_clear_unused') . '" />', $multipage);
showtablefooter();
showformfooter();
}
}
}
示例2: formatblockvalue
function formatblockvalue($value)
{
global $blockfavorite;
$value['name'] = empty($value['name']) ? '<strong>#' . $value['bid'] . '</strong>' : $value['name'];
$theclass = block_getclass($value['blockclass']);
$value['blockclassname'] = $theclass['name'];
$value['datasrc'] = $theclass['script'][$value['script']];
$value['isrecommendable'] = block_isrecommendable($value);
$value['perm'] = formatblockpermissoin($value);
$value['favorite'] = isset($blockfavorite[$value['bid']]) ? true : false;
return $value;
}
示例3: libfile
if ($count) {
require_once libfile('function/block');
$query = DB::query($sql);
while ($value = DB::fetch($query)) {
if ($value['blocktype']) {
$value['url'] = lang('portal/template', 'block_jscall');
} else {
$tplinfo = block_getdiyurl($value['targettplname']);
if ($tplinfo['url']) {
$value['url'] = lang('portal/template', 'block_view_link', array('url' => $tplinfo['url']));
} else {
$value['url'] = lang('portal/template', 'block_unused');
}
}
$value['name'] = empty($value['name']) ? '#' . $value['bid'] : trim($value['name']);
$theclass = block_getclass($value['blockclass']);
$value['datasrc'] = $theclass['script'][$value['script']];
$value['allowdata'] = checkperm('allowdiy') || $permission[$value['bid']]['allowdata'] ? true : false;
$value['allowsetting'] = checkperm('allowdiy') || $permission[$value['bid']]['allowsetting'] ? true : false;
$blocks[] = $value;
}
$multi = multi($count, $perpage, $page, "portal.php?mod=portalcp&ac=portalblock");
}
$language = lang('portal/template');
$navtitle = $language['block_management'] . ' - ' . $language['portal_management'];
include_once template("portal/portalcp_portalblock");
function getallowblock($uid)
{
if (empty($uid)) {
return false;
}
示例4: block_template
function block_template($bid)
{
global $_G;
$block = empty($_G['block'][$bid]) ? array() : $_G['block'][$bid];
$theclass = block_getclass($block['blockclass'], false);
$thestyle = !empty($block['styleid']) ? block_getstyle($block['styleid']) : dunserialize($block['blockstyle']);
if (empty($block) || empty($theclass) || empty($thestyle)) {
return false;
}
$template = block_build_template($thestyle['template']);
if (!empty($block['itemlist'])) {
if ($thestyle['moreurl']) {
$template = str_replace('{moreurl}', 'portal.php?mod=block&bid=' . $bid, $template);
}
$fields = array('picwidth' => array(), 'picheight' => array(), 'target' => array(), 'currentorder' => array());
if ($block['hidedisplay']) {
$fields = array_merge($fields, $theclass['fields']);
} else {
$thestyle['fields'] = !empty($thestyle['fields']) && is_array($thestyle['fields']) ? $thestyle['fields'] : block_parse_fields($template);
foreach ($thestyle['fields'] as $k) {
if (isset($theclass['fields'][$k])) {
$fields[$k] = $theclass['fields'][$k];
}
}
}
$order = 0;
$dynamicparts = array();
foreach ($block['itemlist'] as $position => $blockitem) {
$itemid = $blockitem['itemid'];
$order++;
$rkey = $rpattern = $rvalue = $rtpl = array();
$rkeyplug = false;
if (isset($thestyle['template']['index']) && is_array($thestyle['template']['index']) && isset($thestyle['template']['index'][$order])) {
$rkey[] = 'index_' . $order;
$rpattern[] = '/\\s*\\[index=' . $order . '\\](.*?)\\[\\/index\\]\\s*/is';
$rvalue[] = '';
$rtpl[] = $thestyle['template']['index'][$order];
}
if (empty($rkey)) {
$rkey[] = 'loop';
$rpattern[] = '/\\s*\\[loop\\](.*?)\\[\\/loop\\]\\s*/is';
$rvalue[] = isset($dynamicparts['loop']) ? $dynamicparts['loop'][1] : '';
if (is_array($thestyle['template']['order']) && isset($thestyle['template']['order'][$order])) {
$rtpl[] = $thestyle['template']['order'][$order];
} elseif (is_array($thestyle['template']['order']) && isset($thestyle['template']['order']['odd']) && $order % 2 == 1) {
$rtpl[] = $thestyle['template']['order']['odd'];
} elseif (is_array($thestyle['template']['order']) && isset($thestyle['template']['order']['even']) && $order % 2 == 0) {
$rtpl[] = $thestyle['template']['order']['even'];
} else {
$rtpl[] = $thestyle['template']['loop'];
}
}
if (!empty($thestyle['template']['indexplus'])) {
foreach ($thestyle['template']['indexplus'] as $k => $v) {
if (isset($v[$order])) {
$rkey[] = 'index' . $k . '=' . $order;
$rkeyplug = true;
$rpattern[] = '/\\[index' . $k . '=' . $order . '\\](.*?)\\[\\/index' . $k . '\\]/is';
$rvalue[] = '';
$rtpl[] = $v[$order];
}
}
}
if (empty($rkeyplug)) {
if (!empty($thestyle['template']['loopplus'])) {
foreach ($thestyle['template']['loopplus'] as $k => $v) {
$rkey[] = 'loop' . $k;
$rpattern[] = '/\\s*\\[loop' . $k . '\\](.*?)\\[\\/loop' . $k . '\\]\\s*/is';
$rvalue[] = isset($dynamicparts['loop' . $k]) ? $dynamicparts['loop' . $k][1] : '';
if (is_array($thestyle['template']['orderplus'][$k]) && isset($thestyle['template']['orderplus'][$k][$order])) {
$rtpl[] = $thestyle['template']['orderplus'][$k][$order];
} elseif (is_array($thestyle['template']['orderplus'][$k]) && isset($thestyle['template']['orderplus'][$k]['odd']) && $order % 2 == 1) {
$rtpl[] = $thestyle['template']['orderplus'][$k]['odd'];
} elseif (is_array($thestyle['template']['orderplus'][$k]) && isset($thestyle['template']['orderplus'][$k]['even']) && $order % 2 == 0) {
$rtpl[] = $thestyle['template']['orderplus'][$k]['even'];
} else {
$rtpl[] = $thestyle['template']['loopplus'][$k];
}
}
}
}
$blockitem['fields'] = !empty($blockitem['fields']) ? $blockitem['fields'] : array();
$blockitem['fields'] = is_array($blockitem['fields']) ? $blockitem['fields'] : dunserialize($blockitem['fields']);
if (!empty($blockitem['showstyle'])) {
$blockitem['fields']['showstyle'] = dunserialize($blockitem['showstyle']);
}
isset($blockitem['fields']['lastpost']) && ($block['dateuformat'] = 'u');
$blockitem = $blockitem['fields'] + $blockitem;
$blockitem['picwidth'] = !empty($block['picwidth']) ? intval($block['picwidth']) : 'auto';
$blockitem['picheight'] = !empty($block['picheight']) ? intval($block['picheight']) : 'auto';
$blockitem['target'] = !empty($block['target']) ? ' target="_' . $block['target'] . '"' : '';
$blockitem['currentorder'] = $order;
$blockitem['parity'] = $order % 2;
$searcharr = $replacearr = array();
$searcharr[] = '{parity}';
$replacearr[] = $blockitem['parity'];
foreach ($fields as $key => $field) {
$replacevalue = $blockitem[$key];
$field['datatype'] = !empty($field['datatype']) ? $field['datatype'] : '';
if ($field['datatype'] == 'int') {
//.........这里部分代码省略.........
示例5: in_array
$block['moreurl'] = $blockstyle['moreurl'] && in_array($block['blockclass'], array('forum_thread', 'portal_article', 'group_thread'), true) ? 1 : 0;
$_G['block'][$bid] = $block;
$blockperm = getblockperm($bid);
if ($blockperm['allowmanage']) {
$allowmanage = 1;
$allowdata = 1;
}
if ($blockperm['allowrecommend'] && !$blockperm['needverify']) {
$allowdata = 1;
}
}
if (empty($block['bid'])) {
$bid = 0;
}
$_GET['classname'] = !empty($_GET['classname']) ? $_GET['classname'] : ($block ? $block['blockclass'] : 'html_html');
$theclass = block_getclass($_GET['classname'], true);
$theclass['script'] = isset($theclass['script']) ? $theclass['script'] : array();
if (!empty($_GET['styleid']) && isset($theclass['style'][$_GET['styleid']])) {
$thestyle = $theclass['style'][$_GET['styleid']];
} elseif (isset($theclass['style'][$block['styleid']])) {
$_GET['styleid'] = intval($block['styleid']);
$thestyle = $theclass['style'][$_GET['styleid']];
} else {
$_GET['styleid'] = 0;
$thestyle = (array) dunserialize($block['blockstyle']);
}
$_GET['script'] = !empty($_GET['script']) && isset($theclass['script'][$_GET['script']]) ? $_GET['script'] : (!empty($block['script']) ? $block['script'] : key($theclass['script']));
$blocktype = !empty($_GET['blocktype']) || !empty($block['blocktype']) ? 1 : 0;
$nocachetime = in_array($_GET['script'], array('blank', 'line', 'banner', 'vedio', 'google')) ? true : false;
$is_htmlblock = $_GET['classname'] == 'html_html' ? 1 : 0;
$showhtmltip = false;
示例6: block_template
function block_template($bid)
{
global $_G;
$block = empty($_G['block'][$bid]) ? array() : $_G['block'][$bid];
$theclass = block_getclass($block['blockclass'], false);
$thestyle = !empty($block['styleid']) ? block_getstyle($block['styleid']) : unserialize($block['blockstyle']);
if (empty($block) || empty($theclass) || empty($thestyle)) {
return;
}
$template = block_build_template($thestyle['template']);
if (!empty($block['itemlist'])) {
$fields = array('picwidth' => array(), 'picheight' => array(), 'target' => array(), 'currentorder' => array());
if ($block['hidedisplay']) {
$fields = array_merge($fields, $theclass['fields']);
} else {
$thestyle['fields'] = !empty($thestyle['fields']) && is_array($thestyle['fields']) ? $thestyle['fields'] : block_parse_fields($template);
foreach ($thestyle['fields'] as $k) {
if (isset($theclass['fields'][$k])) {
$fields[$k] = $theclass['fields'][$k];
}
}
}
$order = 0;
$dynamicparts = array();
foreach ($block['itemlist'] as $itemid => $blockitem) {
$order++;
$rkey = $rpattern = $rvalue = $rtpl = array();
$rkeyplug = false;
if (isset($thestyle['template']['index']) && is_array($thestyle['template']['index']) && isset($thestyle['template']['index'][$order])) {
$rkey[] = 'index_' . $order;
$rpattern[] = '/\\s*\\[index=' . $order . '\\](.*?)\\[\\/index\\]\\s*/is';
$rvalue[] = '';
$rtpl[] = $thestyle['template']['index'][$order];
}
if (empty($rkey)) {
$rkey[] = 'loop';
$rpattern[] = '/\\s*\\[loop\\](.*?)\\[\\/loop\\]\\s*/is';
$rvalue[] = isset($dynamicparts['loop']) ? $dynamicparts['loop'][1] : '';
if (is_array($thestyle['template']['order']) && isset($thestyle['template']['order'][$order])) {
$rtpl[] = $thestyle['template']['order'][$order];
} elseif (is_array($thestyle['template']['order']) && isset($thestyle['template']['order']['odd']) && $order % 2 == 1) {
$rtpl[] = $thestyle['template']['order']['odd'];
} elseif (is_array($thestyle['template']['order']) && isset($thestyle['template']['order']['even']) && $order % 2 == 0) {
$rtpl[] = $thestyle['template']['order']['even'];
} else {
$rtpl[] = $thestyle['template']['loop'];
}
}
if (!empty($thestyle['template']['indexplus'])) {
foreach ($thestyle['template']['indexplus'] as $k => $v) {
if (isset($v[$order])) {
$rkey[] = 'index' . $k . '=' . $order;
$rkeyplug = true;
$rpattern[] = '/\\[index' . $k . '=' . $order . '\\](.*?)\\[\\/index' . $k . '\\]/is';
$rvalue[] = '';
$rtpl[] = $v[$order];
}
}
}
if (empty($rkeyplug)) {
if (!empty($thestyle['template']['loopplus'])) {
foreach ($thestyle['template']['loopplus'] as $k => $v) {
$rkey[] = 'loop' . $k;
$rpattern[] = '/\\s*\\[loop' . $k . '\\](.*?)\\[\\/loop' . $k . '\\]\\s*/is';
$rvalue[] = isset($dynamicparts['loop' . $k]) ? $dynamicparts['loop' . $k][1] : '';
if (is_array($thestyle['template']['orderplus'][$k]) && isset($thestyle['template']['orderplus'][$k][$order])) {
$rtpl[] = $thestyle['template']['orderplus'][$k][$order];
} elseif (is_array($thestyle['template']['orderplus'][$k]) && isset($thestyle['template']['orderplus'][$k]['odd']) && $order % 2 == 1) {
$rtpl[] = $thestyle['template']['order' . $k]['odd'];
} elseif (is_array($thestyle['template']['orderplus'][$k]) && isset($thestyle['template']['orderplus'][$k]['even']) && $order % 2 == 0) {
$rtpl[] = $thestyle['template']['orderplus'][$k]['even'];
} else {
$rtpl[] = $thestyle['template']['loopplus'][$k];
}
}
}
}
$blockitem['fields'] = !empty($blockitem['fields']) ? $blockitem['fields'] : array();
$blockitem['fields'] = is_array($blockitem['fields']) ? $blockitem['fields'] : unserialize($blockitem['fields']);
$blockitem['showstyle'] = !empty($blockitem['showstyle']) ? unserialize($blockitem['showstyle']) : array();
$blockitem['showstyle'] = !empty($blockitem['showstyle']) ? $blockitem['showstyle'] : (!empty($blockitem['fields']['showstyle']) ? $blockitem['fields']['showstyle'] : array());
$blockitem['picwidth'] = !empty($block['picwidth']) ? intval($block['picwidth']) : 'auto';
$blockitem['picheight'] = !empty($block['picheight']) ? intval($block['picheight']) : 'auto';
$blockitem['target'] = !empty($block['target']) ? ' target="_' . $block['target'] . '"' : '';
$blockitem['currentorder'] = $order;
$blockitem['parity'] = $order % 2;
$searcharr = $replacearr = array();
$searcharr[] = '{parity}';
$replacearr[] = $blockitem['parity'];
foreach ($fields as $key => $field) {
$replacevalue = isset($blockitem[$key]) ? $blockitem[$key] : (isset($blockitem['fields'][$key]) ? $blockitem['fields'][$key] : '');
$field['datatype'] = !empty($field['datatype']) ? $field['datatype'] : '';
if ($field['datatype'] == 'int') {
// int
$replacevalue = intval($replacevalue);
} elseif ($field['datatype'] == 'string') {
$replacevalue = $replacevalue;
} elseif ($field['datatype'] == 'date') {
$replacevalue = dgmdate($replacevalue, $block['dateuformat'] ? 'u' : $block['dateformat'], '9999', $block['dateuformat'] ? $block['dateformat'] : '');
} elseif ($field['datatype'] == 'title') {
//.........这里部分代码省略.........
示例7: block_template
function block_template($bid)
{
global $_G;
$block = empty($_G['block'][$bid]) ? array() : $_G['block'][$bid];
$theclass = block_getclass($block['blockclass']);
// for short
$thestyle = $theclass['style'][$block['styleid']];
// for short
if (empty($block) || empty($theclass) || empty($thestyle)) {
return;
}
$template = '';
if ($block['itemlist']) {
$template = $thestyle['template']['header'];
$order = 0;
foreach ($block['itemlist'] as $blockitem) {
$order++;
if (isset($thestyle['template']['order'][$order])) {
$theteamplte = $thestyle['template']['order'][$order];
} else {
$theteamplte = $thestyle['template']['loop'];
}
$blockitem['showstyle'] = !empty($blockitem['showstyle']) ? unserialize($blockitem['showstyle']) : array();
$blockitem['fields'] = !empty($blockitem['fields']) ? $blockitem['fields'] : array();
$blockitem['fields'] = is_array($blockitem['fields']) ? $blockitem['fields'] : unserialize($blockitem['fields']);
$blockitem['picwidth'] = !empty($block['picwidth']) ? intval($block['picwidth']) : 'auto';
$blockitem['picheight'] = !empty($block['picheight']) ? intval($block['picheight']) : 'auto';
$blockitem['target'] = !empty($block['target']) ? ' target="_' . $block['target'] . '"' : '';
$fields = array('picwidth' => array(), 'picheight' => array(), 'target' => array());
$fields = array_merge($fields, $theclass['fields']);
$searcharr = $replacearr = array();
foreach ($fields as $key => $field) {
$replacevalue = isset($blockitem[$key]) ? $blockitem[$key] : (isset($blockitem['fields'][$key]) ? $blockitem['fields'][$key] : '');
$field['datatype'] = !empty($field['datatype']) ? $field['datatype'] : '';
if ($field['datatype'] == 'int') {
// int
$replacevalue = intval($replacevalue);
} elseif ($field['datatype'] == 'string') {
$replacevalue = dhtmlspecialchars($replacevalue);
} elseif ($field['datatype'] == 'date') {
$replacevalue = dgmdate($replacevalue, 'u');
} elseif ($field['datatype'] == 'title') {
//title
$replacevalue = stripslashes($replacevalue);
$style = block_showstyle($blockitem['showstyle'], 'title');
if ($style) {
$theteamplte = preg_replace('/title=[\'"]{title}[\'"]/', 'title="{title-title}"', $theteamplte);
$theteamplte = preg_replace('/alt=[\'"]{title}[\'"]/', 'alt="{alt-title}"', $theteamplte);
$searcharr[] = '{title-title}';
$replacearr[] = $replacevalue;
$searcharr[] = '{alt-title}';
$replacearr[] = $replacevalue;
$replacevalue = '<font style="' . $style . '">' . $replacevalue . '</font>';
}
} elseif ($field['datatype'] == 'summary') {
//summary
$replacevalue = stripslashes($replacevalue);
$style = block_showstyle($blockitem['showstyle'], 'summary');
if ($style) {
$replacevalue = htmlspecialchars($replacevalue);
$replacevalue = '<font style="' . $style . '">' . $replacevalue . '</font>';
}
} elseif ($field['datatype'] == 'pic') {
if ($blockitem['picflag'] == '1') {
$replacevalue = $_G['setting']['attachurl'] . $replacevalue;
} elseif ($blockitem['picflag'] == '2') {
$replacevalue = $_G['setting']['ftp']['attachurl'] . $replacevalue;
}
if ($block['picwidth'] && $block['picheight'] && $block['picwidth'] != 'auto' && $block['picheight'] != 'auto') {
if ($blockitem['makethumb'] == 1) {
$replacevalue = $_G['setting']['attachurl'] . block_thumbpath($block, $blockitem);
} elseif (!$_G['block_makethumb'] && !$blockitem['makethumb']) {
require_once libfile('class/image');
$image = new image();
$thumbpath = block_thumbpath($block, $blockitem);
$return = $image->Thumb($replacevalue, $thumbpath, $block['picwidth'], $block['picheight'], 2);
if ($return) {
DB::update('common_block_item', array('makethumb' => 1), array('itemid' => $blockitem['itemid']));
$replacevalue = $_G['setting']['attachurl'] . $thumbpath;
} else {
DB::update('common_block_item', array('makethumb' => 2), array('itemid' => $blockitem['itemid']));
}
$_G['block_makethumb'] = true;
}
}
}
$searcharr[] = '{' . $key . '}';
$replacearr[] = $replacevalue;
}
$template .= str_replace($searcharr, $replacearr, $theteamplte);
}
$template .= $thestyle['template']['footer'];
}
return $template;
}
示例8: empty
if ($bid && !$allowmanage) {
$blockpermission = DB::fetch_first('SELECT * FROM ' . DB::table('common_block_permission') . " WHERE bid='{$bid}' AND uid='{$_G['uid']}'");
$blockdataperm = $blockpermission && $blockpermission['allowdata'] ? true : false;
$blocksettingperm = $blockpermission && $blockpermission['allowsetting'] ? true : false;
if ($blockdataperm || $blocksettingperm) {
$allowmanage = 1;
}
} else {
$blockdataperm = $blocksettingperm = true;
}
$block['param'] = empty($block['param']) ? array() : unserialize($block['param']);
if (empty($block['bid'])) {
$bid = 0;
}
$_GET['classname'] = !empty($_GET['classname']) ? $_GET['classname'] : ($block ? $block['blockclass'] : 'html_html');
$theclass = block_getclass($_GET['classname']);
$theclass['style'] = isset($theclass['style']) ? $theclass['style'] : array();
$theclass['script'] = isset($theclass['script']) ? $theclass['script'] : array();
$_GET['styleid'] = !empty($_GET['styleid']) && isset($theclass['style'][$_GET['styleid']]) ? $_GET['styleid'] : (!empty($block['styleid']) ? $block['styleid'] : key($theclass['style']));
$thestyle = $theclass['style'][$_GET['styleid']];
$_GET['script'] = !empty($_GET['script']) && isset($theclass['script'][$_GET['script']]) ? $_GET['script'] : (!empty($block['script']) ? $block['script'] : key($theclass['script']));
$is_htmlblock = $_GET['classname'] == 'html_html' ? 1 : 0;
$nocachetime = in_array($_GET['script'], array('blank', 'line', 'banner', 'vedio', 'google')) ? true : false;
$blocktype = !empty($_GET['blocktype']) || !empty($block['blocktype']) ? 1 : 0;
if ($op == 'block') {
if ($bid && !$allowmanage) {
showmessage('block_edit_nopermission');
}
if (!$bid) {
list($tpl, $id) = explode(':', $_GET['tpl']);
if (trim($tpl) == 'portal/portal_topic_content') {