Viewing file: branchpage.php (3.31 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include('session.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" /> <title>ITCE BRANCH CONTROL PANEL</title> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } body { background-color: #CCC; } </style> </head> <center> <body> <table width="100%" border="0" bgcolor="#FFFFFF"> <tr> <td > <?php include('header.php'); ?></td> </tr> <tr> <td colspan="2"><table width="100%" border="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"> <?php include('menubar.php'); ?></td> </tr> <tr> <td colspan="3" bgcolor="#CCCCCC"> <?php include('sessionbar.php'); ?></td> </tr> </table> </td> </tr> <tr> <td colspan="2" align="center"> <?php include 'connect.php'; // Attempt select query execution $sql = "SELECT * FROM batch order by id"; if($result = mysqli_query($link, $sql)) { if(mysqli_num_rows($result) > 0) { $serial=0; while($row = mysqli_fetch_array($result)) { $batch[]=$row['batch']; $serial=$serial+1; } // Free result set mysqli_free_result($result); } else{ echo "No records matching your query were found."; } } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } // Close connection mysqli_close($link); ?> <?php echo "<table width=\"100%\" border=\"1\" bgcolor=\"#33CCCC\" style='table-layout:fixed'>\n"; echo " <tr>\n"; echo " <td align='left'>BATCH</td>\n"; echo " <td align='left'>COURSE FEE</td>\n"; echo " <td align='left'>DEPOSITE FEE</td>\n"; echo " <td align='left'>DUE FEE</td>\n"; echo " </tr>\n"; echo "</table>\n";
for($i=0; $i<$serial; $i++) {
$batchname = $batch[$i]; { include 'connect.php'; $coursefees=0; $dfees=0;
$sql = "select * from student_admission where main='MAIN' AND programname='$batchname' "; if($result = mysqli_query($link, $sql)) { if(mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_array($result)) {
$coursefees=$row['totalfees']+$coursefees; $dfees= $dfees+$row['depositfees']; } mysqli_free_result($result); } else { } } else { echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); }
$duefeess=$coursefees-$dfees; echo "<table width=\"100%\" border=\"1\" bgcolor=\"#33CCCC\" style='table-layout:fixed'>\n"; echo " <tr>\n"; echo " <td align='left'>$batchname</td>\n"; echo " <td align='left'>$coursefees</td>\n"; echo " <td align='left'>$dfees</td>\n"; echo " <td align='left'><a href='duefeesonly.php?ID=" .$batchname. "'>$duefeess</a></td>\n"; echo " </tr>\n"; echo "</table>"; // Close connection mysqli_close($link); }
} ?> </td> </tr> <tr> <td colspan="2" bgcolor="#CCCCCC"> <?php include('footer.php'); ?></td> </tr> </table>
</body></center> </html>
|