Error!CuteNews detected that you do not have users in your users.db.php file and wants to run the install module.
However, the install module (./inc/install.mdu) can not be located, please reupload this file and make sure you set the proper permissions so the installation can continue.'); }
msg("info", "CuteNews Not Installed", "CuteNews is not properly installed (users missing) go to index.php");
}
$register_level = $config_registration_level;
if($action == "doregister"){
if($config_allow_registration != "yes"){ msg("error","Error", "User registration is Disabled"); }
if(!$regusername){ msg("error","Error !!!", "Username can not be blank"); }
if(!$regpassword){ msg("error","Error !!!", "Password can not be blank"); }
if(!$regemail) { msg("error","Error !!!", "Email can not be blank"); }
$regusername = preg_replace( array("'<'", "'>'", "'\n'", "'\r'", "'\|'"), array("", "", "", "", ""), $regusername);
$regnickname = preg_replace( array("'<'", "'>'", "'\n'", "'\r'", "'\|'"), array("", "", "", "", ""), $regnickname);
$regemail = preg_replace( array("'<'", "'>'", "'\n'", "'\r'", "'\|'"), array("", "", "", "", ""), $regemail);
$regpassword = preg_replace( array("'<'", "'>'", "'\n'", "'\r'", "'\|'"), array("", "", "", "", ""), $regpassword);
if(!preg_match("/^[\.A-z0-9_\-]{1,15}$/i", $regusername)){ msg("error","Error !!!", "$regusername Your username must only contain valid characters, numbers and the symbol '_'"); }
if(!preg_match("/^[\.A-z0-9_\-]{1,15}$/i", $regnickname)){ msg("error","Error !!!", "Your nickname must only contain valid characters, numbers and the symbol '_'"); }
if(!preg_match("/^[\.A-z0-9_\-]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $regemail)){ msg("error","Error !!!", "Not valid Email."); }
if(!preg_match("/^[\.A-z0-9_\-]{1,15}$/i", $regpassword)){ msg("error","Error !!!", "Your password must conatain only valid characters and numbers"); }
$all_users = file("./data/users.db.php");
foreach($all_users as $user_line)
{
$user_arr = explode("|", $user_line);
if($user_arr[2] == $regusername){ msg("error", "Error", "This username is already taken"); }
}
$add_time = time()+($config_date_adjust*60);
$regpassword = md5($regpassword);
$old_users_file = file("./data/users.db.php");
$new_users_file = fopen("./data/users.db.php", "a");
fwrite($new_users_file, "$add_time|$register_level|$regusername|$regpassword|$regnickname|$regemail|0|0||||\n");
fclose($new_users_file);
if($config_notify_registration == "yes" and $config_notify_status == "active"){
send_mail("$config_notify_email", "CuteNews - New User Registered", "New user ($regusername) has just registered:\nUsername: $regusername\nNickname: $regnickname\nEmail: $regemail\n ");
}
msg("user", "User Added", "You were successfully added to users database.
You can now login here");
}elseif($action == "lostpass"){
echoheader("user","Lost Password");
echo"