Beispiel #1
0
 }
 // Cai dat du lieu cho cac module
 if (empty($db_config['error'])) {
     define('NV_IS_MODADMIN', true);
     $module_name = 'modules';
     $lang_module['modules'] = '';
     $lang_module['vmodule_add'] = '';
     $lang_module['autoinstall'] = '';
     $lang_global['mod_modules'] = '';
     define('NV_UPLOAD_GLOBALTABLE', $db_config['prefix'] . '_upload');
     require_once NV_ROOTDIR . '/' . NV_ADMINDIR . '/modules/functions.php';
     $module_name = '';
     $modules_exit = nv_scandir(NV_ROOTDIR . '/modules', $global_config['check_module']);
     // Cai dat du lieu cho ngon ngu
     require_once NV_ROOTDIR . '/includes/action_' . $db_config['dbtype'] . '.php';
     $sql_create_table = nv_create_table_sys(NV_LANG_DATA);
     foreach ($sql_create_table as $_sql) {
         try {
             $db->query($_sql);
         } catch (PDOException $e) {
             $nv_Request->set_Session('maxstep', 4);
             $db_config['error'] = $e->getMessage();
             trigger_error($e->getMessage());
             break;
         }
     }
     unset($sql_create_table);
     $sql = 'SELECT * FROM ' . $db_config['prefix'] . '_' . NV_LANG_DATA . '_modules ORDER BY weight ASC';
     $result = $db->query($sql);
     $modules = $result->fetchAll();
     foreach ($modules as $key => $row) {
Beispiel #2
0
 } elseif ($checksess == md5($keylang . session_id()) and in_array($keylang, $lang_array_exit)) {
     if (isset($array_lang_setup[$keylang]) and $array_lang_setup[$keylang] == 1) {
         include NV_ROOTDIR . '/includes/header.php';
         echo nv_admin_theme($lang_module['nv_data_setup']);
         include NV_ROOTDIR . '/includes/footer.php';
     } elseif ($global_config['lang_multi']) {
         nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['nv_setup_new'] . ' ' . $lang_module['nv_lang_data'], ' langkey : ' . $keylang, $admin_info['userid']);
         $site_theme = $db->query("SELECT config_value FROM " . NV_CONFIG_GLOBALTABLE . " where lang='" . $global_config['site_lang'] . "' AND module='global' AND config_name='site_theme'")->fetchColumn();
         $global_config['site_theme'] = $site_theme;
         try {
             $db->exec('ALTER DATABASE ' . $db_config['dbname'] . ' DEFAULT CHARACTER SET ' . $db_config['charset'] . ' COLLATE ' . $db_config['collation']);
         } catch (PDOException $e) {
             trigger_error($e->getMessage());
         }
         require_once NV_ROOTDIR . '/includes/action_' . $db->dbtype . '.php';
         $sql_create_table = nv_create_table_sys($keylang);
         foreach ($sql_create_table as $query) {
             try {
                 $db->query($query);
             } catch (PDOException $e) {
                 include NV_ROOTDIR . '/includes/header.php';
                 echo nv_admin_theme('ERROR SETUP SQL: <br />' . $query);
                 include NV_ROOTDIR . '/includes/footer.php';
             }
         }
         $db->columns_add(NV_COUNTER_GLOBALTABLE, $keylang . '_count', 'integer', 2147483647, true, 0);
         if (defined('NV_MODULE_SETUP_DEFAULT')) {
             $lang_module['modules'] = '';
             $lang_module['vmodule_add'] = '';
             $lang_module['blocks'] = '';
             $lang_module['autoinstall'] = '';