Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/iiita/
Upload File :
Current File : /var/www/html/mmishra/indem/iiita/index.php.bak

<?php
require("html.php");
require("functions.php");

dbConnect();

$user = "";
$s_id = "";
$role = "";
$use_cookie = 0;

session_start();

if (isset($_SESSION['user'])) $user = $_SESSION['user'];
else if (isset($_SESSION['auto_login'])) {
	$cred = explode(" ", $_SESSION['auto_login']);
	$txtID = $cred[0];
	$txtPWD = base64_decode($cred[1]);
	$use_cookie = 1;
}

if (isset($_REQUEST['logout'])) {
	mysql_query("delete from auth where s_id='$s_id'");
	session_unset();
	session_destroy();
	$user = "";
	$s_id = "";
	$role = "";
	session_register("user", "s_id", "role");
	if ($mode == "forget") setcookie("auto_login", "", time()-3600);
	header("Location: index.php");
	exit;
}
if ($use_cookie == 1 || isset($_POST['login'])){
        $txtID = $_POST["txtID"];
        $txtPWD = $_POST["txtPWD"];
        $chkRem = $_POST["chkRem"];
        $role = authenticate($txtID, $txtPWD);
        $s_id = uniq_sid($txtID, $txtPWD);
        if ($role == "admin" || $role == "user"){
                $user = $txtID;
                session_register("user", "s_id", "role");
                if ($use_cookie == 0){
                        if ($chkRem) setcookie("auto_login", $txtID . " " . base64_encode($txtPWD), time()+31536000);
                        else setcookie("auto_login", "", time()-3600);
                        if (!$target) $target = 'cpanel';
			header("Location: inner.php?conf=$target");
                        exit;
                }
	} else { // login failed
		if ($use_cookie == 0) {
			header("Location: inner.php?conf=login&target=$target&msg=failed");
			exit;
		} else {
			// dont give an error to the user if we were trying login from a cookie
			// just delete the cookie.
			setcookie("auto_login", "", time()-3600);
		}
	}
}

logAccess($user, $HTTP_REFERER, $REQUEST_URI);
?>
<html>
<head>
<title><?php echo setup('title');?></title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<meta name="keywords" content="IIITA,Allahabad,MMishra,Recruitment,Information,BTech,MTech,MBA,MS,INDIA">
<META HTTP-EQUIV=Rrefresh CONTENT=120>
<META HTTP-EQUIV=Pragma CONTENT=no-cache>
<META HTTP-EQUIV=Cache-Control CONTENT=no-cache>
<script language="text/JavaScript" src="functions.js"></script>
<script language="JavaScript" src="JSCookMenu.js"></script>
<script language="JavaScript" src="theme.js"></script>
<script language="javascript" src="code.js"></script>
<script type="text/javascript" src="rss/ajax.js"></script>
<script type="text/javascript" src="rss/rss.js"></script>
<link rel="SHORTCUT ICON" href="images/logo.ico">
<link rel='stylesheet' type='text/css' href='style.css'>	
<link rel='stylesheet' type='text/css' href='theme.css'>	
<link rel='stylesheet' type='text/css' href='style1.css'>	
<link rel='stylesheet' type='text/css' href='style3.css'>	
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background: url(images/logo2.jpg) no-repeat; background-position: top left">
<form name="frmStatic" action="inner.php?conf=<?=$conf?>" method="post" enctype="multipart/form-data"> 
<center>
<!--
 onload="javascript: window.open('popup.php', 'Cheers Up...', 'left=220,top=50,width=797,height=490,scrollbars=no')"> 
-->
<?php include 'ajax.inc'; ?>

<marquee scrolldelay=200 style="font-family: verdana; font-size: 10px">
<?php echo showdate() . "&nbsp;". setup('greeting'); ?>
</marquee>	

<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr height="20" valign="bottom" style="background: url(images/t1-4.gif)">
	<td rowspan="2" align="center"> <?php gallery(); ?> </td>
    	<td style="background: url(images/t1-2.jpg) no-repeat" width="157" class="hmenu"> &nbsp; </td>
    	<td nowrap style="background: url(images/t1-4.gif)" width="393" class="hmenu"> <?php topmenu(); ?> </td>
</tr>
<tr height="100">
	<td colspan="2" style="background: url(images/t1-6.jpg) no-repeat; border-right: solid #333399 1px" align="center">
	<?php include "banner.inc"; ?>
    	</td>
</tr>
<tr valign="top">
	<td rowspan="2" style="padding:5px; border-left:solid 1px orange; background: url(images/t2-1.gif) no-repeat">
        <div style="color:white">
	<a href="inner.php?conf=contact">contact@iiita.ac.in</a><br>
        Deoghat, Jhalwa<br>Allahabad, UP<br>India-211012
	</div>
        <br>
	<dir style="left:0px;margin-top:30px;">
	<?php search(); ?>
	<br><br>
	<?php include "menus.inc"; ?>
	<br><br>
	<?php include "fixed_links.inc"; ?>
        </dir> </td>
    	<td colspan="2" align="center" style="background: url(images/t2-1a.gif) repeat-x; padding-bottom:5px; color:white;" width="545" height="21">
        A center of excellence in IT, established by Ministry of HRD, Govt. of India
    	</td>
</tr>
<tr valign="top" height="200"><!--main page -->
	<td colspan="2" style="background: url(images/logo1.jpg) no-repeat" width="545">
	<div id="inner"> 
	<?php
        if (!file_exists("introduction.inc")) touch ("introduction.inc");
	include "introduction.inc";
        if (!file_exists("notice_cur.inc")) touch ("notice_cur.inc");
	echo "<br><b>Notification</b><br>";
	include "notice_cur.inc";
	?>
    	</div>
	</td>
</tr>
<tr height="20">
	<td colspan="3" align="center" style="border-left: solid orange 1px">
        <b>News</b> 
        <marquee direction="left" scrolldelay="1" scrollamount="1">
        New website is under construction and will be launched soon,
        Any comment, suggession will be appreciable 
        </marquee>
	</td>
</tr>
<tr height='20' valign="bottom">
	<td colspan="2" nowrap style="background: url(images/t5-1.gif) no-repeat; padding-left:10px; padding-bottom:5px; border-top: solid blue 1px" class="bottom">
        <?php botmenu(); ?>
	</td><td nowrap style="padding-bottom: 5px; border-top: solid blue 1px; border-right: solid blue 1px">
        <?php footer($user, $role, $conf); ?>
	</td>
</tr>
</table>
<font size=-2><?php echo setup('footer'); ?></font>
</center>
</form>
</body>
</html>