~rmwenyekheri/sarisiae/trunk

« back to all changes in this revision

Viewing changes to accommodations/housingcautionfeereport.php

  • Committer: NDIMBOJr
  • Date: 2015-08-13 10:09:13 UTC
  • Revision ID: rmwenyekheri@gmail.com-20150813100913-wa5o4k7vvarmzl4n
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php 
 
2
#get connected to the database and verfy current session
 
3
        require_once('../Connections/sessioncontrol.php');
 
4
    require_once('../Connections/zalongwa.php');
 
5
        
 
6
        # initialise globals
 
7
        include('admissionMenu.php');
 
8
        
 
9
        # include the header
 
10
        global $szSection, $szSubSection;
 
11
        $szSection = 'Financial Reports';
 
12
        $szSubSection = 'Caution Fees';
 
13
        $szTitle = 'Financial Reports';
 
14
        include('admissionheader.php');
 
15
 
 
16
if (isset($_POST["candidate"])){
 
17
$key=$_POST['candidate'];
 
18
mysql_select_db($database_zalongwa, $zalongwa);
 
19
$query_candidate = "SELECT Name, RegNo FROM student WHERE Name LIKE '%$key%' OR RegNo LIKE '%$key%' ORDER BY Name";
 
20
$candidate = mysql_query($query_candidate, $zalongwa) or die(mysql_error());
 
21
$row_candidate = mysql_fetch_assoc($candidate);
 
22
$totalRows_candidate = mysql_num_rows($candidate);
 
23
 }
 
24
 
 
25
?>
 
26
 
 
27
 
 
28
            <form name="form1" method="post" action="/accommodation/housingcautionfeereport.php">
 
29
              <table width="365" border="0" cellpadding="0" cellspacing="0">
 
30
                <tr>
 
31
                  <td width="150" nowrap><div align="left">Search Candidate:</div></td>
 
32
                  <td width="215" nowrap><div align="right">
 
33
                    <input name="candidate" type="text" id="candidate">
 
34
                    <input name="search" type="submit" id="search" value="Search">
 
35
                  </div></td>
 
36
                </tr>
 
37
                <tr>
 
38
                  <td colspan="2">                        <div align="left"></div></td>
 
39
                </tr>
 
40
              </table>
 
41
            </form>
 
42
            
 
43
            <?php if (@$totalRows_candidate > 0) { // Show if recordset not empty ?>
 
44
            <table width="200" border="1" cellpadding="0" cellspacing="0">
 
45
              <tr>
 
46
                <td><strong>Candidate</strong></td>
 
47
                <td><strong>RegNo</strong></td>
 
48
                <td nowrap><strong>Caution Fee </strong></td>
 
49
                <td nowrap><strong>Charge Penalty </strong></td>
 
50
              </tr>
 
51
              <?php do { ?>
 
52
              <tr>
 
53
                <td nowrap><?php echo @$row_candidate['Name']; ?></td>
 
54
                <td nowrap><?php $RegNo=@$row_candidate['RegNo']; echo $RegNo; ?></td>
 
55
                <td nowrap><?php print "<a href=\"housingcautionfee.php?RegNo=$RegNo\">Add Caution Fees</a>";?></td>
 
56
                <td nowrap><?php print "<a href=\"housingcautionfeepenalty.php?RegNo=$RegNo\">Add Penalty Charge </a>";?></td>
 
57
              </tr>
 
58
              <?php } while ($row_candidate = @mysql_fetch_assoc($candidate)); ?>
 
59
</table>
 
60
            <?php } // Show if recordset not empty ?>
 
61
            
 
62
<?php
 
63
@mysql_free_result($candidate);
 
64
?>