diff --git a/3b8192722b68986b1468b7a1dd2aaf32--jalapeno-pepper-farms.jpg b/3b8192722b68986b1468b7a1dd2aaf32--jalapeno-pepper-farms.jpg new file mode 100644 index 00000000..d88ee087 Binary files /dev/null and b/3b8192722b68986b1468b7a1dd2aaf32--jalapeno-pepper-farms.jpg differ diff --git a/What-Makes-Honey-And-Lemon-An-Effective-Cough-Remedy.jpg b/What-Makes-Honey-And-Lemon-An-Effective-Cough-Remedy.jpg new file mode 100644 index 00000000..7cfcfc70 Binary files /dev/null and b/What-Makes-Honey-And-Lemon-An-Effective-Cough-Remedy.jpg differ diff --git a/_pgbackup/homepage1_1503092701.html b/_pgbackup/homepage1_1503092701.html new file mode 100644 index 00000000..6bca9da8 --- /dev/null +++ b/_pgbackup/homepage1_1503092701.html @@ -0,0 +1,313 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+ + + +
+
+
+
+
+
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503092866.html b/_pgbackup/homepage1_1503092866.html new file mode 100644 index 00000000..1be09a20 --- /dev/null +++ b/_pgbackup/homepage1_1503092866.html @@ -0,0 +1,309 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+
+
+
+
+
+
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503099418.html b/_pgbackup/homepage1_1503099418.html new file mode 100644 index 00000000..18b178b0 --- /dev/null +++ b/_pgbackup/homepage1_1503099418.html @@ -0,0 +1,321 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+
+
+
+
+

Jan's Jams

+
+ +
+

Carl's Carrots

+
+ +
+

Hank's Honey

+
+ +
+

Paula's Peppers

+
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503099597.html b/_pgbackup/homepage1_1503099597.html new file mode 100644 index 00000000..c4cdfe59 --- /dev/null +++ b/_pgbackup/homepage1_1503099597.html @@ -0,0 +1,318 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+
+
+
+
+

Jan's Jams

+
+
+

Carl's Carrots

+
+
+

Hank's Honey

+
+
+

Paula's Peppers

+
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503099927.html b/_pgbackup/homepage1_1503099927.html new file mode 100644 index 00000000..11c29701 --- /dev/null +++ b/_pgbackup/homepage1_1503099927.html @@ -0,0 +1,342 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+
+

Featured Products

+
+

Jan's Jams

+ +
+
+

Carl's Carrots

+ +
+
+

Hank's Honey

+ +
+
+

Paula's Peppers

+ +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503101009.html b/_pgbackup/homepage1_1503101009.html new file mode 100644 index 00000000..4d0cefc4 --- /dev/null +++ b/_pgbackup/homepage1_1503101009.html @@ -0,0 +1,335 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+
+

Featured Products

+
+

Jan's Jelly

+ +
+
+

Carl's Carrots

+ +
+
+

Paula's Peppers

+ +
+
+

Hank's Honey

+ +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503102349.html b/_pgbackup/homepage1_1503102349.html new file mode 100644 index 00000000..1a724fe0 --- /dev/null +++ b/_pgbackup/homepage1_1503102349.html @@ -0,0 +1,339 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+
+

Featured Products

+
+

Jan's Jelly

+ +
+
+

Carl's Carrots

+ +
+
+

Paula's Peppers

+ +
+
+

Hank's Honey

+ +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503258757.html b/_pgbackup/homepage1_1503258757.html new file mode 100644 index 00000000..96763c21 --- /dev/null +++ b/_pgbackup/homepage1_1503258757.html @@ -0,0 +1,459 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+ + + + + +
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+ +
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+ + + + + + + + + + diff --git a/_pgbackup/homepage1_1503258849.html b/_pgbackup/homepage1_1503258849.html new file mode 100644 index 00000000..bad06e40 --- /dev/null +++ b/_pgbackup/homepage1_1503258849.html @@ -0,0 +1,447 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+ + + + + diff --git a/_pgbackup/homepage1_1503259117.html b/_pgbackup/homepage1_1503259117.html new file mode 100644 index 00000000..44006395 --- /dev/null +++ b/_pgbackup/homepage1_1503259117.html @@ -0,0 +1,447 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+ + + + + diff --git a/_pgbackup/homepage1_1503261031.html b/_pgbackup/homepage1_1503261031.html new file mode 100644 index 00000000..7b2e12b8 --- /dev/null +++ b/_pgbackup/homepage1_1503261031.html @@ -0,0 +1,589 @@ + + + + Veggie Connect + + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+ + + + +
+
    +
  • +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + DANNY TARGARYEN +
  • +
  • +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + JON SNOW +
  • +
  • +

    “Eat your veggies if yopu want to grow big anf strong.”

    + TYRION LANNISTER +
  • + +
+
+ + + + + + + + + diff --git a/_pgbackup/homepage1_1503261138.html b/_pgbackup/homepage1_1503261138.html new file mode 100644 index 00000000..a773642d --- /dev/null +++ b/_pgbackup/homepage1_1503261138.html @@ -0,0 +1,588 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+ +
+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if yopu want to grow big anf strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503261372.html b/_pgbackup/homepage1_1503261372.html new file mode 100644 index 00000000..8143c83e --- /dev/null +++ b/_pgbackup/homepage1_1503261372.html @@ -0,0 +1,588 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if yopu want to grow big anf strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503261667.html b/_pgbackup/homepage1_1503261667.html new file mode 100644 index 00000000..0383cb90 --- /dev/null +++ b/_pgbackup/homepage1_1503261667.html @@ -0,0 +1,588 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if yopu want to grow big anf strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503261726.html b/_pgbackup/homepage1_1503261726.html new file mode 100644 index 00000000..c013e20e --- /dev/null +++ b/_pgbackup/homepage1_1503261726.html @@ -0,0 +1,588 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503261814.html b/_pgbackup/homepage1_1503261814.html new file mode 100644 index 00000000..c013e20e --- /dev/null +++ b/_pgbackup/homepage1_1503261814.html @@ -0,0 +1,588 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503261937.html b/_pgbackup/homepage1_1503261937.html new file mode 100644 index 00000000..1db4bda2 --- /dev/null +++ b/_pgbackup/homepage1_1503261937.html @@ -0,0 +1,588 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + diff --git a/_pgbackup/homepage1_1503262272.html b/_pgbackup/homepage1_1503262272.html new file mode 100644 index 00000000..ed594822 --- /dev/null +++ b/_pgbackup/homepage1_1503262272.html @@ -0,0 +1,600 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + +
+

Chloe Adams and David Newton

+

Ad-Lister Project : 2017

+
+ + + + + diff --git a/_pgbackup/homepage1_1503262327.html b/_pgbackup/homepage1_1503262327.html new file mode 100644 index 00000000..0b64e431 --- /dev/null +++ b/_pgbackup/homepage1_1503262327.html @@ -0,0 +1,598 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+
+

Chloe Adams and David Newton

+

Ad-Lister Project : 2017

+
+ + + + + diff --git a/_pgbackup/homepage1_1503263089.html b/_pgbackup/homepage1_1503263089.html new file mode 100644 index 00000000..3b741ec8 --- /dev/null +++ b/_pgbackup/homepage1_1503263089.html @@ -0,0 +1,621 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+ + +
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + +
+

Chloe Adams and David Newton

+

Ad-Lister Project : 2017

+
+ + + + + + + + diff --git a/_pgbackup/homepage_1503088351.html b/_pgbackup/homepage_1503088351.html new file mode 100644 index 00000000..ca3a307c --- /dev/null +++ b/_pgbackup/homepage_1503088351.html @@ -0,0 +1,436 @@ + + + + Veggie Connect + + + + + + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+ + + + + + + + + + diff --git a/_pgbackup/homepage_1503088959.html b/_pgbackup/homepage_1503088959.html new file mode 100644 index 00000000..2758d90f --- /dev/null +++ b/_pgbackup/homepage_1503088959.html @@ -0,0 +1,411 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+ + + + + diff --git a/_pgbackup/homepage_1503089008.html b/_pgbackup/homepage_1503089008.html new file mode 100644 index 00000000..4656fc4f --- /dev/null +++ b/_pgbackup/homepage_1503089008.html @@ -0,0 +1,413 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering fruits, veggies, fresh plants, honey and jams.

+
+
+
+ + + + + diff --git a/_pgbackup/pinegrow_1503099597.json b/_pgbackup/pinegrow_1503099597.json new file mode 100644 index 00000000..08b70392 --- /dev/null +++ b/_pgbackup/pinegrow_1503099597.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503099927.json b/_pgbackup/pinegrow_1503099927.json new file mode 100644 index 00000000..08b70392 --- /dev/null +++ b/_pgbackup/pinegrow_1503099927.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503101009.json b/_pgbackup/pinegrow_1503101009.json new file mode 100644 index 00000000..08b70392 --- /dev/null +++ b/_pgbackup/pinegrow_1503101009.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503102349.json b/_pgbackup/pinegrow_1503102349.json new file mode 100644 index 00000000..08b70392 --- /dev/null +++ b/_pgbackup/pinegrow_1503102349.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503258757.json b/_pgbackup/pinegrow_1503258757.json new file mode 100644 index 00000000..08b70392 --- /dev/null +++ b/_pgbackup/pinegrow_1503258757.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503258849.json b/_pgbackup/pinegrow_1503258849.json new file mode 100644 index 00000000..fc9338a0 --- /dev/null +++ b/_pgbackup/pinegrow_1503258849.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.project.items","pg.asset.manager","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.project.items","pg.asset.manager","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503259117.json b/_pgbackup/pinegrow_1503259117.json new file mode 100644 index 00000000..2c8528ec --- /dev/null +++ b/_pgbackup/pinegrow_1503259117.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261031.json b/_pgbackup/pinegrow_1503261031.json new file mode 100644 index 00000000..3c855a88 --- /dev/null +++ b/_pgbackup/pinegrow_1503261031.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":768}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261138.json b/_pgbackup/pinegrow_1503261138.json new file mode 100644 index 00000000..36bb0030 --- /dev/null +++ b/_pgbackup/pinegrow_1503261138.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261372.json b/_pgbackup/pinegrow_1503261372.json new file mode 100644 index 00000000..36bb0030 --- /dev/null +++ b/_pgbackup/pinegrow_1503261372.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261667.json b/_pgbackup/pinegrow_1503261667.json new file mode 100644 index 00000000..36bb0030 --- /dev/null +++ b/_pgbackup/pinegrow_1503261667.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261726.json b/_pgbackup/pinegrow_1503261726.json new file mode 100644 index 00000000..36bb0030 --- /dev/null +++ b/_pgbackup/pinegrow_1503261726.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261814.json b/_pgbackup/pinegrow_1503261814.json new file mode 100644 index 00000000..36bb0030 --- /dev/null +++ b/_pgbackup/pinegrow_1503261814.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503261937.json b/_pgbackup/pinegrow_1503261937.json new file mode 100644 index 00000000..36bb0030 --- /dev/null +++ b/_pgbackup/pinegrow_1503261937.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503262272.json b/_pgbackup/pinegrow_1503262272.json new file mode 100644 index 00000000..f3bef67f --- /dev/null +++ b/_pgbackup/pinegrow_1503262272.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1600}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503262327.json b/_pgbackup/pinegrow_1503262327.json new file mode 100644 index 00000000..2c8528ec --- /dev/null +++ b/_pgbackup/pinegrow_1503262327.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503263089.json b/_pgbackup/pinegrow_1503263089.json new file mode 100644 index 00000000..f3bef67f --- /dev/null +++ b/_pgbackup/pinegrow_1503263089.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1600}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503279710.json b/_pgbackup/pinegrow_1503279710.json new file mode 100644 index 00000000..3c855a88 --- /dev/null +++ b/_pgbackup/pinegrow_1503279710.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":768}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503281133.json b/_pgbackup/pinegrow_1503281133.json new file mode 100644 index 00000000..c8eb9b3d --- /dev/null +++ b/_pgbackup/pinegrow_1503281133.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":768},"views/users/login.php":{"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1024}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/_pgbackup/pinegrow_1503281188.json b/_pgbackup/pinegrow_1503281188.json new file mode 100644 index 00000000..45615ab3 --- /dev/null +++ b/_pgbackup/pinegrow_1503281188.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":768},"views/users/login.php":{"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1024},"views/users/logins.php":{"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1024}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/bootstrap.php b/bootstrap.php index 70fd6160..8a896301 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -1,13 +1,14 @@ exec('DROP TABLE IF EXISTS items'); + +$query = 'CREATE TABLE items ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT, + item VARCHAR(240) NOT NULL, + user_id INT UNSIGNED NOT NULL, + quantity VARCHAR(240) NOT NULL, + cost VARCHAR(100) NOT NULL, + description VARCHAR(255) NOT NULL, + PRIMARY KEY (id) +)'; + +$dbc->exec($query); \ No newline at end of file diff --git a/database/migrations/user_migration.php b/database/migrations/user_migration.php index db51f661..a7f21ddc 100644 --- a/database/migrations/user_migration.php +++ b/database/migrations/user_migration.php @@ -1,6 +1,6 @@ exec('DROP TABLE IF EXISTS users'); diff --git a/database/seeds/item_seeder.php b/database/seeds/item_seeder.php new file mode 100644 index 00000000..2cd5dfa5 --- /dev/null +++ b/database/seeds/item_seeder.php @@ -0,0 +1,45 @@ +item = 'Carrots'; +$item->user_id = 'finn@fansofbilly.com'; +$item->quantity = "100"; +$item->description = $_ENV['USER_PASS']; +$item->save(); + +$item = new Item; +$item->item = 'Honey'; +$item->user_id = 'jake@fansofbilly.com'; +$item->quantity = "100"; +$item->description = $_ENV['USER_PASS']; +$item->save(); + +$item = new Item; +$item->item = 'Jelly'; +$item->user_id = 'iceking@princessaholicanonymous.com'; +$item->quantity = "100"; +$item->description = $_ENV['USER_PASS']; +$item->save(); + +$item = new Item; +$item->item = 'Apples'; +$item->user_id = 'marceline@vampirequeen.com'; +$item->quantity = "100"; +$item->description = $_ENV['USER_PASS']; +$item->save(); + +$item = new Item; +$item->item = 'Turnips'; +$item->user_id = 'marceline@vampirequeen.com'; +$item->quantity = "100"; +$item->description = $_ENV['USER_PASS']; +$item->save(); + +$item = new Item; +$item->item = 'Lavender'; +$item->user_id = 'marceline@vampirequeen.com'; +$item->quantity = "100"; +$item->description = $_ENV['USER_PASS']; +$item->save(); \ No newline at end of file diff --git a/database/seeds/user_seeder.php b/database/seeds/user_seeder.php index f5a8d769..e5500bab 100644 --- a/database/seeds/user_seeder.php +++ b/database/seeds/user_seeder.php @@ -28,4 +28,5 @@ $user->email = 'marceline@vampirequeen.com'; $user->username = "marceline_abadeer"; $user->password = $_ENV['USER_PASS']; -$user->save(); \ No newline at end of file +$user->save(); + diff --git a/env.php b/env.php new file mode 100644 index 00000000..d3869f39 --- /dev/null +++ b/env.php @@ -0,0 +1,12 @@ + '127.0.0.1', + 'DB_NAME' => 'adlister_db', + 'DB_USER' => 'chloedavid_user', + 'DB_PASS' => 'password123', + + // password for users in the seeder + 'USER_PASS' => 'USER_PASS', +); \ No newline at end of file diff --git a/env.template.php b/env.template.php index 161de43b..d3869f39 100644 --- a/env.template.php +++ b/env.template.php @@ -1,12 +1,12 @@ '', - 'DB_NAME' => '', - 'DB_USER' => '', - 'DB_PASS' => '', + 'DB_HOST' => '127.0.0.1', + 'DB_NAME' => 'adlister_db', + 'DB_USER' => 'chloedavid_user', + 'DB_PASS' => 'password123', // password for users in the seeder - 'USER_PASS' => '', -]; \ No newline at end of file + 'USER_PASS' => 'USER_PASS', +); \ No newline at end of file diff --git a/farmers-market.jpg b/farmers-market.jpg new file mode 100644 index 00000000..50b376c7 Binary files /dev/null and b/farmers-market.jpg differ diff --git a/farmersmkt.gif b/farmersmkt.gif new file mode 100644 index 00000000..14e4af66 Binary files /dev/null and b/farmersmkt.gif differ diff --git a/farmersmkt.jpg b/farmersmkt.jpg new file mode 100644 index 00000000..70233de7 Binary files /dev/null and b/farmersmkt.jpg differ diff --git a/farmersmkt.png b/farmersmkt.png new file mode 100644 index 00000000..93a36830 Binary files /dev/null and b/farmersmkt.png differ diff --git a/fmrmkt.jpg b/fmrmkt.jpg new file mode 100644 index 00000000..b96a2c1d Binary files /dev/null and b/fmrmkt.jpg differ diff --git a/hankshoney.jpg b/hankshoney.jpg new file mode 100644 index 00000000..d3d35437 Binary files /dev/null and b/hankshoney.jpg differ diff --git a/hankshoney.png b/hankshoney.png new file mode 100644 index 00000000..8313c208 Binary files /dev/null and b/hankshoney.png differ diff --git a/home.html b/home.html new file mode 100644 index 00000000..b2b9ef20 --- /dev/null +++ b/home.html @@ -0,0 +1,121 @@ + + + + Veggie Connect + + + + + + + + + + + + +
+
+
+
+

+ Veggie Connect +

+

+ We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams. +

+
+
+
+
+ +
+

+ Featured Products +

+
+
+ +
+ Jean's Jelly +
+
+ EXPLORE +
+ +
+
+ +
+ Carl's Carrots +
+
+ EXPLORE +
+ +
+
+ +
+ Paula's Peppers +
+
+ EXPLORE +
+
+ + +
+

+ Customer Testimonials +

+
+
    +
  • +
    +

    + "Veggie Connect has made it so easy to find fresh produce and products to feed my family!” +

    + +
    + DANNY TARGARYEN +
  • + +
  • +
    +

    + “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!” +

    + +
    + JON SNOW +
  • + +
  • +
    +

    + “Eat your veggies if you want to grow big up and strong.” +

    + +
    + TYRION LANNISTER +
  • +
+
+
+ + + + + + + + + diff --git a/homepage1.html b/homepage1.html new file mode 100644 index 00000000..dfeb5bcc --- /dev/null +++ b/homepage1.html @@ -0,0 +1,617 @@ + + + + Veggie Connect + + + + + + + + + + + + + + +
+
+
+
+

Veggie Connect

+

We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams.

+
+
+

+
+
+ +
+

Featured Products

+
+
+ +
Jean's Jelly
+
+ EXPLORE +
+
+
+ +
Carl's Carrots
+
+ EXPLORE +
+
+
+ +
Paula's Peppers
+
+ EXPLORE +
+
+
+

Customer Testimonials

+
+
    +
  • +
    +

    “Veggie Connect has made it so easy to find fresh produce and products to feed my family!”

    + +
    + DANNY TARGARYEN +
  • +
  • +
    +

    “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!”

    + +
    + JON SNOW +
  • +
  • +
    +

    “Eat your veggies if you want to grow big up and strong.”

    + +
    + TYRION LANNISTER +
  • +
+
+
+ +
+

Chloe Adams and David Newton

+

Ad-Lister Project : 2017

+
+ + + + + diff --git a/jansjelly.jpg b/jansjelly.jpg new file mode 100644 index 00000000..881906e4 Binary files /dev/null and b/jansjelly.jpg differ diff --git a/john.jpg b/john.jpg new file mode 100644 index 00000000..5cfdda79 Binary files /dev/null and b/john.jpg differ diff --git a/models/Item.php b/models/Item.php new file mode 100644 index 00000000..de6e02ab --- /dev/null +++ b/models/Item.php @@ -0,0 +1,51 @@ +user_id); + } + // finds all items that belong to the user with the id passed + // returns values in an instance of item + public static function findAllWithUserId($id) + { + self::dbConnect(); + $query = 'SELECT * FROM ' . static::$table . ' WHERE user_id = :user_id ORDER BY id desc'; + $stmt = self::$dbc->prepare($query); + $stmt->bindValue(':user_id', $id, PDO::PARAM_INT); + $stmt->execute(); + // @TODO: Store the resultset in a variable named $result + $results = $stmt->fetchAll(PDO::FETCH_ASSOC); + // The following code will set the attributes on the calling object based on the result variable's contents + $instance = null; + if ( $results ) + { + $instance = new static; + $instance->attributes = $results; + } + return $instance; + } + // gets 3 most recently added items and returns them in an instance of item + public static function featured($num = 3) + { + self::dbConnect(); + // @TODO: Learning from the previous method, return all the matching records + // @TODO: Create select statement using prepared statements + $query = 'SELECT * FROM ' . static::$table . ' ORDER BY id desc LIMIT ' . $num; + $stmt = self::$dbc->prepare($query); + $stmt->execute(); + // @TODO: Store the resultset in a variable named $result + $results = $stmt->fetchAll(PDO::FETCH_ASSOC); + // The following code will set the attributes on the calling object based on the result variable's contents + $instance = null; + if ( $results ) + { + $instance = new static; + $instance->attributes = $results; + } + return $instance; + } +} +?> \ No newline at end of file diff --git a/models/Model.php b/models/Model.php index 29d50bc8..e9c402a3 100644 --- a/models/Model.php +++ b/models/Model.php @@ -1,238 +1,139 @@ attributes)) { - return $this->attributes[$name]; + if ( array_key_exists( $name, $this->attributes ) ) + { + return $this->attributes[ $name ]; } return null; } - - /** - * Set a new value, or override an existing for the given key - * - * @param string $name - * @param mixed $value - */ public function __set($name, $value) { - // Store name/value pair in attributes array - $this->attributes[$name] = $value; + $this->attributes[ $name ] = $value; } - - /* - * create the database connection if we don't have one - */ protected static function dbConnect() { - if (! self::$dbc) { - //Connect to database - require __DIR__ . '/../database/db_connect.php'; - + if ( ! self::$dbc ) + { + require_once __DIR__ . '/../database/db_connect.php'; self::$dbc = $dbc; } } - - /* - * persist the object to the database - * - * decides whether an update or insert needs to happen based on - * whether or not this instance has an id - */ public function save() { - if (! empty($this->attributes) && isset($this->attributes['id'])) { - $this->update(); - } else { + if ( ! empty( $this->attributes ) && isset( $this->attributes['id'] ) ) + { + $this->update( $this->attributes['id'] ); + } + else + { $this->insert(); } } - - /** - * remove the instance from the database - */ public function delete() { $query = 'DELETE FROM ' . static::$table . ' WHERE id = :id'; - $stmt = self::$dbc->prepare($query); $stmt->bindValue(':id', $this->attributes['id'], PDO::PARAM_INT); $stmt->execute(); } - - /** - * create a new record in the database - * - * will dynamically create a query to insert the record based on - * the attributes of the instance - * - * after the insert is performed the `id` attribute of the model - * will be set to the newly generated id - */ protected function insert() { $columns = ''; - $valuePlaceholders = ''; - - foreach ($this->attributes as $column => $value) { - if ($columns == '' && $valuePlaceholders == '') { + $value_placeholders = ''; + foreach ($this->attributes as $column => $value) + { + if ( $columns == '' && $value_placeholders == '') + { $columns .= $column; - $valuePlaceholders .= ':' . $column; - } else { + $value_placeholders .= ':' . $column; + } + else + { $columns .= ', ' . $column; - $valuePlaceholders .= ', :' . $column; + $value_placeholders .= ', :' . $column; } } - - $query = "INSERT INTO " . static::$table . " ({$columns}) VALUES ({$valuePlaceholders})"; - + $query = "INSERT INTO " . static::$table . " ({$columns}) VALUES ({$value_placeholders})"; $stmt = self::$dbc->prepare($query); - foreach ($this->attributes as $column => $value) { $stmt->bindValue(':' . $column, $value, PDO::PARAM_STR); } - $stmt->execute(); $this->attributes['id'] = self::$dbc->lastInsertId(); } - - /** - * update an existing record in the database - * - * will dynamically generate an update statement based on the - * attributes of the instance - */ - protected function update() + protected function update($id) { $query = "UPDATE " . static::$table . " SET "; - $firstValue = true; - - // Iterate through all the attributes to build the prepared query - // Use prepared statements to ensure data security - foreach ($this->attributes as $key => $value) { - // don't add the id attribute to our update statement - if ($key == 'id') { + $first_value = true; + foreach ($this->attributes as $key => $value) + { + if ( $key == 'id') + { continue; } - - if ($firstValue) { - $firstValue = false; + if ( $first_value ) + { + $first_value = false; $query .= $key . ' = :' . $key; - } else { + } + else + { $query .= ', ' . $key . ' = :' . $key; } } - $query .= ' WHERE id = :id'; - $stmt = self::$dbc->prepare($query); - - foreach ($this->attributes as $key => $value) { + foreach ($this->attributes as $key => $value) + { $stmt->bindValue(':' . $key, $value, PDO::PARAM_STR); } - $stmt->execute(); } - /** - * Find a record based on an id - * - * @param int|string $id the id of the record to look for - * @return static|null an instace of the class that is extending - * this class with the attributes array filled - * with value from the datbase, null if no - * record was found - */ public static function find($id) { - // Get connection to the database self::dbConnect(); - - //Create select statement using prepared statements $query = 'SELECT * FROM ' . static::$table . ' WHERE id = :id'; - $stmt = self::$dbc->prepare($query); $stmt->bindValue(':id', $id, PDO::PARAM_INT); $stmt->execute(); - - //Store the resultset in a variable named $result + $result = $stmt->fetch(PDO::FETCH_ASSOC); - + $instance = null; - // if we have a result, create a new instance - if ($result) { + if ( $result ) + { $instance = new static; $instance->attributes = $result; } - - // return either the found instance or null return $instance; } - - - /** - * Find all records in a table - * - * @return array an array of instances of the class that is - * extending this class - */ + public static function all() { self::dbConnect(); - $query = 'SELECT * FROM ' . static::$table; - $stmt = self::$dbc->prepare($query); $stmt->execute(); - - //Store the resultset in a variable named $result $results = $stmt->fetchAll(PDO::FETCH_ASSOC); - - // turn each associative array into an instance of the model subclass - return array_map(function($result) { + $instance = null; + if ( $results ) + { $instance = new static; - $instance->attributes = $result; - return $instance; - }, $results); + $instance->attributes = $results; + } + return $instance; } - -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/models/User.php b/models/User.php index 5c0f62a8..0bd75191 100644 --- a/models/User.php +++ b/models/User.php @@ -42,4 +42,10 @@ public static function findByUsernameOrEmail($usernameOrEmail) return $instance; } + public function items() + { + return Item::findAllWithUserId($this->id); + } +} +?> } \ No newline at end of file diff --git a/navbarhome.html b/navbarhome.html new file mode 100644 index 00000000..7e412203 --- /dev/null +++ b/navbarhome.html @@ -0,0 +1,383 @@ + + + + Adlister Navbar + + + + + + + + + + + + + + + + + + + + + + diff --git a/paulaspeppers.jpg b/paulaspeppers.jpg new file mode 100644 index 00000000..521ccba6 Binary files /dev/null and b/paulaspeppers.jpg differ diff --git a/pinegrow.json b/pinegrow.json new file mode 100644 index 00000000..07441181 --- /dev/null +++ b/pinegrow.json @@ -0,0 +1 @@ +{"files":{"homepage.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":1024},"homepage1.html":{"frameworks":["pg.insight.events","pg.code-validator","pg.fontawesome","pg.asset.manager","pg.project.items","pg.html","pg.components"],"last_page_width":768},"views/users/login.php":{"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1024},"views/users/logins.php":{"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"],"last_page_width":1280}},"breakpoints":["1024px"],"frameworks":["pg.insight.events","pg.php","pg.code-validator","pg.project.items","pg.asset.manager","pg.fontawesome","pg.html","pg.components"]} \ No newline at end of file diff --git a/public/broccolilogo.png b/public/broccolilogo.png new file mode 100644 index 00000000..42aacf22 Binary files /dev/null and b/public/broccolilogo.png differ diff --git a/public/css/main.css b/public/css/main.css index e69de29b..a55d366f 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -0,0 +1,905 @@ +/*Collumn Settings*/ + .column.whole {width: 100%;} + .column.one-half {width: 50%;} + .column.one-third {width: 33.33%;} + .column.one-fourth{width: 25%;} + .column.one-fifth{width: 20%; float:left;} + .column.one-seventh {width: 14.285%;} + .column.one-eigth{width: 12.5%;} + .column.two-third{width: 66.66%} + .column.three-eigth{width: 37.5%;} + .column.two-fourth {width: 50%;} + .column.three-fourth{width: 75%;} + .column.three-sixth{width: 50%;} + .column.six-sixteenth{width:37.5%} + .column.ten-sixteenth{width:62.5%} + + .column { + float:left;} +/*///////////////////////////////////////////////////////////////////////// + Navigation Bar +/////////////////////////////////////////////////////////////////////////*/ +/* 1. General Links */ +/* 1. General Links */ +img { + width: 100%; + display: block; /* To remove background color under images */ +} + +li { + list-style-type: none; +} + +a, +a:link, +a:visited { + color: #fff; + display: block; + font-size: 1.25em; + font-weight: 500; + padding: 1em; + text-decoration: none; +} + +a:hover, +a:focus, +a:active { + background: #ffd800; +} + +/* Removes border around images in menu for IE10 */ +a img { + border: 0; +} + +/* 2. Desktop Nav Menu */ +.desktop-menu { + background: #3E6617; + margin: 0; + padding: .75em 0; + position: absolute; /* Prevents parent ul from collapsing because of floated children li's. Alternative to overflow: auto/none; */ + top: 0; + width: 100%; + z-index: 1; /* Allows desktop menu to show over slider */ +} + +.desktop-link { + float: left; + margin-top: 1.75em; + text-align: center; +} + + /* 2.1 Desktop Home Link */ + #home { + border: 1px solid #fff; + float: left; + font-size: 1em; + margin: .5em 1em .5em 1em; + padding: .75em; + } + + #home, + #home:link, + #home:visited, + #home:hover, + #home:focus, + #home:active { + color: #fff; + background: none; + } + + .yonsei-logo { + margin: -.5em auto .5em auto; + width: 4em; + } + + /* 2.2 Desktop Dropdown-menu */ + a.caret, + #mobile-menu, + .dropdown-menu { + display: none; /* Removes mobile menu, caret links, and dropdown menu (when menu items are not hovered) on large screens */ + } + + .desktop-link:hover .dropdown-menu { + display: block; /* Shows dropdown menu when menu items are hovered */ + } + + .dropdown-menu { + background: #fff; + box-shadow: 2px 2px 10px #777; + font-size: .7em; + padding: 0; + position: absolute; + text-align: left; + width: 20em; + } + + .dropdown-menu a, + .dropdown-menu a:link, + .dropdown-menu a:visited { + border-top: 1px solid #3E6617; + color: #3E6617; + font-size: 1.5em; + font-weight: 600; + } + + .dropdown-menu a:hover, + .dropdown-menu a:focus, + .dropdown-menu a:active { + color: #fff; + } + +/* 3. Tablet/Mobile Nav Menu */ +@media screen and (max-width: 1200px) { + body { + padding-top: 5.9em; /* is not covered by menu bar */ + } + + .desktop-menu { + padding: 0; /* Stops mobile nav from jumping up when mobile icon is clicked */ + } + + .desktop-link { + text-align: left; + } + + #mobile-menu { + background: #3E6617; + display: block; /* Shows mobile-menu on small screen menu */ + position: absolute; + width: 100%; + } + + #mobile-icon-container { + background: none; + float: right; + width: .35em; + } + + /* 3.1 Tablet/Mobile Home2 Link */ + #home { + display: none; /* 연세대학교 desktop-link disappears from small screen menu */ + } + #mobile-menu #home2 { /* Inherits from "Styles for mobile menu icon" */ + background: none; + border: 1px solid #fff; + font-size: .8em; + left: 1em; + position: absolute; + top: 1em; + } + + .yonsei-logo { + float: left; + margin-bottom: -.5em; + margin-left: -.5em; + margin-right: .5em; + } + + #logo-text { + font-size: 1.25em; + position: relative; + top: .5em; + } + + #mobile-icon { + height: 3.5em; + margin-top: -.75em; + position: relative; + right: 1em; + top: .35em; + width: 2.5em; + } + + /* 3.2 Tablet/Mobile Dropdown Menu */ + a.caret { /* a.caret to beat specificity of styles for general a links */ + background: #193658; + border-bottom: 1px solid #3E6617; + border-left: 1px solid #3E6617; + bottom: 0; + color: #fff; + display: block; /* Shows caret link on small screen menu */ + position: absolute; + right: 0; + top: 0; + } + + .caret:hover, + .caret:focus, + .caret:active { + background: #ffd800; + } + + .desktop-link { + border-top: 1px solid #193658; + display: none; /* Javascript menu is removed when mobile menu is inactive */ + font-size: .85em; + margin-top: 0; + } + + .desktop-link:hover .dropdown-menu { + display: none; /* Makes dropdown menu disappear on small screens. AFFECTS ".desktop-link:hover .caretDropdown" ! */ + } + + #last-desktop-link { + border-bottom: 1px solid #3E6617; + } + + /* 3.3 Tablet/Mobile Javascript Onclick Menu */ + .responsive { + padding: 0; + position: absolute; /* Allows scrolling */ + } + + .responsive .desktop-link { + background: #3E6617; + display: block; /* Javascript menu is shown when mobile menu is active */ + width: 100%; + position: relative; + top: 7em; /* Vertically aligns menu items */ + z-index: 1; /* Allows mobile menu to show over slider */ + } + + .caretDropdown { + display: block; + width: 100%; + position: relative; + } + + .desktop-link:hover .caretDropdown { + display: block; /* Allows dropdown menu to remain on screen when other mobile menu items are hovered. AFFECTED BY ".desktop-link:hover .dropdown-menu"! */ + } + + .navbar-text { + color: white; + margin: auto; + } +} + + +/*/////////////////////////////////////////////////////////////////////////// + Home Page +///////////////////////////////////////////////////////////////////////////*/ + + + /* ///////////////////////// + Welcome Hero Section + /////////////////////////*/ + + #farmersMktGif { + max-width: 100%; + height: 400px; + background-image: url("fmrmkt.jpg"); + background-repeat: no-repeat; + margin: auto; + background-size: contain; + + } + + #veggieConnectH{ + font-family: 'Amatic SC', cursive; + color:white; + text-align: center; + } + + #veggieConnectP { + font-family: 'Josefin Sans', sans-serif; + color:white; + text-align: center; + } + + /*////////////////// + Featured Products + //////////////////*/ + + .featuredProducts { + background-color: white; + text-align: center; + } + + #fP { + color: #293127; + font-size: 90px; + font-family: 'Amatic SC', cursive; + } + * { + box-sizing: border-box; + } + + body { + font-family: Avenir, Arial, sans-serif; + margin: 2%; + } + + div.flip-3d { + perspective: 1200px; + width: 28%; + display: inline-block; + margin: 2%; + } + + div.flip-3d figure { + position: relative; + transform-style: preserve-3d; + transition: 1s transform; + font-size: 1.6rem; + } + + div.flip-3d figure img { + width: 100%; + height: auto; + } + + div.flip-3d figure figcaption { + position: absolute; + width: 100%; + height: 100%; + top: 0; + transform: rotateY(.5turn) translateZ(1px); + background: rgba(255, 255, 255, 0.9); + text-align: center; + padding-top: 45%; + opacity: 0.6; + transition: 1s .5s opacity; + } + + div.flip-3d:hover figure,div.flip-3d.pg-state-hover figure { + transform: rotateY(.5turn); + } + + div.flip-3d:hover figure figcaption,div.flip-3d.pg-state-hover figure figcaption { + opacity: 1; + } + + div.flip-3d figure:after { + content: " "; + display: block; + height: 8vw; + width: 100%; + transform: rotateX(90deg); + background-image: radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%); + } + + @media screen and (max-width: 800px) { + div#flip-3d { + perspective-origin: center top; + } + div#flip-3d figure { + display: block; + width: 50%; + margin: 0 auto; + margin-bottom: 12vw; + } + div#flip-3d figure:last-child { + display: none; + } + } + + .fPbutton { + background-color: #C4E661; + border: none; + color: white; + padding: 10px 27px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 13px; + margin: 4px 2px; + cursor: pointer; + font-family: 'Josefin Sans', sans-serif; + } + + /*///////////////// + Testimonials + /////////////////*/ + + + #testimonials{ + background-color: #F8FEE9; + } + + .testContainer + { + width: 90%; + margin-left: auto; + margin-right: auto; + max-width: 60em; + *zoom: 1; + background-color: #F8FEE9; + } + .grid-testimonials + { + overflow: hidden; + padding-top: 3.125em; + font-family: 'Josefin Sans', sans-serif + } + .grid-testimonials li + { + float: left; + list-style-type: none; + padding-bottom: 3.125em + } + .grid-testimonials p + { + line-height: 1.5em; + margin: 0 + } + .grid-testimonials-citation + { + color: #656262; + display: block; + font-size: 1.125em; + font-weight: 700; + margin-top: 2em; + text-transform: uppercase; + text-align: center + } + .grid-testimonials li div + { + border: 10px solid #3E6617; + padding: 2.125em 7.638888888888889%; + position: relative + } + .grid-testimonials .quote-arrow + { + background: #fff; + border-right:10px solid #3E6617; + border-bottom:10px solid #3E6617; + content: ''; + display: block; + position: absolute; + bottom: -32px; + left: 50%; + margin-left: -25px; + width: 40px; + height: 40px; + -moz-transform:rotate(45deg); + -webkit-transform:rotate(45deg); + } + @media screen and (min-width: 50em) + { + .grid-testimonials li + { + margin-right: 5%; + width: 30% + } + .grid-testimonials li:nth-child(3n) + { + margin-right: 0 + } + } + + footer { + background-color: #3E6617; + max-width: 100%; + height: 100px; + } + + + +/*/////////////////////////////////////////////////////////////////////////// + Login Page/ Sign-Up +///////////////////////////////////////////////////////////////////////////*/ + +.container { + background-color: #F8FEE9; + max-width: 100%; + height: 730px; +} + + + +.section-title { + font-family: 'Amatic SC', cursive; + color: #293127; + font-size: 120px; + text-align: center; +} + +#veggieLogo { + width: 20px; + height: 20px; +} + + + +#login, #signup { + font-family: 'Josefin Sans', sans-serif; + color: #293127; + font-size: 35px; + text-align: center; + +} + +.form-control { + width: 90%; + width: 90%; + padding: 12px 20px; + margin: 8px 0; + box-sizing: border-box; + font-family: 'Josefin Sans', sans-serif; + font-size: 20px; +} + + .button { + background-color: #3E6617; + border: none; + color: white; + padding: 10px 27px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 13px; + margin: 4px 2px; + cursor: pointer; + font-family: 'Josefin Sans', sans-serif; + width: 40%; + font-size: 20px; + } + + +.button:hover { + background-color: #ffd800; +} + +.button:active { + background-color: #ffd800; +} + + +#signupButton, #loginButton{ + background-color: #3E6617; + border: none; + color: white; + padding: 10px 27px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 13px; + margin: 4px 2px; + cursor: pointer; + font-family: 'Josefin Sans', sans-serif; + width: 50%; + font-size: 20px; + +} + +#loginButton:active { + background-color: #ffd800; +} + +#loginButton:hover { + background-color: #ffd800; +} + +/*#loginButton:visited { + background-color: #ffd800; +}*/ + +#signupButton:active { + background-color: #ffd800; +} + +#signupButton:active { + background-color: #ffd800; +} + +/*#signupButton:visited { + background-color: #ffd800; +}*/ + +.rotate { + cursor:pointer; +} + +.rotate:hover { + + -moz-animation: spin .4s 1 linear; + -o-animation: spin .4s 1 linear; + -webkit-animation: spin .4s 1 linear; + animation: spin .4s 1 linear; +} + +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} + +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} + +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} + +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} + +.brocc { + width: 220px; + height: 220px; + margin-top: -70px; +} + + +/* ///////////////////////// + Welcome Hero Section + /////////////////////////*/ + #farmersMktGif { + max-width: 100%; + height: 400px; + background-image: url("fmrmkt.jpg"); + background-repeat: no-repeat; + margin: auto; + background-size: contain; + } + #veggieConnectH{ + font-family: 'Amatic SC', cursive; + color:white; + text-align: center; + } + #veggieConnectP { + font-family: 'Josefin Sans', sans-serif; + color:white; + text-align: center; + } + /*////////////////// + Featured Products + //////////////////*/ + + .featuredProducts { + background-color: white; + text-align: center; + } + #fP { + color: #293127; + font-size: 90px; + font-family: 'Amatic SC', cursive; + } + * { + box-sizing: border-box; + } + body { + font-family: Avenir, Arial, sans-serif; + margin: 2%; + } + div.flip-3d { + perspective: 1200px; + width: 28%; + display: inline-block; + margin: 2%; + } + div.flip-3d figure { + position: relative; + transform-style: preserve-3d; + transition: 1s transform; + font-size: 1.6rem; + } + div.flip-3d figure img { + width: 100%; + height: auto; + } + div.flip-3d figure figcaption { + position: absolute; + width: 100%; + height: 100%; + top: 0; + transform: rotateY(.5turn) translateZ(1px); + background: rgba(255, 255, 255, 0.9); + text-align: center; + padding-top: 45%; + opacity: 0.6; + transition: 1s .5s opacity; + } + div.flip-3d:hover figure,div.flip-3d.pg-state-hover figure { + transform: rotateY(.5turn); + } + div.flip-3d:hover figure figcaption,div.flip-3d.pg-state-hover figure figcaption { + opacity: 1; + } + div.flip-3d figure:after { + content: " "; + display: block; + height: 8vw; + width: 100%; + transform: rotateX(90deg); + background-image: radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%); + } + @media screen and (max-width: 800px) { + div#flip-3d { + perspective-origin: center top; + } + div#flip-3d figure { + display: block; + width: 50%; + margin: 0 auto; + margin-bottom: 12vw; + } + div#flip-3d figure:last-child { + display: none; + } + } + .fPbutton { + background-color: #C4E661; + border: none; + color: white; + padding: 10px 27px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 13px; + margin: 4px 2px; + cursor: pointer; + font-family: 'Josefin Sans', sans-serif; + } + + /*///////////////// + Testimonials + /////////////////*/ + #testimonials{ + background-color: #F8FEE9; + } + .testContainer + { + width: 90%; + margin-left: auto; + margin-right: auto; + max-width: 60em; + *zoom: 1; + background-color: #F8FEE9; + } + .grid-testimonials + { + overflow: hidden; + padding-top: 3.125em; + font-family: 'Josefin Sans', sans-serif + } + .grid-testimonials li + { + float: left; + list-style-type: none; + padding-bottom: 3.125em + } + .grid-testimonials p + { + line-height: 1.5em; + margin: 0 + } + .grid-testimonials-citation + { + color: #656262; + display: block; + font-size: 1.125em; + font-weight: 700; + margin-top: 2em; + text-transform: uppercase; + text-align: center + } + .grid-testimonials li div + { + border: 10px solid #3E6617; + padding: 2.125em 7.638888888888889%; + position: relative + } + .grid-testimonials .quote-arrow + { + background: #fff; + border-right:10px solid #3E6617; + border-bottom:10px solid #3E6617; + content: ''; + display: block; + position: absolute; + bottom: -32px; + left: 50%; + margin-left: -25px; + width: 40px; + height: 40px; + -moz-transform:rotate(45deg); + -webkit-transform:rotate(45deg); + } + @media screen and (min-width: 50em) + { + .grid-testimonials li + { + margin-right: 5%; + width: 30% + } + .grid-testimonials li:nth-child(3n) + { + margin-right: 0 + } + } + footer { + background-color: #3E6617; + max-width: 100%; + height: 100px; + } + +/*//////////////////////////////////////////////////////////////// + Accounts Page +////////////////////////////////////////////////////////////////*/ +.containerAccount { + max-width: 100%; + height: 4000px; + background-color: #F8FEE9; + color: #293127; +} + +.profileImage{ + border-radius: 50%; + width: 400px; + height: 400px; + margin: auto; +} + +.uploadButton { + background-color: #3E6617; + border: none; + color: white; + padding: 10px 27px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 13px; + margin: auto; + cursor: pointer; + font-family: 'Josefin Sans', sans-serif; + width: 40%; +} + +.uploadButton:hover { + background-color: #ffd800; +} + +.uploadButton:active { + background-color: #ffd800; +} + +.userInfo { + font-family: 'Josefin Sans', sans-serif; + text-align: center; + font-size: 40px; + + +} + +#userInfo { + margin-top: -40px; +} + +.buttonProfile { + background-color: #3E6617; + border: none; + color: white; + padding: 10px 27px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 13px; + margin: auto; + cursor: pointer; + font-family: 'Josefin Sans', sans-serif; + width: 40%; +} + +.buttonProfile:hover { + background-color: #ffd800; +} + +.buttonProfile:active { + background-color: #ffd800; +} + +.itemsForSale { + color: #293127; +} diff --git a/public/css/navbar.js b/public/css/navbar.js new file mode 100644 index 00000000..af43351c --- /dev/null +++ b/public/css/navbar.js @@ -0,0 +1,59 @@ +/*Mobile Responsive Nav Bar */ --> +(function(){ + "use strict"; + /* Toggle between adding and removing the "responsive" class to main menu when mobile menu icon is clicked */ + function responsiveMenu() { + var x = document.getElementById("desktopMenu"); + if (x.className === "desktop-menu") { + x.className += " responsive"; + } else { + x.className = "desktop-menu"; + } + } + + /* Toggle between adding and removing the "caretDropdown" class to mobile menu links when caret link are clicked */ + function caretDropdownOne() { + var caretDropdown1 = document.getElementById("caretDropdownOne"); + if (caretDropdown1.className === "dropdown-menu") { + caretDropdown1.className += " caretDropdown"; + } else { + caretDropdown1.className = "dropdown-menu"; + } + } + + function caretDropdownTwo() { + var caretDropdown2 = document.getElementById("caretDropdownTwo"); + if (caretDropdown2.className === "dropdown-menu") { + caretDropdown2.className += " caretDropdown"; + } else { + caretDropdown2.className = "dropdown-menu"; + } + } + + function caretDropdownThree() { + var caretDropdown3 = document.getElementById("caretDropdownThree"); + if (caretDropdown3.className === "dropdown-menu") { + caretDropdown3.className += " caretDropdown"; + } else { + caretDropdown3.className = "dropdown-menu"; + } + } + + function caretDropdownFour() { + var caretDropdown4 = document.getElementById("caretDropdownFour"); + if (caretDropdown4.className === "dropdown-menu") { + caretDropdown4.className += " caretDropdown"; + } else { + caretDropdown4.className = "dropdown-menu"; + } + } + + function caretDropdownFive() { + var caretDropdown5 = document.getElementById("caretDropdownFive"); + if (caretDropdown5.className === "dropdown-menu") { + caretDropdown5.className += " caretDropdown"; + } else { + caretDropdown5.className = "dropdown-menu"; + } + } +})(); \ No newline at end of file diff --git a/public/footer.php b/public/footer.php new file mode 100644 index 00000000..fe95dd4f --- /dev/null +++ b/public/footer.php @@ -0,0 +1,15 @@ +
+ +

+ + Chloe Adams and David Newton + +

+ +

+ + Ad-Lister Project : 2017 + +

+ +
\ No newline at end of file diff --git a/public/index.php b/public/index.php index 0f048917..37446373 100644 --- a/public/index.php +++ b/public/index.php @@ -6,14 +6,20 @@ - OooLister + AdLister + - + - + + + + + - \ No newline at end of file + + diff --git a/tyrion.jpg b/tyrion.jpg new file mode 100644 index 00000000..ce21ea94 Binary files /dev/null and b/tyrion.jpg differ diff --git a/utils/Auth.php b/utils/Auth.php index cdf6406a..28737fbd 100644 --- a/utils/Auth.php +++ b/utils/Auth.php @@ -1,6 +1,6 @@ password)) { // sets session variables used for logged in user $_SESSION['IS_LOGGED_IN'] = $user->username; $_SESSION['LOGGED_IN_ID'] = $user->id; - return true; + return true; } - $_SESSION['ERROR_MESSAGE'] = 'Login information was incorrect'; + $_SESSION['ERROR_MESSAGE'] = 'Login information was incorrect'; return false; } - - /** + /** * check if a user is logged in * * @return boolean whether or not a user is logged in @@ -55,7 +54,7 @@ public static function check() return (isset($_SESSION['IS_LOGGED_IN']) && $_SESSION['IS_LOGGED_IN'] != ''); } - /** + /** * get the id of the logged in user * * @return int @@ -68,7 +67,7 @@ public static function id() return null; } - /** + /** * get the logged in user object * * @return User @@ -81,7 +80,7 @@ public static function user() return null; } - /** + /** * clear out and regenerate the session * * @return boolean true @@ -94,4 +93,5 @@ public static function logout() session_regenerate_id(true); return true; } -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/utils/helper_functions.php b/utils/helper_functions.php index 6012d167..f5d4c0b5 100644 --- a/utils/helper_functions.php +++ b/utils/helper_functions.php @@ -1,62 +1,202 @@ $maxUploadSize) { - $msg = 'Uploaded file is too big!. File size: ' . $uploadedFile['size']; - $msg.= ' is greater than max upload size: ' . $maxUploadSize . '.'; - throw new FileUploadException($msg); - } - - // only allows certain file extensions - $fileExtension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION); - if(! in_array($fileExtension, $validFileExtensions)) { - throw new FileUploadException("Invalid file extension: '$fileExtension'"); - } - - // find the temporary uploaded file and just get the filename - $tempName = $uploadedFile['tmp_name']; - $positionOfLastSlash = strrpos($tempName, '/'); - $newName = substr($tempName, $positionOfLastSlash); - - // move image to uploads directory - $imagePath = $uploadsDirectory . '/' . $newName . '.' . $fileExtension; - move_uploaded_file($tempName, __DIR__ .'/../public/' . $imagePath); - - // return the path to the image relative to our public folder - return $imagePath; +function checkIfUserIdGiven() +{ + if (!Input::has('id')) + { + $_SESSION['ERROR_MESSAGE'] = 'User account not found. Please try again.'; + header('Location: /views/users/login'); + die(); + } +} +function redirectIfNotLoggedIn() +{ + if (!Auth::check()) + { + header('Location: /views/user/login'); + die(); + } +} +function redirectIfLoggedIn() +{ + if (Auth::check()) + { + header('Location: /views/users/account'); + die(); + } +} +function runLogout() +{ + Auth::logout(); + header('Location: /views/users/login'); + die(); +} +function processLoginInputIfExists() +{ + if (hasInput('POST') && Auth::attempt(Input::get('email_user'), Input::get('password'))) + { + header('Location: /users/account'); + die(); + } +} +function hasInput($request_type = 'ALL') +{ + if ($request_type == 'ALL') + { + return !empty(Input::all()); + } + else if ($request_type == 'POST') + { + return !empty($_POST); + } + else + { + return !empty($_GET); + } +} +function processDeleteOfItem() +{ + $item = Item::find(Input::get('id')); + if ($item == null) + { + $_SESSION['ERROR_MESSAGE'] = 'Post not found'; + header('Location: /views/ads/show'); + die(); + } + if ($item->user_id != Auth::id()) + { + $_SESSION['ERROR_MESSAGE'] = 'You do not have permission to do that'; + header('Location: /views/ads/show?id=' . $item->id); + die(); + } + $item->delete(); + $_SESSION['SUCCESS_MESSAGE'] = 'Post successfully deleted'; + header('Location: /views/users/edit'); + die(); +} +function processAccountEditInputIfExisits() +{ + if (hasInput('POST') && Input::get('id') == Auth::id()) + { + $user = User::find(Input::get('id')); + $user->name = Input::get('name'); + $user->email = Input::get('email'); + $user->username = Input::get('username'); + $user->save(); + $_SESSION['SUCCESS_MESSAGE'] = 'Account successfully updated'; + header('Location: /views/users/account?id=' . $user->id); + die(); + } +} +function processSignupInputIfExisits() +{ + if (hasInput('POST')) + { + $user = new User; + $user->name = Input::get('name'); + $user->email = Input::get('email'); + $user->username = Input::get('username'); + $user->password = Input::get('password'); + $user->save(); + if (Auth::attempt(Input::get('email'), Input::get('password'))) + { + header('Location: /views/users/account?id=' . $user->id); + die(); + } + else + { + $_SESSION['ERROR_MESSAGE'] = 'Failed to login user after signup. Please login with the form below.'; + header('Location: /views/users/signup'); + die(); + } + } +} +function processNewItemInputIfExists() +{ + if (hasInput('POST')) + { + $item = new Item; + $item->user_id = Auth::user()->id; + $item->name = Input::get('name'); + $item->price = removeMoneyCharacters(Input::get('price')); + $item->description = Input::get('description'); + $image_url = saveUploadedImage('image'); + $item->image_url = $image_url; + $item->save(); + header('Location: /views/ads/show?id=' . $item->id); + die(); + } +} +function updateItemWithInputIfExists() +{ + if (hasInput('POST')) + { + $item = Item::find( Input::get('id') ); + if ($item->user_id == Auth::user()->id) + { + $item->name = Input::get('name'); + $item->price = removeMoneyCharacters(Input::get('price')); + $item->description = Input::get('description'); + $image_url = saveUploadedImage('image'); + if ($image_url != null) + { + $item->image_url = $image_url; + } + $item->save(); + header('Location: /views/ads/show'); + die(); + } + } +} +function saveUploadedImage($input_name) +{ + $valid = true; + if(isset($_FILES[$input_name]) && $_FILES[$input_name]['name']) + { + if(!$_FILES[$input_name]['error']) + { + $tempFile = $_FILES[$input_name]['tmp_name']; + $positionOfLastSlash = strrpos($tempFile, '/'); + $newName = substr($tempFile, $positionOfLastSlash); + $extension = pathinfo($_FILES[$input_name]['name'], PATHINFO_EXTENSION); + if( $_FILES[$input_name]['size'] > (1024000000)) + { + $valid = false; + } + if( $extension != 'jpg' && $extension != 'jpeg' && $extension != 'png' && $extension != 'gif') + { + $valid = false; + } + if($valid) + { + $image_url = '/img/uploads' . $newName . '.' . $extension; + move_uploaded_file($tempFile, __DIR__ .'/../public' . $image_url); + return $image_url; + } + else + { + return null; + } + } + } else { + return null; + } +} +function convertToMoney($number, $cents = 2) +{ + if (is_numeric($number)) { + if (!$number) { + $money = ($cents == 2 ? '0.00' : '0'); + } else { + if (floor($number) == $number) { + $money = number_format($number, ($cents == 2 ? 2 : 0)); + } else { + $money = number_format(round($number, 2), ($cents == 0 ? 0 : 2)); + } + } + return '$'.$money; + } +} +function removeMoneyCharacters($value) +{ + return str_replace('$', '', str_replace(',', '', $value)); } \ No newline at end of file diff --git a/utils/log.php b/utils/log.php new file mode 100644 index 00000000..b84b6034 --- /dev/null +++ b/utils/log.php @@ -0,0 +1,55 @@ +date = date('Y-m-d'); + $filename = $prefix . '-' . $this->date . '.log'; + $this->setFilename( $filename ); + $this->handle = fopen($this->filename, 'a'); + } + // sets the private filename property to the value passed to function + private function setFilename($filename) + { + // makes sure filename is a string + if (! is_string($filename)) + { + echo 'The property $filename needs to be a string. You gave ' . gettype($filename) . PHP_EOL; + die(); + } + else if (touch($filename) && is_writable($filename)) // touches file / checks if it is writeable + { + $this->filename = $filename; + } + else + { + echo 'You do not have the access rights for that file' . PHP_EOL; + } + } + // writes message to log file + protected function logMessage($logLevel, $message) + { + $time = date('H:i:s'); + $formatedMessage = "{$this->date} {$time} [{$logLevel}] {$message}"; + fwrite($handle, $formatedMessage); + } + // sets log level to info and sends message that was passed to it + public function logInfo($message) + { + $this->logMessage("INFO", $message); + } + // sets log level to error and sends message that was passed to it + public function logError($message) + { + $this->logMessage("ERROR", $message); + } + // closes connection to file + public function __destruct() + { + fclose($this->handle); + } +} \ No newline at end of file diff --git a/views/ads/create.php b/views/ads/create.php index c5b681e1..89b0bf87 100644 --- a/views/ads/create.php +++ b/views/ads/create.php @@ -1 +1,18 @@ - + + + + + OooLister + + + + + + + + + + diff --git a/views/ads/edit.php b/views/ads/edit.php index 5444f62c..9007d739 100644 --- a/views/ads/edit.php +++ b/views/ads/edit.php @@ -1 +1,62 @@ - +
+ +
+ +
+ +

Add New Item For Sale

+ +
+ +
+ +
+ +
+ + +
+

+
+ + + +
+

+
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +

Uploading a new image will remove the current images!

+
+ + + +
+ +
+ +
+ +
+ +
diff --git a/views/ads/show.php b/views/ads/show.php index 6dd0dffc..e7324013 100644 --- a/views/ads/show.php +++ b/views/ads/show.php @@ -1 +1,62 @@ - +
+ +
+ +
+ + +
+

+
+ + + +
+

+
+ + + +

name; ?>

+ +
+ + + +
+ +
+ +

+ description; ?> +

+ +

Asking Price: price); ?>

+ +

Seller Info

+ +

user()->name; ?>

+ +
+ +
+ + id == $item->user_id) : ?> +
+ +
+ + Edit Item + Delete Item +
+ +
+ +
+ +
+ + +
+ +
diff --git a/views/home.js b/views/home.js new file mode 100644 index 00000000..176b9fe0 --- /dev/null +++ b/views/home.js @@ -0,0 +1,59 @@ +(function(){ + "use strict"; + +///////////////////////// +//////// Gallery JS////// +//////////////////////// + +$(function(){ + // find all slides + var slides = $('.main-slide'); + // starting index + var i = 0; + // click listener + $('#main-slider-next').click(function(){ + // find next index + // i + 1 or 0 if end of slides + i = ++i % slides.length; + // scroll to that index + $('.slider-wrapper').animate( + {'left' : -(slides.eq(i).position().left)}, + 600 + ); + }); +}); + ///////////////// + ///Testimonials + //////////////// +(function(){ + + $.fn.fitHeights = function() { + + var items = $(this); + function setHeights() { + + var currentTallest = 0; + + items.css({ 'min-height' : currentTallest }); + + items.each(function(){ + + if( $(this).height() > currentTallest ) { currentTallest = $(this).height(); } + }); + items.css({ 'min-height' : currentTallest }); + + } + + + setHeights(); + $(window).on('resize', setHeights); + return this; + }; +})(jQuery); +$(window).load(function(){ + /* $(groupOfItems).fitHeights(); */ + $('.grid-testimonials p').fitHeights(); +}); + +})(); + \ No newline at end of file diff --git a/views/home.php b/views/home.php index df83ccda..587f30c9 100644 --- a/views/home.php +++ b/views/home.php @@ -1,27 +1,95 @@ -
- -
- -
- -
- -

Welcome To Adlister

+
+
+
+
+

+ Veggie Connect +

+

+ We connect you with local farmers and vendors offering
  fruits, veggies, fresh plants, honey and jams. +

+
+
+
+
+ +
+

+ Featured Products +

+
+
+ +
+ Jean's Jelly +
+
+ EXPLORE +
+ +
+
+ +
+ Carl's Carrots +
+
+ EXPLORE +
+ +
+
+ +
+ Paula's Peppers +
+
+ EXPLORE +
+
+ +
+

+ Customer Testimonials +

+
+
    +
  • +
    +

    + "Veggie Connect has made it so easy to find fresh produce and products to feed my family!” +

    + +
    + DANNY TARGARYEN +
  • + +
  • +
    +

    + “My vegan lifestyle is so much easier to keep up with in the winter thanks to Veggie Connect!” +

    + +
    + JON SNOW +
  • + +
  • +
    +

    + “Eat your veggies if you want to grow big up and strong.” +

    +
    - -
- -
- -
- -
- -

Featured Items

- -
- -
- -
\ No newline at end of file + TYRION LANNISTER + + +
+
+ + + + + + diff --git a/views/partials/broccolilogo.png b/views/partials/broccolilogo.png new file mode 100644 index 00000000..42aacf22 Binary files /dev/null and b/views/partials/broccolilogo.png differ diff --git a/views/partials/common_js.php b/views/partials/common_js.php index 783c11f7..31cbbb7e 100644 --- a/views/partials/common_js.php +++ b/views/partials/common_js.php @@ -1 +1,161 @@ - \ No newline at end of file + + + + + + + + + + + diff --git a/views/users/signup.css b/views/users/signup.css new file mode 100644 index 00000000..46b2114c --- /dev/null +++ b/views/users/signup.css @@ -0,0 +1,3 @@ +body { + background-color: #F8FEE9; +} diff --git a/views/users/signup.php b/views/users/signup.php index 8f2b7f00..266bc037 100644 --- a/views/users/signup.php +++ b/views/users/signup.php @@ -1,50 +1,55 @@ + + + Adlister +
-
+
+
+ +

Sign-Up for Veggie Connect

+ + + +
-

Signup For OooLister

+ + + +
+

+
+ + + +
+

+
+ +
-

Please fill out the information below so we can create your account.

- -
-

-
- - - -
-

-
- - +

Sign-up with your email/username and password.

- +
- -
-
- -
-
- +
-
- + -
- Go To Login +
+
-
@@ -54,3 +59,5 @@
+ + diff --git a/views/users/test.png b/views/users/test.png new file mode 100644 index 00000000..78f5f0e7 Binary files /dev/null and b/views/users/test.png differ