Skip to content

Commit

Permalink
last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
m-scha1337 committed Jan 19, 2019
1 parent 1cc643f commit a57552c
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function productAdd(){
->addInput("number", "stock", "In Stock", ["min"=>0, "max"=>1, "value"=>1])
->addInput("number", "baseprice", "Base Price", ["min"=>0])
->addTextarea("longDesc", "Long Description")
->addInput("text", "colour", "Colour Variants")
->addInput("text", "colour", "Colour Variants", ["placeholder"=>"Separate values with commas"])
->addInput("file", "img", "Product Image", ["accept"=>"image/*"])
->addButton("submit", "submit");
$data['form']=$form->output();
Expand Down
97 changes: 88 additions & 9 deletions ewear.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 14, 2018 at 04:17 AM
-- Generation Time: Jan 19, 2019 at 04:25 PM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9

Expand Down Expand Up @@ -41,8 +41,8 @@ CREATE TABLE `cart` (
--

INSERT INTO `cart` (`id`, `user_fs`, `data`) VALUES
(1, 3, ''),
(4, 17, '::{\"id\":\"3\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"null\"}::{\"id\":\"2\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"black\"}::{\"id\":\"1\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"black\"}::{\"id\":\"4\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"black\"}::{\"id\":\"5\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"red\"}::{\"id\":\"6\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"null\"}');
(1, 3, '::{\"id\":\"1\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"black\"}::{\"id\":\"2\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"black\"}'),
(4, 17, '');

-- --------------------------------------------------------

Expand All @@ -54,9 +54,43 @@ CREATE TABLE `orders` (
`id` int(11) NOT NULL,
`cart_data` text NOT NULL,
`user_fs` int(11) NOT NULL,
`created_at` int(11) NOT NULL
`address` text NOT NULL,
`created_at` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`uniqid` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`id`, `cart_data`, `user_fs`, `address`, `created_at`, `status`, `uniqid`) VALUES
(1, '::{\"id\":\"3\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"null\"}::{\"id\":\"1\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"black\"}', 3, '{\"Name\":\"Maximilian Michael Schaumann\",\"Address\":\"Vorgartenstrasse 122\\/4\\/455\",\"Postal_Code_(ZIP)\":\"1020 Wien\",\"Payment_Method\":\"Mastercard\"}', 1547847193, 5, '5c424619ad1c19.06099741'),
(2, '::{\"id\":\"17\",\"size\":\"M\",\"num\":\"1\",\"colour\":\"red\"}', 3, '{\"Name\":\"Maximilian Michael Schaumann\",\"Address\":\"Vorgartenstrasse 122\\/4\\/455\",\"Postal_Code_(ZIP)\":\"1020 Wien\",\"Payment_Method\":\"Mastercard\"}', 1547906110, 0, '5c432c3e638a97.03946926');

-- --------------------------------------------------------

--
-- Table structure for table `orderstatus`
--

CREATE TABLE `orderstatus` (
`id` int(11) NOT NULL,
`StatusName` varchar(50) NOT NULL,
`status_fs` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `orderstatus`
--

INSERT INTO `orderstatus` (`id`, `StatusName`, `status_fs`) VALUES
(1, 'Processing', 0),
(2, 'Delivered', 1),
(3, 'Delayed', 2),
(4, 'Awaiting Return', 3),
(5, 'Cancelled', 5);

-- --------------------------------------------------------

--
Expand Down Expand Up @@ -116,7 +150,34 @@ INSERT INTO `products` (`id`, `title`, `product_desc`, `product_desc_long`, `bas
(9, 'Cloak Cloud Beanie', 'These shoes are very amazing', 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Test2', 20, 'CLK-BEANIE-FRONT_600x.jpg', 1543524848, 0, '', 4),
(10, 'Orange Checkered Shirt', 'This shirt is very Orange', 'This shirt is quite Orange indeed! You\'ll find that with this shirt, Luck will always follow you the most. Except when it does not. Then that is your fault :c', 60, 'blue-blue-skies-blue-sky-1195548.jpg', 1544752770, 1, '', 5),
(11, 'Checkered Tee No.2', 'This Shirt is checkered', 'This Shirt does some extraordinary things. It keeps you warm during the cold, but keeps you cold during the warm. This seems like utter magic to me. You should definitely buy!', 20, 'brick-wall-casual-cool-769733.jpg', 1544752770, 1, '', 5),
(12, 'Pink Casual Linen', 'This Product is made of linen', 'With this product you don\'t only look great, but you will instantly develop some rad abs! Trust me, the model we tried it one was like 900 lbs before! This shirt truly is a great buy!', 50, 'abs-adult-casual-936011.jpg', 1544752770, 0, '', 5);
(12, 'Pink Casual Linen', 'This Product is made of linen', 'With this product you don\'t only look great, but you will instantly develop some rad abs! Trust me, the model we tried it one was like 900 lbs before! This shirt truly is a great buy!', 50, 'abs-adult-casual-936011.jpg', 1544752770, 0, '', 5),
(17, 'Iphone', 'Iphone', 'testtestt esttestte sttesttesttesttesttesttesttesttesttesttesttesttes ttesttesttesttesttesttes ttestte sttesttesttesttesttesttest', 500, 'zoidberg_by_blizz21-d4pq4d6alpha.png', 1547583419, 1, '{\"colour\":[\"red\",\" test\",\" poop\"]}', 1);

-- --------------------------------------------------------

--
-- Table structure for table `products_deleted`
--

CREATE TABLE `products_deleted` (
`id` int(11) NOT NULL,
`title` varchar(100) NOT NULL,
`product_desc` varchar(500) NOT NULL,
`product_desc_long` text NOT NULL,
`base_price` int(11) NOT NULL,
`image` varchar(200) NOT NULL,
`created_at` int(11) NOT NULL,
`in_stock` tinyint(1) NOT NULL,
`data` text NOT NULL,
`category_fs` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `products_deleted`
--

INSERT INTO `products_deleted` (`id`, `title`, `product_desc`, `product_desc_long`, `base_price`, `image`, `created_at`, `in_stock`, `data`, `category_fs`) VALUES
(18, 'Test Product 2', 'This product does things', 'This product does thingsThis product does thingsThis product does thingsThis product does thingsThis product does thingsThis product does thingsThis product does things', 200, 'commoditiesmarket.png', 1547911433, 1, '{\"colour\":[\"lilac\",\" pink\"]}', 1);

-- --------------------------------------------------------

Expand Down Expand Up @@ -164,7 +225,7 @@ CREATE TABLE `users` (

INSERT INTO `users` (`id`, `uname`, `email`, `data`, `roles_fs`, `hash`, `is_active`, `created_at`, `password`, `newsletter`, `locked`) VALUES
(3, 'admin', '[email protected]', '{\"name\":\"Maximilian Michael\",\"surname\":\"Schaumann\",\"address\":\"Vorgartenstrasse 122/4/455\",\"zip\":\"1020 Wien\"}', 2, '5c0049fb569bc', 1, 1543522811, '70bedd697110b90ba9c7a68b0e8b0b3a90a4f785:4209', 0, 0),
(17, 'fschaumann', '[email protected]', '{\"name\":\"Franziska\",\"surname\":\"Schaumann\",\"address\":\"\",\"zip\":\"\"}', 1, '5c0da13881f9c', 1, 1544397112, '840c031a7145834e48ad32963f344111c566aaaa:5257', 0, 0);
(17, 'fschaumann', '[email protected]', '{\"name\":\"Franziska\",\"surname\":\"Schaumann\",\"address\":\"\",\"zip\":\"\"}', 1, '5c0da13881f9c', 1, 1544397112, 'e6dfdee15ea4b7b22aab4c1acb2dddbfa749b0d8:3139', 0, 0);

--
-- Indexes for dumped tables
Expand All @@ -182,6 +243,12 @@ ALTER TABLE `cart`
ALTER TABLE `orders`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orderstatus`
--
ALTER TABLE `orderstatus`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `productcategory`
--
Expand All @@ -194,6 +261,12 @@ ALTER TABLE `productcategory`
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `products_deleted`
--
ALTER TABLE `products_deleted`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `roles`
--
Expand All @@ -220,7 +293,13 @@ ALTER TABLE `cart`
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `orderstatus`
--
ALTER TABLE `orderstatus`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `productcategory`
Expand All @@ -232,7 +311,7 @@ ALTER TABLE `productcategory`
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `roles`
Expand All @@ -244,7 +323,7 @@ ALTER TABLE `roles`
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
Expand Down
19 changes: 8 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!! bitte stellen sie sicher das beim zugriff auf das projekt, sämtliche $_SESSION's gelöscht wurden. Sollte dies nicht der fall sein und sie bekommen den fehler: "Fatal error: Uncaught Error: Call to a member function fetch_row() on boolean in C:\xampp\htdocs\ewear\app\Models\User.php:112", rufen sie bitte die logout methode indem sie die seite "localhost/ewear/logout" besuchen. Dies ist ein fehler der nur in einer entwickungsumgebung auftritt und beeinflusst das projekt nicht !!
$_Session Fehler wurde gefixt, $_Sessions von anderen projekten sollten nun gelöscht werden


um einen reibunglosen ablauf zu gewährleisten, ändern sie bitte in app->config->paths.php die konstante "APP_URL" so dass das root directory gleich dem projektnamen ist. Sollte der Projektname "ewear" sein, so sind keine änderungen notwendig. Sollte der Projektname "beispiel1" sein, so nennen sie bitte die konstante "http://localhost/beispiel1/"
Expand All @@ -11,17 +11,14 @@ usernames sind case sensitive

passwörter sind case sensitive

usernames sind in der datenbank unter der tabelle "users" zu finden. Der admin account hat die login daten username: admin, passwort: hallo123

nur user mit dem access level 2 haben zugriff zu administrativen funktionen

csrf methoden wurden geschrieben, jedoch für die entwicklung deaktiviert

admin account: admin (passwort: hallo123)
user account: fschaumann (passwort: hallo123)


Folgende aufgaben wurden leider nicht erfüllt:
-Das projekt ist nicht reponsive. Getestet wurde auf einem 1920x1080 monitor
-order cart ist nicht vorhanden
-/admin/OrderControl ist nicht vorhanden
Alle aufgaben wurden erfüllt

dennoch hoffe ich auf eine gute beurteilung!
Zusätzliche Aufgaben wurden erfüllt:
-Dem User wird im Warenkorb bzw. vorm Bestellabschluß ermöglicht eine alternative
Lieferadresse anzugeben.
-clientseitige Formularvalidierung

0 comments on commit a57552c

Please sign in to comment.