| Current Path : /var/www/html/mmishra/mm/ada/icdp/ |
| Current File : /var/www/html/mmishra/mm/ada/icdp/:q |
<?php
//initialize session variables and session
$user = ""; $role = ""; $use_cookie = 0;
session_start();
//include function library
require("config.inc.php");
require("functions.inc.php");
//check for sign out
if (isset($_REQUEST['logout'])) {
//clear session information
$tbl = 'webusers';
mysql_query("update $tbl set sessionid='',sessionip='',datesession='' where webid='$webid' and userid='$user'");
//abondon session
session_unset();
session_destroy();
$HTTP_SESSION_VARS['user'] = ""; $HTTP_SESSION_VARS['role'] = "";
//reset session variables
$user = ""; $role = "";
if ($mode == "forget") setcookie("auto_login", "", time()-3600);
//header("Location: index.php");
}
if (isset($HTTP_SESSION_VARS['user'])) {
//check the session status
$user = $HTTP_SESSION_VARS['user'];
$role = $HTTP_SESSION_VARS['role'];
//check the auto login
} else if (isset($HTTP_SESSION_VARS['auto_login'])) {
$cred = explode(" ", $HTTP_SESSION_VARS['auto_login']);
$txtID = $cred[0];
$txtPWD = base64_decode($cred[1]);
$use_cookie = 1;
}
//clear session information after 20 minutes
$tbl = 'webusers';
if (!$user) mysql_query("update $tbl set sessionid='',sessionip='',datesession='' where webid='$webid' and timediff(now(),datesession)>'00:20:00'");
//log activity in access log database
accessLog($webid, $user, $_SERVER['HTTP_REFERER'], $_SERVER['REQUEST_URI']);
$tbl = 'webpages';
echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN' 'http://www.w3.org/TR/REC-html40/loose.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head><title>[$webid] $title</title>
<!--meta http-equiv='Content-Type' content='text/html; charset=utf-8' /-->
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1' />
<meta name='author' content='$author' />
<meta name='keywords' content='$keywords' />
<meta name='description' content='$description' />
<link rel='stylesheet' type='text/css' href='css/style.css' media='screen' />
<link rel='stylesheet' type='text/css' href='css/white/jquerycssmenu.css' />
<!--[if lte IE 7]>
<style type='text/css'>
html .jquerycssmenu{height: 1%;} /*for IE7 and below*/
</style>
<![endif]-->
<script type='text/javascript' src='js/white/jquery.min.js'></script>
<script type='text/javascript' src='js/white/jquerycssmenu.js'></script>
<script type='text/javascript' src='js/mm.js'></script>";
echo ajax();// . flash($webid, $title);
echo "</head>
<!--body onload='document.form.query.focus();'-->
<body>
<center>
<table width='80%' background='/$webid/images/bg1.jpg' onmouseover=\"document.getElementById('t2').style.visibility = 'hidden';\" onmouseout=\"document.getElementById('t2').style.visibility = 'visible';\">
<tr>
<td width='10%'><img src='/$webid/images/logo1.jpg' height='90' width='90'></td>
<th width='80%'><img src='text2image.php?title=$title' /><br>
<span class='contact'>$contact $description</span></th>
<td width='10%' align='right'><img src='/$webid/images/rajarshi.jpg' height='90' width='90'></td>
</tr></table>
<div id='myjquerymenu' class='jquerycssmenu'>";
echo hmenus($webid, $user, $role, 0);
//echo "<br style='clear: left' />
echo "</div>
<br><br>";
echo "<table id='t2' width='80%' height='500' border='0' background='/$webid/images/bg1.jpg'>
<tr valign='top'><td width='60%'><div id='ajax'>";
echo gallery($webid);
echo "</div></td><td nowrap width='40%'>";
//show announcements
echo announcements($webid);
echo "</td></tr>";
//show latest updations
//echo "<div class='latestupdation'>";
//echo latestUpdations($webid);
//echo "</div>";
//show least visited
//echo "<div class='leastvisited'>";
//echo leastVisited($webid);
//echo "</div>";
//show footer
echo "<tr><td colspan='2' align='center'>";
echo footer($webid);
echo "| <a href='#' onclick=\"showPage('sitemap','online','$webid')\">Sitemap</a>";
echo "$footer</td></tr></table></center>";
?>
</form>
</body>
</html>