' . $lang_string[ 'title' ] . '' );
echo( $lang_string[ 'instructions' ] . '
' );
echo( '
' );
$result = create_folder( 'config' );
$result = $result + create_folder( 'content' );
$result = $result + create_folder( 'images' );
// Create a .htaccess file as part of the install process...
$htaccess_str = "IndexIgnore *
order allow,deny
deny from all
order allow,deny
deny from all
";
sb_write_file( "config/.htaccess", $htaccess_str );
sb_write_file( "content/.htaccess", $htaccess_str );
sb_write_file( "images/.htaccess", $htaccess_str );
echo( '
' );
echo( '
' );
if ( $result < 0 ) {
echo( $lang_string['help'] . '' );
echo( '' . $lang_string['try_again'] . '' );
} else {
echo( $lang_string['success'] . '' );
echo( '' . $lang_string['continue'] . '' );
}
}
function create_folder( $dir ) {
global $lang_string;
echo( 'Making ' . $dir . ' folder: ' );
if ( !file_exists( $dir ) ) {
// Creating Folder
$oldumask = umask( 0 );
$ok = mkdir( $dir, 0777 );
umask( $oldumask );
if ( !file_exists( $dir ) ) {
// Failed
echo( '' . $lang_string['folder_failed'] . '
' );
return( -1 );
} else {
// Worked
echo( '' . $lang_string['folder_success'] . '
' );
return( 0 );
}
} else {
// Folder Already Exists
echo( '' . $lang_string['folder_exists'] . '
' );
return( 0 );
}
}
?>