function checkUserSessionandCookie() { if (!@$_SESSION["uname"]) { // if no active session, check for cookie $tmp_result = mysql_query("delete from cookies where cookietime < DATE_SUB(curdate(), INTERVAL 7 DAY)"); // delete cookies older than 7 days if (isset($_COOKIE[USERCOOKIENAME])) { $tmp_cookie = $_COOKIE[USERCOOKIENAME]; $cookieUser = executesql_returnArray("select username from cookies where cookieid='{$tmp_cookie}'"); if ($cookieUser) { $userStillExists = executesql_returnArray("select count(*) as stillexists from users where username='******' and user_status='A' ;"); if ($userStillExists == 1 || $userStillExists == '1') { $_SESSION["uname"] = "{$cookieUser}"; logUserEvent($uname . ' (User) Logged In'); return; } } } $currentfile = getCurrentScriptFileName(); if ($currentfile != 'index.php') { header("Location: index.php?rurl=" . $currentfile); exit; } } }
?> jquery.js"></script> <script type="text/javascript" src="<?php echo JSASSETS_URL; ?> jquery.date_input.js"></script> <script type="text/javascript" src="<?php echo JSASSETS_URL; ?> custom.js"></script> <script type="text/javascript" src="<?php echo JSASSETS_URL; ?> jquery.hotkeys-0.7.9.min.js"></script> <?php $tmp_filename = getCurrentScriptFileName(); if ($tmp_filename == 'welcome.php') { ?> <script type="text/javascript" src="<?php echo JSASSETS_URL; ?> jquery.tablesorter.js"></script> <script type="text/javascript" src="<?php echo JSASSETS_URL; ?> jquery.event.drag-1.4.js"></script> <script type="text/javascript" src="<?php echo JSASSETS_URL; ?> jquery.kiketable.colsizable-1.1.js"></script> <?php
include_once "include_db.php"; if (!$_SESSION["uname"]) { header('Location: logout.php'); exit; } $CUSTOM_STYLES = "\n\t#BOOKMARKSLIST{\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t\tmargin:2px;\n\t\toverflow: auto;\n\t\twidth: 82%;\n\t\theight: 73%;\n\t\tbackground-color: #FFFFFF;\n\t\tborder: 1px dotted #999;\n\t}\n"; include_once "include_functions.php"; include_once "include_header.php"; include_once "include_header_links.php"; ?> <script> // $(document).ready(function() {}); var localajaxinit = function(){ My_JsLibrary.selectMainTab('<?php echo getCurrentScriptFileName(); ?> '); $($.date_input.initialize); }; var FILES = []; var searchFiles = function(){ // Clear existing files // append new files var date = $('#files_date').val(); $('#title').hide(); $('#files_result').text('Files uploaded on '+date); $('#files_result').show();
<?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 $CURRENT_USER = $_SESSION["uname"]; $CURRENT_USERID = $_SESSION["empl_id"]; $CURRENT_SCRIPTNAME = getCurrentScriptFileName(); $GMU = new ManageUsers(); $GMU->userId = $CURRENT_USERID; $AM_I_ADMIN = $GMU->isAdminUser(); $AM_I_PRIVILEGEDUSER = $GMU->isPrivilagedUser(); ?> <html lang="en-US"> <HEAD> <TITLE><?php echo APPNAME; ?> </TITLE> <meta charset="UTF-8"> <script type="text/javascript" src="js/alljs.php?t=13"></script> <link rel="stylesheet" href="css/allcss.php?t=6" type="text/css" charset="utf-8"> <?php if (in_array($CURRENT_SCRIPTNAME, array('chatroom.php', 'bookmarks.php', 'directory.php'))) { ?>
?> ', callback:function(a){ if(a){ eval(My_JsLibrary.responsemsg); refresh_allUsers(); }else{ My_JsLibrary.showErrMsg() ; } } }); }; var localajaxinit = function(){ My_JsLibrary.selectMainTab('<?php echo getCurrentScriptFileName() . "?rid={$rid}"; ?> ', true); $($.date_input.initialize); // for each NEW_MESSAGES -> append_message( this_msg ) ; append_NEW_MESSAGES(); // setInterval that fetches new messages get_Users_InRoom(<?php echo $rid; ?> ); POLLNMSGS_ID = setInterval(fetch_messages_NewerThan , <?php echo CHAT_REFRESH_INTERVAL; ?>