Esempio n. 1
0
     nv_admin_read_lang($dirlang, $module, 1);
     $array_filename[] = str_replace(NV_ROOTDIR, '', str_replace('\\', '/', $include_lang));
 }
 $dirs = nv_scandir(NV_ROOTDIR . '/language/' . $dirlang, '/^block\\.global\\.([a-zA-Z0-9\\-\\_]+)\\.php$/');
 foreach ($dirs as $file_i) {
     nv_admin_read_lang($dirlang, 'global', $file_i);
 }
 $dirs = nv_scandir(NV_ROOTDIR . '/modules', $global_config['check_module']);
 foreach ($dirs as $module) {
     nv_admin_read_lang($dirlang, $module, 0);
     $array_filename[] = str_replace(NV_ROOTDIR, '', str_replace('\\', '/', $include_lang));
     nv_admin_read_lang($dirlang, $module, 1);
     $array_filename[] = str_replace(NV_ROOTDIR, '', str_replace('\\', '/', $include_lang));
     $blocks = nv_scandir(NV_ROOTDIR . '/modules/' . $module . '/language/', '/^block\\.(global|module)\\.([a-zA-Z0-9\\-\\_]+)\\_' . $dirlang . '\\.php$/');
     foreach ($blocks as $file_i) {
         nv_admin_read_lang($dirlang, $module, $file_i);
     }
 }
 $nv_Request->set_Cookie('dirlang', $dirlang, NV_LIVE_COOKIE_TIME);
 $xtpl = new XTemplate('read.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
 $xtpl->assign('LANG', $lang_module);
 $xtpl->assign('GLANG', $lang_global);
 $xtpl->assign('URL', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=interface');
 foreach ($array_filename as $name) {
     if (!$name) {
         continue;
     }
     $xtpl->assign('NAME', $name);
     $xtpl->parse('main.loop');
 }
 $xtpl->parse('main');
Esempio n. 2
0
    if (!empty($dirlang) and is_dir(NV_ROOTDIR . "/language/" . $dirlang)) {
        $array_filename = array();
        nv_admin_add_field_lang($dirlang);
        nv_admin_read_lang($dirlang, "global", 0);
        nv_admin_read_lang($dirlang, "install", 0);
        $array_filename[] = str_replace(NV_ROOTDIR, "", str_replace('\\', '/', $include_lang));
        nv_admin_read_lang($dirlang, "global", 1);
        $array_filename[] = str_replace(NV_ROOTDIR, "", str_replace('\\', '/', $include_lang));
        $dirs = nv_scandir(NV_ROOTDIR . "/" . NV_ADMINDIR . "/modules", $global_config['check_module']);
        foreach ($dirs as $module) {
            nv_admin_read_lang($dirlang, $module, 1);
            $array_filename[] = str_replace(NV_ROOTDIR, "", str_replace('\\', '/', $include_lang));
        }
        $dirs = nv_scandir(NV_ROOTDIR . "/modules", $global_config['check_module']);
        foreach ($dirs as $module) {
            nv_admin_read_lang($dirlang, $module, 0);
            $array_filename[] = str_replace(NV_ROOTDIR, "", str_replace('\\', '/', $include_lang));
            nv_admin_read_lang($dirlang, $module, 1);
            $array_filename[] = str_replace(NV_ROOTDIR, "", str_replace('\\', '/', $include_lang));
        }
        $nv_Request->set_Cookie('dirlang', $dirlang, NV_LIVE_COOKIE_TIME);
        $contents = "<br><br><p align=\"center\"><strong>" . $lang_module['nv_lang_readok'] . "</strong></p>";
        $contents .= implode("<br>", $array_filename);
        $contents .= "<META HTTP-EQUIV=\"refresh\" content=\"10;URL=" . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=main\">";
        include NV_ROOTDIR . "/includes/header.php";
        echo nv_admin_theme($contents);
        include NV_ROOTDIR . "/includes/footer.php";
    }
}
Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "");
exit;