Esempio n. 1
0
function showmain($content)
{
    global $tpl_path, $conf, $app_lang, $app_default;
    $step = $_GET['step'] != '' ? $_GET['step'] : 0;
    $app_lang['step'][$step]['step_class'] = 'up';
    $tpl = new tpl($tpl_path . 'index.html');
    $tpl->tplblocksign("topstep", $app_lang['step']);
    //替换顶部的分类
    $tpl->tplsign("tpl_path", $tpl_path);
    //替换模板的路径
    $tpl->tplsign("app_name", $conf['APP_NAME']);
    //替换项目名称
    if ($step > 2) {
        $tpl->tplissign('show_next', 0);
        //第3步之前都是可以到下一步的
    } else {
        $tpl->tplissign('show_next', 1);
    }
    if ($step == 0 || $step == 5) {
        //第1,6步不需要重新操作
        $tpl->tplissign('show_redo', 0);
    } else {
        $tpl->tplissign('show_redo', 1);
    }
    $tpl->tplsign('tpl_main', $content);
    $tpl->tplsign("step_next", $step + 1);
    //替换项目名称
    $tpl->tplsign("step_now", $step);
    //替换项目名称
    /*统一显示错误提示信息*/
    $steuperr = $_SESSION['steup'][$step]['err'];
    $tpl->tplissign("err", $steuperr);
    //信息提示
    $tpl->tplblocksign("note_info", $steuperr);
    //信息提示的内容
    if (!$_SESSION['app_conf']) {
        $_SESSION['app_conf'] = $app_default;
    }
    $tpl->tplblocksign('app_default', $_SESSION['app_conf']);
    //默认的设置
    $tpl->tpllangsign($app_lang);
    //语言处理
    $tpl->tplshow();
}