diff --git a/include/controllers/default/crunchbutton/api/v1/login/index.php b/include/controllers/default/crunchbutton/api/login/index.php similarity index 100% rename from include/controllers/default/crunchbutton/api/v1/login/index.php rename to include/controllers/default/crunchbutton/api/login/index.php diff --git a/include/controllers/default/crunchbutton/api/v1/note/index.php b/include/controllers/default/crunchbutton/api/note/index.php similarity index 100% rename from include/controllers/default/crunchbutton/api/v1/note/index.php rename to include/controllers/default/crunchbutton/api/note/index.php diff --git a/include/controllers/default/crunchbutton/api/user/index.php b/include/controllers/default/crunchbutton/api/user/index.php new file mode 100644 index 000000000..f11b84b4d --- /dev/null +++ b/include/controllers/default/crunchbutton/api/user/index.php @@ -0,0 +1,14 @@ +method()) { + case 'get': + $r = new Resturant(c::getPagePiece(1)); + print_r($r); + + break; + + } + } +} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/delivery/index.php b/include/controllers/default/crunchbutton/api/v1/delivery/index.php deleted file mode 100644 index 24cfb6a01..000000000 --- a/include/controllers/default/crunchbutton/api/v1/delivery/index.php +++ /dev/null @@ -1,16 +0,0 @@ -files()->json(); - break; - default: - echo $delivery->json(); - break; - } - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/file/index.php b/include/controllers/default/crunchbutton/api/v1/file/index.php deleted file mode 100644 index 58456e213..000000000 --- a/include/controllers/default/crunchbutton/api/v1/file/index.php +++ /dev/null @@ -1,40 +0,0 @@ -method()) { - case 'delete': - $file = Crunchbutton_File::o(c::getPagePiece(3)); - if (!$file->id_file) { - echo json_encode(['error' => 'invalid resource']); - exit; - } - $file->active = 1; - $file->save(); - - break; - - case 'get': - $file = Crunchbutton_File::o(c::getPagePiece(3)); - if (!$file->id_file) { - echo json_encode(['error' => 'invalid resource']); - exit; - } - switch (c::getPagePiece(4)) { - case 'notes': - echo $file->notes()->json(); - break; - default: - echo $file->json(); - break; - } - break; - - case 'post': - $file = new Crunchbutton_File; - $file->serialize($this->request()); - $file->save(); - break; - } - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/home.php b/include/controllers/default/crunchbutton/api/v1/home.php deleted file mode 100644 index 48913ab9a..000000000 --- a/include/controllers/default/crunchbutton/api/v1/home.php +++ /dev/null @@ -1,7 +0,0 @@ -user()->watched()->json(); - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/index.php b/include/controllers/default/crunchbutton/api/v1/index.php deleted file mode 100644 index ceaacf836..000000000 --- a/include/controllers/default/crunchbutton/api/v1/index.php +++ /dev/null @@ -1,7 +0,0 @@ - 'invalid request']); - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/project/index.php b/include/controllers/default/crunchbutton/api/v1/project/index.php deleted file mode 100644 index ad7ae951f..000000000 --- a/include/controllers/default/crunchbutton/api/v1/project/index.php +++ /dev/null @@ -1,16 +0,0 @@ -deliveries()->json(); - break; - default: - echo $project->json(); - break; - } - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/server/index.php b/include/controllers/default/crunchbutton/api/v1/server/index.php deleted file mode 100644 index d187f90ef..000000000 --- a/include/controllers/default/crunchbutton/api/v1/server/index.php +++ /dev/null @@ -1,17 +0,0 @@ -method()) { - case 'get': - $server = Server::o(c::getPagePiece(3)); - if (!$server->id_server) { - echo json_encode(['error' => 'invalid resource']); - exit; - } - echo $server->json(); - break; - - } - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/api/v1/user/index.php b/include/controllers/default/crunchbutton/api/v1/user/index.php deleted file mode 100644 index a6566e4f7..000000000 --- a/include/controllers/default/crunchbutton/api/v1/user/index.php +++ /dev/null @@ -1,17 +0,0 @@ -method()) { - case 'get': - $user = User::o(c::getPagePiece(3)); - if (!$user->id_user) { - echo json_encode(['error' => 'invalid resource']); - exit; - } - echo $user->json(); - break; - - } - } -} \ No newline at end of file diff --git a/include/controllers/default/crunchbutton/home/index.php b/include/controllers/default/crunchbutton/home/index.php index a7b75f58c..72bff303d 100644 --- a/include/controllers/default/crunchbutton/home/index.php +++ b/include/controllers/default/crunchbutton/home/index.php @@ -2,6 +2,8 @@ class Controller_home extends Cana_Controller { public function init() { + $r = Restaurant::q('select * from restaurant where active=1'); + Cana::view()->restaurants = $r; Cana::view()->display('home/index'); } } \ No newline at end of file diff --git a/include/library/Crunchbutton/Community.php b/include/library/Crunchbutton/Community.php new file mode 100644 index 000000000..83cadd846 --- /dev/null +++ b/include/library/Crunchbutton/Community.php @@ -0,0 +1,11 @@ +table('community') + ->idVar('id_community') + ->load($id); + } +} \ No newline at end of file diff --git a/include/library/Crunchbutton/Restaurant.php b/include/library/Crunchbutton/Restaurant.php new file mode 100644 index 000000000..172f791fc --- /dev/null +++ b/include/library/Crunchbutton/Restaurant.php @@ -0,0 +1,11 @@ +table('restaurant') + ->idVar('id_restaurant') + ->load($id); + } +} \ No newline at end of file diff --git a/include/library/Crunchbutton/Restaurant/Communty.php b/include/library/Crunchbutton/Restaurant/Communty.php new file mode 100644 index 000000000..4d834efbc --- /dev/null +++ b/include/library/Crunchbutton/Restaurant/Communty.php @@ -0,0 +1,11 @@ +table('restaurant_community') + ->idVar('id_restaurant_community') + ->load($id); + } +} \ No newline at end of file diff --git a/include/views/default/crunchbutton/home/index.phtml b/include/views/default/crunchbutton/home/index.phtml index 834b2680f..525370179 100644 --- a/include/views/default/crunchbutton/home/index.phtml +++ b/include/views/default/crunchbutton/home/index.phtml @@ -19,12 +19,12 @@
- + restaurants as $restaurant) : ?>
-
-

Alpha Delta Pizza

+
+

name?>

Top Item: Wenzel Sandwich

- +
\ No newline at end of file diff --git a/www/assets/css/style.css b/www/assets/css/style.css index aafa53b3e..2ecf12453 100644 --- a/www/assets/css/style.css +++ b/www/assets/css/style.css @@ -286,4 +286,7 @@ and (min-width : 1224px) { .footer { margin-bottom: 35px; } + .meal-pic { + background-position: center 40% !important; + } } diff --git a/www/assets/images/food/baconeggcheese-gheav.png b/www/assets/images/food/baconeggcheese-gheav.png new file mode 100644 index 000000000..06671f4fb Binary files /dev/null and b/www/assets/images/food/baconeggcheese-gheav.png differ diff --git a/www/assets/images/food/bleubuffalo-littlesaladshop.png b/www/assets/images/food/bleubuffalo-littlesaladshop.png new file mode 100644 index 000000000..0825e396d Binary files /dev/null and b/www/assets/images/food/bleubuffalo-littlesaladshop.png differ diff --git a/www/assets/images/food/brickovenpizza.png b/www/assets/images/food/brickovenpizza.png new file mode 100644 index 000000000..ffc394e32 Binary files /dev/null and b/www/assets/images/food/brickovenpizza.png differ diff --git a/www/assets/images/food/buffalochicken.png b/www/assets/images/food/buffalochicken.png new file mode 100644 index 000000000..e584478f6 Binary files /dev/null and b/www/assets/images/food/buffalochicken.png differ diff --git a/www/assets/images/food/buffalochickengrinder-a1.png b/www/assets/images/food/buffalochickengrinder-a1.png new file mode 100644 index 000000000..bef04288f Binary files /dev/null and b/www/assets/images/food/buffalochickengrinder-a1.png differ diff --git a/www/assets/images/food/buffalochickengrinder.png b/www/assets/images/food/buffalochickengrinder.png new file mode 100644 index 000000000..71b947d4e Binary files /dev/null and b/www/assets/images/food/buffalochickengrinder.png differ diff --git a/www/assets/images/food/buffalochickentenders-yorkside.png b/www/assets/images/food/buffalochickentenders-yorkside.png new file mode 100644 index 000000000..151681b31 Binary files /dev/null and b/www/assets/images/food/buffalochickentenders-yorkside.png differ diff --git a/www/assets/images/food/cheesefries-ad.png b/www/assets/images/food/cheesefries-ad.png new file mode 100644 index 000000000..275a2e5b1 Binary files /dev/null and b/www/assets/images/food/cheesefries-ad.png differ diff --git a/www/assets/images/food/cheesesteak-goldenrock.png b/www/assets/images/food/cheesesteak-goldenrock.png new file mode 100644 index 000000000..dc724882d Binary files /dev/null and b/www/assets/images/food/cheesesteak-goldenrock.png differ diff --git a/www/assets/images/food/cheesesteak-jayscheesesteak.png b/www/assets/images/food/cheesesteak-jayscheesesteak.png new file mode 100644 index 000000000..d9796cc61 Binary files /dev/null and b/www/assets/images/food/cheesesteak-jayscheesesteak.png differ diff --git a/www/assets/images/food/condoms-ad.png b/www/assets/images/food/condoms-ad.png new file mode 100644 index 000000000..89e3cc4a7 Binary files /dev/null and b/www/assets/images/food/condoms-ad.png differ diff --git a/www/assets/images/food/creditcards.png b/www/assets/images/food/creditcards.png new file mode 100644 index 000000000..e4ae9fbc6 Binary files /dev/null and b/www/assets/images/food/creditcards.png differ diff --git a/www/assets/images/food/logo.png b/www/assets/images/food/logo.png new file mode 100644 index 000000000..d7549da55 Binary files /dev/null and b/www/assets/images/food/logo.png differ diff --git a/www/assets/images/food/padthai.png b/www/assets/images/food/padthai.png new file mode 100644 index 000000000..a8c15ce8e Binary files /dev/null and b/www/assets/images/food/padthai.png differ diff --git a/www/assets/images/food/secure.png b/www/assets/images/food/secure.png new file mode 100644 index 000000000..de5fffaa5 Binary files /dev/null and b/www/assets/images/food/secure.png differ diff --git a/www/assets/images/food/smithy-ad.png b/www/assets/images/food/smithy-ad.png new file mode 100644 index 000000000..ed5e1bb2d Binary files /dev/null and b/www/assets/images/food/smithy-ad.png differ diff --git a/www/assets/images/food/tikka-zaroka.png b/www/assets/images/food/tikka-zaroka.png new file mode 100644 index 000000000..17aae8a06 Binary files /dev/null and b/www/assets/images/food/tikka-zaroka.png differ diff --git a/www/assets/images/food/tikka-zaroka2.png b/www/assets/images/food/tikka-zaroka2.png new file mode 100644 index 000000000..101e3a39f Binary files /dev/null and b/www/assets/images/food/tikka-zaroka2.png differ diff --git a/www/assets/images/food/tsos-chinaking.png b/www/assets/images/food/tsos-chinaking.png new file mode 100644 index 000000000..b24544d0a Binary files /dev/null and b/www/assets/images/food/tsos-chinaking.png differ diff --git a/www/assets/images/food/tsos-chinaking2.png b/www/assets/images/food/tsos-chinaking2.png new file mode 100644 index 000000000..eb8233c1c Binary files /dev/null and b/www/assets/images/food/tsos-chinaking2.png differ diff --git a/www/assets/images/food/web/closed.png b/www/assets/images/food/web/closed.png new file mode 100644 index 000000000..5fa09e0cc Binary files /dev/null and b/www/assets/images/food/web/closed.png differ