From 6083fa3a6c99bcda9d3b52354ce1dd6ba03d04f5 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Wed, 20 Oct 2021 23:10:38 +0800 Subject: [PATCH] Visitors.php: indent code --- .DS_Store | Bin 0 -> 6148 bytes Visitors.php | 88 ++++++++++++++++++++++++--------------------------- 2 files changed, 42 insertions(+), 46 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..974355addcdd7026e925df3b1255d5d35e1a3001 GIT binary patch literal 6148 zcmeHK%}N6?5T4YkX+`Wo&|@y%dT9ND_8=^4J$MsV^q``I{Q`)UXYh@op-^e%c zb(~33QK}aYB4q|9-(-Fg^6ioz01*DLT?eQDfJ7xMl(6|mC{8*f1?M3YW{e($a078P z8uVte+3_D4pl>Ik0~&52hELxw>got%uTig?46<77O%xW2i%ZK=mSuUhd>M4~D9FNW zIPk;%IrWaitP?r=MCh#tbk6zhZ#)2Zc)LIm|7Ztpgjn zK2p3$NP;%KB?y&6&tYy6BPha_BHB{no*2TGqhGl^&tY!SmV+=e<2Y_+;a(`h%#MC# z(m{9@xn%~Jfv*fK*lvZ+|HGf(|6hx^#|$t7bH#utwt|+AOLAxH%;M;*RjAjfB$St1 m{3t=g9L1PRNAV`A5%eoE5Iu*vMf9NXMZnO&4Kwhk47>yIBvR@C literal 0 HcmV?d00001 diff --git a/Visitors.php b/Visitors.php index 6d26d0c..c732ce2 100644 --- a/Visitors.php +++ b/Visitors.php @@ -1,67 +1,63 @@ - +
+ - + echo " "; - - $result = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Student_id, + + $result = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Student_id, `Attachment1`, `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, `Title`, `Visibility` , users_table.Full_Name,course_groups_table.Group_Name FROM `lab_report_submissions` left join users_table on users_table.Student_ID=lab_report_submissions.Student_id left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id WHERE Visibility='Public' "); - if(mysqli_num_rows($result)==0) - {} else { while($row = mysqli_fetch_assoc($result)) { - $att1=$row['Attachment1']; - $att2=$row['Attachment2']; - - $sdate=$row['Submission_Date']; - $att3=$row['Attachment3']; - $att4=$row['Attachment4']; - $labid=$row['Lab_Report_ID']; - $title=$row['Title']; - - $submitted_std=$row['Student_id']; - $submitted_group=$row['Course_Group_id']; - $Submission_ID=$row['Submission_ID']; - $sname=$row['Full_Name']; - $gname=$row['Group_Name']; - $Visibility=$row['Visibility']; - - $full_link="$att1"; - - if($att2!=""){ - $full_link= $full_link."| $att2"; - } - if($att3!=""){ - $full_link= $full_link."| $att3"; - } - - if($att4!=""){ - $full_link= $full_link."| $att4"; - } - - - echo" + if (mysqli_num_rows($result) == 0) { + } else { + while ($row = mysqli_fetch_assoc($result)) { + $att1 = $row['Attachment1']; + $att2 = $row['Attachment2']; + + $sdate = $row['Submission_Date']; + $att3 = $row['Attachment3']; + $att4 = $row['Attachment4']; + $labid = $row['Lab_Report_ID']; + $title = $row['Title']; + + $submitted_std = $row['Student_id']; + $submitted_group = $row['Course_Group_id']; + $Submission_ID = $row['Submission_ID']; + $sname = $row['Full_Name']; + $gname = $row['Group_Name']; + $Visibility = $row['Visibility']; + + $full_link = "$att1"; + + if ($att2 != "") { + $full_link = $full_link . "| $att2"; + } + if ($att3 != "") { + $full_link = $full_link . "| $att3"; + } + + if ($att4 != "") { + $full_link = $full_link . "| $att4"; + } + + echo "
$title by $gname $sname
Submission Date :$sdate      Files : $full_link
"; - - }}?> -
- + } + } ?> + \ No newline at end of file