} // Get subdirectory $dir .= str_replace('dropplets/save.php', '', $_SERVER["REQUEST_URI"]); // Output submitted setup values. $config[] = "<?php"; $config[] = settings_format("blog_email", $blog_email); $config[] = settings_format("blog_twitter", $blog_twitter); $config[] = settings_format("blog_url", $blog_url); $config[] = settings_format("blog_title", $blog_title); $config[] = settings_format("meta_description", $meta_description); $config[] = settings_format("intro_title", $intro_title); $config[] = settings_format("intro_text", $intro_text); $config[] = "\$password = '******';"; $config[] = settings_format("header_inject", $header_inject); $config[] = settings_format("footer_inject", $footer_inject); $config[] = settings_format("template", $template); // Create the settings file. file_put_contents($settings_file, implode("\n", $config)); // Generate the .htaccess file on initial setup only. if (!file_exists($htaccess_file)) { // Parameters for the htaccess file. $htaccess[] = "# Pretty Permalinks"; $htaccess[] = "RewriteRule ^(images)(\$|/) - [L]"; $htaccess[] = "RewriteCond %{REQUEST_URI} !^action=logout [NC]"; $htaccess[] = "RewriteCond %{REQUEST_URI} !^action=login [NC]"; $htaccess[] = "Options +FollowSymLinks -MultiViews"; $htaccess[] = "RewriteEngine on"; $htaccess[] = "RewriteBase " . $dir; $htaccess[] = "RewriteCond %{REQUEST_URI} !index\\.php"; $htaccess[] = "RewriteCond %{REQUEST_FILENAME} !-f"; $htaccess[] = "RewriteRule ^(.*)\$ index.php?filename=\$1 [NC,QSA,L]";
$config[] = settings_format("site_theme", $site_theme); $config[] = settings_format("gallery_title", $gallery_title); $config[] = settings_format("gallery_description", $gallery_description); $config[] = settings_format("gallery_items_number", $gallery_items_number); $config[] = settings_format("footer_text", $footer_text); $config[] = settings_format("about_title", $about_title); $config[] = settings_format("about_text", $about_text); $config[] = settings_format("not_found_title", $not_found_title); $config[] = settings_format("not_found_text", $not_found_text); $config[] = settings_format("profile_name", $profile_name); $config[] = settings_format("profile_twitter", $profile_twitter); $config[] = settings_format("profile_facebook", $profile_facebook); $config[] = settings_format("profile_email", $profile_email); $config[] = settings_format("site_analytics", $site_analytics); $config[] = settings_format("username", $username); $config[] = settings_format("email", $email); $config[] = "\$password = '******';"; // Create the settings file. file_put_contents($settings_file, implode("\n", $config)); // Get subdirectory for the .htaccess below. $dir .= str_replace('cinematico/save.php', '', $_SERVER["REQUEST_URI"]); // Generate the .htaccess file on initial setup only. if (!file_exists($htaccess_file)) { // Parameters for the htaccess file. $htaccess[] = "# Pretty Permalinks"; $htaccess[] = "RewriteRule ^(images)(\$|/) - [L]"; $htaccess[] = "RewriteCond %{REQUEST_URI} !^action=logout [NC]"; $htaccess[] = "RewriteCond %{REQUEST_URI} !^action=login [NC]"; $htaccess[] = "Options +FollowSymLinks -MultiViews"; $htaccess[] = "RewriteEngine on"; $htaccess[] = "RewriteBase " . $dir;