<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{


?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

   <!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        
        <!-- Header-->

        

        <div class="content mt-3">

           


          
<div class="col-md-12">
                        <div class="card">
                            
                            <div class="card-body">
							<?php

include 'dbc.php';

$id=$_REQUEST["id"];

$userid=$_SESSION["userid"];

$sql1 = "SELECT * FROM resultnote where user_id='$userid'";
$result1=$conn->query($sql1);
$row1 = $result1->fetch_assoc();
$notice=$row1['notice'] ;


$sql = "SELECT * FROM result where  id='$id' and user_id='$userid' order by std_rollno";
$result=$conn->query($sql);
while($row = $result->fetch_assoc())


  {
  $std_rollno=$row['std_rollno'] ;
$father_name=$row['father_name'] ;
$std_name=$row['std_name'] ;
$month_name=$row["month_name"];
$sess1=$row["sess1"];
$class_name=$row["class_name"];
$cls_sec=$row["cls_sec"];

$term=$row["term"];

   ?>
                                <table id="bootstrap-data-table-export" class="table table-striped table-bordered">
								<div class="card-header">
								<div class="page-title">
                        <h2><center><? echo "" . $_SESSION["userid"]; ?></center></h2>
                    </div>
                                <strong class="card-title"> <center>Student Result Card</center></strong>
                            </div>
                                    <thead>
									<?php
 echo "<tr>";
echo "<th colspan=2>$term </th>";
echo "<th colspan=2>$month_name </th>";
echo "<th colspan=2>$sess1 </th>";
echo "<th colspan=2>$class_name </th>";
echo "</tr>";
echo "<tr>";
echo "<th colspan=2>$std_rollno </th>";
echo "<th colspan=2>$std_name </th>";
echo "<th colspan=2>$father_name </th>";
echo "<th colspan=2> $cls_sec</th>";
echo "</tr>";

 echo "<tr>";
   echo "<th colspan=8 align=center><center>Marks Details</center> </th>";
   
echo "</tr>";
echo "<tr>";
echo "<th colspan=2>Subjects Name </th>";
echo "<th colspan=2>Obtained Mark </th>";
echo "<th colspan=2>Total Mark </th>";
echo "<th colspan=2> Per%</th>";
echo "</tr>";
   echo "<tr>";
   echo "<th colspan=2>" . $row['sub1'] . "</th>";
echo "<td colspan=2>" .$row['omark1'] . "</td>";
echo "<td colspan=2>" .$row['tmark1'] . "</td>";
echo "<td colspan=2>" .$row['per1'] . "%" ."</td>";
echo "</tr>";
  echo "<tr>";
   echo "<th colspan=2>" . $row['sub2'] . "</th>";
echo "<td colspan=2>" .$row['omark2'] . "</td>";
echo "<td colspan=2>" .$row['tmark2'] . "</td>";
echo "<td colspan=2>" .$row['per2'] . "%" ."</td>";
echo "</tr>";

echo "<tr>";
   echo "<th colspan=2>" . $row['sub3'] . "</th>";
echo "<td colspan=2>" .$row['omark3'] . "</td>";
echo "<td colspan=2>" .$row['tmark3'] . "</td>";
echo "<td colspan=2>" .$row['per3'] . "%" ."</td>";
echo "</tr>";

echo "<tr>";
   echo "<th colspan=2>" . $row['sub4'] . "</th>";
echo "<td colspan=2>" .$row['omark4'] . "</td>";
echo "<td colspan=2>" .$row['tmark4'] . "</td>";
echo "<td colspan=2>" .$row['per4'] . "%" ."</td>";
echo "</tr>";

echo "<tr>";
    echo "<th colspan=2>" . $row['sub5'] . "</th>";
echo "<td colspan=2>" .$row['omark5'] . "</td>";
echo "<td colspan=2>" .$row['tmark5'] . "</td>";
echo "<td colspan=2>" .$row['per5'] . "%" ."</td>";
echo "</tr>";

echo "<tr>";
    echo "<th colspan=2>" . $row['sub6'] . "</th>";
echo "<td colspan=2>" .$row['omark6'] . "</td>";
echo "<td colspan=2>" .$row['tmark6'] . "</td>";
echo "<td colspan=2>" .$row['per6'] . "%" ."</td>";
echo "</tr>";

echo "<tr>";
   echo "<th colspan=2>" . $row['sub7'] . "</th>";
echo "<td colspan=2>" .$row['omark7'] . "</td>";
echo "<td colspan=2>" .$row['tmark7'] . "</td>";
echo "<td colspan=2>" .$row['per7'] . "%" ."</td>";
echo "</tr>";

echo "<tr>";
    echo "<th colspan=2>" . $row['sub8'] . "</th>";
echo "<td colspan=2>" .$row['omark8'] . "</td>";
echo "<td colspan=2>" .$row['tmark8'] . "</td>";
echo "<td colspan=2>" .$row['per8'] ."%" . "</td>";
echo "</tr>";
echo "<tr>";
 echo "<th colspan=2>Total </th>";
echo "<td>" .$row['totalmark'] . "</td>";
echo "<td>" .$row['obtmark'] . "</td>";
echo "<td>" .$row['per'] . "%" ."</td>";
echo "<td>" .$row['status'] . "</td>";
echo "<td>" .$row['grade'] . "</td>";
echo "<td>" .$row['remarks'] . "</td>";
echo "</tr>";
echo "<tr>";

		 
		  
	
  echo "</tr>";

  echo "<tr>";
echo "<th colspan=8 align=left  bgcolor=#FFFFFF> 90% - Above A+ Outstanding <br> 80% - 89.99% A Excellent <br>70% - 79.99% B V.Good <br>60% - 69.99% C Good <br> 50% - 59.99% D Fair <br> 45% - 49.99% E Weak <br> 33% - 44.99% F Poor <br> 0% - 32.99% G Fail. </th>";
echo "</tr>";
 echo "<tr>";
echo "<th colspan=8  align=left bgcolor=#FFFFFF>$notice </th>";
echo "</tr>";
 echo "<tr>";
 
echo "<th colspan=8  align=left bgcolor=#FFFFFF><br><br> Teacher Signature______________ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Principal Signature______________ </th>";
echo "</tr>";
  }
  ?>
                                       
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
            


        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php
}
?>