| Current Path : /var/www/html/abdullah/ |
| Current File : /var/www/html/abdullah/result_1st_yr.php |
<!--Copyright (c) 2015 Affan Ahmad Fahmi. All rights reserved.-->
<html>
<head>
<title>Teaching</title>
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico">
<link rel="stylesheet" href="./resources/style/main.css">
<link rel="stylesheet" href="./resources/style/form.css">
<script type="text/javascript"
src="./resources/script/js/sec.js">
</script>
<script src="./resources/script/js/jquery.min.js" type="text/javascript"></script>
</head>
<body background='./resources/pic/bg.jpg'>
<div id="head">
<ul>
<li><a href="./">Home</a></li>
<li><a href="Academics.htm">Academics</a></li>
<li><a href="Research.htm">Research</a></li>
<li><a href="Teaching.php">Teaching</a></li>
<li><a href="CV.pdf">CV</a></li>
<!--<li><a href="http://profile.iiita.ac.in/IIT2015002/">About Developer</a></li>-->
</ul>
</div>
<div id="body">
<br><br>
<div id="login" style="width:80%; margin:0 auto;">
<content>
<center><h3 class="toggler-37">Marks of Univariate and Multivariate Calculus (January - June 2020)</h3></center>
<ul class="panel-37">
<?php
if(isset($_POST['username']) && isset($_POST['password'])){
$adServer = "ldaps://pldap.iiita.ac.in";
$ldap = ldap_connect($adServer);
$username = $_POST['username'];
$password = $_POST['password'];
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
$a = ldap_search($ldap,"dc=iiita,dc=ac,dc=in", "uid=$username");
$b = ldap_get_entries($ldap, $a);
$dn = $b[0]["dn"];
//******************************************************
if(trim($username)==='' || trim($password)==='')
{
echo "Username and Password cannot be blank.";
}
elseif (ldap_bind($ldap, $dn, $password))
{
$username = strtoupper($username);
if (($handle = fopen("AJ20BUMC2C_Make_Up_Marks.csv", "r")) !== FALSE)
{
$flag=0;
if((($data0 = fgetcsv($handle, 1000, ",")) !== FALSE))
{
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
{
$num = count($data);
$fileuser = strtoupper($data[0]);
if ($num>0 && $fileuser==$username)
{
$flag = 1;
?>
<h2>Enrolment Number: <?php echo $data[0];?> Name : <?php echo $data[1];?></h2>
<br/>
<table class="fixed">
<col width="250px" />
<col width="100px" />
<thead>
<tr><td><b><u>Exam </u></b></td><td><b><u>Mark</u></b></td></tr>
</thead>
<tbody>
<?php
for ($c=2; $c < $num; $c++)
{
?>
<tr>
<td><?php echo $data0[$c];?></td>
<td><?php echo $data[$c];?></td>
</tr>
<?php
}
break;
}
}
?>
</tbody>
</table>
<?php
}
if($flag==0)
{
echo "No data found for this user. Please make sure that you are attending a valid course this semester";
}
fclose($handle);
}
else
{
echo "Primary data not found. Please inform at abdullah@iiita.ac.in";
}
}
else
echo "Wrong Username/Password";
ldap_close($ds);
}
else
{
?>
<h4>Log-In using your LDAP credentials</h4>
<form action="#" method="POST">
<label for="username">Username: </label><br>
<input id="username" type="text" name="username" /><br>
<label for="password">Password: </label><br>
<input id="password" type="password" name="password" /><br><br>
<input type="submit" name="submit" value="Submit" /><br>
</form>
<?php } ?>
</ul>
</content>
</div>
<br><br>
<footer id="footer">
<div id="footerContent">
<div id="footer-bottom">
<div class="inner-footer">
<div id="footer-left">
<div class="left">
© 2016 Dr. Abdullah Bin Abu Baker
<a href="mailto:abdullah@iiita.ac.in">abdullah@iiita.ac.in</a>
</div>
<a href="http://profile.iiita.ac.in/IIT2015002/" class="ext-link footerCopyright">Designed by <span>Affan Ahmad Fahmi</span></a>
</div>
<div class="clear">Indian Institute of Information Technology Allahabad</div>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>