| Current Path : /var/www/html/mmishra/iws8/html/ialumni/ |
| Current File : /var/www/html/mmishra/iws8/html/ialumni/login.php |
<?php session_start(); ?>
<?php require_once("include/connection.php"); ?>
<?php require_once("include/functions.php"); ?>
<?php
$session = isset($_SESSION['ilogin']);
if($session){
header("Location:index.php");
$ilogin = $_SESSION['ilogin'];
$result = get_user_details($ilogin);
$pp = $result['user_dp'];
$chead = '<li class="btn-notifi" style="margin-left: 50px;"> <a href="#"> <i class="icon-bell" style="font-size: 16px;vertical-align: baseline;"></i> </a> </li>
<li class="dropdown btn-user">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="user-img" style="display:inline-block;background-image:url(images/uploads/alumni/'.$pp.');width: 24px;height:24px;background-size: cover;background-repeat: no-repeat;position: relative;top: 7px;border-radius:30px"></span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" style="margin-top: 10px;margin-left: -110px;font-size:13px;">
<li><a href="profile.php">My Profile</a></li>
<li role="separator" class="divider" style="display: block;margin: 0;"></li>
<li><a href="ajax/logout.php">Logout</a></li>
</ul>
</li>';
}
else{
$chead = '<li class="btn-register" style="margin-left: 50px;"> <a href="register.php"> Register </a> </li>
<li class="btn-login"> <a href="login.php"> Login </a> </li>';
}
?>
<?php
$cmhead = 'Sign in to your account';
if(isset($_GET['code'])){
$code = $_GET['code'];
$result = validate_code($code);
if($result == 1){
$cmhead = 'Log in to activate your account';
}
else{
$cmhead = 'Sign in to your account';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Alumni@IIITA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="styles/bootstrap.css">
<link rel="stylesheet" href="styles/ello/fontello.css">
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<style>
body{
width:100%;
overflow-x: hidden;
color: #333;
font-style: normal;
font-family: "Myriad Set Pro","Lucida Grande","Helvetica Neue","Helvetica","Arial","Verdana","sans-serif";
font-size: 13px;;
font-weight: 400;
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: 'liga', 'kern';
}
.main-lg-form {
margin-top: 50px;
}
.main-lg-form input{
display: block;
width: 75%;
margin: auto;
margin-bottom: 20px;
outline: none;
padding: 8px;
border: 1px solid #d3d3d3;
border-radius: 5px;
}
.lg-l {
color: #08c;
cursor: pointer;
}
.lg-submitBtn {
position: relative;
top: -46px;left: 80%;
font-size: 18px;
color: #999;
cursor: pointer;
}
.lg-submitBtn:hover {
color :#666;
}
.main-lg-form input:focus {
border: 1px solid #08c;
}
</style>
</head>
<body id="stark" style="background: url(images/watermark.png) fixed;background-size: 100% auto;">
<div id="header" class="clear" style="width:100%;padding:0;background: #fff;padding-bottom:1px;border-bottom: 1px solid #d3d3d3;">
<div class="hcontent" style="background: url('images/headBack.png');height: 143px;width:100%;">
<div class="himg" style="background: url('images/header.png');height: 143px;background-repeat: no-repeat;width: 75%;margin: auto;"></div>
<div class="hincontent">
<div class="h-aap" style="color: #fff;font-size: 21px;position: relative;top: -115px;left: 37%;">
<span class="s-h-aap-f">Alumni Association Portal</span>
</div>
</div>
</div>
<div id="topnav">
<ul style="list-style: none;margin-left: 145px;margin-top: 8px;margin-bottom: 5px;">
<li class="btn-home"><a href="index.php">Home</a></li>
<li class="btn-dir"><a href="dir.php"> Directory <i class="icon icon-down-open-mini" style></i> </a> </li>
<li class="btn-meets"> <a href="meets.php"> Meets <i class="icon icon-down-open-mini" style></i> </a> </li>
<li class="btn-meets"> <a href="committee.php"> Committee <i class="icon icon-down-open-mini" style></i> </a> </li>
<li class="btn-search">
<span class="icon-search" style="width: 15px;display: inline-block;height: 15px;position: relative;top: 0px;left: 30px;"></span>
<input type="text" placeholder="Search by name, batch, location, etc" style="width: 285px;padding: 5px;border-radius: 15px;padding-left: 35px;outline: none;padding-bottom: 7px;background: #fff;color: #333;border: 1px solid #d3d3d3;">
</li>
<?php echo $chead; ?>
</ul>
</div>
</div>
<div id="main">
<div class="content-main" style="width: 40%;margin: auto;margin-top: 30px;margin-bottom: 50px;">
<div class="cm-head" style="font-size:18px;color:#555;text-align: center;margin-bottom:20px"><?php echo $cmhead; ?></div>
<div class="cm-wrapper">
<div class="login-form">
<div class="user-img" style="position: relative;left: 33%;display: inline-block; height: 96px; width: 96px; background-image: url(images/uploads/alumni/user-icon.png); background-size: cover; background-repeat: no-repeat; border-radius: 100%; border: 1px solid #999;"></div>
<form class="main-lg-form" action="" method="get" onsubmit="validate_user_login();">
<input class="lg-email" type="text" name="email" placeholder="Email" autofocus>
<input class="lg-passwd" type="password" name="passwd" placeholder="Password">
<input type="submit" style="display:none;">
<i class="icon-right-circled-1 lg-submitBtn"></i>
</form>
<div class="err-msg" style="color: #dd4b39;width: 74%;margin: auto;margin-top: -20px;margin-bottom: 20px;display:none">The email and password you entered don't match.</div>
<div class="lg-links" style="width: 74%;margin: auto;margin-top: 0px;">
<span class="lg-l">Forgot Password? </span>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="fcontent" style="width: 72%;margin: auto;">
<div class="fleft" style="color:#fff;width: 64%;display: inline-block;margin-left: 10px;">
<span class="org-logo">
<span style="display:inline-block;width: 40px;height: 45px;background-image:url(images/flogo.jpg);background-size: contain;background-repeat: no-repeat;position: relative;top: 20px;"></span>
<a href="http://iiita.ac.in" target="_blank" style="color: #fff;font-weight: bold;">IIIT Allahabad</a>
</span>
<span class="c-text" style="color: #d3d3d3;"> <i class="icon-copyright"></i> copyright 2015</span>
</div>
<div class="fright" style="width: 20%;float: right;position: relative;top: 30px;">
<div class="">
<span style="color: #d3d3d3;">Developed by</span>
<a href="#" target="" style="color: #fff;font-weight: bold;">Ankit Stark</a>
</div>
</div>
</div>
</div>
<script src="javascript/jquery.min.js"></script>
<script src="javascript/ajaxupload.js"></script>
<script src="javascript/main.js"></script>
<script>
$('.lg-submitBtn').click(function() {
$('.main-lg-form').submit();
});
$(".main-lg-form").submit(function(e){
return false;
});
$(".lg-email").focus(function() {
}).blur(function() {
validate_email();
});
function validate_email() {
email = $(".lg-email").val();
if(email.length > 0){
$.ajax({
type: "POST",
url: "ajax/validate_email.php",
data: {
email: email
},
success: function(data){
if(data == 0) {
} else {
$('.user-img').css('background-image','url(images/uploads/alumni/'+data+')');
}
}
});
}
}
function validate_user_login() {
email = $(".lg-email").val();
passwd = $(".lg-passwd").val();
$('.login-form .err-msg').hide();
if( (email.length > 0) && (passwd.length > 0) ) {
$.ajax({
type: "POST",
url: "ajax/validate_login.php",
data: {
email: email,
passwd: passwd
},
success: function(data){
if(data == 1){
$(location).attr('href', 'index.php');
} else if(data == -1) {
} else {
$('.login-form .err-msg').show();
}
}
});
}
}
</script>
</body>
</html>