示例#1
0
文件: index.php 项目: vcgato29/poff
function get_content()
{
    global $content;
    $file = 'pages/' . in('p');
    if (in('dyn')) {
        $id = in('dyn');
        $content = get_dyn_content($id);
        return;
    }
    if (in('l') == 'eng') {
        $file .= '_e';
    }
    $file .= '.html';
    if (in('p') == 'news') {
        $content = get_news(in('id'));
        return;
    }
    if (!in('p')) {
        $id = in('l') == 'eng' ? 26 : 9;
        $content = get_dyn_content($id);
        $t = new Template("inc/news.tmpls");
        $c = get_news_list(1, 0);
        // avalehele kolm uudist koos kstga
        if (in('l') == 'eng') {
            $tmpl = 'news1_e';
        } else {
            $tmpl = 'news1';
        }
        $news_content = $t->get($tmpl, array($c));
        $content = preg_replace("/\\[UUDISED\\]/", $news_content, $content);
        return;
    }
    if (file_exists($file)) {
        $content = implode("\n", file($file));
        list($savi, $content, $savi) = explode("<delimiter>", $content);
    } else {
        if (in('l') == 'eng') {
            $content = 'Coming soon...';
        } else {
            $content = 'Valmimas...';
        }
    }
}
echo $indexbg_pic;
?>
) no-repeat 50% top;height:660px;">
        	<div class="container">
            	<?php 
echo hook('searchbox');
?>
				<?php 
$homeHot = sp_getslide($theme_config['homeHot']);
$homeHot = empty($homeHot) ? $default_home_slides : $homeHot;
$newtab_plugin = sp_get_plugin_config("Newtab");
$newtab = array($newtab_plugin['tabname1_value'], $newtab_plugin['tabname2_value'], $newtab_plugin['tabname3_value']);
$navTree2 = sp_get_menu_tree($theme_config['commonly_used_module']);
$tongzhi = get_news_list($newtab[0], 6);
$xwzx = get_news_list($newtab[1], 6);
$jz = get_news_list($newtab[2], 6, 'jz');
?>
				<div class="indprimarybox">
				  	<div class="indcol">
				    	<div class="item item_1">
					      	<header class="boxtitle">
					        	<span class="t">热点</span>
					      	</header>
					      	<div class="hotcon">
					          	<div class="prev"></div>
					          	<div class="next"></div>
					          	<div class="hotconimg" style="position:relative;overflow:hidden;">
						            <?php 
if (is_array($homeHot)) {
    foreach ($homeHot as $key => $vo) {
        ?>