Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/check3/
Upload File :
Current File : /var/www/html/venkat/check3/findex.php

<?php
?>
<html>
	<body bgcolor="#F0F8FF"> <center>
	<h2> <font color="blue"> Program Verfication Portal</font> </h2>
	<form enctype="multipart/form-data" name="r" action="findex.php" method="post">
	<table width="35%" height="15%" cellspacing="1" cellpadding="1" border="1">
	<tr>
		<td>
		Choose the section You belongs to
		</td>
		<td>&nbsp; &nbsp; &nbsp;
			<select name="section">
  				<option value="cg2013">IGVC532C</option>
  				<option value="sec_a">Section: A</option>
  				<option value="sec_b">Section: B</option>
  				<option value="sec_c">Section: C</option>
  				<option value="rgiit">Section: RGIIT</option>
			</select>
		</td>
	</tr>
	</tr>
	<tr>
		<td> 
			<input type="submit" value="Submit">
		</td>
		<td>
			&nbsp;
		</td>
	</tr>
	</table>
	</center> </body>
</html>
<?php
if($_POST["section"])
{
	$section = $_POST["section"];
	$section1 = $section."dec.txt"; 
	$result = shell_exec("sort -f $section1");
	$result = explode("\n", $result);
	$sectionU = strtoupper($section);
	$i = 0;
	echo "<h3> <center> <font color='red'> ". $sectionU. "</font> </color> </h3>";
	echo "<table width='70%' height = '35%' align ='center' border='1'>";
	echo "<tr> <td> <center><b>Sl. No. </b> </center> </td>";
	echo "<td> <center> <b> File Name </b> </center> </td>";
//	echo "<td> <center> <b> Output </b> </center> </td>";
	echo "<td> <center> <b> Submission Time </b> </center> </td>";
	echo "<td> <center> <b> MD5sum </b> </center> </td>";
	echo "<td> <center> <b> Output Match % </b> </center> </td>";
	echo "<td> <center> <b> Decision </b> </center> </td>";
	echo "<td> <center> <b> Username </b> </center> </td></tr>";
	while ($result[$i])
	{
		$result1 =explode('|', $result[$i]);
		$section2 = $section.":".$result1[0];
		$j = $i+1;
		echo "<tr> <td> <center> ".$j." </center> </td>";
		echo "<td><a href = 'facmain.php?section=$section2' target='_blank'>". $result1[0]. "</td>";
		echo "<td>". $result1[2]."</td>";
		echo "<td>". $result1[3]."</td>";
	//	echo "<td>". $result1[4]."</td>";
		echo "<td> <center> ". $result1[4]." </center> </td>";
		echo "<td>";
		if($result1[5]!=" Correct ")
		{
			echo "<font color='red'>";
		}	
		echo $result1[5]."</font> </td> ";
		echo "<td>".$result1[6]."</font> </td> </tr>";
		$i++;
	}
	echo "</table>";
}
?>