Download Code – Charity Management System PHP & MySQL Source Code
Advanced Charity Management System Overview
The Advanced Charity Management System is developed using a combination of technologies, including PHP, MySQL Database, HTML, CSS, JavaScript (jQuery and Ajax), Bootstrap, the AdminLTE Template, and other plugins/libraries. The system operates using XAMPP version 3.3.0 with PHP 8.0.7.
How the Charity Management System Works
The Advanced Charity Management System features an Admin Panel that allows for easy management of charity information and programs. The website provides information on charity programs, and all the content and features can be updated or managed via the Admin Panel.
This system is user-friendly and includes several pages, providing essential details and documents related to charity transactions. Users can submit requests for each program listed in the system and track or manage those requests.
Additionally, the system allows users to add new funds to the charity, including details like the transaction type and ID. This feature simplifies the tracking of added funds. The system also generates annual and monthly reports on the charity’s funds.
Key Features and Functionalities
The Advanced Charity Management System includes the following features:
- Secure Login/Logout
- Dashboard Page
- Program Management
- Budget Documents
- Receive Requests
- Verify Requests
- Assign Visits
- Reject/Approve Requests
- Add Funds
- Approve Funds
How to Set Up and Run the System
Requirements
- Download and install a local web server such as XAMPP or WAMP.
- Download the provided source code zip file (link available below).
Installation Steps
- Open your XAMPP/WAMP Control Panel and start the Apache and MySQL servers.
- Extract the downloaded source code zip file.
- If using XAMPP, copy the extracted folder and paste it into the htdocs directory. If using WAMP, paste it into the www directory.
- In your browser, go to http://localhost/phpmyadmin to open PHPMyAdmin.
- Create a new database named tei.
- Import the provided tei.sql file, which is located in the database folder.
- In your browser, visit http://localhost/members to access the Advanced Charity Management System.
Default Admin Account
- Username: 36303-1234567-8
- Password: shahg
Conclusion
This Advanced Charity Management System provides an efficient way to manage charity operations. By implementing this system, you can easily manage programs, track requests, handle funds, and generate detailed reports. It’s a great solution for both current and future PHP projects.
login PHP
1 2 3 4 5 6 7 8 9 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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
<?php include("php/dbconnect.php"); $invalidLoginError = ''; $pendingAccountError = ''; if(isset($_POST['login'])) { $username = mysqli_real_escape_string($conn, trim($_POST['username'])); $password = mysqli_real_escape_string($conn, $_POST['password']); if($username == '' || $password == '') { $invalidLoginError = '<div class="error">All fields are required</div>'; } $sql = "SELECT * FROM schools WHERE cnic='".$username."' AND password = '".$password."'"; $q = $conn->query($sql); if ($q->num_rows == 1) { $res = $q->fetch_assoc(); if ($res['status'] == 'Pending') { $pendingAccountError = '<div class="warning-msg">Your account is pending approval. Please pay first month funding to activate your account.<br><a href="funding.php">Funding Methods</a> </div>'; // stop session if account status is pending session_unset(); session_destroy(); } else if ($res['status'] == 'Active') { $_SESSION['rainbow_uid'] = $res['id']; echo '<script type="text/javascript">window.location="index.php"; </script>'; } } else { $invalidLoginError = '<div class="error-msg">You entered Invalid Username or Password</div>'; } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Login</title> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css"> <link href="login/loginstyle.css" rel="stylesheet" type="text/css"> </head> <body> <div class="login"> <h1>TEI Member Login</h1> <form action="login.php" method="post"> <label for="username"> <i class="fas fa-user"></i> </label> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/jquery.inputmask.bundle.js"></script> <input type="text" class="form-control" data-inputmask="'mask': '99999-9999999-9'" placeholder="XXXXX-XXXXXXX-X" name="username" required="" " /> <script> $(":input").inputmask(); </script> <label for="password"> <i class="fas fa-lock"></i> </label> <input type="password" name="password" placeholder="Password" id="password" required> <?php echo $invalidLoginError; ?> <?php echo $pendingAccountError; ?> <input type="submit" name="login" value="Login"> </form> </div> </body> </html> |
index PHP
1 2 3 4 5 6 7 8 9 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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 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 101 102 103 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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
<?php include"header.php"; include("php/checklogin.php"); ?> <!-- End of Topbar --> <!-- Begin Page Content --> <div class="container-fluid"> <!-- Page Heading --> <div class="d-sm-flex align-items-center justify-content-between mb-4"> <h1 class="h3 mb-0 text-gray-800">Dashboard</h1> <a href="#" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Generate Report</a> </div> <!-- Content Row --> <!-- Content Row --> <div class="row"> <!-- Raised (Monthly) Card Example --> <div class="col-xl-3 col-md-6 mb-4"> <div class="card border-left-primary shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-primary text-uppercase mb-1"> TEI have raised in (<?php echo "$year"; ?>)</div> <div class="h5 mb-0 font-weight-bold text-gray-800"><?php $sql = "SELECT SUM( amount) FROM funds where year='$year' and status='Verified' "; $amountsum = mysqli_query($conn, $sql) or die(mysqli_error($sql)); $row_amountsum = mysqli_fetch_assoc($amountsum); $totalRows_amountsum = mysqli_num_rows($amountsum); echo 'Rs.' .$row_amountsum['SUM( amount)'];?></div> </div> <div class="col-auto"> <i class="fas fa-dollar-sign fa-2x text-gray-300"></i> </div> </div> </div> </div> </div> <!-- Raised (Monthly) Card Example --> <div class="col-xl-3 col-md-6 mb-4"> <div class="card border-left-success shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-success text-uppercase mb-1"> TEI have spent in (<?php echo "$year"; ?>)</div> <div class="h5 mb-0 font-weight-bold text-gray-800"><?php $sql = "SELECT SUM( approved_amount) FROM request where year='$year' and status='Completed'"; $amountsum = mysqli_query($conn, $sql) or die(mysqli_error($sql)); $row_amountsum = mysqli_fetch_assoc($amountsum); $totalRows_amountsum = mysqli_num_rows($amountsum); echo 'Rs.' .$row_amountsum['SUM( approved_amount)'];?></div> </div> <div class="col-auto"> <i class="fas fa-dollar-sign fa-2x text-gray-300"></i> </div> </div> </div> </div> </div> <!-- Earnings (Monthly) Card Example --> <!-- Pending Requests Card Example --> <div class="col-xl-3 col-md-6 mb-4"> <div class="card border-left-danger shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-danger text-uppercase mb-1"> TEI Needs in (<?php echo "$year"; ?>)</div> <div class="h5 mb-0 font-weight-bold text-gray-800"><?php $sql = "SELECT SUM( expected_amount) FROM request where year=$year and status='Pending'"; $amountsum = mysqli_query($conn, $sql) or die(mysqli_error($sql)); $row_amountsum = mysqli_fetch_assoc($amountsum); $totalRows_amountsum = mysqli_num_rows($amountsum); echo 'Rs.' .$row_amountsum['SUM( expected_amount)'];?></div> </div> <div class="col-auto"> <i class="fas fa-hdd fa-2x text-gray-300"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6 mb-4"> <div class="card border-left-warning shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-warning text-uppercase mb-1"> Pending Requests of (<?php echo "$year"; ?>)</div> <div class="h5 mb-0 font-weight-bold text-gray-800"> <?php $sql = "SELECT * FROM request WHERE status = 'Pending'"; $query = $conn->query($sql); echo "$query->num_rows";?> </div> </div> <div class="col-auto"> <i class="fas fa-eye fa-2x text-gray-300"></i> </div> </div> </div> </div> </div> </div> <!-- Content Row --> <div class="row"> <!-- Area Chart --> <div class="col-xl-8 col-lg-7"> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">Introduction of TEI</h6> </div> <div class="card-body"> The Education Initiative is a non-profit organization that is dedicated to providing support and resources to schools (Especially PEF Partners) in Pakistan. The organization was founded with the aim of creating a positive impact on the education system of the country by enhancing the quality of education in schools. The Education Initiative is funded by its 200 members, who each donate 2000/PKR every month.The Education Initiative is an organization that is dedicated to improving the quality of education in Pakistan by providing schools with the necessary resources to create a safe and conducive learning environment. The organizations unique model, which divides its budget into three key areas, has proven to be effective in achieving its goals. With the support of its members, The Education Initiative hopes to continue making a positive impact on the education system of Pakistan.<br><br> <h6 class="m-0 font-weight-bold text-primary">Download Intro & Budget Document of TEI</h6><br> <p><a href="Budget-Document-of-The-Education-Initative-for-FY-2023-2024.pdf" target="_blank" class="btn btn-success btn-icon-split"> <span class="icon text-white-50"> <i class="fas fa-eye"></i> </span> <span class="text">Complete Intro of TEI</span> </a></p> <h6 class="m-0 font-weight-bold text-primary">Download Intro & Budget Document of TEI (Programs)</h6> <div class="my-2"></div> <a href="Details-of-LAP.pdf" target="_blank" class="btn btn-primary btn-icon-split"> <span class="icon text-white-50"> <i class="fas fa-tv"></i> </span> <span class="text">Learning Aids Program</span> </a> <a href="Details-of-IDP.pdf" target="_blank" class="btn btn-info btn-icon-split"> <span class="icon text-white-50"> <i class="fas fa-building"></i> </span> <span class="text">Infra Development Program</span> </a> <a href="emergency-fund.pdf" target="_blank" class="btn btn-danger btn-icon-split"> <span class="icon text-white-50"> <i class="fas fa-ambulance"></i> </span> <span class="text">Emergency Fund</span> </a> </div> </div> </div> <!-- Pie Chart --> <div class="col-xl-4 col-lg-5"> <div class="card shadow mb-4"> <!-- Card Header - Dropdown --> <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> <h6 class="m-0 font-weight-bold text-primary">Budget Distribution FY(2023-2024)</h6> </div> <!-- Card Body --> <div class="card-body"> <div class="chart-pie pt-4 pb-2"> <canvas id="myPieChart"></canvas> </div> <div class="mt-4 text-center small"> <span class="mr-2"> <i class="fas fa-circle text-primary"></i> Learning Aids </span> <span class="mr-2"> <i class="fas fa-circle text-info"></i> Infra Development </span> <span class="mr-2"> <i class="fas fa-circle text-danger"></i> Emergency Fund </span> <span class="mr-2"> <i class="fas fa-circle text-success"></i> Operational Cost </span> </div> </div> </div> </div> </div> <!-- /.container-fluid --> </div> <!-- End of Main Content --> <?php include"footer.php"; ?> |
tei SQL
1 2 3 4 5 6 7 8 9 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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 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 101 102 103 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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 17, 2023 at 08:27 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `tei` -- -- -------------------------------------------------------- -- -- Table structure for table `funds` -- CREATE TABLE `funds` ( `id` int(11) NOT NULL, `scid` int(11) NOT NULL, `amount` int(11) NOT NULL, `ttype` varchar(13) NOT NULL, `tid` varchar(12) NOT NULL, `month` varchar(3) NOT NULL, `year` int(4) NOT NULL, `date` datetime NOT NULL DEFAULT current_timestamp(), `status` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `funds` -- INSERT INTO `funds` (`id`, `scid`, `amount`, `ttype`, `tid`, `month`, `year`, `date`, `status`) VALUES (1, 1, 50000, 'Bank Transfer', '4646546464', 'May', 2023, '2023-05-17 11:20:24', 'Verified'); -- -------------------------------------------------------- -- -- Table structure for table `request` -- CREATE TABLE `request` ( `id` int(11) NOT NULL, `scid` int(11) NOT NULL, `apply_for` varchar(9) NOT NULL, `demand` varchar(50) NOT NULL, `app_date` timestamp NOT NULL DEFAULT current_timestamp(), `expected_amount` int(11) NOT NULL, `approved_amount` int(11) NOT NULL, `visit_date` date NOT NULL, `remarks` text NOT NULL, `year` int(4) NOT NULL, `month` varchar(3) NOT NULL, `qat_status` varchar(7) NOT NULL, `status` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `request` -- INSERT INTO `request` (`id`, `scid`, `apply_for`, `demand`, `app_date`, `expected_amount`, `approved_amount`, `visit_date`, `remarks`, `year`, `month`, `qat_status`, `status`) VALUES (1, 1, 'IDP', 'Renovation of Room', '2023-05-17 06:19:42', 70000, 0, '0000-00-00', 'Waiting for visit', 2023, '', 'Pass', 'Pending'); -- -------------------------------------------------------- -- -- Table structure for table `schools` -- CREATE TABLE `schools` ( `id` int(11) NOT NULL, `name` varchar(100) NOT NULL, `fname` varchar(100) NOT NULL, `cnic` text NOT NULL, `contact` text NOT NULL, `email` varchar(100) NOT NULL, `qual` varchar(15) NOT NULL, `address` varchar(255) NOT NULL, `sname` varchar(100) NOT NULL, `dist` varchar(15) NOT NULL, `prog` varchar(7) NOT NULL, `strg` text NOT NULL, `buld` varchar(13) NOT NULL, `qatr` varchar(7) NOT NULL, `password` text NOT NULL, `status` varchar(9) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `schools` -- INSERT INTO `schools` (`id`, `name`, `fname`, `cnic`, `contact`, `email`, `qual`, `address`, `sname`, `dist`, `prog`, `strg`, `buld`, `qatr`, `password`, `status`) VALUES (1, 'Aown Muhammad Shah', 'Assad Shah', '36303-1234567-8', '0345-7111102', 'aownmshah@gmail.com', 'Masters', 'Loother', 'Shaheen Public School', 'ATTOCK', 'NSP', 'Below-100', 'Rented', 'Pass', 'shahg', 'Active'); -- -- Indexes for dumped tables -- -- -- Indexes for table `funds` -- ALTER TABLE `funds` ADD PRIMARY KEY (`id`); -- -- Indexes for table `request` -- ALTER TABLE `request` ADD PRIMARY KEY (`id`); -- -- Indexes for table `schools` -- ALTER TABLE `schools` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `funds` -- ALTER TABLE `funds` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `request` -- ALTER TABLE `request` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `schools` -- ALTER TABLE `schools` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |