diff --git a/Submissions.php b/Submissions.php index 73b1dae..0e1020a 100644 --- a/Submissions.php +++ b/Submissions.php @@ -3,124 +3,121 @@ include 'NoDirectPhpAcess.php'; ?> $header "; - + ?> -
- - - - - - - + +
- - - -'; - $_SESSION['info_Marking']=null; - } + error_reporting(0); + if (isset($_SESSION['info_Marking'])) { + echo '
'; + $_SESSION['info_Marking'] = null; + } + $resultx1 = mysqli_query($con, "Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); + while ($row = mysqli_fetch_assoc($resultx1)) { + $count_subs = $row['cnt']; + } + $resultx2 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); + if (mysqli_num_rows($resultx2) == 0) { + $count_marked = 0; + } else { + while ($row = mysqli_fetch_assoc($resultx2)) { + $count_marked = $row['cnt']; + } + } - $resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); - while($row = mysqli_fetch_assoc($resultx1)) {$count_subs=$row['cnt'];} - - $resultx2 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); - if(mysqli_num_rows($resultx2)==0){$count_marked=0;} else { while($row = mysqli_fetch_assoc($resultx2)) {$count_marked =$row['cnt'];}} - - $resultx3 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); - if(mysqli_num_rows($resultx3)==0){$count_unmarked=0;} else { while($row = mysqli_fetch_assoc($resultx3)) {$count_unmarked =$row['cnt'];}} + $resultx3 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); + if (mysqli_num_rows($resultx3) == 0) { + $count_unmarked = 0; + } else { + while ($row = mysqli_fetch_assoc($resultx3)) { + $count_unmarked = $row['cnt']; + } + } - $resultx4 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); - if(mysqli_num_rows($resultx4)==0){$count_remark=0;} else { while($row = mysqli_fetch_assoc($resultx4)) {$count_remark =$row['cnt'];}} + $resultx4 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); + if (mysqli_num_rows($resultx4) == 0) { + $count_remark = 0; + } else { + while ($row = mysqli_fetch_assoc($resultx4)) { + $count_remark = $row['cnt']; + } + } - - ?> - - Lab Report Submissions () - - -
-
+
+ - - + - + $(this).dialog('close'); + } + } + }); + + } catch (e) { + alert(e); + } + } + \ No newline at end of file