57 lines
2.0 KiB
PHP
57 lines
2.0 KiB
PHP
<?php
|
|
$school_num = intval($_GET['school_num']);
|
|
$school_name = db_getVal("SELECT school_name FROM schools WHERE record_num = $school_num");
|
|
?>
|
|
<form method='post' action='/'>
|
|
<table width='<?php echo($default_form_width) ?>' class='content-table'>
|
|
<tr class='heading'>
|
|
<td colspan='4' align='center'>Referral for <?php echo($school_name) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='left'><b>Referred By</b></td>
|
|
<td align='center'><b>Credit Amount</b></td>
|
|
<td align='center'><b>Applied</b></td>
|
|
<td align='center'><b>Invoice</b></td>
|
|
</tr>
|
|
<?php
|
|
for ($n = 0; $n < 2; $n++) {
|
|
$bgclass = 'data-even';
|
|
if ($n) $bgclass = 'data-odd';
|
|
|
|
$referring_school_num = 0;
|
|
$credit_amount = '';
|
|
$credit_given = 'N';
|
|
$invoice_num = '';
|
|
|
|
$results = db_query("SELECT * FROM school_referrals WHERE school_num = $school_num AND sequence = $n");
|
|
if (db_num_rows($results)) {
|
|
$row = db_fetch_array($results);
|
|
extract($row);
|
|
}
|
|
|
|
?>
|
|
<tr class='<?php echo($bgclass) ?>'>
|
|
<td align='left'>
|
|
<select name='rschool<?php echo($n) ?>'>
|
|
<option value='0'></option>
|
|
<?php BuildDBList("schools","record_num","school_name","school_name",$referring_school_num) ?>
|
|
</select>
|
|
</td>
|
|
<td align='center'><input type='text' name='credit_amount<?php echo($n) ?>' value='<?php echo($credit_amount) ?>' size='10'></td>
|
|
<td align='center'><?php BuildFileRadio("yn.txt","credit_given$n",$credit_given) ?></td>
|
|
<td align='center'><input type='text' name='invoice_num<?php echo($n) ?>' value='<?php echo($invoice_num) ?>' size='10'></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
<tr>
|
|
<td colspan='4' align='center'>
|
|
<input type='submit' class='btn btn--primary' value='Save Data'>
|
|
<input type='hidden' name='action' value='schools-referrals'>
|
|
<input type='hidden' name='naction' value='save'>
|
|
<input type='hidden' name='school_num' value='<?php echo($school_num) ?>'>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|