Cute News v1.3.6 Installer
 
 
Checking File and Folder Permissions
statistic for important files that must be CHMOD\'ed and writable
  '; $important_files = array( // 'index.php', -> not important ?!? :| 'data/', ); if(!$handle = opendir("./data")){ die("
Can not open directory ./data "); } while (false !== ($file = readdir($handle))){ if($file != '.' and $file != '..' and $file != '.htaccess' and $file != 'emoticons'){ $important_files[] = "data/$file"; } } closedir($handle); $chmod_errors = 0; $not_found_errors = 0; foreach($important_files as $file){ $file_name = $my_path . $file; if(!file_exists($file_name)){ $file_status = "not found, check if it is uploaded !"; $not_found_errors ++; } elseif(is_writable($file_name)){ $file_status = "Writable"; } else{ @chmod("$file_name", 0777); if(is_writable($file_name)){ $file_status = "Writable"; }else{ @chmod("$file_name", 0755); if(is_writable($file_name)){ $file_status = "Writable"; }else{ $file_status = "Not Writable"; $chmod_errors ++; } } } $chmod_value = @decoct(@fileperms($my_path . $file)) % 1000; echo"
"; } if($chmod_errors == 0 and $not_found_errors == 0){ $status_report = 'The check was completed successfully and no errors were encountered, you may now continue to the final step of the the installation'; }else{ if($chmod_errors > 0){ $status_report = "Warning !!! during the permissions check, $chmod_errors of the files were not writable, you should now CHMOD them to 777 using your FTP program.
(basically the files that must be CHMODed are index.php and all files and folders in the data/ directory)

Proceeding with installation is NOT reccomended.
"; } if($not_found_errors > 0){ $status_report .= "Warning !!! during the permissions check, $not_found_errors of the files were not found, make sure you uploaded them in the correct folder.

Proceeding with installation is NOT reccomended.
"; } } echo""; echo'
 
 File / Folder Current CHMOD value Status
 $file_name   $chmod_value   $file_status
 
 
Overal Status Report
$status_report
 

 '; } // ******************************************************************************** // Do Configure // ******************************************************************************** elseif($action == "doconfig") { $url = preg_replace( "'/index.php'", "", $HTTP_SERVER_VARS['HTTP_REFERER']); $url = preg_replace( "'\?(.*)'", "", $url); if(substr("$url", -1) == "/"){ $url = substr($url, 0, -1); } echo'

Important Configurations

Please fill the required information correct for the script to work properly
 
 
 Full URL to Cute News directory: should start with Http://
 
 Administrator Username:
 Password: please do NOT loose your password
 Retype Password:
 Nickname (optional)
 Email
 
 

  '; } // ******************************************************************************** // Do Install // ******************************************************************************** elseif($action == "doinstall") { if(!$reg_username or !$reg_password1 or !$url or $reg_password1 != $reg_password2 ){ die("Error !!!
You didn't fill some required field or the passwords did not match"); } $reg_password = md5($reg_password1); $users_file = fopen("./data/users.db.php", "w") or die("Sorry but installer can not write to file ./data/users.db.php,
please check if file exist and if it is properly CHMOD`ed"); fwrite($users_file, "\n"); fwrite($users_file, time()."|1|$reg_username|$reg_password|$reg_nickname|$reg_email|0|0||||\n"); fclose($users_file); $config = << HTML; $con_file = fopen("./data/config.php", "w") or die("Sorry but installer can not write to file ./data/config.php,
please check if file exist and if it is properly CHMOD`ed"); fwrite($con_file, $config); fclose($con_file); $path = str_replace( '\\', '/', getcwd() ); echo'

Installation Finished

CuteNews was successfully installed.
 



You can now go to CuteNews login page.

It is recommended that you read the CuteNews README file where is explained how to show news on your page.
note: you should now delete ./inc/install.mdu file for security reasons

  '; } // ******************************************************************************** // Start Installation Wizard // ******************************************************************************** else{ echo'
Welcome to Cute News v1.3.6 installer

This wizard will guide you through all installation steps and will help you configure the script
 
 

  '; } ?>