Exemple #1
0
function getAndWriteFormPrefs(&$prefs)
{
    if (isset($_POST['fontSize'])) {
        $prefs['fontSize'] = $_POST['fontSize'];
    }
    if (isset($_POST['fontFace'])) {
        $prefs['fontFace'] = $_POST['fontFace'];
    }
    if (isset($_POST['colours'])) {
        $prefs['colours'] = $_POST['colours'];
    }
    if (isset($_POST['navigationAidFlag'])) {
        $prefs['navigationAidFlag'] = $_POST['navigationAidFlag'];
    }
    if (isset($_POST['newestFirstFlag'])) {
        $prefs['newestFirstFlag'] = $_POST['newestFirstFlag'];
    }
    if (isset($_POST['onlyNewFlag'])) {
        $prefs['onlyNewFlag'] = $_POST['onlyNewFlag'];
    }
    if (isset($_POST['bingFlag'])) {
        $prefs['bingFlag'] = $_POST['bingFlag'];
    }
    if (isset($_POST['refresh'])) {
        $prefs['refresh'] = $_POST['refresh'];
    }
    writePrefs($prefs, $_SESSION['login']);
}
Exemple #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";
Exemple #3
0
define('AT_INCLUDE_PATH', '../../../include/');
require AT_INCLUDE_PATH . 'vitals.inc.php';
//authenticate(USER_CLIENT, USER_ADMIN);
require AT_INCLUDE_PATH . '../mods/_standard/chat/lib/chat.inc.php';
$myPrefs = getPrefs($_SESSION['login']);
if ($_POST['submit'] || $_POST['submit_r']) {
    getAndWriteFormPrefs($myPrefs);
    if ($_POST['submit']) {
        $location = 'prefs2.php?firstLoginFlag=' . $addslashes($_POST['firstLoginFlag']);
    } else {
        $location = 'chat.php?firstLoginFlag=' . $addslashes($_POST['firstLoginFlag']);
    }
    Header('Location: ' . $location);
    exit;
}
writePrefs($myPrefs, $_SESSION['login']);
require 'include/html/chat_header.inc.php';
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
	<th align="left"><h4><?php 
echo _AT('chat_prefs_checking');
?>
</h4></th>
</tr>
</table>
<br />
<form action="prefs.php" name="f1" method="post" target="_top">
	<input type="hidden" name="firstLoginFlag" value="<?php 
echo $_GET['firstLoginFlag'];
?>
/* 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';
//authenticate(USER_CLIENT, USER_ADMIN);
require AT_INCLUDE_PATH . '../mods/_standard/chat/lib/chat.inc.php';
$myPrefs = getPrefs($_SESSION['username']);
writePrefs($myPrefs, $_SESSION['username']);
cleanUp();
$topMsgNum = $bottomMsgNum = 0;
howManyMessages($topMsgNum, $bottomMsgNum);
$filterChatID = $_GET['filterChatID'];
require 'include/html/chat_header.inc.php';
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
	<td align="right"><a href="chat.php" target="_top" onFocus="this.className='highlight'" onBlur="this.className=''"><?php 
echo _AT('chat_return');
?>
</a></td>
</tr>
</table>