Skip to content

Commit

Permalink
complete
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadeemasghar committed Jan 12, 2021
1 parent 77577c7 commit b5dcd68
Show file tree
Hide file tree
Showing 47 changed files with 2,452 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Fee Collection System
# Islamic public high school

Free collection system for private school. Developed in CORE PHP.
<img src="home.PNG">
<img src="update_by_family.PNG">
<img src="update_all_active_students.PNG">
<img src="update_by_class.PNG">
<img src="update_by_family.PNG">
Binary file added ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bulk_data_update.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions bulkupdatestd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
// Start the session
session_start();
?>

<html>
<head>
<title>Islamic Public School Fee System</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class=wraper>
<a href=index.php>Home</a> - Update Bulk Students

<h2>Update Bulk Students</h2>

<ul>
<li><a href="updatebyall.php">Update All Active Students</a></li>
<li><a href="updatebyclass.php">Update by Class</a></li>
<li><a href="updatebyfamily.php">Update by Family</a></li>
</ul>
</div>
</body>
</html>
68 changes: 68 additions & 0 deletions createslips.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
// Start the session
session_start();
?>

<html>
<head>
<title>Islamic Public School Fee System</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class=wraper>
<a href=index.php>Home</a> - Create Slips

<h2>Create Slips</h2>

<form action=createslips.php method=post>

<table>
<tr>
<td>Create slips for the month</td><td><input type=text name=month></td><td>year</td><td><input type=text name=year></td>
</tr>
<td><input type=submit name=submit value="Create Slips"></td>
<tr>

</tr>
</table>

</form>
<?php
if($_POST["submit"]){
$con = mysql_connect("localhost","root","root","iphs");
if(!$con){echo "Unable to Connect". mysql_error();}


$month = $_POST["month"]. "-" . $_POST["year"];
$x = 0;
$result = mysql_query("SELECT * FROM iphs.students WHERE active = 'Y' GROUP BY faimlynum",$con);

while($row = mysql_fetch_array($result)){
$faimlynum = $row["faimlynum"];
$sum = mysql_fetch_array(mysql_query("SELECT SUM( admission ) AS admission,SUM( tuition ) AS tuition,SUM( sports ) AS sports,SUM( building ) AS building,SUM( medical ) AS medical,SUM( recreation ) AS recreation,SUM( examination ) AS examination,SUM( buscharge ) AS buscharge FROM iphs.students WHERE faimlynum = $faimlynum",$con));
$total = $sum["admission"] + $sum["tuition"] + $sum["sports"] + $sum["building"] + $sum["medical"] + $sum["recreation"] + $sum["examination"] + $sum["buscharge"];

$stnum = mysql_fetch_array(mysql_query("SELECT count( faimlynum ) AS faimlynum FROM iphs.students WHERE faimlynum = $faimlynum",$con));

$stnum = $stnum["faimlynum"];
$faimlynum = $faimlynum;
$month = $month;
$admission = $sum["admission"];
$tuition = $sum["tuition"];
$sports = $sum["sports"];
$building = $sum["building"];
$medical = $sum["medical"];
$recreation = $sum["recreation"];
$examination = $sum["examination"];
$buscharge = $sum["buscharge"];
$total = $total;

$insert = mysql_query("INSERT INTO iphs.slips (stnum, faimlynum, month, admission, tuition, sports, building, medical, recreation, examination, buscharge, total)VALUES ('$stnum', '$faimlynum', '$month', '$admission', '$tuition', '$sports', '$building', '$medical', '$recreation', '$examination', '$buscharge', '$total')",$con);
if($insert){$x=$x+1;}else{echo "Data not entered ". mysql_error();}
}
echo $x. " New Slips Created";
}
?>
</div>
</body>
</html>
49 changes: 49 additions & 0 deletions edtstd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
// Start the session
session_start();
?>

<html>
<head>
<title>Islamic Public School Fee System</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class=wraper>
<a href=index.php>Home</a> - Edit Student Data

<h2>Edit Student Data</h2>

<?php

if ($_POST["submit"]=='Update'){

$con = mysql_connect("localhost","root","root","iphs");
if(!$con){echo "Unable to Connect". mysql_error();}


$id = $_POST["id"];
$name = $_POST["name"];
$class = $_POST["class"];
$regnum = $_POST["regnum"];
$faimlynum = $_POST["faimlynum"];
$admission = $_POST["admission"];
$tuition = $_POST["tuition"];
$sports = $_POST["sports"];
$building = $_POST["building"];
$medical = $_POST["medical"];
$recreation = $_POST["recreation"];
$examination = $_POST["examination"];
$buscharge = $_POST["buscharge"];
$active = $_POST["active"];

$update = mysql_query("UPDATE iphs.students SET name = '$name', class = '$class', regnum = '$regnum', faimlynum = '$faimlynum', admission = '$admission', tuition = '$tuition', sports = '$sports', building = '$building', medical = '$medical', recreation = '$recreation', examination = '$examination', buscharge = '$buscharge', active = '$active' WHERE id = $id ",$con);

if($update){ echo "Data Updated <a href=viewstd.php>View All Students</a>";}else {echo "Data not Updated <br> ". mysql_error();}

}

?>
</div>
</body>
</html>
32 changes: 32 additions & 0 deletions head.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
table, tr, td{
padding: 0px;
}

.slip{
page-break-after:always;}

.sliphead{
height: 200px;
}

.ad{
height: 50px;
}


.prntslip{
width: 700px;
}


.feecl{
border-right: solid;
}

.total{
font-size: 25px;
}

.sprt{
border-right: solid;
}
Binary file added home.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
// Start the session
session_start();
?>

<html>
<head>
<title>Islamic Public School Fee System</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class=wraper>
<h2>Welcome to The Fee System</h2>
<h3>Student</h3>
<ul>
<li><a href="newstd.php">Add New Student</a></li>
<li><a href="newfaimly.php">Add New Family</a></li>
<li><a href="viewstd.php">View/Edit Student</a></li>
<li><a href="bulkupdatestd.php">Update Bulk Students</a></li>
</ul>

<h3>Slips</h3>
<ul>
<li><a href="createslips.php">Create Slips</a></li>
<li><a href="printslips.php">View/Print Slips</a></li>
</ul>

<h3>Payment</h3>
<ul>
<li><a href="payment.php">Receive Payment</a></li>
<li><a href="viewpaymentbyfn.php">View Payment by Family Number</a></li>
</ul>
</div>
</body>
</html>
149 changes: 149 additions & 0 deletions iphs.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
-- phpMyAdmin SQL Dump
-- version 4.4.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 21, 2015 at 04:28 PM
-- Server version: 5.5.42
-- PHP Version: 5.3.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;

--
-- Database: `iphs`
--

-- --------------------------------------------------------

--
-- Table structure for table `faimly`
--

CREATE TABLE IF NOT EXISTS `faimly` (
`id` int(11) NOT NULL,
`faimlynum` int(11) NOT NULL,
`fname` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `payments`
--

CREATE TABLE IF NOT EXISTS `payments` (
`id` int(11) NOT NULL,
`srno` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`date` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `slips`
--

CREATE TABLE IF NOT EXISTS `slips` (
`id` int(11) NOT NULL,
`stnum` int(11) DEFAULT NULL,
`faimlynum` int(11) NOT NULL,
`month` text NOT NULL,
`admission` int(11) DEFAULT NULL,
`tuition` int(11) DEFAULT NULL,
`sports` int(11) DEFAULT NULL,
`building` int(11) DEFAULT NULL,
`medical` int(11) DEFAULT NULL,
`recreation` int(11) DEFAULT NULL,
`examination` int(11) DEFAULT NULL,
`buscharge` int(11) DEFAULT NULL,
`total` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `students`
--

CREATE TABLE IF NOT EXISTS `students` (
`id` int(11) NOT NULL,
`name` text,
`class` text,
`regnum` int(11) DEFAULT NULL,
`faimlynum` int(11) DEFAULT NULL,
`admission` int(11) DEFAULT NULL,
`tuition` int(11) DEFAULT NULL,
`sports` int(11) DEFAULT NULL,
`building` int(11) DEFAULT NULL,
`medical` int(11) DEFAULT NULL,
`recreation` int(11) DEFAULT NULL,
`examination` int(11) DEFAULT NULL,
`buscharge` int(11) DEFAULT NULL,
`active` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `faimly`
--
ALTER TABLE `faimly`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `faimlynum` (`faimlynum`);

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `slips`
--
ALTER TABLE `slips`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `students`
--
ALTER TABLE `students`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `regnum` (`regnum`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `faimly`
--
ALTER TABLE `faimly`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `slips`
--
ALTER TABLE `slips`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!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 */;
Loading

0 comments on commit b5dcd68

Please sign in to comment.