Don't mind the logo to much. I know it's ugly.
Before I tell you more about it; The C key on my keyboard is broken, so if there's a C missing, you know why.
Let's cut to the chase
Welcome to wScript! The meaning of wScript is to let you make something, it could be anything, (Exept for Habbo, sorry guys), from a fansite for your favorite band to a blog, to a forum to a portfolio, I could go on for days... Now you're probably thinking; "This guy is a total moron, we have Wordpress" and that's kinds true, I know that we have wordpress, but this is different, this is like Wordpress + vBulletin + WAY nicer templates... You'll see, but first, let me give you a example:
John is 15 years old. He likes to play Minecraft. Because he has his own private server he does want a website but, how do you do that? wScript ofcourse! Through the simple and user-friendly control John can make an entire website! So he starts. He downloads the system, install it on his web host and starts the install, where he can choose from several options. Absolutely wonderful! After a few minutes, his website is up-and-running! Thanks wScript!
I got you some stuff:
PHP:
public function Login($username, $postpassword) {
$stmt = $this->mysqli->prepare("SELECT username, password FROM users WHERE username=?");
$stmt->bind_param('s', $username);
$stmt->execute();
$stmt->bind_result($username, $password);
$stmt->store_result();
if($stmt->num_rows == 1) {
while($stmt->fetch()) {
if (password_verify($postpassword, $password)) {
$SESSID = $this->newSession($username);
$_SESSION['admin_user'] = $username;
$_SESSION['last_login'] = time();
header("Location: home.php?SESSID=$SESSID");
exit();
}
}
}
else {
header("Location: index.php?e=false");
exit();
}
$stmt->close();
$stmt->free_result();
}
PHP:
public function changePassword($username, $old, $new, $newconfirm) {
$errorspass = array();
if(empty($old) || empty($new) || empty($newconfirm)) {
$errorspass[] = "<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>x</button><strong>Error!</strong> All fields must be filled in!</div>";
}
if(strlen($new) < 5 || strlen($new) > 20 || strlen($newconfirm) < 5 || strlen($newconfirm) > 20) {
$errorspass[] = "<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>x</button><strong>Error!</strong> Your password must be 5 to 20 characters in length!</div>";
}
if($this->checkPassword($username, $old) == false) {
$errorspass[] = "<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>x</button><strong>Error!</strong> The current password entered is invalid!</div>";
}
if($new != $newconfirm) {
$errorspass[] = "<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>x</button><strong>Error!</strong> The new password and the repeated password do not match!</div>";
}
if(count($errorspass) > 0) {
return $errorspass;
exit();
}
$stmt = $this->mysqli->prepare("UPDATE users SET password = ?");
$pw = $this->Encrypt($new);
$stmt->bind_param('s', $pw);
$stmt->execute();
$stmt->close();
$errorspass[] = "<div class='alert alert-success'><button type='button' class='close' data-dismiss='alert'>x</button><strong>Success!</strong> Your password has been successfully changed!</div>";
return $errorspass;
}
At this point it supports two languages (English & Dutch), you can make and edit content, change sliders (NiVo, Cru3er and GalleryView), make other users in staff panel, the installer is on 90% Still need to do the style.
I hope you like this topic, if you did, hit the button please. Any tips? Tell me so.
Exotical 'AkA' Wesley