diff --git a/.gitignore b/.gitignore index b1a2ad1..49adb33 100644 --- a/.gitignore +++ b/.gitignore @@ -117,7 +117,7 @@ Temporary Items # *.pdf ## Generated if empty string is given at "Please type another file name for output:" -projectplan.pdf +projectplan/projectplan.pdf ## Bibliography auxiliary files (bibtex/biblatex/biber): *.bbl diff --git a/projectplan/projectplan.pdf b/projectplan/projectplan.pdf deleted file mode 100644 index e41b19d..0000000 Binary files a/projectplan/projectplan.pdf and /dev/null differ diff --git a/projectplan/projectplan.tex b/projectplan/projectplan.tex index 42c6475..bcd0fce 100644 --- a/projectplan/projectplan.tex +++ b/projectplan/projectplan.tex @@ -14,6 +14,9 @@ \documentclass{uva-inf-article} \usepackage[dutch]{babel} \usepackage{enumitem} +\usepackage{pgfgantt} +\usepackage{pdflscape} +\usepackage{geometry} %------------------------------------------------------------------------------- % GEGEVENS VOOR IN DE TITEL @@ -173,6 +176,83 @@ Voor deze opdracht hebben we met 5 mensen 4 weken de tijd. %Zet de planning indien gewenst in een apart document %\input{planning} +\newgeometry{top=20mm, bottom=20mm, left=10mm, right=10mm} +\begin{landscape} +\section{Planning} +\begin{ganttchart}[ + vgrid, + hgrid, + x unit=1cm, + y unit title=.6cm, + y unit chart=.7cm, + group left peak width=.2, + group right peak width=.2 + ]{1}{21} + \gantttitle{MyHyvesBook+}{21} \ganttnewline + \gantttitle{Week 1}{5} + \gantttitle{Week 2}{5} + \gantttitle{Week 3}{5} + \gantttitle{Week 4}{5} \ganttnewline + \gantttitlelist{9,...,13}{1} + \gantttitlelist{16,...,20}{1} + \gantttitlelist{23,...,27}{1} + \gantttitlelist{30,31,1,2,3}{1} \ganttnewline + + \ganttbar{Inleiden}{1}{1} \ganttnewline + + \ganttlinkedgroup{Frontend}{2}{5} \ganttnewline + + \ganttbar{html/views}{2}{5} \ganttnewline + \ganttbar{css/styles}{2}{5} \ganttnewline + \ganttbar{javascript}{2}{5} \ganttnewline + \ganttmilestone{Week 1}{5} \ganttnewline + + \ganttlink[link mid=.833]{elem2}{elem5} + \ganttlink[link mid=.75]{elem3}{elem5} + \ganttlink[link mid=.5]{elem4}{elem5} + + \ganttlinkedgroup{Backend}{6}{10} \ganttnewline + + \ganttbar{Database/PhpMyAdmin}{6}{6} \ganttnewline + \ganttbar{SQL-queries/MySql}{7}{10} \ganttnewline + \ganttbar{Forms/php}{6}{10} \ganttnewline + \ganttbar{Livechat/AJAX, PHP}{6}{10} \ganttnewline + \ganttmilestone{Week 2}{10} \ganttnewline + + \ganttlink[link mid=.5]{elem7}{elem8} + \ganttlink[link mid=.833]{elem8}{elem11} + \ganttlink[link mid=.75]{elem9}{elem11} + \ganttlink[link mid=.5]{elem10}{elem11} + + \ganttbar{Beveiliging/testen}{6}{15} \ganttnewline + + \ganttgroup{Gebruiksvriendleijk}{11}{15} \ganttnewline + \ganttbar{Mobileformaat}{11}{15} \ganttnewline + \ganttbar{Restyle}{11}{15} \ganttnewline + \ganttbar{Extra's}{11}{15} \ganttnewline + \ganttbar{Code opschonen}{14}{15} \ganttnewline + + \ganttmilestone{Week 3}{15} \ganttnewline + \ganttlink[link mid=.75]{elem11}{elem13} + \ganttlink[link mid=.917]{elem12}{elem18} + \ganttlink[link mid=.875]{elem14}{elem18} + \ganttlink[link mid=.833]{elem15}{elem18} + \ganttlink[link mid=.75]{elem16}{elem18} + \ganttlink[link mid=.5]{elem17}{elem18} + + \ganttlinkedgroup{Afronding}{16}{20} \ganttnewline + \ganttbar{Rapport}{16}{20} \ganttnewline + \ganttbar{Documentatie}{16}{20} \ganttnewline + \ganttbar{Demo}{18}{20} \ganttnewline + + \ganttmilestone{Finshed!}{20} + \ganttlink[link mid=.833]{elem20}{elem23} + \ganttlink[link mid=.75]{elem21}{elem23} + \ganttlink[link mid=.5]{elem22}{elem23} + +\end{ganttchart} +\end{landscape} + %------------------------------------------------------------------------------- % BIJLAGEN EN EINDE diff --git a/website/public/login.php b/website/public/login.php index e20c204..82570a6 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -1,7 +1,9 @@
diff --git a/website/public/register.php b/website/public/register.php index 1d65102..2299cf0 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -3,6 +3,7 @@ @@ -10,8 +11,8 @@ session_start(); // define variables and set to empty values - $name = $surname = $bday = $username = $password = $confirmpassword = $streetname = $housenumber = $email = ""; - $genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $streetnameErr = $housenumberErr = $emailErr = ""; + $name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = ""; + $genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = ""; $correct = true; // Saves information of filling in the form @@ -35,8 +36,8 @@ $password = $_POST["password"]; } - if (isset($_POST["streetname"])) { - $streetname = $_POST["streetname"]; + if (isset($_POST["location"])) { + $location = $_POST["location"]; } if (isset($_POST["housenumber"])) { @@ -87,6 +88,10 @@ $usernameErr = "Gebruikersnaam moet minstens 6 karakters bevatten"; $correct = false; + } else if (getExistingUsername() == 1){ + $usernameErr = "Gebruikersnaam bestaat al"; + $correct = false; + } } @@ -108,30 +113,24 @@ } - if ($_POST["password"]!= $_POST["confirmpassword"]) { + if ($_POST["password"] != $_POST["confirmpassword"]) { $confirmpasswordErr = "Wachtwoorden matchen niet"; $correct = false; } - if (empty($_POST["streetname"])) { - $streetnameErr = "Straatnaam is verplicht!"; + if (empty($_POST["location"])) { + $locationErr = "Straatnaam is verplicht!"; $correct = false; } else { - if (!preg_match("/^[a-zA-Z ]*$/",$streetname)) { - $streetnameErr = "Alleen letters en spaties zijn toegestaan!"; + if (!preg_match("/^[a-zA-Z ]*$/",$location)) { + $locationErr = "Alleen letters en spaties zijn toegestaan!"; $correct = false; } } - if (empty($_POST["housenumber"])) { - $housenumberErr = "Huisnummer is verplicht!"; - $correct = false; - - } - if (empty($_POST["email"])) { $emailErr = "Email is verplicht!"; $correct = false; @@ -140,6 +139,11 @@ if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Geldige email invullen!"; $correct = false; + + } else if (getExistingEmail() == 1){ + $emailErr = "Email bestaat al"; + $correct = false; + } } @@ -148,48 +152,9 @@ $genericErr = "Bepaalde velden zijn verkeerd of niet ingevuld!"; } else { - $servername = "agile136.science.uva.nl"; - $username = "mhbp"; - $password = "qdtboXhCHJyL2szC"; + registerAccount(); + header("location: login.php"); - // Creates connection - $conn = new mysqli($servername, $username, $password); - - // Checks connection - if ($conn->connect_error) { - die("Connection failed: " . $conn->connect_error); - } - - // Query for inserting all the data in the database - $sql = "INSERT INTO - VALUES ($name, $surname, $bday, $username, $password, - $confirmpassword, $streetname, $housenumber, $email)"; - - // Checks if able to insert into database - if (mysqli_query($conn, $sql)) { - echo "New record created successfully"; - } else { - echo "Error: " . $sql . "