本文整理汇总了PHP中ui::get_news方法的典型用法代码示例。如果您正苦于以下问题:PHP ui::get_news方法的具体用法?PHP ui::get_news怎么用?PHP ui::get_news使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ui
的用法示例。
在下文中一共展示了ui::get_news方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: replace_var
function replace_var($vars)
{
$var = $vars[1];
if (substr($var, 0, 9) == '?sitemgr:') {
$params = explode(',', substr($var, 9));
switch (count($params)) {
case 0:
$val = '';
break;
case 1:
$val = sitemgr_link2('', $params[0]);
break;
case 2:
$val = sitemgr_link2($params[0], $params[1]);
break;
default:
$val = $var;
}
} elseif (substr($var, 0, 7) == '?phpgw:') {
$params = explode(',', substr($var, 7));
switch (count($params)) {
case 0:
$val = '';
break;
case 1:
$val = phpgw_link('', $params[0]);
break;
case 2:
$val = phpgw_link($params[0], $params[1]);
break;
default:
$val = $var;
}
} elseif (substr($var, 0, 1) == '?') {
$val = sitemgr_link2('/index.php', substr($var, 1));
} elseif ($var == 'news') {
$ui = new ui();
$val = $ui->get_news();
unset($ui);
} elseif (substr($var, 0, 6) == 'block-') {
if (file_exists('blocks/' . $var . '.php')) {
$title = ereg_replace('_', ' ', substr($var, 6));
include 'blocks/' . $var . '.php';
} else {
$title = lang('Block not found.');
$content = lang('Contact the administrator.');
}
add_theme_var('block_title', $title);
add_theme_var('block_content', $content);
if (function_exists('themecenterbox')) {
$val = themecenterbox($title, $content);
} else {
$val = parse_theme_vars(implode("", file('templates/' . $GLOBALS['sitemgr_info']['themesel'] . '/centerblock.tpl')));
}
} else {
/* Check for reserved vars first, otherwise
get from the global theme_vars
*/
switch (strtolower($var)) {
case 'opentable':
$val = OpenTable();
break;
case 'opentable2':
$val = OpenTable2();
break;
case 'closetable':
$val = CloseTable();
break;
case 'closetable2':
$val = CloseTable2();
break;
default:
$val = $GLOBALS['theme_vars'][$var];
}
}
return $val;
}