├── php files ├── config.php ├── getRandom.php ├── getmenu.php ├── getbanner.php ├── getCompany.php ├── getAllDrink.php ├── db_connect.php ├── server │ ├── product │ │ ├── delete_product.php │ │ ├── update_product.php │ │ ├── add_product.php │ │ └── upload_product_img.php │ ├── category │ │ ├── delete_category.php │ │ ├── add_category.php │ │ ├── update_category.php │ │ └── upload_category_img.php │ └── order │ │ ├── getorder.php │ │ └── updateorderstatus.php ├── getproduct.php ├── getorder.php ├── gettoken.php ├── cancelorder.php ├── checkuser.php ├── updatetoken.php ├── submitorder.php ├── getUser.php ├── upload.php ├── register.php └── upload_api.php ├── UserShopApp ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── bg.jpg │ │ │ │ ├── selector.xml │ │ │ │ ├── banner_drink.jpg │ │ │ │ ├── btn_round.xml │ │ │ │ ├── ic_baseline_delete_24.xml │ │ │ │ ├── home.xml │ │ │ │ ├── serlector.xml │ │ │ │ ├── ic_baseline_done_24.xml │ │ │ │ ├── favorite_red.xml │ │ │ │ ├── date_round.xml │ │ │ │ ├── text_round.xml │ │ │ │ ├── favorite.xml │ │ │ │ ├── ic_baseline_cancel_24.xml │ │ │ │ ├── ic_baseline_search_24.xml │ │ │ │ ├── order.xml │ │ │ │ ├── ic_baseline_room_service_24.xml │ │ │ │ ├── ic_baseline_fiber_new_24.xml │ │ │ │ ├── shipping.xml │ │ │ │ ├── ic_baseline_local_shipping_24.xml │ │ │ │ └── cart.xml │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── themes.xml │ │ │ │ ├── strings.xml │ │ │ │ └── colors.xml │ │ │ ├── drawable-v24 │ │ │ │ ├── user.png │ │ │ │ ├── userapp.png │ │ │ │ ├── text_round_gray.xml │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── layout │ │ │ │ ├── multi_check_layout.xml │ │ │ │ ├── activity_auth.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_product.xml │ │ │ │ ├── activity_favorite.xml │ │ │ │ ├── activity_order.xml │ │ │ │ ├── company_item_layout.xml │ │ │ │ ├── activity_cart.xml │ │ │ │ ├── activity_search.xml │ │ │ │ ├── order_detail_layout.xml │ │ │ │ ├── submit_order_layout.xml │ │ │ │ └── fav_item_layout.xml │ │ │ └── menu │ │ │ │ ├── menu.xml │ │ │ │ └── show_order_bottom_menu.xml │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── usershopapp │ │ │ ├── Interface │ │ │ ├── UploadCallBack.java │ │ │ └── IItemClickListener.java │ │ │ ├── Model │ │ │ ├── Menu.java │ │ │ ├── Product.java │ │ │ ├── MyResponse.java │ │ │ ├── Result.java │ │ │ ├── CheckUserResponse.java │ │ │ ├── Banner.java │ │ │ ├── Company.java │ │ │ ├── DataMessage.java │ │ │ ├── Token.java │ │ │ ├── User.java │ │ │ ├── OrderResult.java │ │ │ └── Order.java │ │ │ ├── Utils │ │ │ ├── RecyclerItemTouchHelperListener.java │ │ │ ├── NotificationHelper.java │ │ │ ├── ProgressRequestBody.java │ │ │ └── Common.java │ │ │ ├── Retrofit │ │ │ ├── FCMClient.java │ │ │ ├── IFCMService.java │ │ │ └── RetrofitClient.java │ │ │ ├── Database │ │ │ ├── DataStore │ │ │ │ ├── ICartDataSource.java │ │ │ │ ├── IFavoriteDataSource.java │ │ │ │ ├── FavoriteRepository.java │ │ │ │ └── CartRepository.java │ │ │ ├── ModelDB │ │ │ │ ├── Favorite.java │ │ │ │ └── Cart.java │ │ │ └── Local │ │ │ │ ├── FavoriteDao.java │ │ │ │ ├── AliRoomDatabase.java │ │ │ │ ├── CartDAO.java │ │ │ │ ├── FavoriteDataSource.java │ │ │ │ └── CartDataSource.java │ │ │ ├── MainActivity.java │ │ │ ├── AuthActivity.java │ │ │ ├── Adapter │ │ │ ├── MenuViewHolder.java │ │ │ ├── ProductViewHolder.java │ │ │ ├── OrderViewHolder.java │ │ │ ├── MenuAdapter.java │ │ │ ├── OrderAdapter.java │ │ │ ├── MultiChoiceAdapter.java │ │ │ └── OrderDetailAdapter.java │ │ │ └── SharedPrefManger.java │ ├── proguard-rules.pro │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── local.properties ├── build.gradle └── gradle.properties └── AdminShopServer ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── app ├── src │ └── main │ │ ├── res │ │ ├── drawable-v24 │ │ │ ├── bg.jpg │ │ │ ├── photo.png │ │ │ ├── ic_baseline_check_white_24.xml │ │ │ ├── ic_baseline_done_24.xml │ │ │ ├── text_round.xml │ │ │ ├── ic_baseline_comment_24.xml │ │ │ ├── ic_baseline_cancel_24.xml │ │ │ ├── ic_baseline_room_service_24.xml │ │ │ ├── ic_baseline_fiber_new_24.xml │ │ │ ├── ic_baseline_local_shipping_24.xml │ │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ │ ├── side_nav_bar.xml │ │ │ ├── ic_baseline_add_24.xml │ │ │ ├── ic_menu_slideshow.xml │ │ │ ├── ic_menu_gallery.xml │ │ │ ├── ic_baseline_person_24.xml │ │ │ ├── ic_baseline_order.xml │ │ │ ├── ic_baseline_location_on_24.xml │ │ │ ├── ic_baseline_add_photo_alternate_24.xml │ │ │ ├── ic_baseline_local_drink_24.xml │ │ │ └── ic_menu_camera.xml │ │ ├── menu │ │ │ ├── main.xml │ │ │ ├── menu_ordre_detail.xml │ │ │ ├── activity_main_drawer.xml │ │ │ └── show_order_bottom_menu.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ ├── layout │ │ │ ├── add_category_layout.xml │ │ │ ├── fragment_home.xml │ │ │ ├── content_main.xml │ │ │ ├── fragment_gallery.xml │ │ │ ├── fragment_slideshow.xml │ │ │ ├── activity_main.xml │ │ │ ├── add_new_product_layout.xml │ │ │ ├── activity_show_order.xml │ │ │ ├── activity_drink_list.xml │ │ │ ├── app_bar_main.xml │ │ │ ├── nav_header_main.xml │ │ │ ├── menu_item_layout.xml │ │ │ ├── activity_update_category.xml │ │ │ ├── activity_update_product.xml │ │ │ ├── drink_item_layout.xml │ │ │ └── order_layout.xml │ │ └── navigation │ │ │ └── mobile_navigation.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── adminshopserver │ │ │ ├── Utils │ │ │ ├── UploadCallBack.java │ │ │ ├── Common.java │ │ │ ├── ProgressRequestBody.java │ │ │ └── NotificationHelper.java │ │ │ ├── Interface │ │ │ └── IItemClickListener.java │ │ │ ├── Model │ │ │ ├── MyResponse.java │ │ │ ├── Drink.java │ │ │ ├── Result.java │ │ │ ├── Category.java │ │ │ ├── DataMessage.java │ │ │ ├── Cart.java │ │ │ ├── Token.java │ │ │ └── Order.java │ │ │ ├── ui │ │ │ ├── gallery │ │ │ │ ├── GalleryViewModel.java │ │ │ │ └── GalleryFragment.java │ │ │ └── slideshow │ │ │ │ ├── SlideshowViewModel.java │ │ │ │ └── SlideshowFragment.java │ │ │ ├── Retrofit │ │ │ ├── FCMRetrofitClient.java │ │ │ ├── IFCMServices.java │ │ │ └── RetrofitClient.java │ │ │ └── Adapter │ │ │ ├── ViewHolder │ │ │ ├── DrinkListViewHolder.java │ │ │ ├── MenuViewHolder.java │ │ │ └── OrdrViewHolder.java │ │ │ ├── DrinkListAdapter.java │ │ │ ├── MenuAdapter.java │ │ │ └── OrderViewAdapter.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro ├── google-services.json └── build.gradle ├── settings.gradle ├── local.properties ├── build.gradle └── gradle.properties /php files/config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/UserShopApp/app/src/main/res/drawable/bg.jpg -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /UserShopApp/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/UserShopApp/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /AdminShopServer/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/AdminShopServer/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable-v24/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/UserShopApp/app/src/main/res/drawable-v24/user.png -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/AdminShopServer/app/src/main/res/drawable-v24/bg.jpg -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/AdminShopServer/app/src/main/res/drawable-v24/photo.png -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable-v24/userapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/UserShopApp/app/src/main/res/drawable-v24/userapp.png -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/banner_drink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ali1Assalem/Android-User-Shop-App-and-Admin-Server-App-with-PHP-API/HEAD/UserShopApp/app/src/main/res/drawable/banner_drink.jpg -------------------------------------------------------------------------------- /php files/getRandom.php: -------------------------------------------------------------------------------- 1 | getRandom(); 8 | echo json_encode($menus); 9 | 10 | ?> -------------------------------------------------------------------------------- /php files/getmenu.php: -------------------------------------------------------------------------------- 1 | getMenu(); 8 | echo json_encode($menus); 9 | 10 | ?> -------------------------------------------------------------------------------- /php files/getbanner.php: -------------------------------------------------------------------------------- 1 | getBanners(); 8 | echo json_encode($banners); 9 | 10 | ?> -------------------------------------------------------------------------------- /php files/getCompany.php: -------------------------------------------------------------------------------- 1 | getCompany(); 8 | echo json_encode($companies); 9 | 10 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Interface/UploadCallBack.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Interface; 2 | 3 | public interface UploadCallBack { 4 | void onProgressUpdate(int pertantage); 5 | } 6 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Utils/UploadCallBack.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Utils; 2 | 3 | public interface UploadCallBack { 4 | void onProgressUpdate(int pertantage); 5 | } 6 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/Menu.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | public class Menu { 4 | 5 | public String ID; 6 | public String Name; 7 | public String Link; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /php files/getAllDrink.php: -------------------------------------------------------------------------------- 1 | getAllDrinks(); 6 | if($drinks) 7 | echo json_encode($drinks); 8 | else 9 | echo json_encode("Error !"); 10 | 11 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Interface/IItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Interface; 2 | 3 | import android.view.View; 4 | 5 | public interface IItemClickListener { 6 | void onClick(View v); 7 | } 8 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/btn_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Interface/IItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Interface; 2 | 3 | import android.view.View; 4 | 5 | public interface IItemClickListener { 6 | void onClick(View view,boolean isLongClick); 7 | } 8 | -------------------------------------------------------------------------------- /UserShopApp/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 02 06:06:51 EEST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /AdminShopServer/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Sep 19 22:13:51 EEST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/Product.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | public class Product { 4 | public String ID; 5 | public String Name; 6 | public String Link; 7 | public String Price; 8 | public String MenuID; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /php files/db_connect.php: -------------------------------------------------------------------------------- 1 | conn =new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_DATABASE); 8 | return $this->conn; 9 | } 10 | } 11 | 12 | 13 | 14 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/MyResponse.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | import java.util.List; 4 | 5 | public class MyResponse { 6 | public long multicast_id; 7 | public int success,failure,canonical_ids; 8 | public List results; 9 | } 10 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/MyResponse.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | import java.util.List; 4 | 5 | public class MyResponse { 6 | public long multicast_id; 7 | public int success,failure,canonical_ids; 8 | public List results; 9 | } 10 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Utils/RecyclerItemTouchHelperListener.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Utils; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | 5 | public interface RecyclerItemTouchHelperListener { 6 | void onSwiped(RecyclerView.ViewHolder viewHolder,int direction,int position); 7 | } 8 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/Drink.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | public class Drink { 4 | public String ID; 5 | public String Name; 6 | public String Link; 7 | public String MenuId; 8 | public String Price; 9 | 10 | public Drink() { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/Result.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class Result { 7 | @SerializedName("message_id") 8 | @Expose 9 | public String message_id; 10 | } 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/Result.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class Result { 7 | @SerializedName("message_id") 8 | @Expose 9 | public String message_id; 10 | } 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_baseline_add_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_check_white_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /UserShopApp/settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | jcenter() // Warning: this repository is going to shut down soon 7 | maven { url "https://maven.xyz.com" } 8 | } 9 | } 10 | rootProject.name = "User Shop App" 11 | include ':app' 12 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 176dp 7 | 16dp 8 | -------------------------------------------------------------------------------- /AdminShopServer/settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | jcenter() // Warning: this repository is going to shut down soon 7 | maven { url "https://maven.xyz.com" } 8 | } 9 | } 10 | rootProject.name = "AdminShopServer" 11 | include ':app' 12 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_delete_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/home.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/serlector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_done_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_done_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/menu/menu_ordre_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /php files/server/product/delete_product.php: -------------------------------------------------------------------------------- 1 | deleteProduct($id); 10 | if($result) 11 | echo json_encode("Delete Product success !"); 12 | else 13 | echo json_encode("Error while write to database"); 14 | } 15 | else{ 16 | echo(json_encode("Required parameters (id) is missing !")); 17 | } 18 | ?> -------------------------------------------------------------------------------- /php files/server/category/delete_category.php: -------------------------------------------------------------------------------- 1 | deleteCategory($id); 10 | if($result) 11 | echo json_encode("Delete Category success !"); 12 | else 13 | echo json_encode("Error while write to database"); 14 | } 15 | else{ 16 | echo(json_encode("Required parameters (id) is missing !")); 17 | } 18 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | #55d4e7e1 11 | -------------------------------------------------------------------------------- /UserShopApp/local.properties: -------------------------------------------------------------------------------- 1 | ## This file is automatically generated by Android Studio. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file should *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | # 7 | # Location of the SDK. This is only used by Gradle. 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=C\:\\Users\\hp\\AppData\\Local\\Android\\Sdk -------------------------------------------------------------------------------- /AdminShopServer/local.properties: -------------------------------------------------------------------------------- 1 | ## This file is automatically generated by Android Studio. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file should *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | # 7 | # Location of the SDK. This is only used by Gradle. 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=C\:\\Users\\hp\\AppData\\Local\\Android\\Sdk -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/text_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/favorite_red.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/layout/multi_check_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/date_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/text_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_baseline_person_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable-v24/text_round_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 | -------------------------------------------------------------------------------- /php files/getproduct.php: -------------------------------------------------------------------------------- 1 | getProductByMenuID($menuid); 13 | 14 | echo json_encode($drinks); 15 | 16 | 17 | 18 | } 19 | else 20 | { 21 | $response["error_msg"]="Required Parameter (menuid) is missing!"; 22 | echo json_encode($response); 23 | } 24 | 25 | 26 | ?> -------------------------------------------------------------------------------- /php files/server/order/getorder.php: -------------------------------------------------------------------------------- 1 | getOrderServerByStatus($status); 14 | 15 | echo json_encode($orders); 16 | 17 | 18 | 19 | } 20 | else 21 | { 22 | $response="Required Parameter (status) is missing!"; 23 | echo json_encode($response); 24 | } 25 | 26 | 27 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_baseline_order.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/layout/activity_auth.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_comment_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/favorite.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /php files/server/category/add_category.php: -------------------------------------------------------------------------------- 1 | insertNewCategory($name,$imgPath); 11 | if($result) 12 | echo json_encode("Add Category success !"); 13 | else 14 | echo json_encode("Error while write to database"); 15 | } 16 | else{ 17 | echo(json_encode("Required parameters (name , imgPath) is missing !")); 18 | } 19 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_baseline_location_on_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_cancel_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_search_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/order.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /php files/getorder.php: -------------------------------------------------------------------------------- 1 | getOrderByStatus($userEmail,$status); 14 | 15 | echo json_encode($orders); 16 | 17 | 18 | 19 | } 20 | else 21 | { 22 | $response="Required Parameter (userEmail,status) is missing!"; 23 | echo json_encode($response); 24 | } 25 | 26 | 27 | ?> -------------------------------------------------------------------------------- /php files/server/category/update_category.php: -------------------------------------------------------------------------------- 1 | updateCategory($id,$name,$imgPath); 12 | if($result) 13 | echo json_encode("Update Category success !"); 14 | else 15 | echo json_encode("Error while write to database"); 16 | } 17 | else{ 18 | echo(json_encode("Required parameters (id , name , imgPath) is missing !")); 19 | } 20 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_cancel_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_room_service_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /php files/gettoken.php: -------------------------------------------------------------------------------- 1 | getToken($email,$isServerToken); 14 | 15 | echo json_encode($token); 16 | 17 | 18 | 19 | } 20 | else 21 | { 22 | $response="Required Parameter (email,isServerToken) is missing!"; 23 | echo json_encode($response); 24 | } 25 | 26 | 27 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_room_service_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_baseline_add_photo_alternate_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_baseline_local_drink_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/ui/gallery/GalleryViewModel.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.ui.gallery; 2 | 3 | import androidx.lifecycle.LiveData; 4 | import androidx.lifecycle.MutableLiveData; 5 | import androidx.lifecycle.ViewModel; 6 | 7 | public class GalleryViewModel extends ViewModel { 8 | 9 | private MutableLiveData mText; 10 | 11 | public GalleryViewModel() { 12 | mText = new MutableLiveData<>(); 13 | mText.setValue("This is gallery fragment"); 14 | } 15 | 16 | public LiveData getText() { 17 | return mText; 18 | } 19 | } -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/ui/slideshow/SlideshowViewModel.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.ui.slideshow; 2 | 3 | import androidx.lifecycle.LiveData; 4 | import androidx.lifecycle.MutableLiveData; 5 | import androidx.lifecycle.ViewModel; 6 | 7 | public class SlideshowViewModel extends ViewModel { 8 | 9 | private MutableLiveData mText; 10 | 11 | public SlideshowViewModel() { 12 | mText = new MutableLiveData<>(); 13 | mText.setValue("This is slideshow fragment"); 14 | } 15 | 16 | public LiveData getText() { 17 | return mText; 18 | } 19 | } -------------------------------------------------------------------------------- /UserShopApp/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath "com.android.tools.build:gradle:7.0.1" 9 | classpath 'com.google.gms:google-services:4.3.10' 10 | 11 | } 12 | } 13 | allprojects { 14 | repositories { 15 | maven {url'https://jitpack.io'} 16 | google() 17 | jcenter() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | } -------------------------------------------------------------------------------- /AdminShopServer/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath "com.android.tools.build:gradle:7.0.1" 9 | classpath 'com.google.gms:google-services:4.3.10' 10 | 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | maven {url'https://jitpack.io'} 17 | google() 18 | jcenter() 19 | mavenCentral() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } -------------------------------------------------------------------------------- /php files/cancelorder.php: -------------------------------------------------------------------------------- 1 | cancelOrder($orderId,$userEmail); 15 | 16 | if($result) 17 | echo json_encode("Order has been cancelled"); 18 | 19 | else 20 | echo json_encode("Error while write to database"); 21 | } 22 | else 23 | { 24 | echo json_encode("Required parameter (orderId,userEmail) is missing!"); 25 | } 26 | 27 | 28 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Retrofit/FCMClient.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Retrofit; 2 | 3 | import retrofit2.Retrofit; 4 | import retrofit2.converter.gson.GsonConverterFactory; 5 | 6 | public class FCMClient { 7 | private static Retrofit retrofit=null; 8 | 9 | public static Retrofit getClient(String baseUrl) 10 | { 11 | if (retrofit==null) 12 | retrofit=new Retrofit.Builder() 13 | .baseUrl(baseUrl) 14 | .addConverterFactory(GsonConverterFactory.create()) 15 | .build(); 16 | return retrofit; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/CheckUserResponse.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | public class CheckUserResponse { 4 | private boolean exists; 5 | private String error_msg; 6 | 7 | public CheckUserResponse() { 8 | } 9 | 10 | public boolean isExists() { 11 | return exists; 12 | } 13 | 14 | public void setExists(boolean exists) { 15 | this.exists = exists; 16 | } 17 | 18 | public String getError_msg() { 19 | return error_msg; 20 | } 21 | 22 | public void setError_msg(String error_msg) { 23 | this.error_msg = error_msg; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /php files/server/product/update_product.php: -------------------------------------------------------------------------------- 1 | updateProduct ($id,$name,$imgPath,$price,$menuId); 14 | if($result) 15 | echo json_encode("Update Product success !"); 16 | else 17 | echo json_encode("Error while write to database"); 18 | } 19 | else{ 20 | echo(json_encode("Required parameters (id , name , imgPath , price , menueId) is missing !")); 21 | } 22 | ?> -------------------------------------------------------------------------------- /php files/checkuser.php: -------------------------------------------------------------------------------- 1 | checkExistsUser($email,$password)) 12 | { 13 | $response["exists"]=TRUE; 14 | echo json_encode($response); 15 | } 16 | else 17 | { 18 | $response["exists"]=FALSE; 19 | echo json_encode($response); 20 | } 21 | } 22 | else 23 | { 24 | $response["error_msg"]="Required Parameter (email) is missing!"; 25 | echo json_encode($response); 26 | } 27 | 28 | 29 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AdminShopServer 3 | Open navigation drawer 4 | Close navigation drawer 5 | Android Studio 6 | android.studio@android.com 7 | Navigation header 8 | Settings 9 | 10 | Home 11 | Gallery 12 | Slideshow 13 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/DataStore/ICartDataSource.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.DataStore; 2 | 3 | 4 | import com.example.usershopapp.Database.ModelDB.Cart; 5 | 6 | import java.util.List; 7 | 8 | import io.reactivex.Flowable; 9 | 10 | public interface ICartDataSource { 11 | Flowable> getCartItem(); 12 | 13 | Flowable> getCartItemById(int cartItemId); 14 | 15 | int countCartItems(); 16 | 17 | void emptyCart(); 18 | 19 | void insertToCart(Cart...carts); 20 | 21 | void updateToCart(Cart...carts); 22 | 23 | void deleteToCart(Cart cart); 24 | 25 | float sumPrice(); 26 | } 27 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_fiber_new_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /php files/server/order/updateorderstatus.php: -------------------------------------------------------------------------------- 1 | updateOrderStatus($email,$staorder_id,$status); 19 | 20 | echo json_encode($result); 21 | 22 | 23 | 24 | } 25 | else 26 | { 27 | $response="Required Parameter (status , email ,order id) is missing!"; 28 | echo json_encode($response); 29 | } 30 | 31 | 32 | ?> -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_fiber_new_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/shipping.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /php files/server/product/add_product.php: -------------------------------------------------------------------------------- 1 | insertNewDrink($name,$imgPath,$price,$menuId); 14 | if($result) 15 | echo json_encode("Add Product success !"); 16 | else 17 | echo json_encode("Error while write to database"); 18 | } 19 | else{ 20 | echo(json_encode("Required parameters (name , imgPath , price ,menuId) is missing !")); 21 | } 22 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/DataStore/IFavoriteDataSource.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.DataStore; 2 | 3 | import androidx.room.Delete; 4 | import androidx.room.Insert; 5 | import androidx.room.Query; 6 | 7 | import com.example.usershopapp.Database.ModelDB.Favorite; 8 | import com.example.usershopapp.Database.ModelDB.Favorite; 9 | 10 | import java.util.List; 11 | 12 | import io.reactivex.Flowable; 13 | 14 | public interface IFavoriteDataSource { 15 | 16 | Flowable> getFavItems(); 17 | 18 | int isFavorite(int itemId); 19 | 20 | void insertFav(Favorite...favorites); 21 | 22 | void delete(Favorite favorite); 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/Banner.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | public class Banner { 4 | private String ID,Name,Link; 5 | 6 | public Banner() { 7 | } 8 | 9 | public String getID() { 10 | return ID; 11 | } 12 | 13 | public void setID(String ID) { 14 | this.ID = ID; 15 | } 16 | 17 | public String getName() { 18 | return Name; 19 | } 20 | 21 | public void setName(String name) { 22 | Name = name; 23 | } 24 | 25 | public String getLink() { 26 | return Link; 27 | } 28 | 29 | public void setLink(String link) { 30 | Link = link; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/Category.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | public class Category { 4 | public String ID,Name,Link; 5 | 6 | public Category() { 7 | } 8 | 9 | public String getID() { 10 | return ID; 11 | } 12 | 13 | public void setID(String ID) { 14 | this.ID = ID; 15 | } 16 | 17 | public String getName() { 18 | return Name; 19 | } 20 | 21 | public void setName(String name) { 22 | Name = name; 23 | } 24 | 25 | public String getLink() { 26 | return Link; 27 | } 28 | 29 | public void setLink(String link) { 30 | Link = link; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/ic_baseline_local_shipping_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/drawable-v24/ic_baseline_local_shipping_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Retrofit/FCMRetrofitClient.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Retrofit; 2 | 3 | import retrofit2.Retrofit; 4 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; 5 | import retrofit2.converter.gson.GsonConverterFactory; 6 | 7 | public class FCMRetrofitClient { 8 | private static Retrofit retrofit=null; 9 | 10 | public static Retrofit getClient(String baseUrl) 11 | { 12 | if (retrofit==null) 13 | { 14 | retrofit=new Retrofit.Builder() 15 | .baseUrl(baseUrl) 16 | .addConverterFactory(GsonConverterFactory.create()) 17 | .build(); 18 | } 19 | return retrofit; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/ModelDB/Favorite.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.ModelDB; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | import androidx.room.PrimaryKey; 7 | 8 | @Entity(tableName = "Favorite") 9 | public class Favorite { 10 | @NonNull 11 | @PrimaryKey 12 | @ColumnInfo(name ="id") 13 | public String id; 14 | 15 | @ColumnInfo(name = "name") 16 | public String name; 17 | 18 | @ColumnInfo(name = "link") 19 | public String link; 20 | 21 | @ColumnInfo(name = "price") 22 | public String price; 23 | 24 | @ColumnInfo(name = "menuId") 25 | public String menuId; 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/Company.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | public class Company { 4 | private String ID; 5 | private String Name; 6 | private String Link; 7 | 8 | public Company() { 9 | } 10 | 11 | public String getID() { 12 | return ID; 13 | } 14 | 15 | public void setID(String ID) { 16 | this.ID = ID; 17 | } 18 | 19 | public String getName() { 20 | return Name; 21 | } 22 | 23 | public void setName(String name) { 24 | Name = name; 25 | } 26 | 27 | public String getLink() { 28 | return Link; 29 | } 30 | 31 | public void setLink(String link) { 32 | Link = link; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/drawable/cart.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Retrofit/IFCMService.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Retrofit; 2 | 3 | 4 | import com.example.usershopapp.Model.DataMessage; 5 | import com.example.usershopapp.Model.MyResponse; 6 | 7 | import retrofit2.Call; 8 | import retrofit2.http.Body; 9 | import retrofit2.http.Headers; 10 | import retrofit2.http.POST; 11 | 12 | public interface IFCMService { 13 | @Headers({ 14 | "Content-Type:application/json", 15 | "Authorization:key=AAAAlGHbfKE:APA91bHZHu7msN46FUg1DHfVbkepd-nDSBoXjv1lgf_LZbwkhrwIIwyWYz_aDwK1e8x5SxUGh2B8Zlia7xi-QBxyPGBG9x4gAfon6hTxCNnHD-vs3Wft-YmrlsaYHyU_uYmN9_dqU0SJ" 16 | }) 17 | 18 | @POST("fcm/send") 19 | Call sendNotification(@Body DataMessage body); 20 | } 21 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/DataMessage.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | import java.util.Map; 4 | 5 | public class DataMessage { 6 | public String to; 7 | public Map data; 8 | 9 | public DataMessage(){} 10 | 11 | public DataMessage(String to, Map data) { 12 | this.to = to; 13 | this.data = data; 14 | } 15 | 16 | public String getTo() { 17 | return to; 18 | } 19 | 20 | public void setTo(String to) { 21 | this.to = to; 22 | } 23 | 24 | public Map getData() { 25 | return data; 26 | } 27 | 28 | public void setData(Map data) { 29 | this.data = data; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /php files/updatetoken.php: -------------------------------------------------------------------------------- 1 | insertToken($email,$token,$isServerToken); 16 | 17 | if($user) 18 | echo json_encode("Token update success"); 19 | else 20 | echo json_encode("Token update failed"); 21 | 22 | 23 | 24 | } 25 | else 26 | { 27 | $response["error_msg"]=""; 28 | echo json_encode("Required Parameter (email , token , isServerToken) is missing!"); 29 | } 30 | 31 | 32 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Retrofit/RetrofitClient.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Retrofit; 2 | 3 | import retrofit2.Retrofit; 4 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; 5 | import retrofit2.converter.gson.GsonConverterFactory; 6 | 7 | public class RetrofitClient { 8 | private static Retrofit retrofit=null; 9 | 10 | public static Retrofit getClient(String baseUrl){ 11 | if(retrofit==null){ 12 | retrofit=new Retrofit.Builder() 13 | .baseUrl(baseUrl) 14 | .addConverterFactory(GsonConverterFactory.create()) 15 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 16 | .build(); 17 | } 18 | return retrofit; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /php files/server/product/upload_product_img.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/DataMessage.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | import java.util.Map; 4 | 5 | public class DataMessage { 6 | public String to; 7 | public Map data; 8 | 9 | public DataMessage() { 10 | } 11 | 12 | public DataMessage(String to, Map data) { 13 | this.to = to; 14 | this.data = data; 15 | } 16 | 17 | public String getTo() { 18 | return to; 19 | } 20 | 21 | public void setTo(String to) { 22 | this.to = to; 23 | } 24 | 25 | public Map getData() { 26 | return data; 27 | } 28 | 29 | public void setData(Map data) { 30 | this.data = data; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Retrofit/IFCMServices.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Retrofit; 2 | 3 | import com.example.adminshopserver.Model.DataMessage; 4 | import com.example.adminshopserver.Model.MyResponse; 5 | 6 | 7 | import retrofit2.Call; 8 | import retrofit2.http.Body; 9 | import retrofit2.http.Headers; 10 | import retrofit2.http.POST; 11 | 12 | public interface IFCMServices { 13 | @Headers({ 14 | "Content-Type:application/json", 15 | "Authorization:key=AAAAlGHbfKE:APA91bHZHu7msN46FUg1DHfVbkepd-nDSBoXjv1lgf_LZbwkhrwIIwyWYz_aDwK1e8x5SxUGh2B8Zlia7xi-QBxyPGBG9x4gAfon6hTxCNnHD-vs3Wft-YmrlsaYHyU_uYmN9_dqU0SJ" 16 | }) 17 | 18 | 19 | @POST("fcm/send") 20 | Call sendNotification(@Body DataMessage body); 21 | } 22 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Model/Token.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Model; 2 | 3 | public class Token { 4 | public String email,token,isServerToken; 5 | 6 | public Token() { 7 | } 8 | 9 | public String getEmail() { 10 | return email; 11 | } 12 | 13 | public void setEmail(String email) { 14 | this.email = email; 15 | } 16 | 17 | public String getToken() { 18 | return token; 19 | } 20 | 21 | public void setToken(String token) { 22 | this.token = token; 23 | } 24 | 25 | public String getIsServerToken() { 26 | return isServerToken; 27 | } 28 | 29 | public void setIsServerToken(String isServerToken) { 30 | this.isServerToken = isServerToken; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /php files/server/category/upload_category_img.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/Local/FavoriteDao.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.Local; 2 | import androidx.room.Dao; 3 | import androidx.room.Delete; 4 | import androidx.room.Insert; 5 | import androidx.room.Query; 6 | import com.example.usershopapp.Database.ModelDB.Favorite; 7 | import com.example.usershopapp.Database.ModelDB.Favorite; 8 | 9 | import java.util.List; 10 | import io.reactivex.Flowable; 11 | 12 | @Dao 13 | public interface FavoriteDao { 14 | @Query("SELECT * FROM Favorite") 15 | Flowable> getFavItems(); 16 | 17 | @Query("SELECT EXISTS (SELECT 1 FROM Favorite WHERE id=:itemId)") 18 | int isFavorite(int itemId); 19 | 20 | @Insert 21 | void insertFav(Favorite...favorites); 22 | 23 | @Delete 24 | void delete(Favorite favorite); 25 | } 26 | -------------------------------------------------------------------------------- /UserShopApp/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /AdminShopServer/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Retrofit/RetrofitClient.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Retrofit; 2 | 3 | import retrofit2.Retrofit; 4 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; 5 | import retrofit2.converter.gson.GsonConverterFactory; 6 | 7 | public class RetrofitClient { 8 | private static Retrofit retrofit=null; 9 | 10 | public static Retrofit getClient(String baseUrl) 11 | { 12 | if (retrofit==null) 13 | { 14 | retrofit=new Retrofit.Builder() 15 | .baseUrl(baseUrl) 16 | .addConverterFactory(GsonConverterFactory.create()) 17 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 18 | .build(); 19 | } 20 | return retrofit; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/menu/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | 17 | 18 | 22 | 23 | 27 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/Cart.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | public class Cart { 4 | private int id, amount, size; 5 | private String name, link, with; 6 | private double price; 7 | 8 | public Cart() { 9 | } 10 | 11 | public int getId() { 12 | return id; 13 | } 14 | 15 | public int getAmount() { 16 | return amount; 17 | } 18 | 19 | public int getSize() { 20 | return size; 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public String getLink() { 28 | return link; 29 | } 30 | 31 | public String getWith() { 32 | return with; 33 | } 34 | 35 | public double getPrice() { 36 | return price; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/java/com/example/adminshopserver/Model/Token.java: -------------------------------------------------------------------------------- 1 | package com.example.adminshopserver.Model; 2 | 3 | public class Token { 4 | public String email; 5 | public String token; 6 | public int isServerToken; 7 | 8 | public Token() { 9 | } 10 | 11 | public String getEmail() { 12 | return email; 13 | } 14 | 15 | public void setEmail(String email) { 16 | this.email = email; 17 | } 18 | 19 | public String getToken() { 20 | return token; 21 | } 22 | 23 | public void setToken(String token) { 24 | this.token = token; 25 | } 26 | 27 | public int getIsServerToken() { 28 | return isServerToken; 29 | } 30 | 31 | public void setIsServerToken(int isServerToken) { 32 | this.isServerToken = isServerToken; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /php files/submitorder.php: -------------------------------------------------------------------------------- 1 | insertNewOrder($price,$orderDetail,$comment,$address,$email,$paymentMethod); 22 | 23 | echo json_encode($result); 24 | } 25 | else 26 | { 27 | echo json_encode("Required parameter (email,detail,address,comment,price,paymentMethod) is missing!"); 28 | } 29 | 30 | 31 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/ModelDB/Cart.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.ModelDB; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | import androidx.room.PrimaryKey; 7 | 8 | @Entity(tableName = "Cart") 9 | public class Cart { 10 | @NonNull 11 | @PrimaryKey(autoGenerate = true) 12 | @ColumnInfo(name="id") 13 | public int id; 14 | 15 | @ColumnInfo(name="name") 16 | public String name; 17 | 18 | 19 | @ColumnInfo(name="amount") 20 | public int amount; 21 | 22 | @ColumnInfo(name="price") 23 | public double price; 24 | 25 | @ColumnInfo(name="size") 26 | public int size; 27 | 28 | @ColumnInfo(name="with") 29 | public String with; 30 | 31 | @ColumnInfo(name="link") 32 | public String link; 33 | } 34 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/add_category_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | User Shop App 3 | 4 | Hello blank fragment 5 | 6 | Name 7 | Address 8 | 9 | Confirm 10 | 11 | Already have account? 12 | 13 | Email 14 | Store App 15 | Dont have account? 16 | Sign up 17 | Sign in 18 | Password 19 | Order Address 20 | Order Comment 21 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/fragment_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 18 | 19 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.content.Intent; 6 | import android.content.SharedPreferences; 7 | import android.os.Bundle; 8 | import android.os.Handler; 9 | 10 | import com.example.usershopapp.Utils.Common; 11 | 12 | public class MainActivity extends AppCompatActivity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | 19 | 20 | Handler handler=new Handler(); 21 | handler.postDelayed(new Runnable() { 22 | @Override 23 | public void run() { 24 | 25 | startActivity(new Intent(MainActivity.this,AuthActivity.class)); 26 | finish();} 27 | },1000); 28 | 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /php files/getUser.php: -------------------------------------------------------------------------------- 1 | getUserInformation($email); 13 | if($user) 14 | { 15 | $response["email"]=$user["Email"]; 16 | $response["password"]=$user["Password"]; 17 | $response["name"]=$user["Name"]; 18 | $response["address"]=$user["Address"]; 19 | $response["avatarUrl"]=$user["avatarUrl"]; 20 | 21 | 22 | echo json_encode($response); 23 | } 24 | else 25 | { 26 | $response["error_msg"]="User does not exists!"; 27 | echo json_encode($response); 28 | } 29 | 30 | } 31 | else 32 | { 33 | $response["error_msg"]="Required Parameter (email) is missing!"; 34 | echo json_encode($response); 35 | } 36 | 37 | 38 | ?> -------------------------------------------------------------------------------- /php files/upload.php: -------------------------------------------------------------------------------- 1 | updateAvatar($email,$name); 22 | if($result) 23 | echo json_encode("Uploaded"); 24 | else 25 | echo json_encode("Error While write to database"); 26 | } 27 | } 28 | } 29 | else 30 | echo json_encode("Missing email field"); 31 | } 32 | else 33 | echo json_encode("Please select file !") 34 | ?> -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/layout/activity_product.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 15 | 19 | 20 | 21 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/AuthActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | import androidx.core.app.ActivityCompat; 5 | 6 | import android.Manifest; 7 | import android.app.Activity; 8 | import android.content.Intent; 9 | import android.os.Bundle; 10 | import android.widget.Toast; 11 | 12 | import com.example.usershopapp.Fragments.SignInFragment; 13 | 14 | import org.jetbrains.annotations.Nullable; 15 | 16 | import java.util.Objects; 17 | 18 | import edmt.dev.afilechooser.utils.FileUtils; 19 | 20 | public class AuthActivity extends AppCompatActivity { 21 | 22 | @Override 23 | protected void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | setContentView(R.layout.activity_auth); 26 | getSupportFragmentManager().beginTransaction().replace(R.id.frameAuthContainer,new SignInFragment()).commit(); 27 | 28 | Objects.requireNonNull(getSupportActionBar()).hide(); 29 | 30 | 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/Local/AliRoomDatabase.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.Local; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.room.Database; 6 | import androidx.room.Room; 7 | import androidx.room.RoomDatabase; 8 | 9 | import com.example.usershopapp.Database.ModelDB.Cart; 10 | import com.example.usershopapp.Database.ModelDB.Favorite; 11 | 12 | @Database(entities = {Cart.class, Favorite.class},version = 1,exportSchema = false) 13 | public abstract class AliRoomDatabase extends RoomDatabase { 14 | public abstract CartDAO cartDAO(); 15 | public abstract FavoriteDao favoriteDao(); 16 | private static AliRoomDatabase instance; 17 | 18 | public static AliRoomDatabase getInstance(Context context) 19 | { 20 | if (instance==null) 21 | instance=Room.databaseBuilder(context, AliRoomDatabase.class,"ali_Drink") 22 | .allowMainThreadQueries() 23 | .build(); 24 | return instance; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF3700B3 5 | #FF5722 6 | #FF018786 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | #95D2FF 12 | #F6F6F6 13 | #fff 14 | #F45E08 15 | #fff 16 | #95D2FF 17 | #2E2E2E 18 | 19 | #95D2FF 20 | #666666 21 | #999999 22 | #95D2FF 23 | #EDEDED 24 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 20 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/fragment_gallery.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 22 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/fragment_slideshow.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 22 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 25 | -------------------------------------------------------------------------------- /UserShopApp/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true -------------------------------------------------------------------------------- /AdminShopServer/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Database/Local/CartDAO.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Database.Local; 2 | 3 | import androidx.room.Dao; 4 | import androidx.room.Delete; 5 | import androidx.room.Insert; 6 | import androidx.room.Query; 7 | import androidx.room.Update; 8 | 9 | 10 | import com.example.usershopapp.Database.ModelDB.Cart; 11 | 12 | import java.util.List; 13 | 14 | import io.reactivex.Flowable; 15 | 16 | @Dao 17 | public interface CartDAO { 18 | @Query("SELECT * FROM Cart") 19 | Flowable> getCartItem(); 20 | 21 | @Query("SELECT * FROM Cart WHERE id=:cartItemId") 22 | Flowable> getCartItemById(int cartItemId); 23 | 24 | @Query("SELECT COUNT(*) FROM Cart") 25 | int countCartItems(); 26 | 27 | //for count all price 28 | @Query("SELECT SUM(Price) FROM Cart") 29 | float sumPrice(); 30 | 31 | @Query("DELETE FROM Cart") 32 | void emptyCart(); 33 | 34 | @Insert 35 | void insertToCart(Cart...carts); 36 | 37 | @Update 38 | void updateToCart(Cart...carts); 39 | 40 | @Delete 41 | void deleteToCart(Cart cart); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /UserShopApp/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "637296934049", 4 | "project_id": "shopapp-45335", 5 | "storage_bucket": "shopapp-45335.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:637296934049:android:c765bc3b61636e997284e0", 11 | "android_client_info": { 12 | "package_name": "com.example.usershopapp" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "637296934049-pi9sfvuanm5fpi05q5rnavdvis985ror.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyCjbI3qyBkVop-X_oHRs6QV4YS3XEID6aU" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "637296934049-pi9sfvuanm5fpi05q5rnavdvis985ror.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /AdminShopServer/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "637296934049", 4 | "project_id": "shopapp-45335", 5 | "storage_bucket": "shopapp-45335.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:637296934049:android:c765bc3b61636e997284e0", 11 | "android_client_info": { 12 | "package_name": "com.example.adminshopserver" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "637296934049-pi9sfvuanm5fpi05q5rnavdvis985ror.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyCjbI3qyBkVop-X_oHRs6QV4YS3XEID6aU" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "637296934049-pi9sfvuanm5fpi05q5rnavdvis985ror.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/add_new_product_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 24 | 25 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /UserShopApp/app/src/main/java/com/example/usershopapp/Adapter/MenuViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.example.usershopapp.Adapter; 2 | 3 | import android.view.View; 4 | import android.widget.ImageView; 5 | import android.widget.TextView; 6 | 7 | import androidx.annotation.NonNull; 8 | import androidx.recyclerview.widget.RecyclerView; 9 | 10 | import com.example.usershopapp.Interface.IItemClickListener; 11 | import com.example.usershopapp.R; 12 | 13 | public class MenuViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { 14 | ImageView img_company; 15 | TextView name_company; 16 | 17 | IItemClickListener itemClickListener; 18 | 19 | public void setItemClickListener(IItemClickListener itemClickListener){ 20 | this.itemClickListener=itemClickListener; 21 | } 22 | public MenuViewHolder(@NonNull View itemView) { 23 | super(itemView); 24 | 25 | img_company=itemView.findViewById(R.id.companyPic); 26 | name_company=itemView.findViewById(R.id.companyName); 27 | 28 | itemView.setOnClickListener(this); 29 | } 30 | 31 | @Override 32 | public void onClick(View view) { 33 | itemClickListener.onClick(view); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/layout/activity_show_order.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 17 | 18 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /AdminShopServer/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 21 | 22 |