<?php include('header.php'); echo $fname=$_GET['fname'];?>
<body>

<div class="container">
<br />
<br />
<div class="row-fluid">

<div class="span4">
<!----- form ---->	
<form action="upload.php" method="post" enctype="multipart/form-data" name="upload">
<label style="color:blue; font-size:18px; font-family:cursive;"> File </label>
<input name="uploaded_file" type="file" class="input-xlarge" required/>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
<label style="color:blue; font-size:18px; font-family:cursive;"> Students Roll Number</label>
<input type="number" name="fname" value="<?php echo $fname; ?>" readonly required>
<label style="color:blue; font-size:18px; font-family:cursive;"> File Type</label>
<textarea name="desc" cols="" rows="" class="input-xlarge" required></textarea>
<br/>
<input name="Upload" type="submit" value="Upload" class="btn btn-primary btn-large" />
</form>
<!---- end form -->
</div>

<div class="span8">
	
<table class="table table-bordered">
    <thead>
		<tr>
		<th>Student Roll Number</th>
        <th>File Link</th>
		<th>File Type</th>
		<th>Date Upload</th>
		</tr>
    </thead>
    <tbody>
		<?php $query=mysql_query("select * from up_files where fname='$fname'")or die(mysql_error());
		while($row=mysql_fetch_array($query)){
		?>
		<tr>
		<td><?php echo $row['fname']; ?></td>
        <td><a href="http://rnsc.mdsoftware.co.in/old/admin/upload/uploads/<?php echo $row['floc']; ?>" target="_blank"><?php echo $row['floc']; ?></a></td>
		<td><?php echo $row['fdesc']; ?></td>
		<td><?php echo date("M d, Y h:i:s A",strtotime($row['fdatein'])); ?></td>
		</tr>
		<?php } ?>
    </tbody>
</table>	
</div>

</div>




</div>
</body>
</html>