This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from hardingadonis/thuy_create_admin
Thuy create admin(hotfixx-admin)
- Loading branch information
Showing
23 changed files
with
1,145 additions
and
160 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/main/java/io/hardingadonis/miu/controller/admin/CategoryManagement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.hardingadonis.miu.controller.admin; | ||
|
||
import io.hardingadonis.miu.dao.impl.mysql.CategoryDAOMySQLImpl; | ||
import io.hardingadonis.miu.model.Category; | ||
import io.hardingadonis.miu.services.Singleton; | ||
import java.io.*; | ||
import java.util.*; | ||
import javax.servlet.*; | ||
import javax.servlet.annotation.MultipartConfig; | ||
import javax.servlet.annotation.WebServlet; | ||
import javax.servlet.http.*; | ||
|
||
@WebServlet(name = "CategoryManagement", urlPatterns = {"/categorymanagement"}) | ||
@MultipartConfig | ||
public class CategoryManagement extends HttpServlet { | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException { | ||
request.setCharacterEncoding("UTF-8"); | ||
response.setContentType("text/html; charset=UTF-8"); | ||
|
||
request.getRequestDispatcher("/view/admin/category-management.jsp").forward(request, response); | ||
|
||
} | ||
|
||
@Override | ||
protected void doPost(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException { | ||
request.setCharacterEncoding("UTF-8"); | ||
response.setContentType("text/html; charset=UTF-8"); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/io/hardingadonis/miu/controller/web/CheckoutSuccessServlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.hardingadonis.miu.controller.web; | ||
|
||
import java.io.*; | ||
import javax.servlet.*; | ||
import javax.servlet.annotation.*; | ||
import javax.servlet.http.*; | ||
|
||
@WebServlet(name = "CheckoutSuccessServlet", urlPatterns = {"/checkout-success"}) | ||
public class CheckoutSuccessServlet extends HttpServlet { | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException { | ||
request.setCharacterEncoding("UTF-8"); | ||
response.setContentType("text/html; charset=UTF-8"); | ||
|
||
HttpSession session = request.getSession(); | ||
|
||
if ((session.getAttribute("user") == null) || (session.getAttribute("order") == null) || (session.getAttribute("cart_cookie") == null)) { | ||
response.sendRedirect("home"); | ||
} | ||
|
||
request.getRequestDispatcher("/view/web/checkout-success.jsp").forward(request, response); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 0 additions & 100 deletions
100
src/main/java/io/hardingadonis/miu/dao/impl/mysql/CartDAOMySQLImpl.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.