From: Lo?c C. <lo...@us...> - 2001-04-13 08:59:29
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv12273/lib/index_libs Modified Files: main_index.lib.php3 do_enter_db_work.lib.php3 Log Message: Too many details have been changed.... See by yourself Index: main_index.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** main_index.lib.php3 2001/04/12 23:45:34 1.11 --- main_index.lib.php3 2001/04/13 08:59:26 1.12 *************** *** 135,139 **** // specific font face have to be used (iso-code is 'x-user-defined') $isFontMsg = (empty($nick) && defined('L_FONT_NAME')); ! $latin1 = (L_CHARSET == 'iso-8859-1'); // Try to get the nickname from session data, then slashes it --- 135,139 ---- // specific font face have to be used (iso-code is 'x-user-defined') $isFontMsg = (empty($nick) && defined('L_FONT_NAME')); ! $latin1 = (L_CHARSET == 'iso-8859-1') ? 1 : 0; // Try to get the nickname from session data, then slashes it *************** *** 212,216 **** if (isset($messageKind)) { ! $nickForNotifications = pmcSlashSingleQuotes(pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1))); $exitedRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); $exitedRoomType = $dbSessionVars['roomType']; --- 212,216 ---- if (isset($messageKind)) { ! $nickForNotifications = pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1), 2); $exitedRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); $exitedRoomType = $dbSessionVars['roomType']; *************** *** 635,639 **** <td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap"><?php echo(L_SET_2); ?> :</td> <td valign="top" class="chatCell"> ! <input type="text" name="nick" size="11" maxlength="10" value="<?php echo(htmlspecialchars(urldecode($layoutNick))); ?>" class="chatBox" /> </td> </tr> --- 635,639 ---- <td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap"><?php echo(L_SET_2); ?> :</td> <td valign="top" class="chatCell"> ! <input type="text" name="nick" size="11" maxlength="10" value="<?php echo(htmlspecialchars($layoutNick)); ?>" class="chatBox" /> </td> </tr> *************** *** 709,713 **** $defaultRoomFound = false; $defaultRoomsString = ''; ! $prevRoom = ($layoutRoom != '') ? urldecode($layoutRoom) : ''; echo("\n"); --- 709,713 ---- $defaultRoomFound = false; $defaultRoomsString = ''; ! $prevRoom = $layoutRoom; echo("\n"); *************** *** 782,786 **** </td> <td valign="top" class="chatCell"> ! <input type="text" name="createRoomName" size="11" maxlength="10"<?php if (!$defaultRoomFound && $layoutRoom != '') echo(' value="' . htmlspecialchars(urldecode($layoutRoom)) . '"'); ?> class="chatBox" onchange="pmcResetRoomBox('create');" /> </td> </tr> --- 782,786 ---- </td> <td valign="top" class="chatCell"> ! <input type="text" name="createRoomName" size="11" maxlength="10"<?php if (!$defaultRoomFound && $layoutRoom != '') echo(' value="' . htmlspecialchars($layoutRoom) . '"'); ?> class="chatBox" onchange="pmcResetRoomBox('create');" /> </td> </tr> *************** *** 820,826 **** $dbSessionVars['msgNumber'] = C_MSG_NB; $dbSessionVars['refreshDelay'] = C_MSG_REFRESH; ! // Both of the variables to delete below are defined by commands ('profile' for ! // the first one, 'save' for the second) ! $toUnregister = array('conservative', 'savedMessagesLimit'); dbSessionUnregister($toUnregister); dbSessionSave(); --- 820,827 ---- $dbSessionVars['msgNumber'] = C_MSG_NB; $dbSessionVars['refreshDelay'] = C_MSG_REFRESH; ! // Among the variables to delete, the 'conservative' and the ! // 'savedMessagesLimit' ones may have been set repectively by the 'profile' and ! // the 'save' commands ! $toUnregister = array('pwdHash', 'conservative', 'savedMessagesLimit'); dbSessionUnregister($toUnregister); dbSessionSave(); 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.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** do_enter_db_work.lib.php3 2001/04/12 23:38:26 1.7 --- do_enter_db_work.lib.php3 2001/04/13 08:59:26 1.8 *************** *** 110,114 **** // Defines some variables $currentTime = time(); ! $nickForNotifications = pmcSlashSingleQuotes(pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1))); if (C_WELCOME) { --- 110,114 ---- // Defines some variables $currentTime = time(); ! $nickForNotifications = pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1), 2); if (C_WELCOME) { *************** *** 176,180 **** $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time = '$currentTime', room = '$slashedRoomName', status = '$status', ip = '$ip' WHERE session_id = '$dbSessionId'"); else ! $dbLink->query("INSERT INTO " . C_USR_TBL . " VALUES ('$dbSessionId', '$currentTime', '$slashedRoomName', '$slashedNick', '$latin1', '$status', '$ip')"); $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 . "\')')"); --- 176,180 ---- $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time = '$currentTime', room = '$slashedRoomName', status = '$status', ip = '$ip' WHERE session_id = '$dbSessionId'"); else ! $dbLink->query("INSERT INTO " . C_USR_TBL . " VALUES ('$dbSessionId', '$currentTime', '$slashedRoomName', '$slashedNick', $latin1, '$status', '$ip')"); $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 . "\')')"); |