From 4d66699aaf67ab08eca399c44e4e6ea68f364247 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 18:42:30 +0200 Subject: [PATCH 01/78] ver 2.0, one file setup, totally recoded --- index.php | 672 +++++++++++++ wp-quick-install/.htaccess | 4 - wp-quick-install/assets/css/bootstrap.min.css | 228 ----- wp-quick-install/assets/css/buttons.min.css | 1 - wp-quick-install/assets/css/style.min.css | 1 - .../assets/images/wordpress-logo.svg | 1 - .../assets/js/jquery-1.8.3.min.js | 2 - wp-quick-install/assets/js/script.js | 350 ------- wp-quick-install/data.ini | 134 --- wp-quick-install/inc/functions.php | 11 - wp-quick-install/index.php | 896 ------------------ 11 files changed, 672 insertions(+), 1628 deletions(-) create mode 100755 index.php delete mode 100644 wp-quick-install/.htaccess delete mode 100755 wp-quick-install/assets/css/bootstrap.min.css delete mode 100644 wp-quick-install/assets/css/buttons.min.css delete mode 100644 wp-quick-install/assets/css/style.min.css delete mode 100644 wp-quick-install/assets/images/wordpress-logo.svg delete mode 100644 wp-quick-install/assets/js/jquery-1.8.3.min.js delete mode 100644 wp-quick-install/assets/js/script.js delete mode 100644 wp-quick-install/data.ini delete mode 100644 wp-quick-install/inc/functions.php delete mode 100755 wp-quick-install/index.php diff --git a/index.php b/index.php new file mode 100755 index 0000000..641c18a --- /dev/null +++ b/index.php @@ -0,0 +1,672 @@ + + +{ + +} + +error_log(); + + // sets data + $this->data = $initData; + if($_POST["data"]) $this->data = $_POST["data"]; + + // no submit by default + $this->data["auto_submit"] = false; + + // install dir + if(!$this->data["dir"]) $this->data["dir"] = __DIR__; + + // decide steps + if($this->data["step"]) { + + $func = "step_" . $this->data["step"]; + + if(method_exists($this, $func)) call_user_func( array($this, $func) ); + } + + // return ajax or page + $is_ajax = $_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest"; + $is_ajax ? $this->ajax_send() : $this->page(); + } + + function ajax_send() { + header("Content-type: application/json"); + echo json_encode(array("data" => $this->data, "error" => $this->error)); + } + + function error_log() { + error_reporting(E_ALL); + @ini_set('html_errors', false); + @ini_set('display_errors', false); + + set_error_handler( array($this, "error_handler") ); + register_shutdown_function( array($this, "shutdown_function") ); + } + + function shutdown_function() { + if($e = error_get_last()) { + $this->error_handler($e["type"], $e["message"], $e["file"], $e["line"], null); + } + } + + function error_handler($errno, $str, $file, $line, $context) { + if (!error_reporting()) return true; // silence operator @ + if (!(4983 & $errno)) return true; + + $msg = $str . " line " . $line; + $msg = trim($msg); + + @header("Content-type: application/json"); + echo json_encode(array("error" => array($msg))); + exit; + + return true; + } + + function dir_ok() { + + if (!is_writable($this->data["dir"])) { + $this->error[] = _("You don't have good permissions rights on ") . basename($this->data["dir"]); + } + else { + return true; + } + } + + function no_installed_wp() { + + if (file_exists($directory . 'wp-config.php')) { + $this->error[] = _("WordPress seems installed, please clean the folder before continue."); + } + else { + return true; + } + } + + function step_first() { + if ($this->dir_ok() && $this->no_installed_wp()) { + $this->data["step"] = "db"; + } + } + + function db_test_ok() { + + try { + $dsn = "mysql:host=" . $this->data["db"]["host"] . ";dbname=" . $this->data["db"]["name"] ; + new PDO($dsn, $this->data["db"]["user"], $this->data["db"]["pwd"]); + } + catch (Exception $e) { + $this->error[] = "Error establishing database connection."; + return false; + } + return true; + } + + function step_db() { + if($this->db_test_ok()) { + $this->data["step"] = "lang"; + } + } + + function step_lang() { + + $langs = json_decode(file_get_contents(self::API_CORE . $this->data['lang']), true); + + if(!$langs["offers"][0]) { + + $this->error[] = "Language is not available"; + return; + } + + $this->data["zip_file_url"] = $langs["offers"][0]["download"]; + + $this->data["step"] = "download"; + $this->data["auto_submit"] = true; + } + + function step_download() { + $this->download_wp(); + $this->data["step"] = "unzip"; + $this->data["auto_submit"] = true; + } + + function download_wp() { + + @mkdir( self::CACHE_PATH ); + + $this->data["zip_file"] = self::CACHE_PATH . basename($this->data["zip_file_url"]); + + file_put_contents( $this->data["zip_file"], file_get_contents($this->data["zip_file_url"]) ); + } + + function step_unzip() { + + $this->unzip(); + + $this->data["step"] = "config"; + $this->data["auto_submit"] = true; + } + + function unzip() { + + $zip = new ZipArchive; + + if ( $zip->open($this->data["zip_file"]) === false ) { + + $this->error[] = "Cannot unzip?"; + return; + } + else + { + $zip->extractTo("."); + $zip->close(); + + $files = scandir("wordpress"); + $files = array_diff( $files, array( ".", ".." ) ); + + foreach( $files as $file ) + { + $from = "wordpress/" . $file; + $to = $this->data["dir"] . "/" . $file; + + if($file == "index.php") $to .= ".orig"; + + rename($from, $to); + } + + unlink($this->data["zip_file"]); + rmdir("wordpress"); + rmdir(self::CACHE_PATH); + unlink($this->data["dir"] . "/license.txt"); + unlink($this->data["dir"] . "/readme.html"); + } + } + + function step_config() { + + $this->config(); + + $this->data["step"] = "setup"; + } + + function get_secret_keys() { + + $secret_keys = file_get_contents('https://api.wordpress.org/secret-key/1.1/salt/'); + + if ( !$secret_keys ) { + $this->error[] = "Cannot retrieve secret keys."; + return; + } + + $secret_keys = explode("\n", $secret_keys); + foreach ( $secret_keys as $k => $v ) { + $secret_keys[$k] = substr($v, 28, 64); + } + + return $secret_keys; + } + + function replace_const(&$config, $const, $value) { + + $const = addcslashes(preg_quote($const), '\''); + $value = addcslashes(preg_quote($value), '\''); + + $config = preg_replace("/(define\('" . $const . "',\s*').+('\))/", '$1' . $value . '$2', $config); + } + + function replace_var(&$config, $var, $value) { + + $var = addcslashes(preg_quote($var), '\''); + $value = addcslashes(preg_quote($value), '\''); + + $config = preg_replace("/(\\\$" . $var . "\s*=\s*').+(')/", '$1' . $value . '$2', $config); + } + + function config() { + + $config = file_get_contents( $this->data["dir"] . '/wp-config-sample.php'); + $secret_keys = $this->get_secret_keys(); + + $this->replace_const($config, "DB_NAME", $this->data["db"]["name"]); + $this->replace_const($config, "DB_USER", $this->data["db"]["user"]); + $this->replace_const($config, "DB_PASSWORD", $this->data["db"]["pwd"]); + $this->replace_const($config, "DB_HOST", $this->data["db"]["host"]); + + $this->replace_const($config, "AUTH_KEY", $secret_keys[0]); + $this->replace_const($config, "SECURE_AUTH_KEY", $secret_keys[1]); + $this->replace_const($config, "LOGGED_IN_KEY", $secret_keys[2]); + $this->replace_const($config, "NONCE_KEY", $secret_keys[3]); + + $this->replace_const($config, "AUTH_SALT", $secret_keys[4]); + $this->replace_const($config, "SECURE_AUTH_SALT", $secret_keys[5]); + $this->replace_const($config, "LOGGED_IN_SALT", $secret_keys[6]); + $this->replace_const($config, "NONCE_SALT", $secret_keys[7]); + + $this->replace_var($config, "table_prefix", $this->data["db"]["prefix"]); + + $config_path = $this->data["dir"] . '/wp-config.php'; + file_put_contents($config_path, $config); + @chmod($config_path, 0666); + + // for syntax check + include($config_path); + } + + function load_wp_core() { + require_once($this->data["dir"] . '/wp-load.php'); + require_once($this->data["dir"] . '/wp-admin/includes/upgrade.php'); + } + + function step_setup() { + + define( 'WP_INSTALLING', true ); + + $this->load_wp_core(); + + $result = wp_install( + $this->data["site_title"], + $this->data["user"]["name"], + $this->data["user"]["email"], + (int) $this->data["blog_public"], + "", + $this->data["user"]["pwd"] + ); + + if(!$result['password']) { + $this->error[] = $result['password_message']; + return; + } + + $this->data["url"] = $result['url']; + $this->data["step"] = "more"; + + } + + function delete_default_content() { + + delete_theme('twentysixteen'); + delete_theme('twentyfifteen'); + delete_theme('twentyfourteen'); + delete_theme('twentythirteen'); + delete_theme('twentytwelve'); + delete_theme('twentyeleven'); + delete_theme('twentyten'); + + delete_plugins(array('hello.php', 'akismet/akismet.php')); + } + + function set_permalink_struct($str) { + global $wp_rewrite; + + $wp_rewrite->set_permalink_structure($str); + save_mod_rewrite_rules(); + } + + function install_plugins($array) { + + require_once $this->data['dir'] . '/wp-admin/includes/class-wp-upgrader.php'; + global $WPQI_Installer_Skin; + $WPQI_Installer_Skin(); + + foreach ($array as $name) { + + if(!$name) continue; + + $is_url = preg_match("/^(http|https):\/\//i", $name); + + $url = $is_url ? $name : "https://downloads.wordpress.org/plugin/$name.zip"; + + $upgrader = new Plugin_Upgrader(new WPQI_Installer_Skin()); + $upgrader->install($url); + activate_plugin($upgrader->plugin_info()); + + } + + wp_clean_plugins_cache(); + } + + function install_theme($array) { + + require_once $this->data['dir'] . '/wp-admin/includes/class-wp-upgrader.php'; + global $WPQI_Installer_Skin; + $WPQI_Installer_Skin(); + + $first = true; + foreach ($array as $name) { + + if(!$name) continue; + + $is_url = preg_match("/^(http|https):\/\//i", $name); + + $url = $is_url ? $name : "https://downloads.wordpress.org/theme/$name.zip"; + + $upgrader = new Theme_Upgrader(new WPQI_Installer_Skin()); + $upgrader->install($url); + + if($first) { + switch_theme($name); + $first = false; + } + } + + wp_clean_themes_cache(); + } + + function step_more() { + + $this->load_wp_core(); + + if ($this->data['del_default']) $this->delete_default_content(); + + if ($this->data['permalink_structure']) $this->set_permalink_struct($this->data['permalink_structure']); + + if($this->data['install_plugin']) { + $this->install_plugins(explode("\n", $this->data['install_plugin'])); + } + + if($this->data['install_theme']) { + $this->install_theme(explode("\n", $this->data['install_theme'])); + } + + if($this->data['page_on_front']) { + update_option('show_on_front', 'page'); + update_option('page_on_front', 2); + } + + if($this->data['set_avatar']) update_option("avatar_default", "identicon"); + + //return; + + unlink($this->dir . "index.php"); + rename($this->dir . "index.php.orig", $this->dir . "index.php"); + + $this->data["step"] = get_home_url(); + } + + function page() { + + ?> + + + + + WP Quick Install + + + + + + + + + +

WordPress

+
+

data["dir"] . '">' . basename($this->data["dir"]) . "" . _(' directory.');?>

+

+
+ +
+

Below you should enter your database connection details. If you’re not sure about these, contact your host.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
The name of the database you want to run WP in.
Your MySQL username
…and your MySQL password.
You should be able to get this info from your web host, if localhost does not work.
If you want to run multiple WordPress installations in a single database, change this.
+

+
+ +
+

+ Select language
+ +

+

+
+ +
+

Downloading...

+
+ +
+

Unpacking...

+
+ +
+

Configuring...

+
+ +
+

Wordpress was installed, please configure it.

+ + + + + + + + + + + + + + + + + + + + + +
+ +

A password will be automatically generated for you if you leave this blank.

+
+ +
+

Double-check your email address before continuing.

Privacy?
+

+
+ +
+

We are ready, you can

+ +

You can do setup more

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Front page
Default avatar
Default content
+

+
+
+ +
+

try again

+
+ + + + + + + + -order allow,deny -deny from all - \ No newline at end of file diff --git a/wp-quick-install/assets/css/bootstrap.min.css b/wp-quick-install/assets/css/bootstrap.min.css deleted file mode 100755 index 409ec96..0000000 --- a/wp-quick-install/assets/css/bootstrap.min.css +++ /dev/null @@ -1,228 +0,0 @@ -/*! - * Bootstrap v3.2.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! - * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=a865faaaffd109121b5b) - * Config saved to config.json and https://gist.github.com/a865faaaffd109121b5b - */ - -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} -.alert h4 { - margin-top: 0; - color: inherit; -} -.alert .alert-link { - font-weight: bold; -} -.alert > p, -.alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} -.alert-dismissable, -.alert-dismissible { - padding-right: 35px; -} -.alert-dismissable .close, -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} -.alert-success { - background-color: #dff0d8; - border-color: #d6e9c6; - color: #3c763d; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} -.alert-info { - background-color: #d9edf7; - border-color: #bce8f1; - color: #31708f; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #245269; -} -.alert-warning { - background-color: #fcf8e3; - border-color: #faebcc; - color: #8a6d3b; -} -.alert-warning hr { - border-top-color: #f7e1b5; -} -.alert-warning .alert-link { - color: #66512c; -} -.alert-danger { - background-color: #f2dede; - border-color: #ebccd1; - color: #a94442; -} -.alert-danger hr { - border-top-color: #e4b9c0; -} -.alert-danger .alert-link { - color: #843534; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - overflow: hidden; - height: 20px; - margin-bottom: 20px; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} -.progress-bar { - float: left; - width: 0%; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #ffffff; - text-align: center; - background-color: #428bca; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} -.progress-striped .progress-bar, -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 40px 40px; -} -.progress.active .progress-bar, -.progress-bar.active { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-bar[aria-valuenow="1"], -.progress-bar[aria-valuenow="2"] { - min-width: 30px; -} -.progress-bar[aria-valuenow="0"] { - color: #777777; - min-width: 30px; - background-color: transparent; - background-image: none; - box-shadow: none; -} -.progress-bar-success { - background-color: #5cb85c; -} -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.clearfix:before, -.clearfix:after { - content: " "; - display: table; -} -.clearfix:after { - clear: both; -} -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; - visibility: hidden !important; -} -.affix { - position: fixed; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); -} - - .btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top, #fff 0, #e0e0e0 100%);background-image:-o-linear-gradient(top, #fff 0, #e0e0e0 100%);background-image:linear-gradient(to bottom, #fff 0, #e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top, #428bca 0, #2d6ca2 100%);background-image:-o-linear-gradient(top, #428bca 0, #2d6ca2 100%);background-image:linear-gradient(to bottom, #428bca 0, #2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-primary:disabled,.btn-primary[disabled]{background-color:#2d6ca2;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top, #5cb85c 0, #419641 100%);background-image:-o-linear-gradient(top, #5cb85c 0, #419641 100%);background-image:linear-gradient(to bottom, #5cb85c 0, #419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top, #5bc0de 0, #2aabd2 100%);background-image:-o-linear-gradient(top, #5bc0de 0, #2aabd2 100%);background-image:linear-gradient(to bottom, #5bc0de 0, #2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top, #f0ad4e 0, #eb9316 100%);background-image:-o-linear-gradient(top, #f0ad4e 0, #eb9316 100%);background-image:linear-gradient(to bottom, #f0ad4e 0, #eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top, #d9534f 0, #c12e2a 100%);background-image:-o-linear-gradient(top, #d9534f 0, #c12e2a 100%);background-image:linear-gradient(to bottom, #d9534f 0, #c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-o-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top, #428bca 0, #357ebd 100%);background-image:-o-linear-gradient(top, #428bca 0, #357ebd 100%);background-image:linear-gradient(to bottom, #428bca 0, #357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top, #fff 0, #f8f8f8 100%);background-image:-o-linear-gradient(top, #fff 0, #f8f8f8 100%);background-image:linear-gradient(to bottom, #fff 0, #f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top, #ebebeb 0, #f3f3f3 100%);background-image:-o-linear-gradient(top, #ebebeb 0, #f3f3f3 100%);background-image:linear-gradient(to bottom, #ebebeb 0, #f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.075);box-shadow:inset 0 3px 9px rgba(0,0,0,0.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,0.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top, #3c3c3c 0, #222 100%);background-image:-o-linear-gradient(top, #3c3c3c 0, #222 100%);background-image:linear-gradient(to bottom, #3c3c3c 0, #222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top, #222 0, #282828 100%);background-image:-o-linear-gradient(top, #222 0, #282828 100%);background-image:linear-gradient(to bottom, #222 0, #282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.25);box-shadow:inset 0 3px 9px rgba(0,0,0,0.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05)}.alert-success{background-image:-webkit-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);background-image:-o-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);background-image:linear-gradient(to bottom, #dff0d8 0, #c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top, #d9edf7 0, #b9def0 100%);background-image:-o-linear-gradient(top, #d9edf7 0, #b9def0 100%);background-image:linear-gradient(to bottom, #d9edf7 0, #b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top, #fcf8e3 0, #f8efc0 100%);background-image:-o-linear-gradient(top, #fcf8e3 0, #f8efc0 100%);background-image:linear-gradient(to bottom, #fcf8e3 0, #f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top, #f2dede 0, #e7c3c3 100%);background-image:-o-linear-gradient(top, #f2dede 0, #e7c3c3 100%);background-image:linear-gradient(to bottom, #f2dede 0, #e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top, #ebebeb 0, #f5f5f5 100%);background-image:-o-linear-gradient(top, #ebebeb 0, #f5f5f5 100%);background-image:linear-gradient(to bottom, #ebebeb 0, #f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top, #428bca 0, #3071a9 100%);background-image:-o-linear-gradient(top, #428bca 0, #3071a9 100%);background-image:linear-gradient(to bottom, #428bca 0, #3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top, #5cb85c 0, #449d44 100%);background-image:-o-linear-gradient(top, #5cb85c 0, #449d44 100%);background-image:linear-gradient(to bottom, #5cb85c 0, #449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top, #5bc0de 0, #31b0d5 100%);background-image:-o-linear-gradient(top, #5bc0de 0, #31b0d5 100%);background-image:linear-gradient(to bottom, #5bc0de 0, #31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top, #f0ad4e 0, #ec971f 100%);background-image:-o-linear-gradient(top, #f0ad4e 0, #ec971f 100%);background-image:linear-gradient(to bottom, #f0ad4e 0, #ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top, #d9534f 0, #c9302c 100%);background-image:-o-linear-gradient(top, #d9534f 0, #c9302c 100%);background-image:linear-gradient(to bottom, #d9534f 0, #c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top, #428bca 0, #3278b3 100%);background-image:-o-linear-gradient(top, #428bca 0, #3278b3 100%);background-image:linear-gradient(to bottom, #428bca 0, #3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-o-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top, #428bca 0, #357ebd 100%);background-image:-o-linear-gradient(top, #428bca 0, #357ebd 100%);background-image:linear-gradient(to bottom, #428bca 0, #357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top, #dff0d8 0, #d0e9c6 100%);background-image:-o-linear-gradient(top, #dff0d8 0, #d0e9c6 100%);background-image:linear-gradient(to bottom, #dff0d8 0, #d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top, #d9edf7 0, #c4e3f3 100%);background-image:-o-linear-gradient(top, #d9edf7 0, #c4e3f3 100%);background-image:linear-gradient(to bottom, #d9edf7 0, #c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top, #fcf8e3 0, #faf2cc 100%);background-image:-o-linear-gradient(top, #fcf8e3 0, #faf2cc 100%);background-image:linear-gradient(to bottom, #fcf8e3 0, #faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top, #f2dede 0, #ebcccc 100%);background-image:-o-linear-gradient(top, #f2dede 0, #ebcccc 100%);background-image:linear-gradient(to bottom, #f2dede 0, #ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top, #e8e8e8 0, #f5f5f5 100%);background-image:-o-linear-gradient(top, #e8e8e8 0, #f5f5f5 100%);background-image:linear-gradient(to bottom, #e8e8e8 0, #f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1)} \ No newline at end of file diff --git a/wp-quick-install/assets/css/buttons.min.css b/wp-quick-install/assets/css/buttons.min.css deleted file mode 100644 index 514460a..0000000 --- a/wp-quick-install/assets/css/buttons.min.css +++ /dev/null @@ -1 +0,0 @@ -.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#222}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:focus,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-disabled,.wp-core-ui .button-secondary.disabled,.wp-core-ui .button-secondary:disabled,.wp-core-ui .button-secondary[disabled],.wp-core-ui .button.disabled,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.wp-core-ui .button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.wp-core-ui .button-group{position:relative;display:inline-block;white-space:nowrap;font-size:0;vertical-align:middle}.wp-core-ui .button-group>.button{display:inline-block;-webkit-border-radius:0;border-radius:0;margin-right:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.wp-core-ui .button-group>.button:last-child{-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}@media screen and (max-width:782px){.wp-core-ui .button,.wp-core-ui .button.button-large,.wp-core-ui .button.button-small,a.preview,input#publish,input#save-post{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#media-upload.wp-core-ui .button{padding:0 10px 1px;height:24px;line-height:22px;font-size:13px}.wp-core-ui .save-post-status.button{position:relative;margin:0 14px 0 10px}.press-this a.preview,.press-this input#publish,.press-this input#save-post,.press-this.wp-core-ui .button,.wp-core-ui.wp-customizer .button{padding:0 10px 1px;font-size:13px;line-height:26px;height:28px;margin:0;vertical-align:inherit}.interim-login .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}} \ No newline at end of file diff --git a/wp-quick-install/assets/css/style.min.css b/wp-quick-install/assets/css/style.min.css deleted file mode 100644 index 1a712e8..0000000 --- a/wp-quick-install/assets/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:80px 80px;background-size:80px 80px;background-position:center top;background-repeat:no-repeat;color:#999;height:80px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:80px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}} \ No newline at end of file diff --git a/wp-quick-install/assets/images/wordpress-logo.svg b/wp-quick-install/assets/images/wordpress-logo.svg deleted file mode 100644 index da5e5df..0000000 --- a/wp-quick-install/assets/images/wordpress-logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wp-quick-install/assets/js/jquery-1.8.3.min.js b/wp-quick-install/assets/js/jquery-1.8.3.min.js deleted file mode 100644 index 83589da..0000000 --- a/wp-quick-install/assets/js/jquery-1.8.3.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */ -(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/wp-quick-install/assets/js/script.js b/wp-quick-install/assets/js/script.js deleted file mode 100644 index c29e7d3..0000000 --- a/wp-quick-install/assets/js/script.js +++ /dev/null @@ -1,350 +0,0 @@ -$(document).ready(function() { - - // Debug mode - var $debug = $('#debug'), - $debug_options = $('#debug_options'), - $debug_display = $debug_options.find('#debug_display'); - $debug_log = $debug_options.find('#debug_log'); - - $debug.change(function() { - if ( $debug.is(':checked') ) { - $debug.parent().hide().siblings('p').hide(); - $debug_options.slideDown(); - $debug_display.attr('checked', true); - $debug_log.attr('checked', true); - } - }); - - $('#debug_display, #debug_log').change(function(){ - if ( ! $debug_display.is(':checked') && ! $debug_log.is(':checked') ) { - $debug_options.slideUp().siblings().slideDown(); - $debug.removeAttr('checked'); - } - }); - - /*--------------------------*/ - /* Install folder - /*--------------------------*/ - - if ( typeof data.directory !='undefined' ) { - $('#directory').val(data.directory); - } - - /*--------------------------*/ - /* Blog Title - /*--------------------------*/ - - if ( typeof data.title !='undefined' ) { - $('#weblog_title').val(data.title); - } - - /*--------------------------*/ - /* Language - /*--------------------------*/ - - if ( typeof data.language !='undefined' ) { - $('#language').val(data.language); - } - - /*--------------------------*/ - /* Database - /*--------------------------*/ - - if ( typeof data.db !='undefined' ) { - - if ( typeof data.db.dbname !='undefined' ) { - $('#dbname').val(data.db.dbname); - } - - if ( typeof data.db.dbhost !='undefined' ) { - $('#dbhost').val(data.db.dbhost); - } - - if ( typeof data.db.prefix !='undefined' ) { - $('#prefix').val(data.db.prefix); - } - - if ( typeof data.db.uname !='undefined' ) { - $('#uname').val(data.db.uname); - } - - if ( typeof data.db.pwd !='undefined' ) { - $('#pwd').val(data.db.pwd); - } - - if ( typeof data.db.default_content !='undefined' ) { - ( parseInt(data.db.default_content) == 1 ) ? $('#default_content').attr('checked', 'checked') : $('#default_content').removeAttr('checked'); - } - } - - /*--------------------------*/ - /* Admin user - /*--------------------------*/ - - if ( typeof data.admin !='undefined' ) { - - if ( typeof data.admin.user_login !='undefined' ) { - $('#user_login').val(data.admin.user_login); - } - - if ( typeof data.admin.password !='undefined' ) { - $('#admin_password').val(data.admin.password); - } - - if ( typeof data.admin.email !='undefined' ) { - $('#admin_email').val(data.admin.email); - } - - } - - /*--------------------------*/ - /* Enable SEO - /*--------------------------*/ - - if ( typeof data.seo !='undefined' ) { - ( parseInt(data.seo) == 1 ) ? $('#blog_public').attr('checked', 'checked') : $('#blog_public').removeAttr('checked'); - } - - /*--------------------------*/ - /* Themes - /*--------------------------*/ - - if ( typeof data.activate_theme !='undefined' ) { - ( parseInt(data.activate_theme) == 1 ) ? $('#activate_theme').attr('checked', 'checked') : $('#activate_theme').removeAttr('checked'); - } - - if ( typeof data.delete_default_themes !='undefined' ) { - ( parseInt(data.delete_default_themes) == 1 ) ? $('#delete_default_themes').attr('checked', 'checked') : $('#delete_default_themes').removeAttr('checked'); - } - - /*--------------------------*/ - /* Plugins - /*--------------------------*/ - - if ( typeof data.plugins !='undefined' ) { - $('#plugins').val( data.plugins.join(';') ); - } - - if ( typeof data.plugins_premium !='undefined' ) { - ( parseInt(data.plugins_premium) == 1 ) ? $('#plugins_premium').attr('checked', 'checked') : $('#plugins_premium').removeAttr('checked'); - } - - if ( typeof data.activate_plugins !='undefined' ) { - ( parseInt(data.activate_plugins) == 1 ) ? $('#activate_plugins').attr('checked', 'checked') : $('#activate_plugins').removeAttr('checked'); - } - - /*--------------------------*/ - /* Permalinks - /*--------------------------*/ - - if ( typeof data.permalink_structure !='undefined' ) { - $('#permalink_structure').val(data.permalink_structure); - } - - /*--------------------------*/ - /* Medias - /*--------------------------*/ - - if ( typeof data.uploads !='undefined' ) { - - if ( typeof data.uploads.thumbnail_size_w !='undefined' ) { - $('#thumbnail_size_w').val(parseInt(data.uploads.thumbnail_size_w)); - } - - if ( typeof data.uploads.thumbnail_size_h !='undefined' ) { - $('#thumbnail_size_h').val(parseInt(data.uploads.thumbnail_size_h)); - } - - if ( typeof data.uploads.thumbnail_crop !='undefined' ) { - ( parseInt(data.uploads.thumbnail_crop) == 1 ) ? $('#thumbnail_crop').attr('checked', 'checked') : $('#thumbnail_crop').removeAttr('checked'); - } - - if ( typeof data.uploads.medium_size_w !='undefined' ) { - $('#medium_size_w').val(parseInt(data.uploads.medium_size_w)); - } - - if ( typeof data.uploads.medium_size_h !='undefined' ) { - $('#medium_size_h').val(parseInt(data.uploads.medium_size_h)); - } - - if ( typeof data.uploads.large_size_w !='undefined' ) { - $('#large_size_w').val(parseInt(data.uploads.large_size_w)); - } - - if ( typeof data.uploads.large_size_h !='undefined' ) { - $('#large_size_h').val(parseInt(data.uploads.large_size_h)); - } - - if ( typeof data.uploads.upload_dir !='undefined' ) { - $('#upload_dir').val(data.uploads.upload_dir); - } - - if ( typeof data.uploads.uploads_use_yearmonth_folders !='undefined' ) { - ( parseInt(data.uploads.uploads_use_yearmonth_folders) == 1 ) ? $('#uploads_use_yearmonth_folders').attr('checked', 'checked') : $('#uploads_use_yearmonth_folders').removeAttr('checked'); - } - - } - - /*--------------------------*/ - /* wp-config.php constants - /*--------------------------*/ - - if ( typeof data.wp_config !='undefined' ) { - - if ( typeof data.wp_config.autosave_interval !='undefined' ) { - $('#autosave_interval').val(data.wp_config.autosave_interval); - } - - if ( typeof data.wp_config.post_revisions !='undefined' ) { - $('#post_revisions').val(data.wp_config.post_revisions); - } - - if ( typeof data.wp_config.disallow_file_edit !='undefined' ) { - ( parseInt(data.wp_config.disallow_file_edit) == 1 ) ? $('#disallow_file_edit').attr('checked', 'checked') : $('#disallow_file_edit').removeAttr('checked'); - } - - if ( typeof data.wp_config.debug !='undefined' ) { - if ( parseInt(data.wp_config.debug) == 1 ) { - $debug.attr('checked', 'checked'); - $debug.parent().hide().siblings('p').hide(); - $debug_options.slideDown(); - $debug_display.attr('checked', true); - $debug_log.attr('checked', true); - } else { - $('#debug').removeAttr('checked'); - } - } - - if ( typeof data.wp_config.wpcom_api_key !='undefined' ) { - $('#wpcom_api_key').val(data.wp_config.wpcom_api_key); - } - - } - - var $response = $('#response'); - - $('#submit').click( function() { - - errors = false; - - // We hide errors div - $('#errors').hide().html('Warning !'); - - $('input.required').each(function(){ - if ( $.trim($(this).val()) == '' ) { - errors = true; - $(this).addClass('error'); - $(this).css("border", "1px solid #FF0000"); - } else { - $(this).removeClass('error'); - $(this).css("border", "1px solid #DFDFDF"); - } - }); - - if ( ! errors ) { - - /*--------------------------*/ - /* We verify the database connexion and if WP already exists - /* If there is no errors we install - /*--------------------------*/ - - $.post(window.location.href + '?action=check_before_upload', $('form').serialize(), function(data) { - - errors = false; - data = $.parseJSON(data); - - if ( data.db == "error etablishing connection" ) { - errors = true; - $('#errors').show().append('

• Error Establishing a Database Connection.

'); - } - - if ( data.wp == "error directory" ) { - errors = true; - $('#errors').show().append('

• WordPress seems to be Already Installed.

'); - } - - if ( ! errors ) { - $('form').fadeOut( 'fast', function() { - - $('.progress').show(); - - // Fire Step - // We dowload WordPress - $response.html("

WordPress Download in Progress ...

"); - - $.post(window.location.href + '?action=download_wp', $('form').serialize(), function() { - unzip_wp(); - }); - }); - } else { - // If there is an error - $('html,body').animate( { scrollTop: $( 'html,body' ).offset().top } , 'slow' ); - } - }); - - } else { - // If there is an error - $('html,body').animate( { scrollTop: $( 'input.error:first' ).offset().top-20 } , 'slow' ); - } - return false; - }); - - // Let's unzip WordPress - function unzip_wp() { - $response.html("

Decompressing Files...

" ); - $('.progress-bar').animate({width: "16.5%"}); - $.post(window.location.href + '?action=unzip_wp', $('form').serialize(), function(data) { - wp_config(); - }); - } - - // Let's create the wp-config.php file - function wp_config() { - $response.html("

File Creation for wp-config...

"); - $('.progress-bar').animate({width: "33%"}); - $.post(window.location.href + '?action=wp_config', $('form').serialize(), function(data) { - install_wp(); - }); - } - - // CDatabase - function install_wp() { - $response.html("

Database Installation in Progress...

"); - $('.progress-bar').animate({width: "49.5%"}); - $.post(window.location.href + '/wp-admin/install.php?action=install_wp', $('form').serialize(), function(data) { - install_theme(); - }); - } - - // Theme - function install_theme() { - $response.html("

Theme Installation in Progress...

"); - $('.progress-bar').animate({width: "66%"}); - $.post(window.location.href + '/wp-admin/install.php?action=install_theme', $('form').serialize(), function(data) { - install_plugins(); - }); - } - - // Plugin - function install_plugins() { - $response.html("

Plugins Installation in Progress...

"); - $('.progress-bar').animate({width: "82.5%"}); - $.post(window.location.href + '?action=install_plugins', $('form').serialize(), function(data) { - $response.html(data); - success(); - }); - } - - // Remove the archive - function success() { - $response.html("

Successful installation completed

"); - $('.progress-bar').animate({width: "100%"}); - $response.hide(); - $('.progress').delay(500).hide(); - $.post(window.location.href + '?action=success',$('form').serialize(), function(data) { - $('#success').show().append(data); - }); - $.get( 'http://wp-quick-install.com/inc/incr-counter.php' ); - } - -}); \ No newline at end of file diff --git a/wp-quick-install/data.ini b/wp-quick-install/data.ini deleted file mode 100644 index 7b5f8c8..0000000 --- a/wp-quick-install/data.ini +++ /dev/null @@ -1,134 +0,0 @@ -;;;; -; Enter below the installation folder (uncomment to use): -;;;; - -;directory = demo - - -;;;; -; Entrez below the code language (uncomment to use): -;;;; - -;language = en_US - - -;;;; -; Entrez below the Site Title (uncomment to use): -;;;; - -;title = "New Projet" - - -;;;; -; Enter below your database connection detail (uncomment to use): -;;;; - -;db['dbname'] = demo -;db['dbhost'] = localhost -;db['prefix'] = wp_ -;db['uname'] = root -;db['pwd'] = root -;db['default_content'] = 1 - - -;;;; -; Enter below the admin username and password (uncomment to use): -;;;; - -;admin['user_login'] = admin -;admin['password'] = demo -;admin['email'] = demo@example.com - - -;;;; -; Enable SEO ? (uncomment to use) : -; 1 = Yes, 0 = No -;;;; - -;seo = 0 - - -;;;; -; Activate Theme after WordPress installation? (uncomment to use): -; 1 = Yes, 0 = No -;;;; - -;activate_theme = 1 - - -;;;; -; Delete Twenty Themes ? (uncomment to use) : -; 1 = Yes, 0 = No -;;;; - -;delete_default_themes = 1 - - -;;;; -; List all plugin you want to install below (uncomment to use): -;;;; - -;plugins[] = wordpress-seo - - - -;;;; -; Install extensions which are on the "wp-quick-install" "plugins" folder (uncomment to use): -; 1 = Yes, 0 = No -;;;; - -;plugins_premium = 0 - - -;;;; -; Activate plugins after WordPress Installation (uncomment to use): -; 1 = Yes, 0 = No -;;;; - -;activate_plugins = 0 - - -;;;; -; Permalink Structure (uncomment to use): -;;;; - -;permalink_structure = %postname% - -;;;; -; Medias (uncomment to use): -;;;; - -;uploads['upload_dir'] = 'images'; -;uploads['thumbnail_size_w'] = 0; -;uploads['thumbnail_size_h'] = 0; -;uploads['thumbnail_crop'] = 1; -;uploads['medium_size_w'] = 0; -;uploads['medium_size_h'] = 0; -;uploads['large_size_w'] = 0; -;uploads['large_size_h'] = 0; -;uploads['uploads_use_yearmonth_folders'] = 1; - -;;;; -; Constant to add to wp-config.php (uncomment to use) : -; 1 = Yes, 0 = No -;;;; - -;wp_config['post_revisions'] = 0 -;wp_config['disallow_file_edit'] = 1 -;wp_config['autosave_interval'] = 7200 -;wp_config['debug'] = 1 -;wp_config['wpcom_api_key'] = - - -;;;; -; Post to automatically add after WordPress installation (uncomment to use): -; title = Title -; status = Status (publish, draft, etc...). Default : draft -; type = Post Type. Default : post -; content = Content (HTML allowed) -; slug = Slug -; parent = Parent page Title -;;;; - -;posts[0] = title::Legal - status::publish - content::Lorem ipsum dolor sit amet - type::page -;posts[1] = title::Contact - status::publish - content::Lorem ipsum dolor sit amet - type::page - parent::Legal \ No newline at end of file diff --git a/wp-quick-install/inc/functions.php b/wp-quick-install/inc/functions.php deleted file mode 100644 index 9a198d2..0000000 --- a/wp-quick-install/inc/functions.php +++ /dev/null @@ -1,11 +0,0 @@ -offers[0]; - - /*--------------------------*/ - /* We download the latest version of WordPress - /*--------------------------*/ - - if ( ! file_exists( WPQI_CACHE_CORE_PATH . 'wordpress-' . $wp->version . '-' . $language . '.zip' ) ) { - file_put_contents( WPQI_CACHE_CORE_PATH . 'wordpress-' . $wp->version . '-' . $language . '.zip', file_get_contents( $wp->download ) ); - } - - break; - - case "unzip_wp" : - - // Get WordPress language - $language = substr( $_POST['language'], 0, 6 ); - - // Get WordPress data - $wp = json_decode( file_get_contents( WP_API_CORE . $language ) )->offers[0]; - - /*--------------------------*/ - /* We create the website folder with the files and the WordPress folder - /*--------------------------*/ - - // If we want to put WordPress in a subfolder we create it - if ( ! empty( $directory ) ) { - // Let's create the folder - mkdir( $directory ); - - // We set the good writing rights - chmod( $directory , 0755 ); - } - - $zip = new ZipArchive; - - // We verify if we can use the archive - if ( $zip->open( WPQI_CACHE_CORE_PATH . 'wordpress-' . $wp->version . '-' . $language . '.zip' ) === true ) { - - // Let's unzip - $zip->extractTo( '.' ); - $zip->close(); - - // We scan the folder - $files = scandir( 'wordpress' ); - - // We remove the "." and ".." from the current folder and its parent - $files = array_diff( $files, array( '.', '..' ) ); - - // We move the files and folders - foreach ( $files as $file ) { - rename( 'wordpress/' . $file, $directory . '/' . $file ); - } - - rmdir( 'wordpress' ); // We remove WordPress folder - unlink( $directory . '/license.txt' ); // We remove licence.txt - unlink( $directory . '/readme.html' ); // We remove readme.html - unlink( $directory . '/wp-content/plugins/hello.php' ); // We remove Hello Dolly plugin - } - - break; - - case "wp_config" : - - /*--------------------------*/ - /* Let's create the wp-config file - /*--------------------------*/ - - // We retrieve each line as an array - $config_file = file( $directory . 'wp-config-sample.php' ); - - // Managing the security keys - $secret_keys = explode( "\n", file_get_contents( 'https://api.wordpress.org/secret-key/1.1/salt/' ) ); - - foreach ( $secret_keys as $k => $v ) { - $secret_keys[$k] = substr( $v, 28, 64 ); - } - - // We change the data - $key = 0; - foreach ( $config_file as &$line ) { - - if ( '$table_prefix =' == substr( $line, 0, 16 ) ) { - $line = '$table_prefix = \'' . sanit( $_POST[ 'prefix' ] ) . "';\r\n"; - continue; - } - - if ( ! preg_match( '/^define\(\'([A-Z_]+)\',([ ]+)/', $line, $match ) ) { - continue; - } - - $constant = $match[1]; - - switch ( $constant ) { - case 'WP_DEBUG' : - - // Debug mod - if ( (int) $_POST['debug'] == 1 ) { - $line = "define('WP_DEBUG', 'true');\r\n"; - - // Display error - if ( (int) $_POST['debug_display'] == 1 ) { - $line .= "\r\n\n " . "/** Affichage des erreurs à l'écran */" . "\r\n"; - $line .= "define('WP_DEBUG_DISPLAY', 'true');\r\n"; - } - - // To write error in a log files - if ( (int) $_POST['debug_log'] == 1 ) { - $line .= "\r\n\n " . "/** Ecriture des erreurs dans un fichier log */" . "\r\n"; - $line .= "define('WP_DEBUG_LOG', 'true');\r\n"; - } - } - - // We add the extras constant - if ( ! empty( $_POST['uploads'] ) ) { - $line .= "\r\n\n " . "/** Dossier de destination des fichiers uploadés */" . "\r\n"; - $line .= "define('UPLOADS', '" . sanit( $_POST['uploads'] ) . "');"; - } - - if ( (int) $_POST['post_revisions'] >= 0 ) { - $line .= "\r\n\n " . "/** Désactivation des révisions d'articles */" . "\r\n"; - $line .= "define('WP_POST_REVISIONS', " . (int) $_POST['post_revisions'] . ");"; - } - - if ( (int) $_POST['disallow_file_edit'] == 1 ) { - $line .= "\r\n\n " . "/** Désactivation de l'éditeur de thème et d'extension */" . "\r\n"; - $line .= "define('DISALLOW_FILE_EDIT', true);"; - } - - if ( (int) $_POST['autosave_interval'] >= 60 ) { - $line .= "\r\n\n " . "/** Intervalle des sauvegardes automatique */" . "\r\n"; - $line .= "define('AUTOSAVE_INTERVAL', " . (int) $_POST['autosave_interval'] . ");"; - } - - if ( ! empty( $_POST['wpcom_api_key'] ) ) { - $line .= "\r\n\n " . "/** WordPress.com API Key */" . "\r\n"; - $line .= "define('WPCOM_API_KEY', '" . $_POST['wpcom_api_key'] . "');"; - } - - $line .= "\r\n\n " . "/** On augmente la mémoire limite */" . "\r\n"; - $line .= "define('WP_MEMORY_LIMIT', '96M');" . "\r\n"; - - break; - case 'DB_NAME' : - $line = "define('DB_NAME', '" . sanit( $_POST[ 'dbname' ] ) . "');\r\n"; - break; - case 'DB_USER' : - $line = "define('DB_USER', '" . sanit( $_POST['uname'] ) . "');\r\n"; - break; - case 'DB_PASSWORD' : - $line = "define('DB_PASSWORD', '" . sanit( $_POST['pwd'] ) . "');\r\n"; - break; - case 'DB_HOST' : - $line = "define('DB_HOST', '" . sanit( $_POST['dbhost'] ) . "');\r\n"; - break; - case 'AUTH_KEY' : - case 'SECURE_AUTH_KEY' : - case 'LOGGED_IN_KEY' : - case 'NONCE_KEY' : - case 'AUTH_SALT' : - case 'SECURE_AUTH_SALT' : - case 'LOGGED_IN_SALT' : - case 'NONCE_SALT' : - $line = "define('" . $constant . "', '" . $secret_keys[$key++] . "');\r\n"; - break; - - case 'WPLANG' : - $line = "define('WPLANG', '" . sanit( $_POST['language'] ) . "');\r\n"; - break; - } - } - unset( $line ); - - $handle = fopen( $directory . 'wp-config.php', 'w' ); - foreach ( $config_file as $line ) { - fwrite( $handle, $line ); - } - fclose( $handle ); - - // We set the good rights to the wp-config file - chmod( $directory . 'wp-config.php', 0666 ); - - break; - - case "install_wp" : - - /*--------------------------*/ - /* Let's install WordPress database - /*--------------------------*/ - - define( 'WP_INSTALLING', true ); - - /** Load WordPress Bootstrap */ - require_once( $directory . 'wp-load.php' ); - - /** Load WordPress Administration Upgrade API */ - require_once( $directory . 'wp-admin/includes/upgrade.php' ); - - /** Load wpdb */ - require_once( $directory . 'wp-includes/wp-db.php' ); - - // WordPress installation - wp_install( $_POST[ 'weblog_title' ], $_POST['user_login'], $_POST['admin_email'], (int) $_POST[ 'blog_public' ], '', $_POST['admin_password'] ); - - // We update the options with the right siteurl et homeurl value - $protocol = ! is_ssl() ? 'http' : 'https'; - $get = basename( dirname( __FILE__ ) ) . '/index.php/wp-admin/install.php?action=install_wp'; - $dir = str_replace( '../', '', $directory ); - $link = $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; - $url = str_replace( $get, $dir, $link ); - $url = trim( $url, '/' ); - - update_option( 'siteurl', $url ); - update_option( 'home', $url ); - - /*--------------------------*/ - /* We remove the default content - /*--------------------------*/ - - if ( $_POST['default_content'] == '1' ) { - wp_delete_post( 1, true ); // We remove the article "Hello World" - wp_delete_post( 2, true ); // We remove the "Exemple page" - } - - /*--------------------------*/ - /* We update permalinks - /*--------------------------*/ - if ( ! empty( $_POST['permalink_structure'] ) ) { - update_option( 'permalink_structure', $_POST['permalink_structure'] ); - } - - /*--------------------------*/ - /* We update the media settings - /*--------------------------*/ - - if ( ! empty( $_POST['thumbnail_size_w'] ) || !empty($_POST['thumbnail_size_h'] ) ) { - update_option( 'thumbnail_size_w', (int) $_POST['thumbnail_size_w'] ); - update_option( 'thumbnail_size_h', (int) $_POST['thumbnail_size_h'] ); - update_option( 'thumbnail_crop', (int) $_POST['thumbnail_crop'] ); - } - - if ( ! empty( $_POST['medium_size_w'] ) || !empty( $_POST['medium_size_h'] ) ) { - update_option( 'medium_size_w', (int) $_POST['medium_size_w'] ); - update_option( 'medium_size_h', (int) $_POST['medium_size_h'] ); - } - - if ( ! empty( $_POST['large_size_w'] ) || !empty( $_POST['large_size_h'] ) ) { - update_option( 'large_size_w', (int) $_POST['large_size_w'] ); - update_option( 'large_size_h', (int) $_POST['large_size_h'] ); - } - - update_option( 'uploads_use_yearmonth_folders', (int) $_POST['uploads_use_yearmonth_folders'] ); - - /*--------------------------*/ - /* We add the pages we found in the data.ini file - /*--------------------------*/ - - // We check if data.ini exists - if ( file_exists( 'data.ini' ) ) { - - // We parse the file and get the array - $file = parse_ini_file( 'data.ini' ); - - // We verify if we have at least one page - if ( count( $file['posts'] ) >= 1 ) { - - foreach ( $file['posts'] as $post ) { - - // We get the line of the page configuration - $pre_config_post = explode( "-", $post ); - $post = array(); - - foreach ( $pre_config_post as $config_post ) { - - // We retrieve the page title - if ( preg_match( '#title::#', $config_post ) == 1 ) { - $post['title'] = str_replace( 'title::', '', $config_post ); - } - - // We retrieve the status (publish, draft, etc...) - if ( preg_match( '#status::#', $config_post ) == 1 ) { - $post['status'] = str_replace( 'status::', '', $config_post ); - } - - // On retrieve the post type (post, page or custom post types ...) - if ( preg_match( '#type::#', $config_post ) == 1 ) { - $post['type'] = str_replace( 'type::', '', $config_post ); - } - - // We retrieve the content - if ( preg_match( '#content::#', $config_post ) == 1 ) { - $post['content'] = str_replace( 'content::', '', $config_post ); - } - - // We retrieve the slug - if ( preg_match( '#slug::#', $config_post ) == 1 ) { - $post['slug'] = str_replace( 'slug::', '', $config_post ); - } - - // We retrieve the title of the parent - if ( preg_match( '#parent::#', $config_post ) == 1 ) { - $post['parent'] = str_replace( 'parent::', '', $config_post ); - } - - } // foreach - - if ( isset( $post['title'] ) && !empty( $post['title'] ) ) { - - $parent = get_page_by_title( trim( $post['parent'] ) ); - $parent = $parent ? $parent->ID : 0; - - // Let's create the page - $args = array( - 'post_title' => trim( $post['title'] ), - 'post_name' => $post['slug'], - 'post_content' => trim( $post['content'] ), - 'post_status' => $post['status'], - 'post_type' => $post['type'], - 'post_parent' => $parent, - 'post_author' => 1, - 'post_date' => date('Y-m-d H:i:s'), - 'post_date_gmt' => gmdate('Y-m-d H:i:s'), - 'comment_status' => 'closed', - 'ping_status' => 'closed' - ); - wp_insert_post( $args ); - - } - - } - } - } - - break; - - case "install_theme" : - - /** Load WordPress Bootstrap */ - require_once( $directory . 'wp-load.php' ); - - /** Load WordPress Administration Upgrade API */ - require_once( $directory . 'wp-admin/includes/upgrade.php' ); - - /*--------------------------*/ - /* We install the new theme - /*--------------------------*/ - - // We verify if theme.zip exists - if ( file_exists( 'theme.zip' ) ) { - - $zip = new ZipArchive; - - // We verify we can use it - if ( $zip->open( 'theme.zip' ) === true ) { - - // We retrieve the name of the folder - $stat = $zip->statIndex( 0 ); - $theme_name = str_replace('/', '' , $stat['name']); - - // We unzip the archive in the themes folder - $zip->extractTo( $directory . 'wp-content/themes/' ); - $zip->close(); - - // Let's activate the theme - // Note : The theme is automatically activated if the user asked to remove the default theme - if ( $_POST['activate_theme'] == 1 || $_POST['delete_default_themes'] == 1 ) { - switch_theme( $theme_name, $theme_name ); - } - - // Let's remove the Tweenty family - if ( $_POST['delete_default_themes'] == 1 ) { - delete_theme( 'twentyfourteen' ); - delete_theme( 'twentythirteen' ); - delete_theme( 'twentytwelve' ); - delete_theme( 'twentyeleven' ); - delete_theme( 'twentyten' ); - } - - // We delete the _MACOSX folder (bug with a Mac) - delete_theme( '__MACOSX' ); - - } - } - - break; - - case "install_plugins" : - - /*--------------------------*/ - /* Let's retrieve the plugin folder - /*--------------------------*/ - - if ( ! empty( $_POST['plugins'] ) ) { - - $plugins = explode( ";", $_POST['plugins'] ); - $plugins = array_map( 'trim' , $plugins ); - $plugins_dir = $directory . 'wp-content/plugins/'; - - foreach ( $plugins as $plugin ) { - - // We retrieve the plugin XML file to get the link to downlad it - $plugin_repo = file_get_contents( "http://api.wordpress.org/plugins/info/1.0/$plugin.json" ); - - if ( $plugin_repo && $plugin = json_decode( $plugin_repo ) ) { - - $plugin_path = WPQI_CACHE_PLUGINS_PATH . $plugin->slug . '-' . $plugin->version . '.zip'; - - if ( ! file_exists( $plugin_path ) ) { - // We download the lastest version - if ( $download_link = file_get_contents( $plugin->download_link ) ) { - file_put_contents( $plugin_path, $download_link ); - } } - - // We unzip it - $zip = new ZipArchive; - if ( $zip->open( $plugin_path ) === true ) { - $zip->extractTo( $plugins_dir ); - $zip->close(); - } - } - } - } - - if ( $_POST['plugins_premium'] == 1 ) { - - // We scan the folder - $plugins = scandir( 'plugins' ); - - // We remove the "." and ".." corresponding to the current and parent folder - $plugins = array_diff( $plugins, array( '.', '..' ) ); - - // We move the archives and we unzip - foreach ( $plugins as $plugin ) { - - // We verify if we have to retrive somes plugins via the WP Quick Install "plugins" folder - if ( preg_match( '#(.*).zip$#', $plugin ) == 1 ) { - - $zip = new ZipArchive; - - // We verify we can use the archive - if ( $zip->open( 'plugins/' . $plugin ) === true ) { - - // We unzip the archive in the plugin folder - $zip->extractTo( $plugins_dir ); - $zip->close(); - - } - } - } - } - - /*--------------------------*/ - /* We activate extensions - /*--------------------------*/ - - if ( $_POST['activate_plugins'] == 1 ) { - - /** Load WordPress Bootstrap */ - require_once( $directory . 'wp-load.php' ); - - /** Load WordPress Plugin API */ - require_once( $directory . 'wp-admin/includes/plugin.php'); - - // Activation - activate_plugins( array_keys( get_plugins() ) ); - } - - break; - - case "success" : - - /*--------------------------*/ - /* If we have a success we add the link to the admin and the website - /*--------------------------*/ - - /** Load WordPress Bootstrap */ - require_once( $directory . 'wp-load.php' ); - - /** Load WordPress Administration Upgrade API */ - require_once( $directory . 'wp-admin/includes/upgrade.php' ); - - /*--------------------------*/ - /* We update permalinks - /*--------------------------*/ - if ( ! empty( $_POST['permalink_structure'] ) ) { - file_put_contents( $directory . '.htaccess' , null ); - flush_rewrite_rules(); - } - - echo '

' . _('Warning') . ': Don\'t forget to delete WP Quick Install folder.

'; - - // Link to the admin - echo ''. _('Log In') . ''; - echo '' . _('Go to website') . ''; - - break; - } -} -else { ?> - - - - - WP Quick Install - - - - - - - - - -

WordPress

- - -
- - -
- - - -

-

- -

-

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
localhost does not work.' ); ?>
- -
- -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -

-
- -
- -

-
- -

-
- -

.

-
-

- -

-

-
-

-
- - - - - - - - - -
- - - -
- -
- -

-

- - - - - - - - - - - - - -
- -

wordpress-seo)');?>

-
- -

-
- -

plugins folder at the wp-quick-install root folder.');?>

-
- -
- -

- -

number of tags are available.'), 'http://codex.wordpress.org/Using_Permalinks'); ?>

- - - - - - -
- - - http:// - -
- -

- -

- - - - - - - - - - - - - - - - - - -
- - - -
- -
- - - -
-
- - - -
-
- -

wp-content/uploads folder');?>

-
-
- -
- -

-

wp-config.php');?>

- - - - - - - - - - - - - - - - - - - - - - -
- -

-
- -
- -
- -

-
- - -
- -
-

- - - - - - - - -
- -

-
- - - - - Date: Mon, 13 Jul 2015 18:50:33 +0200 Subject: [PATCH 02/78] readme --- README.md | 127 +++--------------------------------------------------- 1 file changed, 6 insertions(+), 121 deletions(-) diff --git a/README.md b/README.md index d7bef60..5071751 100644 --- a/README.md +++ b/README.md @@ -1,128 +1,13 @@ -WP Quick Install 1.4.1 +WP Quick Install ================ -WP Quick Install is the easiest way to install WordPress. +The easiest way to install WordPress. -A lightweight script which automatically downloads and install WordPress, plugins and themes you want. +A lightweight script which automatically downloads and install WordPress, plugins and themes. -Simply download the .zip archive et go to *wp-quick-install/index.php* - -Changelog +Instructions ================ -1.4.1 ------------ -* Fix quote issue with WordPress.com API Key - -1.4 ------------ -* Fix database issue since WordPress 4.1 -* You can add your WordPress.com API Key - -1.3.3 ------------ - -* Add SSL compatibility -* Remove SSL function (cause trouble with process installation) - -1.3.2 ------------ - -* Add a script header -* Security improvement - -1.3.1 ------------ - -* Fix error for PHP > 5.5: Strict standards: Only variables should be passed by reference in ../wp-quick-install/index.php on line 10 - -1.3 ------------ - -* Possiblity to select WordPress language installation -* Permaling management - - -1.2.8.1 ------------ - -* You can now declare articles to be generated via data.ini file -* Fix bug on new articles -* You can now select the revision by articles - -1.2.8 ------------ - -* Media management - -1.2.7.2 ------------ - -* Security : Forbiden access to data.ini from the browser - -1.2.7.1 ------------ - -* noindex nofollow tag. - -1.2.7 ------------ - -* Premium extension by adding archives in plugins folder -* You can enable extension after installation -* Auto supression of Hello Dolly extension -* You can add a theme and enable it -* You can delete Twenty Elever and Twenty Ten - -1.2.6 ------------ - -* Fix a JS bug with data.ini - -1.2.5 ------------ - -* You can delete the default content added by WordPress -* You can add new pages with data.ini -* Data.ini update - -1.2.4 ------------ - -* Two new debug options : *Display errors* (WP_DEBUG_DISPLAY) and *Write errors in a log file* (WP_DEBUG_LOG) - -1.2.3 ------------ - -* SEO Fix bug -* Automatic deletion of licence.txt and readme.html - -1.2.2 ------------ - -* Deletion of all exec() fucntions -* Unzip WordPress and plugins with ZipArchive class -* Using scandir() and rename() to move WordPress files - -1.2.1 ------------ - -* Checking chmod on parent folder -* Adding a link to website and admin if success - -1.2 ------------ - -* You can now pre-configure the form with data.ini - - -1.1 ------------ - -* Code Optimisation - - -1.0 ------------ +1) Place index.php file in directory you want have WordPress installed (eg. /wp) -* Initial Commit +2) Visit the folder from browser (eg. yoursite.com/wp) From d8500292583eb30c0bd8fd49adb27e26df8530d8 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 19:09:27 +0200 Subject: [PATCH 03/78] inline css --- index.php | 71 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/index.php b/index.php index 641c18a..cd4b1a8 100755 --- a/index.php +++ b/index.php @@ -422,8 +422,15 @@ function page() { - - + + + @@ -583,6 +584,7 @@ function page() { +
@@ -603,6 +605,7 @@ function page() { this.$step.find(":input").prop("disabled", true); + $(".spinner").fadeOut(0).fadeIn(3000); $.post("", { "data": this.data }).always($.proxy(this.submitted, this)); return false; @@ -610,6 +613,8 @@ function page() { this.submitted = function(ajax, status) { + $(".spinner").hide(); + if(status == "error") ajax = $.parseJSON(ajax.responseText); this.$step.find(":input").prop("disabled", false); From 3176a43c2f02d8ab8dc11a41712d9c69958b3568 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 19:25:27 +0200 Subject: [PATCH 05/78] new step longer fade in --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 6b167d5..86e38d3 100755 --- a/index.php +++ b/index.php @@ -645,7 +645,7 @@ function page() { this.refreshProps(); // show current step - this.$step.fadeIn(.1); + this.$step.fadeIn(200); if(this.data["auto_submit"]) this.submit(); From f6614c4ec56f5f3ff46af2223880e9e265533be2 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 19:25:38 +0200 Subject: [PATCH 06/78] type --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 86e38d3..79281c2 100755 --- a/index.php +++ b/index.php @@ -454,7 +454,7 @@ function page() { - + From af79832a63e9b3e996106968b173ef3789192ff1 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 19:36:19 +0200 Subject: [PATCH 07/78] readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 5071751..3557e07 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,24 @@ The easiest way to install WordPress. A lightweight script which automatically downloads and install WordPress, plugins and themes. + Instructions ================ 1) Place index.php file in directory you want have WordPress installed (eg. /wp) 2) Visit the folder from browser (eg. yoursite.com/wp) + + +Features +================ + ++ Setup database ++ Select language ++ Create users ++ Set basic site settings ++ Delete default plugins and templates ++ Download, install and activate plugins and themes ++ Set permalinks ++ Set static front page ++ Set default avatar From 6d36828926d50862268209d4416f7dedddf239f7 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 19:49:22 +0200 Subject: [PATCH 08/78] release notes --- index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.php b/index.php index 79281c2..bc5dc8a 100755 --- a/index.php +++ b/index.php @@ -7,6 +7,12 @@ Licence: GPLv3 */ +/* +Release notes: +for future all the contents of this file should be loaded from WordPress api +And this file replaced with eval( file_get_contents(WP_API) ) +*/ + ob_start(); // PUT YOUR CONFIGURATION HERE ?> From 1846a228852de7489052c34845b3ed1608165b3a Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 19:49:38 +0200 Subject: [PATCH 09/78] not implemented msg --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index bc5dc8a..28a4a6e 100755 --- a/index.php +++ b/index.php @@ -18,7 +18,7 @@ // PUT YOUR CONFIGURATION HERE ?> { - + "not_implemented" : "yet", } Date: Mon, 13 Jul 2015 19:56:42 +0200 Subject: [PATCH 10/78] no API_CORE --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 28a4a6e..5719de3 100755 --- a/index.php +++ b/index.php @@ -29,7 +29,6 @@ class wp_quick_install { - const API_CORE = "http://api.wordpress.org/core/version-check/1.7/?locale="; const CACHE_PATH = "wp_quick_install_cache/"; var $data = array(); @@ -143,8 +142,9 @@ function step_db() { } function step_lang() { + $url = "http://api.wordpress.org/core/version-check/1.7/?locale=" . $this->data['lang']; - $langs = json_decode(file_get_contents(self::API_CORE . $this->data['lang']), true); + $langs = json_decode(file_get_contents($url), true); if(!$langs["offers"][0]) { From 5d7362e320a2d4809c4b6a70e2fd234c768cb239 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 20:13:41 +0200 Subject: [PATCH 11/78] default prefix, prevent special chars --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 5719de3..a5aeaad 100755 --- a/index.php +++ b/index.php @@ -480,7 +480,7 @@ function page() { - +
The name of the database you want to run WP in.
_" size="25" required pattern="[a-zA-Z0-9_]+"> If you want to run multiple WordPress installations in a single database, change this.
From d80001eb0455312aad3060c42963f8611f3ec706 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 22:27:09 +0200 Subject: [PATCH 12/78] timelimit --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index a5aeaad..31f9070 100755 --- a/index.php +++ b/index.php @@ -25,8 +25,6 @@ $config_json = ob_get_clean(); -@set_time_limit(120); - class wp_quick_install { const CACHE_PATH = "wp_quick_install_cache/"; @@ -36,6 +34,9 @@ class wp_quick_install { function __construct($initData = array()) { + // time limit + @set_time_limit(120); + // error reporting $this->error_log(); From 9741450bab8d3e2d27a27736f88a4157bf325c0f Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 22:34:04 +0200 Subject: [PATCH 13/78] config json fix --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 31f9070..95dfb0f 100755 --- a/index.php +++ b/index.php @@ -23,7 +23,7 @@ Date: Mon, 13 Jul 2015 22:36:22 +0200 Subject: [PATCH 14/78] no translation for now --- index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 95dfb0f..28a5073 100755 --- a/index.php +++ b/index.php @@ -100,7 +100,7 @@ function error_handler($errno, $str, $file, $line, $context) { function dir_ok() { if (!is_writable($this->data["dir"])) { - $this->error[] = _("You don't have good permissions rights on ") . basename($this->data["dir"]); + $this->error[] = "You don't have good permissions rights on " . basename($this->data["dir"]); } else { return true; @@ -110,7 +110,7 @@ function dir_ok() { function no_installed_wp() { if (file_exists($directory . 'wp-config.php')) { - $this->error[] = _("WordPress seems installed, please clean the folder before continue."); + $this->error[] = "WordPress seems installed, please clean the folder before continue."; } else { return true; @@ -452,7 +452,10 @@ function page() {

WordPress

-

data["dir"] . '">' . basename($this->data["dir"]) . "" . _(' directory.');?>

+

Hi, press the button to install WordPress into + ">data["dir"]); ?> + directory. +

@@ -674,9 +677,6 @@ function page() { } } -// for future translations... -if(!function_exists('_')) { function _($s) { echo $s; } } - $WPQI_Installer_Skin = function() { if(class_exists("WPQI_Installer_Skin")) return; From a89fc54f3ee1f4adfdb567e5e7b01ebb9fdb62a7 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 22:39:19 +0200 Subject: [PATCH 15/78] correct jquery animations --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 28a5073..e4822dc 100755 --- a/index.php +++ b/index.php @@ -608,14 +608,14 @@ function page() { this.submit = function() { - $("#error").fadeOut(0); + $("#error").stop().fadeOut(0); var formData = this.$step.find("form").serializeObject(); $.extend(this.data, formData); this.$step.find(":input").prop("disabled", true); - $(".spinner").fadeOut(0).fadeIn(3000); + $(".spinner").stop().fadeOut(0).fadeIn(3000); $.post("", { "data": this.data }).always($.proxy(this.submitted, this)); return false; From d9a201183a8b7fa5c429c9452965501e4dbd2e6a Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 23:39:41 +0200 Subject: [PATCH 16/78] user config vars --- index.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index e4822dc..dbb5f6f 100755 --- a/index.php +++ b/index.php @@ -15,15 +15,22 @@ ob_start(); -// PUT YOUR CONFIGURATION HERE ?> +// SET YOUR CONFIGURATION HERE ?> { - "not_implemented" : "yet", + //"auto_installer": true, + "db": { + //"name": "wordpress", + //"user": "admin", + //"pwd": "", + //"host": "localhost", + //"prefix": "wp_", + }, } error_log(); + // user config + $this->config_json = $config_json; + // sets data - $this->data = $initData; if($_POST["data"]) $this->data = $_POST["data"]; // no submit by default @@ -601,7 +610,7 @@ function page() { From 65bfa16a2ab8f823de0b493855e7de191b59d89f Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 23:48:44 +0200 Subject: [PATCH 19/78] readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3557e07..ac9dd0c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,12 @@ Instructions 2) Visit the folder from browser (eg. yoursite.com/wp) +Auto installer +================ + +TODO + + Features ================ @@ -26,3 +32,4 @@ Features + Set permalinks + Set static front page + Set default avatar ++ Create predefined user installer From 4b161a5c84059119a708baff5db61a27cd7acaee Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 13 Jul 2015 23:53:34 +0200 Subject: [PATCH 20/78] readme --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac9dd0c..fe8ed90 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,21 @@ Instructions Auto installer ================ -TODO - +Open and edit index.php to create automatic installer. Follow instructions in file. + +Config is in JSON format, eg: +``` +{ + "auto_installer": true, + "db": { + "name": "wordpress", + "user": "admin", + "pwd": "", + "host": "localhost", + "prefix": "wp_", + }, +} +``` Features ================ From 1a5bd1586e992601eed85b2f616ad04155b969a4 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Tue, 14 Jul 2015 00:17:53 +0200 Subject: [PATCH 21/78] replace_const and replace_var fix, replace via unique str --- index.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index f49fa6c..ce2dd50 100755 --- a/index.php +++ b/index.php @@ -252,16 +252,18 @@ function get_secret_keys() { function replace_const(&$config, $const, $value) { - $const = addcslashes(preg_quote($const), '\''); - $value = addcslashes(preg_quote($value), '\''); + $const = addcslashes($const, '\''); + $value = addcslashes($value, '\''); - $config = preg_replace("/(define\('" . $const . "',\s*').+('\))/", '$1' . $value . '$2', $config); + $uniqid = " " . uniqid(); + $config = preg_replace("/(define\('" . $const . "',\s*').+('\))/", '$1' . $uniqid . '$2', $config); + $config = str_replace($uniqid, $value, $config); } function replace_var(&$config, $var, $value) { - $var = addcslashes(preg_quote($var), '\''); - $value = addcslashes(preg_quote($value), '\''); + $var = addcslashes($var, '\''); + $value = addcslashes($value, '\''); $config = preg_replace("/(\\\$" . $var . "\s*=\s*').+(')/", '$1' . $value . '$2', $config); } From 41517aee4e051d27a97f9bea94f943170f61de12 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Tue, 14 Jul 2015 00:18:18 +0200 Subject: [PATCH 22/78] do not redirect when config --- index.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.php b/index.php index ce2dd50..7828db3 100755 --- a/index.php +++ b/index.php @@ -294,8 +294,6 @@ function config() { file_put_contents($config_path, $config); @chmod($config_path, 0666); - // for syntax check - include($config_path); } function load_wp_core() { From 1717b16c936b7245d32d3915003dd07a2d55f373 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Tue, 14 Jul 2015 00:43:59 +0200 Subject: [PATCH 23/78] readme --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index fe8ed90..2a2ade4 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,14 @@ Features + Set static front page + Set default avatar + Create predefined user installer + +Know issues +================ + ++ Installer does not work properly, more coding needed + + +Future +================ + ++ Merge config and more config form From 43875d11c805d343c6255cce2c06a72012d03c4a Mon Sep 17 00:00:00 2001 From: pravdomil Date: Tue, 14 Jul 2015 00:46:32 +0200 Subject: [PATCH 24/78] use CDN ! --- index.php | 769 +------------------------------------------ wp-quick-install.php | 735 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 747 insertions(+), 757 deletions(-) create mode 100644 wp-quick-install.php diff --git a/index.php b/index.php index 7828db3..7330833 100755 --- a/index.php +++ b/index.php @@ -1,759 +1,14 @@ - -{ - //"auto_installer": true, - "db": { - //"name": "wordpress", - //"user": "admin", - //"pwd": "", - //"host": "localhost", - //"prefix": "wp_", - }, -} - -error_log(); - - // user config - $this->config_json = $config_json; - - // sets data - if($_POST["data"]) $this->data = $_POST["data"]; - - // no submit by default - $this->data["auto_submit"] = false; - - // install dir - if(!$this->data["dir"]) $this->data["dir"] = __DIR__; - - // decide steps - if($this->data["step"]) { - - $func = "step_" . $this->data["step"]; - - if(method_exists($this, $func)) call_user_func( array($this, $func) ); - } - - // return ajax or page - $is_ajax = $_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest"; - $is_ajax ? $this->ajax_send() : $this->page(); - } - - function ajax_send() { - header("Content-type: application/json"); - echo json_encode(array("data" => $this->data, "error" => $this->error)); - } - - function error_log() { - error_reporting(E_ALL); - @ini_set('html_errors', false); - @ini_set('display_errors', false); - - set_error_handler( array($this, "error_handler") ); - register_shutdown_function( array($this, "shutdown_function") ); - } - - function shutdown_function() { - if($e = error_get_last()) { - $this->error_handler($e["type"], $e["message"], $e["file"], $e["line"], null); - } - } - - function error_handler($errno, $str, $file, $line, $context) { - if (!error_reporting()) return true; // silence operator @ - if (!(4983 & $errno)) return true; - - $msg = $str . " line " . $line; - $msg = trim($msg); - - @header("Content-type: application/json"); - echo json_encode(array("error" => array($msg))); - exit; - - return true; - } - - function dir_ok() { - - if (!is_writable($this->data["dir"])) { - $this->error[] = "You don't have good permissions rights on " . basename($this->data["dir"]); - } - else { - return true; - } - } - - function no_installed_wp() { - - if (file_exists($directory . 'wp-config.php')) { - $this->error[] = "WordPress seems installed, please clean the folder before continue."; - } - else { - return true; - } - } - - function step_first() { - if ($this->dir_ok() && $this->no_installed_wp()) { - $this->data["step"] = "db"; - } - } - - function db_test_ok() { - - try { - $dsn = "mysql:host=" . $this->data["db"]["host"] . ";dbname=" . $this->data["db"]["name"] ; - new PDO($dsn, $this->data["db"]["user"], $this->data["db"]["pwd"]); - } - catch (Exception $e) { - $this->error[] = "Error establishing database connection."; - return false; - } - return true; - } - - function step_db() { - if($this->db_test_ok()) { - $this->data["step"] = "lang"; - } - } - - function step_lang() { - $url = "http://api.wordpress.org/core/version-check/1.7/?locale=" . $this->data['lang']; - - $langs = json_decode(file_get_contents($url), true); - - if(!$langs["offers"][0]) { - - $this->error[] = "Language is not available"; - return; - } - - $this->data["zip_file_url"] = $langs["offers"][0]["download"]; - - $this->data["step"] = "download"; - $this->data["auto_submit"] = true; - } - - function step_download() { - $this->download_wp(); - $this->data["step"] = "unzip"; - $this->data["auto_submit"] = true; - } - - function download_wp() { - - @mkdir( self::CACHE_PATH ); - - $this->data["zip_file"] = self::CACHE_PATH . basename($this->data["zip_file_url"]); - - file_put_contents( $this->data["zip_file"], file_get_contents($this->data["zip_file_url"]) ); - } - - function step_unzip() { - - $this->unzip(); - - $this->data["step"] = "config"; - $this->data["auto_submit"] = true; - } - - function unzip() { - - $zip = new ZipArchive; - - if ( $zip->open($this->data["zip_file"]) === false ) { - - $this->error[] = "Cannot unzip?"; - return; - } - else - { - $zip->extractTo("."); - $zip->close(); - - $files = scandir("wordpress"); - $files = array_diff( $files, array( ".", ".." ) ); - - foreach( $files as $file ) - { - $from = "wordpress/" . $file; - $to = $this->data["dir"] . "/" . $file; - - if($file == "index.php") $to .= ".orig"; - - rename($from, $to); - } - - unlink($this->data["zip_file"]); - rmdir("wordpress"); - rmdir(self::CACHE_PATH); - unlink($this->data["dir"] . "/license.txt"); - unlink($this->data["dir"] . "/readme.html"); - } - } - - function step_config() { - - $this->config(); - - $this->data["step"] = "setup"; - } - - function get_secret_keys() { - - $secret_keys = file_get_contents('https://api.wordpress.org/secret-key/1.1/salt/'); - - if ( !$secret_keys ) { - $this->error[] = "Cannot retrieve secret keys."; - return; - } - - $secret_keys = explode("\n", $secret_keys); - foreach ( $secret_keys as $k => $v ) { - $secret_keys[$k] = substr($v, 28, 64); - } - - return $secret_keys; - } - - function replace_const(&$config, $const, $value) { - - $const = addcslashes($const, '\''); - $value = addcslashes($value, '\''); - - $uniqid = " " . uniqid(); - $config = preg_replace("/(define\('" . $const . "',\s*').+('\))/", '$1' . $uniqid . '$2', $config); - $config = str_replace($uniqid, $value, $config); - } - - function replace_var(&$config, $var, $value) { - - $var = addcslashes($var, '\''); - $value = addcslashes($value, '\''); - - $config = preg_replace("/(\\\$" . $var . "\s*=\s*').+(')/", '$1' . $value . '$2', $config); - } - - function config() { - - $config = file_get_contents( $this->data["dir"] . '/wp-config-sample.php'); - $secret_keys = $this->get_secret_keys(); - - $this->replace_const($config, "DB_NAME", $this->data["db"]["name"]); - $this->replace_const($config, "DB_USER", $this->data["db"]["user"]); - $this->replace_const($config, "DB_PASSWORD", $this->data["db"]["pwd"]); - $this->replace_const($config, "DB_HOST", $this->data["db"]["host"]); - - $this->replace_const($config, "AUTH_KEY", $secret_keys[0]); - $this->replace_const($config, "SECURE_AUTH_KEY", $secret_keys[1]); - $this->replace_const($config, "LOGGED_IN_KEY", $secret_keys[2]); - $this->replace_const($config, "NONCE_KEY", $secret_keys[3]); - - $this->replace_const($config, "AUTH_SALT", $secret_keys[4]); - $this->replace_const($config, "SECURE_AUTH_SALT", $secret_keys[5]); - $this->replace_const($config, "LOGGED_IN_SALT", $secret_keys[6]); - $this->replace_const($config, "NONCE_SALT", $secret_keys[7]); - - $this->replace_var($config, "table_prefix", $this->data["db"]["prefix"]); - - $config_path = $this->data["dir"] . '/wp-config.php'; - file_put_contents($config_path, $config); - @chmod($config_path, 0666); - - } - - function load_wp_core() { - require_once($this->data["dir"] . '/wp-load.php'); - require_once($this->data["dir"] . '/wp-admin/includes/upgrade.php'); - } - - function step_setup() { - - define( 'WP_INSTALLING', true ); - - $this->load_wp_core(); - - $result = wp_install( - $this->data["site_title"], - $this->data["user"]["name"], - $this->data["user"]["email"], - (int) $this->data["blog_public"], - "", - $this->data["user"]["pwd"] - ); - - if(!$result['password']) { - $this->error[] = $result['password_message']; - return; - } - - $this->data["url"] = $result['url']; - $this->data["step"] = "more"; - - } - - function delete_default_content() { - - delete_theme('twentysixteen'); - delete_theme('twentyfifteen'); - delete_theme('twentyfourteen'); - delete_theme('twentythirteen'); - delete_theme('twentytwelve'); - delete_theme('twentyeleven'); - delete_theme('twentyten'); - - delete_plugins(array('hello.php', 'akismet/akismet.php')); - } - - function set_permalink_struct($str) { - global $wp_rewrite; - - $wp_rewrite->set_permalink_structure($str); - save_mod_rewrite_rules(); - } - - function install_plugins($array) { - - require_once $this->data['dir'] . '/wp-admin/includes/class-wp-upgrader.php'; - global $WPQI_Installer_Skin; - $WPQI_Installer_Skin(); - - foreach ($array as $name) { - - if(!$name) continue; - - $is_url = preg_match("/^(http|https):\/\//i", $name); - - $url = $is_url ? $name : "https://downloads.wordpress.org/plugin/$name.zip"; - - $upgrader = new Plugin_Upgrader(new WPQI_Installer_Skin()); - $upgrader->install($url); - activate_plugin($upgrader->plugin_info()); - - } - - wp_clean_plugins_cache(); - } - - function install_theme($array) { - - require_once $this->data['dir'] . '/wp-admin/includes/class-wp-upgrader.php'; - global $WPQI_Installer_Skin; - $WPQI_Installer_Skin(); - - $first = true; - foreach ($array as $name) { - - if(!$name) continue; - - $is_url = preg_match("/^(http|https):\/\//i", $name); - - $url = $is_url ? $name : "https://downloads.wordpress.org/theme/$name.zip"; - - $upgrader = new Theme_Upgrader(new WPQI_Installer_Skin()); - $upgrader->install($url); - - if($first) { - switch_theme($name); - $first = false; - } - } - - wp_clean_themes_cache(); - } - - function step_more() { - - $this->load_wp_core(); - - if ($this->data['del_default']) $this->delete_default_content(); - - if ($this->data['permalink_structure']) $this->set_permalink_struct($this->data['permalink_structure']); - - if($this->data['install_plugin']) { - $this->install_plugins(explode("\n", $this->data['install_plugin'])); - } - - if($this->data['install_theme']) { - $this->install_theme(explode("\n", $this->data['install_theme'])); - } - - if($this->data['page_on_front']) { - update_option('show_on_front', 'page'); - update_option('page_on_front', 2); - } - - if($this->data['set_avatar']) update_option("avatar_default", "identicon"); - - //return; - - unlink($this->dir . "index.php"); - rename($this->dir . "index.php.orig", $this->dir . "index.php"); - - $this->data["step"] = get_home_url(); - } - - function page() { - - ?> - - - - - WP Quick Install - - - - - - - - - - -

WordPress

-
-

Hi, press the button to install WordPress into - ">data["dir"]); ?> - directory. -

-

-
- -
-

Below you should enter your database connection details. If you’re not sure about these, contact your host.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
The name of the database you want to run WP in.
Your MySQL username
…and your MySQL password.
You should be able to get this info from your web host, if localhost does not work.
_" size="25" required pattern="[a-zA-Z0-9_]+">If you want to run multiple WordPress installations in a single database, change this.
-

-
- -
-

- Select language
- -

-

-
- -
-

Downloading...

-
- -
-

Unpacking...

-
- -
-

Configuring...

-
- -
-

Wordpress was installed, please configure it.

- - - - - - - - - - - - - - - - - - - - - -
- -

A password will be automatically generated for you if you leave this blank.

-
- -
-

Double-check your email address before continuing.

Privacy?
-

-
- -
-

We are ready, you can

- -

You can do setup more

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Front page
Default avatar
Default content
-

-
-
- - -
- - - - - - - - false, + "db" => array( + //"name" => "wordpress", + //"user" => "", + //"pwd" => "", + //"host" => "localhost", + //"prefix" => "wp_", + ), +); + +include("https://cdn.rawgit.com/Pravdomil/WP-Quick-Install/master/wp-quick-install.php"); diff --git a/wp-quick-install.php b/wp-quick-install.php new file mode 100644 index 0000000..b4bc991 --- /dev/null +++ b/wp-quick-install.php @@ -0,0 +1,735 @@ +error_log(); + + // user config + $this->config_json = $config_json; + + // sets data + if($_POST["data"]) $this->data = $_POST["data"]; + + // no submit by default + $this->data["auto_submit"] = false; + + // install dir + if(!$this->data["dir"]) $this->data["dir"] = __DIR__; + + // decide steps + if($this->data["step"]) { + + $func = "step_" . $this->data["step"]; + + if(method_exists($this, $func)) call_user_func( array($this, $func) ); + } + + // return ajax or page + $is_ajax = $_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest"; + $is_ajax ? $this->ajax_send() : $this->page(); + } + + function ajax_send() { + header("Content-type: application/json"); + echo json_encode(array("data" => $this->data, "error" => $this->error)); + } + + function error_log() { + error_reporting(E_ALL); + @ini_set('html_errors', false); + @ini_set('display_errors', false); + + set_error_handler( array($this, "error_handler") ); + register_shutdown_function( array($this, "shutdown_function") ); + } + + function shutdown_function() { + if($e = error_get_last()) { + $this->error_handler($e["type"], $e["message"], $e["file"], $e["line"], null); + } + } + + function error_handler($errno, $str, $file, $line, $context) { + if (!error_reporting()) return true; // silence operator @ + if (!(4983 & $errno)) return true; + + $msg = $str . " line " . $line; + $msg = trim($msg); + + @header("Content-type: application/json"); + echo json_encode(array("error" => array($msg))); + exit; + + return true; + } + + function dir_ok() { + + if (!is_writable($this->data["dir"])) { + $this->error[] = "You don't have good permissions rights on " . basename($this->data["dir"]); + } + else { + return true; + } + } + + function no_installed_wp() { + + if (file_exists($directory . 'wp-config.php')) { + $this->error[] = "WordPress seems installed, please clean the folder before continue."; + } + else { + return true; + } + } + + function step_first() { + if ($this->dir_ok() && $this->no_installed_wp()) { + $this->data["step"] = "db"; + } + } + + function db_test_ok() { + + try { + $dsn = "mysql:host=" . $this->data["db"]["host"] . ";dbname=" . $this->data["db"]["name"] ; + new PDO($dsn, $this->data["db"]["user"], $this->data["db"]["pwd"]); + } + catch (Exception $e) { + $this->error[] = "Error establishing database connection."; + return false; + } + return true; + } + + function step_db() { + if($this->db_test_ok()) { + $this->data["step"] = "lang"; + } + } + + function step_lang() { + $url = "http://api.wordpress.org/core/version-check/1.7/?locale=" . $this->data['lang']; + + $langs = json_decode(file_get_contents($url), true); + + if(!$langs["offers"][0]) { + + $this->error[] = "Language is not available"; + return; + } + + $this->data["zip_file_url"] = $langs["offers"][0]["download"]; + + $this->data["step"] = "download"; + $this->data["auto_submit"] = true; + } + + function step_download() { + $this->download_wp(); + $this->data["step"] = "unzip"; + $this->data["auto_submit"] = true; + } + + function download_wp() { + + @mkdir( self::CACHE_PATH ); + + $this->data["zip_file"] = self::CACHE_PATH . basename($this->data["zip_file_url"]); + + file_put_contents( $this->data["zip_file"], file_get_contents($this->data["zip_file_url"]) ); + } + + function step_unzip() { + + $this->unzip(); + + $this->data["step"] = "config"; + $this->data["auto_submit"] = true; + } + + function unzip() { + + $zip = new ZipArchive; + + if ( $zip->open($this->data["zip_file"]) === false ) { + + $this->error[] = "Cannot unzip?"; + return; + } + else + { + $zip->extractTo("."); + $zip->close(); + + $files = scandir("wordpress"); + $files = array_diff( $files, array( ".", ".." ) ); + + foreach( $files as $file ) + { + $from = "wordpress/" . $file; + $to = $this->data["dir"] . "/" . $file; + + if($file == "index.php") $to .= ".orig"; + + rename($from, $to); + } + + unlink($this->data["zip_file"]); + rmdir("wordpress"); + rmdir(self::CACHE_PATH); + unlink($this->data["dir"] . "/license.txt"); + unlink($this->data["dir"] . "/readme.html"); + } + } + + function step_config() { + + $this->config(); + + $this->data["step"] = "setup"; + } + + function get_secret_keys() { + + $secret_keys = file_get_contents('https://api.wordpress.org/secret-key/1.1/salt/'); + + if ( !$secret_keys ) { + $this->error[] = "Cannot retrieve secret keys."; + return; + } + + $secret_keys = explode("\n", $secret_keys); + foreach ( $secret_keys as $k => $v ) { + $secret_keys[$k] = substr($v, 28, 64); + } + + return $secret_keys; + } + + function replace_const(&$config, $const, $value) { + + $const = addcslashes($const, '\''); + $value = addcslashes($value, '\''); + + $uniqid = " " . uniqid(); + $config = preg_replace("/(define\('" . $const . "',\s*').+('\))/", '$1' . $uniqid . '$2', $config); + $config = str_replace($uniqid, $value, $config); + } + + function replace_var(&$config, $var, $value) { + + $var = addcslashes($var, '\''); + $value = addcslashes($value, '\''); + + $config = preg_replace("/(\\\$" . $var . "\s*=\s*').+(')/", '$1' . $value . '$2', $config); + } + + function config() { + + $config = file_get_contents( $this->data["dir"] . '/wp-config-sample.php'); + $secret_keys = $this->get_secret_keys(); + + $this->replace_const($config, "DB_NAME", $this->data["db"]["name"]); + $this->replace_const($config, "DB_USER", $this->data["db"]["user"]); + $this->replace_const($config, "DB_PASSWORD", $this->data["db"]["pwd"]); + $this->replace_const($config, "DB_HOST", $this->data["db"]["host"]); + + $this->replace_const($config, "AUTH_KEY", $secret_keys[0]); + $this->replace_const($config, "SECURE_AUTH_KEY", $secret_keys[1]); + $this->replace_const($config, "LOGGED_IN_KEY", $secret_keys[2]); + $this->replace_const($config, "NONCE_KEY", $secret_keys[3]); + + $this->replace_const($config, "AUTH_SALT", $secret_keys[4]); + $this->replace_const($config, "SECURE_AUTH_SALT", $secret_keys[5]); + $this->replace_const($config, "LOGGED_IN_SALT", $secret_keys[6]); + $this->replace_const($config, "NONCE_SALT", $secret_keys[7]); + + $this->replace_var($config, "table_prefix", $this->data["db"]["prefix"]); + + $config_path = $this->data["dir"] . '/wp-config.php'; + file_put_contents($config_path, $config); + @chmod($config_path, 0666); + + } + + function load_wp_core() { + require_once($this->data["dir"] . '/wp-load.php'); + require_once($this->data["dir"] . '/wp-admin/includes/upgrade.php'); + } + + function step_setup() { + + define( 'WP_INSTALLING', true ); + + $this->load_wp_core(); + + $result = wp_install( + $this->data["site_title"], + $this->data["user"]["name"], + $this->data["user"]["email"], + (int) $this->data["blog_public"], + "", + $this->data["user"]["pwd"] + ); + + if(!$result['password']) { + $this->error[] = $result['password_message']; + return; + } + + $this->data["url"] = $result['url']; + $this->data["step"] = "more"; + + } + + function delete_default_content() { + + delete_theme('twentysixteen'); + delete_theme('twentyfifteen'); + delete_theme('twentyfourteen'); + delete_theme('twentythirteen'); + delete_theme('twentytwelve'); + delete_theme('twentyeleven'); + delete_theme('twentyten'); + + delete_plugins(array('hello.php', 'akismet/akismet.php')); + } + + function set_permalink_struct($str) { + global $wp_rewrite; + + $wp_rewrite->set_permalink_structure($str); + save_mod_rewrite_rules(); + } + + function install_plugins($array) { + + require_once $this->data['dir'] . '/wp-admin/includes/class-wp-upgrader.php'; + global $WPQI_Installer_Skin; + $WPQI_Installer_Skin(); + + foreach ($array as $name) { + + if(!$name) continue; + + $is_url = preg_match("/^(http|https):\/\//i", $name); + + $url = $is_url ? $name : "https://downloads.wordpress.org/plugin/$name.zip"; + + $upgrader = new Plugin_Upgrader(new WPQI_Installer_Skin()); + $upgrader->install($url); + activate_plugin($upgrader->plugin_info()); + + } + + wp_clean_plugins_cache(); + } + + function install_theme($array) { + + require_once $this->data['dir'] . '/wp-admin/includes/class-wp-upgrader.php'; + global $WPQI_Installer_Skin; + $WPQI_Installer_Skin(); + + $first = true; + foreach ($array as $name) { + + if(!$name) continue; + + $is_url = preg_match("/^(http|https):\/\//i", $name); + + $url = $is_url ? $name : "https://downloads.wordpress.org/theme/$name.zip"; + + $upgrader = new Theme_Upgrader(new WPQI_Installer_Skin()); + $upgrader->install($url); + + if($first) { + switch_theme($name); + $first = false; + } + } + + wp_clean_themes_cache(); + } + + function step_more() { + + $this->load_wp_core(); + + if ($this->data['del_default']) $this->delete_default_content(); + + if ($this->data['permalink_structure']) $this->set_permalink_struct($this->data['permalink_structure']); + + if($this->data['install_plugin']) { + $this->install_plugins(explode("\n", $this->data['install_plugin'])); + } + + if($this->data['install_theme']) { + $this->install_theme(explode("\n", $this->data['install_theme'])); + } + + if($this->data['page_on_front']) { + update_option('show_on_front', 'page'); + update_option('page_on_front', 2); + } + + if($this->data['set_avatar']) update_option("avatar_default", "identicon"); + + //return; + + unlink($this->dir . "index.php"); + rename($this->dir . "index.php.orig", $this->dir . "index.php"); + + $this->data["step"] = get_home_url(); + } + + function page() { + + ?> + + + + + WP Quick Install + + + + + + + + + + +

WordPress

+
+

Hi, press the button to install WordPress into + ">data["dir"]); ?> + directory. +

+

+
+ +
+

Below you should enter your database connection details. If you’re not sure about these, contact your host.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
The name of the database you want to run WP in.
Your MySQL username
…and your MySQL password.
You should be able to get this info from your web host, if localhost does not work.
_" size="25" required pattern="[a-zA-Z0-9_]+">If you want to run multiple WordPress installations in a single database, change this.
+

+
+ +
+

+ Select language
+ +

+

+
+ +
+

Downloading...

+
+ +
+

Unpacking...

+
+ +
+

Configuring...

+
+ +
+

Wordpress was installed, please configure it.

+ + + + + + + + + + + + + + + + + + + + + +
+ +

A password will be automatically generated for you if you leave this blank.

+
+ +
+

Double-check your email address before continuing.

Privacy
+

+
+ +
+

We are ready, you can

+ +

You can do setup more

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Front page
Default avatar
Default content
+

+
+
+ + +
+ + + + + + + + Date: Tue, 14 Jul 2015 00:55:48 +0200 Subject: [PATCH 25/78] cache cdn, fix allow_url_include=0 --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 7330833..ff1fb16 100755 --- a/index.php +++ b/index.php @@ -11,4 +11,7 @@ ), ); -include("https://cdn.rawgit.com/Pravdomil/WP-Quick-Install/master/wp-quick-install.php"); +$file = "wp-quick-install.php"; +$url = "https://cdn.rawgit.com/Pravdomil/WP-Quick-Install/master/wp-quick-install.php"; +if(!file_exists($file)) file_put_contents($file, file_get_contents($url)); +include $file; From 529d774c4803820ceae51c5999ef0c8959a7301e Mon Sep 17 00:00:00 2001 From: pravdomil Date: Tue, 14 Jul 2015 01:02:08 +0200 Subject: [PATCH 26/78] fix user_config --- wp-quick-install.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-quick-install.php b/wp-quick-install.php index b4bc991..fe4612f 100644 --- a/wp-quick-install.php +++ b/wp-quick-install.php @@ -14,7 +14,7 @@ class wp_quick_install { var $data = array(); var $error = array(); - function __construct($config_json = "{}") { + function __construct($user_config = array()) { // time limit @set_time_limit(120); @@ -23,7 +23,7 @@ function __construct($config_json = "{}") { $this->error_log(); // user config - $this->config_json = $config_json; + $this->user_config = $user_config; // sets data if($_POST["data"]) $this->data = $_POST["data"]; @@ -585,7 +585,7 @@ function page() { + + + - - - Date: Wed, 15 Jul 2015 11:17:57 +0200 Subject: [PATCH 38/78] better check for no installed wp --- wp-quick-install.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-quick-install.php b/wp-quick-install.php index fdbba7d..53e1866 100644 --- a/wp-quick-install.php +++ b/wp-quick-install.php @@ -92,8 +92,12 @@ function _dir_ok() { } function _no_installed_wp() { + $config = file_exists($this->data["dir"] . '/wp-config.php'); + $admin = file_exists($this->data["dir"] . '/wp-admin'); + $content = file_exists($this->data["dir"] . '/wp-content'); + $includes = file_exists($this->data["dir"] . '/wp-includes'); - if (file_exists($this->data["dir"] . '/wp-config.php')) { + if ($config || $admin || $content || $includes) { $this->error[] = "WordPress seems installed, please clean the folder before continue."; } } From 4d8b591143b2dd86d4e0bd278c3b4c069e3f57f2 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Wed, 15 Jul 2015 11:30:28 +0200 Subject: [PATCH 39/78] fix error reporting --- wp-quick-install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-quick-install.php b/wp-quick-install.php index 53e1866..91eb332 100644 --- a/wp-quick-install.php +++ b/wp-quick-install.php @@ -68,7 +68,7 @@ function shutdown_function() { function error_handler($errno, $str, $file, $line, $context) { if (!error_reporting()) return true; // silence operator @ - if (!(4983 & $errno)) return true; + if (!(5111 & $errno)) return true; // http://www.bx.com.au/tools/ultimate-php-error-reporting-wizard $msg = $str . " line " . $line; $msg = trim($msg); @@ -283,7 +283,7 @@ function get_secret_keys() { $secret_keys = file_get_contents('https://api.wordpress.org/secret-key/1.1/salt/'); if ( !$secret_keys ) { - trigger_error("Cannot retrieve secret keys.", E_WARNING); + trigger_error("Cannot retrieve secret keys.", E_USER_ERROR); return; } From 0433f194faa82090d7fbef760fbbf1d6fb12bcc5 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Wed, 15 Jul 2015 11:32:30 +0200 Subject: [PATCH 40/78] more secure replace_var and replace_const --- wp-quick-install.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-quick-install.php b/wp-quick-install.php index 91eb332..7b44f3e 100644 --- a/wp-quick-install.php +++ b/wp-quick-install.php @@ -300,7 +300,7 @@ function replace_const(&$config, $const, $value) { $const = addcslashes($const, '\''); $value = addcslashes($value, '\''); - $uniqid = " " . uniqid(); + $uniqid = " " . uniqid() . " "; $config = preg_replace("/(define\('" . $const . "',\s*').+('\))/", '$1' . $uniqid . '$2', $config); $config = str_replace($uniqid, $value, $config); } @@ -310,7 +310,9 @@ function replace_var(&$config, $var, $value) { $var = addcslashes($var, '\''); $value = addcslashes($value, '\''); - $config = preg_replace("/(\\\$" . $var . "\s*=\s*').+(')/", '$1' . $value . '$2', $config); + $uniqid = " " . uniqid() . " "; + $config = preg_replace("/(\\\$" . $var . "\s*=\s*').+(')/", '$1' . $uniqid . '$2', $config); + $config = str_replace($uniqid, $value, $config); } function load_wp_core() { From 0e92c320ded4991670b582bb78f1c23a8b7a614c Mon Sep 17 00:00:00 2001 From: pravdomil Date: Wed, 15 Jul 2015 11:33:01 +0200 Subject: [PATCH 41/78] fix storing data in cookie --- wp-quick-install.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-quick-install.php b/wp-quick-install.php index 7b44f3e..d510fa8 100644 --- a/wp-quick-install.php +++ b/wp-quick-install.php @@ -592,6 +592,8 @@ function page() { -