diff --git a/.gitignore b/.gitignore index 49adb33..9479d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - +.idea/* # User-specific stuff: .idea/workspace.xml .idea/tasks.xml diff --git a/website/.htaccess b/website/.htaccess new file mode 100644 index 0000000..5c0147b --- /dev/null +++ b/website/.htaccess @@ -0,0 +1,14 @@ +Options +FollowSymLinks +RewriteEngine On + +ErrorDocument 404 /error404.jpg + +RewriteCond %{SCRIPT_FILENAME} !-d +RewriteCond %{SCRIPT_FILENAME} !-f + +# Resolve .php file for extensionless php urls +RewriteRule ^([^/.]+)$ $1.php [L] + +RewriteRule ^([^/.]+)\/$ $1.php [L] + +RewriteRule ^profile/([A-z0-9]+)\/?$ profile.php?username=$1 [NC] \ No newline at end of file diff --git a/website/public/API/loadMessages.php b/website/public/API/loadMessages.php new file mode 100644 index 0000000..fef9db7 --- /dev/null +++ b/website/public/API/loadMessages.php @@ -0,0 +1,13 @@ + $unix_date) { + $difference = $now - $unix_date; + $tense = "geleden"; + } else { + $difference = $unix_date - $now; + $tense = "vanaf nu"; + } + + for($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; $i++) { + $difference /= $lengths[$i]; + } + + $difference = round($difference); + + if($difference != 1) { + $period = $multiple_periods[$i]; + } else { + $period = $single_periods[$i]; + } + + return "$difference $period $tense"; +} + +if(empty($_GET["username"])) { + echo "User does not exist!"; + return; +} + +$userID = getUserID($_GET["username"]); + +$user = selectUser($userID); +$profile_friends = selectAllFriends($userID); +$profile_groups = selectAllUserGroups($userID); +$posts = selectAllUserPosts($userID); + +?> + diff --git a/website/public/settings.php b/website/public/settings.php index 2f91690..45e50d8 100644 --- a/website/public/settings.php +++ b/website/public/settings.php @@ -14,6 +14,7 @@ "settings-message-angry", - "message" => "Deze functie werkt nog niet :(" - ); + $result = changeEmail(); break; case "picture": - $result = array ( - "type" => "settings-message-angry", - "message" => "Deze functie werkt nog niet :(" - ); + $result = $notImplemented; break; } } diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index 8f486bb..e2fa7c9 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -88,4 +88,9 @@ padding: 5px 10px; border-radius: 0 10px 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +.active-friend-chat { + background: aquamarine; + color: #333; } \ No newline at end of file diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index 45163de..6cdae65 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -30,9 +30,14 @@ cursor: pointer; } +.friend-item:hover { + background: #845663; + color: white; +} + .menu button { background: none; - color: #333; + color: inherit; width: 100%; height: 100%; padding: 0; diff --git a/website/public/template_sql.php b/website/public/template_sql.php index b918f6a..ed4ff99 100644 --- a/website/public/template_sql.php +++ b/website/public/template_sql.php @@ -7,7 +7,7 @@ include_once("../queries/connect.php"); include_once("../queries/friendship.php"); -$friends = selectAllFriends($db, 666); +$friends = selectAllFriends(666); while($friend = $friends->fetch(PDO::FETCH_ASSOC)) { echo $friend['username'].' '.$friend['onlinestatus'] . "
"; } diff --git a/website/queries/friendship.php b/website/queries/friendship.php index dc7a669..258699f 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -1,26 +1,31 @@ query(" - SELECT - `user`.`userID`, - `user`.`username`, - `user`.`profilepicture`, - `user`.`onlinestatus`, - `user`.`role` - FROM - `user` - INNER JOIN - `friendship` - WHERE - `friendship`.`user1ID` = $userID AND - `friendship`.`user2ID` = `user`.`userID` OR - `friendship`.`user2ID` = $userID AND - `friendship`.`user1ID` = `user`.`userID` AND - `user`.`role` != 3 +function selectAllFriends($userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `userID`, + `username`, + IFNULL( + `profilepicture`, + '../img/notbad.jpg' + ) AS profilepicture, + `onlinestatus`, + `role` + FROM + `user` + INNER JOIN + `friendship` + WHERE + (`friendship`.`user1ID` = :userID AND + `friendship`.`user2ID` = `user`.`userID` OR + `friendship`.`user2ID` = :userID AND + `friendship`.`user1ID` = `user`.`userID`) AND + `role` != 5 AND + `status` = 1 "); -} + $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->execute(); - -?> \ No newline at end of file + return $stmt; +} \ No newline at end of file diff --git a/website/queries/group_member.php b/website/queries/group_member.php index 824a33b..f8a9002 100644 --- a/website/queries/group_member.php +++ b/website/queries/group_member.php @@ -1,7 +1,7 @@ query(" +function selectAllGroupsFromUser($userID) { + return $GLOBALS["db"]->query(" SELECT `group_page`.`name`, `group_page`.`picture` @@ -15,7 +15,3 @@ function selectAllGroupsFromUser($db, $userID) { `group_page`.`status` != 0 "); } - - - -?> \ No newline at end of file diff --git a/website/queries/group_page.php b/website/queries/group_page.php index c6db01b..6763e3f 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -1,7 +1,7 @@ query(" +function selectGroupById($groupID) { + return $GLOBALS["db"]->query(" SELECT `group_page`.`name`, `group_page`.`picture`, @@ -15,8 +15,8 @@ function selectGroupById($db, $groupID) { "); } -function select20GroupsFromN($db, $n) { - return $db->query(" +function select20GroupsFromN($n) { + return $GLOBALS["db"]->query(" SELECT `group_page`.`groupID`, `group_page`.`name`, @@ -33,8 +33,8 @@ function select20GroupsFromN($db, $n) { "); } -function select20GroupsByStatusFromN($db, $n, $status) { - return $db->query(" +function select20GroupsByStatusFromN($n, $status) { + return $GLOBALS["db"]->query(" SELECT `group_page`.`groupID`, `group_page`.`name`, @@ -53,8 +53,8 @@ function select20GroupsByStatusFromN($db, $n, $status) { "); } -function search20GroupsFromNByStatus($db, $n, $keyword, $status) { - $q = $db->prepare(" +function search20GroupsFromNByStatus($n, $keyword, $status) { + $q = $GLOBALS["db"]->prepare(" SELECT `groupID`, `name`, @@ -80,8 +80,8 @@ function search20GroupsFromNByStatus($db, $n, $keyword, $status) { return $q; } -function changeGroupStatusByID($db, $id, $status) { - $q = $db->query(" +function changeGroupStatusByID($id, $status) { + $q = $GLOBALS["db"]->query(" UPDATE `group_page` SET @@ -92,8 +92,3 @@ function changeGroupStatusByID($db, $id, $status) { return $q; } - - - - -?> diff --git a/website/queries/header.php b/website/queries/header.php new file mode 100644 index 0000000..e6bc8ac --- /dev/null +++ b/website/queries/header.php @@ -0,0 +1,21 @@ +prepare(" + SELECT + `fname`, + `lname`, + IFNULL( + `profilepicture`, + 'img/notbad.jpg' + ) AS profilepicture + FROM + `user` + WHERE + `userID` = :userID + "); + + $stmt->bindParam(":userID", $_SESSION["userID"]); + $stmt->execute(); + + return $stmt->fetch(); +} diff --git a/website/queries/login.php b/website/queries/login.php index 50dfc9e..180b431 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -15,5 +15,3 @@ function getUser() { $stmt->execute(); return $stmt->fetch(PDO::FETCH_ASSOC); } - -?> diff --git a/website/queries/private_message.php b/website/queries/private_message.php index 2d953c5..46c21a3 100644 --- a/website/queries/private_message.php +++ b/website/queries/private_message.php @@ -1,14 +1,9 @@ prepare(" + $stmt = $GLOBALS["db"]->prepare(" SELECT * FROM @@ -31,8 +26,7 @@ function getOldChatMessages($user2ID) { } function sendMessage($destination, $content) { - $db = $GLOBALS["db"]; - $stmt = $db->prepare(" + $stmt = $GLOBALS["db"]->prepare(" INSERT INTO `private_message` ( @@ -56,10 +50,7 @@ function sendMessage($destination, $content) { } function getNewChatMessages($lastID, $destination) { - $db = $GLOBALS["db"]; - $origin = $_SESSION["userID"]; - - $stmt = $db->prepare(" + $stmt = $GLOBALS["db"]->prepare(" SELECT * FROM @@ -75,11 +66,11 @@ function getNewChatMessages($lastID, $destination) { `messageID` ASC "); - $stmt->bindParam(':user1', $origin); + $stmt->bindParam(':user1', $_SESSION["userID"]); $stmt->bindParam(':user2', $destination); $stmt->bindParam(':lastID', $lastID); $stmt->execute(); return json_encode($stmt->fetchAll()); -} \ No newline at end of file +} diff --git a/website/queries/settings.php b/website/queries/settings.php index c59ff7f..7c92583 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -1,5 +1,42 @@ message = $message; + switch ($type) { + case "happy": + $this->class = "settings-message-happy"; + break; + case "angry": + $this->class = "settings-message-angry"; + break; + default: + $this->class = "settings-message"; + break; + } + } + + public function getClass() { + return $this->class; + } + + public function getMessage() { + return $this->message; + } +} + +/** + * Gets the settings form the database. + * @return mixed Setting as an array. + */ function getSettings() { $stmt = $GLOBALS["db"]->prepare(" SELECT @@ -59,40 +96,28 @@ function updateSettings() { $stmt->execute(); - return array ( - "type" => "settings-message-happy", - "message" => "Instellingen zijn opgeslagen." - ); + return new settingsMessage("happy", "Instellingen zijn opgeslagen."); } function updatePassword() { $user = getPasswordHash(); - if (password_verify($_POST["password-old"].strtolower($user["username"]), $user["password"])) { + if (password_verify($_POST["password-old"], $user["password"])) { if ($_POST["password-new"] == $_POST["password-confirm"] && (strlen($_POST["password-new"]) >= 8)) { - if (changePassword($user)) { - return array ("type" => "settings-message-happy", - "message" => "Wachtwoord gewijzigd."); + if (changePassword()) { + return new settingsMessage("happy", "Wachtwoord gewijzigd."); } else { - return array ( - "type" => "settings-message-angry", - "message" => "Er is iets mis gegaan."); + return new settingsMessage("angry", "Er is iets mis gegaan."); } } else { - return array ( - "type" => "settings-message-angry", - "message" => "Wachtwoorden komen niet oveeen." - ); + return new settingsMessage("angry", "Wachtwoorden komen niet oveen."); } } else { - return array( - "type" => "settings-message-angry", - "message" => "Oud wachtwoord niet correct." - ); + return new settingsMessage("angry", "Oud wachtwoord niet correct."); } } -function changePassword($user) { - $stmt =$GLOBALS["db"]->prepare(" +function changePassword() { + $stmt = $GLOBALS["db"]->prepare(" UPDATE `user` SET @@ -101,9 +126,62 @@ function changePassword($user) { `userID` = :userID "); - $hashed_password = password_hash($_POST["password-new"].strtolower($user["username"]), PASSWORD_DEFAULT); + $hashed_password = password_hash($_POST["password-new"], PASSWORD_DEFAULT); $stmt->bindParam(":new_password", $hashed_password); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); return $stmt->rowCount(); +} + +function changeEmail() { + + if ($_POST["email"] == $_POST["email-confirm"]) { + $email = strtolower($_POST["email"]); + if (filter_var($email, FILTER_VALIDATE_EMAIL)) { + //check if email exists + if (emailIsAvailableInDatabase($email)) { + if (doChangeEmail($email)) { + return new settingsMessage("happy", "Emailadres is veranderd."); + } else { + return new settingsMessage("angry", "Er is iets mis gegaan."); + } + } else { + return new settingsMessage("angry", "Emailadres bestaat al."); + } + } else { + return new settingsMessage("angry", "Geef een geldig emailadres."); + } + } else { + return new settingsMessage("angry", "Emailadressen komen niet overeen."); + } +} + +function emailIsAvailableInDatabase($email) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `email` + FROM + `user` + WHERE + `email` = :email + "); + + $stmt->bindParam(":email", $email); + $stmt->execute(); + return !$stmt->rowCount(); +} + +function doChangeEmail($email) { + $stmt = $GLOBALS["db"]->prepare(" + UPDATE + `user` + SET + `email` = :email + WHERE + `userID` = :userID + "); + $stmt->bindParam(":email", $email); + $stmt->bindParam(":userID", $_SESSION["userID"]); + $stmt->execute(); + return $stmt->rowCount(); } \ No newline at end of file diff --git a/website/queries/user.php b/website/queries/user.php index bfd9579..446c6a9 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -1,7 +1,93 @@ query(" +function getUserID($username) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `userID` + FROM + `user` + WHERE + LOWER(`username`) = LOWER(:username) + "); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->execute(); + return $stmt->fetch()["userID"]; +} + +function selectUser($userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `username`, + IFNULL( + `profilepicture`, + '../img/notbad.jpg' + ) AS profilepicture, + `bio`, + `role`, + `onlinestatus`, + `loggedin`, + `fname`, + `lname` + FROM + `user` + WHERE + `userID` = :userID + "); + + $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->execute(); + return $stmt->fetch(); +} + +function selectAllUserGroups($userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `group_page`.`groupID`, + `name`, + `picture`, + `userID` + FROM + `group_page` + INNER JOIN + `group_member` + ON + `group_page`.`groupID` = `group_member`.`groupID` + WHERE + `userID` = :userID AND + `role` = 1 + "); + + $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->execute(); + return $stmt; +} + +function selectAllUserPosts($userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `postID`, + `author`, + `title`, + `content`, + `creationdate` + FROM + `post` + WHERE + `author` = :userID AND + `groupID` IS NULL + ORDER BY + `creationdate` DESC + "); + + $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->execute(); + return $stmt; +} + +function select20UsersFromN($n) { + return $GLOBALS["db"]->query(" SELECT `userID`, `username`, @@ -17,8 +103,8 @@ function select20UsersFromN($db, $n) { "); } -function search20UsersFromN($db, $n, $keyword) { - $q = $db->prepare(" +function search20UsersFromN($n, $keyword) { + $q = $GLOBALS["db"]->prepare(" SELECT `userID`, `username`, @@ -41,8 +127,8 @@ function search20UsersFromN($db, $n, $keyword) { return $q; } -function search20UsersFromNByStatus($db, $n, $keyword, $status) { - $q = $db->prepare(" +function search20UsersFromNByStatus($n, $keyword, $status) { + $q = $GLOBALS["db"]->prepare(" SELECT `userID`, `username`, @@ -69,8 +155,8 @@ function search20UsersFromNByStatus($db, $n, $keyword, $status) { return $q; } -function changeUserStatusByID($db, $id, $status) { - $q = $db->query(" +function changeUserStatusByID($id, $status) { + $q = $GLOBALS["db"]->query(" UPDATE `user` SET diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 5a3ba97..c98c051 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -61,9 +61,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { } if (!empty($_POST["actions"]) && !empty($_POST["userID"])) { - changeUserStatusByID($db, $_POST["userID"], $_POST["actions"]); + changeUserStatusByID($_POST["userID"], $_POST["actions"]); } elseif (!empty($_POST["actions"]) && !empty($_POST["groupID"])) { - changeGroupStatusByID($db, $_POST["groupID"], $_POST["actions"]); + changeGroupStatusByID($_POST["groupID"], $_POST["actions"]); } } @@ -183,7 +183,7 @@ function test_input($data) { fetch(PDO::FETCH_ASSOC)) { $userID = $user['userID']; @@ -218,7 +218,7 @@ function test_input($data) { "); } } else { - $q = search20GroupsFromNByStatus($db, $listnr, $search, $groupstatus); + $q = search20GroupsFromNByStatus($listnr, $search, $groupstatus); while ($group = $q->fetch(PDO::FETCH_ASSOC)) { $groupID = $group['groupID']; diff --git a/website/views/chat-view.php b/website/views/chat-view.php index a3acd4c..09b52ca 100644 --- a/website/views/chat-view.php +++ b/website/views/chat-view.php @@ -6,11 +6,8 @@ +
  • PF $username @@ -38,12 +35,6 @@ } ?> - - - - - -
    @@ -74,7 +65,7 @@ diff --git a/website/views/head.php b/website/views/head.php index 7d701f5..d9a985a 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -18,3 +18,7 @@ include_once("../queries/connect.php"); session_start(); + +if(!isset($_SESSION["userID"])){ + header("location:login.php"); +} \ No newline at end of file diff --git a/website/views/header.php b/website/views/header.php index dd8f980..a58e5f0 100644 --- a/website/views/header.php +++ b/website/views/header.php @@ -1,3 +1,8 @@ +
    - + "/>
    diff --git a/website/views/menu.php b/website/views/menu.php index 731b284..775c76a 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -9,11 +9,8 @@ // Load file. include_once("../queries/friendship.php"); - if (empty($_SESSION["userID"])) - $_SESSION["userID"] = 2; - // Get all the friends of a user. - $friends = selectAllFriends($db, $_SESSION["userID"]); + $friends = selectAllFriends($_SESSION["userID"]); $i = 0; // Print all the users. @@ -69,7 +66,7 @@ include_once("../queries/group_member.php"); // Get all the friends of a user. - $groups = selectAllGroupsFromUser($db, $_SESSION["userID"]); + $groups = selectAllGroupsFromUser($_SESSION["userID"]); $i = 0; // Print all the users. diff --git a/website/views/profile.php b/website/views/profile.php index 8f5efe2..6c273a6 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -1,113 +1,56 @@
    - + ">

    Als vriend toevoegen

    -

    [gebruikersnaam]

    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dictum turpis quam, eu ultrices sapien hendrerit tincidunt. Nunc aliquam neque turpis, id porta quam iaculis id. Sed suscipit, nisl a fermentum congue, nunc augue finibus lectus, id varius nunc purus nec dolor. Integer laoreet tellus sit amet sapien auctor congue. Mauris laoreet eu elit vel rhoncus. Nam et tortor arcu. Maecenas sit amet leo quis tellus varius gravida. Sed quis fermentum odio, sed dictum nulla. Donec aliquam rutrum orci cursus tempus. Quisque sit amet ipsum eget velit aliquam facilisis ultricies quis ligula. Nunc nisi lacus, luctus non bibendum quis, sagittis sit amet odio.

    +

    ()

    +

    Vrienden

    - [gebruikersnaam]'s profielfoto - [gebruikersnaam]'s profielfoto - [gebruikersnaam]'s profielfoto - [gebruikersnaam]'s profielfoto - [gebruikersnaam]'s profielfoto - ...en nog 25 anderen! + fetch()) { + echo "${friend["username"]}"; + } + + + if($friends->rowCount() === 0) { + echo "

    Deze gebruiker heeft nog geen vrienden gemaakt.

    "; + } + ?>

    Groepen

    - [groepsnaam]'s logo - [groepsnaam]'s logo - [groepsnaam]'s logo - [groepsnaam]'s logo - [groepsnaam]'s logo - ...en nog 6 anderen! + fetch()) { + echo "${group["name"]}s logo"; + } + + if($groups->rowCount() === 0) { + echo "

    Deze gebruiker is nog geen lid van een groep.

    "; + } + ?>

    -
    -

    Lorem

    -

    Lorem ipsum dolor sit amet, consectetur.

    -

    Enkele minuten geleden geplaatst

    -
    -
    -

    Image

    - Olympic Mountains, Washington -

    Gisteren geplaatst

    -
    -
    -

    Ipsum

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem nihil alias amet dolores fuga totam sequi a cupiditate ipsa voluptas id facilis nobis.

    -

    Maandag geplaatst

    -
    -
    -

    Dolor

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit.

    -

    4 Januari geplaatst

    -
    -
    -

    Sit

    -

    Lorem ipsum dolor sit.

    -

    4 Januari geplaatst

    -
    -
    -

    Image

    - Nunobiki Falls, Kobe Japan -

    4 Januari geplaatst

    -
    -
    -

    Amet

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima asperiores eveniet vero velit eligendi aliquid in.

    -

    4 Januari geplaatst

    -
    -
    -

    Consectetur

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error aliquid reprehenderit expedita odio beatae est.

    -

    4 Januari geplaatst

    -
    -
    -

    Adipisicing

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat architecto quis tenetur fugiat veniam iste molestiae fuga labore!

    -

    4 Januari geplaatst

    -
    -
    -

    Elit

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem ut debitis dolorum earum expedita eveniet voluptatem quibusdam facere eos numquam commodi ad iusto laboriosam rerum aliquam.

    -

    4 Januari geplaatst

    -
    -
    -

    Geen error

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus dolorem maxime minima animi cum.

    -

    4 Januari geplaatst

    -
    -
    -

    Image

    - Oregon cliffs are no joke. -

    4 Januari geplaatst

    -
    -
    -

    Aliquid

    -

    Lorem ipsum dolor sit amet, consectetur.

    -

    4 Januari geplaatst

    -
    -
    -

    Odit

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit accusamus tempore at porro officia rerum est impedit ea ipsa tenetur. Labore libero hic error sunt laborum expedita.

    -

    4 Januari geplaatst

    -
    -
    -

    Accusamus

    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis quaerat suscipit ad.

    -

    4 Januari geplaatst

    -
    + fetch()) { + $nicetime = nicetime($post["creationdate"]); + echo " +
    +

    ${post["title"]}

    +

    ${post["content"]}

    +

    ${nicetime} geplaatst.

    +
    + "; + } + ?>
    -
    \ No newline at end of file diff --git a/website/views/settings-view.php b/website/views/settings-view.php index ab6161e..6d9d660 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -6,9 +6,9 @@ $settings = getSettings();
    - ${result["message"]} -
    "; + echo "
    ". + $result->getMessage(). + "
    "; } ?>