View file member/applylist.php

File size: 1.12Kb
<?php error_reporting(0);
include('../init.php'); include('../topnav.php'); isset($username) or die(header('location: index.php?msg=please login')); echo '<div class="b_head">Staff Application Status</div>';
if (isset($_GET['action']) && $level == 2) { $status = $_GET['action']; $user = $_GET['user']; mysql_query("UPDATE applystaff SET status='$status' WHERE name='$user'"); $msg = "<div class='msg'>" .$_GET['action']. "</div>"; } if ($level == 2) { echo $msg;
$query = mysql_query("SELECT * FROM applystaff"); while($row = mysql_fetch_array($query)) { echo "<b>NAME:</b> " .$row["name"]. "<br><b>STATUS:</b> <font color='red'>" .$row["status"]. "</font><br><b>REASON:</b> " .$row["reason"]. "<br><a href='applylist.php?action=accepted&user=" .$row["name"]. "'><font color='blue'>ACCEPT</font></a><br><a href='applylist.php?action=rejected&user=" .$row["name"]. "'><font color='red'>REJECT</font></a><hr>"; } } else { $query = mysql_query("SELECT * FROM applystaff"); while($row = mysql_fetch_array($query)) { echo "NAME: " .$row["name"]. "<br>STATUS: <font color='red'>" .$row["status"]. "</font><hr>"; }  } include('../footer.php'); ?>