Courses.php: better code spacing

Bug430-Eden2
Lan Hui 2023-09-07 19:32:09 +08:00
parent 0895121ed0
commit bc89e6c214
1 changed files with 14 additions and 17 deletions

View File

@ -412,25 +412,22 @@ include 'Header.php';
INNER JOIN users_table ON users_table.Student_ID=course_students_table.Student_ID
WHERE Lecturer_User_ID=$lecturer_id AND course_students_table.Status='Pending'");
if(mysqli_num_rows($result)==0)
{
if(mysqli_num_rows($result) == 0) {
echo "<br> <i class='fa fa-info-circle'></i>No course-joining request so far for your courses<hr>";
} else { while($row = mysqli_fetch_assoc($result)) {
$id=$row['ID'];
} else {
while ($row = mysqli_fetch_assoc($result)) {
$id = $row['ID'];
$name = $row['Course_Name'];
$code = $row['Course_Code'];
$faculty = $row['Faculty'];
$std_name = $row['Full_Name'];
$academic = $row['Academic_Year'];
$name=$row['Course_Name'];
$code=$row['Course_Code'];
$faculty=$row['Faculty'];
$std_name=$row['Full_Name'];
$academic=$row['Academic_Year'];
echo "<div class='btn btn-default'>
$std_name is Requesting to join <br> [($code) - $name ] &nbsp;&nbsp;&nbsp;&nbsp; <br><a href='~\..\Script.php?AcceptStudent=y&id=$id&rs=yes' class='btn btn-sm btn-success' onclick=return confirm(\"are you sure to join this course?\")' > Accept </a>
&nbsp;&nbsp;<a href='~\..\Script.php?AcceptStudent=y&id=$id&rs=no' class='btn btn-sm btn-danger' onclick=return confirm(\"are you sure to join this course?\")' > Decline </a>
</div>";
}
echo "<div class='btn btn-default'>
$std_name is Requesting to join <br> [($code) - $name ] &nbsp;&nbsp;&nbsp;&nbsp; <br>
<a href='~\..\Script.php?AcceptStudent=y&id=$id&rs=yes' class='btn btn-sm btn-success' onclick=return confirm(\"are you sure to join this course?\")' > Accept </a> &nbsp;&nbsp;<a href='~\..\Script.php?AcceptStudent=y&id=$id&rs=no' class='btn btn-sm btn-danger' onclick=return confirm(\"are you sure to join this course?\")' > Decline </a>
</div>";
}
}
?>