'; } // ******************************************************************************** // 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'
'; } // ******************************************************************************** // 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'
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
'; } ?>