'.__('Welcome to Blogmail')."

"; print __('Select another language:'); print ' '.__('English').''; print ' | '.__('Spanish').''; print ' | '.__('Catalan').''; print '

'; function check_writeable_dir( $dir, $ret ) { if( is_writeable( $dir ) == false ) { print basename($dir)." : ".__('FAILED')."
".__('Quick Fix: ')."chmod 777 $dir
"; return false; } else { print basename($dir)." : ".__('OK')."
"; if( $ret == true ) { return true; } else { return false; } } } function do_htaccess( $oldfilename, $newfilename, $realpath, $base, $url ) { $htaccess = ''; if( is_file( $oldfilename ) ) { $fp = fopen( $oldfilename, "r" ); if( $fp ) { while( !feof( $fp ) ) { $htaccess .= fgets( $fp, 4096 ); } fclose( $fp ); $htaccess = str_replace( '$REALPATH', $realpath, $htaccess ); $htaccess = str_replace( '$BASE', str_replace('.', '\.', $base) , $htaccess ); $htaccess = str_replace( '$HOST', $url, $htaccess ); $fp = fopen( $newfilename, "w" ); fwrite( $fp, $htaccess ); fclose( $fp ); } } } $realpath = dirname(dirname(__FILE__)); print "

".__("File attributes test")."

"; print __("Path").": $realpath
"; if( isset( $nosetup ) == false ) { $ret = true; $ret = check_writeable_dir( dirname(__FILE__) . "/..", $ret ); $ret = check_writeable_dir( dirname(__FILE__), $ret ); $ret = check_writeable_dir( dirname(__FILE__) . "/../bm-content/", $ret ); $ret = check_writeable_dir( dirname(__FILE__) . "/../bm-content/smarty-templates", $ret ); if( $ret == false ) { print "

".__('Warning')."

"; print "
"; print "

".__('Some directories need write rights')."
"; print __('Write')." chmod 777 ".__('directory-name')." ".__('or')." chown ".__('to this directory to have the same owner as the server runs (usually nobody, apache, or www-data')."
"; print __("Refresh this web when the changes were finished")."

"; print "
"; die(); } // Create default template cache dirs @mkdir( dirname(__FILE__) . "/../bm-content/smarty-cache" , 0777 ); @mkdir( dirname(__FILE__) . "/../bm-content/smarty-templates_c" , 0777 ); // Create Blogs living area. @mkdir( dirname(__FILE__) . "/../bm-content/blogs", 0777 ); print '
'; $proto="http"; if($_SERVER["HTTPS"]=='on') $proto.='s'; $url = $proto."://".$_SERVER["SERVER_NAME"] . dirname( $_SERVER[ "SCRIPT_NAME" ] ) . '/*'; print "

".__('Virtual Hosting')."

"; print '
'; print "$url
"; print 'Based on paths. (it works with http and https)'; $url = $proto."://*.".$_SERVER["SERVER_NAME"] . dirname( $_SERVER[ "SCRIPT_NAME" ] ); print "

"; print ''; print "$url
"; print 'Based on subdomains. (it doesn\'t work with https)'; if( substr( $url, -1 ) == '/' ) $url = substr( $url, 0, -1 ); $base = $_SERVER["SERVER_NAME"]; if( is_file( dirname(__FILE__) . "/../bm-settings.php" ) == false ) { $configfile = ''; $fp = fopen( dirname(__FILE__) . "/../bm-settings.php.dist", "r" ); if( $fp ) { while( !feof( $fp ) ) { $configfile .= fgets( $fp, 4096 ); } fclose( $fp ); } $configfile = str_replace( "BASE", $base."/", $configfile ); $fp = fopen( dirname(__FILE__) ."/../bm-settings.php", "w" ); fwrite( $fp, $configfile ); fclose( $fp ); } } if( is_file( dirname(__FILE__) . "/../bm-config.php" ) == false ) { #print '

'; print '

'; } print "
"; require_once('install-footer.php'); ?>