You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
(51) |
Apr
(688) |
May
(260) |
Jun
(108) |
Jul
(42) |
Aug
|
Sep
(2) |
Oct
|
Nov
(74) |
Dec
(217) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(3) |
Jun
(6) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(8) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Lo?c C. <lo...@us...> - 2001-04-10 09:38:18
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv12897/chat/lib Modified Files: format_messages.lib.php3 Log Message: Changed a bit format_messages.lib.php3 and removed trailing whitespaces Index: format_messages.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/format_messages.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** format_messages.lib.php3 2001/04/03 20:10:14 1.1 --- format_messages.lib.php3 2001/04/10 09:38:14 1.2 *************** *** 26,29 **** --- 26,47 ---- /** + * Check and validate the color of the message + * + * @param string the color code + * + * @global array the session data + */ + function checkColor(&$theColor) + { + global $dbSessionVars; + + // Red colors are reserved to the admin or a moderator for the current room + if ((ereg('#(FF0000|fc403f|fc4b34|fa582a|f66421|f27119|ec7e11|ec117f|f21971|f62164|fa2a58|fc344b)', $theColor)) + && !($dbSessionVars['status'] == 'a' || $dbSessionVars['status'] == 'm')) + $theColor = '#000000'; + } // end of the 'checkColor()' function + + + /** * Format a message according to the configuartion file directives * *************** *** 42,45 **** --- 60,73 ---- global $latin1; + // Ensure color is valid + checkColor($GLOBALS['color']); + + // Remove swearings + if (C_BAD_WORDS) + { + include('./lib/swearing.lib.' . C_EXTENSION); + $theMessage = checkWords($theMessage, false); + } + // Text formating tags if (C_HTML_TAGS_KEEP == 'none') *************** *** 95,99 **** && ($regs[1] == '' && $regs[4] == '')) $regs[4] = $theMessage; ! if (!ereg('&[[:alnum:]]{1,10}', $regs[1]) && !ereg('&[[:alnum:]]{1,10}',$regs[4])) --- 123,127 ---- && ($regs[1] == '' && $regs[4] == '')) $regs[4] = $theMessage; ! if (!ereg('&[[:alnum:]]{1,10}', $regs[1]) && !ereg('&[[:alnum:]]{1,10}',$regs[4])) *************** *** 103,143 **** if (($i != 1 && $i != 4) || $regs[$i] == '') continue; ! $part = $regs[$i]; ! $part = htmlentities($part); ! $part = str_replace('<', '<', $part); ! $part = str_replace('>', '>', $part); ! $part = str_replace('&lt;', '<', $part); ! $part = str_replace('&gt;', '>', $part); ! $part = str_replace('"', '"', $part); ! $part = ereg_replace('&(#[[:digit:]]{2,5})', '&\\1', $part); ! $regs[$i] = $part; } ! $theMessage = $regs[1] . $regs[2] . $regs[4]; } } // end if ($latin1) ! // Slashes the slash character $theMessage = str_replace('\\', '\\\\', $theMessage); ! return $theMessage; } // end of the 'formatMessage()' function - - - /** - * Check and validate the color of the message - * - * @param string the color code - * - * @global array the session data - */ - function checkColor(&$theColor) - { - global $dbSessionVars; - - // Red colors are reserved to the admin or a moderator for the current room - if ((ereg('#(FF0000|fc403f|fc4b34|fa582a|f66421|f27119|ec7e11|ec117f|f21971|f62164|fa2a58|fc344b)', $theColor)) - && !($dbSessionVars['status'] == 'a' || $dbSessionVars['status'] == 'm')) - $theColor = '#000000'; - } // end of the 'checkColor()' function ?> --- 131,153 ---- if (($i != 1 && $i != 4) || $regs[$i] == '') continue; ! $part = $regs[$i]; ! $part = htmlentities($part); ! $part = str_replace('<', '<', $part); ! $part = str_replace('>', '>', $part); ! $part = str_replace('&lt;', '<', $part); ! $part = str_replace('&gt;', '>', $part); ! $part = str_replace('"', '"', $part); ! $part = ereg_replace('&(#[[:digit:]]{2,5})', '&\\1', $part); ! $regs[$i] = $part; } ! $theMessage = $regs[1] . $regs[2] . $regs[4]; } } // end if ($latin1) ! // Slashes the slash character $theMessage = str_replace('\\', '\\\\', $theMessage); ! return $theMessage; } // end of the 'formatMessage()' function ?> |
From: Lo?c C. <lo...@us...> - 2001-04-10 09:38:17
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv12897/chat/lib/commands Modified Files: whois.cmd.php3 me.cmd.php3 banish.cmd.php3 announce.cmd.php3 Log Message: Changed a bit format_messages.lib.php3 and removed trailing whitespaces Index: whois.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/whois.cmd.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** whois.cmd.php3 2001/04/04 23:52:33 1.1 --- whois.cmd.php3 2001/04/10 09:38:14 1.2 *************** *** 62,66 **** } } // end of 'not a registered user' ! // It's a registered user -> define the script to launch the 'whois' popup else --- 62,66 ---- } } // end of 'not a registered user' ! // It's a registered user -> define the script to launch the 'whois' popup else Index: me.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/me.cmd.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** me.cmd.php3 2001/04/08 21:20:35 1.1 --- me.cmd.php3 2001/04/10 09:38:14 1.2 *************** *** 23,39 **** - // Ensure color is valid - checkColor($color); - // Store the strict original message $strictMessage = $message; - // Remove swearings - if (C_BAD_WORDS) - { - include('./lib/swearing.lib.' . C_EXTENSION); - $message = checkwords($message, false); - } - // Do the '/me' transformation $message = '<b>* ' . $dbSessionVars['nick'] . ' </b>'. $cmd[1]; --- 23,29 ---- *************** *** 48,52 **** unset($smilies); } ! // Put the message in the 'messages' table $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' --- 38,42 ---- unset($smilies); } ! // Put the message in the 'messages' table $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' *************** *** 67,70 **** --- 57,61 ---- $message = $strictMessage; unset($strictMessage); + $isCommand = true; $doRefreshMessages = true; Index: banish.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/banish.cmd.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** banish.cmd.php3 2001/04/08 18:24:05 1.2 --- banish.cmd.php3 2001/04/10 09:38:14 1.3 *************** *** 82,86 **** if ($banUntil > 2147483647) $banUntil = 2147483647; ! // Check if the target user is already banished from some rooms $dbLink->query("SELECT ip, rooms FROM " . C_BAN_TBL . " WHERE username = '$slashedTarget' LIMIT 1"); --- 82,86 ---- if ($banUntil > 2147483647) $banUntil = 2147483647; ! // Check if the target user is already banished from some rooms $dbLink->query("SELECT ip, rooms FROM " . C_BAN_TBL . " WHERE username = '$slashedTarget' LIMIT 1"); *************** *** 125,129 **** // Modify the status of the banished user in the connected users table $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time='" . time() . "', status='b' WHERE username = '$slashedTarget'"); ! // banishment confirmation message when an user has been banished // from an other room than the current one --- 125,129 ---- // Modify the status of the banished user in the connected users table $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time='" . time() . "', status='b' WHERE username = '$slashedTarget'"); ! // banishment confirmation message when an user has been banished // from an other room than the current one Index: announce.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/announce.cmd.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** announce.cmd.php3 2001/04/04 23:52:33 1.1 --- announce.cmd.php3 2001/04/10 09:38:14 1.2 *************** *** 38,42 **** unset($smilies); } ! // Put the message in the 'messages' table $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' --- 38,42 ---- unset($smilies); } ! // Put the message in the 'messages' table $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' *************** *** 54,58 **** $dbLink->query($msgQuery); ! $isCommand = true; $doRefreshMessages = true; --- 54,58 ---- $dbLink->query($msgQuery); ! $isCommand = true; $doRefreshMessages = true; |
From: Lo?c C. <lo...@us...> - 2001-04-10 09:38:17
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv12897/chat Modified Files: input.php3 handle_input.php3 Log Message: Changed a bit format_messages.lib.php3 and removed trailing whitespaces Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** input.php3 2001/04/08 21:18:54 1.5 --- input.php3 2001/04/10 09:38:14 1.6 *************** *** 130,151 **** && !($isCommand || isset($error))) { - // Ensure color is valid - checkColor($color); - - // Store the strict original message - $strictMessage = $message; - - // Remove swearings - if (C_BAD_WORDS) - { - include('./lib/swearing.lib.' . C_EXTENSION); - $message = checkWords($message, false); - } - // Format original message and set enhanced one (with graphical smilies) $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; - $message = $strictMessage; - unset($strictMessage); if (C_USE_SMILIES) { --- 130,136 ---- *************** *** 154,158 **** unset($smilies); } ! // Put the message in the 'messages' table if (empty($msgTo)) --- 139,143 ---- unset($smilies); } ! // Put the message in the 'messages' table if (empty($msgTo)) *************** *** 175,182 **** $dbLink->query($msgQuery); ! ! // Restore the strict original message and set some variables ! $message = $strictMessage; ! unset($strictMessage); $doRefreshMessages = true; } // end of handle 'true' messages --- 160,165 ---- $dbLink->query($msgQuery); ! ! // Set the variable that will force the message frame to be refreshed $doRefreshMessages = true; } // end of handle 'true' messages Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** handle_input.php3 2001/04/08 21:18:54 1.4 --- handle_input.php3 2001/04/10 09:38:14 1.5 *************** *** 131,147 **** && !($isCommand || isset($error))) { - // Ensure color is valid - checkColor($color); - - // Store the strict original message - $strictMessage = $message; - - // Remove swearings - if (C_BAD_WORDS) - { - include('./lib/swearing.lib.' . C_EXTENSION); - $message = checkWords($message, false); - } - // Format original message and set enhanced one (with graphical smilies) $originalMessage = formatMessage($message); --- 131,134 ---- *************** *** 153,157 **** unset($smilies); } ! // Put the message in the 'messages' table if (empty($msgTo)) --- 140,144 ---- unset($smilies); } ! // Put the message in the 'messages' table if (empty($msgTo)) *************** *** 159,163 **** else $slashedMsgTo = '\'' . pmcSlashSingleQuotes($msgTo) . '\''; ! $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' . 'VALUES (' --- 146,150 ---- else $slashedMsgTo = '\'' . pmcSlashSingleQuotes($msgTo) . '\''; ! $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' . 'VALUES (' *************** *** 173,181 **** . ')'; $dbLink->query($msgQuery); - ! // Restore the strict original message and set some variables ! $message = $strictMessage; ! unset($strictMessage); $doRefreshMessages = true; } // end of handle 'true' messages --- 160,165 ---- . ')'; $dbLink->query($msgQuery); ! // Set the variable that will force the message frame to be refreshed $doRefreshMessages = true; } // end of handle 'true' messages |
From: Lo?c C. <lo...@us...> - 2001-04-08 21:20:37
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv17799/chat/lib/commands Added Files: me.cmd.php3 Log Message: First working commands :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library does the work associated to the 'me' command. | // | | // | It is called by the 'commands.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: me.cmd.php3,v 1.1 2001/04/08 21:20:35 loic1 Exp $ // // The work for the 'me' command. // // Ensure color is valid checkColor($color); // Store the strict original message $strictMessage = $message; // Remove swearings if (C_BAD_WORDS) { include('./lib/swearing.lib.' . C_EXTENSION); $message = checkwords($message, false); } // Do the '/me' transformation $message = '<b>* ' . $dbSessionVars['nick'] . ' </b>'. $cmd[1]; // Format original message and set enhanced one (with graphical smilies) $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; if (C_USE_SMILIES) { include('./lib/smilies.lib.' . C_EXTENSION); checkForSmilies($enhancedMessage, $smilies); unset($smilies); } // Put the message in the 'messages' table $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' . 'VALUES (' . $currentRoomType . ', ' . '\'' . $slashedCurrentRoomName . '\', ' . '\'' . $slashedNick . '\', ' . $latin1 . ', ' . time() . ', ' . 'NULL, ' . '\'' . $color . '\', ' . '\'' . pmcSlashSingleQuotes($originalMessage) . '\', ' . '\'' . pmcSlashSingleQuotes($enhancedMessage) . '\'' . ')'; $dbLink->query($msgQuery); // Restore the strict original message and set some variables $message = $strictMessage; unset($strictMessage); $isCommand = true; $doRefreshMessages = true; ?> |
From: Lo?c C. <lo...@us...> - 2001-04-08 21:19:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv17715/chat/lib Modified Files: swearing.lib.php3 Log Message: Hadn't been updated to 0.15 version Index: swearing.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/swearing.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** swearing.lib.php3 2001/04/03 20:17:40 1.1 --- swearing.lib.php3 2001/04/08 21:19:55 1.2 *************** *** 1,45 **** ! <? ! // This library allows to check for "bad words". Users cannot login or create a room with such words, ! // in messages they are replaced by the "@#$*!" string or the one you choose. ! // Credit for this lib goes to Gustavo Iwamoto <iw...@za...> and Fabiano R. Prestes <zo...@po...> ! function checkwords ($String, $TestOnly) ! { ! // You can add the words you don't want users to use in the $BadWords array bellow. As an eregi ! // function is called to find them in strings, you may use valid POSIX 1003.2 regular expressions ! // (see second line of the array for an example). ! // Note that search is not case sensitive, except for special characters such as accentued ones. ! $BadWords = array ( ! "shit", ! "fuck([[:alpha:]]*)" ! ); ! $ReplaceString = "@#$*!"; // String that will replace "bad words" ! // Don't modify lines bellow ! $Found = false; ! for (reset($BadWords); $ToFind = current($BadWords); next($BadWords)) { ! $Found = eregi(addslashes($ToFind), $String); ! if ($Found) { ! if ($TestOnly) ! { break; - } else ! { ! $String = eregi_replace(addslashes($ToFind), $ReplaceString, $String); ! }; ! }; ! }; ! ! unset($BadWords); ! return ($TestOnly ? $Found : $String); ! } ?> --- 1,81 ---- ! <?php ! // ! // +--------------------------------------------------------------------------+ ! // | phpMyChat version 0.15.0 | ! // +--------------------------------------------------------------------------+ ! // | Copyright (c) 2000-2001 The phpHeaven-team | ! // +--------------------------------------------------------------------------+ ! // | This library allows to check for 'bad words'. Users cannot login or | ! // | create a room with such words, in messages they are replaced by the | ! // | '@#$*!' string or the one you choose. | ! // | enabled. | ! // | | ! // | It is called by the 'chat/lib/index_libs/main_index.lib.php3' script and | ! // | all the ones that put messages in the database (main 'input' scripts and | ! // | some of the commands). | ! // +--------------------------------------------------------------------------+ ! // | From the phpMyChat project: | ! // | http://www.phpheaven.net/projects/phpMyChat/ | ! // | | ! // | Authors: the phpHeaven-team <php...@ya...> | ! // | Gustavo Iwamoto <iw...@za...> | ! // | Fabiano R. Prestes <zo...@po...> | ! // +--------------------------------------------------------------------------+ ! // ! // $Id$ ! // ! // Does not allow the use of swearings in nicks, rooms'names and messages. ! // ! ! /** ! * Check for swearings and optionnaly replace them by another string of ! * characters. ! * ! * You can add all the swearings you want in the '$swearings' array below. As ! * an eregi function is called to find them in strings, you may use valid ! * POSIX 1003.2 regular expressions (see the second line of the array for an ! * example). ! * Note that search is not case sensitive, except for special characters such ! * as accentued ones. ! * ! * @param string the string to search into ! * @param boolean whether to check only (1) or to check and replace swearings ! * (0) ! * ! * @return mixed whether a swearing has been found or not if '$testOnly' ! * value is 1, the cleaned string else ! * ! * @access public ! */ ! function checkWords($str = '', $testOnly = 0) ! { ! $swearings = array ( 'shit', ! 'fuck([[:alpha:]]*)' ! ); ! $replaceBy = '@#$*!'; // String that will replace swearings ! //--- Don't modify lines bellow --- ! $found = false; ! for (reset($swearings); $toFind = current($swearings); next($swearings)) { ! $found = eregi($toFind, $str); ! if ($found) { ! if ($testOnly) break; else ! $str = eregi_replace($toFind, $replaceBy, $str); ! } ! } ! ! unset($swearings); ! return ($testOnly) ? $found : $str; ! } // end of the 'checkWords()' function ?> |
From: Lo?c C. <lo...@us...> - 2001-04-08 21:18:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv17637/chat Modified Files: input.php3 handle_input.php3 Log Message: Improve the way multiple submission are avoided Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** input.php3 2001/04/08 18:24:04 1.4 --- input.php3 2001/04/08 21:18:54 1.5 *************** *** 133,145 **** checkColor($color); // Remove swearings if (C_BAD_WORDS) { include('./lib/swearing.lib.' . C_EXTENSION); ! $message = checkwords($message, false); } // Format original message and set enhanced one (with graphical smilies) - $strictMessage = $message; $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; --- 133,147 ---- checkColor($color); + // Store the strict original message + $strictMessage = $message; + // Remove swearings if (C_BAD_WORDS) { include('./lib/swearing.lib.' . C_EXTENSION); ! $message = checkWords($message, false); } // Format original message and set enhanced one (with graphical smilies) $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; *************** *** 174,178 **** $dbLink->query($msgQuery); ! $doRefreshMessages = true; } // end of handle 'true' messages --- 176,183 ---- $dbLink->query($msgQuery); ! // Restore the strict original message and set some variables ! $message = $strictMessage; ! unset($strictMessage); ! $doRefreshMessages = true; } // end of handle 'true' messages *************** *** 430,434 **** // Display a JavaScript alert box with the error message if necessary window.parent.pmcSetMsgBoxFocus(); ! alert('<?php echo(str_replace('\\\\n', '\\n', pmcSlashSingleQuotes($error))); ?>'); // --> </script> --- 435,439 ---- // Display a JavaScript alert box with the error message if necessary window.parent.pmcSetMsgBoxFocus(); ! alert('<?php echo(pmcSlashSingleQuotes($error)); ?>'); // --> </script> Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** handle_input.php3 2001/04/08 18:24:04 1.3 --- handle_input.php3 2001/04/08 21:18:54 1.4 *************** *** 134,150 **** checkColor($color); // Remove swearings if (C_BAD_WORDS) { include('./lib/swearing.lib.' . C_EXTENSION); ! $message = checkwords($message, false); } // Format original message and set enhanced one (with graphical smilies) - $strictMessage = $message; $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; - $message = $strictMessage; - unset($strictMessage); if (C_USE_SMILIES) { --- 134,150 ---- checkColor($color); + // Store the strict original message + $strictMessage = $message; + // Remove swearings if (C_BAD_WORDS) { include('./lib/swearing.lib.' . C_EXTENSION); ! $message = checkWords($message, false); } // Format original message and set enhanced one (with graphical smilies) $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; if (C_USE_SMILIES) { *************** *** 174,178 **** $dbLink->query($msgQuery); ! $doRefreshMessages = true; } // end of handle 'true' messages --- 174,182 ---- $dbLink->query($msgQuery); ! ! // Restore the strict original message and set some variables ! $message = $strictMessage; ! unset($strictMessage); ! $doRefreshMessages = true; } // end of handle 'true' messages *************** *** 263,267 **** // Display a JavaScript alert box with the error message if necessary window.parent.pmcSetMsgBoxFocus(); ! alert('<?php echo(str_replace('\\\\n', '\\n', pmcSlashSingleQuotes($error))); ?>'); <?php } --- 267,271 ---- // Display a JavaScript alert box with the error message if necessary window.parent.pmcSetMsgBoxFocus(); ! alert('<?php echo(pmcSlashSingleQuotes($error)); ?>'); <?php } |
From: Lo?c C. <lo...@us...> - 2001-04-08 18:24:09
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv32137/chat Modified Files: whois_popup.php3 users_popup_low.php3 users_popup.php3 users_low.php3 users.php3 messages_low.php3 loader.php3 input.php3 handle_input.php3 Log Message: Rename the 'targetRoom' session variable to 'currentRoom' Index: whois_popup.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/whois_popup.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** whois_popup.php3 2001/04/04 23:52:33 1.1 --- whois_popup.php3 2001/04/08 18:24:04 1.2 *************** *** 122,126 **** case 'moderator': ! if (pmcIsInto($dbSessionVars['targetRoom'], $rooms) > 0) { $perms = '<i>' . L_WHOIS_MODER . '</i>'; --- 122,126 ---- case 'moderator': ! if (pmcIsInto($dbSessionVars['currentRoom'], $rooms) > 0) { $perms = '<i>' . L_WHOIS_MODER . '</i>'; Index: users_popup_low.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/users_popup_low.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** users_popup_low.php3 2001/04/04 16:21:23 1.1 --- users_popup_low.php3 2001/04/08 18:24:04 1.2 *************** *** 80,85 **** * 'chat/lib/common.lib.php3' script. */ ! $roomQueryPart = (dbSessionIsRegistered('targetRoom') && $dbSessionVars['roomType'] == 0) ! ? '(m.type = 1 OR (m.type = 0 AND m.room =\'' . pmcSlashSingleQuotes($dbSessionVars['targetRoom']) . '\'))' : 'm.type = 1'; --- 80,85 ---- * 'chat/lib/common.lib.php3' script. */ ! $roomQueryPart = (dbSessionIsRegistered('currentRoom') && $dbSessionVars['roomType'] == 0) ! ? '(m.type = 1 OR (m.type = 0 AND m.room =\'' . pmcSlashSingleQuotes($dbSessionVars['currentRoom']) . '\'))' : 'm.type = 1'; Index: users_popup.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/users_popup.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** users_popup.php3 2001/04/04 16:21:23 1.1 --- users_popup.php3 2001/04/08 18:24:04 1.2 *************** *** 79,84 **** * 'chat/lib/common.lib.php3' script. */ ! $roomQueryPart = (dbSessionIsRegistered('targetRoom') && $dbSessionVars['roomType'] == 0) ! ? '(m.type = 1 OR (m.type = 0 AND m.room =\'' . pmcSlashSingleQuotes($dbSessionVars['targetRoom']) . '\'))' : 'm.type = 1'; --- 79,84 ---- * 'chat/lib/common.lib.php3' script. */ ! $roomQueryPart = (dbSessionIsRegistered('currentRoom') && $dbSessionVars['roomType'] == 0) ! ? '(m.type = 1 OR (m.type = 0 AND m.room =\'' . pmcSlashSingleQuotes($dbSessionVars['currentRoom']) . '\'))' : 'm.type = 1'; Index: users_low.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/users_low.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** users_low.php3 2001/04/04 16:19:55 1.2 --- users_low.php3 2001/04/08 18:24:04 1.3 *************** *** 101,105 **** $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); $usersList = array(); --- 101,105 ---- $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); $usersList = array(); *************** *** 141,145 **** $usersList[] = '<!-- The current room -->'; $usersList[] = '<p>'; ! $usersList[] = '<b>' . htmlspecialchars($dbSessionVars['targetRoom']) . '</b>' . '<span class="small">' . '<bdo dir="' . $textDirection . '"></bdo>' --- 141,145 ---- $usersList[] = '<!-- The current room -->'; $usersList[] = '<p>'; ! $usersList[] = '<b>' . htmlspecialchars($dbSessionVars['currentRoom']) . '</b>' . '<span class="small">' . '<bdo dir="' . $textDirection . '"></bdo>' *************** *** 350,354 **** // Display this room name when it hadn't been displayed yet ! if (strcasecmp($tmpRoom, $dbSessionVars['targetRoom']) != 0 && (!isset($childCnt) || !isset($childCnt[$id]))) { --- 350,354 ---- // Display this room name when it hadn't been displayed yet ! if (strcasecmp($tmpRoom, $dbSessionVars['currentRoom']) != 0 && (!isset($childCnt) || !isset($childCnt[$id]))) { Index: users.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/users.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** users.php3 2001/04/04 16:19:55 1.6 --- users.php3 2001/04/08 18:24:04 1.7 *************** *** 100,104 **** $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); $usersList = array(); --- 100,104 ---- $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); $usersList = array(); *************** *** 139,143 **** $usersCnt = 0; $usersList[] = '<!-- The current room -->'; ! $usersList[] = '<b>' . htmlspecialchars($dbSessionVars['targetRoom']) . '</b>' . '<span class="small">' . '<bdo dir="' . $textDirection . '"></bdo>' --- 139,143 ---- $usersCnt = 0; $usersList[] = '<!-- The current room -->'; ! $usersList[] = '<b>' . htmlspecialchars($dbSessionVars['currentRoom']) . '</b>' . '<span class="small">' . '<bdo dir="' . $textDirection . '"></bdo>' *************** *** 358,362 **** // Display this room name when it hadn't been displayed yet ! if (strcasecmp($tmpRoom, $dbSessionVars['targetRoom']) != 0 && (!isset($childCnt) || !isset($childCnt[$id]))) { --- 358,362 ---- // Display this room name when it hadn't been displayed yet ! if (strcasecmp($tmpRoom, $dbSessionVars['currentRoom']) != 0 && (!isset($childCnt) || !isset($childCnt[$id]))) { Index: messages_low.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/messages_low.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** messages_low.php3 2001/04/03 20:14:52 1.1 --- messages_low.php3 2001/04/08 18:24:04 1.2 *************** *** 77,81 **** $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(true); --- 77,81 ---- $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(true); *************** *** 100,106 **** if ($ignoredSendersList != '') $ignoredSendersList = 'username NOT IN (' . $ignoredSendersList . ') AND '; - - $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); - $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); $getMessagesQuery = 'SELECT username, latin1, m_time, address, color, msg_' . $dbSessionVars['msgKind'] . ' ' --- 100,103 ---- Index: loader.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/loader.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** loader.php3 2001/04/04 08:37:41 1.2 --- loader.php3 2001/04/08 18:24:04 1.3 *************** *** 81,85 **** $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(true); --- 81,85 ---- $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(true); *************** *** 111,115 **** . '(type = 1' . (($dbSessionVars['roomType'] == 0) ! ? ' OR (type = 0 AND room = \'' . $dbSessionVars['targetRoom'] .'\')) ' : ') ') . 'ORDER BY m_time DESC ' --- 111,115 ---- . '(type = 1' . (($dbSessionVars['roomType'] == 0) ! ? ' OR (type = 0 AND room = \'' . $dbSessionVars['currentRoom'] .'\')) ' : ') ') . 'ORDER BY m_time DESC ' *************** *** 145,151 **** if ($ignoredSendersList != '') $ignoredSendersList = 'username NOT IN (' . $ignoredSendersList . ') AND '; - - $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); - $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); $getMessagesQuery = 'SELECT username, latin1, m_time, address, color, msg_' . $dbSessionVars['msgKind'] . ' ' --- 145,148 ---- Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** input.php3 2001/04/05 00:42:22 1.3 --- input.php3 2001/04/08 18:24:04 1.4 *************** *** 85,89 **** $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(false); --- 85,89 ---- $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(false); Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** handle_input.php3 2001/04/04 23:50:54 1.2 --- handle_input.php3 2001/04/08 18:24:04 1.3 *************** *** 86,90 **** $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(false); --- 86,90 ---- $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; ! $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['currentRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(false); |
From: Lo?c C. <lo...@us...> - 2001-04-08 18:24:09
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv32137/chat/lib/index_libs Modified Files: main_index.lib.php3 do_enter_db_work.lib.php3 Log Message: Rename the 'targetRoom' session variable to 'currentRoom' Index: main_index.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** main_index.lib.php3 2001/04/04 16:23:13 1.5 --- main_index.lib.php3 2001/04/08 18:24:05 1.6 *************** *** 206,210 **** { $nickForNotifications = pmcSlashSingleQuotes(pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1))); ! $exitedRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); $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\')')"); --- 206,210 ---- { $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\')')"); *************** *** 233,237 **** { $roomType = $dbSessionVars['roomType']; ! $targetRoom = $dbSessionVars['targetRoom']; $jsVersion = $dbSessionVars['jsVersion']; } --- 233,237 ---- { $roomType = $dbSessionVars['roomType']; ! $targetRoom = $dbSessionVars['currentRoom']; $jsVersion = $dbSessionVars['jsVersion']; } *************** *** 495,500 **** $layoutNick = ''; ! if (dbSessionIsRegistered('targetRoom')) ! $layoutRoom = $dbSessionVars['targetRoom']; else if (isset($GLOBALS['cookieRoom'])) $layoutRoom = $GLOBALS['cookieRoom']; --- 495,500 ---- $layoutNick = ''; ! if (dbSessionIsRegistered('currentRoom')) ! $layoutRoom = $dbSessionVars['currentRoom']; else if (isset($GLOBALS['cookieRoom'])) $layoutRoom = $GLOBALS['cookieRoom']; 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.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** do_enter_db_work.lib.php3 2001/04/04 09:05:36 1.2 --- do_enter_db_work.lib.php3 2001/04/08 18:24:05 1.3 *************** *** 195,199 **** $dbSessionVars['pwdHash'] = $pwdHash; $dbSessionVars['roomType'] = $roomType; ! $dbSessionVars['targetRoom'] = $targetRoom; $dbSessionVars['status'] = (empty($status)) ? 'u' : $status; $dbSessionVars['refreshDelay'] = C_MSG_REFRESH; --- 195,199 ---- $dbSessionVars['pwdHash'] = $pwdHash; $dbSessionVars['roomType'] = $roomType; ! $dbSessionVars['currentRoom'] = $targetRoom; $dbSessionVars['status'] = (empty($status)) ? 'u' : $status; $dbSessionVars['refreshDelay'] = C_MSG_REFRESH; |
From: Lo?c C. <lo...@us...> - 2001-04-08 18:24:09
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv32137/chat/lib/commands Modified Files: banish.cmd.php3 Log Message: Rename the 'targetRoom' session variable to 'currentRoom' Index: banish.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/banish.cmd.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** banish.cmd.php3 2001/04/04 23:52:33 1.1 --- banish.cmd.php3 2001/04/08 18:24:05 1.2 *************** *** 50,54 **** // user from their current room $queryRoomPart = ($dbSessionVars['status'] == 'm') ! ? 'room = \'' . pmcSlashSingleQuotes($dbSessionVars['targetRoom']) . '\' AND ' : ''; // Ensure the user to be banished is logged in (into the current room for moderators) --- 50,54 ---- // user from their current room $queryRoomPart = ($dbSessionVars['status'] == 'm') ! ? 'room = \'' . pmcSlashSingleQuotes($dbSessionVars['currentRoom']) . '\' AND ' : ''; // Ensure the user to be banished is logged in (into the current room for moderators) *************** *** 126,131 **** $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time='" . time() . "', status='b' WHERE username = '$slashedTarget'"); ! // banishment confirmation message ! $error = sprintf(L_BANISHED, $cmd[2]); $isCommand = true; $doRefreshMessages = true; --- 126,134 ---- $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time='" . time() . "', status='b' WHERE username = '$slashedTarget'"); ! // banishment confirmation message when an user has been banished ! // from an other room than the current one ! if ($targetCurrentRoom != pmcSlashSingleQuotes($dbSessionVars['currentRoom'])) ! $error = sprintf(L_BANISHED, $cmd[2]); ! $isCommand = true; $doRefreshMessages = true; |
From: Lo?c C. <lo...@us...> - 2001-04-08 18:24:09
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv32137/chat/lib Modified Files: check_and_kick_user.lib.php3 Log Message: Rename the 'targetRoom' session variable to 'currentRoom' Index: check_and_kick_user.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/check_and_kick_user.lib.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** check_and_kick_user.lib.php3 2001/04/04 09:04:09 1.3 --- check_and_kick_user.lib.php3 2001/04/08 18:24:05 1.4 *************** *** 65,69 **** { echo($loggedInRoom . ' ' . $slashedCurrentRoomName); exit(); ! $checkLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($currentRoomType, '$slashedCurrentRoomName', 'SYS exit', '', " . time() . ", '', '#666699', 'sprintf(L_EXIT_ROM, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')', 'sprintf(L_EXIT_ROM, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')')"); $dbSessionVars['kicked'] = 1; } --- 65,69 ---- { echo($loggedInRoom . ' ' . $slashedCurrentRoomName); exit(); ! $checkLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($currentRoomType, '$slashedCurrentRoomName', 'SYS exit', '', " . time() . ", NULL, '#666699', 'sprintf(L_EXIT_ROM, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')', 'sprintf(L_EXIT_ROM, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')')"); $dbSessionVars['kicked'] = 1; } *************** *** 76,80 **** else if ($status == 'k') { ! $checkLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($currentRoomType, '$slashedCurrentRoomName', 'SYS exit', '', " . time() . ", '', '#666699', 'sprintf(L_KICKED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')', 'sprintf(L_KICKED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')')"); $dbSessionVars['kicked'] = 3; } --- 76,80 ---- else if ($status == 'k') { ! $checkLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($currentRoomType, '$slashedCurrentRoomName', 'SYS exit', '', " . time() . ", NULL, '#666699', 'sprintf(L_KICKED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')', 'sprintf(L_KICKED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')')"); $dbSessionVars['kicked'] = 3; } *************** *** 82,86 **** else if ($status == 'b') { ! $checkLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($currentRoomType, '$slashedCurrentRoomName', 'SYS exit', '', " . time() . ", '', '#666699', 'sprintf(L_BANISHED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')', 'sprintf(L_BANISHED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')')"); $dbSessionVars['kicked'] = 4; } --- 82,86 ---- else if ($status == 'b') { ! $checkLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($currentRoomType, '$slashedCurrentRoomName', 'SYS exit', '', " . time() . ", NULL, '#666699', 'sprintf(L_BANISHED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')', 'sprintf(L_BANISHED, \'" . pmcSpecialChars($slashedNick, $latin1) . "\')')"); $dbSessionVars['kicked'] = 4; } |
From: Lo?c C. <lo...@us...> - 2001-04-05 00:43:54
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv29160 Added Files: help.cmd.php3 Log Message: First working commands :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library does the work associated to the 'help' command. | // | | // | It is called by the 'commands.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: help.cmd.php3,v 1.1 2001/04/05 00:43:50 loic1 Exp $ // // The work for the 'help' command. // /** * Define a table that contains JavaScript instructions to be ran */ $jsToRun = array( '<script type="text/javascript" language="javascript">', '<!--', 'window.parent.pmcHelpPopup(' . ((L_CHARSET == 'windows-1256') ? 610 : 10) . ');', '// -->', '</SCRIPT>' ); $isCommand = true; $isPopup = true; ?> |
From: Lo?c C. <lo...@us...> - 2001-04-05 00:43:16
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv29085 Modified Files: commands.lib.php3 Log Message: Remove some unnecessary results kept from regexps Index: commands.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** commands.lib.php3 2001/04/04 23:52:33 1.1 --- commands.lib.php3 2001/04/05 00:43:10 1.2 *************** *** 81,89 **** include('./lib/commands/promote.cmd.' . C_EXTENSION); } ! else if (eregi('^\/(help|\?)$', $message, $cmd)) { include('./lib/commands/help.cmd.' . C_EXTENSION); } ! else if (eregi('^\/clear$', $message, $cmd)) { include('./lib/commands/clear.cmd.' . C_EXTENSION); --- 81,89 ---- include('./lib/commands/promote.cmd.' . C_EXTENSION); } ! else if (eregi('^\/(help|\?)$', $message)) { include('./lib/commands/help.cmd.' . C_EXTENSION); } ! else if (eregi('^\/clear$', $message)) { include('./lib/commands/clear.cmd.' . C_EXTENSION); |
From: Lo?c C. <lo...@us...> - 2001-04-05 00:42:29
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv28993 Modified Files: input.php3 Log Message: Oups, there was a bug with the 'help' command! Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** input.php3 2001/04/04 23:50:54 1.2 --- input.php3 2001/04/05 00:42:22 1.3 *************** *** 444,448 **** for (reset($jsToRun); $jsInst = current($jsToRun); next($jsToRun)) { ! echo($jsToRun . "\n"); } unset($jsToRun); --- 444,448 ---- for (reset($jsToRun); $jsInst = current($jsToRun); next($jsToRun)) { ! echo($jsInst . "\n"); } unset($jsToRun); |
From: Lo?c C. <lo...@us...> - 2001-04-04 23:52:40
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv23458/lib/commands Added Files: whois.cmd.php3 history.cmd.php3 banish.cmd.php3 announce.cmd.php3 Log Message: First working commands :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library does the work associated to the 'whois' command. | // | | // | It is called by the 'commands.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: whois.cmd.php3,v 1.1 2001/04/04 23:52:33 loic1 Exp $ // // The work for the 'whois' command. // /** * Check for invalid characters in the target user name */ if (ereg('[\, ]', $cmd[1])) { $error = L_ERR_USR_16; } /** * Do the work */ else { $isCommand = true; $slashedTarget = pmcSlashSingleQuotes($cmd[1]); // Check if the user whose profile is required is a registered one $dbLink->query("SELECT COUNT(*) FROM " . C_REG_TBL . " WHERE username='" . $slashedTarget . "' LIMIT 1"); list($isProfile) = $dbLink->nextRecord(); $dbLink->cleanResults(); // Not a registered users -> show IP if the current user is administrator // or moderator of the current room if (!$isProfile) { $error = sprintf(L_NONREG_USER, $cmd[1]); if ($dbSessionVars['status'] == 'a' || $dbSessionVars['status'] == 'm') { $dbLink->query("SELECT ip FROM " . C_USR_TBL . " WHERE username='" . $slashedTarget . "' LIMIT 1"); list($ip) = $dbLink->nextRecord(); if ($ip != '') { if (substr($ip, 0, 1) == 'p') $ip = substr($ip, 1) . ' (proxy)'; $error .= '\n' . sprintf(L_NONREG_USER_IP, $ip); } $dbLink->cleanResults(); } } // end of 'not a registered user' // It's a registered user -> define the script to launch the 'whois' popup else { $isPopup = true; $winName = 'whois_popup_' . uniqid(''); $whoisUrl = 'whois_popup.' . C_EXTENSION . '?' . dbSessionSID('GET') . $pmcQueryArgSeparator . 'whoisTarget=' . $cmd[1]; $jsToRun = array( '<script type="text/javascript" language="javascript">', '<!--', '// Lauch the whois popup', 'window.open(\'' . $whoisUrl . '\', \'' . $winName . '\', \'width=420,height=240,resizable=yes,scrollbars=yes\');', '// -->', '</script>' ); } } ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library does the work associated to the 'history' command. | // | | // | It is called by the 'commands.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: history.cmd.php3,v 1.1 2001/04/04 23:52:33 loic1 Exp $ // // The work for the 'history' command. // /** * Just modify some variables */ $isCommand = true; $displayMessage = true; ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library does the work associated to the 'banish' command. | // | | // | It is called by the 'commands.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: banish.cmd.php3,v 1.1 2001/04/04 23:52:33 loic1 Exp $ // // The work for the 'banish' command. // /** * Check for invalid characters in the target user name */ if (ereg('[\, ]', $cmd[2])) { $error = L_ERR_USR_16; } /** * Ensure the current user is allowed to use the 'banish' command */ else if ($dbSessionVars['status'] != 'a' && $dbSessionVars['status'] != 'm') { $error = L_NO_MODERATOR; } /** * Ensure the current user is allowed to 'banish' the target user before doing * the work */ else { $slashedTarget = pmcSlashSingleQuotes($cmd[2]); // Define an additional condition for moderators so they can only banish an // user from their current room $queryRoomPart = ($dbSessionVars['status'] == 'm') ? 'room = \'' . pmcSlashSingleQuotes($dbSessionVars['targetRoom']) . '\' AND ' : ''; // Ensure the user to be banished is logged in (into the current room for moderators) $dbLink->query("SELECT latin1, room, status, ip FROM " . C_USR_TBL . " WHERE " . $queryRoomPart . "username = '$slashedTarget' LIMIT 1"); $isChatting = (list($targetLatin1, $targetCurrentRoom, $targetStatus, $targetIp) = $dbLink->nextRecord()); $dbLink->cleanResults(); // He/she is not chatting -> send an error message if (!$isChatting) { $error = sprintf(L_NONEXIST_USER, $cmd[2]); } // He/she is chatting else { // Ensure the user to be banished is not a more powerfull user // (admin > moderator) if ($targetStatus == 'a' || ($targetStatus == 'm' && $dbSessionVars['status'] != 'a')) { $error = sprintf(L_NO_BANISHED, $cmd[2]); } else { if ($cmd[1] == '* ' && $dbSessionVars['status'] != 'a') $cmd[1] = ''; // Define the duration of the banishment $banUntil = ($cmd[1] == '* ') ? 2147483647 : time() + round(C_BANISH * 60 * 60 * 24); if ($banUntil > 2147483647) $banUntil = 2147483647; // Check if the target user is already banished from some rooms $dbLink->query("SELECT ip, rooms FROM " . C_BAN_TBL . " WHERE username = '$slashedTarget' LIMIT 1"); $isBanished = (list($targetOldIp, $targetOldBanRooms) = $dbLink->nextRecord()); $dbLink->cleanResults(); // User is already banished from some rooms -> Update the banished table if ($isBanished) { // Define rooms that the user will be banished from (if they are more // than 3, user will be banished from the whole chat) if ($cmd[1] == '* ') { $targetNewBanRooms = '*'; } else { $tmpArray = explode(',', $targetOldBanRooms); if (pmcIsInto($targetCurrentRoom, $tmpArray) < 0) $targetNewBanRooms = (count($tmpArray) > 2) ? '*' : pmcSlashSingleQuotes($targetOldBanRooms . ',' . $targetCurrentRoom); else $targetNewBanRooms = pmcSlashSingleQuotes($targetOldBanRooms); unset($tmpArray); } // IP needs to be updated? if (substr($targetIp, 0, 1) == 'p' && substr($targetOldIp, 0, 1) != 'p') $targetIp = $targetOldIp; // Update the table $dbLink->query("UPDATE " . C_BAN_TBL . " SET ip = '$targetIp', rooms = '$targetNewBanRooms', ban_until = '$banUntil' WHERE username = '$slashedTarget'"); } // end of user already banished // User isn't already banished from any room -> Insert into the banished table else { $targetNewBanRooms = ($cmd[1] == '* ') ? '*' : pmcSlashSingleQuotes($targetCurrentRoom); $dbLink->query("INSERT INTO " . C_BAN_TBL . " VALUES ('$slashedTarget', '$targetLatin1', '$targetIp', '$targetNewBanRooms', '$banUntil')"); } // end of 'first banishment for the target user' // Modify the status of the banished user in the connected users table $dbLink->query("UPDATE " . C_USR_TBL . " SET u_time='" . time() . "', status='b' WHERE username = '$slashedTarget'"); // banishment confirmation message $error = sprintf(L_BANISHED, $cmd[2]); $isCommand = true; $doRefreshMessages = true; } // end of 'banishment allowed' } // end of 'target user is chatting' } ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library does the work associated to the 'announce' command. | // | | // | It is called by the 'commands.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: announce.cmd.php3,v 1.1 2001/04/04 23:52:33 loic1 Exp $ // // The work for the 'announce' command. // /** * The current user is adminsitrator -> insert the message in the 'messages' * table */ if ($dbSessionVars['status'] == 'a') { // Format original message and set enhanced one (with graphical smilies) $originalMessage = formatMessage($cmd[1]); $enhancedMessage = $originalMessage; if (C_USE_SMILIES) { include('./lib/smilies.lib.' . C_EXTENSION); checkForSmilies($enhancedMessage, $smilies); unset($smilies); } // Put the message in the 'messages' table $msgQuery = 'INSERT INTO ' . C_MSG_TBL . ' ' . 'VALUES (' . $currentRoomType . ', ' . '\'' . $slashedCurrentRoomName . '\', ' . '\'SYS announce\', ' . $latin1 . ', ' . time() . ', ' . '\' *\', ' . '\'' . $color . '\', ' . '\'' . pmcSlashSingleQuotes($originalMessage) . '\', ' . '\'' . pmcSlashSingleQuotes($enhancedMessage) . '\'' . ')'; $dbLink->query($msgQuery); $isCommand = true; $doRefreshMessages = true; } /** * The current user is not adminsitrator -> set an error message */ else { $error = L_NO_ADMIN; } ?> |
From: Lo?c C. <lo...@us...> - 2001-04-04 23:52:40
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv23458 Added Files: whois_popup.php3 Log Message: First working commands :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script defines the 'whois' popups that are used to display users' | // | profiles. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: whois_popup.php3,v 1.1 2001/04/04 23:52:33 loic1 Exp $ // // The 'whois' popups. // /** * Gets the extension for the php scripts */ if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; define('C_EXTENSION', (substr($PHP_SELF, -1) == 3) ? 'php3' : 'php'); /** * Gets some core libraries */ require('./config/config.lib.' . C_EXTENSION); require('./lib/common.lib.' . C_EXTENSION); require('./lib/database/' . C_DB_TYPE . '.lib.' . C_EXTENSION); require('./lib/clean.lib.' . C_EXTENSION); /** * Gets the values of variables sent or posted to this script * * Uses the 'pmcGrabGlobals()' and the 'pmcHandleMagicQuotes()' functions * defined in the 'chat/lib/common.lib.php3' library. */ pmcGrabGlobals('%GET'); $slashedWhoisTarget = pmcHandleMagicQuotes($whoisTarget, '0', '', 'add'); /** * Start the session handler */ require('./lib/db_sessions.lib.' . C_EXTENSION); dbSessionInitIt( C_DB_TYPE, C_DB_HOST, C_DB_NAME, C_DB_USER, C_DB_PASS, C_SESS_TBL, C_REG_DEL, C_SESS_DEL * 60 ); dbSessionstart(); /** * Defines the language to be used */ require('./localization/' . $dbSessionVars['lang'] . '/localized.chat.' . C_EXTENSION); /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, false); /** * Define the level of information the current user is allowed to see */ switch ($dbSessionVars['status']) { case 'a': // administrator $power = 'high'; break; case 'm': // moderator $power = 'medium'; break; default: $power = 'weak'; } // end switch /** * Get the target user profile and define his/her permission level * * Uses the 'pmcIsInto()' and the 'pmcHandleMagicQuotes()' functions * defined in the 'chat/lib/common.lib.php3' library. */ $whoisDbLnk = new pmcDB; $whoisDbLnk->query("SELECT latin1, firstname, lastname, country, website, email, showemail, perms, rooms, ip, gender FROM " . C_REG_TBL . " WHERE username='$slashedWhoisTarget' LIMIT 1"); list($latin1, $firstname, $lastname, $country, $website, $email, $showemail, $perms, $rooms, $ip, $gender) = $whoisDbLnk->nextRecord(); $whoisDbLnk->cleanResults(); $whoisDbLnk->close(); $firstname = pmcHandleMagicQuotes($firstname, '', '1', 'del'); $lastname = pmcHandleMagicQuotes($lastname, '', '1', 'del'); $country = pmcHandleMagicQuotes($country, '', '1', 'del'); $rooms = pmcHandleMagicQuotes($rooms, '', '1', 'del'); $tagOpen = ''; $tagClose = ''; switch ($perms) { case 'admin': $perms = '<i>' . L_WHOIS_ADMIN . '</i>'; $tagOpen = '<i>'; $tagClose = '</i>'; // Do not allow moderators to see some of the administrator // informations (ip and e-mail) if ($power == 'medium') $power = 'weak'; break; case 'moderator': if (pmcIsInto($dbSessionVars['targetRoom'], $rooms) > 0) { $perms = '<i>' . L_WHOIS_MODER . '</i>'; $tagOpen = '<i>'; $tagClose = '</i>'; } else $perms = L_WHOIS_USER; break; default: $perms = L_WHOIS_USER; } // end switch /** * Displays the frame * * Uses the 'pmcUrlForStyleSheet()' and the 'pmcSpecialChars()' functions from * the 'chat/lib/common.lib.php3' library */ // The url for the style sheet $cssUrl = pmcUrlForStyleSheet('style', L_CHARSET, (defined('L_FONT_NAME')) ? L_FONT_NAME : '', L_FONT_SIZE); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html dir="<?php echo((L_CHARSET == 'windows-1256') ? 'rtl' : 'ltr'); ?>"> <head> <title><?php echo(pmcSpecialChars($slashedWhoisTarget, $latin1)); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript1.1"> <!-- // Put the focus at the message box in the input frame function putFocus() { if (typeof(window.opener) == 'undefined') return false; if (window.opener.window.document.title == 'Handle input hidden frame') targetFrame = window.opener.window.parent.frames['input'].window; else targetFrame = window.opener.window; with (targetFrame) { focus(); if (document.forms['inputForm'] && document.forms['inputForm'].elements['message']) document.forms['inputForm'].elements['message'].focus(); } } // --> </script> </head> <body class="frame" onunload="putFocus()"> <center> <p class="title"> <?php echo($tagOpen . pmcSpecialChars($slashedWhoisTarget, $latin1) . $tagClose . "\n"); ?> </p> <p></p> <table border="0"> <tr> <td class="whois" nowrap="nowrap"><?php echo(L_REG_30); ?>: </td> <td class="whois" nowrap="nowrap"><?php echo(pmcSpecialChars($firstname, $latin1)); ?></td> </tr> <tr> <td class="whois" nowrap="nowrap"><?php echo(L_REG_31); ?>: </td> <td class="whois" nowrap="nowrap"><?php echo(pmcSpecialChars($lastname, $latin1)); ?></td> </tr> <?php if ($gender) { $gender = ($gender == 1) ? L_REG_46 : L_REG_47; ?> <tr> <td class="whois" nowrap="nowrap"><?php echo(L_REG_45); ?>: </td> <td class="whois" nowrap="nowrap"><?php echo($gender); ?></td> </tr> <?php } echo("\n"); if ($country) { ?> <tr> <td class="whois" nowrap="nowrap"><?php echo(L_REG_36); ?>: </td> <td class="whois" nowrap="nowrap"><?php echo(pmcSpecialChars($country, $latin1)); ?></td> </tr> <?php } echo("\n"); if ($showemail || $power != 'weak') { ?> <tr> <td class="whois" nowrap="nowrap">e-mail: </td> <td nowrap="nowrap"><a href="mailto:<?php echo($email); ?>"><?php echo($email); ?></a></td> </tr> <?php } echo("\n"); if ($website) { $prefix = (strpos($website,"://")) ? '' : 'http://'; ?> <tr> <td class="whois" nowrap="nowrap"><?php echo(L_REG_32); ?>: </td> <td nowrap="nowrap"><a href="<?php echo($prefix . urlencode(str_replace('javascript:', '', $website))); ?>" target="_blank"><?php echo($prefix . $website); ?></a></td> </tr> <? } echo("\n"); if ($power != 'weak') { if (substr($ip, 0, 1) == 'p') $ip = substr($ip, 1) . ' (proxy)'; ?> <tr> <td class="whois" nowrap="nowrap">IP: </td> <td class="whois" nowrap="nowrap"><?php echo($ip); ?></td> </tr> <?php } echo("\n"); ?> </table> <br /> <span class="whois"><?php echo('> ' . $tagOpen . $perms . $tagClose . ' <'); ?></span> </center> </body> </html> <?php ?> |
From: Lo?c C. <lo...@us...> - 2001-04-04 23:52:40
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv23458/lib Added Files: commands.lib.php3 Log Message: First working commands :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library checks for 'IRC-like' commands submitted. | // | | // | It is called by the 'input.php3' and the 'handle_input.php3' scripts. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: commands.lib.php3,v 1.1 2001/04/04 23:52:33 loic1 Exp $ // // Handles command submitted. // if (eregi('^\/(show|last)([[:space:]]([[:digit:]]+))?$', $message, $cmd)) { include('./lib/commands/show.cmd.' . C_EXTENSION); } else if (eregi('^\/refresh([[:space:]]([[:digit:]]*))?$', $message, $cmd)) { include('./lib/commands/refresh.cmd.' . C_EXTENSION); } else if (eregi('^\/order$', $message)) { include('./lib/commands/order.cmd.' . C_EXTENSION); } else if (eregi('^\/timestamp$', $message)) { include('./lib/commands/timestamp.cmd.' . C_EXTENSION); } else if (C_VERSION > 0 && eregi('^\/join[[:space:]]((0|1)[[:space:]])?#(.{1,30})$', $message, $cmd)) { include('./lib/commands/join.cmd.' . C_EXTENSION); } else if (eregi('^\/(quit|exit|bye)([[:space:]](.+))?$', $message, $cmd)) { include('./lib/commands/quit.cmd.' . C_EXTENSION); } else if (eregi('^\/ignore([[:space:]]\\-)?([[:space:]](.+))?$', $message, $cmd)) { include('./lib/commands/ignore.cmd.' . C_EXTENSION); } else if (eregi('^\/!$', $message, $cmd) && (isset($prevMessage) && $prevMessage != '')) { include('./lib/commands/history.cmd.' . C_EXTENSION); } else if (eregi('^\/kick[[:space:]](.{1,30})$', $message, $cmd)) { include('./lib/commands/kick.cmd.' . C_EXTENSION); } else if (eregi('^\/(msg|to)[[:space:]]([^[:space:]]{1,30})[[:space:]](.+)$', $message, $cmd)) { include('./lib/commands/priv_msg.cmd.' . C_EXTENSION); } else if (eregi('^\/whois[[:space:]](.{1,30})$', $message, $cmd)) { include('./lib/commands/whois.cmd.' . C_EXTENSION); } else if (eregi('^\/profile$', $message)) { include('./lib/commands/profile.cmd.' . C_EXTENSION); } else if (eregi('^\/notify$', $message)) { include('./lib/commands/notify.cmd.' . C_EXTENSION); } else if (eregi('^\/promote[[:space:]](.{1,30})$', $message, $cmd)) { include('./lib/commands/promote.cmd.' . C_EXTENSION); } else if (eregi('^\/(help|\?)$', $message, $cmd)) { include('./lib/commands/help.cmd.' . C_EXTENSION); } else if (eregi('^\/clear$', $message, $cmd)) { include('./lib/commands/clear.cmd.' . C_EXTENSION); } else if (C_SAVE != 0 && eregi('^\/save([[:space:]]([[:digit:]]*))?$', $message, $cmd) && ($cmd[2] == '' OR $cmd[2] > 0)) { include('./lib/commands/save.cmd.' . C_EXTENSION); } else if (eregi('^\/announce[[:space:]](.*)?$', $message, $cmd)) { include('./lib/commands/announce.cmd.' . C_EXTENSION); } else if (eregi('^\/invite([[:space:]](.+))+$', $message, $cmd)) { include('./lib/commands/invite.cmd.' . C_EXTENSION); } else if (C_BANISH != 0 && eregi('^\/ban[[:space:]](\*[[:space:]])?(.{1,30})$', $message, $cmd)) { include('./lib/commands/banish.cmd.' . C_EXTENSION); } else if (eregi('^\/me[[:space:]](.*)?$', $message, $cmd)) { include('./lib/commands/me.cmd.' . C_EXTENSION); } ?> |
From: Lo?c C. <lo...@us...> - 2001-04-04 23:51:21
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv23344/commands Log Message: Directory /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands added to the repository |
From: Lo?c C. <lo...@us...> - 2001-04-04 23:50:58
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv23307 Modified Files: input.php3 handle_input.php3 Log Message: Take into account that db links may be used by commands Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** input.php3 2001/04/03 20:10:15 1.1 --- input.php3 2001/04/04 23:50:54 1.2 *************** *** 115,118 **** --- 115,119 ---- if (isset($message) && trim($message) != '') { + $dbLink = new pmcDB; include('./lib/format_messages.lib.' . C_EXTENSION); *************** *** 120,124 **** if (substr($message, 0, 1) == '/') { ! include('./lib/commands.lib' . C_EXTENSION); if (!($isCommand) && !isset($error)) $error = L_BAD_CMD; --- 121,125 ---- if (substr($message, 0, 1) == '/') { ! include('./lib/commands.lib.' . C_EXTENSION); if (!($isCommand) && !isset($error)) $error = L_BAD_CMD; *************** *** 143,147 **** $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; ! unset($message); if (C_USE_SMILIES) { --- 144,149 ---- $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; ! $message = $strictMessage; ! unset($strictMessage); if (C_USE_SMILIES) { *************** *** 170,179 **** . ')'; - $dbLink = new pmcDB; $dbLink->query($msgQuery); - $dbLink->close(); $doRefreshMessages = true; } // end of handle 'true' messages } // end of handle submitted message --- 172,181 ---- . ')'; $dbLink->query($msgQuery); $doRefreshMessages = true; } // end of handle 'true' messages + + $dbLink->close(); } // end of handle submitted message *************** *** 234,238 **** <!-- Last sent message or command (used for the '/!' command) --> ! <input type="hidden" name="prevMessage" value="<?php echo(isset($strictMessage) ? htmlspecialchars(stripslashes($strictMessage)) : ''); ?>" /> <!-- Addressee that will be filled when the user click on a nick at the users frame --> --- 236,240 ---- <!-- Last sent message or command (used for the '/!' command) --> ! <input type="hidden" name="prevMessage" value="<?php echo(isset($message) ? htmlspecialchars(stripslashes($message)) : ''); ?>" /> <!-- Addressee that will be filled when the user click on a nick at the users frame --> *************** *** 255,259 **** $msgValue = ($displayMessage) ? htmlspecialchars($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = htmlspecialchars($strictMessage); ?> <!-- Message box --> --- 257,261 ---- $msgValue = ($displayMessage) ? htmlspecialchars($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = htmlspecialchars($message); ?> <!-- Message box --> Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** handle_input.php3 2001/04/03 20:10:15 1.1 --- handle_input.php3 2001/04/04 23:50:54 1.2 *************** *** 116,119 **** --- 116,120 ---- if (isset($message) && trim($message) != '') { + $dbLink = new pmcDB; include('./lib/format_messages.lib.' . C_EXTENSION); *************** *** 121,125 **** if (substr($message, 0, 1) == '/') { ! include('./lib/commands.lib' . C_EXTENSION); if (!($isCommand) && !isset($error)) $error = L_BAD_CMD; --- 122,126 ---- if (substr($message, 0, 1) == '/') { ! include('./lib/commands.lib.' . C_EXTENSION); if (!($isCommand) && !isset($error)) $error = L_BAD_CMD; *************** *** 144,148 **** $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; ! unset($message); if (C_USE_SMILIES) { --- 145,150 ---- $originalMessage = formatMessage($message); $enhancedMessage = $originalMessage; ! $message = $strictMessage; ! unset($strictMessage); if (C_USE_SMILIES) { *************** *** 170,180 **** . '\'' . pmcSlashSingleQuotes($enhancedMessage) . '\'' . ')'; - - $dbLink = new pmcDB; $dbLink->query($msgQuery); - $dbLink->close(); $doRefreshMessages = true; } // end of handle 'true' messages } // end of handle submitted message --- 172,181 ---- . '\'' . pmcSlashSingleQuotes($enhancedMessage) . '\'' . ')'; $dbLink->query($msgQuery); $doRefreshMessages = true; } // end of handle 'true' messages + + $dbLink->close(); } // end of handle submitted message *************** *** 203,207 **** with (window.parent.frames['input'].window.document.forms['inputForm']) { ! elements['prevMessage'].value = '<?php echo(isset($strictMessage) ? pmcSlashSingleQuotes(htmlspecialchars($strictMessage)) : ''); ?>'; <?php --- 204,208 ---- with (window.parent.frames['input'].window.document.forms['inputForm']) { ! elements['prevMessage'].value = '<?php echo(isset($message) ? pmcSlashSingleQuotes(htmlspecialchars($message)) : ''); ?>'; <?php *************** *** 212,216 **** $msgValue = ($displayMessage) ? htmlspecialchars($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = pmcSlashSingleQuotes(htmlspecialchars($strictMessage)); ?> elements['message'].value = '<?php echo($msgValue); ?>'; --- 213,217 ---- $msgValue = ($displayMessage) ? htmlspecialchars($prevMessage) : ''; if (isset($error) && !($isCommand)) ! $msgValue = pmcSlashSingleQuotes(htmlspecialchars($message)); ?> elements['message'].value = '<?php echo($msgValue); ?>'; |
From: Lo?c C. <lo...@us...> - 2001-04-04 23:50:04
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv23204 Modified Files: misc.lib.js Log Message: An addendum to handle the history command locally Index: misc.lib.js =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/misc.lib.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** misc.lib.js 2001/04/04 16:23:13 1.2 --- misc.lib.js 2001/04/04 23:50:00 1.3 *************** *** 173,176 **** --- 173,178 ---- // RegExp used to validate commands var re = /^\/(!$|announce .+|ban .+|clear$|help$|\?$|ignore|invite .+|join .+|kick .+|me .+|msg .+|to .+|notify$|order$|profile$|promote .+|quit|exit|bye|refresh|save|show|last|timestamp$|whois .+)/i; + // RegExp for the history command + var reHist = /^\/!$/; // Ensure the message box isn't empty *************** *** 185,188 **** --- 187,200 ---- msgBox.select(); alert(jsInvalidCommandMsg); + return false; + } + // It's the history command -> do the work + else if (isCmd && reHist.test(msgBox.value)) + { + var prevMsg = pmcGetInputForm('prevMessage'); + if (prevMsg.value == '') + alert(jsInvalidCommandMsg); + else + msgBox.value = prevMsg.value; return false; } |
From: Lo?c C. <lo...@us...> - 2001-04-04 17:48:12
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv23804 Modified Files: help_popup.php3 Log Message: More security Index: help_popup.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/help_popup.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** help_popup.php3 2001/04/04 17:30:47 1.1 --- help_popup.php3 2001/04/04 17:47:47 1.2 *************** *** 45,57 **** * Defines the language to be used */ ! // set a "fake" dbSession array to avoid a security issue ! if (file_exists('./localization/' . $lang . '/localized.chat.' . C_EXTENSION)) { ! $dbSessionVars['lang'] = $lang; ! unset($lang); } ! if (!isset($dbSessionVars)) ! include('./localization/languages.lib.' . C_EXTENSION); ! require('./localization/' . $dbSessionVars['lang'] . '/localized.chat.' . C_EXTENSION); /** --- 45,62 ---- * Defines the language to be used */ ! if (!file_exists('./localization/' . $lang . '/localized.chat.' . C_EXTENSION)) { ! ?> ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> ! <html> ! <head><title>Error</title></head> ! <body> ! <b>No translation for this language!</b> ! </body> ! </html> ! <?php ! exit(); } ! require('./localization/' . $lang . '/localized.chat.' . C_EXTENSION); /** |
From: Lo?c C. <lo...@us...> - 2001-04-04 17:30:51
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv21105 Added Files: help_popup.php3 Log Message: The help popup is running :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script defines the 'help' popup. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: help_popup.php3,v 1.1 2001/04/04 17:30:47 loic1 Exp $ // // The 'help' popup. // /** * Gets the extension for the php scripts */ if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; define('C_EXTENSION', (substr($PHP_SELF, -1) == 3) ? 'php3' : 'php'); /** * Gets some core libraries */ require('./config/config.lib.' . C_EXTENSION); require('./lib/common.lib.' . C_EXTENSION); /** * Gets the variables sent to this script * * Uses the 'pmcGrabGlobals()' function defined in the * 'chat/lib/common.lib.php3' library. */ pmcGrabGlobals('%GET'); /** * Defines the language to be used */ // set a "fake" dbSession array to avoid a security issue if (file_exists('./localization/' . $lang . '/localized.chat.' . C_EXTENSION)) { $dbSessionVars['lang'] = $lang; unset($lang); } if (!isset($dbSessionVars)) include('./localization/languages.lib.' . C_EXTENSION); require('./localization/' . $dbSessionVars['lang'] . '/localized.chat.' . C_EXTENSION); /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, false); /** * Displays the frame * * Uses the 'pmcUrlForStyleSheet()' function from the * 'chat/lib/common.lib.php3' library */ // The url for the style sheet $cssUrl = pmcUrlForStyleSheet('style', L_CHARSET, (defined('L_FONT_NAME')) ? L_FONT_NAME : '', L_FONT_SIZE); // Text direction and horizontal alignment for cells topic $textDirection = (L_CHARSET == 'windows-1256') ? 'rtl' : 'ltr'; $cellAlign = (L_CHARSET == 'windows-1256') ? 'right' : 'left'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html dir="<?php echo($textDirection); ?>"> <head> <title><?php echo(L_HLP); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript1.1"> <!-- function targetWin() { if (typeof(window.opener) == 'undefined') return null; else if (window.opener.window.document.title == '<?php echo(APP_NAME); ?>') return window.opener.frames['input'].window; else if (window.opener.window.document.title == 'Handle input hidden frame') return window.opener.window.parent.frames['input'].window; else return window.opener.window; } function smiley2Input(code) { window.focus(); if (typeof(window.opener) != 'undefined' && window.opener && !window.opener.closed) { addTo = targetWin(); if (addTo && !addTo.closed) addTo.document.forms['inputForm'].elements['message'].value += code; } } function cmd2Input(code, addString) { window.focus(); if (typeof(window.opener) != 'undefined' && window.opener && !window.opener.closed) { addTo = targetWin(); if (addTo && !addTo.closed) { oldStr = (addString) ? addTo.document.forms['inputForm'].elements['message'].value : ''; if (addString && (oldStr == '' || oldStr.substring(0,1) != ' ')) oldStr = ' ' + oldStr; addTo.document.forms['inputForm'].elements['message'].value = code + oldStr; } } } //--> </script> </head> <body class="mainframe" onload="if (window.focus) window.focus()"> <center> <?php // Display smilies if (C_USE_SMILIES == 1) { include('./lib/smilies.lib.' . C_EXTENSION); $smiliesCnt = count($smilies); $smiliesCodes = array(); displaySmilies($smiliesCodes, $smilies, $smiliesCnt, 'help'); unset($smilies); ?> <!-- Smilies codes --> <table border="0" cellpadding="3" width="574" class="table"> <tr> <th class="tabtitle" colspan="<?php echo($smiliesCnt); ?>"><?php echo(L_HELP_TIT_1); ?></th> </tr> <?php $i = 0; $smiliesCnt = count($smiliesCodes); while ($i < $smiliesCnt) { if ($i > 0) echo("\t"); echo('<tr valign="bottom">' . "\n"); echo($smiliesCodes[$i]); echo("\t" . '</tr>' . "\n"); echo("\t" . '<tr>' . "\n"); $i++; echo($smiliesCodes[$i]); echo("\t" . '</tr>' . "\n"); $i++; } unset($smiliesCodes); ?> </table> <br /> <?php } // end of display smilies if (C_HTML_TAGS_KEEP != 'none') { echo("\n"); ?> <!-- Text formatting help --> <table border="0" cellpadding="3" width="574" class="table"> <tr><td align="center" class="tabtitle"><?php echo(L_HELP_TIT_2); ?></td></tr> <tr><td align="<?php echo($cellAlign); ?>"><?php echo(L_HELP_FMT_1); ?></td></tr> <tr><td align="<?php echo($cellAlign); ?>"><?php echo(L_HELP_FMT_2); ?></td></tr> </table> <br /> <?php } echo("\n"); ?> <!-- Commands help --> <table border="0" cellpadding="3" width="574" class="table"> <tr><th align="center" class="tabtitle" colspan="2"><?php echo(L_HELP_TIT_3); ?></th></tr> <tr><th align="center" colspan="2"><?php echo(L_HELP_CMD_0); ?></th></tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/!', false); return false" class="sender">/!</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_7); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/ANNOUNCE', true); return false" class="sender">/announce {<?php echo(L_HELP_MSG); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_17); ?></td> </tr> <?php if (C_BANISH != 0) { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/BAN', true); return false" class="sender">/ban <bdo dir="<?php echo($textDirection); ?>">[*]</bdo> {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_19); ?></td> </tr> <?php } // $jsVersion value is 'high' for dynamic rendering of the messages frame, 'low' // or 'medium' in other case if ($jsVersion == 'high') { echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/CLEAR', false); return false" class="sender">/clear</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_15); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/IGNORE', true); return false" class="sender">/ignore <bdo dir="<?php echo($textDirection); ?>">[-]</bdo> <?php echo('[' . L_HELP_USR . '[,' . L_HELP_USR . '...]]'); ?></a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_6); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/INVITE', true); return false" class="sender">/invite {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_18); ?></td> </tr> <?php if (C_VERSION > 0) { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/JOIN', true); return false" class="sender">/join <bdo dir="<?php echo($textDirection); ?>">[n]</bdo> {#<?php echo(L_HELP_ROOM); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_4); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/KICK', true); return false" class="sender">/kick {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_9); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/ME', true); return false" class="sender">/me {<?php echo(L_HELP_MSG); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_20); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"> <a href="#" onclick="cmd2Input('/MSG', true); return false" class="sender">/msg <?php echo('{' . L_HELP_USR . '} {' . L_HELP_MSG .'}'); ?></a><br /> <a href="#" onclick="cmd2Input('/TO', true); return false" class="sender">/to <?php echo('{' . L_HELP_USR . '} {' . L_HELP_MSG . '}'); ?></a> </th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_10); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/NOTIFY', false); return false" class="sender">/notify</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_13); ?></td> </tr> <?php if ($jsVersion == 'high') { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/ORDER', false); return false" class="sender">/order</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_3); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/PROFILE', false); return false" class="sender">/profile</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_12); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/PROMOTE', true); return false" class="sender">/promote {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_14); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"> <a href="#" onclick="cmd2Input('/QUIT', true); return false" class="sender">/quit [<?php echo(L_HELP_MSG); ?>]</a><br /> <a href="#" onclick="cmd2Input('/EXIT', true); return false" class="sender">/exit [<?php echo(L_HELP_MSG); ?>]</a><br /> <a href="#" onclick="cmd2Input('/BYE', true); return false" class="sender">/bye [<?php echo(L_HELP_MSG); ?>]</a> </th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_5); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/REFRESH', true); return false" class="sender">/refresh <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a></th></tr> <tr> <td width="10"> </td> <td><?php echo(($jsVersion == 'high') ? L_HELP_CMD_2b : L_HELP_CMD_2a); ?></td> </tr> <?php if (C_SAVE != 0) { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/SAVE', true); return false" class="sender">/save <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_16); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"> <a href="#" onclick="cmd2Input('/SHOW', true); return false" class="sender">/show <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a> <?php if ($jsVersion == 'high') { ?> <br /> <a href="#" onclick="cmd2Input('/LAST', true); return false" class="sender">/last <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a> <?php } echo("\n"); ?> </th></tr> <tr> <td width="10"> </td> <td><?php echo(($jsVersion == 'high') ? L_HELP_CMD_1b : L_HELP_CMD_1a); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/TIMESTAMP', false); return false" class="sender">/timestamp</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_8); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/WHOIS', true); return false" class="sender">/whois {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_11); ?></td> </tr> </table> </center> </body> </html> |
From: Lo?c C. <lo...@us...> - 2001-04-04 17:29:58
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv20918 Modified Files: exit.php3 Log Message: another js fixes for users popus Index: exit.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/exit.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** exit.php3 2001/04/04 16:22:49 1.3 --- exit.php3 2001/04/04 17:29:54 1.4 *************** *** 119,123 **** ?> <!-- Display the icon to launch the users popup --> ! <a href="<?php echo($usersPopupUrl); ?>" onclick="pmcUsersPopup('<?php echo(md5(C_CHAT_URL)); ?>'); return false" target="_blank"> <img src="images/popup.gif" width="13" height="13" align="middle" border="0" alt="<?php echo(L_DETACH); ?>" /></a> --- 119,123 ---- ?> <!-- Display the icon to launch the users popup --> ! <a href="<?php echo($usersPopupUrl); ?>" onclick="window.parent.pmcUsersPopup('<?php echo(md5(C_CHAT_URL)); ?>'); return false" target="_blank"> <img src="images/popup.gif" width="13" height="13" align="middle" border="0" alt="<?php echo(L_DETACH); ?>" /></a> |
From: Lo?c C. <lo...@us...> - 2001-04-04 16:24:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv5649/lib Modified Files: upgrades.lib.php3 Log Message: Fix some slash problems Index: upgrades.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/upgrades.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** upgrades.lib.php3 2001/04/03 20:17:40 1.1 --- upgrades.lib.php3 2001/04/04 16:24:24 1.2 *************** *** 26,29 **** --- 26,32 ---- /** * Updates the names of the cookies + * + * The 'pmcHandleMagicQuotes()' function is defined in the + * 'chat/lib/common.lib.php3' script. */ // If cookies haven't already been updated, do the work *************** *** 42,46 **** $oldCookies['CookieNotify'] = $CookieNotify; if (isset($CookieRoom)) ! $oldCookies['CookieRoom'] = $CookieRoom; if (isset($CookieRoomType)) $oldCookies['CookieRoomType'] = $CookieRoomType; --- 45,49 ---- $oldCookies['CookieNotify'] = $CookieNotify; if (isset($CookieRoom)) ! $oldCookies['CookieRoom'] = pmcHandleMagicQuotes($CookieRoom, '1', '', 'del'); if (isset($CookieRoomType)) $oldCookies['CookieRoomType'] = $CookieRoomType; *************** *** 48,52 **** $oldCookies['CookieShowTimestamp'] = $CookieShowTimestamp; if (isset($CookieUsername)) ! $oldCookies['CookieUsername'] = $CookieUsername; // Defines the new cookies (they will expire in one year) and kills the --- 51,55 ---- $oldCookies['CookieShowTimestamp'] = $CookieShowTimestamp; if (isset($CookieUsername)) ! $oldCookies['CookieUsername'] = pmcHandleMagicQuotes($CookieUsername, '1', '', 'del'); // Defines the new cookies (they will expire in one year) and kills the |
From: Lo?c C. <lo...@us...> - 2001-04-04 16:24:06
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv5593/lib Modified Files: get_ip.lib.php3 Log Message: A warning message was displayed when 'REMOTE ADDRESS' can't be found Index: get_ip.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/get_ip.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** get_ip.lib.php3 2001/04/03 20:10:14 1.1 --- get_ip.lib.php3 2001/04/04 16:24:02 1.2 *************** *** 35,39 **** pmcGrabGlobals($toGrab); ! $simpleIp = $REMOTE_ADDR; $trueIp = isset($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : ''; --- 35,39 ---- pmcGrabGlobals($toGrab); ! $simpleIp = isset($REMOTE_ADDR) ? $REMOTE_ADDR : ''; $trueIp = isset($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : ''; |
From: Lo?c C. <lo...@us...> - 2001-04-04 16:23:17
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv5471/lib/index_libs Modified Files: do_enter_js_work.lib.php3 main_index.lib.php3 misc.lib.js start_page.lib.js Log Message: js fixes for users popus Index: do_enter_js_work.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/do_enter_js_work.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** do_enter_js_work.lib.php3 2001/04/03 20:10:15 1.1 --- do_enter_js_work.lib.php3 2001/04/04 16:23:13 1.2 *************** *** 39,44 **** var jsIgnoredPopupWin = null; - var jsUsersPopupWin = null; - var jsInputForm = null; var jsUrlQueryForHelp = '<?php echo('lang=' . $dbSessionVars['lang'] . $pmcQueryArgSeparator . 'jsVersion=' . $jsVersion); ?>'; --- 39,42 ---- Index: main_index.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** main_index.lib.php3 2001/04/04 11:09:31 1.4 --- main_index.lib.php3 2001/04/04 16:23:13 1.5 *************** *** 441,445 **** var jsTutorialWin = null; - var jsUsersPopupWin = null; var jsRegPopupWin = null; --- 441,444 ---- *************** *** 549,553 **** { $chattingCnt = $dbLink->numRows(); ! $usersPopupLink = ' <a href="' . _CHAT_PATH . 'users_popup_low.' . C_EXTENSION . '?' . dbSessionSID('GET') .'" class="chatLink" onclick="pmcUsersPopup(\'' . uniqid('') . '\'); return false" target="_blank">'; $usersPopupLink .= $chattingCnt . ' '; $usersPopupLink .= ($chattingCnt > 1) ? L_USERS : L_USER; --- 548,552 ---- { $chattingCnt = $dbLink->numRows(); ! $usersPopupLink = ' <a href="' . _CHAT_PATH . 'users_popup_low.' . C_EXTENSION . '?' . dbSessionSID('GET') .'" class="chatLink" onclick="pmcUsersPopup(\'' . md5(C_CHAT_URL) . '\'); return false" target="_blank">'; $usersPopupLink .= $chattingCnt . ' '; $usersPopupLink .= ($chattingCnt > 1) ? L_USERS : L_USER; Index: misc.lib.js =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/misc.lib.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** misc.lib.js 2001/04/03 20:14:52 1.1 --- misc.lib.js 2001/04/04 16:23:13 1.2 *************** *** 225,238 **** + '?' + jsDbSessionSID; - // Launches the users popup only if it doesn't already exists - if (!jsUsersPopupWin) - { - if (jsIsJs11) - window.focus(); - jsUsersPopupWin = window.open(usersUrl, 'users_popup_' + dummy, 'width=180,height=300,resizable=yes,scrollbars=yes'); - } - if (jsIsJs11) ! jsUsersPopupWin.focus(); } // end of the 'pmcUsersPopup()' function --- 225,233 ---- + '?' + jsDbSessionSID; if (jsIsJs11) ! window.focus(); ! var usersPopup = window.open(usersUrl, 'users_popup_' + dummy, 'width=180,height=300,resizable=yes,scrollbars=yes'); ! if (jsIsJs11) ! usersPopup.focus(); } // end of the 'pmcUsersPopup()' function Index: start_page.lib.js =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/start_page.lib.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** start_page.lib.js 2001/04/03 20:17:40 1.1 --- start_page.lib.js 2001/04/04 16:23:13 1.2 *************** *** 81,94 **** + '?' + jsDbSessionSID; - // Launches the users popup only if it doesn't already exists - if (!jsUsersPopupWin) - { - if (jsIsJs11) - window.focus(); - jsUsersPopupWin = window.open(usersUrl, 'users_popup_' + dummy, 'width=180,height=300,resizable=yes,scrollbars=yes'); - } - if (jsIsJs11) ! jsUsersPopupWin.focus(); } // end of the 'pmcUsersPopup()' function --- 81,89 ---- + '?' + jsDbSessionSID; if (jsIsJs11) ! window.focus(); ! var usersPopup = window.open(usersUrl, 'users_popup_' + dummy, 'width=180,height=300,resizable=yes,scrollbars=yes'); ! if (jsIsJs11) ! usersPopup.focus(); } // end of the 'pmcUsersPopup()' function |