$data = new DataLayer(); $data->submitProposal($id, $topic, $link); } } ?> </div> <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <div class="row placeholders"> <div class="col-xs-7 col-sm-9 placeholder"> <div class="panel panel-default"> <div class="panel-body"> List of Submitted/Approved projects<br/> <?php $student = $data->getStudent($_SESSION['userId']); echo "Your Status: " . $student[5]; ?> <table class="table table-bordered" style="text-align: left" id="list"> <thead> <?php echo "<caption>School: " . $_SESSION['school'] . " - session: " . $_SESSION['sec'] . "</caption>"; ?> <tr> <th><a href='submitProposal.php?name=1'>Student Name</a></th> <th><a href='submitProposal.php?topic=1'>Topic</a></th> <th><a href='submitProposal.php?time=1'>Submission Time</a></th> <th><a href='submitProposal.php?status=1'>Status</a></th> </tr>
<?php $title = "prof"; require "checkToken.php"; if (isset($_POST['change_status'])) { $id = strip_tags(trim($_POST['id'])); $status = strip_tags(trim($_POST['status'])); $data = new DataLayer(); $data->updateStatus($id, $status); $student = $data->getStudent($id); $email = $student[7]; $message = "Dear {$student['2']}, your topic approval status has changed to: {$status}"; mail($email, "Topic Submission Status Change", $message); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Project Approval System</title> <link href="./css/bootstrap.min.css" rel="stylesheet"> <link href="./css/dashboard.css" rel="stylesheet"> <script src="./js/ie-emulation-modes-warning.js"></script> <style type="text/css"></style> <script src="./js/jquery-2.1.4.min.js"></script> <script src="./js/bootstrap.min.js"></script>