Example #1
0
/* Copyright (c) 2002-2010                                      */
/* Inclusive Design Institute                                   */
/* http://atutor.ca												*/
/*                                                              */
/* This program is free software. You can redistribute it and/or*/
/* modify it under the terms of the GNU General Public License  */
/* as published by the Free Software Foundation.				*/
/****************************************************************/
define('AT_INCLUDE_PATH', '../../../include/');
require AT_INCLUDE_PATH . 'vitals.inc.php';
session_write_close();
//authenticate(USER_CLIENT, USER_ADMIN);
require AT_INCLUDE_PATH . '../mods/_standard/chat/lib/chat.inc.php';
$myPrefs = getPrefs($_SESSION['login']);
$topMsgNum = $bottomMsgNum = 0;
howManyMessages($topMsgNum, $bottomMsgNum);
postMessage(_AT('chat_system'), _AT('chat_logged_out', $_SESSION['login']), $topMsgNum, $bottomMsgNum);
$myPrefs['lastAccessed'] = 0;
writePrefs($myPrefs, $_SESSION['login']);
Header('Location: index.php');
exit;
//exit;
require 'include/html/chat_header.inc.php';
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
	<td align="left"><h4><?php 
echo $admin['chatName'];
?>
: Logout</h4></td>
</tr>
Example #2
0
<?php

/****************************************************************/
/* ATutor														*/
/****************************************************************/
/* Copyright (c) 2002-2010                                      */
/* Inclusive Design Institute                                   */
/* http://atutor.ca												*/
/*                                                              */
/* This program is free software. You can redistribute it and/or*/
/* modify it under the terms of the GNU General Public License  */
/* as published by the Free Software Foundation.				*/
/****************************************************************/
define('AT_INCLUDE_PATH', '../include/');
require AT_INCLUDE_PATH . 'vitals.inc.php';
require AT_INCLUDE_PATH . 'lib/chat.inc.php';
$chatID = $_GET['chatID'];
$uniqueID = intval($_GET['uniqueID']);
$myPrefs = getPrefs($_GET['chatID']);
howManyMessages(&$topMsgNum, &$bottomMsgNum);
if ($myPrefs['lastChecked'] < $topMsgNum && $myPrefs['lastRead'] < $topMsgNum) {
    $myPrefs['lastChecked'] = $topMsgNum;
    writePrefs($myPrefs, $chatID);
    print "yes\n";
}
print "{$topMsgNum} {$myPrefs['lastChecked']} {$myPrefs['lastRead']} \n";