Esempio n. 1
0
}
include "initsession.php";
ob_start();
require_once '../classes/database.php';
require_once '../classes/user.php';
require_once '../classes/TagsGenerate.php';
require_once '../classes/generate_form.php';
require_once '../classes/rain.tpl.class.php';
require_once '../classes/simple_html_dom.php';
require_once '../functions/functions.php';
require_once '../functions/function_translate.php';
require_once '../functions/rewrite_functions.php';
require_once '../functions/date_functions.php';
require_once '../includes/tuthuoc/inc_config.php';
$myuser = new user();
$is_pjax = isset($_SERVER["HTTP_X_PJAX"]) && strtolower($_SERVER["HTTP_X_PJAX"]) == 'true';
$pjax_container = $is_pjax && isset($_SERVER['HTTP_X_PJAX_CONTAINER']) ? $_SERVER['HTTP_X_PJAX_CONTAINER'] : '';
$tpl_constants = isset($tpl_constants) ? $tpl_constants : array();
RainTpl::configure("base_url", null);
RainTpl::configure("tpl_dir", "../templates" . $_version . "/tuthuoc/");
RainTpl::configure("cache_dir", "../caches/");
RainTPL::configure("path_replace_list", array());
RainTPL::configure("tpl_constants", $tpl_constants);
$filter_doituong = array(DOITUONG_TREEM => 'Trẻ em', DOITUONG_NAMGIOI => 'Nam giới', DOITUONG_NUGIOI => 'Nữ giới', DOITUONG_NGUOICAOTUOI => 'Người cao tuổi');
$filter_section = get_all_section();
$rainTpl = new RainTPL();
$rainTpl->assign('myuser', $myuser);
$rainTpl->assign('filter_doituong', $filter_doituong);
$rainTpl->assign('filter_section', $filter_section);
$rainTpl->assign('base_search_url', generate_base_search_url());
Esempio n. 2
0
<?php

require_once 'config.php';
$base_search_url = generate_base_search_url();
$page_title = t('Trang thông tin y tế, sức khỏe cộng đồng');
//list category
$list_category = get_all_categories('home');
$count_list_cate = count($list_category) - 2;
$list_category2 = array_slice($list_category, 1, $count_list_cate);
//quảng cáo
$adv_top = get_advertising(ADV_POSITION_TOP, 1);
$adv_right = get_advertising(ADV_POSITION_RIGHT, 1);
//quảng cáo banner
$adv_banner_list = get_advertising(ADV_POSITION_LARGE_BANNER, 2);
//link hỏi đáp
$link_hoidap = generate_qaa_url();
$rainTpl->assign('css_global', $css_global);
$rainTpl->assign('js_global', $js_global);
$rainTpl->assign('page_title', $page_title);
$rainTpl->assign('meta_description', 'Cẩm nang sức khỏe, dinh dưỡng cho gia đình, cộng đồng và xã hội');
$rainTpl->assign('meta_keyword', GENERAL_KEYWORD);
$rainTpl->assign('list_categories', $list_category);
$rainTpl->assign('list_categories_slice', $list_category2);
$rainTpl->assign('link_hoidap', $link_hoidap);
$rainTpl->assign('base_search_url', $base_search_url);
//assign quảng cáo
$rainTpl->assign('adv_top', $adv_top);
$rainTpl->assign('adv_right', $adv_right);
//quảng cáo banner
$rainTpl->assign('adv_banner_list', $adv_banner_list);
$rainTpl->assign('time_now', getDateTime());