Exemplo n.º 1
0
                                        AND new_cat_id = ' . $cat_tsk['cat_id'] . '
                                     ORDER BY new_view DESC
                                     LIMIT 3');
    while ($row = mysqli_fetch_assoc($db_news_tsk_hot->result)) {
        $check_i++;
        $row['new_title'] = htmlspecialbo($row['new_title']);
        $row['cat_name'] = $cat_tsk['cat_name'];
        $row['link_detail'] = generate_news_detail_url($row);
        $row['new_picture'] = get_picture_path($row['new_picture'], 'medium');
        $list_news_tsk['array_news'][] = $row;
    }
}
shuffle($list_news_category);
array_pop($list_news_category);
$rainTpl->assign('list_news_category', $list_news_category);
$rainTpl->assign('list_news_tsk', $list_news_tsk);
//list câu hỏi và bệnh khối hỏi đáp bên phải
$list_qaa_sidebar = get_qaa_listing_sidebar();
$rainTpl->assign('list_qaa_sidebar', $list_qaa_sidebar);
//khối sơ đồ cơ thể
$anatomy_sex = get_cookie_anatomy_sex();
$anatomy_sex_str = getValue('anatomy-sex', 'str', 'COOKIE', 'male', 3);
$sex_male_active = $anatomy_sex == DOITUONG_NAMGIOI ? 'color-base' : 'text-muted';
$sex_female_active = $anatomy_sex == DOITUONG_NUGIOI ? 'color-base' : 'text-muted';
$anatomy_type = SECTION_TYPE_FRONT;
$anatomy_data = get_anatomy_data($anatomy_sex, $anatomy_type);
$rainTpl->assign('anatomy_data', $anatomy_data);
$rainTpl->assign('anatomy_sex_str', $anatomy_sex_str);
$rainTpl->assign('sex_male_active', $sex_male_active);
$rainTpl->assign('sex_female_active', $sex_female_active);
$rainTpl->assign('link_catch_disease', generate_cat_disease_url());
Exemplo n.º 2
0
            $sec_data['list_sec_manifest'] = array();
            $list_manifest = implode(',', $list_manifest);
            if ($list_manifest) {
                $db_query = new db_query('SELECT DISTINCT man_id,man_name
                                      FROM manifest
                                      WHERE man_id IN (' . $list_manifest . ')
                                      LIMIT 10');
                while ($row = mysqli_fetch_assoc($db_query->result)) {
                    $row['link_detail'] = generate_cat_disease_url();
                    $sec_data['list_sec_manifest'][] = $row;
                }
            }
            //assign to template
            $rainTpl = new RainTPL();
            $rainTpl->assign('sec_data', $sec_data);
            ob_clean();
            echo $rainTpl->draw('section_detail', 1);
        }
        break;
    case 'get_image':
        $sex = getValue('sex', 'str', 'POST', '', 3);
        $type = getValue('type', 'str', 'POST', '', 3);
        $sex = $sex == 'male' ? DOITUONG_NAMGIOI : DOITUONG_NUGIOI;
        $type = $type == 'front' ? SECTION_TYPE_FRONT : SECTION_TYPE_BACK;
        $anatomy_data = get_anatomy_data($sex, $type);
        $rainTpl = new RainTPL();
        $rainTpl->assign('anatomy_data', $anatomy_data);
        ob_clean();
        echo $rainTpl->draw('anatomy_image', 1);
        break;
}