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/mysql_config.xml b/website/mysql_config.xml deleted file mode 100644 index de2d929..0000000 --- a/website/mysql_config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - localhost - myhyvesbookplus - mhbp - qdtboXhCHJyL2szC - \ No newline at end of file diff --git a/website/public/loadMessages.php b/website/public/API/loadMessages.php similarity index 64% rename from website/public/loadMessages.php rename to website/public/API/loadMessages.php index fb9f129..fef9db7 100644 --- a/website/public/loadMessages.php +++ b/website/public/API/loadMessages.php @@ -1,6 +1,8 @@ @@ -15,19 +15,19 @@ // Trying to login if ($_SERVER["REQUEST_METHOD"] == "POST") { - $uname=strtolower($_POST["uname"]); // Empty username or password field if (empty($_POST["uname"]) || empty($_POST["psw"])) { $loginErr = "Gebruikersnaam of wachtwoord is niet ingevuld"; } else { - $psw=$_POST["psw"]; - $hash=hashPassword()["password"]; - $userid=hashPassword()["userID"]; + $uname = strtolower(test_input($_POST["uname"])); + $psw = test_input($_POST["psw"]); + $hash = getUser()["password"]; + $userid = getUser()["userID"]; // If there's an account, go to the profile page - if(password_verify($psw.$uname, $hash)) { + if(password_verify($psw, $hash)) { $_SESSION["userID"] = $userid; header("location: profile.php"); diff --git a/website/public/logout.php b/website/public/logout.php new file mode 100644 index 0000000..6a2ba5d --- /dev/null +++ b/website/public/logout.php @@ -0,0 +1,15 @@ + + + + + + + diff --git a/website/public/register.php b/website/public/register.php index 2299cf0..66d1454 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -2,9 +2,9 @@ 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/index.css b/website/public/styles/index.css index c7d482f..c551fd1 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -1,22 +1,6 @@ -::selection { - background: #845663; - color: white; -} - -::-moz-selection { - background: #845663; - color: white; -} - -a, a:link, a:visited, a:hover, a:active { - color: inherit; - text-decoration: none; -} - a.button { - background-color: #845663; - border: 2px solid black; - border-radius: 12px; + background-color: #405550; + border-radius: 10px; color: white; cursor: pointer; height: 50%; @@ -27,64 +11,19 @@ a.button { font-size: 16px; } -a[data-title]:hover:after, img[data-title]:hover:after, span[data-title]:hover:after, -div[data-title]:hover:after{ - content: attr(data-title); - padding: 4px 4px; - color: #FFFFFF; - position: absolute; - left: 0; - top: 100%; - z-index: 20; - white-space: nowrap; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - -moz-box-shadow: 0px 0px 4px #222; - -webkit-box-shadow: 0px 0px 4px #222; - box-shadow: 0px 0px 4px #222; - background-color: #333; - font-size: 15px; - line-height: normal; - font-family: Arial, sans-serif; -} - -/* Add Zoom Animation */ -.animate { - animation: animatezoom 0.6s - -webkit-animation: animatezoom 0.6s; -} - /* Body */ body { height: 900px; - - background-image: url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTEnqKdVtLbxjKuNsCSCxFRhTOpp3Gm0gsU8bMgA_MeUYyzrUFy); + background-color: #C8CABD; + /*background-image: url(http://play.pokemonshowdown.com/fx/client-bg-shaymin.jpg); background-size: cover; - background-repeat: repeat-x; - background-attachment: fixed; + background-attachment: fixed;*/ /*background-color: #B78996;*/ color: #333; - font-family: Arial, sans-serif; } -/* stijl voor alle buttons */ -button { - background-color: #845663; - border: 2px solid black; - border-radius: 12px; - color: white; - cursor: pointer; - height: 50%; - margin: 8px 0; - padding: 14px 20px; - width: 25%; - font-family: Arial; - font-size: 16px; -} - /* The Close Button */ .close { /* Position it in the top right corner outside of the modal */ @@ -106,20 +45,18 @@ button { /* inlogform */ form { /*background-color: #a87a87;*/ - border: 5px solid #325da3; - background-color: #a87a87; border-radius: 12px; - height: 55%; - margin: 35px auto; - width: 45%; + height: 75%; + margin: 10px auto; + width: 70%; overflow-y:auto; } /* inlog titel */ h1 { - padding: 16px; + padding: 8px; text-align: center; - font-size: 2.2em; + font-size: 1.5em; } /* registreer titel*/ @@ -130,30 +67,34 @@ h2 { } input[type=text], input[type=password], input[type=email], input[type="date"] { - border-radius: 12px; - border: 5px solid #ccc; box-sizing: border-box; + border-color: #C8CABD; display: inline-block; height: 50%; padding: 8px 20px; margin: 4px 0; width: 50%; - font-family: Arial; - font-size: 16px; } +/* +input[type=text], input[type=password], input[type=email], input[type="date"] { + border: 0px; + border-bottom: 4px solid lightgray; + border-radius: 0px; +}*/ button[type=submit] { - background-color: #845663; - border: 2px solid black; - border-radius: 12px; - color: white; + background-color: #C8CABD; + color: black ; cursor: pointer; - height: 50%; - margin: 8px 0; - padding: 14px 20px; - width: 50%; font-family: Arial; font-size: 16px; + width: 50%; +} + +.error { + font-family: Arial; + font-size: 15px; + color: red; } label { @@ -179,52 +120,31 @@ label { color: red; } -/* The Modal (background) */ -.modal { - background-color: rgb(0,0,0); /* Fallback color */ - background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ - display: none; /* Hidden by default */ - height: 100%; - left: 0; - margin: auto; - overflow: auto; /* Enable scroll if needed */ - padding-top: 60px; - position: fixed; /* Stay in place */ - top: 0; - width: 100%; /* Full width */ - z-index: 1; /* Sit on top */ -} - -/* Modal Content/Box */ -.modal-content { - background-color: #B78996; - border: 5px solid #325da3; - margin: 5px auto; /* 15% from the top and centered */ - overflow-y: auto; - width: 40%; /* Could be more or less, depending on screen size */ - height: 60%; - -} - @keyframes animatezoom { from {transform: scale(0)} to {transform: scale(1)} } -/* datepicker */ -select { - border-radius: 12px; - border: 5px solid #ccc; - box-sizing: border-box; - display: inline-block; - height: 50%; - padding: 12px 20px; - margin: 8px 0; - width: 18%; - font-family: Arial; - font-size: 16px; +/* White boxes (squares) */ +.platform { + background-color: #FFFFFF; + /*background-image: url(http://www.planwallpaper.com/static/images/518071-background-hd_xO1TwRc.jpg); + background-size: cover; + background-repeat: repeat-x; + background-attachment: fixed;*/ + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + height: 53%; + margin: 34px auto; + overflow-y: auto; + padding: 20px; + width: 35%; } +/*.platform { + width: 40%; + margin: 34px auto; +}*/ + @-webkit-keyframes animatezoom { from {-webkit-transform: scale(0)} to {-webkit-transform: scale(1)} 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/checkInput.php b/website/queries/checkInput.php new file mode 100644 index 0000000..d48e4e0 --- /dev/null +++ b/website/queries/checkInput.php @@ -0,0 +1,95 @@ + diff --git a/website/queries/friendship.php b/website/queries/friendship.php index f13fed5..258699f 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -1,9 +1,9 @@ prepare(" SELECT + `userID`, `username`, IFNULL( `profilepicture`, 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 index 5e78291..e6bc8ac 100644 --- a/website/queries/header.php +++ b/website/queries/header.php @@ -2,16 +2,20 @@ function getHeaderInfo() { $stmt = $GLOBALS["db"]->prepare(" SELECT - `fname`, - `lname`, - `profilepicture` + `fname`, + `lname`, + IFNULL( + `profilepicture`, + 'img/notbad.jpg' + ) AS profilepicture FROM - `user` + `user` WHERE - `userID` = :userID + `userID` = :userID "); + $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); - return $stmt->fetch(); -} \ No newline at end of file + return $stmt->fetch(); +} diff --git a/website/queries/login.php b/website/queries/login.php index c710833..180b431 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -1,6 +1,6 @@ prepare(" SELECT `password`, @@ -15,5 +15,3 @@ function hashPassword() { $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/register.php b/website/queries/register.php index 893bb3a..4700e72 100644 --- a/website/queries/register.php +++ b/website/queries/register.php @@ -52,7 +52,7 @@ function registerAccount() { :email )"); - $hash=password_hash($_POST["password"].(strtolower($_POST["username"])), PASSWORD_DEFAULT); + $hash=password_hash($_POST["password"], PASSWORD_DEFAULT); $stmt->bindParam(":fname", $_POST["name"]); $stmt->bindParam(":lname", $_POST["surname"]); 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 c6e691a..446c6a9 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -86,8 +86,8 @@ function selectAllUserPosts($userID) { return $stmt; } -function select20UsersFromN($db, $n) { - return $db->query(" +function select20UsersFromN($n) { + return $GLOBALS["db"]->query(" SELECT `userID`, `username`, @@ -103,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`, @@ -127,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`, @@ -155,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 12877b6..a58e5f0 100644 --- a/website/views/header.php +++ b/website/views/header.php @@ -1,5 +1,4 @@
    - | + | |
    @@ -29,7 +28,7 @@ $userinfo = getHeaderInfo();
    Hallo
    - +
    "/>
    diff --git a/website/views/login-view.php b/website/views/login-view.php index df29cbc..33fa7e9 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -3,49 +3,49 @@ src="img/top-logo.png" alt="MyHyvesbook+">
    - - -
    " - return= $correct - method="post"> +

    Welkom bij MyHyvesbook+

    + + " + return= $correct + method="post"> - + + + + + + + + + + + + + - - - - - - - - - - - - - diff --git a/website/views/login_head.php b/website/views/login_head.php index 2283b7d..a41e87e 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -1,6 +1,9 @@ MyHyvesbook+ + diff --git a/website/views/menu.php b/website/views/menu.php index 83ebfc0..775c76a 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -9,9 +9,6 @@ // Load file. include_once("../queries/friendship.php"); - if (empty($_SESSION["userID"])) - $_SESSION["userID"] = 2; - // Get all the friends of a user. $friends = selectAllFriends($_SESSION["userID"]); $i = 0; @@ -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/register-view.php b/website/views/register-view.php index b7efbc8..b95dd81 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -4,132 +4,132 @@ alt="MyHyvesbook+">
    - -
    " - return= $correct - method="post"> -

    Registreer uw account

    +
    +

    Registreer uw account

    + + " + return= $correct + method="post"> - - + + - -