-
Notifications
You must be signed in to change notification settings - Fork 72
/
paidfee.php
105 lines (100 loc) · 3.38 KB
/
paidfee.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
<?php require_once("includes/session.php"); ?>
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<script src="js/bootstrap.min.js" type="text/javascript"></script>
</head>
<?php
$current_id = $_GET['id'];
//***********
$current_year = date("Y");
$year_from_current_id = mysql_query("select max(aca_year) from current_id");
if($year_from_current_id)
{
$year_from_current_id_result = mysql_fetch_array($year_from_current_id);
if($current_year > $year_from_current_id_result[0])
$current_year -= 1;
}
//*************
$paid_fee_query = mysql_query("select * from payfee where current_id = '$current_id'");
$current_id_query = mysql_query("select * from current_id where sno = '$current_id' and aca_year = '$current_year'") or die(mysql_error());
$current_id_query_result = mysql_fetch_array($current_id_query);
?>
<body class="main">
<div class="main">
<h2 align="center">Paid history of student</h2>
<div class="row" style="background-color:#FFF">
<div class="col-md-10">
<h3 align="right">Total Amount for academic year:</h3>
</div>
<div class="col-md-2" style="background-color:#F00">
<?php
$fee_query = mysql_query("select * from fee where akey = '$current_id_query_result[2]'") or die(mysql_error());
$fee_query_result = mysql_fetch_array($fee_query);
echo '<h3>'.$fee_query_result['fee'].'</h3>';
?>
</div>
</div>
<div class="row" style="border-bottom:solid;">
<div class="col-md-1" style="background-color:#F4F4F4">
<h3 align="center">SNO.</h3>
</div>
<div class="col-md-5" style="background-color:#EAEAEA">
<h3 align="center">Date of Payment</h3>
</div>
<div class="col-md-6" style="background-color:#F8F8F8">
<h3 align="center">Amount Paid</h3>
</div>
</div>
<?php
$i = 0;
$sum = 0;
while($paid_fee_query_result = mysql_fetch_array($paid_fee_query))
{
$i += 1;
$sum += $paid_fee_query_result['amount'];
echo '
<div class="row" style="border-bottom:ridge;">
<div class="col-md-1" style="background-color:#F4F4F4">
<h3 align="center">'.$i.'</h3>
</div>
<div class="col-md-5" style="background-color:#EAEAEA">
<h3 align="center">'.$paid_fee_query_result['dop'].'</h3>
</div>
<div class="col-md-6" style="background-color:#F8F8F8">
<h3 align="center">'.$paid_fee_query_result['amount'].'</h3>
</div>
</div>
';
}
if($i == 0)
$mesaage = "No paid yet..!";
?>
<div class="row" style="background-color:#FFF">
<div class="col-md-10">
<h3 align="right">Total Amount paid:</h3>
</div>
<div class="col-md-2" style="background-color:#0F0;">
<?php
echo '<h3>'.$sum.'</h3>';
?>
</div>
</div>
<div class="row">
<div class="col-md-10">
</div>
<div class="col-md-2">
<a href="details.php?id=<?php
echo $current_id.'"><h3>Back</h3></a>';
?>
</div>
</div>
<?php if(isset($message)) echo '<h4 align="center" style="color:#FF0000; background-color:#FFF;">'.$message.'</h4>'; ?>
</div>
</body>
</html>