├── LICENSE ├── README.md ├── expenditure.sql ├── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff ├── fontawesome-webfont.woff2 ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── images ├── ex1.jpg ├── ex1.png ├── expenditure.jpg └── team.svg ├── includes ├── add-expenses.php ├── add_category.php ├── analytics.php ├── category-table.php ├── css │ ├── bootstrap-table.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ ├── datepicker.css │ ├── datepicker3.css │ ├── font-awesome.min.css │ ├── style.css │ └── styles.css ├── database.php ├── expense-report.php ├── footer.php ├── get_data.php ├── head.php ├── header.php ├── home.php ├── images │ ├── Mobile-login-Cristina.jpg │ ├── Wavy_Tech-28_Single-10.jpg │ ├── addex.png │ ├── draw1.webp │ ├── draw2.svg │ ├── log.svg │ ├── maex.png │ ├── prof.png │ └── register.svg ├── index.php ├── js │ ├── app.js │ ├── bootstrap-datepicker.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── chart-data.js │ ├── chart.min.js │ ├── custom.js │ ├── easypiechart-data.js │ ├── easypiechart.js │ ├── html5shiv.min.js │ ├── jquery-1.11.1.min.js │ ├── lumino.glyphs.js │ ├── npm.js │ ├── respond.min.js │ ├── script.js │ └── scripts.js ├── lending.php ├── logout.php ├── manage-expenses.php ├── manage-lending.php ├── pending-report.php ├── pie-data.php ├── received-report.php ├── report.php ├── search.php ├── signup.php ├── update-expense.php ├── update-lending.php ├── update_user.php └── user_profile.php └── index.php /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Daily-Expense-Tracker-Using-PHP-and-MySQL. 2 | 3 | Daily Expense Tracker System is a web-based application and this application is used to manage the application user‘s daily expenses in a more efficient and manageable way. By using this application we can reduce the manual calculations for their daily expenses and keep the track of the expenditure. In this application, the user can provide his/her expense to calculate his/her total expenses per day and these results will be stored for a unique user. 4 | 5 | Note 🔴: - This code has been modified from another project's source code on the web. 6 | 7 | 8 | ## 📄 Documentation 9 | 10 | The following project documentation will be added soon: 11 | 12 | - 📊 Project Presentation (PPT) : [Click here](https://docs.google.com/presentation/d/1PHqOU0aVw3T55h1SPJA6YD4t0_Bb13xi/edit?usp=sharing&ouid=112058796522293808229&rtpof=true&sd=true) 13 | - 📘 Detailed Project Report (PDF) : *Coming soon... Stay tuned!* 14 | 15 | ## 16 | 17 | 🙏 **Thanks for your support in helping make this repository even better! 🌟** 18 | 19 | ## 🗃️ Project Details 20 | 21 | You can modify the code to meet your specific requirements. 22 | 23 | 🟦 Features : 24 | 25 | 1) Secure Login Form 26 | 2) Signup Form 27 | 3) user Dashboard 28 | 4) Add-Expenses 29 | 5) Manage Expenses 30 | 6) Add-Lending 31 | 7) Manage Lending 32 | 8) Analytics through graph 33 | 9) Report 34 | 10) Setting 35 | 36 | 🟩 Installation/Setup 37 | 38 | 1) Open your XAMPP/WAMP's Control Panel and start the Apache and MySQL. 39 | 2) Extract the downloaded source code zip file. 40 | 3) If you are using XAMPP, copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory. And If you are using WAMP, paste it into the "www" directory. 41 | 4) Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin 42 | 5) Import the provided SQL file. The file is known as expenditure.sql located inside the database folder. 43 | 6) Browse the Budget and Expense Tracker System in a browser. i.e. http://localhost/Daily-Expense-Tracker-Using-PHP-and-MySQL 44 | 45 | 🟪 User Account : 46 | 47 | -> Username : user@gmail.com 48 | 49 | -> Password : 12345678 50 | 51 | ✨Screenshots : 52 | 53 | 1) Front-Page : 54 | 55 | ![front](https://user-images.githubusercontent.com/126175004/235640182-c909c2a9-1b71-44cd-a729-107224bb6eec.png) 56 | 57 | 2) Login-Page : 58 | 59 | ![login](https://user-images.githubusercontent.com/126175004/235640335-01862545-a837-44b3-bf95-e33ab3ab81c7.png) 60 | 61 | 3) Signup-Page : 62 | 63 | ![signup](https://user-images.githubusercontent.com/126175004/235640501-a0896935-f8d6-4e94-a323-52b21b5d2ad2.png) 64 | 65 | 4) User-Dashboard : 66 | 67 | ![Screenshot 2023-05-02 153308](https://user-images.githubusercontent.com/126175004/235640702-1f570137-11a8-4f2e-bca2-52c966440edd.png) 68 | 69 | 5) Add-Expenses : 70 | 71 | ![add-expense](https://user-images.githubusercontent.com/126175004/235640826-f858f739-0551-4a0f-8d78-1f0bc0354185.png) 72 | 73 | 6) Manage-Expense : 74 | 75 | ![manage-expense](https://user-images.githubusercontent.com/126175004/235641022-95933116-7fc0-4d0a-b987-ba36bbb88a2f.png) 76 | 77 | 7) Add-Lending : 78 | 79 | ![add-lending](https://user-images.githubusercontent.com/126175004/235641132-644eb6f8-5cf9-49b1-8d3e-612df3829a16.png) 80 | 81 | 8) Manage-Lending : 82 | 83 | ![manage-lending](https://user-images.githubusercontent.com/126175004/235641243-2ed2b7c0-1204-4208-bd5a-57220003c6f9.png) 84 | 85 | 9) Analytics : 86 | 87 | ![analytics](https://user-images.githubusercontent.com/126175004/235641350-d98be171-00c2-4572-b723-10ad3a206065.png) 88 | 89 | 10) Report : 90 | 91 | ![report](https://user-images.githubusercontent.com/126175004/235641482-20b0ef0a-4d79-4092-b64d-e1e2ad9b1b7d.png) 92 | 93 | ![Screenshot 2023-05-02 155222](https://user-images.githubusercontent.com/126175004/235642061-6ddb28ef-7019-4bf9-85c9-216988e5610e.png) 94 | 95 | 11) Setting : 96 | 97 | ![user_profile](https://user-images.githubusercontent.com/126175004/235642200-d75ec57e-6ad5-44e5-93a5-994ee0e95eaa.png) 98 | 99 | ## Contributing 100 | 101 | You're all welcome to contribute to this project! Whether it's fixing bugs, improving existing features, or suggesting new ideas—every bit helps. Feel free to fork the repo, open issues, or submit pull requests. 102 | 103 | Let's make this project better together! 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /expenditure.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.1 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: May 02, 2023 at 11:46 AM 7 | -- Server version: 10.4.24-MariaDB 8 | -- PHP Version: 8.1.6 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `expenditure` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `lending` 28 | -- 29 | 30 | CREATE TABLE `lending` ( 31 | `id` int(11) UNSIGNED NOT NULL, 32 | `UserId` int(100) NOT NULL, 33 | `name` varchar(255) NOT NULL, 34 | `date_of_lending` date NOT NULL, 35 | `amount` decimal(10,2) NOT NULL, 36 | `description` varchar(250) DEFAULT NULL, 37 | `status` enum('pending','received') NOT NULL, 38 | `current_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() 39 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 40 | 41 | -- 42 | -- Dumping data for table `lending` 43 | -- 44 | 45 | INSERT INTO `lending` (`id`, `UserId`, `name`, `date_of_lending`, `amount`, `description`, `status`, `current_time`) VALUES 46 | (10, 26, 'admin', '2023-03-16', 5000.00, 'hiii', 'pending', '2023-04-04 13:31:19'), 47 | (11, 30, 'shivmodi', '2023-03-31', 6000.00, 'llll', 'received', '2023-04-04 14:28:52'), 48 | (12, 26, 'king', '2023-03-22', 6000.00, 'hii bro give me my money 💵💵', 'pending', '2023-04-07 05:04:21'), 49 | (13, 31, 'Shiv Modi', '2023-04-05', 5000.00, 'friend ', 'pending', '2023-04-05 14:13:15'), 50 | (14, 31, 'Krsih Patel', '2023-04-04', 2000.00, 'Friends', 'received', '2023-04-05 14:13:48'), 51 | (15, 66, 'shivmodi', '2023-04-03', 1000.00, 'I want to take money from harsh', 'received', '2023-04-11 13:26:38'), 52 | (16, 67, 'Shiv Modi', '2023-04-05', 500.00, 'I want to take money from harsh', 'received', '2023-04-11 13:42:16'), 53 | (17, 68, 'krish patel', '2023-04-04', 500.00, 'i want to take from krish patel on 14/04/23', 'received', '2023-04-12 05:23:44'), 54 | (19, 68, 'shiv modi', '2023-04-12', 5000.00, 'i want to take money from shiv ', 'pending', '2023-04-12 05:28:56'); 55 | 56 | -- -------------------------------------------------------- 57 | 58 | -- 59 | -- Table structure for table `tblcategory` 60 | -- 61 | 62 | CREATE TABLE `tblcategory` ( 63 | `CategoryId` int(11) NOT NULL, 64 | `CategoryName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, 65 | `UserId` int(11) NOT NULL, 66 | `CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() 67 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 68 | 69 | -- 70 | -- Dumping data for table `tblcategory` 71 | -- 72 | 73 | INSERT INTO `tblcategory` (`CategoryId`, `CategoryName`, `UserId`, `CreatedAt`) VALUES 74 | (73, 'Food ', 68, '2023-04-12 05:06:22'), 75 | (74, 'Games 🎮', 68, '2023-04-12 05:06:30'), 76 | (75, 'Entertainment 🍿', 68, '2023-04-12 05:06:46'), 77 | (76, 'Petrol ⛽⛽', 68, '2023-04-12 05:11:53'), 78 | (77, 'Electricity ⚡⚡', 68, '2023-04-12 05:13:04'), 79 | (78, 'Rent 🏠', 68, '2023-04-12 05:14:10'), 80 | (79, 'Entertainment', 68, '2023-04-12 10:27:52'); 81 | 82 | -- -------------------------------------------------------- 83 | 84 | -- 85 | -- Table structure for table `tblexpense` 86 | -- 87 | 88 | CREATE TABLE `tblexpense` ( 89 | `ID` int(10) NOT NULL, 90 | `UserId` int(10) NOT NULL, 91 | `ExpenseDate` date DEFAULT NULL, 92 | `CategoryId` int(11) NOT NULL, 93 | `category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, 94 | `ExpenseCost` varchar(200) DEFAULT NULL, 95 | `Description` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, 96 | `NoteDate` timestamp NULL DEFAULT current_timestamp() 97 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 98 | 99 | -- 100 | -- Dumping data for table `tblexpense` 101 | -- 102 | 103 | INSERT INTO `tblexpense` (`ID`, `UserId`, `ExpenseDate`, `CategoryId`, `category`, `ExpenseCost`, `Description`, `NoteDate`) VALUES 104 | (108, 30, '2023-04-01', 0, 'Food ', '5000', 'Food 😋😋😋 ', '2023-04-01 14:06:11'), 105 | (109, 30, '2023-04-01', 0, 'Entertainment 🎞️', '1000', '🍿🍿🍿 ', '2023-04-01 14:07:09'), 106 | (110, 30, '2023-04-01', 0, 'Entertainment 🎞️', '5000', 'xxxx ', '2023-04-01 14:30:27'), 107 | (111, 30, '2023-04-01', 0, 'Entertainment 🎞️', '200', 'xxxxx ', '2023-04-01 14:31:30'), 108 | (112, 30, '2023-04-01', 56, 'Entertainment 🎞️', '1000', 'dddd ', '2023-04-01 14:32:16'), 109 | (113, 30, '2023-04-01', 57, 'Grass', '2000', 'hii 🔴🔴 ', '2023-04-01 15:35:50'), 110 | (114, 30, '2023-04-01', 55, 'Food ', '5000', 'ccccccccc ', '2023-04-01 15:36:05'), 111 | (115, 30, '2023-04-01', 58, 'Entertainment 🎞️', '6000', 'shiv modi', '2023-04-01 16:29:04'), 112 | (116, 30, '2023-04-02', 57, 'Grass', '5000', 'dd ', '2023-04-02 08:17:59'), 113 | (117, 30, '2023-04-02', 59, 'Games', '5000', 'hiiiii ', '2023-04-02 08:40:55'), 114 | (122, 26, '2023-04-02', 60, 'Food ', '2000', '😋😋 ', '2023-04-02 18:12:56'), 115 | (123, 26, '2023-04-02', 61, 'Food 😋😋', '5000', '🌽🌽🌽 ', '2023-04-02 18:13:15'), 116 | (124, 31, '2023-04-05', 65, 'Games 🎮', '5000', 'PS5 🎮🎮🎮 ', '2023-04-05 14:07:09'), 117 | (125, 31, '2023-04-05', 63, 'Food ', '4000', 'food ', '2023-04-05 14:07:32'), 118 | (126, 31, '2023-04-04', 64, 'Entertainment 🎞️', '10000', 'movie 🍿🍿 ', '2023-04-05 14:07:55'), 119 | (127, 31, '2023-04-03', 66, 'Tea ☕', '15000', 'tea month cost ', '2023-04-05 14:08:32'), 120 | (128, 31, '2023-04-02', 67, 'Bank 🏦🏦', '60000', 'bank money deposit ', '2023-04-05 14:09:23'), 121 | (129, 65, '2023-04-11', 68, 'Food', '500', 'Food Expense 🌽🌽 ', '2023-04-11 13:19:27'), 122 | (130, 66, '2023-04-11', 69, 'Food', '500', 'vegetables 🍅🍅 ', '2023-04-11 13:24:15'), 123 | (131, 66, '2023-04-11', 70, 'Games 🎮', '1000', 'PS5 ', '2023-04-11 13:25:06'), 124 | (132, 67, '2023-04-11', 71, 'Food', '600', 'Vegetables 🍅🍅 ', '2023-04-11 13:40:15'), 125 | (133, 67, '2023-04-11', 72, 'Games 🎮', '5000', 'Ps5 ', '2023-04-11 13:41:16'), 126 | (135, 68, '2023-04-11', 75, 'Entertainment 🍿', '6000', 'Movie time 🍿🍿 ', '2023-04-12 05:10:26'), 127 | (136, 68, '2023-04-12', 74, 'Games 🎮', '980', 'PS5 🎞️🎞️ ', '2023-04-12 05:11:01'), 128 | (137, 68, '2023-04-10', 76, 'Petrol ⛽⛽', '500', 'petrol ', '2023-04-12 05:12:25'), 129 | (138, 68, '2023-04-12', 77, 'Electricity ⚡⚡', '2523', 'electricity billl 🔴 ', '2023-04-12 05:13:38'), 130 | (139, 68, '2023-04-10', 78, 'Rent 🏠', '15000', 'rent ', '2023-04-12 05:14:25'), 131 | (141, 68, '2023-04-11', 75, 'Entertainment 🍿', '8000', 'movie ', '2023-04-12 05:17:10'), 132 | (142, 68, '2023-04-13', 74, 'Games 🎮', '5000', 'Ps6', '2023-04-12 05:18:07'), 133 | (143, 68, '2023-04-12', 78, 'Rent 🏠', '5000', 'rent ', '2023-04-12 10:28:09'), 134 | (144, 68, '2023-04-18', 75, 'Entertainment 🍿', '500', 'Computer Organisation zero address instruction 1 address instruction ', '2023-04-18 08:45:06'), 135 | (145, 68, '2023-04-18', 75, 'Entertainment 🍿', '7', 'hii ', '2023-04-18 08:52:11'), 136 | (146, 68, '2023-04-18', 78, 'Rent 🏠', '20000', 'hiiii ', '2023-04-18 08:52:32'); 137 | 138 | -- -------------------------------------------------------- 139 | 140 | -- 141 | -- Table structure for table `users` 142 | -- 143 | 144 | CREATE TABLE `users` ( 145 | `id` int(11) NOT NULL, 146 | `name` varchar(50) NOT NULL, 147 | `email` varchar(30) NOT NULL, 148 | `phone` varchar(15) NOT NULL, 149 | `password` varchar(255) NOT NULL, 150 | `verification_code` varchar(12) NOT NULL, 151 | `created_at` datetime DEFAULT current_timestamp() 152 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 153 | 154 | -- 155 | -- Dumping data for table `users` 156 | -- 157 | 158 | INSERT INTO `users` (`id`, `name`, `email`, `phone`, `password`, `verification_code`, `created_at`) VALUES 159 | (68, 'User', 'user@gmail.com', '9245657856', '$2y$10$JkvQ00olAxMBVQBUJ6kZp.rNtv0v5K7OChUeVvR04uAq8ZEFWDC2.', '4ebebb3c3d07', '2023-04-12 10:31:16'); 160 | 161 | -- 162 | -- Indexes for dumped tables 163 | -- 164 | 165 | -- 166 | -- Indexes for table `lending` 167 | -- 168 | ALTER TABLE `lending` 169 | ADD PRIMARY KEY (`id`); 170 | 171 | -- 172 | -- Indexes for table `tblcategory` 173 | -- 174 | ALTER TABLE `tblcategory` 175 | ADD PRIMARY KEY (`CategoryId`), 176 | ADD KEY `UserId` (`UserId`); 177 | 178 | -- 179 | -- Indexes for table `tblexpense` 180 | -- 181 | ALTER TABLE `tblexpense` 182 | ADD PRIMARY KEY (`ID`); 183 | 184 | -- 185 | -- Indexes for table `users` 186 | -- 187 | ALTER TABLE `users` 188 | ADD PRIMARY KEY (`id`), 189 | ADD UNIQUE KEY `username` (`name`); 190 | 191 | -- 192 | -- AUTO_INCREMENT for dumped tables 193 | -- 194 | 195 | -- 196 | -- AUTO_INCREMENT for table `lending` 197 | -- 198 | ALTER TABLE `lending` 199 | MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; 200 | 201 | -- 202 | -- AUTO_INCREMENT for table `tblcategory` 203 | -- 204 | ALTER TABLE `tblcategory` 205 | MODIFY `CategoryId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80; 206 | 207 | -- 208 | -- AUTO_INCREMENT for table `tblexpense` 209 | -- 210 | ALTER TABLE `tblexpense` 211 | MODIFY `ID` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=147; 212 | 213 | -- 214 | -- AUTO_INCREMENT for table `users` 215 | -- 216 | ALTER TABLE `users` 217 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=73; 218 | 219 | -- 220 | -- Constraints for dumped tables 221 | -- 222 | 223 | -- 224 | -- Constraints for table `tblcategory` 225 | -- 226 | ALTER TABLE `tblcategory` 227 | ADD CONSTRAINT `tblcategory_ibfk_1` FOREIGN KEY (`UserId`) REFERENCES `users` (`id`) ON DELETE CASCADE; 228 | COMMIT; 229 | 230 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 231 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 232 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 233 | -------------------------------------------------------------------------------- /fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /images/ex1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/images/ex1.jpg -------------------------------------------------------------------------------- /images/ex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/images/ex1.png -------------------------------------------------------------------------------- /images/expenditure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/images/expenditure.jpg -------------------------------------------------------------------------------- /images/team.svg: -------------------------------------------------------------------------------- 1 | creative team -------------------------------------------------------------------------------- /includes/add-expenses.php: -------------------------------------------------------------------------------- 1 | alert('$message');"; 20 | echo " "; 21 | 22 | } else { 23 | $message = "Expense could not be added"; 24 | echo ""; 25 | } 26 | 27 | } 28 | ?> 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 91 | 92 | 93 | 155 |
156 | 190 | 191 | 192 | 199 | 200 |
201 |
202 | 203 | 204 |
205 |
206 | 207 |
208 |
209 |
210 |
211 |

Add Expense

212 |
213 |
214 |
215 | 218 |
219 |
220 | 221 | 222 | 247 | 248 | 249 | 250 |
251 |
252 |
253 |
254 |
255 | 256 | 257 |
258 | 259 | 260 |
261 | 262 | 274 |
275 | 276 |
277 | 278 | 279 |
280 | 281 |
282 | 283 | 284 |
285 | 286 | 287 |
288 | 289 |
290 |
291 | 294 |
295 |
296 | 297 | 298 | 299 | 300 | 301 |
302 |
303 | 304 |
305 | 306 | 307 | 308 | 309 | 310 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | -------------------------------------------------------------------------------- /includes/add_category.php: -------------------------------------------------------------------------------- 1 | prepare("INSERT INTO tblcategory (CategoryName, UserId) VALUES (?, ?)"); 11 | $stmt->bind_param("si", $CategoryName, $userId); 12 | $result = $stmt->execute(); 13 | 14 | if ($result) { 15 | $message = "Category added successfully!"; 16 | echo ""; 17 | echo " "; 18 | exit(); 19 | } else { 20 | // Error adding category 21 | echo "Error: " . mysqli_error($db); 22 | } 23 | } 24 | ?> 25 | -------------------------------------------------------------------------------- /includes/analytics.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 98 |
99 | 137 | 138 |
139 |
140 | 141 | 142 |
143 |
144 |
145 |
Analytics
146 | 147 |
148 |
149 | 150 |
151 | 152 | 153 |
154 |
155 |
156 | 157 | 158 |
159 | 160 | 161 | 245 | 246 | 247 | 248 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 337 | 338 | 339 | 340 | 341 | -------------------------------------------------------------------------------- /includes/category-table.php: -------------------------------------------------------------------------------- 1 | $row['category'], 27 | 'total_expense' => $row['total_expense'], 28 | ); 29 | } 30 | 31 | // Calculate the total expense 32 | $total_expense = array_reduce($data, function($acc, $item) { 33 | return $acc + $item['total_expense']; 34 | }); 35 | 36 | // Calculate the percentage for each category 37 | foreach ($data as &$item) { 38 | $item['percentage'] = ($item['total_expense'] / $total_expense) * 100; 39 | } 40 | 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /includes/css/bootstrap-table.css: -------------------------------------------------------------------------------- 1 | .table { 2 | margin-bottom: 0 !important; 3 | border-bottom: 1px solid #dddddd; 4 | border-collapse: collapse !important; 5 | border-radius: 1px; 6 | } 7 | 8 | .fixed-table-container { 9 | position: relative; 10 | clear: both; 11 | border: 1px solid #dddddd; 12 | border-radius: 4px; 13 | -webkit-border-radius: 4px; 14 | -moz-border-radius: 4px; 15 | } 16 | 17 | .fixed-table-header { 18 | overflow: hidden; 19 | border-radius: 4px 4px 0 0; 20 | -webkit-border-radius: 4px 4px 0 0; 21 | -moz-border-radius: 4px 4px 0 0; 22 | } 23 | 24 | .fixed-table-body { 25 | overflow-x: auto; 26 | overflow-y: auto; 27 | height: 100%; 28 | } 29 | 30 | .fixed-table-container table { 31 | width: 100%; 32 | } 33 | 34 | .fixed-table-container thead th { 35 | height: 0; 36 | padding: 0; 37 | margin: 0; 38 | border-left: 1px solid #dddddd; 39 | } 40 | 41 | .fixed-table-container thead th:first-child { 42 | border-left: none; 43 | } 44 | 45 | .fixed-table-container thead th .th-inner { 46 | padding: 8px; 47 | line-height: 24px; 48 | vertical-align: top; 49 | overflow: hidden; 50 | text-overflow: ellipsis; 51 | white-space: nowrap; 52 | } 53 | 54 | .fixed-table-container thead th .sortable { 55 | cursor: pointer; 56 | } 57 | 58 | .fixed-table-container tbody td { 59 | border-left: 1px solid #dddddd; 60 | } 61 | 62 | .fixed-table-container tbody tr:first-child td { 63 | border-top: none; 64 | } 65 | 66 | .fixed-table-container tbody td:first-child { 67 | border-left: none; 68 | } 69 | 70 | /* the same color with .active */ 71 | .fixed-table-container tbody .selected td { 72 | background-color: #f5f5f5; 73 | } 74 | 75 | .fixed-table-container .bs-checkbox { 76 | text-align: center; 77 | } 78 | 79 | .fixed-table-container .bs-checkbox .th-inner { 80 | padding: 8px 0; 81 | } 82 | 83 | .fixed-table-container input[type="radio"], 84 | .fixed-table-container input[type="checkbox"] { 85 | margin: 0 auto !important; 86 | } 87 | 88 | .fixed-table-container .no-records-found { 89 | text-align: center; 90 | } 91 | 92 | 93 | .fixed-table-pagination .pagination, 94 | .fixed-table-pagination .pagination-detail { 95 | margin-top: 10px; 96 | margin-bottom: 10px; 97 | } 98 | 99 | .fixed-table-pagination .pagination a { 100 | padding: 6px 12px; 101 | line-height: 1.428571429; 102 | } 103 | 104 | .fixed-table-pagination .pagination-info { 105 | line-height: 34px; 106 | margin-right: 5px; 107 | } 108 | 109 | .fixed-table-pagination .btn-group { 110 | position: relative; 111 | display: inline-block; 112 | vertical-align: middle; 113 | } 114 | 115 | .fixed-table-pagination .dropup .dropdown-menu { 116 | margin-bottom: 0; 117 | } 118 | 119 | .fixed-table-pagination .page-list { 120 | display: inline-block; 121 | } 122 | 123 | .fixed-table-toolbar .columns { 124 | margin-left: 5px; 125 | } 126 | 127 | .fixed-table-toolbar .columns label { 128 | display: block; 129 | padding: 3px 20px; 130 | clear: both; 131 | font-weight: normal; 132 | line-height: 1.428571429; 133 | } 134 | 135 | .fixed-table-toolbar .bars, 136 | .fixed-table-toolbar .search, 137 | .fixed-table-toolbar .columns { 138 | position: relative; 139 | margin-top: 10px; 140 | margin-bottom: 10px; 141 | line-height: 34px; 142 | } 143 | 144 | .fixed-table-pagination li.disabled a { 145 | pointer-events: none; 146 | cursor: default; 147 | } 148 | 149 | .fixed-table-loading { 150 | display: none; 151 | position: absolute; 152 | top: 42px; 153 | right: 0; 154 | bottom: 0; 155 | left: 0; 156 | z-index: 99; 157 | background-color: #fff; 158 | text-align: center; 159 | } 160 | 161 | .fixed-table-body .card-view .title { 162 | font-weight: bold; 163 | display: inline-block; 164 | min-width: 30%; 165 | text-align: left !important; 166 | } 167 | 168 | /* support bootstrap 2 */ 169 | .fixed-table-body thead th .th-inner { 170 | box-sizing: border-box; 171 | } 172 | 173 | .table th, .table td { 174 | vertical-align: middle; 175 | box-sizing: border-box; 176 | } 177 | 178 | .fixed-table-toolbar .dropdown-menu { 179 | text-align: left; 180 | max-height: 300px; 181 | overflow: auto; 182 | } 183 | 184 | .fixed-table-toolbar .btn-group>.btn-group { 185 | display: inline-block; 186 | margin-left: -1px !important; 187 | } 188 | 189 | .fixed-table-toolbar .btn-group>.btn-group>.btn { 190 | border-radius: 0; 191 | } 192 | 193 | .fixed-table-toolbar .btn-group>.btn-group:first-child>.btn { 194 | border-top-left-radius: 4px; 195 | border-bottom-left-radius: 4px; 196 | } 197 | 198 | .fixed-table-toolbar .btn-group>.btn-group:last-child>.btn { 199 | border-top-right-radius: 4px; 200 | border-bottom-right-radius: 4px; 201 | } 202 | 203 | .table>thead>tr>th { 204 | vertical-align: bottom; 205 | border-bottom: 2px solid #ddd; 206 | } 207 | 208 | /* support bootstrap 3 */ 209 | .table thead>tr>th { 210 | padding: 0; 211 | margin: 0; 212 | } 213 | 214 | .pull-right .dropdown-menu { 215 | right: 0; 216 | left: auto; 217 | } 218 | 219 | /* calculate scrollbar width */ 220 | p.fixed-table-scroll-inner { 221 | width: 100%; 222 | height: 200px; 223 | } 224 | 225 | div.fixed-table-scroll-outer { 226 | top: 0; 227 | left: 0; 228 | visibility: hidden; 229 | width: 200px; 230 | height: 150px; 231 | overflow: hidden; 232 | } -------------------------------------------------------------------------------- /includes/css/style.css: -------------------------------------------------------------------------------- 1 | /* Googlefont Poppins CDN Link */ 2 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); 3 | *{ 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | font-family: 'Poppins', sans-serif; 8 | } 9 | .sidebar{ 10 | position: fixed; 11 | height: 100%; 12 | width: 240px; 13 | background: #0A2558; 14 | transition: all 0.5s ease; 15 | } 16 | .sidebar.active{ 17 | width: 60px; 18 | } 19 | .sidebar .logo-details{ 20 | height: 80px; 21 | display: flex; 22 | align-items: center; 23 | } 24 | .sidebar .logo-details i{ 25 | font-size: 28px; 26 | font-weight: 500; 27 | color: #fff; 28 | min-width: 60px; 29 | text-align: center 30 | } 31 | .sidebar .logo-details .logo_name{ 32 | color: #fff; 33 | font-size: 24px; 34 | font-weight: 500; 35 | } 36 | .sidebar .nav-links{ 37 | margin-top: 10px; 38 | } 39 | .sidebar .nav-links li{ 40 | position: relative; 41 | list-style: none; 42 | height: 50px; 43 | } 44 | .sidebar .nav-links li a{ 45 | height: 100%; 46 | width: 100%; 47 | display: flex; 48 | align-items: center; 49 | text-decoration: none; 50 | transition: all 0.4s ease; 51 | } 52 | .sidebar .nav-links li a.active{ 53 | background: #081D45; 54 | } 55 | .sidebar .nav-links li a:hover{ 56 | background: #081D45; 57 | } 58 | .sidebar .nav-links li i{ 59 | min-width: 60px; 60 | text-align: center; 61 | font-size: 18px; 62 | color: #fff; 63 | } 64 | .sidebar .nav-links li a .links_name{ 65 | color: #fff; 66 | font-size: 15px; 67 | font-weight: 400; 68 | white-space: nowrap; 69 | } 70 | .sidebar .nav-links .log_out{ 71 | position: absolute; 72 | bottom: 0; 73 | width: 100%; 74 | } 75 | .home-section{ 76 | position: relative; 77 | background: #f5f5f5; 78 | min-height: 100vh; 79 | width: calc(100% - 240px); 80 | left: 240px; 81 | transition: all 0.5s ease; 82 | } 83 | .sidebar.active ~ .home-section{ 84 | width: calc(100% - 60px); 85 | left: 60px; 86 | } 87 | .home-section nav{ 88 | display: flex; 89 | justify-content: space-between; 90 | height: 80px; 91 | background: #fff; 92 | display: flex; 93 | align-items: center; 94 | position: fixed; 95 | width: calc(100% - 240px); 96 | left: 240px; 97 | z-index: 100; 98 | padding: 0 20px; 99 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); 100 | transition: all 0.5s ease; 101 | } 102 | .sidebar.active ~ .home-section nav{ 103 | left: 60px; 104 | width: calc(100% - 60px); 105 | } 106 | .home-section nav .sidebar-button{ 107 | display: flex; 108 | align-items: center; 109 | font-size: 24px; 110 | font-weight: 500; 111 | } 112 | nav .sidebar-button i{ 113 | font-size: 35px; 114 | margin-right: 10px; 115 | } 116 | .home-section nav .search-box{ 117 | position: relative; 118 | height: 50px; 119 | max-width: 550px; 120 | width: 100%; 121 | margin: 0 20px; 122 | } 123 | nav .search-box input{ 124 | height: 100%; 125 | width: 100%; 126 | outline: none; 127 | background: #F5F6FA; 128 | border: 2px solid #EFEEF1; 129 | border-radius: 6px; 130 | font-size: 18px; 131 | padding: 0 15px; 132 | } 133 | nav .search-box .bx-search{ 134 | position: absolute; 135 | height: 40px; 136 | width: 40px; 137 | background: #2697FF; 138 | right: 5px; 139 | top: 50%; 140 | transform: translateY(-50%); 141 | border-radius: 4px; 142 | line-height: 40px; 143 | text-align: center; 144 | color: #fff; 145 | font-size: 22px; 146 | transition: all 0.4 ease; 147 | } 148 | .home-section nav .profile-details{ 149 | display: flex; 150 | align-items: center; 151 | background: #F5F6FA; 152 | border: 2px solid #EFEEF1; 153 | border-radius: 6px; 154 | height: 50px; 155 | min-width: 190px; 156 | padding: 0 15px 0 2px; 157 | } 158 | nav .profile-details img{ 159 | height: 40px; 160 | width: 40px; 161 | border-radius: 6px; 162 | object-fit: cover; 163 | } 164 | nav .profile-details .admin_name{ 165 | font-size: 15px; 166 | font-weight: 500; 167 | color: #333; 168 | margin: 0 10px; 169 | white-space: nowrap; 170 | } 171 | nav .profile-details i{ 172 | font-size: 25px; 173 | color: #333; 174 | } 175 | 176 | 177 | nav .profile-options { 178 | position: absolute; 179 | top: 100%; 180 | 181 | z-index: 1; 182 | display: none; 183 | padding: 0; 184 | margin: 0; 185 | list-style: none; 186 | background-color: #fff; 187 | border: 1px solid #ddd; 188 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 189 | border-radius: 5px; 190 | } 191 | 192 | nav .profile-options.show { 193 | display: block; 194 | right: 17px; 195 | } 196 | 197 | nav .profile-options li { 198 | margin: 0; 199 | border-bottom: 1px solid #ddd; 200 | } 201 | 202 | nav .profile-options li:last-child { 203 | border-bottom: none; 204 | } 205 | 206 | nav .profile-options li a { 207 | display: flex; 208 | align-items: center; 209 | padding: 10px 15px; 210 | text-decoration: none; 211 | color: #333; 212 | transition: background-color 0.2s ease-in-out; 213 | } 214 | 215 | nav .profile-options li a:hover { 216 | background-color: #f5f5f5; 217 | color: #000; 218 | } 219 | 220 | nav .profile-options li a i { 221 | margin-right: 10px; 222 | font-size: 18px; 223 | } 224 | 225 | .home-section .home-content{ 226 | position: relative; 227 | padding-top: 104px; 228 | } 229 | .home-content .overview-boxes{ 230 | display: flex; 231 | align-items: center; 232 | justify-content: space-between; 233 | flex-wrap: wrap; 234 | padding: 0 20px; 235 | margin-bottom: 26px; 236 | } 237 | .overview-boxes .box{ 238 | display: flex; 239 | align-items: center; 240 | justify-content: center; 241 | width: calc(100% / 4 - 15px); 242 | background: #fff; 243 | padding: 15px 14px; 244 | border-radius: 12px; 245 | box-shadow: 0 5px 10px rgba(0,0,0,0.1); 246 | } 247 | .overview-boxes .box-topic{ 248 | font-size: 20px; 249 | font-weight: 500; 250 | } 251 | .home-content .box .number{ 252 | display: inline-block; 253 | font-size: 35px; 254 | margin-top: -6px; 255 | font-weight: 500; 256 | } 257 | .home-content .box .indicator{ 258 | display: flex; 259 | align-items: center; 260 | } 261 | .home-content .box .indicator i{ 262 | height: 20px; 263 | width: 20px; 264 | background: #8FDACB; 265 | line-height: 20px; 266 | text-align: center; 267 | border-radius: 50%; 268 | color: #fff; 269 | font-size: 20px; 270 | margin-right: 5px; 271 | } 272 | .box .indicator i.down{ 273 | background: #e87d88; 274 | } 275 | .home-content .box .indicator .text{ 276 | font-size: 12px; 277 | } 278 | .home-content .box .cart{ 279 | display: inline-block; 280 | font-size: 32px; 281 | height: 50px; 282 | width: 50px; 283 | background: #cce5ff; 284 | line-height: 50px; 285 | text-align: center; 286 | color: #66b0ff; 287 | border-radius: 12px; 288 | margin: -15px 0 0 6px; 289 | } 290 | .home-content .box .cart.two{ 291 | color: #2BD47D; 292 | background: #C0F2D8; 293 | } 294 | .home-content .box .cart.three{ 295 | color: #ffc233; 296 | background: #ffe8b3; 297 | } 298 | .home-content .box .cart.four{ 299 | color: #e05260; 300 | background: #f7d4d7; 301 | } 302 | .home-content .total-order{ 303 | font-size: 20px; 304 | font-weight: 500; 305 | } 306 | .home-content .sales-boxes{ 307 | display: flex; 308 | justify-content: space-between; 309 | /* padding: 0 20px; */ 310 | } 311 | 312 | /* left box */ 313 | .home-content .sales-boxes .recent-sales{ 314 | width: 65%; 315 | background: #fff; 316 | padding: 20px 30px; 317 | margin: 0 20px; 318 | border-radius: 12px; 319 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); 320 | } 321 | .home-content .sales-boxes .sales-details{ 322 | display: flex; 323 | align-items: center; 324 | justify-content: space-between; 325 | } 326 | .sales-boxes .box .title{ 327 | font-size: 24px; 328 | font-weight: 500; 329 | /* margin-bottom: 10px; */ 330 | } 331 | .sales-boxes .sales-details li.topic{ 332 | font-size: 20px; 333 | font-weight: 500; 334 | } 335 | .sales-boxes .sales-details li{ 336 | list-style: none; 337 | margin: 8px 0; 338 | } 339 | .sales-boxes .sales-details li a{ 340 | font-size: 18px; 341 | color: #333; 342 | font-size: 400; 343 | text-decoration: none; 344 | } 345 | .sales-boxes .box .button{ 346 | width: 100%; 347 | display: flex; 348 | justify-content: flex-end; 349 | } 350 | .sales-boxes .box .button a{ 351 | color: #fff; 352 | background: #0A2558; 353 | padding: 4px 12px; 354 | font-size: 15px; 355 | font-weight: 400; 356 | border-radius: 4px; 357 | text-decoration: none; 358 | transition: all 0.3s ease; 359 | } 360 | .sales-boxes .box .button a:hover{ 361 | background: #0d3073; 362 | } 363 | 364 | /* Right box */ 365 | .home-content .sales-boxes .top-sales{ 366 | width: 35%; 367 | background: #fff; 368 | padding: 20px 30px; 369 | margin: 0 20px 0 0; 370 | border-radius: 12px; 371 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); 372 | } 373 | .sales-boxes .top-sales li{ 374 | display: flex; 375 | align-items: center; 376 | justify-content: space-between; 377 | margin: 10px 0; 378 | } 379 | .sales-boxes .top-sales li a img{ 380 | height: 40px; 381 | width: 40px; 382 | object-fit: cover; 383 | border-radius: 12px; 384 | margin-right: 10px; 385 | background: #333; 386 | } 387 | .sales-boxes .top-sales li a{ 388 | display: flex; 389 | align-items: center; 390 | text-decoration: none; 391 | } 392 | .sales-boxes .top-sales li .product, 393 | .price{ 394 | font-size: 17px; 395 | font-weight: 400; 396 | color: #333; 397 | } 398 | /* Responsive Media Query */ 399 | @media (max-width: 1240px) { 400 | .sidebar{ 401 | width: 60px; 402 | } 403 | .sidebar.active{ 404 | width: 220px; 405 | } 406 | .home-section{ 407 | width: calc(100% - 60px); 408 | left: 60px; 409 | } 410 | .sidebar.active ~ .home-section{ 411 | /* width: calc(100% - 220px); */ 412 | overflow: hidden; 413 | left: 220px; 414 | } 415 | .home-section nav{ 416 | width: calc(100% - 60px); 417 | left: 60px; 418 | } 419 | .sidebar.active ~ .home-section nav{ 420 | width: calc(100% - 220px); 421 | left: 220px; 422 | } 423 | } 424 | @media (max-width: 1150px) { 425 | .home-content .sales-boxes{ 426 | flex-direction: column; 427 | } 428 | .home-content .sales-boxes .box{ 429 | width: 100%; 430 | overflow-x: scroll; 431 | margin-bottom: 30px; 432 | } 433 | .home-content .sales-boxes .top-sales{ 434 | margin: 0; 435 | } 436 | } 437 | @media (max-width: 1000px) { 438 | .overview-boxes .box{ 439 | width: calc(100% / 2 - 15px); 440 | margin-bottom: 15px; 441 | } 442 | } 443 | @media (max-width: 700px) { 444 | nav .sidebar-button .dashboard, 445 | nav .profile-details .admin_name, 446 | nav .profile-details i{ 447 | display: none; 448 | } 449 | .home-section nav .profile-details{ 450 | height: 50px; 451 | min-width: 40px; 452 | } 453 | .home-content .sales-boxes .sales-details{ 454 | width: 560px; 455 | } 456 | } 457 | @media (max-width: 550px) { 458 | .overview-boxes .box{ 459 | width: 100%; 460 | margin-bottom: 15px; 461 | } 462 | .sidebar.active ~ .home-section nav .profile-details{ 463 | display: none; 464 | } 465 | } 466 | @media (max-width: 400px) { 467 | .sidebar{ 468 | width: 0; 469 | } 470 | .sidebar.active{ 471 | width: 60px; 472 | } 473 | .home-section{ 474 | width: 100%; 475 | left: 0; 476 | } 477 | .sidebar.active ~ .home-section{ 478 | left: 60px; 479 | width: calc(100% - 60px); 480 | } 481 | .home-section nav{ 482 | width: 100%; 483 | left: 0; 484 | } 485 | .sidebar.active ~ .home-section nav{ 486 | left: 60px; 487 | width: calc(100% - 60px); 488 | } 489 | } 490 | -------------------------------------------------------------------------------- /includes/database.php: -------------------------------------------------------------------------------- 1 | 2 | connect_error) { 12 | die("Connection failed: " . $db->connect_error); 13 | } 14 | 15 | ?> 16 | -------------------------------------------------------------------------------- /includes/expense-report.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 97 |
98 | 167 | 168 | 227 | 228 | 229 | 237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |

Expense Report

246 |
247 |
248 | 249 |
250 |
251 |
252 |
253 |
Datewise Report from to
254 |
255 | 0) { 259 | ?> 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 289 | 290 | 291 | 292 | 293 | 294 | 295 |
S.NODateCategoryDescriptionRegistered Date Amount
Grand Total
296 | No data found

"; 299 | } 300 | ?> 301 |
302 |
303 |
304 |
305 |
306 | 307 | 308 |
309 | 310 | 321 | -------------------------------------------------------------------------------- /includes/footer.php: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /includes/get_data.php: -------------------------------------------------------------------------------- 1 | DATE_SUB(NOW(), INTERVAL 30 DAY) GROUP BY ExpenseDate"); 10 | $data = array(); 11 | while ($result = mysqli_fetch_array($query)) { 12 | $data[] = array(strtotime($result['ExpenseDate']) * 1000, (float)$result['total_cost']); 13 | } 14 | 15 | // Return data as JSON 16 | echo json_encode($data); 17 | ?> 18 | -------------------------------------------------------------------------------- /includes/head.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Expenditure 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /includes/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 36 |
-------------------------------------------------------------------------------- /includes/images/Mobile-login-Cristina.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/includes/images/Mobile-login-Cristina.jpg -------------------------------------------------------------------------------- /includes/images/Wavy_Tech-28_Single-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/includes/images/Wavy_Tech-28_Single-10.jpg -------------------------------------------------------------------------------- /includes/images/addex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/includes/images/addex.png -------------------------------------------------------------------------------- /includes/images/draw1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/includes/images/draw1.webp -------------------------------------------------------------------------------- /includes/images/draw2.svg: -------------------------------------------------------------------------------- 1 | unlock -------------------------------------------------------------------------------- /includes/images/maex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/includes/images/maex.png -------------------------------------------------------------------------------- /includes/images/prof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shiv-modi/Daily-Expense-Tracker-Using-PHP-and-MySQL./4ab18688ff394ac2a50eaecaada089dbd2f06b30/includes/images/prof.png -------------------------------------------------------------------------------- /includes/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | 19 | 20 | 24 | 25 | 26 | 27 | 31 | 32 | real_escape_string($_POST['email']); 43 | $password = $db->real_escape_string($_POST['password']); 44 | 45 | // Select the user from the database 46 | $query = "SELECT id, password FROM users WHERE email = '$email'"; 47 | $result = $db->query($query); 48 | 49 | // If a user was found 50 | if ($result->num_rows == 1) { 51 | // Get the user's data 52 | $user = $result->fetch_object(); 53 | 54 | // Check the password 55 | if (password_verify($password, $user->password)) { 56 | // Start a session 57 | session_start(); 58 | 59 | // Save the user's data to the session 60 | $_SESSION['detsuid'] = $user->id; 61 | 62 | // Redirect to the homepage 63 | header('Location: home.php'); 64 | exit; 65 | } else { 66 | // Show an error message 67 | $msg = "Invalid Details."; 68 | } 69 | } else { 70 | // Show an error message 71 | $msg = "Invalid Details."; 72 | } 73 | } 74 | ?> 75 | 76 | 77 | 78 | 79 |
80 |
81 |
82 |
83 | Sample image 85 |
86 |
87 |
88 | 89 | 90 |

Login

91 |

Please enter your login and password!

92 |

95 | 96 |
97 | 98 | 99 | 100 |
101 | 102 | 103 |
104 | 105 | 106 | 107 | 108 | 109 |
110 | 111 |
112 | 113 |
114 | 115 | 118 |
119 | Forgot password? 120 |
121 | 122 |
123 | 125 |

Don't have an account? Create account

127 |
128 | 129 |
130 |
131 |
132 |
133 | 134 |
135 | 155 | 156 | 157 | 158 | 159 | 160 | 194 | 195 | -------------------------------------------------------------------------------- /includes/js/app.js: -------------------------------------------------------------------------------- 1 | const sign_in_btn = document.querySelector("#sign-in-btn"); 2 | const sign_up_btn = document.querySelector("#sign-up-btn"); 3 | const container = document.querySelector(".container"); 4 | 5 | sign_up_btn.addEventListener("click", () => { 6 | container.classList.add("sign-up-mode"); 7 | }); 8 | 9 | sign_in_btn.addEventListener("click", () => { 10 | container.classList.remove("sign-up-mode"); 11 | }); 12 | -------------------------------------------------------------------------------- /includes/js/chart-data.js: -------------------------------------------------------------------------------- 1 | var randomScalingFactor = function(){ return Math.round(Math.random()*1000)}; 2 | 3 | var lineChartData = { 4 | labels : ["January","February","March","April","May","June","July"], 5 | datasets : [ 6 | { 7 | label: "My First dataset", 8 | fillColor : "rgba(220,220,220,0.2)", 9 | strokeColor : "rgba(220,220,220,1)", 10 | pointColor : "rgba(220,220,220,1)", 11 | pointStrokeColor : "#fff", 12 | pointHighlightFill : "#fff", 13 | pointHighlightStroke : "rgba(220,220,220,1)", 14 | data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 15 | }, 16 | { 17 | label: "My Second dataset", 18 | fillColor : "rgba(48, 164, 255, 0.2)", 19 | strokeColor : "rgba(48, 164, 255, 1)", 20 | pointColor : "rgba(48, 164, 255, 1)", 21 | pointStrokeColor : "#fff", 22 | pointHighlightFill : "#fff", 23 | pointHighlightStroke : "rgba(48, 164, 255, 1)", 24 | data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 25 | } 26 | ] 27 | 28 | } 29 | 30 | var barChartData = { 31 | labels : ["January","February","March","April","May","June","July"], 32 | datasets : [ 33 | { 34 | fillColor : "rgba(220,220,220,0.5)", 35 | strokeColor : "rgba(220,220,220,0.8)", 36 | highlightFill: "rgba(220,220,220,0.75)", 37 | highlightStroke: "rgba(220,220,220,1)", 38 | data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 39 | }, 40 | { 41 | fillColor : "rgba(48, 164, 255, 0.2)", 42 | strokeColor : "rgba(48, 164, 255, 0.8)", 43 | highlightFill : "rgba(48, 164, 255, 0.75)", 44 | highlightStroke : "rgba(48, 164, 255, 1)", 45 | data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 46 | } 47 | ] 48 | 49 | } 50 | 51 | var pieData = [ 52 | { 53 | value: 300, 54 | color:"#30a5ff", 55 | highlight: "#62b9fb", 56 | label: "Blue" 57 | }, 58 | { 59 | value: 50, 60 | color: "#ffb53e", 61 | highlight: "#fac878", 62 | label: "Orange" 63 | }, 64 | { 65 | value: 100, 66 | color: "#1ebfae", 67 | highlight: "#3cdfce", 68 | label: "Teal" 69 | }, 70 | { 71 | value: 120, 72 | color: "#f9243f", 73 | highlight: "#f6495f", 74 | label: "Red" 75 | } 76 | 77 | ]; 78 | 79 | var doughnutData = [ 80 | { 81 | value: 300, 82 | color:"#30a5ff", 83 | highlight: "#62b9fb", 84 | label: "Blue" 85 | }, 86 | { 87 | value: 50, 88 | color: "#ffb53e", 89 | highlight: "#fac878", 90 | label: "Orange" 91 | }, 92 | { 93 | value: 100, 94 | color: "#1ebfae", 95 | highlight: "#3cdfce", 96 | label: "Teal" 97 | }, 98 | { 99 | value: 120, 100 | color: "#f9243f", 101 | highlight: "#f6495f", 102 | label: "Red" 103 | } 104 | 105 | ]; 106 | 107 | var radarData = { 108 | labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"], 109 | datasets: [ 110 | { 111 | label: "My First dataset", 112 | fillColor: "rgba(220,220,220,0.2)", 113 | strokeColor: "rgba(220,220,220,1)", 114 | pointColor: "rgba(220,220,220,1)", 115 | pointStrokeColor: "#fff", 116 | pointHighlightFill: "#fff", 117 | pointHighlightStroke: "rgba(220,220,220,1)", 118 | data: [65, 59, 90, 81, 56, 55, 40] 119 | }, 120 | { 121 | label: "My Second dataset", 122 | fillColor : "rgba(48, 164, 255, 0.2)", 123 | strokeColor : "rgba(48, 164, 255, 0.8)", 124 | pointColor : "rgba(48, 164, 255, 1)", 125 | pointStrokeColor : "#fff", 126 | pointHighlightFill : "#fff", 127 | pointHighlightStroke : "rgba(48, 164, 255, 1)", 128 | data: [28, 48, 40, 19, 96, 27, 100] 129 | } 130 | ] 131 | }; 132 | 133 | var polarData = [ 134 | { 135 | value: 300, 136 | color: "#1ebfae", 137 | highlight: "#38cabe", 138 | label: "Teal" 139 | }, 140 | { 141 | value: 140, 142 | color: "#ffb53e", 143 | highlight: "#fac878", 144 | label: "Orange" 145 | }, 146 | { 147 | value: 220, 148 | color:"#30a5ff", 149 | highlight: "#62b9fb", 150 | label: "Blue" 151 | }, 152 | { 153 | value: 250, 154 | color: "#f9243f", 155 | highlight: "#f6495f", 156 | label: "Red" 157 | } 158 | 159 | ]; 160 | 161 | -------------------------------------------------------------------------------- /includes/js/custom.js: -------------------------------------------------------------------------------- 1 | $('#calendar').datepicker({ 2 | }); 3 | 4 | !function ($) { 5 | $(document).on("click","ul.nav li.parent > a ", function(){ 6 | $(this).find('em').toggleClass("fa-minus"); 7 | }); 8 | $(".sidebar span.icon").find('em:first').addClass("fa-plus"); 9 | } 10 | 11 | (window.jQuery); 12 | $(window).on('resize', function () { 13 | if ($(window).width() > 768) $('#sidebar-collapse').collapse('show') 14 | }) 15 | $(window).on('resize', function () { 16 | if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide') 17 | }) 18 | 19 | $(document).on('click', '.panel-heading span.clickable', function(e){ 20 | var $this = $(this); 21 | if(!$this.hasClass('panel-collapsed')) { 22 | $this.parents('.panel').find('.panel-body').slideUp(); 23 | $this.addClass('panel-collapsed'); 24 | $this.find('em').removeClass('fa-toggle-up').addClass('fa-toggle-down'); 25 | } else { 26 | $this.parents('.panel').find('.panel-body').slideDown(); 27 | $this.removeClass('panel-collapsed'); 28 | $this.find('em').removeClass('fa-toggle-down').addClass('fa-toggle-up'); 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /includes/js/easypiechart-data.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('#easypiechart-teal').easyPieChart({ 3 | scaleColor: false, 4 | barColor: '#1ebfae' 5 | }); 6 | }); 7 | 8 | $(function() { 9 | $('#easypiechart-orange').easyPieChart({ 10 | scaleColor: false, 11 | barColor: '#ffb53e' 12 | }); 13 | }); 14 | 15 | $(function() { 16 | $('#easypiechart-red').easyPieChart({ 17 | scaleColor: false, 18 | barColor: '#f9243f' 19 | }); 20 | }); 21 | 22 | $(function() { 23 | $('#easypiechart-blue').easyPieChart({ 24 | scaleColor: false, 25 | barColor: '#30a5ff' 26 | }); 27 | }); -------------------------------------------------------------------------------- /includes/js/easypiechart.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * easyPieChart 3 | * Lightweight plugin to render simple, animated and retina optimized pie charts 4 | * 5 | * @license 6 | * @author Robert Fleischmann (http://robert-fleischmann.de) 7 | * @version 2.1.5 8 | **/ 9 | 10 | (function(root, factory) { 11 | if(typeof exports === 'object') { 12 | module.exports = factory(require('jquery')); 13 | } 14 | else if(typeof define === 'function' && define.amd) { 15 | define(['jquery'], factory); 16 | } 17 | else { 18 | factory(root.jQuery); 19 | } 20 | }(this, function($) { 21 | 22 | /** 23 | * Renderer to render the chart on a canvas object 24 | * @param {DOMElement} el DOM element to host the canvas (root of the plugin) 25 | * @param {object} options options object of the plugin 26 | */ 27 | var CanvasRenderer = function(el, options) { 28 | var cachedBackground; 29 | var canvas = document.createElement('canvas'); 30 | 31 | el.appendChild(canvas); 32 | 33 | if (typeof(G_vmlCanvasManager) !== 'undefined') { 34 | G_vmlCanvasManager.initElement(canvas); 35 | } 36 | 37 | var ctx = canvas.getContext('2d'); 38 | 39 | canvas.width = canvas.height = options.size; 40 | 41 | // canvas on retina devices 42 | var scaleBy = 1; 43 | if (window.devicePixelRatio > 1) { 44 | scaleBy = window.devicePixelRatio; 45 | canvas.style.width = canvas.style.height = [options.size, 'px'].join(''); 46 | canvas.width = canvas.height = options.size * scaleBy; 47 | ctx.scale(scaleBy, scaleBy); 48 | } 49 | 50 | // move 0,0 coordinates to the center 51 | ctx.translate(options.size / 2, options.size / 2); 52 | 53 | // rotate canvas -90deg 54 | ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI); 55 | 56 | var radius = (options.size - options.lineWidth) / 2; 57 | if (options.scaleColor && options.scaleLength) { 58 | radius -= options.scaleLength + 2; // 2 is the distance between scale and bar 59 | } 60 | 61 | // IE polyfill for Date 62 | Date.now = Date.now || function() { 63 | return +(new Date()); 64 | }; 65 | 66 | /** 67 | * Draw a circle around the center of the canvas 68 | * @param {strong} color Valid CSS color string 69 | * @param {number} lineWidth Width of the line in px 70 | * @param {number} percent Percentage to draw (float between -1 and 1) 71 | */ 72 | var drawCircle = function(color, lineWidth, percent) { 73 | percent = Math.min(Math.max(-1, percent || 0), 1); 74 | var isNegative = percent <= 0 ? true : false; 75 | 76 | ctx.beginPath(); 77 | ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative); 78 | 79 | ctx.strokeStyle = color; 80 | ctx.lineWidth = lineWidth; 81 | 82 | ctx.stroke(); 83 | }; 84 | 85 | /** 86 | * Draw the scale of the chart 87 | */ 88 | var drawScale = function() { 89 | var offset; 90 | var length; 91 | 92 | ctx.lineWidth = 1; 93 | ctx.fillStyle = options.scaleColor; 94 | 95 | ctx.save(); 96 | for (var i = 24; i > 0; --i) { 97 | if (i % 6 === 0) { 98 | length = options.scaleLength; 99 | offset = 0; 100 | } else { 101 | length = options.scaleLength * 0.6; 102 | offset = options.scaleLength - length; 103 | } 104 | ctx.fillRect(-options.size/2 + offset, 0, length, 1); 105 | ctx.rotate(Math.PI / 12); 106 | } 107 | ctx.restore(); 108 | }; 109 | 110 | /** 111 | * Request animation frame wrapper with polyfill 112 | * @return {function} Request animation frame method or timeout fallback 113 | */ 114 | var reqAnimationFrame = (function() { 115 | return window.requestAnimationFrame || 116 | window.webkitRequestAnimationFrame || 117 | window.mozRequestAnimationFrame || 118 | function(callback) { 119 | window.setTimeout(callback, 1000 / 60); 120 | }; 121 | }()); 122 | 123 | /** 124 | * Draw the background of the plugin including the scale and the track 125 | */ 126 | var drawBackground = function() { 127 | if(options.scaleColor) drawScale(); 128 | if(options.trackColor) drawCircle(options.trackColor, options.lineWidth, 1); 129 | }; 130 | 131 | /** 132 | * Canvas accessor 133 | */ 134 | this.getCanvas = function() { 135 | return canvas; 136 | }; 137 | 138 | /** 139 | * Canvas 2D context 'ctx' accessor 140 | */ 141 | this.getCtx = function() { 142 | return ctx; 143 | }; 144 | 145 | /** 146 | * Clear the complete canvas 147 | */ 148 | this.clear = function() { 149 | ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size); 150 | }; 151 | 152 | /** 153 | * Draw the complete chart 154 | * @param {number} percent Percent shown by the chart between -100 and 100 155 | */ 156 | this.draw = function(percent) { 157 | // do we need to render a background 158 | if (!!options.scaleColor || !!options.trackColor) { 159 | // getImageData and putImageData are supported 160 | if (ctx.getImageData && ctx.putImageData) { 161 | if (!cachedBackground) { 162 | drawBackground(); 163 | cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy); 164 | } else { 165 | ctx.putImageData(cachedBackground, 0, 0); 166 | } 167 | } else { 168 | this.clear(); 169 | drawBackground(); 170 | } 171 | } else { 172 | this.clear(); 173 | } 174 | 175 | ctx.lineCap = options.lineCap; 176 | 177 | // if barcolor is a function execute it and pass the percent as a value 178 | var color; 179 | if (typeof(options.barColor) === 'function') { 180 | color = options.barColor(percent); 181 | } else { 182 | color = options.barColor; 183 | } 184 | 185 | // draw bar 186 | drawCircle(color, options.lineWidth, percent / 100); 187 | }.bind(this); 188 | 189 | /** 190 | * Animate from some percent to some other percentage 191 | * @param {number} from Starting percentage 192 | * @param {number} to Final percentage 193 | */ 194 | this.animate = function(from, to) { 195 | var startTime = Date.now(); 196 | options.onStart(from, to); 197 | var animation = function() { 198 | var process = Math.min(Date.now() - startTime, options.animate.duration); 199 | var currentValue = options.easing(this, process, from, to - from, options.animate.duration); 200 | this.draw(currentValue); 201 | options.onStep(from, to, currentValue); 202 | if (process >= options.animate.duration) { 203 | options.onStop(from, to); 204 | } else { 205 | reqAnimationFrame(animation); 206 | } 207 | }.bind(this); 208 | 209 | reqAnimationFrame(animation); 210 | }.bind(this); 211 | }; 212 | 213 | var EasyPieChart = function(el, opts) { 214 | var defaultOptions = { 215 | barColor: '#ef1e25', 216 | trackColor: '#f9f9f9', 217 | scaleColor: '#dfe0e0', 218 | scaleLength: 5, 219 | lineCap: 'round', 220 | lineWidth: 3, 221 | size: 110, 222 | rotate: 0, 223 | animate: { 224 | duration: 1000, 225 | enabled: true 226 | }, 227 | easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/ 228 | t = t / (d/2); 229 | if (t < 1) { 230 | return c / 2 * t * t + b; 231 | } 232 | return -c/2 * ((--t)*(t-2) - 1) + b; 233 | }, 234 | onStart: function(from, to) { 235 | return; 236 | }, 237 | onStep: function(from, to, currentValue) { 238 | return; 239 | }, 240 | onStop: function(from, to) { 241 | return; 242 | } 243 | }; 244 | 245 | // detect present renderer 246 | if (typeof(CanvasRenderer) !== 'undefined') { 247 | defaultOptions.renderer = CanvasRenderer; 248 | } else if (typeof(SVGRenderer) !== 'undefined') { 249 | defaultOptions.renderer = SVGRenderer; 250 | } else { 251 | throw new Error('Please load either the SVG- or the CanvasRenderer'); 252 | } 253 | 254 | var options = {}; 255 | var currentValue = 0; 256 | 257 | /** 258 | * Initialize the plugin by creating the options object and initialize rendering 259 | */ 260 | var init = function() { 261 | this.el = el; 262 | this.options = options; 263 | 264 | // merge user options into default options 265 | for (var i in defaultOptions) { 266 | if (defaultOptions.hasOwnProperty(i)) { 267 | options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i]; 268 | if (typeof(options[i]) === 'function') { 269 | options[i] = options[i].bind(this); 270 | } 271 | } 272 | } 273 | 274 | // check for jQuery easing 275 | if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) { 276 | options.easing = jQuery.easing[options.easing]; 277 | } else { 278 | options.easing = defaultOptions.easing; 279 | } 280 | 281 | // process earlier animate option to avoid bc breaks 282 | if (typeof(options.animate) === 'number') { 283 | options.animate = { 284 | duration: options.animate, 285 | enabled: true 286 | }; 287 | } 288 | 289 | if (typeof(options.animate) === 'boolean' && !options.animate) { 290 | options.animate = { 291 | duration: 1000, 292 | enabled: options.animate 293 | }; 294 | } 295 | 296 | // create renderer 297 | this.renderer = new options.renderer(el, options); 298 | 299 | // initial draw 300 | this.renderer.draw(currentValue); 301 | 302 | // initial update 303 | if (el.dataset && el.dataset.percent) { 304 | this.update(parseFloat(el.dataset.percent)); 305 | } else if (el.getAttribute && el.getAttribute('data-percent')) { 306 | this.update(parseFloat(el.getAttribute('data-percent'))); 307 | } 308 | }.bind(this); 309 | 310 | /** 311 | * Update the value of the chart 312 | * @param {number} newValue Number between 0 and 100 313 | * @return {object} Instance of the plugin for method chaining 314 | */ 315 | this.update = function(newValue) { 316 | newValue = parseFloat(newValue); 317 | if (options.animate.enabled) { 318 | this.renderer.animate(currentValue, newValue); 319 | } else { 320 | this.renderer.draw(newValue); 321 | } 322 | currentValue = newValue; 323 | return this; 324 | }.bind(this); 325 | 326 | /** 327 | * Disable animation 328 | * @return {object} Instance of the plugin for method chaining 329 | */ 330 | this.disableAnimation = function() { 331 | options.animate.enabled = false; 332 | return this; 333 | }; 334 | 335 | /** 336 | * Enable animation 337 | * @return {object} Instance of the plugin for method chaining 338 | */ 339 | this.enableAnimation = function() { 340 | options.animate.enabled = true; 341 | return this; 342 | }; 343 | 344 | init(); 345 | }; 346 | 347 | $.fn.easyPieChart = function(options) { 348 | return this.each(function() { 349 | var instanceOptions; 350 | 351 | if (!$.data(this, 'easyPieChart')) { 352 | instanceOptions = $.extend({}, options, $(this).data()); 353 | $.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions)); 354 | } 355 | }); 356 | }; 357 | 358 | 359 | })); 360 | -------------------------------------------------------------------------------- /includes/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); -------------------------------------------------------------------------------- /includes/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /includes/js/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! Respond.js v1.4.2: min/max-width media query polyfill 2 | * Copyright 2014 Scott Jehl 3 | * Licensed under MIT 4 | * http://j.mp/respondjs */ 5 | 6 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b { 7 | navId.classList.add("show"); 8 | }); 9 | 10 | // ==== HIDE MENU ==== // 11 | CloseBtnId.addEventListener("click", () => { 12 | navId.classList.remove("show"); 13 | }); 14 | 15 | // ==== Animate on Scroll Initialize ==== // 16 | AOS.init(); 17 | 18 | // ==== GSAP Animations ==== // 19 | // ==== LOGO ==== // 20 | gsap.from(".logo", { 21 | opacity: 0, 22 | y: -10, 23 | delay: 1, 24 | duration: 0.5, 25 | }); 26 | // ==== NAV-MENU ==== // 27 | gsap.from(".nav_menu_list .nav_menu_item", { 28 | opacity: 0, 29 | y: -10, 30 | delay: 1.4, 31 | duration: 0.5, 32 | stagger: 0.3, 33 | }); 34 | // ==== TOGGLE BTN ==== // 35 | gsap.from(".toggle_btn", { 36 | opacity: 0, 37 | y: -10, 38 | delay: 1.4, 39 | duration: 0.5, 40 | }); 41 | // ==== MAIN HEADING ==== // 42 | gsap.from(".main-heading", { 43 | opacity: 0, 44 | y: 20, 45 | delay: 2.4, 46 | duration: 1, 47 | }); 48 | // ==== INFO TEXT ==== // 49 | gsap.from(".info-text", { 50 | opacity: 0, 51 | y: 20, 52 | delay: 2.8, 53 | duration: 1, 54 | }); 55 | // ==== CTA BUTTONS ==== // 56 | gsap.from(".btn_wrapper", { 57 | opacity: 0, 58 | y: 20, 59 | delay: 2.8, 60 | duration: 1, 61 | }); 62 | // ==== TEAM IMAGE ==== // 63 | gsap.from(".team_img_wrapper img", { 64 | opacity: 0, 65 | y: 20, 66 | delay: 3, 67 | duration: 1, 68 | }); 69 | 70 | 71 | -------------------------------------------------------------------------------- /includes/js/scripts.js: -------------------------------------------------------------------------------- 1 | // home 2 | 3 | -------------------------------------------------------------------------------- /includes/lending.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 68 | 69 | 70 | 133 |
134 | 172 | 173 |
174 |
175 | 176 | 177 |
178 |
179 | 180 |
181 |
182 |
183 |
184 |

Add lending

185 | 186 |
187 | 188 | 189 | 190 | 191 |
192 |
193 | 194 | 195 | alert("New lending record created successfully");'; 221 | echo " "; 222 | 223 | } else { 224 | echo "Error: " . $sql . "
" . mysqli_error($conn); 225 | } 226 | 227 | mysqli_close($conn); 228 | } 229 | ?> 230 | 231 |
232 |
233 |
234 | 235 | 236 |
237 | 238 |
239 | 240 | 241 |
242 |
243 | 244 | 245 |
246 |
247 | 248 | 249 | Maximum 250 characters. 250 |
251 |
252 | 253 | 257 |
258 | 259 |
260 |
261 | 262 | 263 | 264 |
265 | 266 | 267 | 268 | 269 | 280 | 281 | -------------------------------------------------------------------------------- /includes/logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/pending-report.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 97 |
98 | 166 | 167 | 226 | 234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |

Pending Report

243 |
244 |
245 | 246 |
247 |
248 |
249 |
250 |
Pending Report from to
251 |
252 | 0) { 256 | ?> 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 276 | 277 | 278 | 279 | 280 | 286 | 287 | 288 | 289 | 293 | 294 | 295 | 296 | 297 | 298 | 299 |
S.NONameDate of lendingStatusDescription Amount
Received'; 282 | } else { 283 | echo 'Pending'; 284 | }?> 285 |
Grand Total
300 | No data found

"; 303 | } 304 | ?> 305 |
306 |
307 |
308 |
309 |
310 | 311 | 312 | 313 |
314 | 315 | 326 | -------------------------------------------------------------------------------- /includes/pie-data.php: -------------------------------------------------------------------------------- 1 | $row['category'], 27 | 'total_expense' => $row['total_expense'], 28 | ); 29 | } 30 | 31 | // Calculate the total expense 32 | $total_expense = array_reduce($data, function($acc, $item) { 33 | return $acc + $item['total_expense']; 34 | }); 35 | 36 | // Calculate the percentage for each category 37 | foreach ($data as &$item) { 38 | $item['percentage'] = ($item['total_expense'] / $total_expense) * 100; 39 | } 40 | 41 | // Convert the array to JSON format and output it 42 | echo json_encode($data); 43 | ?> 44 | -------------------------------------------------------------------------------- /includes/received-report.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 97 |
98 | 167 | 168 | 227 | 235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |

Received Report

244 |
245 |
246 | 247 |
248 |
249 |
250 |
251 |
Received Report from to
252 |
253 | 0) { 257 | ?> 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 277 | 278 | 279 | 280 | 281 | 287 | 288 | 289 | 290 | 294 | 295 | 296 | 297 | 298 | 299 | 300 |
S.NONameDate of lendingStatusDescription Amount
Received'; 283 | } else { 284 | echo 'Pending'; 285 | }?> 286 |
Grand Total
301 | No data found

"; 304 | } 305 | ?> 306 |
307 |
308 |
309 |
310 |
311 | 312 | 313 | 314 |
315 | 316 | 327 | -------------------------------------------------------------------------------- /includes/report.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 98 |
99 | 137 | 138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |

Report

147 |
148 |
149 |
150 |
151 |
152 |
153 | 154 | 160 |
161 |
162 | 163 | 164 |
165 |
166 | 167 | 168 |
169 | 170 |
171 |
172 |
173 |
174 |
175 |
176 | 177 | window.location.href='expense-report.php?startDate=$startDate&endDate=$endDate';"; 187 | } else if ($reportType === 'pending') { 188 | echo ""; 189 | } else if ($reportType === 'received') { 190 | echo ""; 191 | } 192 | 193 | // Set a session variable to track if the page was already refreshed 194 | $_SESSION['reportGenerated'] = true; 195 | } 196 | 197 | // Check if the session variable is set to true and refresh the page only once 198 | if(isset($_SESSION['reportGenerated']) && $_SESSION['reportGenerated'] === true) { 199 | echo ''; 200 | unset($_SESSION['reportGenerated']); // Reset the session variable 201 | } 202 | ?> 203 | 204 | 205 |
206 | 207 | 218 | -------------------------------------------------------------------------------- /includes/search.php: -------------------------------------------------------------------------------- 1 | 0) { 12 | // Loop through each expense and generate HTML for expense details 13 | while($row = mysqli_fetch_assoc($result)) { 14 | echo '
'; 15 | echo '

'.$row['Description'].'

'; 16 | echo '

Amount: '.$row['Amount'].'

'; 17 | echo '

Date: '.$row['Date'].'

'; 18 | echo '
'; 19 | } 20 | } else { 21 | // No expenses were found 22 | echo '

No expenses found.

'; 23 | } 24 | ?> 25 | -------------------------------------------------------------------------------- /includes/signup.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | 19 | 20 | 24 | 25 | 26 | 27 | 31 | 32 |
33 |
34 | 35 |
36 |
37 | 38 |
39 |
40 |
41 | 42 |

Sign up

43 | 44 |
45 | 46 |
47 | 48 |
49 | 50 | 51 |
52 | 58 |
59 | 60 |
61 | 62 |
63 | 64 | 65 |
66 | 67 |
68 | 69 |
70 | 71 |
72 | 73 | 74 |
75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 | 83 | 84 | 85 | 86 |
87 |
88 | 89 |
90 | 91 |
92 | 93 | 94 | 95 | 96 |
97 | 98 | 99 |
100 | 120 |
121 | 122 | 125 |
126 | 127 |
128 | 129 |
130 | 131 | 136 | 153 | 154 | 160 |

Have already an account? Login here

162 | 163 |
164 | 165 |
166 |
167 | 168 | Sample image 170 | 171 |
172 |
173 |
174 |
175 | 176 | 177 |
178 | 179 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | '; 222 | echo 'alert("All fields are required")'; 223 | echo ''; 224 | }elseif(!filter_var($email, FILTER_VALIDATE_EMAIL)){ 225 | echo ''; 228 | }elseif(strlen($phone) < 10){ 229 | echo ''; 232 | 233 | }elseif($password != $confirm_password){ 234 | echo ''; 237 | }elseif(strlen($password) < 8){ 238 | echo ''; 241 | 242 | }else{ 243 | //encrypt password 244 | $password = password_hash($password, PASSWORD_DEFAULT); 245 | 246 | //generate verification code 247 | $verification_code = md5(rand()); 248 | 249 | //store user data in the database 250 | $stmt = $db->prepare("INSERT INTO users (name, email, phone, password, verification_code, created_at) VALUES (?, ?, ?, ?, ?, NOW())"); 251 | $stmt->bind_param("sssss", $name, $email,$phone, $password, $verification_code); 252 | $stmt->execute(); 253 | 254 | //send verification email 255 | $to = $email; 256 | $subject = "Signup Verification"; 257 | $message = "Click the link to verify your email address: http://example.com/verify.php?code=$verification_code"; 258 | $headers = "From: no-reply@example.com"; 259 | mail($to, $subject, $message, $headers); 260 | echo ''; 264 | } 265 | } 266 | 267 | ?> 268 | 269 | -------------------------------------------------------------------------------- /includes/update-expense.php: -------------------------------------------------------------------------------- 1 | alert('$message');"; 16 | echo " "; 17 | } else { 18 | $message = "Expense could not be updated"; 19 | echo ""; 20 | } 21 | } 22 | ?> 23 | -------------------------------------------------------------------------------- /includes/update-lending.php: -------------------------------------------------------------------------------- 1 | prepare('UPDATE lending SET name = ?, date_of_lending = ?, description = ?, amount = ?, status = ? WHERE id = ? AND UserId = ?'); 25 | $stmt->bind_param('ssssssi', $name, $date, $description, $amount, $status, $id, $userid); 26 | $result = $stmt->execute(); 27 | 28 | // Check if the update was successful and redirect to the expenses page with a success message 29 | if ($result) { 30 | $message = "Lending updated successfully"; 31 | echo ""; 32 | echo " "; 33 | exit(); 34 | } else { 35 | // If the update failed, redirect to the edit expense page with an error message 36 | $message = "Please try again !"; 37 | echo ""; 38 | echo " "; 39 | exit(); 40 | } 41 | } 42 | ?> -------------------------------------------------------------------------------- /includes/update_user.php: -------------------------------------------------------------------------------- 1 | alert('$message');"; 19 | echo " "; 20 | exit(); 21 | } else { 22 | // Handle the error case 23 | echo "Error updating user information: " . mysqli_error($db); 24 | } 25 | } 26 | 27 | ?> -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 |
12 |

13 | Welcome to Expenditure. 14 |
15 | To Analysis your spend. 16 |

17 |

18 | Start tracking your daily expenses from any corner of the world. 19 |

20 | 21 | 29 |
30 |
31 |
32 | team-img 33 |
34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | 42 | --------------------------------------------------------------------------------