commit
						bea6d94db7
					
				|  | @ -1,3 +1,8 @@ | |||
| <?php | ||||
|   include 'NoDirectPhpAcess.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| <?php | ||||
| $page="admin"; | ||||
| include 'Header.php'; | ||||
|  | @ -32,7 +37,7 @@ if ($_SESSION['user_type'] != "Lecturer") { | |||
|         <hr> | ||||
|     --> | ||||
|     <div class="col-md-6"> | ||||
|        <h4> User account Management </h4><hr> | ||||
|        <h4> User Account Management </h4><hr> | ||||
|          | ||||
|         <b>Lecturer / TA Accounts </b><br> | ||||
|    | ||||
|  | @ -359,4 +364,4 @@ echo "</select>  <input type='hidden' name='assignTA' value='true'> <input type= | |||
|       } | ||||
|     window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status; | ||||
|     } | ||||
|     </script> | ||||
|     </script> | ||||
|  |  | |||
							
								
								
									
										16
									
								
								Connect.php
								
								
								
								
							
							
						
						
									
										16
									
								
								Connect.php
								
								
								
								
							|  | @ -1,16 +0,0 @@ | |||
| <?php | ||||
| session_start(); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| $con=mysqli_connect("localhost","username","password","lrr"); | ||||
| // Check connection
 | ||||
| if (mysqli_connect_errno()) | ||||
|   { | ||||
|   echo "Failed to connect to MySQL: " . mysqli_connect_error(); | ||||
|   } | ||||
| else | ||||
| { | ||||
| echo "Connected"; | ||||
| } | ||||
| 
 | ||||
							
								
								
									
										930
									
								
								Course.php
								
								
								
								
							
							
						
						
									
										930
									
								
								Course.php
								
								
								
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										974
									
								
								Courses.php
								
								
								
								
							
							
						
						
									
										974
									
								
								Courses.php
								
								
								
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,37 @@ | |||
| <?php | ||||
| 
 | ||||
| session_start(); | ||||
| 
 | ||||
| // Allow legal person to download files instead of using direct URL access
 | ||||
| // Adapted from https://www.runoob.com/w3cnote/php-download-file.html
 | ||||
| 
 | ||||
| 
 | ||||
| // 修改这一行设置你的文件下载目录
 | ||||
| $file = "./../../lrr_submission".$_GET['file']; | ||||
| $filename = basename($file); | ||||
| 
 | ||||
| // 判断文件是否存在
 | ||||
| if(!file_exists($file)) die("File does not exist."); | ||||
|   | ||||
| //  文件类型,作为头部发送给浏览器
 | ||||
| $type = filetype($file); | ||||
|   | ||||
| // 获取时间和日期
 | ||||
| $today = date("F j, Y, g:i a"); | ||||
| $time = time(); | ||||
| 
 | ||||
| if ( (isset($_SESSION["user_student_id"]) && strpos($file, $_SESSION["user_student_id"])) || $_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA") { | ||||
|     // 发送文件头部
 | ||||
|     header("Content-type: $type"); | ||||
|     header("Content-Disposition: attachment;filename=$filename"); | ||||
|     header("Content-Transfer-Encoding: binary"); | ||||
|     header('Pragma: no-cache'); | ||||
|     header('Expires: 0'); | ||||
|     // 发送文件内容
 | ||||
|     set_time_limit(0); | ||||
|     readfile($file); | ||||
| } else { | ||||
|     echo "Nothing to download.  Contact lanhui _at_ zjnu.edu.cn if you think otherwise."; | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
							
								
								
									
										85
									
								
								Header.php
								
								
								
								
							
							
						
						
									
										85
									
								
								Header.php
								
								
								
								
							|  | @ -1,55 +1,39 @@ | |||
| <?php | ||||
| session_start(); | ||||
| 
 | ||||
| error_reporting(0); | ||||
|   date_default_timezone_set('Asia/Shanghai'); | ||||
| date_default_timezone_set('Asia/Shanghai'); | ||||
| 
 | ||||
| $con = mysqli_connect("localhost","username","password","lrr"); | ||||
| 
 | ||||
| $con=mysqli_connect("localhost","username","password","lrr"); | ||||
| // Check connection
 | ||||
| if (mysqli_connect_errno()) | ||||
|   { | ||||
| // Check database connection
 | ||||
| if (mysqli_connect_errno()) { | ||||
|   echo "Failed to connect to MySQL: " . mysqli_connect_error(); | ||||
|   } | ||||
| else | ||||
| { | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| <!DOCTYPE html> | ||||
| 
 | ||||
| <html> | ||||
| 
 | ||||
| <header> | ||||
|   | ||||
|     | ||||
|      | ||||
| <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/> | ||||
| <link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> | ||||
| <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/> | ||||
| 
 | ||||
| <script src="./css/jquery.min.js" type="text/javascript"></script> | ||||
| <script src="./css/bootsrap.min.js" type="text/javascript"></script> | ||||
| <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/> | ||||
| <script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </header> | ||||
| 
 | ||||
| 
 | ||||
| <body> | ||||
| 
 | ||||
| 
 | ||||
|  <?php | ||||
|  $curDateTime = date("Y-m-d H:i"); | ||||
|  include 'connect.php'; | ||||
|   | ||||
|  ?>   
 | ||||
|      | ||||
| <nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="padding-left:150px;padding-right:150px;margin:auto;"> | ||||
|   <a class="navbar-brand" href="~\..\index.php">    <img src="logo.png" style="width:30px;heigh:30px;"> LRRS</a> | ||||
|   <a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;heigh:30px;"> LRRS</a> | ||||
|   <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation"> | ||||
|     <span class="navbar-toggler-icon"></span> | ||||
|   </button> | ||||
|  | @ -60,26 +44,24 @@ else | |||
|            | ||||
|              <li class="nav-item active"> | ||||
|                 <!-- <a class='nav-link' href='~\..\Visitors.php'>     <i class='fa fa-globe'></i>  Visitor Portal <span class='sr-only'>(current)</span></a> --> | ||||
|             </li> | ||||
|              </li> | ||||
|             <?php | ||||
|             if(isset($_SESSION["user_fullname"])) | ||||
|             { | ||||
|             | ||||
|        echo "       <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>"; | ||||
|            | ||||
|             | ||||
|                 echo "       <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>"; | ||||
|             ?>
 | ||||
|       </li> | ||||
|           | ||||
|     </ul> | ||||
|      </ul> | ||||
|     <form class="form-inline my-2 my-lg-0" style="color:#fff;"> | ||||
|         Welcome   <b>  <?php echo $_SESSION['user_fullname'];  | ||||
|         ?> </b>   
 | ||||
|         Welcome   <b>  <?php echo $_SESSION['user_fullname']; ?> </b>   
 | ||||
|        | ||||
|         <?php | ||||
|        $c_date=  date("Y-m-d H:i"); | ||||
|         echo "(". $_SESSION['user_type'] .")   "; | ||||
|          | ||||
|             $c_date=  date("Y-m-d H:i"); | ||||
|             if (isset( $_SESSION['user_student_id'])) | ||||
|                 echo "(". $_SESSION['user_type'] . " - " . $_SESSION['user_student_id'] .")   "; | ||||
|             else | ||||
|                 echo "(". $_SESSION['user_type'] .")   ";                 | ||||
|         ?>
 | ||||
|          | ||||
| <?php | ||||
|  | @ -87,16 +69,14 @@ if ($_SESSION['user_type'] == "Lecturer") { | |||
|    echo  "     <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i>  <a style='color:#fff !important' href=\"~\..\Admin.php\">Admin </a>"; | ||||
| } | ||||
| ?>
 | ||||
| 	         | ||||
|           | ||||
|            <i class="fa fa-user" style="color:#fff;"> </i> | ||||
|        <a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id'];?>)">Update password</a> | ||||
| 
 | ||||
|            <i class="fa fa-lock" style="color:#fff;"> </i>  <a style='color:#fff !important' href="~\..\logout.php">Logout </a> | ||||
|     | ||||
|     <?php | ||||
|             } | ||||
|             ?>
 | ||||
|           <?php | ||||
|           } | ||||
|           ?>
 | ||||
|     </form> | ||||
|   </div> | ||||
| </nav> | ||||
|  | @ -130,7 +110,7 @@ if ($_SESSION['user_type'] == "Lecturer") { | |||
|         } | ||||
|         h1,h2,h3,h4{color:#03407B;}
 | ||||
|         a { | ||||
|   color: #03407B;
 | ||||
|             color: #03407B;
 | ||||
| } | ||||
| 
 | ||||
| .break-word { | ||||
|  | @ -156,33 +136,30 @@ if ($_SESSION['user_type'] == "Lecturer") { | |||
|     | ||||
|     .ui-button{ background: #03488B; color:white }
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     </style> | ||||
|      | ||||
|      | ||||
|      | ||||
|     <script> | ||||
| <script> | ||||
|     function updatePass(id) | ||||
|     { | ||||
|   | ||||
|        var pass=  prompt("Enter your new password : ", "..."); | ||||
|       var pass =  prompt("Enter your new password : ", "Enter a strong password"); | ||||
|          | ||||
|       if(!confirm('Are you sure to reset your password?')) | ||||
|       if(!confirm('Are you sure you want to reset your password?')) | ||||
|       { | ||||
|         return;   | ||||
|       } | ||||
| 
 | ||||
|             window.location.href="\Script.php\?action=passchange&uid="+id+"&pass="+pass; | ||||
|       window.location.href="\Script.php\?action=passchange&uid="+id+"&pass="+pass; | ||||
|     } | ||||
|      | ||||
|       function blockUser(id,status) | ||||
|     function blockUser(id,status) | ||||
|     { | ||||
|           if(!confirm('Are you to change User Status')) | ||||
|       if(!confirm('Are you sure you want to change user status?')) | ||||
|       { | ||||
|         return;   | ||||
|       } | ||||
|     window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status; | ||||
|     } | ||||
|     </script> | ||||
|        window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status; | ||||
|    } | ||||
| </script> | ||||
|  |  | |||
|  | @ -0,0 +1,7 @@ | |||
| <?php | ||||
|     // https://stackoverflow.com/questions/33999475/prevent-direct-url-access-to-php-file
 | ||||
|     if (!isset($_SERVER['HTTP_REFERER']) ) { | ||||
|         /* choose the appropriate page to redirect users */ | ||||
|         die( header( 'location: index.php' ) ); | ||||
|     } | ||||
| ?>
 | ||||
							
								
								
									
										2182
									
								
								Script.php
								
								
								
								
							
							
						
						
									
										2182
									
								
								Script.php
								
								
								
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										680
									
								
								Submissions.php
								
								
								
								
							
							
						
						
									
										680
									
								
								Submissions.php
								
								
								
								
							|  | @ -1,40 +1,40 @@ | |||
| <?php | ||||
| include 'NoDirectPhpAcess.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| <?php | ||||
| $page='Courses+'; | ||||
| include 'Header.php'; | ||||
|   $student_id=$_SESSION["user_student_id"]; | ||||
|     $group_id=$_SESSION["user_group_id"]; | ||||
|   $c_date=  date("Y-m-d H:i"); | ||||
| $student_id = $_SESSION["user_student_id"]; | ||||
| $group_id = $_SESSION["user_group_id"]; | ||||
| $c_date = date("Y-m-d H:i"); | ||||
| 
 | ||||
|  if(!empty($_GET["id"])) | ||||
|   { | ||||
|       $id=$_GET["id"]; | ||||
|       $course_id=$id; | ||||
|   } | ||||
|    if(!empty($_GET["header"])) | ||||
|   { | ||||
|       $header=$_GET["header"]; | ||||
|   } | ||||
| if(!empty($_GET["id"])) | ||||
| { | ||||
|     $id = $_GET["id"]; | ||||
|     $course_id = $id; | ||||
| } | ||||
| 
 | ||||
| if(!empty($_GET["header"])) | ||||
| { | ||||
|     $header = $_GET["header"]; | ||||
| } | ||||
|    | ||||
|     if(!empty($_GET["total"])) | ||||
|   { | ||||
|       $total=$_GET["total"]; | ||||
|   } else | ||||
|   { | ||||
|       $total=0; | ||||
|   } | ||||
| if(!empty($_GET["total"])) | ||||
| { | ||||
|     $total = $_GET["total"]; | ||||
| } else | ||||
| { | ||||
|     $total = 0; | ||||
| } | ||||
|         | ||||
|    | ||||
|   $resultx1 = mysqli_query($con,"SELECT `Lab_Report_ID`,Title, `Course_ID`, `Posted_Date`, `Deadline`, `Marks`, `Type` FROM `lab_reports_table` WHERE Lab_Report_ID=$id"); | ||||
|      while($row = mysqli_fetch_assoc($resultx1)) { | ||||
|          | ||||
|       $Report_Type=$row['Type']; | ||||
|          $c_id=$row['Course_ID']; | ||||
|          $Report_Title=$row['Title']; | ||||
|           | ||||
|           | ||||
|           | ||||
|      }   | ||||
| $resultx1 = mysqli_query($con,"SELECT `Lab_Report_ID`,Title, `Course_ID`, `Posted_Date`, `Deadline`, `Marks`, `Type` FROM `lab_reports_table` WHERE Lab_Report_ID=$id"); | ||||
| while($row = mysqli_fetch_assoc($resultx1)) { | ||||
|     $Report_Type = $row['Type']; | ||||
|     $c_id = $row['Course_ID']; | ||||
|     $Report_Title = $row['Title']; | ||||
| }   | ||||
|    | ||||
|   | ||||
|    | ||||
|  | @ -52,83 +52,83 @@ echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF | |||
|      | ||||
|   | ||||
|      | ||||
| <!--    Lecture  CODE--> | ||||
|     <!--    Lecturer  CODE--> | ||||
| <?php | ||||
| 
 | ||||
| if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA") | ||||
|         { | ||||
|     if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA") | ||||
|     { | ||||
|      | ||||
| ?>
 | ||||
|         ?>
 | ||||
| 
 | ||||
| <div class="col-md-12"> | ||||
|         <div class="col-md-12"> | ||||
|      | ||||
|      | ||||
|      | ||||
|          <?php  | ||||
| <?php  | ||||
| 
 | ||||
| error_reporting(0); | ||||
|         error_reporting(0); | ||||
| 
 | ||||
| if(isset($_SESSION['info_Marking'])) { | ||||
|   echo  '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Marking'].'</div>'; | ||||
|   $_SESSION['info_Marking']=null; | ||||
| } | ||||
|         if(isset($_SESSION['info_Marking'])) { | ||||
|             echo  '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Marking'].'</div>'; | ||||
|             $_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'];}     | ||||
|         $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'];}}      | ||||
|         $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'];}}  | ||||
| 
 | ||||
|   | ||||
| ?>
 | ||||
|         ?>
 | ||||
|     | ||||
|     <b>Lab Report Submissions (<?php echo $count_subs;?>)</b>
 | ||||
|     <!-- Nav tabs --> | ||||
|   <ul class="nav nav-tabs" role="tablist"> | ||||
|     <li class="nav-item"> | ||||
|         <b>Lab Report Submissions (<?php echo $count_subs;?>)</b>
 | ||||
|         <!-- Nav tabs --> | ||||
|         <ul class="nav nav-tabs" role="tablist"> | ||||
|         <li class="nav-item"> | ||||
|         <a class="nav-link active" data-toggle="tab" href="#menu1">Un-Marked Submissions<b> (<?php echo $count_unmarked;?>)</b></a>
 | ||||
|     </li> | ||||
|     <li class="nav-item"> | ||||
|         </li> | ||||
|         <li class="nav-item"> | ||||
|         <a class="nav-link" data-toggle="tab" href="#menu2">Marked Submissions <b>(<?php echo $count_marked;?>)</b></a>
 | ||||
|     </li> | ||||
|         </li> | ||||
|    | ||||
|       <li class="nav-item"> | ||||
|         <li class="nav-item"> | ||||
|         <a class="nav-link" data-toggle="tab" href="#menu3">Re-Marking Requests <b>(<?php echo $count_remark;?>)</b></a>
 | ||||
|     </li> | ||||
|         </li> | ||||
|      | ||||
|      | ||||
|       <li class="nav-item"> | ||||
|         <li class="nav-item"> | ||||
|         <a class="nav-link" data-toggle="tab" href="#menu4"> View Course Groups</a> | ||||
|     </li> | ||||
|   </ul>  | ||||
|       <div class="tab-content"> | ||||
|     <div id="menu1" class="container tab-pane active"><br> | ||||
|         </li> | ||||
|         </ul>  | ||||
|         <div class="tab-content"> | ||||
|         <div id="menu1" class="container tab-pane active"><br> | ||||
|          | ||||
|  <?php | ||||
| <?php | ||||
| 
 | ||||
|   | ||||
| if($Report_Type=="Group") | ||||
| { | ||||
|    $result1 = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|         if($Report_Type=="Group") | ||||
|         { | ||||
|             $result1 = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|     lab_report_submissions.Course_Group_id, `Attachment1`, | ||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||
|      `Title`,course_groups_table.Group_Name | ||||
| FROM `lab_report_submissions` | ||||
| left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");
 | ||||
| } | ||||
|  else | ||||
|  { | ||||
|      $result1 = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             $result1 = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, | ||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||
|      `Title`,users_table.Full_Name,course_group_members_table.Student_ID | ||||
|  | @ -136,87 +136,95 @@ FROM `lab_report_submissions` | |||
| Left JOIN users_table  on users_table.Student_ID=lab_report_submissions.Student_id | ||||
| left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");   
 | ||||
|  } | ||||
|         } | ||||
|   | ||||
| 
 | ||||
|   | ||||
|   | ||||
|   | ||||
|     | ||||
| if(mysqli_num_rows($result1)==0) | ||||
|     { | ||||
|      echo "No Un-Marked Submissions for this Lab Report."; | ||||
|         if(mysqli_num_rows($result1)==0) | ||||
|         { | ||||
|             echo "No Un-Marked Submissions for this Lab Report."; | ||||
|       | ||||
|     } else { while($row = mysqli_fetch_assoc($result1)) { | ||||
| 			$title=$row['Title']; | ||||
|                         $Marks=$row['Marks']; | ||||
|                         //$ins=$row['Notes']; 
 | ||||
|  $posted=$row['Submission_Date'];	 | ||||
|                          $deadline=$row['Deadline']; | ||||
|                           $att1=$row['Attachment1']; | ||||
|                               $att2=$row['Attachment2']; | ||||
|                                    $att3=$row['Attachment3']; | ||||
|                                     $att4=$row['Attachment4']; | ||||
|                                      $labid=$row['Lab_Report_ID']; | ||||
|         } else { | ||||
|             while($row = mysqli_fetch_assoc($result1)) { | ||||
|                 $title=$row['Title']; | ||||
|                 $Marks=$row['Marks']; | ||||
|                 $posted=$row['Submission_Date'];	 | ||||
|                 $deadline=$row['Deadline']; | ||||
|                 $att1=$row['Attachment1']; | ||||
|                 $att2=$row['Attachment2']; | ||||
|                 $att3=$row['Attachment3']; | ||||
|                 $att4=$row['Attachment4']; | ||||
|                 $labid=$row['Lab_Report_ID']; | ||||
|                                       | ||||
|                                      $submitted_std=$row['Student_id']; | ||||
|                                      $submitted_group=$row['Course_Group_id']; | ||||
|                                      $Submission_ID=$row['Submission_ID']; | ||||
|                                      $names=$row['Full_Name']; | ||||
|                                      $groupname=$row['Group_Name'];  | ||||
|                                        $student_id=$row['sub_std']; | ||||
|                 $submitted_std=$row['Student_id']; | ||||
|                 $submitted_group=$row['Course_Group_id']; | ||||
|                 $Submission_ID=$row['Submission_ID']; | ||||
|                 $names=$row['Full_Name']; | ||||
|                 $groupname=$row['Group_Name'];  | ||||
|                 $student_id=$row['sub_std']; | ||||
|                                  | ||||
|                                       if($submitted_group==0) | ||||
|                                       { | ||||
|                                      $submitted_by= $names."(".$student_id.")"; | ||||
|                                       } else { | ||||
|                                          $submitted_by="<i>(GROUP)</i> $groupname" ; | ||||
|                                       } | ||||
|                 if($submitted_group==0) | ||||
|                 { | ||||
|                     $submitted_by= $names."(".$student_id.")"; | ||||
|                 } else { | ||||
|                     $submitted_by="<i>(GROUP)</i> $groupname" ; | ||||
|                 } | ||||
| 
 | ||||
|                     $base_att1 = basename($att1); | ||||
|                     $base_att2 = basename($att2); | ||||
|                     $base_att3 = basename($att3); | ||||
|                     $base_att4 = basename($att4); | ||||
|                      | ||||
|                     $full_link = "<a href='~\..\Download.php?file=$att1&attachment=1'>$base_att1</a>";  // prevent students from directly accessing their classmates' submissions
 | ||||
|                      | ||||
|                     if($att2!=""){ | ||||
|                         $full_link= $full_link." | <a href='~\..\Download.php?file=$att2&attachment=2'>$base_att2</a>";     | ||||
|                     } | ||||
|                     if($att3!=""){ | ||||
|                         $full_link= $full_link." | <a href='~\..\Download.php?file=$att3&attachment=3'>$base_att3</a>";     | ||||
|                     } | ||||
|                          | ||||
|                     if($att4!=""){ | ||||
|                         $full_link= $full_link." | <a href='~\..\Download.php?file=$att4&attachment=4'>$base_att4</a>";     | ||||
|                     } | ||||
|                  | ||||
|                                         | ||||
|                                      $full_link="<a href='~\..\Lab_Report_Submisions\\$att1'>$att1</a>";       | ||||
|                                       | ||||
|                                      if($att2!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att2'>$att2</a>";     | ||||
|                                      } | ||||
|                                       if($att3!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att3'>$att3</a>";     | ||||
|                                      } | ||||
|                                       | ||||
|                                       if($att4!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>";     | ||||
|                                      } | ||||
|                 echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | ||||
|   $title  <br> by : <b> $submitted_by </b> | ||||
|    <br> <span style='font-size:8pt'>Submitted : $posted   <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Mark Submission</button><br> Attachments : $full_link </span>   | ||||
|   $title  <br> by: <b> $submitted_by </b> | ||||
|    <br> <span style='font-size:8pt'>Submitted at $posted   <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Mark Submission</button><br> Attachments : $full_link </span>   | ||||
| </div></k>";
 | ||||
|                  | ||||
|                                       }} | ||||
|        echo ""; | ||||
|        ?>
 | ||||
|             } | ||||
|         } | ||||
|         echo ""; | ||||
|         ?>
 | ||||
|      | ||||
|     </div> | ||||
|         </div> | ||||
|      | ||||
|        <div id="menu2" class="container tab-pane"><br> | ||||
|         <div id="menu2" class="container tab-pane"><br> | ||||
|             | ||||
|         | ||||
|             | ||||
|             | ||||
|           <?php | ||||
| <?php | ||||
|            | ||||
|            | ||||
| if($Report_Type=="Group") | ||||
| { | ||||
|    $result = mysqli_query($con,"SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|         if($Report_Type=="Group") | ||||
|         { | ||||
|             $result = mysqli_query($con,"SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|     lab_report_submissions.Course_Group_id, `Attachment1`, | ||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||
|      `Title`,course_groups_table.Group_Name | ||||
| FROM `lab_report_submissions` | ||||
| left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'");
 | ||||
| } | ||||
|  else | ||||
|  { | ||||
|      $result = mysqli_query($con,"SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             $result = mysqli_query($con,"SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, | ||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||
|      `Title`,users_table.Full_Name,course_group_members_table.Student_ID | ||||
|  | @ -224,55 +232,55 @@ FROM `lab_report_submissions` | |||
| Left JOIN users_table  on users_table.Student_ID=lab_report_submissions.Student_id | ||||
| left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'  Order by lab_report_submissions.Student_id Desc");   
 | ||||
|  } | ||||
|         } | ||||
|   | ||||
|  if(mysqli_num_rows($result)==0) | ||||
|     { | ||||
|      echo "No Marked submissions for this lab"; | ||||
|         if(mysqli_num_rows($result)==0) | ||||
|         { | ||||
|             echo "No Marked submissions for this lab"; | ||||
|       | ||||
|     } else {  | ||||
|         } else {  | ||||
|          | ||||
|         echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='fa fa-book'></i> Export Grade Sheet </a></h3>"; | ||||
|             echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='fa fa-book'></i> Export Grade Sheet </a></h3>"; | ||||
|          | ||||
|         while($row = mysqli_fetch_assoc($result)) { | ||||
| 			$title=$row['Title']; | ||||
|                         $Marks=$row['Marks']; | ||||
|                         //$ins=$row['Notes']; 
 | ||||
|  $posted=$row['Submission_Date'];	 | ||||
|                          $deadline=$row['Deadline']; | ||||
|                           $att1=$row['Attachment1']; | ||||
|                               $att2=$row['Attachment2']; | ||||
|                                    $att3=$row['Attachment3']; | ||||
|                                     $att4=$row['Attachment4']; | ||||
|                                      $labid=$row['Lab_Report_ID']; | ||||
|             while($row = mysqli_fetch_assoc($result)) { | ||||
|                 $title=$row['Title']; | ||||
|                 $Marks=$row['Marks']; | ||||
|                 //$ins=$row['Notes']; 
 | ||||
|                 $posted=$row['Submission_Date'];	 | ||||
|                 $deadline=$row['Deadline']; | ||||
|                 $att1=$row['Attachment1']; | ||||
|                 $att2=$row['Attachment2']; | ||||
|                 $att3=$row['Attachment3']; | ||||
|                 $att4=$row['Attachment4']; | ||||
|                 $labid=$row['Lab_Report_ID']; | ||||
|                                       | ||||
|                                      $submitted_std=$row['Student_id']; | ||||
|                                      $submitted_group=$row['Course_Group_id']; | ||||
|                                      $Submission_ID=$row['Submission_ID']; | ||||
|                                      $names=$row['Full_Name']; | ||||
|                                        $student_id=$row['sub_std']; | ||||
|                                           $Visibility=$row['Visibility']; | ||||
|                                        $notes=$row['Notes']; | ||||
|                 $submitted_std=$row['Student_id']; | ||||
|                 $submitted_group=$row['Course_Group_id']; | ||||
|                 $Submission_ID=$row['Submission_ID']; | ||||
|                 $names=$row['Full_Name']; | ||||
|                 $student_id=$row['sub_std']; | ||||
|                 $Visibility=$row['Visibility']; | ||||
|                 $notes=$row['Notes']; | ||||
|                                  | ||||
|                                       if($submitted_group==0) | ||||
|                                       { | ||||
|                                      $submitted_by= $names."(".$student_id.")"; | ||||
|                                       } else { | ||||
|                                          $submitted_by="<i>(GROUP)</i> Group X " ; | ||||
|                                       } | ||||
|                 if($submitted_group==0) | ||||
|                 { | ||||
|                     $submitted_by= $names."(".$student_id.")"; | ||||
|                 } else { | ||||
|                     $submitted_by="<i>(GROUP)</i> Group X " ; | ||||
|                 } | ||||
|                                         | ||||
|                                      $full_link="<a href='~\..\Lab_Report_Submisions\\$att1'>$att1</a>";       | ||||
|                 $full_link="<a href='~\..\Lab_Report_Submisions\\$att1'>$att1</a>";       | ||||
|                                       | ||||
|                                      if($att2!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att2'>$att2</a>";     | ||||
|                                      } | ||||
|                                       if($att3!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att3'>$att3</a>";     | ||||
|                                      } | ||||
|                 if($att2!=""){ | ||||
|                     $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att2'>$att2</a>";     | ||||
|                 } | ||||
|                 if($att3!=""){ | ||||
|                     $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att3'>$att3</a>";     | ||||
|                 } | ||||
|                                       | ||||
|                                       if($att4!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>";     | ||||
|                                      } | ||||
|                 if($att4!=""){ | ||||
|                     $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>";     | ||||
|                 } | ||||
|                 echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | ||||
|   $title  <br> by : <b> $submitted_by         [ Marked $Marks ] </b>    Visibility : <b>$Visibility </b>  <button class='btn-sm btn-success' style='margin-left:50px;' onclick='updatev($Submission_ID)'>Update visibility</button>  | ||||
|    <hr> Lecturer/TA notes : $notes<br> <span style='font-size:8pt'>Submitted : $posted        <b>  </b> <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Re-Mark Submission</button><br> Attachments : $full_link </span>   | ||||
|  | @ -280,28 +288,28 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'  Order by lab | |||
|                  | ||||
|                 | ||||
|                  | ||||
|                                       }} | ||||
|        echo ""; | ||||
|        ?>
 | ||||
|             }} | ||||
|         echo ""; | ||||
|         ?>
 | ||||
|             | ||||
|             | ||||
|        </div> | ||||
|         </div> | ||||
|            | ||||
|            | ||||
|            | ||||
|            | ||||
|            | ||||
|            | ||||
|                  <div id="menu3" class="container tab-pane"><br> | ||||
|         <div id="menu3" class="container tab-pane"><br> | ||||
|             | ||||
|         | ||||
|             | ||||
|             | ||||
|           <?php | ||||
| <?php | ||||
|            | ||||
|           if($Report_Type=="Group") | ||||
| { | ||||
|  $resulty  = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|         if($Report_Type=="Group") | ||||
|         { | ||||
|             $resulty  = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||
|       lab_report_submissions.Course_Group_id, `Attachment1`, | ||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, lab_report_submissions.Marks, lab_report_submissions.Status,  | ||||
|      `Title`,course_groups_table.Group_Name | ||||
|  | @ -309,10 +317,10 @@ FROM `lab_report_submissions` | |||
| 
 | ||||
| left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
 | ||||
| }  | ||||
| else | ||||
| { | ||||
|     $resulty  = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID, 
 | ||||
|         }  | ||||
|         else | ||||
|         { | ||||
|             $resulty  = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID, 
 | ||||
|     lab_report_submissions.Remarking_Reason, | ||||
|      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, | ||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, lab_report_submissions.Marks, lab_report_submissions.Status,  | ||||
|  | @ -321,69 +329,69 @@ FROM `lab_report_submissions` | |||
| Left JOIN users_table  on users_table.Student_ID=lab_report_submissions.Student_id | ||||
| left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'"); 
 | ||||
| } | ||||
|         } | ||||
|   | ||||
|  if(mysqli_num_rows($resulty)==0) | ||||
|     { | ||||
|      echo "No Remarking Request for this lab"; | ||||
|         if(mysqli_num_rows($resulty)==0) | ||||
|         { | ||||
|             echo "No Remarking Request for this lab"; | ||||
|       | ||||
|     } else { while($row = mysqli_fetch_assoc($resulty)) { | ||||
| 			$title=$row['Title']; | ||||
|                         $Marks=$row['Marks']; | ||||
|                         //$ins=$row['Notes']; 
 | ||||
|  $posted=$row['Submission_Date'];	 | ||||
|                          $deadline=$row['Deadline']; | ||||
|         } else { while($row = mysqli_fetch_assoc($resulty)) { | ||||
|                 $title=$row['Title']; | ||||
|                 $Marks=$row['Marks']; | ||||
|                 //$ins=$row['Notes']; 
 | ||||
|                 $posted=$row['Submission_Date'];	 | ||||
|                 $deadline=$row['Deadline']; | ||||
| 
 | ||||
|                           $att1=$row['Attachment1']; | ||||
|                               $att2=$row['Attachment2']; | ||||
|                                    $att3=$row['Attachment3']; | ||||
|                                     $att4=$row['Attachment4']; | ||||
|                                      $labid=$row['Lab_Report_ID']; | ||||
|                 $att1=$row['Attachment1']; | ||||
|                 $att2=$row['Attachment2']; | ||||
|                 $att3=$row['Attachment3']; | ||||
|                 $att4=$row['Attachment4']; | ||||
|                 $labid=$row['Lab_Report_ID']; | ||||
|                                       | ||||
|                      $remarking_reason=$row['Remarking_Reason']; | ||||
|                 $remarking_reason=$row['Remarking_Reason']; | ||||
| 
 | ||||
|                                      $submitted_std=$row['Student_id']; | ||||
|                                      $submitted_group=$row['Course_Group_id']; | ||||
|                                      $Submission_ID=$row['Submission_ID']; | ||||
|                                      $names=$row['Full_Name']; | ||||
|                                        $student_id=$row['sub_std']; | ||||
|                                             $gname=$row['Group_Name ']; | ||||
|                 $submitted_std=$row['Student_id']; | ||||
|                 $submitted_group=$row['Course_Group_id']; | ||||
|                 $Submission_ID=$row['Submission_ID']; | ||||
|                 $names=$row['Full_Name']; | ||||
|                 $student_id=$row['sub_std']; | ||||
|                 $gname=$row['Group_Name ']; | ||||
|                                  | ||||
|                                       if($submitted_group==0) | ||||
|                                       { | ||||
|                                      $submitted_by= $names."(".$student_id.")"; | ||||
|                                       } else { | ||||
|                                          $submitted_by="<i>(GROUP)</i> $gname" ; | ||||
|                                       } | ||||
|                 if($submitted_group==0) | ||||
|                 { | ||||
|                     $submitted_by= $names."(".$student_id.")"; | ||||
|                 } else { | ||||
|                     $submitted_by="<i>(GROUP)</i> $gname" ; | ||||
|                 } | ||||
|                                         | ||||
|                                      $full_link="<a href='~\..\Lab_Report_Submisions\\$att1'>$att1</a>";       | ||||
|                 $full_link="<a href='~\..\Lab_Report_Submisions\\$att1'>$att1</a>";       | ||||
|                                       | ||||
|                                      if($att2!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att2'>$att2</a>";     | ||||
|                                      } | ||||
|                                       if($att3!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att3'>$att3</a>";     | ||||
|                                      } | ||||
|                 if($att2!=""){ | ||||
|                     $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att2'>$att2</a>";     | ||||
|                 } | ||||
|                 if($att3!=""){ | ||||
|                     $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att3'>$att3</a>";     | ||||
|                 } | ||||
|                                       | ||||
|                                       if($att4!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>";     | ||||
|                                      } | ||||
|                 if($att4!=""){ | ||||
|                     $full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>";     | ||||
|                 } | ||||
|                 echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | ||||
|   $title  <br> by : <b> $submitted_by         [ Marked $Marks ] </b> <br> Remarking Reason : <b>$remarking_reason </b> | ||||
|    <hr> <span style='font-size:8pt'>Submitted : $posted        <b>  </b> " | ||||
|                         . "<button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Re-Mark Submission</button>" | ||||
|                         . "      <a href='~\..\Script.php?ignoreremarking=yes&id=$id&subid=$Submission_ID&header=$header&total=$total&status=Marked' class='btn-sm btn-warning'>  Ignore Request </a>" | ||||
|                         . "<br> Attachments : $full_link </span>  
 | ||||
|                 . "<button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Re-Mark Submission</button>" | ||||
|                 . "      <a href='~\..\Script.php?ignoreremarking=yes&id=$id&subid=$Submission_ID&header=$header&total=$total&status=Marked' class='btn-sm btn-warning'>  Ignore Request </a>" | ||||
|                 . "<br> Attachments : $full_link </span>  
 | ||||
| </div></k>";
 | ||||
|                  | ||||
|                 | ||||
|                  | ||||
|                                       }} | ||||
|        echo ""; | ||||
|        ?>
 | ||||
|             }} | ||||
|         echo ""; | ||||
|         ?>
 | ||||
|             | ||||
|             | ||||
|        </div> | ||||
|         </div> | ||||
|            | ||||
|            | ||||
|            | ||||
|  | @ -391,48 +399,48 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'"); | |||
|            | ||||
|            | ||||
|            | ||||
|                 <div id="menu4" class="container tab-pane"><br> | ||||
|         <div id="menu4" class="container tab-pane"><br> | ||||
|             | ||||
|       <h3>Course Groups</h3>   | ||||
|         <h3>Course Groups</h3>   | ||||
|         | ||||
|   | ||||
|      | ||||
|    | ||||
|         <hr> | ||||
|     <?php | ||||
| <?php | ||||
|     | ||||
|      | ||||
|      $result = mysqli_query($con,"  SELECT `Course_Group_id`, `Group_Name`, `Group_Leader`, `Course_id`,users_table.Full_Name
 | ||||
|         $result = mysqli_query($con,"  SELECT `Course_Group_id`, `Group_Name`, `Group_Leader`, `Course_id`,users_table.Full_Name
 | ||||
| FROM `course_groups_table` | ||||
| INNER JOIN users_table on users_table.Student_ID=course_groups_table.Group_Leader | ||||
| WHERE Course_id=$c_id");
 | ||||
|   | ||||
| if(mysqli_num_rows($result)==0) | ||||
|     { | ||||
|      echo "You have no Group in this Course"; | ||||
|     } else { while($row = mysqli_fetch_assoc($result)) { | ||||
| 			$name=$row['Group_Name']; | ||||
|                         $leader=$row['Full_Name']."(".$row['Group_Leader'].")"; | ||||
|                       $id= $row['Course_Group_id'];  | ||||
|         if(mysqli_num_rows($result)==0) | ||||
|         { | ||||
|             echo "You have no Group in this Course"; | ||||
|         } else { while($row = mysqli_fetch_assoc($result)) { | ||||
|                 $name=$row['Group_Name']; | ||||
|                 $leader=$row['Full_Name']."(".$row['Group_Leader'].")"; | ||||
|                 $id= $row['Course_Group_id'];  | ||||
|                          | ||||
|                          | ||||
|                         echo "<div  class='btn-default'><small> $name -  Leader : $leader </small></div>"; | ||||
|                 echo "<div  class='btn-default'><small> $name -  Leader : $leader </small></div>"; | ||||
|                          | ||||
|                         $rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, 
 | ||||
|                 $rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, 
 | ||||
|                             course_group_members_table.`Status`,users_table.Full_Name FROM `course_group_members_table`  | ||||
| INNER JOIN users_table on users_table.Student_ID=course_group_members_table.Student_ID | ||||
| where course_group_members_table.Course_Group_id=$id");
 | ||||
|                          | ||||
|                         while($row = mysqli_fetch_assoc($rs2)) { | ||||
| 			$name=$row['Full_Name']; | ||||
|                         $id=$row['Course_Group_id']; | ||||
|                         $status=$row['Status']; | ||||
|                          $Student_ID=$row['Student_ID']; | ||||
|                 while($row = mysqli_fetch_assoc($rs2)) { | ||||
|                     $name=$row['Full_Name']; | ||||
|                     $id=$row['Course_Group_id']; | ||||
|                     $status=$row['Status']; | ||||
|                     $Student_ID=$row['Student_ID']; | ||||
|                          | ||||
|                          | ||||
|                           echo "<li><small> $name-$Student_ID ($status)</small></li>"; | ||||
|                     echo "<li><small> $name-$Student_ID ($status)</small></li>"; | ||||
|                          | ||||
|                         } | ||||
|                 } | ||||
|                          | ||||
|                          | ||||
|                          | ||||
|  | @ -440,190 +448,100 @@ where course_group_members_table.Course_Group_id=$id"); | |||
|                          | ||||
|                          | ||||
|                          | ||||
|     } | ||||
|             } | ||||
|         } | ||||
|                         ?>
 | ||||
|         ?>
 | ||||
|      | ||||
| 
 | ||||
|      | ||||
|    | ||||
|             | ||||
|        </div> | ||||
|         </div> | ||||
|            | ||||
|        </div> | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
| </div> | ||||
|         </div> | ||||
|      | ||||
|         </div> | ||||
| 
 | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|     </div> | ||||
|         </div> | ||||
| 
 | ||||
| <?php | ||||
|         } | ||||
|         include 'Footer.php'; | ||||
|         ?>
 | ||||
|     } | ||||
| include 'Footer.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | ||||
| <script src="./css/jquery-1.11.1.min.js"></script> | ||||
|   | ||||
| <script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> | ||||
| <script src="./css/jquery-ui.min.js"></script> | ||||
| 
 | ||||
| <link rel="stylesheet" href="./css/jquery-ui.css" /> | ||||
| 
 | ||||
| <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" /> | ||||
| <script> | ||||
| 
 | ||||
| 
 | ||||
|     function mark(id,title,marks) { | ||||
|      | ||||
|     | ||||
|     try | ||||
|     { | ||||
|         try | ||||
|         { | ||||
|         | ||||
| 
 | ||||
|     $('<form id="frm" method="get" action="Script.php">'+title+'('+marks+' marks) <input type="hidden" name="savemarks" value="true">\n\ | ||||
|             $('<form id="frm" method="get" action="Script.php">'+title+'('+marks+' marks) <input type="hidden" name="savemarks" value="true">\n\ | ||||
|  <input type="hidden" name="total" value="'+marks+'" > <input type="hidden" name="id" value="'+id+'" ><br> Marks <input type="text" name="marks">\n\ | ||||
|  Comments <textarea name="feedback"></textarea>  \n\ | ||||
| <input type="hidden" name="labid" value="<?php echo $course_id; ?>"> <input type="hidden" name="header" value="<?php echo $header; ?>">  </form>').dialog({ | ||||
|   modal: true, | ||||
|           title:'Mark Submission', | ||||
|   buttons: { | ||||
|     'Submit Marking': function () { | ||||
|    $('#frm').submit(); | ||||
|         modal: true, | ||||
|                                                                                                                                                   title:'Mark Submission', | ||||
|                                                                                                                                                   buttons: { | ||||
|             'Submit Marking': function () { | ||||
|                 $('#frm').submit(); | ||||
|       | ||||
|       $(this).dialog('close'); | ||||
|     }, | ||||
|     'X': function () { | ||||
|                 $(this).dialog('close'); | ||||
|             }, | ||||
|                                                                                                                                                   'X': function () { | ||||
|    | ||||
|       $(this).dialog('close'); | ||||
|     } | ||||
|                                                                                                                                                       $(this).dialog('close'); | ||||
|                                                                                                                                                   } | ||||
|     | ||||
|   } | ||||
| }); | ||||
|                                                                                                                                                   } | ||||
|     }); | ||||
| 
 | ||||
|     }catch(e){ alert(e); } | ||||
| } | ||||
|         }catch(e){ alert(e); } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|      | ||||
|      | ||||
|     function updatev(id) { | ||||
| function updatev(id) | ||||
| { | ||||
|      | ||||
|     | ||||
|     try | ||||
|     { | ||||
|          | ||||
| 
 | ||||
|     $('<form id="frm" method="get" action="Script.php"> <input type="hidden" name="updatevisibility" value="true">\n\ | ||||
|         $('<form id="frm" method="get" action="Script.php"> <input type="hidden" name="updatevisibility" value="true">\n\ | ||||
|  <input type="hidden" name="id" value="'+id+'" > <br>\n\ | ||||
| Update Visibility<br><select name="status"> <option> Public </option><option>Private</option> </select>  \n\ | ||||
| <input type="hidden" name="labid" value="<?php echo $id; ?>"> <input type="hidden" name="total" value="<?php echo $total; ?>" > <input type="hidden" name="header" value="<?php echo $header; ?>">  </form>').dialog({ | ||||
|   modal: true, | ||||
|           title:'Update Report Visibility', | ||||
|   buttons: { | ||||
|     'Update': function () { | ||||
|    $('#frm').submit(); | ||||
|         modal: true, | ||||
|                                                                                                                                                                                                              title:'Update Report Visibility', | ||||
|                                                                                                                                                                                                              buttons: { | ||||
|             'Update': function () { | ||||
|                 $('#frm').submit(); | ||||
|       | ||||
|       $(this).dialog('close'); | ||||
|     }, | ||||
|     'X': function () { | ||||
|                 $(this).dialog('close'); | ||||
|             }, | ||||
|                                                                                                                                                                                                              'X': function () { | ||||
|    | ||||
|       $(this).dialog('close'); | ||||
|     } | ||||
|                                                                                                                                                                                                                  $(this).dialog('close'); | ||||
|                                                                                                                                                                                                              } | ||||
|     | ||||
|   } | ||||
| }); | ||||
|                                                                                                                                                                                                              } | ||||
|     }); | ||||
| 
 | ||||
|     }catch(e){ alert(e); } | ||||
| } | ||||
|     </script> | ||||
| </script> | ||||
|      | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										204
									
								
								SubmitLab.php
								
								
								
								
							
							
						
						
									
										204
									
								
								SubmitLab.php
								
								
								
								
							|  | @ -1,157 +1,135 @@ | |||
| <?php | ||||
| include 'NoDirectPhpAcess.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| <?php | ||||
| $page='Submit LAB+'; | ||||
| include 'Header.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| <div class='row' style='width:80%;margin:auto;'> | ||||
| 
 | ||||
| 
 | ||||
| <?php | ||||
|   $c_date=  date("Y-m-d H:i"); | ||||
| 
 | ||||
|   $student_id=$_SESSION["user_student_id"]; | ||||
| 
 | ||||
| 
 | ||||
|   $student_id=$_SESSION["user_student_id"]; | ||||
| $c_date =  date("Y-m-d H:i"); | ||||
| $student_id = $_SESSION["user_student_id"]; | ||||
|    | ||||
|  if(!empty($_GET["id"])) | ||||
|   { | ||||
|       $id=$_GET["id"]; | ||||
|  $url=$_GET["url"]; | ||||
| if(!empty($_GET["id"])) | ||||
| { | ||||
|     $id = $_GET["id"]; | ||||
|     $url = $_GET["url"]; | ||||
|        | ||||
|       $result1 = mysqli_query($con," SELECT Type, `Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, " | ||||
|                     . "`Attachment_link_4` FROM `lab_reports_table` WHERE Lab_Report_ID=$id  and deadline > '$c_date'  ORDER by Lab_Report_ID DESC"); | ||||
| if(mysqli_num_rows($result1)==0) | ||||
|     $result1 = mysqli_query($con," SELECT `Type`, `Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4` FROM `lab_reports_table` WHERE Lab_Report_ID=$id  and Deadline > '$c_date'  ORDER by Lab_Report_ID DESC"); | ||||
|     if(mysqli_num_rows($result1) == 0) | ||||
|     { | ||||
|      echo "No Active assignments for this course so far."; | ||||
|         echo "No active assignments for this course so far."; | ||||
|       | ||||
|     } else { while($row = mysqli_fetch_assoc($result1)) { | ||||
|     } else { | ||||
|          | ||||
|                      $Course_ID=$row['Course_ID']; | ||||
| 			                $title=$row['Title']; | ||||
|                         $ins=$row['Instructions']; | ||||
|                          $posted=$row['Posted_Date'];	 | ||||
|                          $deadline=$row['Deadline']; | ||||
|                           $att1=$row['Attachment_link_1']; | ||||
|                               $att2=$row['Attachment_link_2']; | ||||
|                                    $att3=$row['Attachment_link_3']; | ||||
|                                     $att4=$row['Attachment_link_4']; | ||||
|                                      $labid=$row['Lab_Report_ID']; | ||||
|                                       | ||||
|                                      $type=$row['Type']; | ||||
|         while($row = mysqli_fetch_assoc($result1)) { | ||||
|          | ||||
|         //----------------------------------Giving both Group Admin and Group Members same priviledges to submit assignment--------------------------------------
 | ||||
|                                      if($type=="Group"){ | ||||
|         $resultx1 = mysqli_query($con,"SELECT Course_Group_id  FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or(Group_Leader=$student_id))"); | ||||
|             $Course_ID = $row['Course_ID']; | ||||
|             $title = $row['Title']; | ||||
|             $ins = $row['Instructions']; | ||||
|             $posted = $row['Posted_Date'];	 | ||||
|             $deadline = $row['Deadline']; | ||||
|             $att1 = $row['Attachment_link_1']; | ||||
|             $att2 = $row['Attachment_link_2']; | ||||
|             $att3 = $row['Attachment_link_3']; | ||||
|             $att4 = $row['Attachment_link_4']; | ||||
|             $labid = $row['Lab_Report_ID']; | ||||
|             $type = $row['Type']; | ||||
|          | ||||
|             //----------------------------------Giving both the Group Admin and Group Members same priviledges to submit assignment--------------------------------------
 | ||||
|             if($type=="Group"){ | ||||
|                 $resultx1 = mysqli_query($con,"SELECT Course_Group_id  FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or (Group_Leader=$student_id))"); | ||||
|                 while($row = mysqli_fetch_assoc($resultx1)) { | ||||
|                   $_SESSION["Group_ID"]=$row['Course_Group_id'];}   | ||||
|                     $_SESSION["Group_ID"] = $row['Course_Group_id']; | ||||
|                 }   | ||||
|        | ||||
|       if($_SESSION["Group_ID"]<1)  | ||||
|       { | ||||
|          echo" <center><h3> This Lab report can only be submitted by Group Admin  </h3> </center> "; | ||||
|          return; | ||||
|       } | ||||
|         } | ||||
|                 if($_SESSION["Group_ID"] < 1)  | ||||
|                 { | ||||
|                     echo" <center><h3> This Lab report can only be submitted by Group Admin  </h3> </center> "; | ||||
|                     return; | ||||
|                 } | ||||
|             } | ||||
|                                       | ||||
|                                       | ||||
|             $full_link="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";       | ||||
|                                       | ||||
|                               | ||||
|                                      $full_link="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";       | ||||
|             if($att2!=""){ | ||||
|                 $full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";     | ||||
|             } | ||||
|             if($att3!=""){ | ||||
|                 $full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att3'>$att3</a>";     | ||||
|             } | ||||
|                                       | ||||
|                                      if($att2!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";     | ||||
|                                      } | ||||
|                                       if($att3!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att3'>$att3</a>";     | ||||
|                                      } | ||||
|                                       | ||||
|                                       if($att4!=""){ | ||||
|                                        $full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";     | ||||
|                                      } | ||||
|             if($att4!=""){ | ||||
|                 $full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";     | ||||
|             } | ||||
|                 | ||||
|                                       | ||||
|                                                      echo    "  <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
 | ||||
|             echo    "  <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
 | ||||
|   Courses > $url > Submlit Lab Report > $title  | ||||
|    <br>  | ||||
| </a></div> | ||||
|  ";
 | ||||
|                                       | ||||
| //                                     echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;width:100%;'>
 | ||||
| //  $title <br> <span style='font-size:8pt'> $ins</span> 
 | ||||
| //   <br> <span style='font-size:8pt'>Posted : $posted  Deadline :   $deadline        <br> Attachments : $full_link </span>
 | ||||
| //</div></k>";
 | ||||
|                  | ||||
|                                  | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                 echo ""; | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                  | ||||
|                                       }} | ||||
|       | ||||
|     | ||||
|   } | ||||
|   $Group_ID=$_SESSION["Group_ID"]; | ||||
| 
 | ||||
|             echo ""; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| $Group_ID = $_SESSION["Group_ID"]; | ||||
| 
 | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <div style="width:80%;margin:auto;"> | ||||
| 
 | ||||
|    <h3> Submit Lab Report Assignment </h3> | ||||
|     <hr> | ||||
|          <h3> Submit Lab Report Assignment </h3> | ||||
|          <hr> | ||||
|     <div class="row"> | ||||
|       | ||||
|         <div class="col-md-6"> | ||||
|          <div class="col-md-6"> | ||||
|              | ||||
|        | ||||
| 
 | ||||
| <form method='post'   enctype='multipart/form-data' action='Script.php'> | ||||
|                    <input type='hidden' name='frm_submitlab' value='true' required=''/> | ||||
|                       <input type='hidden' name='lab_id' value='<?php echo $id; ?>' required=''/> | ||||
|                             <input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required=''/> | ||||
|                              | ||||
|                               <input type='hidden' name='group_id' value='<?php echo $Group_ID; ?>' required=''/> | ||||
|                              <input type='hidden' name='url' value='<?php echo $url; ?>' required=''/> | ||||
|          <form method='post' enctype='multipart/form-data' action='Script.php'> | ||||
|          <input type='hidden' name='frm_submitlab' value='true' required=''/> | ||||
|          <input type='hidden' name='lab_id' value='<?php echo $id; ?>' required=''/> | ||||
|          <input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required=''/> | ||||
|          <input type='hidden' name='group_id' value='<?php echo $Group_ID; ?>' required=''/> | ||||
|          <input type='hidden' name='url' value='<?php echo $url; ?>' required=''/> | ||||
|                                | ||||
|   | ||||
|                                | ||||
| Title | ||||
| <input type='text'  name='title' placeholder='Ttle' class='form-control' required=''> | ||||
|  Attachment 1 | ||||
| <input type='file'  name='attachment1' placeholder='Attachment 1' class='form-control' required=''> | ||||
|          Title | ||||
|          <input type='text'  name='title' placeholder='Ttle' class='form-control' required=''> | ||||
| 
 | ||||
|  Attachment 2 | ||||
| <input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'> | ||||
|          Attachment 1 | ||||
|          <input type='file'  name='attachment1' placeholder='Attachment 1' class='form-control' required=''> | ||||
| 
 | ||||
|         </div> | ||||
|           <div class="col-md-6"> | ||||
|          Attachment 2 | ||||
|          <input type='file' name='attachment2' placeholder='Attachment 2' class='form-control'> | ||||
| 
 | ||||
|          </div> | ||||
| 
 | ||||
|  Attachment 3 | ||||
| <input type='file'  name='attachment3' placeholder='Attachment 1' class='form-control' > | ||||
|          <div class="col-md-6"> | ||||
| 
 | ||||
|          Attachment 3 | ||||
|          <input type='file'  name='attachment3' placeholder='Attachment 3' class='form-control' > | ||||
| 
 | ||||
|  Attachment 4 | ||||
| <input type='file'  name='attachment4' placeholder='Attachment 4' class='form-control' > | ||||
| <br> | ||||
|   <input type='submit' class='btn btn-primary' value='Submit Lab Assignment'><br> | ||||
| </form> | ||||
|          Attachment 4 | ||||
|          <input type='file'  name='attachment4' placeholder='Attachment 4' class='form-control' > | ||||
|          <br> | ||||
|           | ||||
|          <input type='submit' class='btn btn-primary' value='Submit Lab Assignment'><br> | ||||
|          </form> | ||||
|     | ||||
|          </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </div> | ||||
|           </div> | ||||
|    </div> | ||||
|      | ||||
|      </div>  | ||||
| </div>  | ||||
|  |  | |||
							
								
								
									
										175
									
								
								index.php
								
								
								
								
							
							
						
						
									
										175
									
								
								index.php
								
								
								
								
							|  | @ -1,137 +1,129 @@ | |||
| 
 | ||||
|      | ||||
| 
 | ||||
| <?php | ||||
| $page='Home'; | ||||
| include 'Header.php'; | ||||
| 
 | ||||
| session_start(); | ||||
| 
 | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php | ||||
| // if the user has already logged in, then clicking the LRRS icon should not display the login page (i.e., index.php).
 | ||||
| if (isset($_SESSION["user_fullname"])) { | ||||
|     header("Location: Courses.php"); | ||||
| } | ||||
| ?>
 | ||||
| 
 | ||||
| <br><br><br> | ||||
| <div class="row" style="width:80%;margin:auto;"> | ||||
| 
 | ||||
|     <div class="col-md-4"> | ||||
|         <br><br> | ||||
|         <img src="logo_text.png" style="width"> | ||||
|         <h1> Lab Report Repository System  </h1> | ||||
|         <br><br> | ||||
|     <br><br> | ||||
|     <img src="logo_text.png" style="width"> | ||||
|     <h1> Lab Report Repository  </h1> | ||||
|     <br><br> | ||||
|     </div> | ||||
|      | ||||
|      | ||||
|      | ||||
| <div class="col-md-4 list-group"> | ||||
|     <div class="col-md-4 list-group"> | ||||
| 
 | ||||
|     <br> | ||||
|     | ||||
| <h4 class="list-group-item active"> Sign in </h4> | ||||
| <div class="list-group-item"> | ||||
|     <h4 class="list-group-item active"> Sign in </h4> | ||||
|     <div class="list-group-item"> | ||||
| 
 | ||||
|     <div class="panel-body"> | ||||
| <form method="post" action="Script.php" name="frm_login"> | ||||
|        <input type="hidden" name="frm_login" value="true"/> | ||||
| Student ID / Email | ||||
| <input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" /> | ||||
| 
 | ||||
| 
 | ||||
|     <form method="post" action="Script.php" name="frm_login"> | ||||
|     <input type="hidden" name="frm_login" value="true"/> | ||||
|     Student ID / Email | ||||
|     <input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" /> | ||||
|   | ||||
|   Password | ||||
| <input type="password" class="form-control"  name="password" placeholder="password" required="required" /> | ||||
|   <br>  | ||||
|   <input type="submit" class="btn btn-primary" value="Login"><br> <a href="recover_password.php" style="font-weight:normal;color:orange">Reset my password</a> | ||||
| 
 | ||||
| <?php  | ||||
| 
 | ||||
| error_reporting(E_ALL); | ||||
| 
 | ||||
| if(isset($_SESSION['info_login'])) { | ||||
|   echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>'; | ||||
|   $_SESSION['info_login']=null; | ||||
| } | ||||
|     Password | ||||
|     <input type="password" class="form-control"  name="password" placeholder="password" required="required" /> | ||||
|     <br>  | ||||
|     <input type="submit" class="btn btn-primary" value="Login"><br> <a href="recover_password.php" style="font-weight:normal;color:gray">Reset my password</a> | ||||
| 
 | ||||
| 
 | ||||
| // wrong pass
 | ||||
| if(isset($_SESSION['wrong_pass'])) { | ||||
|   echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>'; | ||||
|   $_SESSION['wrong_pass']=null; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| if(isset($_SESSION['infoChangePassword'])) { | ||||
|   echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>'; | ||||
|   $_SESSION['infoChangePassword']=null; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| ?>
 | ||||
| </form> | ||||
| 
 | ||||
| </div> | ||||
|    | ||||
| </div> | ||||
| </div> | ||||
| <div class="col-md-4 list-group"> | ||||
| 
 | ||||
|     <?php  | ||||
|      | ||||
|     error_reporting(E_ALL); | ||||
|      | ||||
|     if(isset($_SESSION['info_login'])) { | ||||
|         echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>'; | ||||
|         $_SESSION['info_login']=null; | ||||
|     } | ||||
|      | ||||
|      | ||||
|     // wrong pass
 | ||||
|     if(isset($_SESSION['wrong_pass'])) { | ||||
|         echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>'; | ||||
|         $_SESSION['wrong_pass']=null; | ||||
|     } | ||||
|      | ||||
|      | ||||
|     if(isset($_SESSION['infoChangePassword'])) { | ||||
|         echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>'; | ||||
|         $_SESSION['infoChangePassword']=null; | ||||
|     } | ||||
|      | ||||
| 
 | ||||
|     <br> | ||||
| <h4 class="list-group-item active"> Student sign up </h4> | ||||
| <div class="list-group-item"> | ||||
|     ?>
 | ||||
| 
 | ||||
| <form method="post" action="Script.php" name="frm_signup_1"> | ||||
|     </form> | ||||
| 
 | ||||
| </div> | ||||
| </div> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| <div class="col-md-4 list-group"> | ||||
| 
 | ||||
|     <br> | ||||
|     <h4 class="list-group-item active"> Sign up </h4> | ||||
|     <div class="list-group-item"> | ||||
| 
 | ||||
|     <form method="post" action="Script.php" name="frm_signup_1"> | ||||
|     <input type="hidden" name="frm_signup_1" value="true"/> | ||||
|      | ||||
|     Student ID | ||||
| <input type="text" name="student_id" placeholder="Entre your Student ID" class="form-control" required=""> | ||||
|     <input type="text" name="student_id" placeholder="Entre your Student ID" class="form-control" required=""> | ||||
| 
 | ||||
| Your Passport / National ID | ||||
|   <input type="text" class="form-control"  name="passport" placeholder="(Optional)"> | ||||
|   <br> | ||||
|   <input type="submit" name="frm_signup_1" class="btn btn-primary" value="Next"> <br> Click Next to set up password | ||||
| <?php  | ||||
|     Your Passport / National ID | ||||
|     <input type="text" class="form-control"  name="passport" placeholder="(Optional)"> | ||||
|     <br> | ||||
|     <input type="submit" name="frm_signup_1" class="btn btn-primary" value="Next"> <br> Click Next to set up password | ||||
| 
 | ||||
| error_reporting(E_ALL); | ||||
| if(isset($_SESSION['info_signup1'])) { | ||||
|   echo  '<div class="alert alert-danger" role="alert">'.$_SESSION['info_signup1'].'</div>'; | ||||
|   $_SESSION['info_signup1']=null; | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
|    | ||||
| </div> | ||||
| </form> | ||||
|     <?php  | ||||
|      | ||||
|     error_reporting(E_ALL); | ||||
|     if(isset($_SESSION['info_signup1'])) { | ||||
|         echo  '<div class="alert alert-danger" role="alert">'.$_SESSION['info_signup1'].'</div>'; | ||||
|         $_SESSION['info_signup1']=null; | ||||
|     } | ||||
|      | ||||
|     ?>
 | ||||
|        | ||||
|     </div> | ||||
|     </form> | ||||
| 
 | ||||
| </div> | ||||
| </div> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <hr> | ||||
| 
 | ||||
| <div style="" id="footer"> | ||||
| LRRS was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi.  Please submit your suggestions or bug reports to  lanhui _at_ zjnu.edu.cn.  Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a> | ||||
| </div> | ||||
|     LRRS was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi.  Please submit your suggestions or bug reports to  lanhui _at_ zjnu.edu.cn.  Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a> | ||||
|     </div> | ||||
| 
 | ||||
| </body> | ||||
|     </body> | ||||
| 
 | ||||
| <style> | ||||
| #footer{
 | ||||
|  position:fixed; | ||||
|  bottom:0; | ||||
|  left:0; | ||||
| position:fixed; | ||||
| bottom:0; | ||||
| left:0; | ||||
| background-color:#03417C;
 | ||||
| color:#FFF;
 | ||||
| text-align:center; | ||||
|  | @ -139,4 +131,3 @@ width:100%; | |||
| } | ||||
| </style> | ||||
| </html> | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,3 +1,7 @@ | |||
| <?php | ||||
|   include 'NoDirectPhpAcess.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| <?php | ||||
| 
 | ||||
| /*  | ||||
|  |  | |||
							
								
								
									
										57
									
								
								signup.php
								
								
								
								
							
							
						
						
									
										57
									
								
								signup.php
								
								
								
								
							|  | @ -1,59 +1,50 @@ | |||
| <?php | ||||
| include 'NoDirectPhpAcess.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| /*  | ||||
|  * To change this license header, choose License Headers in Project Properties. | ||||
|  * To change this template file, choose Tools | Templates | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| <?php | ||||
| include 'Header.php'; | ||||
| 
 | ||||
| ?>
 | ||||
| 
 | ||||
| <div class="row"> | ||||
|             | ||||
| <div class="col-md-4 list-group" style="margin:auto;"> | ||||
|     <div class="col-md-4 list-group" style="margin:auto;"> | ||||
| 
 | ||||
|     <br> | ||||
|     | ||||
| <h4 class="list-group-item active"> Sign Up </h4> | ||||
| <div class="list-group-item"> | ||||
|     <h4 class="list-group-item active"> Please fill in each field below </h4> | ||||
|     <div class="list-group-item"> | ||||
| 
 | ||||
|     <div class="panel-body"> | ||||
| 
 | ||||
| 
 | ||||
| <form method="post" action="Script.php" > | ||||
|       <input type="hidden" name="frm_signup_2" value="true"/> | ||||
|        Full Name | ||||
|        <input type="text" name="fullname" placeholder="Your Full Name" class="form-control" value="<?php echo $_SESSION['user_fullname']; ?>"  required="required"/> | ||||
|     <form method="post" action="Script.php" > | ||||
|     <input type="hidden" name="frm_signup_2" value="true"/> | ||||
|     Full Name | ||||
|     <input type="text" name="fullname" placeholder="Your Full Name" class="form-control" value="<?php echo $_SESSION['user_fullname']; ?>"  required="required"/> | ||||
| 
 | ||||
|        Email | ||||
|        <input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>"  required="required" /> | ||||
|     Email | ||||
|     <input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>"  required="required" /> | ||||
|   | ||||
|        Password | ||||
|        <input type="password" class="form-control"  name="password" placeholder="password" required="required" /> | ||||
|     Password (<i>must include uppercase and lowercase letters, digits and special characters</i>) | ||||
|     <input type="password" class="form-control"  name="password" placeholder="password" required="required" /> | ||||
| 
 | ||||
|        Confirm Password | ||||
|        <input type="password" class="form-control"  name="confirmpassword" placeholder="Confirm password" required="required" /> | ||||
|        <br> | ||||
|        <input type="submit" class="btn btn-primary" value="Sign up"> | ||||
|     Confirm Password | ||||
|     <input type="password" class="form-control"  name="confirmpassword" placeholder="Confirm password" required="required" /> | ||||
|     <br> | ||||
|     <input type="submit" class="btn btn-primary" value="Sign up"> | ||||
| <?php  | ||||
| 
 | ||||
| 
 | ||||
| error_reporting(E_ALL); | ||||
| if(isset($_SESSION['info_signup2'])) { | ||||
|   echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_signup2'].'</div>'; | ||||
|   $_SESSION['info_signup2'] = null; | ||||
|     echo  '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_signup2'].'</div>'; | ||||
|     $_SESSION['info_signup2'] = null; | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| </form> | ||||
| </div> | ||||
|    | ||||
| </div> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| </div> | ||||
| </form> | ||||
| </div>  | ||||
|  </div> | ||||
| </div> | ||||
| </div> | ||||
| </div> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue