|
From: Lo?c C. <lo...@us...> - 2001-04-11 23:06:17
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs
In directory usw-pr-cvs1:/tmp/cvs-serv1253/chat/lib/index_libs
Modified Files:
misc.lib.js main_index.lib.php3 index_validation.lib.php3
do_enter_db_work.lib.php3
Log Message:
Two many modifications, I can't detail
Index: misc.lib.js
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/misc.lib.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** misc.lib.js 2001/04/04 23:50:00 1.3
--- misc.lib.js 2001/04/11 23:06:14 1.4
***************
*** 256,260 ****
if (typeof(jsIgnoredPopupWin) != 'undefined' && jsIgnoredPopupWin && !jsIgnoredPopupWin.closed)
{
! jsIgnoredPopupWin.window.document.forms['ignForm'].elements['exit'].value = 1;
jsIgnoredPopupWin.close()
}
--- 256,260 ----
if (typeof(jsIgnoredPopupWin) != 'undefined' && jsIgnoredPopupWin && !jsIgnoredPopupWin.closed)
{
! jsIgnoredPopupWin.window.document.forms['ignoredForm'].elements['exit'].value = 1;
jsIgnoredPopupWin.close()
}
Index: main_index.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** main_index.lib.php3 2001/04/10 16:58:35 1.8
--- main_index.lib.php3 2001/04/11 23:06:14 1.9
***************
*** 137,170 ****
$latin1 = (L_CHARSET == 'iso-8859-1');
- // Defines the message to be displayed if this script is called after an user
- // has been kicked
- if (dbSessionIsRegistered('kicked')) // $kicked is among session data
- {
- switch ($dbSessionVars['kicked'])
- {
- case 1:
- // The user was logged into two rooms at the same time
- $error = L_ERR_USR_19;
- break;
-
- case 2:
- // The administrator has cleaned the room
- $error = L_REG_39;
- break;
-
- case 3:
- // Simple kick
- $error = L_REG_18;
- break;
-
- case 4:
- // The user has been banished from the room he was chatting inside
- $error = L_ERR_USR_20;
-
- default:
- // void()
- }
- }
-
// Try to get the nickname from session data, then slashes it
if (empty($nick) && dbSessionIsRegistered('nick'))
--- 137,140 ----
***************
*** 201,216 ****
$dbLink->query("DELETE FROM " . C_USR_TBL . " WHERE session_id = '$dbSessionId'");
}
// Put an exited notification and prepare reloading of the chat
! if ((isset($exitMessage) && $exitMessage)
! && $dbLink->affectedRows() > 0)
{
! $nickForNotifications = pmcSlashSingleQuotes(pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1)));
! $exitedRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']);
! $exitedRoomType = $dbSessionVars['roomType'];
! $dbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($exitedRoomType, '$exitedRoomName', 'SYS exit', '', " . time() . ", NULL, '#666699', 'sprintf(L_EXIT_ROM, \'$nickForNotifications\')', 'sprintf(L_EXIT_ROM, \'$nickForNotifications\')')");
! unset($exitedRoomType);
! unset($exitedRoomName);
! unset($nickForNotifications);
! }
--- 171,226 ----
$dbLink->query("DELETE FROM " . C_USR_TBL . " WHERE session_id = '$dbSessionId'");
}
+
// Put an exited notification and prepare reloading of the chat
! if (!empty($exitMessage)
! && (dbSessionIsRegistered('kicked') || $dbLink->affectedRows() > 0))
{
! // Defines the message to be displayed
! if (!dbSessionIsRegistered('kicked'))
! $dbSessionVars['kicked'] = 0;
! switch ($dbSessionVars['kicked'])
! {
! case 1:
! // The user was logged into two rooms at the same time
! $messageKind = 'L_EXIT_ROM';
! $error = L_ERR_USR_19;
! break;
!
! case 2:
! // The administrator has cleaned the room -> no message
! $error = L_REG_39;
! break;
!
! case 3:
! // Simple kick
! $messageKind = 'L_KICKED';
! $error = L_REG_18;
! break;
!
! case 4:
! // The user has been banished from the room he was chatting inside
! $messageKind = 'L_BANISHED';
! $error = L_ERR_USR_20;
! break;
!
! default:
! // The user regulary left the chat
! if ($dbLink->affectedRows() > 0)
! $messageKind = 'L_EXIT_ROM';
! } // end of switch
!
! if (isset($messageKind))
! {
! $nickForNotifications = pmcSlashSingleQuotes(pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1)));
! $exitedRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']);
! $exitedRoomType = $dbSessionVars['roomType'];
!
! $dbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($exitedRoomType, '$exitedRoomName', 'SYS exit', '', " . time() . ", NULL, '#666699', 'sprintf($messageKind, \'$nickForNotifications\')', 'sprintf($messageKind, \'$nickForNotifications\')')");
! unset($messageKind);
! unset($nickForNotifications);
! unset($exitedRoomName);
! unset($exitedRoomType);
! }
! } // end of remove user and possibly put an exit notification
***************
*** 269,273 ****
* submitted
*/
! if (C_BAD_WORDS == 1)
include('./' . _CHAT_PATH . 'lib/swearing.lib.' . C_EXTENSION);
include('./' . _CHAT_PATH . 'lib/index_libs/index_validation.lib.' . C_EXTENSION);
--- 279,283 ----
* submitted
*/
! if (C_NO_SWEAR == 1)
include('./' . _CHAT_PATH . 'lib/swearing.lib.' . C_EXTENSION);
include('./' . _CHAT_PATH . 'lib/index_libs/index_validation.lib.' . C_EXTENSION);
Index: index_validation.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/index_validation.lib.php3,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** index_validation.lib.php3 2001/04/10 17:51:00 1.4
--- index_validation.lib.php3 2001/04/11 23:06:14 1.5
***************
*** 75,79 ****
}
// Checks for swear words in the nick
! else if (C_BAD_WORDS)
{
if (checkWords($nick, true))
--- 75,79 ----
}
// Checks for swear words in the nick
! else if (C_NO_SWEAR)
{
if (checkWords($nick, true))
***************
*** 197,201 ****
}
// Checks for swear words in the room name
! else if (C_BAD_WORDS && checkWords($createRoomName, true))
{
$error2 = L_ERR_ROM_2;
--- 197,201 ----
}
// Checks for swear words in the room name
! else if (C_NO_SWEAR && checkWords($createRoomName, true))
{
$error2 = L_ERR_ROM_2;
Index: do_enter_db_work.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/do_enter_db_work.lib.php3,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** do_enter_db_work.lib.php3 2001/04/10 19:21:27 1.5
--- do_enter_db_work.lib.php3 2001/04/11 23:06:14 1.6
***************
*** 148,152 ****
$slashedRoomName = pmcSlashSingleQuotes($targetRoom);
$dbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($roomType, '$slashedRoomName', 'SYS enter', '', '$currentTime', NULL, '#666699', 'sprintf(L_ENTER_ROM, \'" . $nickForNotifications . "\')', 'sprintf(L_ENTER_ROM, \'" . $nickForNotifications . "\')')");
! $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time = '$currentTime', room = '$slashedRoomName', status = '$status', ip = '$IP' WHERE session_id = '$dbSessionId'");
if (C_WELCOME)
--- 148,152 ----
$slashedRoomName = pmcSlashSingleQuotes($targetRoom);
$dbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($roomType, '$slashedRoomName', 'SYS enter', '', '$currentTime', NULL, '#666699', 'sprintf(L_ENTER_ROM, \'" . $nickForNotifications . "\')', 'sprintf(L_ENTER_ROM, \'" . $nickForNotifications . "\')')");
! $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time = '$currentTime', room = '$slashedRoomName', status = '$status', ip = '$ip' WHERE session_id = '$dbSessionId'");
if (C_WELCOME)
|