<?
//Filename : brother_del.php
//Description : Delete brother or alumnus
//Author : darc
//Last modified : 2006.12.20
include '../includes/auth.php';
include '../includes/db.php';
//Select all members/alum to display in table
$sql ="SELECT * FROM $table_name WHERE status = \"active\" OR status = \"alumnus\" ORDER BY l_name;";
$result = mysql_query($sql,$connection) or die(mysql_error());
//Initialize counter to number rows
$counter = 0;
?>
<html>
<head><title>Delete Brother from Database</title></head>
<body>
<center><h2>Current Brother Roster || Generated <?php echo date("F j, Y, g:i a"); ?></h2></center>
<br><br>
<CENTER>
<strong>THIS FORM DOES NOT ASK FOR CONFIRMATION - ONLY CLICK DELETE IF YOU **REALLY** MEAN IT!!!</STRONG>
</CENTER>
<br><br>
<p><a href="brother_man.php">Return to Brother Administration</a></p>
<!-- Setup table to display results -->
<table width="100%" border="1" cellpadding="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td><strong>Index</strong></td>
<td><strong>Last Name</strong></td>
<td><strong>First Name</strong></td>
<td><strong>ID#</strong></td>
<td><strong>Status</strong></td>
<td><strong>DELETE!</strong></td>
<td><strong>Edit</strong></td>
</tr>
<?php
//Loop to display results
while ($row =mysql_fetch_array($result))
{
$l_name = $row['l_name'];
$f_name = $row['f_name'];
$id = $row['stu_num'];
$username = $row['username'];
$status = $row['status'];
?>
<tr>
<td><?php echo($counter); $counter++; ?></td>
<td><?php echo($l_name);?></td>
<td><?php echo($f_name);?></td>
<td><?php echo($id);?></td>
<td><?php echo($status);?></td>
<td>
<form method="POST" action="brother_functions.php?cat=del">
<input type="hidden" name="username" value="<?php echo $username; ?>">
<center><input type="submit" name="submit" value="DELETE!"></form></center>
</td>
<td><form method="POST" action="brother_edit.php"><input type="hidden" name="username" value="<?php echo
$username; ?>"> <center><input type="submit" name="submit" value="Ed Info"></form></center>
</td>
<?php
} //Close loop
?>
</table>
<p><a href="brother_man.php">Return to Brother Administration</a></p>
</body>
</html>