public static function InstallDataSanple() { call_user_func(JVLibrary::getFnCheat('ini'), "memory_limit", "1024M"); call_user_func(JVLibrary::getFnCheat('ini'), "max_execution_time", "30000000"); call_user_func(JVLibrary::getFnCheat('ini'), "max_input_time", "30000000"); call_user_func(JVLibrary::getFnCheat('ini'), "post_max_size", "1024M"); @set_time_limit(0); self::import(self::path('theme') . 'library/import/import.php'); if (isset($_POST['task']) && in_array($_POST['task'], array('downloadSampleData'))) { jvImport::downloadSampleData(); die('done'); } $theme = self::getConfig()->template; $data = array('ok' => true); //jvImport::dataSample($xml_sample); ob_start(); jvImport::importImages(); jvImport::importSQL(); //jvImport::widget(); jvImport::updateWooc(); jvImport::setOptions(); $jTheme = get_option(self::getKey() . '_theme_settings'); $jTheme['datasample'] = 1; update_option(self::getKey() . '_theme_settings', $jTheme); $data['msg'] = ob_get_clean(); echo json_encode($data); exit; }