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-03 20:18:18
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/images In directory usw-pr-cvs1:/tmp/cvs-serv6556/chat/images Added Files: beep.wav closed.gif closed_big.gif connect_error.gif connect_off.gif connect_on.gif Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- RIFFæ --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:18:18
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/images/admin_imgs In directory usw-pr-cvs1:/tmp/cvs-serv6556/chat/images/admin_imgs Added Files: begin.gif down.gif Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:17:44
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv6312/chat Added Files: tutorial_popup.php3 users.php3 Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script displays the tutorial with the most appropriate language. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: tutorial_popup.php3,v 1.1 2001/04/03 20:17:40 loic1 Exp $ // // Launches the tutorial with the most appropriate language. // /** * 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 files */ require('./config/config.lib.php3'); require('./lib/common.lib.php3'); /** * Gets the session id sent to this script * * Uses the 'pmcGrabGlobals()' function defined in the * 'chat/lib/common.lib.php3' library. */ pmcGrabGlobals('%GET'); /** * Defines the translation to be used */ if (empty($lang) || !file_exists('./localization/' . $lang . '/localized.tutorial.' . C_EXTENSION)) { $lang = ''; include('./localization/tutorial.lib.' . C_EXTENSION); } /** * Gets the tutorial */ require('./localization/'. $lang .'/localized.tutorial.' . C_EXTENSION); ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script defines the 'users' with DHTML enabled browsers. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: users.php3,v 1.1 2001/04/03 20:17:40 loic1 Exp $ // // The "standard" users frame. // /** * 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('dbSessionId'); /** * 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); $textDirection = (L_CHARSET == 'windows-1256') ? 'rtl' : 'ltr'; /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, true); /** * Add two slashes before single quotes * * @param string the string to be slashed * * @return string the slashed string * * @access public */ function pmcDoubleSlash($theString) { return str_replace('\'', '\\\\\'', $theString); } // end of the 'pmcDoubleSlash()' function /** * Format an username according to the status of the user * * The 'pmcSpecialChars()' fonction is defined in the * 'chat/lib/common.lib.php3' library * * @param string the username * @param boolean whether this username uses 'iso-8859-1' character set or * not * @param string the status of the user * * @return string the formatted username * * @access public */ function pmcFormatUsername($theUsername, $isUnLatin1, $theSatus) { $tagOpen = ($theSatus == 'a' || $theSatus == 'm') ? '<i>' : ''; $tagClose = ($tagOpen != '') ? '</i>' : ''; $theUsername = $tagOpen . pmcSpecialChars($theUsername, $isUnLatin1) . $tagClose; return $theUsername; } // end of the 'pmcFormatUsername()' function /** * Defines some variables */ $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); $usersList = array(); /** * Build the users list for the current room * * The 'pmcSlashSingleQuotes()', the 'pmcHandleMagicQuotes()' and the * 'pmcSpecialChars()' fonctions are defined in the 'chat/lib/common.lib.php3' * library */ if (C_DB_TYPE == 'mysql') { $currentRoomQuery = 'SELECT usr.username, usr.latin1, usr.status, reg.gender ' . 'FROM ' . C_USR_TBL . ' usr LEFT JOIN ' . C_REG_TBL . ' reg ON usr.username = reg.username ' . 'WHERE usr.room = \'' . $slashedCurrentRoomName . '\' ' . 'ORDER BY usr.username'; } else if (C_DB_TYPE == 'pgsql') { $currentRoomQuery = 'SELECT usr.username, usr.latin1, usr.status, reg.gender ' . 'FROM ' . C_USR_TBL . ' usr, ' . C_REG_TBL . ' reg ' . 'WHERE usr.room = \'' . $slashedCurrentRoomName . '\' ' . 'UNION ' . 'SELECT usr.username, usr.latin1, usr.status, NULL ' . 'FROM ' . C_USR_TBL . ' usr ' . 'WHERE usr.username NOT IN (SELECT reg.username FROM ' . C_REG_TBL . ' reg) AND usr.room = \'' . $slashedCurrentRoomName . '\' ' . 'ORDER BY usr.username'; } else { $currentRoomQuery = 'SELECT usr.username, usr.latin1, usr.status, NULL ' . 'FROM ' . C_USR_TBL . ' usr ' . 'WHERE usr.room = \'' . $slashedCurrentRoomName . '\' ' . 'ORDER BY usr.username'; } $usersCnt = 0; $usersList[] = '<b>' . htmlspecialchars($slashedCurrentRoomName) . '<b>' . '<span class="small">' . '<bdo dir="' . $textDirection . '"></bdo>' . ' (%NUMROWS%)' . '</span><br />'; $usersList[] = '<div style="margin-bottom: 10px">'; $currentRoomDb = new pmcDB; $currentRoomDb->query($currentRoomQuery); while (list($username, $latin1, $status, $gender) = $currentRoomDb->nextRecord()) { $usersCnt++; $username = pmcHandleMagicQuotes($username, '', 1, 'del'); // Define the icon to put for this user if ($gender == 0) $gender = 'undefined'; else if ($gender == 1) $gender = 'boy'; else if ($gender == 2) $gender = 'girl'; else $gender = 'none'; if ($status != 'u' && $status != 'k' && $status != 'd' && $status != 'b') { $tmpStr = '<a href="#" onclick="window.parent.pmcRunCmd(' . (($username == $dbSessionVars['nick']) ? '\'PROFILE\', \'\'' : '\'WHOIS\', \'' . pmcDoubleSlash(pmcSpecialChars($username, $latin1)) .'\'') . '); return false;" class="user">' . '<img src="images/gender_' . $gender . '.gif" width="14" height="14" border="0" alt="' . L_PROFILE . '" />' . '</a> '; } else { $tmpStr = '<img src="images/gender_none.gif" width="14" height="14" border="0" alt="' . L_NO_PROFILE . '" /> '; } // Define the format to be used for the username according to the status if ($username != $dbSessionVars['nick']) { $tmpStr .= '<a href="javascript:window.parent.pmcUserClick(\'' . pmcDoubleSlash(pmcSpecialChars($username, $latin1)) . '\', false)" class="user">' . pmcFormatUsername($username, $latin1, $status) . '</a><br />'; } else { $tmpStr .= pmcFormatUsername($username, $latin1, $status) . '<br />'; } $usersList[] = "\t" . $tmpStr; } $currentRoomDb->cleanResults(); $currentRoomDb->close(); $usersList[] = '</div>'; $usersList[] = ''; $usersList[] = ''; $usersList[0] = str_replace('%NUMROWS%', $usersCnt, $usersList[0]); /** * Build the users list for the others populated rooms * * The 'pmcSlashSingleQuotes()', the 'pmcHandleMagicQuotes()' and the * 'pmcSpecialChars()' fonctions are defined in the 'chat/lib/common.lib.php3' * library */ // 1. Get the list of rooms and users if (C_DB_TYPE == 'mysql') { $otherRoomsQuery = 'SELECT usr.username, usr.latin1, usr.status, reg.gender ' . 'FROM ' . C_USR_TBL . ' usr LEFT JOIN ' . C_REG_TBL . ' reg ON usr.username = reg.username ' . 'WHERE usr.room = \'%OTHER%\' ' . 'ORDER BY usr.username'; } else if (C_DB_TYPE == 'pgsql') { $otherRoomsQuery = 'SELECT usr.username, usr.latin1, usr.status, reg.gender ' . 'FROM ' . C_USR_TBL . ' usr, ' . C_REG_TBL . ' reg ' . 'WHERE usr.room = \'%OTHER%\' ' . 'UNION ' . 'SELECT usr.username, usr.latin1, usr.status, 0 ' . 'FROM ' . C_USR_TBL . ' usr ' . 'WHERE usr.username NOT IN (SELECT reg.username FROM ' . C_REG_TBL . ' reg) AND usr.room = \'%OTHER%\' ' . 'ORDER BY usr.username'; } else { $otherRoomsQuery = 'SELECT usr.username, usr.latin1, usr.status, 0 ' . 'FROM ' . C_USR_TBL . ' usr ' . 'WHERE usr.room = \'%OTHER%\' ' . 'ORDER BY usr.username'; } $othersRooms = array(); $otherRoomDb = new pmcDB; $otherRoomDb->query("SELECT DISTINCT room FROM " . C_MSG_TBL . " WHERE room != '$slashedCurrentRoomName' AND type = 1 ORDER BY room"); while (list($otherRoom) = $otherRoomDb->nextRecord()) $othersRooms[pmcHandleMagicQuotes($otherRoom, '', 1, 'del')] = ''; $otherRoomDb->cleanResults(); $filteredOtherRooms = array(); reset($othersRooms); while (list($roomName, $usersIn) = each($othersRooms)) { $usersDetails = array(); $slashedOther = pmcSlashSingleQuotes($roomName); $otherRoomDb->query(str_replace('%OTHER%', $slashedOther, $otherRoomsQuery)); while (list($otherUser, $latin1, $status, $gender) = $otherRoomDb->nextRecord()) { $usersDetails[] = array( pmcHandleMagicQuotes($otherUser, '', 1, 'del'), $latin1, $status, $gender ); } $otherRoomDb->cleanResults(); if (count($usersDetails) > 0) $filteredOtherRooms[$roomName] = $usersDetails; unset($usersDetails); } $otherRoomDb->close(); $othersRooms = $filteredOtherRooms; unset($roomName); unset($usersIn); unset($filteredOtherRooms); // 2. Format this list if (count($othersRooms) > 0) { $i = 0; $childCnt = array(); $joinUrl = $dbSessionVars['from'] . '?' . dbSessionSID('GET') . $pmcQueryArgSeparator . 'exitMode=2' . $pmcQueryArgSeparator . 'newTargetRoom=1%NEWROOM%'; reset($othersRooms); while (list($roomName, $usersIn) = each($othersRooms)) { $usersInCnt = count($usersIn); if ($usersInCnt > 0) { $i++; $id = md5($roomName); $childCnt[$id] = $usersInCnt; if ($i == 1) $firstOtherRoom = 'Parent' . $id; $usersList[] = '<div id="Parent' . $id . '" class="parent" style="margin-top: 5px; cursor: hand">'; $usersList[] = "\t" . '<a href="#" onclick="window.parent.pmcExpandRoom(\'' . $id . '\'); return false">' . '<img name="imEx" src="images/closed.gif" width="9" height="9" border="0" alt="' . L_EXPCOL . '\" /></a>' . ' ' . '<a href="' . str_replace('%NEWROOM%', urlencode($roomName), $joinUrl) . '" target="_parent">' . htmlspecialchars($roomName) . '</a>' . '<span class="small"><bdo dir="' . $textDirection . '"></bdo> ' . '(' . $usersInCnt . ')</span>'; $usersList[] = '</div>'; $usersList[] = '<div id="Child' . $id .'" class="child" style="margin-left: 12px">'; for (reset($usersIn); $userDetails = current($usersIn); next($usersIn)) { $otherUser = $userDetails[0]; $latin1 = $userDetails[1]; $status = $userDetails[2]; $gender = $userDetails[3]; // Put an icon when there is a profile for the user if ($gender == 0) $gender = 'undefined'; else if ($gender == 1) $gender = 'boy'; else if ($gender == 2) $gender = 'girl'; else $gender = 'none'; if ($status != 'u' && $status != 'k' && $status != 'd' && $status != 'b') $tmpStr = '<a href="#" onclick="window.parent.pmcRunCmd(\'WHOIS\', \''. pmcDoubleSlash(pmcSpecialChars($otherUser, $latin1)) . '\'); return false" class="user">' . '<img src="images/gender_' . $gender . '.gif" width="14" height="14" border="0" alt="' . L_PROFILE . '">' . '</a> '; else $tmpStr = '<img src="images/gender_none.gif" width="14" height="14" border="0" alt="' . L_NO_PROFILE . '"> '; $tmpStr .= '<a href="javascript:window.parent.pmcUserClick(\'' . pmcDoubleSlash(pmcSpecialChars($otherUser, $latin1)) . '\', false)" class="user">' . pmcFormatUsername($otherUser, $latin1, $status) . '</a><br />'; $usersList[] = "\t" . $tmpStr; } $usersList[] = '</div>'; $usersList[] = ''; } } unset($usersIn); $usersList[] = ''; } unset($othersRooms); /** * Build the list of empty default and public rooms * * The 'pmcSlashSingleQuotes()', the 'pmcHandleMagicQuotes()' and the * 'pmcSpecialChars()' fonctions are defined in the 'chat/lib/common.lib.php3' * library */ $joinUrl = $dbSessionVars['from'] . '?' . dbSessionSID('GET') . $pmcQueryArgSeparator . 'exitMode=2' . $pmcQueryArgSeparator . 'newTargetRoom=1%NEWROOM%'; for ($k = 0; $k < count($defaultChatRooms); $k++) { $tmpRoom = stripslashes($defaultChatRooms[$k]); $id = md5($tmpRoom); // Display this room name when it hadn't been displayed yet if (strcasecmp($tmpRoom, $dbSessionVars['targetRoom']) != 0 && (!isset($childCnt) || !isset($childCnt[$id]))) { if (!isset($firstOtherRoom)) $firstOtherRoom = 'Parent' . $id; $usersList[] = '<div id="Parent' . $id . '" class="parent" style="margin-top: 5px; cursor: hand">'; $usersList[] = "\t" . '<a href="' . str_replace('%NEWROOM%', urlencode($tmpRoom), $joinUrl) . '" target="_parent">' . htmlspecialchars($tmpRoom) . '</a>' . '<span class="small"><bdo dir="' . $textDirection . '"></bdo>' . ' (0)</span>'; $usersList[] = '</div>'; $usersList[] = ''; } } /** * Displays the frame */ // 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($textDirection); ?>"> <head> <title><?php echo(APP_NAME); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript1.2"> <!-- // Add styles for positioned layers; if (window.parent.jsIsVersion4) { document.write('<style type="text/css">'); if (window.parent.jsIsNS4) { document.write('.parent {position: absolute; visibility: visible}'); document.write('.child {position: absolute; visibility: visible}'); document.write('.regular {position: absolute; visibility: visible}') } else { document.write('.child {display: none}') } document.write('<\/style>'); } // Get the Y scrolling position of the users frame function pmcGetY() { window.parent.jsUsersY = (window.parent.jsIsNS4) ? window.pageYOffset : document.body.scrollTop; } // end of the 'pmcGetY()' function // Initialize the collapsible outline; onload = window.parent.pmcInitList; // --> </script> </head> <body class="frame" onunload="pmcGetY();"> <p> <?php reset($usersList); for ($i = 0; $i < count($usersList); $i++) { echo($usersList[$i] . "\n"); } ?> </p> <script type="text/javascript" language="javascript1.2"> <!-- window.parent.jsRoomsCnt = <?php echo(isset($childCnt) ? count($childCnt) : 0); ?>; window.parent.jsUsersFrame = window; window.parent.jsExitFrame = window.parent.frames['exit'].window; <?php if (isset($childCnt) && count($childCnt) > 0) { ?> // Set the table containing number of users per 'others' rooms window.parent.jsChildCnt = new Array; <?php while(list($key, $cnt) = each($childCnt)) { echo("\n"); echo('window.parent.jsChildCnt[\''. $key .'\'] = ' . $cnt . ';'); } unset($childCnt); } echo("\n"); ?> // Get the index of the first expandable/collapsible room under NS4+ if (window.parent.jsIsNS4) { <?php if (isset($firstOtherRoom)) { ?> jsFirstEl = '<?php echo($firstOtherRoom); ?>'; jsFirstInd = window.parent.pmcGetIndex(jsFirstEl); window.parent.pmcNsArrangeList(); <?php } else { ?> jsFirstInd = null; <?php } echo("\n"); ?> } // Scrolls to the position where the frame was before reloading if (window.parent.jsUsersY != null) { scrollTo(0, window.parent.jsUsersY); if (window.parent.jsIsIE4) scrollBy(0, window.parent.jsUsersY - document.body.scrollTop); } //--> </script> </body> </html> <?php ?> |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:17:44
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv6312/chat/lib
Added Files:
swearing.lib.php3 upgrades.lib.php3 welcome.lib.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
--- NEW FILE ---
<?
// 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);
}
?>
--- NEW FILE ---
<?php
//
// +--------------------------------------------------------------------------+
// | phpMyChat version 0.15.0 |
// +--------------------------------------------------------------------------+
// | Copyright (c) 2000-2001 The phpHeaven-team |
// +--------------------------------------------------------------------------+
// | This script is used to ensure compatibility with older releases of |
// | phpMyChat. |
// | |
// | It is called by most of the scripts from the phpMyChat package. |
// +--------------------------------------------------------------------------+
// | From the phpMyChat project: |
// | http://www.phpheaven.net/projects/phpMyChat/ |
// | |
// | Authors: the phpHeaven-team <php...@ya...> |
// +--------------------------------------------------------------------------+
//
// $Id: upgrades.lib.php3,v 1.1 2001/04/03 20:17:40 loic1 Exp $
//
// Ensure compatibility with older releases of phpMyChat.
//
/**
* Updates the names of the cookies
*/
// If cookies haven't already been updated, do the work
if (isset($CookieLang))
{
$oldCookies = array();
if (isset($CookieBeep))
$oldCookies['CookieBeep'] = $CookieBeep;
if (isset($CookieColor))
$oldCookies['CookieColor'] = $CookieColor;
if (isset($CookieLang))
$oldCookies['CookieLang'] = $CookieLang;
if (isset($CookieMsgOrder))
$oldCookies['CookieMsgOrder'] = $CookieMsgOrder;
if (isset($CookieNotify))
$oldCookies['CookieNotify'] = $CookieNotify;
if (isset($CookieRoom))
$oldCookies['CookieRoom'] = $CookieRoom;
if (isset($CookieRoomType))
$oldCookies['CookieRoomType'] = $CookieRoomType;
if (isset($CookieShowTimestamp))
$oldCookies['CookieShowTimestamp'] = $CookieShowTimestamp;
if (isset($CookieUsername))
$oldCookies['CookieUsername'] = $CookieUsername;
// Defines the new cookies (they will expire in one year) and kills the
// old ones
$newExpireTime = time() + (60 * 60 * 24 * 365);
$delExpireTime = time() - (60 * 60 * 24 * 365);
while (list($oldName, $value) = each($oldCookies))
{
$newName = str_replace('Cookie', 'cookie', $oldName);
setcookie($newName, $value, $newExpireTime);
setcookie($oldName, '', $delExpireTime);
$$newName = $value;
unset($$oldName);
}
unset($oldCookies);
} // end of 'cookies haven't been already been updated'
/**
* Udpates variables sent by the starting page of phpMyChat
*/
// If settings from an old release of phpMyChat seems to be used, do the work
if (isset($Form_Send))
{
$submitType = $Form_Send;
unset($Form_Send);
if (isset($L))
{
$lang = $L;
unset($L);
}
if (isset($Ver))
{
switch ($Ver)
{
case 'H':
$jsVersion = 'high';
break;
case 'M':
$jsVersion = 'medium';
break;
default:
$jsVersion = 'low';
}
unset($Ver);
}
if (isset($N) && empty($submitType))
{
$submitType = 'done';
}
if (isset($U))
{
$nick = $U;
unset($U);
}
if (isset($PASSWORD))
{
$password = $PASSWORD;
unset($PASSWORD);
}
if (isset($R0))
{
$enterDefaultRoomName = $R0;
unset($R0);
}
if (isset($R1))
{
$enterOtherRoomName = $R1;
unset($R1);
}
if (isset($T))
{
$roomType = $T;
unset($T);
}
if (isset($R2))
{
$createRoomName = $R2;
unset($R2);
}
} // end of the case where an old release seems to send settings
?>
--- NEW FILE ---
<?php
//
// +--------------------------------------------------------------------------+
// | phpMyChat version 0.15.0 |
// +--------------------------------------------------------------------------+
// | Copyright (c) 2000-2001 The phpHeaven-team |
// +--------------------------------------------------------------------------+
// | This script defines the welcome message to be used when the 'C_WELCOME' |
// | directive is set to 1 inside the 'chat/config/config.lib.php3' file. |
// | |
// | It is called by the 'chat/messages_low.php3' and 'chat/loader.php3' |
// | scripts. |
// +--------------------------------------------------------------------------+
// | From the phpMyChat project: |
// | http://www.phpheaven.net/projects/phpMyChat/ |
// | |
// | Authors: the phpHeaven-team <php...@ya...> |
// +--------------------------------------------------------------------------+
//
// $Id: welcome.lib.php3,v 1.1 2001/04/03 20:17:40 loic1 Exp $
//
// Defines the welcome message.
//
switch ($dbSessionVars['lang'])
{
case 'french': // For french users
define('WELCOME_MSG', 'Bienvenu(e) sur notre chat. N\'oubliez pas les <i>règles de politesse élémentaire</i> au cours de vos discussions.');
break;
case 'english': // For english users
define('WELCOME_MSG', 'Welcome to our chat. Please obey the net etiquette while chatting: <i>try to be pleasant and polite</i>.');
break;
default: // When there is no translation for the language of the user
define('WELCOME_MSG', 'Welcome to our chat. Please obey the net etiquette while chatting: <i>try to be pleasant and polite</i>.');
}
?>
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:17:44
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv6312/chat/lib/index_libs Added Files: start_page.lib.js users.lib.js Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | Set of JavaScript functions used by the starting form of the chat. | // | | // | This library is called by the 'chat/lib/index_libs/main_index.lib.php3' | // | script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: start_page.lib.js,v 1.1 2001/04/03 20:17:40 loic1 Exp $ // // Set of JavaScript functions used by the starting form of the chat. // /** * Updates the "jsVersion" field in the form below according to the JavaScript * abilities of the browser * * @access public */ function pmcDefineVerField() { // js1.1 but not 1.2 enabled browser if (typeof(document.images) != 'undefined' && jsWhichVersion == 'low') { document.forms['startingForm'].elements['jsVersion'].value = 'medium'; } // other cases else { document.forms['startingForm'].elements['jsVersion'].value = jsWhichVersion; } } // end of the 'pmcDefineVerField()' function /** * Launches the tutorial * * @access public */ function pmcTutorialPopup() { var tutorialUrl = jsChatPath + 'tutorial_popup.' + jsPhpExt + '?' + 'lang=' + jsLang + jsUrlArgSeparator + 'jsVersion=' + jsWhichVersion; // Launches the tutorial window only if it doesn't already exists if (!jsTutorialWin) { if (jsIsJs11) window.focus(); jsTutorialWin = window.open(tutorialUrl, 'tutorial_popup', 'resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,status=yes'); } if (jsIsJs11) jsTutorialWin.focus(); } // end of the 'pmcTutorialPopup()' function /** * Launches the users popup according to the DHTML capacities of the browser * * @param dummy used to ensure the popup name is unique * * @access public */ function pmcUsersPopup(dummy) { var whichFile = (jsWhichVersion == 'low') ? '_low' : ''; var usersUrl = jsChatPath + 'users_popup' + whichFile + '.' + jsPhpExt + '?' + 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 /** * Launches the popups for the registration stuffes * * @param name the name of the script to launch * * @access public */ function pmcRegPopups(name) { var regUrl = jsChatPath + name + '.' + jsPhpExt + '?' + jsDbSessionSID; var popWidth = (name != 'admin') ? 350 : 510; var popHeight = (name != 'profile_del') ? 470 : 190; var popParams = 'width=' + popWidth + ',height=' + popHeight + ',resizable=yes,scrollbars=yes'; if (jsIsJs11) window.focus(); jsRegPopupWin = window.open(regUrl, name + '_popup', popParams); if (jsIsJs11) jsRegPopupWin.focus(); } // end of the 'pmcRegPopups()' function /** * Allows to ensure an unique choice among rooms * * @param choiceType type of the room that has been selected * * @access public */ function pmcResetRoomBox(choiceType) { var resetR0 = document.forms['startingForm'].elements['enterDefaultRoomName'].options[0]; var resetR1 = document.forms['startingForm'].elements['enterOtherRoomName'].options[0]; var resetT = document.forms['startingForm'].elements['roomType'].options[0]; var resetR2 = document.forms['startingForm'].elements['createRoomName']; // A default public chat room has been selected if (choiceType == 'default') { resetR1.selected = true; resetT.selected = true; resetR2.value = ''; } // An 'other' public chat room has been selected else if (choiceType == 'otherPub') { resetR0.selected = true; resetT.selected = true; resetR2.value = ''; } else { resetR0.selected = true; resetR1.selected = true; } } // end of the 'pmcResetRoomBox()' function /** * Validates briefly the starting form * * @param doCheckPaswd whether to ensure there is a password or not * * @access public */ function pmcIndexValidate(doCheckPswd) { // The replace function (js1.2) isn't supported -> no js tests are done if (typeof(document.forms['startingForm'].elements['nick'].value.replace) == 'undefined') return true; var nickField = document.forms['startingForm'].elements['nick']; var pswdField = document.forms['startingForm'].elements['password']; var roomToCreate = document.forms['startingForm'].elements['createRoomName']; var reNick = /\\|,| /; var reRoom = /\\|,/; // Brief nick validation if (nickField.value.replace(/ /g, '') == '') // nick is empty { nickField.value = ''; nickField.focus(); alert(jsErrorNick1); return false; } else if (reNick.test(nickField.value)) // invalid characters in { // the nick nickField.focus(); alert(jsErrorNick2); return false; } // Brief password validation if (doCheckPswd && pswdField.value.replace(/ /g, '') == '') // registration is required { // but password is empty pswdField.value = ''; pswdField.focus(); alert(jsErrorPswd1); return false; } // Ensure there is a password if the user wants to create room if (roomToCreate.value != '' && pswdField.value.replace(/ /g, '') == '') { pswdField.focus(); alert(jsErrorPswd2); return false; } // Brief room name validation if (roomToCreate != '') { if (roomToCreate.value.replace(/ /g, '') == '') // only space chars { roomToCreate.value = ''; } else if (reRoom.test(roomToCreate.value)) // invalid characters in { // the name of the room to roomToCreate.focus(); // create alert(jsErrorRoom); return false; } } // All the tests have been succesfully passed -> submit the from return true; } // end of the function 'pmcIndexValidate()' --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | Set of JavaScript functions used to handle the the collapsible list of | // | rooms at the users frame with IE & NS 4+ browsers (DHTML stuff). | // | | // | This library is called by the 'chat/lib/index_libs/main_index.lib.php3' | // | script. | // | | // | It is is based on the 'Expandable Outlines' script from WebReference | // | (http://webreference.com/). | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: users.lib.js,v 1.1 2001/04/03 20:17:40 loic1 Exp $ // // Handle the expandable/collapsible list of rooms at the users frame. // var jsUsersFrame = null; var jsExitFrame = null; var jsUsersY = false; var jsIsExpanded = false; var jsOpenedRooms = new Array; var jsRoomsCnt = 0; var jsOpenedRoomsCnt = 0; var jsChildCnt = new Array; var jsImgBigOpened = new Image(13,13); jsImgBigOpened.src = jsChatPath + 'images/open_big.gif'; var jsImgBigClosed = new Image(13,13); jsImgBigClosed.src = jsChatPath + 'images/closed_big.gif'; var jsImgOpened = new Image(9,9); jsImgOpened.src = jsChatPath + 'images/open.gif'; var jsImgClosed = new Image(9,9); jsImgClosed.src = jsChatPath + 'images/closed.gif'; /** * Resets the table containing the state (opened/closed) of each room */ function pmcResetRoomTable() { for (test in jsOpenedRooms) { jsOpenedRooms[test] = (jsOpenedRooms[test] == 1) ? '+' : '-'; } } // end of the 'pmcResetRoomTable()' function /** * Checks the state (opened/closed) of a room * * @param room the room name to be checked */ function pmcCheckRoomState(room) { if (jsOpenedRooms[room]) { jsOpenedRooms[room] = (jsOpenedRooms[room] == '+') ? 1 : -1; return jsOpenedRooms[room]; } else return 0; } // end of the 'pmcCheckRoomState()' function /** * Cleans the table containing all rooms names from those that are no longer * in use */ function pmcCleanRoom() { var temp = new Array(); for (test in jsOpenedRooms) { if (jsOpenedRooms[test] == 1 || jsOpenedRooms[test] == -1) temp[test] = jsOpenedRooms[test]; } jsOpenedRooms = temp; temp = null; } // end of the 'pmcCleanRoom()' function /** * Sets the new state of a room in the rooms array * * @param room the name of the room which state has changed * @param action wether to set this new status to opened or closed */ function pmcModifyRoomState(room, action) { jsOpenedRooms[room] = (action == 'add') ? 1 : -1; } // end of the 'pmcModifyRoomState()' function /** * Gets the id of the first collapsible room * * @param el name of the first collapsible room */ function pmcGetIndex(el) { var ind = null; for (var i = 0; i < jsUsersFrame.document.layers.length; i++) { var whichEl = jsUsersFrame.document.layers[i]; if (whichEl.id == el) { ind = i; break; } } return ind; } // end of the 'pmcGetIndex()' function /** * Positions layers under NS4+ */ function pmcNsArrangeList() { if (jsUsersFrame.jsFirstInd != null) { var nextY = jsUsersFrame.document.layers[jsUsersFrame.jsFirstInd].pageY + jsUsersFrame.document.layers[jsUsersFrame.jsFirstInd].document.height; for (var i = jsUsersFrame.jsFirstInd + 1; i < jsUsersFrame.document.layers.length; i++) { var whichEl = jsUsersFrame.document.layers[i]; if (whichEl.visibility != 'hide') { whichEl.pageY = nextY; nextY += whichEl.document.height; } } } } // end of the 'pmcNsArrangeList()' function /** * Defines the state of the big +/- icon */ function pmcSetBigIcon() { if (jsRoomsCnt == 0) return; var bigImg = (jsIsNS4) ? jsExitFrame.document.images['imgExpandAll'] : jsExitFrame.document.images.item('imgExpandAll'); if (jsOpenedRoomsCnt == jsRoomsCnt) { jsIsExpanded = true; bigImg.src = jsImgBigOpened.src; } else if (jsIsExpanded) { jsIsExpanded = false; bigImg.src = jsImgBigClosed.src; } } // end of the 'pmcSetBigIcon()' function /** * Collapses/expands rooms (depends on the state of the room before the page * reloads) each time the web page is loaded */ function pmcInitList() { if (!jsIsVersion4) return; pmcResetRoomTable(); var parentElts = new Array(); jsOpenedRoomsCnt = 0; if (jsIsNS4) { for (var i = 0; i < jsUsersFrame.document.layers.length; i++) { var whichEl = jsUsersFrame.document.layers[i]; if (whichEl.id.indexOf('Parent') != -1) var parentEl = whichEl; if (whichEl.id.indexOf('Child') != -1) { var currentId = whichEl.id.substring(5); var roomState = pmcCheckRoomState(whichEl.id); if (roomState == 1 || (roomState == 0 && jsChildCnt[currentId] < 10)) { jsOpenedRoomsCnt++; whichEl.visibility = 'show'; if (!parentElts[parentEl.id]) { parentElts[parentEl.id] = 1; parentEl.document.images['imEx'].src = jsImgOpened.src; } } else { whichEl.visibility = 'hide'; } } } pmcNsArrangeList(); } // end of the NS4 case else { divColl = jsUsersFrame.document.all.tags('div'); for (var i = 0; i < divColl.length; i++) { var whichEl = divColl(i); if (whichEl.className == 'parent') var parentEl = whichEl; if (whichEl.className == 'child') { var currentId = whichEl.id.substring(5); var roomState = pmcCheckRoomState(whichEl.id); if (roomState == 1 || (roomState == 0 && jsChildCnt[currentId] < 10)) { jsOpenedRoomsCnt++; whichEl.style.display = 'block'; if (!parentElts[parentEl.id]) { parentElts[parentEl.id] = 1; parentEl.all.tags('IMG').item('imEx').src = jsImgOpened.src; } } else { whichEl.style.display = 'none'; } } } } // end of the IE4 case parentElts = null; jsChildCnt = null; pmcCleanRoom(); pmcSetBigIcon(); } // end of the 'pmcInitList()' function /** * Collapses/expands a room when the user require this to be done and store * the new state of the room * * @param el name of the room to act on */ function pmcExpandRoom(el) { if (!jsIsVersion4) return; if (jsIsIE4) { var whichEl = jsUsersFrame.document.all('Child' + el); var whichIm = jsUsersFrame.event.srcElement; if (whichEl.style.display == 'none') { jsOpenedRoomsCnt++; whichEl.style.display = 'block'; whichIm.src = jsImgOpened.src; pmcModifyRoomState(whichEl.id, 'add'); } else { jsOpenedRoomsCnt--; whichEl.style.display = 'none'; whichIm.src = jsImgClosed.src; pmcModifyRoomState(whichEl.id, 'del'); } } // end of the IE4 case else { var whichEl = jsUsersFrame.document.layers['Child' + el]; var whichIm = jsUsersFrame.document.layers['Parent' + el].document.images['imEx']; if (whichEl.visibility == 'hide') { jsOpenedRoomsCnt++; whichEl.visibility = 'show'; whichIm.src = jsImgOpened.src; pmcModifyRoomState(whichEl.id, 'add'); } else { jsOpenedRoomsCnt--; whichEl.visibility = 'hide'; whichIm.src = jsImgClosed.src; pmcModifyRoomState(whichEl.id, 'del'); } pmcNsArrangeList(); } // end of the NS4 case pmcSetBigIcon(); var msgBox = pmcGetInputForm('msgText') // the 'pmcGetInputForm()' function if (msgBox) // is defined inside the script msgBox.focus(); // 'chat/lib/index_libs/misc.lib.js' } // end of the 'pmcExpandRoom()' function /** * Collapses/expands all rooms when the user require this to be done and store * the new state of these rooms */ function pmcExpandAll() { if (!jsIsVersion4) return; var newBigSrc = (jsIsExpanded) ? jsImgBigClosed.src : jsImgBigOpened.src; var newSrc = (jsIsExpanded) ? jsImgClosed.src : jsImgOpened.src; var what = (jsIsExpanded) ? 'del' : 'add'; jsOpenedRoomsCnt = (jsIsExpanded) ? 0 : jsRoomsCnt; if (jsIsNS4) { jsExitFrame.document.images['imgExpandAll'].src = newBigSrc; if (jsUsersFrame.jsFirstInd != null) { if (jsUsersFrame.document.layers.length) { for (var i = jsUsersFrame.jsFirstInd; i < jsUsersFrame.document.layers.length; i++) { var whichEl = jsUsersFrame.document.layers[i]; if (whichEl.id.indexOf('Parent') != -1) whichEl.document.images['imEx'].src = newSrc; if (whichEl.id.indexOf('Child') != -1) { whichEl.visibility = (jsIsExpanded) ? 'hide' : 'show'; pmcModifyRoomState(whichEl.id, what); } } } pmcNsArrangeList(); if (jsIsExpanded) jsUsersFrame.scrollTo(0, jsUsersFrame.document.layers[jsUsersFrame.jsFirstInd].pageY); } } // end of the NS4 case else { var divColl = jsUsersFrame.document.all.tags('div'); for (var i = 0; i < divColl.length; i++) { if (divColl(i).className == 'child') { divColl(i).style.display = (jsIsExpanded) ? 'none' : 'block'; pmcModifyRoomState(divColl(i).id, what); } } jsExitFrame.document.images.item('imgExpandAll').src = newBigSrc; var imColl = jsUsersFrame.document.images.item('imEx'); if (imColl) { for (var i = 0; i < imColl.length; i++) { imColl(i).src = newSrc; } if (!imColl.length) jsUsersFrame.document.imEx.src = newSrc; } } // end of the IE4 case jsIsExpanded = (!jsIsExpanded); var msgBox = pmcGetInputForm('msgText') // the 'pmcGetInputForm()' function if (msgBox) // is defined inside the script msgBox.focus(); // 'chat/lib/index_libs/misc.lib.js' } // end of the 'pmcExpandAll()' function |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:17:43
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization In directory usw-pr-cvs1:/tmp/cvs-serv6312/chat/localization Added Files: sort_languages.lib.php3 tutorial.lib.php3 Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library sorts an array by keys in reverse order. It is used for | // | releases of PHP older than 3.0.15. | // | | // | This file is called by the 'chat/localization/languages.lib.php3', | // | the 'chat/localization/admin.lib.php3' and the | // | 'chat/localization/tutorial.lib.php3' scripts. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: sort_languages.lib.php3,v 1.1 2001/04/03 20:17:39 loic1 Exp $ // // Library that sorts an array by keys in reverse order. // /** * Compares values of keys and sorts them * * @param array the array to be sorted * @param mixed a required parameter * * @return the sorted array * * @access private */ function pmcKeyComp(&$a, $b) { return - (strcmp($a,$b)); } // end of the 'pmcKeyComp()' function /** * emulates the krsort() function of PHP 3.0.16+ * * @param $toSort the array to be sorted * * @access public */ function krsort(&$toSort) { uksort($toSort, 'pmcKeyComp'); } // end of the 'krsort()' function ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library defines the language that will be used for the tutorial. | // | If there is no language already defined (neither in a cookie, neither | // | from a variable sent in the query part of the url) it will try to get | // | the most probable language the user would like to use thanks to some | // | environment variables. | // | | // | This file is called by the 'chat/tutorial_popup.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: tutorial.lib.php3,v 1.1 2001/04/03 20:17:39 loic1 Exp $ // // Defines the language to be used for the tutorial. // /** * Analyzes some PHP environment variables to find the most probable language * that should be used * * @param string string to analyze * @param integer type of the PHP environment variable which value is $str * * @global array the list of available translations * @global string the translation to use * * @access private */ function pmcTutorialDetect($str = '', $envType = '') { global $availableTutorials; global $lang; $notFound = true; reset($availableTutorials); while ($notFound && list($key, $name) = each($availableTutorials)) { // $envType = 1 for the 'HTTP_ACCEPT_LANGUAGE' environment variable, // 2 for the 'HTTP_USER_AGENT' one if ( ($envType == 1 && eregi('^' . $key . '$', $str)) || ($envType == 2 && eregi('(\(|\[|;[[:space:]])' . $key . '(;|\]|\))', $str))) { $lang = $availableTutorials[$key]; $notFound = false; } } } // end of the 'pmcTutorialDetect()' function /** * Creates the array containing available languages */ // Defines available languages $availableTutorials = array(); $languageDirectories = dir('./localization/'); while ($name = $languageDirectories->read()) { if (is_dir('./localization/' . $name) && file_exists('./localization/' . $name . '/localized.tutorial.' . C_EXTENSION)) { list($key) = file('./localization/' . $name . '/regex.txt'); $availableTutorials[$key] = $name; } } $languageDirectories->close(); // Sorts the $availableTutorials array in a convenient order if (!function_exists('krsort')) include('./localization/sort_languages.lib.' . C_EXTENSION); krsort($availableTutorials); /** * Get some predefined variables */ if (isset($HTTP_COOKIE_VARS['cookieLang'])) $cookieLang = $HTTP_COOKIE_VARS['cookieLang']; pmcGrabGlobals('HTTP_ACCEPT_LANGUAGE'); pmcGrabGlobals('HTTP_USER_AGENT'); /** * Finds the appropriate language file */ // If a language is defined in a cookie, ensures the translation exists if (isset($cookieLang) && file_exists('./localization/' . $cookieLang . '/localized.tutorial.' . C_EXTENSION)) { $lang = $cookieLang; } // Checks for an existing translation corresponding to the // 'HTTP_ACCEPT_LANGUAGE' variable sent by the browser else if (getenv('HTTP_ACCEPT_LANGUAGE') != '') { $accepted = explode(',', getenv('HTTP_ACCEPT_LANGUAGE')); pmcTutorialDetect($accepted[0], 1); } // Checks for an existing translation corresponding to the // 'HTTP_USER_AGENT' variable sent by the browser else if (getenv('HTTP_USER_AGENT') != '') { pmcTutorialDetect(getenv('HTTP_USER_AGENT'), 2); } // If no translation has been retained, uses the default one if (empty($lang)) { $lang = 'english'; $noTranslation = '<center><p class="redText">Sorry but the tutorial hasn\'t been translated to your language at this time.</p></center>'; } // Clears the table unset($availableTutorials); ?> |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:15:43
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv5636/chat/lib
Added Files:
smilies.lib.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
--- NEW FILE ---
<?
/* ------------------------------------------------------------------
This library allows to transform text codes to graphical smilies.
It is called by 'chat/input.php3'.
------------------------------------------------------------------ */
// The table below define smilies code and associated gif names, width and height.
// You can add your own collection of smilies inside but be aware that codes may
// need to be slashed in some way because they are used as POSIX 1003.2 regular
// expressions (see the Check4Smilies function below). Moreover these codes are
// case sensitives.
$smilies = Array(
':\)' => array('smile1.gif', 15, 15),
':D' => array('smile2.gif', 15, 15),
':o' => array('smile3.gif', 15, 15),
':\(' => array('smile4.gif', 15, 15),
';\)' => array('smile5.gif', 15, 15),
':p' => array('smile6.gif', 15, 15),
'8\)' => array('smile7.gif', 15, 15),
':\[' => array('smile8.gif', 15, 15),
':kill:' => array('smile9.gif', 50, 15)
);
$maxWidth = 50; // Set the maximum width among similes
$maxHeight = 15; // Set the maximum height among similes
// ---- DO NOT MODIFY BELOW ----
// Slashes ' and " characters
function specialSlash(&$str)
{
return str_replace('"','"',str_replace('\'','\\\'',$str));
}
// Replace smilies code by gif URLs in messages
function checkForSmilies(&$string, &$table)
{
$tmp = split('<a href|</a>', ' ' . $string . ' ');
$i = 0;
for (reset($tmp); $substring = current($tmp); next($tmp))
{
// $substring is one of the trailing spaces added above -> do nothing
if($substring == ' ')
{
}
// $substring is not an HTTP link -> do the work for smilies
else if (($i % 2) == 0)
{
while (list($key, $prop) = each($table))
{
$substring = ereg_replace($key, ' <img src="images/smilies/' . $prop[0] . '" width="' . $prop[1] . '" height="' . $prop[2] . '" alt="' . str_replace('"', '"', stripslashes($key)) . '" /> ', $substring);
};
$tmp[$i] = $substring;
}
// $substring is an HTTP link -> just restore HTML tags for links
else
{
$tmp[$i] = '<a href' . $substring . '</a>';
}
$i++;
};
$string = trim(join('', $tmp));
unset($tmp);
}
// Display smilies in the help popup and in the tutorials
function displaySmilies(&$toDisplay, &$table, &$tableSize, $target)
{
global $maxWidth, $maxHeight;
$i = 0;
$str1 = '';
$str2 = '';
$perLines = floor(600 / $maxWidth);
while(list($key, $prop) = each($table))
{
$i++;
if ($target == 'help')
$str1 .= "\t\t" . '<td align="center" width="'. $maxWidth . '" height="' . $maxHeight . '"><a href="#" onclick="smiley2Input(\'' . specialSlash($key) . '\'); return false;"><img src="images/smilies/' . $prop[0] . '" width="' . $prop[1] . '" height="' . $prop[2] .'" border="0" alt="' . str_replace('"', '"', stripslashes($key)) . '" /></a></td>' . "\n";
else
$str1 .= "\t\t" . '<td align="center" width="'. $maxWidth . '" height="' . $maxHeight . '"><img src="images/smilies/' . $prop[0] . '" width="' . $prop[1] . '" height="' . $prop[2] .'" border="0" alt="' . str_replace('"', '"', stripslashes($key)) . '" /></td>' . "\n";
$str2 .= "\t\t" . '<td align="center" nowrap="nowrap">' . stripslashes($key) . '</td>' . "\n";
if (is_integer($i / $perLines) || $i == $tableSize)
{
$toDisplay[] = $str1;
$toDisplay[] = $str2;
$str1 = '';
$str2 = '';
};
};
};
?>
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:15:43
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv5636/chat/lib/index_libs Added Files: server_time.lib.js set_msg_color.lib.js Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | Set of functions used to display and to remove the server time at the | // | status bar. | // | | // | This library is called by the 'chat/lib/index_libs/main_index.lib.php3' | // | script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: server_time.lib.js,v 1.1 2001/04/03 20:15:39 loic1 Exp $ // // Display the server time at the status bar. // /** * Displays the server time at the status bar * * @access public */ function pmcClock() { var curDate = new Date(); var calcDate = new Date(curDate - jsClockGap); var calcHours = calcDate.getHours(); var calcMinuts = calcDate.getMinutes(); var calcSeconds = calcDate.getSeconds(); if (calcHours < 10) calcHours = '0' + calcHours; if (calcMinuts < 10) calcMinuts = '0' + calcMinuts; if (calcSeconds < 10) calcSeconds = '0' + calcSeconds; var calcTime = calcHours + ':' + calcMinuts + ':' + calcSeconds; window.status = jsServerTimeString + calcTime; jsClockDisplay = setTimeout('pmcClock()', 1000); } // end of the function 'pmcClock()' /** * Removes the server time from the status bar * * @access public */ function pmcStopClock() { clearTimeout(jsClockDisplay); window.status = ''; } // end of the function 'pmcStopClock()' /** * Calculates the gap between the server and the the local time * * @param string the current server date * @return integer the signed gap * * @access public */ function pmcCalcGap(servDate) { var serverDate = new Date(servDate); var localDate = new Date(); return localDate - serverDate; } // end of the function 'pmcCalcGap()' --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | Modifies the color picker at the 'input' frame according to the value of | // | the color to be used for messages. | // | | // | This library is called by the 'chat/lib/index_libs/main_index.lib.php3' | // | script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: set_msg_color.lib.js,v 1.1 2001/04/03 20:15:39 loic1 Exp $ // // Handles the color picker. // var jsImgColor1 = new Image(4,20); jsImgColor1.src = jsChatPath + 'images/unsel_color.gif'; var jsImgColor2 = new Image(4,20); jsImgColor2.src = jsChatPath + 'images/sel_color.gif'; var jsSelectedColor = null; /** * Modifies the color picker * * @param string hex value of the selected color * @param string rank of the color inside the color picker * * @access public */ function pmcChangeColor(colorVal, colorRank) { if (jsSelectedColor != colorRank) { var inputDoc = window.frames['input'].window.document; if (typeof(document.all) != 'undefined') { var obj1 = inputDoc.all[jsSelectedColor]; var obj2 = inputDoc.all[colorRank]; } else if (typeof(document.images) != 'undefined') { var obj1 = inputDoc.images[jsSelectedColor]; var obj2 = inputDoc.images[colorRank]; } else return; if (jsSelectedColor != null) { obj1.src = jsImgColor1.src; } jsSelectedColor = colorRank; inputDoc.forms['inputForm'].elements['color'].value = colorVal; obj2.src = jsImgColor2.src; } inputDoc.forms['inputForm'].elements['message'].focus(); } // end of the function 'pmcChangeColor()' |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/lib/index_libs
Added Files:
main_index.lib.php3 misc.lib.js
Log Message:
The first dev. version that works! Still many things to do, of course...
--- NEW FILE ---
<?php
//
// +--------------------------------------------------------------------------+
// | phpMyChat version 0.15.0 |
// +--------------------------------------------------------------------------+
// | Copyright (c) 2000-2001 The phpHeaven-team |
// +--------------------------------------------------------------------------+
// | This library is called by the starting script of phpMyChat (usually an |
// | 'index.php3' nammed script) to: |
// | - displays the start screen of phpMyChat; |
// | - validates the settings the user typed in to enter the chat; |
// | - then defines and launch the phpMyChat frameset. |
// | |
// | It is splitted in three parts: |
// | I. the common work at the beginning; |
// | II. all what have to be done once the user has submit the form; |
// | III. and two functions ('pmcStartpageHeaders()' and |
// | 'pmcStartpageLayout()') that defines the HTML code for the |
// | start page. |
// +--------------------------------------------------------------------------+
// | From the phpMyChat project: |
// | http://www.phpheaven.net/projects/phpMyChat/ |
// | |
// | Authors: the phpHeaven-team <php...@ya...> |
// +--------------------------------------------------------------------------+
//
// $Id: main_index.lib.php3,v 1.1 2001/04/03 20:14:52 loic1 Exp $
//
// Main library used to enter the chat.
//
// --------------------------- PART I : Common work ---------------------------
/**
* Gets the extension for the php scripts
*/
if (!isset($PHP_SELF))
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
if (!defined('C_EXTENSION'))
define('C_EXTENSION', (substr($PHP_SELF, -1) == 3) ? 'php3' : 'php');
/**
* Gets some core libraries
*/
require('./' . _CHAT_PATH . 'config/config.lib.' . C_EXTENSION);
require('./' . _CHAT_PATH . 'lib/common.lib.' . C_EXTENSION);
require('./' . _CHAT_PATH . 'lib/database/' . C_DB_TYPE . '.lib.' . C_EXTENSION);
require('./' . _CHAT_PATH . 'lib/clean.lib.' . C_EXTENSION);
/**
* Gets the names and values for variables sent or posted to this script and
* for cookies
*
* Uses the 'pmcGrabGlobals()' and 'pmcHandleMagicQuotes()' functions defined
* in the 'chat/lib/common.lib.php3' library.
*/
$toGrab = array('%GET', '%POST', '%COOKIE');
pmcGrabGlobals($toGrab);
// Ensures compatibilty with old releases
require('./'. _CHAT_PATH . 'lib/upgrades.lib.' . C_EXTENSION);
// Unslashes values of variables sent to this script
if (!empty($newTargetRoom))
$newTargetRoom = pmcHandleMagicQuotes($newTargetRoom, '1', '', 'del');
if (!empty($nick))
$nick = pmcHandleMagicQuotes($nick, '1', '', 'del');
if (!empty($password))
$password = pmcHandleMagicQuotes($password, '1', '', 'del');
if (!empty($enterDefaultRoomName))
$enterDefaultRoomName = pmcHandleMagicQuotes($enterDefaultRoomName, '1', '', 'del');
if (!empty($enterOtherRoomName))
$enterOtherRoomName = pmcHandleMagicQuotes($enterOtherRoomName, '1', '', 'del');
if (!empty($createRoomName))
$createRoomName = pmcHandleMagicQuotes($createRoomName, '1', '', 'del');
if (!empty($exitFrom))
$exitFrom = pmcHandleMagicQuotes($exitFrom, '1', '', 'del');
if (!empty($cookieUsername))
$cookieUsername = pmcHandleMagicQuotes($cookieUsername, '1', '', 'del');
if (!empty($cookieRoom))
$cookieRoom = pmcHandleMagicQuotes($cookieRoom, '1', '', 'del');
/**
* Start the session handler
*/
require('./' . _CHAT_PATH . '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_SESS_DEL * 60,
''
);
dbSessionstart();
/**
* Defines the language to be used
*/
if (!empty($lang)
&& file_exists('./' . _CHAT_PATH . 'localization/' . $lang . '/localized.chat.' . C_EXTENSION))
{
$dbSessionVars['lang'] = $lang;
unset($lang);
}
require('./' . _CHAT_PATH . 'localization/languages.lib.' . C_EXTENSION);
require('./' . _CHAT_PATH . '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, true);
/**
* Defines some variables
*
* The 'pmcSlashSingleQuotes()' fonction is defined in the
* 'chat/lib/common.lib.php3' library
*/
$error = '';
// Get the relative path to the script that called this one
$action = basename($PHP_SELF);
$dbSessionVars['from'] = urlencode(ereg_replace('[^/]+/', '../', _CHAT_PATH) . $action);
// Sets the $isFontMsg to true when the user logs in for the first time and a
// specific font face have to be used (iso-code is 'x-user-defined')
$isFontMsg = (empty($nick) && defined('L_FONT_NAME'));
$latin1 = (L_CHARSET == 'iso-8859-1');
// Defines the message to be displayed if this script is called after an user
// has been kicked
if (dbSessionIsRegistered('kicked')) // $kicked is among session data
{
switch ($dbSessionVars['kicked'])
{
case 1:
// The user was logged into two rooms at the same time
$error = L_ERR_USR_19;
break;
case 2:
// The administrator has cleaned the room
$error = L_REG_39;
break;
case 3:
// Simple kick
$error = L_REG_18;
break;
case 4:
// The user has been banished from the room he was chatting inside
$error = L_ERR_USR_20;
default:
// void()
}
}
// Try to get the nickname from session data, then slashes it
if (empty($nick) && dbSessionIsRegistered('nick'))
$nick = $dbSessionVars['nick'];
if (isset($nick))
$slashedNick = pmcSlashSingleQuotes($nick);
// Unset some variables that may be the cause of security holes
if ($dbSessionIsNew)
{
if (isset($exitMode))
unset($exitMode);
if (isset($newTargetRoom))
unset($newTargetRoom);
if (isset($reloading))
unset($reloading);
}
// Instantiates a new pmcDB object
$dbLink = new pmcDB;
/**
* Removes user from the 'users' table if he left a room and, if required
* ($exitMode value is 2), sends a notification of exit to the 'messages'
* table
*
* The 'pmcSlashSingleQuotes()' and 'pmcSpecialChars()' functions are defined
* inside the 'chat/lib/common.lib.php3' library
*/
// Check for abnormal termination of a chat session
if (!isset($exitMode))
{
$dbLink->query("SELECT COUNT(*) FROM " . C_USR_TBL . " WHERE session_id = '$dbSessionId'");
list($exitMode) = $dbLink->nextRecord();
$dbLink->cleanResults();
}
// Do remove user
if ($exitMode)
{
$nickForNotifications = pmcSlashSingleQuotes(pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1)));
$exitedRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']);
$dbLink->query("DELETE FROM " . C_USR_TBL . " WHERE session_id = '$dbSessionId' AND room = '$exitedRoomName'");
// Put exit notification if necessary
if ($exitMode == 2 && $dbLink->affectedRows() > 0)
{
$exitedRoomType = $dbSessionVars['roomType'];
$dbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ($exitedRoomType, '$exitedRoomName', 'SYS exit', '', " . time() . ", NULL, '#666699', 'sprintf(L_EXIT_ROM, \'$nickForNotifications\')', 'sprintf(L_EXIT_ROM, \'$nickForNotifications\')')");
unset($exitedRoomType);
}
// Defines the room to enter settings if required
if (isset($newTargetRoom))
{
$roomType = substr($newTargetRoom, 0, 1);
$targetRoom = substr($newTargetRoom, 1);
unset($newTargetRoom);
$reloading = 'joinCmd';
$jsVersion = $dbSessionVars['jsVersion'];
}
}
// -------------- PART II : Work to do if the form was submitted --------------
if (!empty($reloading) || !empty($submitType))
{
/**
* Initializes misc. variables
*/
if (!isset($password))
$password = '';
if (dbSessionIsRegistered('pwdHash'))
$pwdHash = $dbSessionVars['pwdHash'];
if (!isset($pwdHash))
$pwdHash = '';
$isRegUser = false;
$regUserPerms = 'user';
$regUserModeratedRooms = '';
$wasInRoom = '';
// If no room has been specified, defines the first room among the default
// public ones as the room to enter in
if (isset($submitType) &&
(C_VERSION == 0 || (empty($enterDefaultRoomName) && empty($enterOtherRoomName) && empty($createRoomName))))
$enterDefaultRoomName = $defaultChatRooms[0];
/**
* Gets some more libraries that will be used to validate the settings
* submitted
*/
if (C_BAD_WORDS == 1)
include('./' . _CHAT_PATH . 'lib/swearing.lib.' . C_EXTENSION);
include('./' . _CHAT_PATH . 'lib/index_libs/index_validation.lib.' . C_EXTENSION);
/**
* Optimize some of the tables
*/
$dbLink->optimize(C_MSG_TBL);
$dbLink->optimize(C_USR_TBL);
$dbLink->optimize(C_SESS_TBL);
/**
* Ensures the nick is a valid one and, if it's a registered nick, ensures
* also the convenient password has been submitted.
*
* This part of the script is skipped if the frameset is reloaded because
* of the NS4+ resize bug, because the user has run the '/join' command or
* because he has clicked on a room name at the 'users' frame.
* In these cases, the nick and the password have already been validated.
*
* The function 'pmcValidateNickAndPaswd()' is defined inside the
* 'chat/lib/index_validation.lib.php3' library
*/
if (empty($reloading))
{
$error = pmcValidateNickAndPaswd( $isRegUser, $regUserPerms, $regUserModeratedRooms,
$wasInRoom);
if ($error == '')
{
// Puts the nick in a cookie that will expire in one year
$cookieUsername = urlencode($nick);
setcookie('cookieUsername', $cookieUsername, time() + 60*60*24*365);
}
} // end of the nick and password validation work
/**
* Gets the permission level of the user and the list of the rooms he is
* moderator for if this script is run following a '/join' command or a click
* on a room name at the 'users' frame.
*
* The 'pmcHandleMagicQuotes()' function is defined inside the
* 'chat/lib/common.lib.php3' library
*/
else if ($reloading == 'joinCmd')
{
$dbLink->query("SELECT perms, rooms FROM " . C_REG_TBL . " WHERE username = '$slashedNick' LIMIT 1");
$isRegUser = (list($regUserPerms, $regUserModeratedRooms) = $dbLink->nextRecord());
if ($isRegUser)
$regUserModeratedRooms = pmcHandleMagicQuotes($regUserModeratedRooms, '', 1, 'del');
$dbLink->cleanResults();
} // end of get permission level in reloading case
/**
* Ensures the user is not banished from the room he wants to enter in
*
* This part of the script is skipped if the frameset is reloaded because
* of the NS4+ resize bug, because the user has run the '/join' command or
* because he has clicked on a room name at the 'users' frame.
* In these cases, banishement of the user has already been checked.
*/
if ($error == '' && empty($reloading))
{
if (C_BANISH && $regUserPerms != 'admin')
{
include('./' . _CHAT_PATH . 'lib/banish.lib.' . C_EXTENSION);
if ($isBanished)
$error = L_ERR_USR_20;
}
} // end of the banishment test
/**
* Ensures the user can create the room he wants to, then defines the
* permission level this user will be granted for this room
*
* The function 'pmcValidateRoomCreation()' is defined inside the
* 'chat/lib/index_validation.lib.php3' library
*/
if ($error == '' && !empty($createRoomName))
{
$error = pmcValidateRoomCreation($regUserPerms, $regUserModeratedRooms);
} // end of the validation of room creation
/**
* Enters the chat
*
* The 'pmcIsInto()', 'pmcHandleMagicQuotes()' and 'pmcSlashSingleQuotes()'
* functions are defined in the 'chat/lib/common.lib.php3' library.
*/
if ($error == '')
{
// Updates tables
include('./' . _CHAT_PATH . 'lib/index_libs/do_enter_db_work.lib.' . C_EXTENSION);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd">
<html>
<head>
<title><?php echo(APP_NAME); ?></title>
<link rel="shortcut icon" href="<?php echo(_CHAT_PATH); ?>favicon.ico" />
<?php
// Gets the JavaScript instructions
include('./' . _CHAT_PATH . 'lib/index_libs/do_enter_js_work.lib.' . C_EXTENSION);
?>
</head>
<?php
// Gets the frameset definition
include('./' . _CHAT_PATH .'lib/index_libs/do_enter_frameset.lib.' . C_EXTENSION);
?>
</html>
<?php
$dbLink->close();
exit();
} // end of the case where entering the chat is allowed
} // end of the work to do if the form has been submitted
// ------------------- PART III : Display the starting page -------------------
/**
* Adds instructions to the '<head>' part of the starting page
*
* @param boolean whether to show the 'APP_NAME' value as the title of
* page or not
* @param boolean whether to associate the phpMyChat icon to 'favorites'
* url or not
*
* @access public
*/
function pmcStartpageHeaders($putTitle = true, $useIcon = true)
{
echo("\n");
if ($putTitle)
echo('<title>' . APP_NAME . '</title>' . "\n");
?>
<!--
The lines below are usefull for debugging purpose, please do not remove them!
Release: phpMyChat 0.14.3
© 2000-2001 The phpHeaven Team (http://www.phpheaven.net/)
-->
<meta name="description" content="phpMyChat" />
<meta name="keywords" content="phpMyChat" />
<?php
echo("\n");
if ($useIcon)
echo('<link rel="shortcut icon" href="' . _CHAT_PATH . 'favicon.ico" />' ."\n");
$cssUrl = pmcUrlForStyleSheet('start_page', L_CHARSET, (defined('L_FONT_NAME')) ? L_FONT_NAME : '', L_FONT_SIZE);
?>
<link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" />
<script type="text/javascript" language="javascript">
<!--
var jsPhpExt = '<?php echo(C_EXTENSION); ?>';
var jsChatPath = '<?php echo(_CHAT_PATH); ?>';
var jsDbSessionSID = '<?php echo(dbSessionSID('GET')); ?>';
var jsFrom = '<?php echo($GLOBALS['dbSessionVars']['from']); ?>';
var jsLang = '<?php echo($GLOBALS['dbSessionVars']['lang']); ?>';
var jsUrlArgSeparator = '<?php echo($GLOBALS['pmcQueryArgSeparator']); ?>';
var jsIsNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0;
var jsIsIE4 = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >=4 )) ? 1 : 0;
var jsWhichVersion = (jsIsNS4 || jsIsIE4) ? 'high' : 'low';
var jsIsJs11 = (typeof(window.focus) != 'undefined');
var jsTutorialWin = null;
var jsUsersPopupWin = null;
var jsRegPopupWin = null;
var jsErrorNick1 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_2))); ?>';
var jsErrorNick2 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_16))); ?>';
var jsErrorPswd1 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_4))); ?>';
var jsErrorPswd2 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_13))); ?>';
var jsErrorRoom = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_ROM_1))); ?>';
// -->
</script>
<script src="<?php echo(_CHAT_PATH); ?>lib/index_libs/start_page.lib.js" type="text/javascript" language="javascript"></script>
<?php
echo("\n");
} // end of the 'pmcStartpageHeaders()' function;
/**
* Draws the initial table/form
*
* This function defines three way to log into the chat according to the
* browser capacities:
* - if it handles DHTML, standart scripts will be used, else the scripts with
* a '_low' suffix will be ran;
* - if it handles JavaScript 1.1, a color picker will be used at the 'input'
* frame, else a drop down list will be displayed.
*
* @global string an instance of the pmcDB class
* @global string the name of the target script for the form
* @global array the list of the available translations
* @global string the list of default public chat rooms
* @global string the error message
* @global string the argument separator to use for url query part
* @global array the session data
*
* @access public
*/
function pmcStartpageLayout()
{
global $dbLink;
global $action;
global $availableLanguages;
global $defaultChatRooms;
global $error;
global $pmcQueryArgSeparator;
global $dbSessionVars;
// Try to get some data from session or cookies
if (dbSessionIsRegistered('nick'))
$layoutNick = $dbSessionVars['nick'];
else if (isset($GLOBALS['cookieUsername']))
$layoutNick = $GLOBALS['cookieUsername'];
else
$layoutNick = '';
if (dbSessionIsRegistered('targetRoom'))
$layoutRoom = $dbSessionVars['targetRoom'];
else if (isset($GLOBALS['cookieRoom']))
$layoutRoom = $GLOBALS['cookieRoom'];
else
$layoutRoom = '';
if (dbSessionIsRegistered('roomType'))
$layoutRoomType = $dbSessionVars['roomType'];
else if (isset($GLOBALS['cookieRoomType']))
$layoutRoomType = $GLOBALS['cookieRoomType'];
else
$layoutRoomType = '';
?>
<table align="center" cellpadding="5" class="chatBody">
<tr>
<td class="chatBody">
<center>
<!-- Title and messages -->
<span class="chatTitle"><?php echo(APP_NAME . ' ' . APP_VERSION); ?></span>
<br /><br />
<?php
// Displays a message for translations with an 'x-user-defined' charset
if (defined('L_FONT_NAME'))
{
$pathToFont = _CHAT_PATH . 'localization/' . $dbSessionVars['lang'] . '/' . L_FONT_NAME . '.zip';
if (file_exists($pathToFont))
{
if ($error == '' && $GLOBALS['isFontMsg'])
{
echo("\t" . '<span class="chatError">' . "\n");
echo("\t\t\t" . 'This translation of ' . APP_NAME . ' requires the <a href="' . $pathToFont . '" class="chatFonts">' . L_FONT_NAME . ' font face</a>' . "\n");
echo("\t\t" . '</span>' . "\n");
echo("\t\t" . '<br /><br />' . "\n");
}
}
}
echo("\n");
$lowTutorialUrl = _CHAT_PATH . 'tutorial_popup.' . C_EXTENSION . '?lang=' . $dbSessionVars['lang'] . $pmcQueryArgSeparator . 'jsVersion=low';
?>
<a href="<?php echo($lowTutorialUrl); ?>" onclick="pmcTutorialPopup(); return false" class="chatLink" target="_blank"><?php echo(L_TUTORIAL); ?></a>
<br /><br />
<span class="chatP1">
<?php
// Displays informating messages
echo("\t\t" . L_WEL_1 . ' ' . C_MSG_DEL . ' ' . L_WEL_2 . ' ' . C_USR_DEL . ' ' . L_WEL_3 . '<br /><br />' . "\n");
// Displays the message about currently chatting users
if ($dbLink->query("SELECT DISTINCT u.username FROM " . C_USR_TBL . " u, " . C_MSG_TBL . " m WHERE u.room = m.room AND m.type = 1"))
{
$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;
$usersPopupLink .= '</a>';
echo("\t\t\t" . L_CUR_1 . $usersPopupLink . ' '. L_CUR_2 . "\n");
}
?>
</span>
<br /><br />
<?php
// Displays the error message if required
if (!empty($error))
{
echo("\t" . '<span class="chatError">' . "\n");
echo("\t\t\t" . $error . "\n");
echo("\t\t" . '</span>' . "\n");
echo("\t\t" . '<br /><br />' . "\n");
}
?>
<!-- The main form -->
<form action="<?php echo($action); ?>" method="post" autocomplete="off" name="startingForm" onsubmit="pmcDefineVerField(); return pmcIndexValidate(<?php echo(C_REQUIRE_REGISTER); ?>);">
<?php
// Put the session id in an hidden field
echo("\t" . dbSessionSID('POST'));
?>
<input type="hidden" name="jsVersion" value="low" />
<table border="0" cellpadding="3" class="chatTable">
<tr class="chatCell">
<td align="center" class="chatCell">
<table border="0" class="chatTable">
<?php
// Displays the flags for languages if necessary
if (C_MULTI_LANG == 1)
{
echo("\n");
?>
<!-- Flags to choose the translation -->
<tr class="chatCell">
<td colspan="2" align="center" class="chatCell">
<span class="chatFlags">
<?php
echo("\n");
asort($availableLanguages);
reset($availableLanguages);
$i = 0;
while (list($key, $name) = each($availableLanguages))
{
$i++;
echo("\t\t\t\t\t\t\t");
echo(' <a href="' . $action . '?' . dbSessionSID('GET') .'">');
echo('<img src="' . _CHAT_PATH . 'localization/' . $name . '/flag.gif" border="0" width="24" height="16" alt="' . ucfirst(str_replace('_', ' ', $name)) . '" /></a>');
if ($i % 15 == 0 && $i < count($availableLanguages))
echo ('<br />');
echo("\n");
}
unset($availableLanguages);
?>
</span>
</td>
</tr>
<?php
}
// Horizontal alignement for cells topic
$cellAlign = (L_CHARSET == 'windows-1256') ? 'left' : 'right';
echo("\n");
?>
<!-- Nick and password -->
<tr class="chatCell">
<th colspan="2" class="chatTabTitle"><?php echo(L_SET_1); ?></th>
</tr>
<tr class="chatCell">
<td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap"><?php echo(L_SET_2); ?> :</td>
<td valign="top" class="chatCell">
<input type="text" name="nick" size="11" maxlength="10" value="<?php echo(htmlspecialchars(urldecode($layoutNick))); ?>" class="chatBox" />
</td>
</tr>
<tr class="chatCell">
<td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap"><?php echo(L_REG_1); ?> :</td>
<td valign="top" class="chatCell" nowrap="nowrap">
<input type="password" name="password" size="11" maxlength="16" class="chatBox" />
<?php
if (!C_REQUIRE_REGISTER)
{
echo("\t\t\t\t\t");
echo(' <u>' . L_REG_1r .'</u>');
echo("\n");
}
?>
</td>
</tr>
<tr class="chatCell">
<td class="chatCell"> </td>
</tr>
<!-- Registration links -->
<tr class="chatCell">
<th colspan="2" class="chatTabTitle"><?php echo(L_REG_2); ?></th>
</tr>
<tr class="chatCell">
<td align="center" colspan="2" class="chatCell">
<br />
<a href="<?php echo(_CHAT_PATH); ?>profile_reg.<?php echo(C_EXTENSION); ?>?<?php echo(dbSessionSID('GET')); ?>" class="chatReg" onclick="pmcRegPopups('profile_reg'); return false" target="_blank"><?php echo(L_REG_3); ?></a>
| <a href="<?php echo(_CHAT_PATH); ?>profile_edit.<?php echo(C_EXTENSION); ?>?<?php echo(dbSessionSID('GET')); ?>" class="chatReg" onclick="pmcRegPopups('profile_edit'); return false" target="_blank"><?php echo(L_REG_4); ?></a>
<?php
if (C_SHOW_DEL_PROF)
{
echo("\n");
?>
| <a href="<?php echo(_CHAT_PATH); ?>profile_del.<?php echo(C_EXTENSION); ?>?<?php echo(dbSessionSID('GET')); ?>" class="chatReg" onclick="pmcRegPopups('profile_del'); return false" target="_blank"><?php echo(L_REG_5); ?></a>
<?php
}
if (C_SHOW_ADMIN)
{
echo("\n");
?>
|| <a href="<?php echo(_CHAT_PATH); ?>admin.<?php echo(C_EXTENSION); ?>?<?php echo(dbSessionSID('GET')); ?>" class="chatReg" onclick="pmcRegPopups('admin'); return false" target="_blank"><?php echo(L_REG_35); ?></a>
<?php
}
echo("\n");
?>
</td>
</tr>
<?php
if (C_VERSION)
{
echo("\n");
?>
<tr class="chatCell">
<td colspan="2" class="ChatCell"> </td>
</tr>
<!-- Rooms choice -->
<tr class="chatCell">
<th colspan="2" class="chatTabTitle"><?php echo(L_SET_5); ?></th>
</tr>
</table>
<table border="0" class="chatTable">
<tr class="chatCell">
<td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap"><?php echo(L_SET_6); ?> :</td>
<td valign="top" class="chatCell">
<select name="enterDefaultRoomName" class="chatBox"<?php if (C_VERSION == 2) echo(' onchange="pmcResetRoomBox(\'default\');"'); ?>>
<option value=""><?php echo(L_SET_7); ?></option>
<?php
// Displays default rooms in the drop down list
$defaultRoomFound = false;
$defaultRoomsString = '';
$prevRoom = ($layoutRoom != '') ? urldecode($layoutRoom) : '';
echo("\n");
for ($i = 0; $i < count($defaultChatRooms); $i++)
{
$tmpRoom = stripslashes($defaultChatRooms[$i]);
if ($defaultRoomsString != '')
$defaultRoomsString .= ',';
$defaultRoomsString .= $tmpRoom;
echo("\t\t\t\t\t\t\t");
echo('<option value="' . htmlspecialchars($tmpRoom) . '"');
if (strcasecmp($tmpRoom, $prevRoom) == 0)
{
echo(' selected="selected"');
$defaultRoomFound = true;
}
echo('>' . htmlspecialchars($tmpRoom) . '</option>');
echo("\n");
}
?>
</select>
</td>
</tr>
<?php
}
if (C_VERSION == 2)
{
echo("\n");
?>
<tr class="chatCell">
<td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap"><?php echo(L_SET_8); ?> :</td>
<td valign="top" class="chatCell">
<select name="enterOtherRoomName" class="chatBox" onchange="pmcResetRoomBox('otherPub');">
<option value=""><?php echo(L_SET_7); ?></option>
<?php
// Displays the other public rooms in the drop down list
echo("\n");
$dbLink->query("SELECT DISTINCT room FROM " . C_MSG_TBL . " WHERE type = 1 AND username NOT LIKE 'SYS %' ORDER BY room");
while (list($room) = $dbLink->nextRecord())
{
$room = pmcHandleMagicQuotes($room, '', 1, 'del');
if (pmcIsInto($room, stripslashes($defaultRoomsString)) < 0)
{
echo("\t\t\t\t\t\t\t");
echo('<option value="' . htmlspecialchars($room) . '"');
if (strcasecmp($room, $prevRoom) == 0 && !$defaultRoomFound)
{
echo(' selected="selected"');
$defaultRoomFound = true;
}
echo('>' . htmlspecialchars($room) . '</option>');
echo("\n");
}
}
$dbLink->cleanResults();
?>
</select>
</td>
</tr>
<tr class="chatCell">
<td align="<?php echo($cellAlign); ?>" valign="top" class="chatCell" nowrap="nowrap">
<?php echo(L_SET_9 . ' ' . "\n"); ?>
<select name="roomType" class="chatBox">
<option value="1"<?php if ($layoutRoomType == 1 && !$defaultRoomFound) echo(' selected="selected"'); ?>><?php echo(L_SET_10); ?></option>
<option value="0"<?php if ($layoutRoomType == 0 && !$defaultRoomFound) echo(' selected="selected"'); ?>><?php echo(L_SET_11); ?></option>
</select>
<?php echo(' ' . L_SET_12); ?> :
</td>
<td valign="top" class="chatCell">
<input type="text" name="createRoomName" size="11" maxlength="10"<?php if (!$defaultRoomFound && $layoutRoom != '') echo(' value="' . htmlspecialchars(urldecode($layoutRoom)) . '"'); ?> class="chatBox" onchange="pmcResetRoomBox('create');" />
</td>
</tr>
<?php
}
echo("\n");
?>
</table>
<br />
<!-- Submit button -->
<span class="chatP2">
<?php echo(L_SET_13 . ' ' . "\n"); ?>
<input type="submit" name="submitType" value="<?php echo(L_SET_14); ?>" class="chatBox" />
...
</span>
</td>
</tr>
</table>
<!-- Copyright -->
<span class="chatCopy" dir="ltr">
© 2000 <a href="http://www.phpheaven.net/" class="chatLink">The phpHeaven Team</a>
</span>
</form>
</center>
</td>
</tr>
</table>
<?php
/**
* Save the session data and kill the pmcDB handler
*/
$dbSessionVars['msgNumber'] = C_MSG_NB;
$dbSessionVars['refreshDelay'] = C_MSG_REFRESH;
dbSessionSave();
$dbLink->close();
} // end of the 'pmcStartpageLayout()' function
?>
--- NEW FILE ---
//
// +--------------------------------------------------------------------------+
// | phpMyChat version 0.15.0 |
// +--------------------------------------------------------------------------+
// | Copyright (c) 2000-2001 The phpHeaven-team |
// +--------------------------------------------------------------------------+
// | Set of miscellaneous JavaScript functions. |
// | |
// | This library is called by the 'chat/lib/index_libs/main_index.lib.php3' |
// | script. |
// +--------------------------------------------------------------------------+
// | From the phpMyChat project: |
// | http://www.phpheaven.net/projects/phpMyChat/ |
// | |
// | Authors: the phpHeaven-team <php...@ya...> |
// +--------------------------------------------------------------------------+
//
// $Id: misc.lib.js,v 1.1 2001/04/03 20:14:52 loic1 Exp $
//
// Set of miscellaneous JavaScript functions.
//
/**
* Ensures the form or an element of the form at the 'input' frame is defined
*
* @param string the name of the element of the form to check for at the
* input frame (null to check the form itself)
*
* @return object the element of the form at the input frame (null if no
* element have to been chacked or if it doesn't exist)
*
* @access public
*/
function pmcGetInputForm(whichElt)
{
jsInputForm = null;
// 1. Ensures the form at the input frame exists
if (typeof(window.frames['input']) == 'undefined')
{
return null;
}
else if (typeof(window.frames['input'].window.document.forms['inputForm']) == 'undefined')
{
return null;
}
else
{
jsInputForm = window.frames['input'].window.document.forms['inputForm'];
} // end of input form tests
// 2. Ensures a specific element of the input form exists
if (jsInputForm)
{
if (whichElt == '' ||
typeof(window.frames['input'].window.document.forms['inputForm'].elements[whichElt]) == 'undefined')
{
return null;
}
else
{
return window.frames['input'].window.document.forms['inputForm'].elements[whichElt];
}
} // end of specific elt tests
} // end of the function 'pmcGetInputForm()'
/**
* Automatically submits a command at the 'input' frame
*
* @param string name of the command to submit
* @param string additional settings to the command
*
* @access public
*/
function pmcRunCmd(cmdName, infos)
{
pmcGetInputForm();
// Do the work only if the input form exists
if (jsInputForm)
{
if (infos != '')
infos = ' ' + infos;
jsInputForm.elements['message'].value = '/' + cmdName + infos;
jsInputForm.elements['sent'].value = '1';
if (typeof(document.all) != 'undefined') // Browser is IE
jsInputForm.elements['submitType'].disabled = true;
jsInputForm.submit();
}
} // end of the function 'pmcRunCmd()'
/**
* Puts the nick that was clicked on (at the 'messages' or the 'users' frames)
* inside the message box at the 'input' frame
*
* @param string nick that has been clicked on
* @param boolean wether to put the command for private messages or not
*
* @access public
*/
function pmcUserClick(nick, privMsg)
{
var sendTo = pmcGetInputForm('msgTo');
// Do the work only if the 'msgTo' field of the input form exists
if (sendTo)
{
sendTo.value = nick;
var msgBox = jsInputForm.elements['message'];
if (privMsg)
{
var oldStr = msgBox.value;
if (oldStr == '' || oldStr.substring(0,1) != ' ')
oldStr = ' ' + oldStr;
msgBox.value = '/TO ' + nick + oldStr;
}
else
{
msgBox.value += nick;
if (msgBox.value == nick)
msgBox.value += '> ';
}
msgBox.focus()
}
} // end of the function 'pmcUserClick()'
/**
* Sets the focus to the message box at the 'input' frame
*
* @access public
*/
function pmcSetMsgBoxFocus()
{
var msgBox = pmcGetInputForm('message');
if (msgBox)
{
// window.focus() is a js1.1 method
if (typeof(window.focus) != 'undefined')
window.frames['input'].window.focus();
msgBox.focus();
}
} // end of the function 'pmcSetMsgBoxFocus()'
/**
* Brief validation of the message or the command submitted by the 'input'
* frame
*
* @param string error message to display in case of an invalid command
* @return boolean whether the message or command should be submitted or not
*
* @access public
*/
function pmcValidateInputForm(invalidCmdMsg)
{
var msgBox = pmcGetInputForm('message');
// The replace function (js1.2) isn't supported -> no js tests are done
if (typeof(msgBox.value.replace) == 'undefined')
return true;
// Submission looks like a command?
var isCmd = (msgBox.value.substring(0,1) == '/');
// 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;
// Ensure the message box isn't empty
if (msgBox.value.replace(/ /g, '') == '')
{
msgBox.focus();
return false;
}
// It looks like a command but's not a valid one -> display error message
else if (isCmd && !re.test(msgBox.value))
{
msgBox.select();
alert(jsInvalidCommandMsg);
return false;
}
// It doesn't look like a command -> it's a message, then ensure a message
// isn't currently being submitted...
else if (!isCmd && jsInputForm.elements['sent'].value == 1)
{
msgBox.focus();
return false;
}
// ... and that the same message hasn't been submitted the last time
else if (!isCmd && msgBox.value == jsInputForm.elements['prevMessage'].value)
{
msgBox.value = '';
msgBox.focus();
return false;
}
// All the tests have been succesfully passed -> submit the from
else
{
jsInputForm.elements['sent'].value = 1;
if (typeof(document.all) == 'undefined') // Browser is IE
jsInputForm.elements['submitType'].disabled = true;
return true;
}
} // end of the function 'pmcValidateInputForm()'
/**
* Launches the users popup according to the DHTML capacities of the browser
*
* @param dummy used to ensure the popup name is unique
*
* @access public
*/
function pmcUsersPopup(dummy)
{
var whichFile = (jsIsVersion4) ? '' : '_low';
var usersUrl = 'users_popup' + whichFile + '.' + jsPhpExt
+ '?' + 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
/**
* Close some popups when the user exits the chat
*
* @access public
*/
function pmcClosePopups()
{
if (typeof(jsHelpPopupWin) != 'undefined' && jsHelpPopupWin && !jsHelpPopupWin.closed)
jsHelpPopupWin.close();
if (typeof(jsIgnoredPopupWin) != 'undefined' && jsIgnoredPopupWin && !jsIgnoredPopupWin.closed)
{
jsIgnoredPopupWin.window.document.forms['ignForm'].elements['exit'].value = 1;
jsIgnoredPopupWin.close()
}
if ((typeof(frames['loader']) != 'undefined' && frames['loader'] && !frames['loader'].closed)
&& jsLeaveChat)
{
jsLeaveChat = true;
frames['loader'].close();
}
} // end of the function 'pmcClosePopups()'
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/install/database
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/install/database
Modified Files:
mysql.sql
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: mysql.sql
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/install/database/mysql.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** mysql.sql 2001/03/29 22:52:17 1.1
--- mysql.sql 2001/04/03 20:14:52 1.2
***************
*** 26,30 ****
m_time int(11) unsigned NOT NULL DEFAULT '0' ,
address varchar(30) ,
! message text NOT NULL DEFAULT '' ,
KEY type (type),
KEY m_time (m_time)
--- 26,32 ----
m_time int(11) unsigned NOT NULL DEFAULT '0' ,
address varchar(30) ,
! color varchar(7) NOT NULL DEFAULT '#000000' ,
! msg_original text NOT NULL DEFAULT '' ,
! msg_enhanced text NOT NULL DEFAULT '' ,
KEY type (type),
KEY m_time (m_time)
***************
*** 76,86 ****
CREATE TABLE /*!32312 IF NOT EXISTS*/ pmc_users (
session_id varchar(32) NOT NULL DEFAULT '' ,
room varchar(30) NOT NULL DEFAULT '' ,
- latin1 tinyint(1) unsigned NOT NULL DEFAULT '0' ,
username varchar(30) NOT NULL DEFAULT '' ,
status char(1) NOT NULL DEFAULT 'u' ,
ip varchar(16) NOT NULL DEFAULT '' ,
PRIMARY KEY (session_id),
KEY room_id (room),
! KEY status (status)
);
--- 78,90 ----
CREATE TABLE /*!32312 IF NOT EXISTS*/ pmc_users (
session_id varchar(32) NOT NULL DEFAULT '' ,
+ u_time int(11) unsigned NOT NULL DEFAULT '0' ,
room varchar(30) NOT NULL DEFAULT '' ,
username varchar(30) NOT NULL DEFAULT '' ,
+ latin1 tinyint(1) unsigned NOT NULL DEFAULT '0' ,
status char(1) NOT NULL DEFAULT 'u' ,
ip varchar(16) NOT NULL DEFAULT '' ,
PRIMARY KEY (session_id),
KEY room_id (room),
! KEY status (status),
! KEY u_time (u_time)
);
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat Added Files: messages_low.php3 profile_del.php3 profile_edit.php3 profile_reg.php3 Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | The 'messages' frame for browsers that does not support DHTML. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: messages_low.php3,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // The 'messages' frame for browsers that does not support DHTML. // /** * 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 session Id variable sent to this script * * Uses the 'pmcGrabGlobals()' function defined in the * 'chat/lib/common.lib.php3' library. */ pmcGrabGlobals('dbSessionId'); /** * 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); $textDirection = (L_CHARSET == 'windows-1256') ? 'rtl' : 'ltr'; /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, true); /** * Gets/Updates the users' informations from/in the connected users table */ $slashedNick = pmcSlashSingleQuotes($dbSessionVars['nick']); $currentRoomType = $dbSessionVars['roomType']; $slashedCurrentRoomName = pmcSlashSingleQuotes($dbSessionVars['targetRoom']); require('./lib/check_and_kick_user.lib.' . C_EXTENSION); pmcCheckAndKickUser(true); /** * Get messages * * The 'pmcHandleMagicQuotes()' and the 'pmcSlashSingleQuotes()' functions are * defined inside the 'chat/lib/common.lib.php3' script. */ // Define the SQL query (depends on the ignored users list and on whether to // display notification messages or not) $ignoredSendersList = ''; if (dbSessionIsRegistered('ignoredSenders') && !empty($dbSessionVars['ignoredSenders'])) $ignoredSendersList .= '\'' . str_replace(',', '\', \'', pmcSlashSingleQuotes($dbSessionVars['ignoredSenders'])) . '\''; if ($dbSessionVars['notify'] == 0) $ignoredSendersList .= (($ignoredSendersList != '') ? ', ':'') . '\'SYS enter\', \'SYS exit\''; 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'] . ' ' . 'FROM ' . C_MSG_TBL . ' ' . 'WHERE ' . $ignoredSendersList . '(' . 'address = \' *\' OR ' . '(address = \'' . $slashedNick .'\' AND (room = \'' . $slashedCurrentRoomName . '\' OR username = \'SYS inviteTo\')) OR ' . '(room = \'' . $slashedCurrentRoomName . '\' AND (address IS NULL OR username = \''. $slashedNick . '\'))' . ') ' . 'ORDER BY m_time DESC ' . 'LIMIT ' . $dbSessionVars['msgNumber']; // Get new messages and store them in an array $grabedMessages = array(); $dbLink = new pmcDB; $dbLink->query($getMessagesQuery); while (list($sender, $senderLatin1, $sentTime, $addressee, $msgColor, $message) = $dbLink->nextRecord()) { $grabedMessages[] = array( 'sender' => pmcHandleMagicQuotes($sender, '', 1, 'del'), 'senderLatin1' => $senderLatin1, 'sentTime' => $sentTime, 'addressee' => pmcHandleMagicQuotes($addressee, '', 1, 'del'), 'msgColor' => $msgColor, 'message' => pmcHandleMagicQuotes($message, '', 1, 'del') ); } $dbLink->cleanResults(); $dbLink->close(); /** * Format new messages * * The 'pmcSpecialChars()' and the 'pmcSlashSingleQuotes()' functions are * defined inside the 'chat/lib/common.lib.php3' script. */ $newMessages = array(); $grabedMessagesCnt = count($grabedMessages); if ($grabedMessagesCnt == 0) { $newMessages[] = '<span class="notify">' . L_NO_MSG . '</span>'; } else { reset($grabedMessages); for ($k = 0; $k < $grabedMessagesCnt; $k++) { // Get the values of messages variables while (list($name, $value) = each($grabedMessages[$k])) $$name = $value; // Skip the oldest message if the day seperator has been added if (isset($daySeparator) && $k == $grabedMessagesCnt - 1) continue; // Separator between messages sent before today and other ones if (!isset($daySeparator) && date('j', $sentTime) != date('j', time())) { $daySeparatorMsg = ($dbSessionVars['msgOrder'] == 0) ? L_TODAY_UP : L_TODAY_DWN; $newMessages[] = '<p class="msg"><span class="notify">--------- ' . $daySeparatorMsg . ' ---------</span></p>'; $daySeparator = 1; unset($daySeparatorMsg); } // Messages $aMessage = '<p class="msg">'; // The timestamp of the message if ($dbSessionVars['showTimestamp'] == 1) $aMessage .= '<span class="time">' . date('H:i:s', $sentTime + C_TMZ_OFFSET * 60 * 60) . '</span> '; // 'Standard' messages if (substr($sender,0,4) != 'SYS ') { $simpleSender = pmcSpecialChars($sender, $senderLatin1); $slashedSender = pmcSlashSingleQuotes($simpleSender); $sender = '<a href="#" onclick="window.parent.pmcUserClick(\'' . $slashedSender . '\', true); return false" class="sender">' . $simpleSender . '</a>'; if ($addressee != '') $addressee = ']<bdo dir="' . $textDirection . '"></bdo>>[' . htmlspecialchars($addressee); $aMessage .= '<b>[' . $sender . $addressee . ']<bdo dir="' . $textDirection .'"></bdo></b> ' . '<font color="' . $msgColor . '">' . $message . '</font>'; } // 'System' messages else { $aMessage .= '<span class="notify">'; if ($addressee == ' *') { $aMessage .= '[' . L_ANNOUNCE . ']<bdo dir="' . $textDirection . '"></bdo> ' . $message; } else { if ($addressee != '') $aMessage .= '<b>>[' . htmlspecialchars($addressee) . ']<bdo dir="' . $textDirection . '"></bdo></b> '; if (strpos($message, 'printf(')) eval('$aMessage .= ' . $message . ';'); else $aMessage .= $message; } $aMessage .= '</span>'; } $aMessage .= '</p>'; $newMessages[] = $aMessage; } } // end of formatting new messages unset($grabedMessages); /** * "Displays" the frame */ // Define the URL for the http refresh header $refreshUrl = 'messages_low.' . C_EXTENSION . '?' . dbSessionSID('GET'); // 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($textDirection); ?>"> <head> <title>Messages frame</title> <?php if ($dbSessionVars['refreshDelay'] > 0) echo('<meta http-equiv="Refresh" content="' . $dbSessionVars['refreshDelay'] . '; url=' . $refreshUrl . '" />' . "\n"); ?> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> </head> <body class="mainframe"<?php if ($dbSessionVars['msgOrder'] == 1) echo(' onload="this.scrollTo(0,65000)"'); ?>> <?php // Display messages $newMessagesCnt = count($newMessages); reset($newMessages); for ($k = 0; $k < $newMessagesCnt; $k++) { $aMessage = ($dbSessionVars['msgOrder'] == 0) ? $newMessages[$k] : $newMessages[$newMessagesCnt - $k - 1]; echo($aMessage . "\n"); } unset($newMessages); ?> </body> </html> --- NEW FILE --- <? // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script allows an user to delete his/her profile. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: profile_del.php3,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // Deletes the profile of an user. // /** * 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); /** * Gets the names and values for variables sent or posted to this script * * Uses the 'pmcGrabGlobals()' and 'pmcHandleMagicQuotes()' function defined in * the 'chat/lib/common.lib.php3' library */ $toGrab = array('dbSessionId', '%POST'); pmcGrabGlobals($toGrab); // Unslashes values of variables sent to this script ($authUsername is sent by // by the login script) if (!empty($submitType)) $submitType = pmcHandleMagicQuotes($submitType, '1', '', 'del'); /** * 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_SESS_DEL * 60, '' ); dbSessionstart(); /** * Defines the language to be used */ require('./localization/languages.lib.' . C_EXTENSION); require('./localization/' . $dbSessionVars['lang'] . '/localized.chat.' . C_EXTENSION); /** * Authentification work */ if (!dbSessionIsRegistered('delProfilePerms')) { include('./lib/login.lib.' . C_EXTENSION); $dbSessionVars['delProfilePerms'] = $perms; dbSessionSave(); } // If user is admininistrator, defines a message to avoid profile deletion if ($dbSessionVars['delProfilePerms'] == 'admin') $message = L_ERR_USR_12; /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, true); /** * Deletes the profile if the form has been submitted and destroy the session */ if (isset($submitType) && $submitType == L_REG_20) { $dbLink = new pmcDB; $dbLink->query("DELETE FROM " . C_REG_TBL . " WHERE username = '" . pmcSlashSingleQuotes($dbSessionVars['authUsername']) . "'"); $message = L_REG_21; $dbLink->close(); dbSessionDestroy(); } /** * Displays the profile deletion page */ $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(APP_NAME); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> </head> <body> <center> <p class="error"><?php echo((empty($error)) ? ' ' : $error); ?></p> <form action="profile_del.<?php echo(C_EXTENSION); ?>" method="post" autocomplete="off" name="delProfile"> <?php // Put the session id in an hidden field echo(dbSessionSID('POST') . "\n"); ?> <table border="0" cellpadding="3" class="table"> <tr> <td align="center"> <table border="0"> <tr> <th class="tabTitle"><?php echo(L_REG_13); ?></th> </tr> <tr> <td valign="top" align="center"> <?php echo((isset($message))? $message : L_REG_19); echo("\n"); ?> </td> </tr> </table> <br /><br /> <?php if (!isset($message)) { ?> <table border="0"> <tr> <td><input type="submit" name="submitType" value="<?php echo(L_REG_20); ?>" /></td> <td><input type="submit" name="submitType" value="<?php echo(L_REG_22); ?>" onclick="self.close(); return false" /></td> </tr> </table> <?php } else { ?> <input type="submit" name="submitType" value="<?php echo(L_REG_25); ?>" onclick="self.close(); return false" /> <?php } echo("\n"); ?> </td> </tr> </table> </form> </center> </body> </html> <?php ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script allows an user to edit and modify his/her profile. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: profile_edit.php3,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // Edits and allows to modify the profile of an user. // /** * 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); /** * Gets the names and values for variables sent or posted to this script * * Uses the 'pmcGrabGlobals()' and 'pmcHandleMagicQuotes()' function defined in * the 'chat/lib/common.lib.php3' library */ $toGrab = array('dbSessionId', '%POST'); pmcGrabGlobals($toGrab); // Unslashes values of variables sent to this script ($authUsername is sent by // by the login script) if (!empty($nick)) $nick = pmcHandleMagicQuotes($nick, '1', '', 'del'); if (!empty($password)) $password = pmcHandleMagicQuotes($password, '1', '', 'del'); if (!empty($firstName)) $firstName = pmcHandleMagicQuotes($firstName, '1', '', 'del'); if (!empty($lastName)) $lastName = pmcHandleMagicQuotes($lastName, '1', '', 'del'); if (!empty($spokenLang)) $spokenLang = pmcHandleMagicQuotes($spokenLang, '1', '', 'del'); if (!empty($submitType)) $submitType = pmcHandleMagicQuotes($submitType, '1', '', 'del'); /** * 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_SESS_DEL * 60, '' ); dbSessionstart(); /** * Defines the language to be used */ require('./localization/languages.lib.' . C_EXTENSION); require('./localization/' . $dbSessionVars['lang'] . '/localized.chat.' . C_EXTENSION); /** * Authentification work */ if (!(dbSessionIsRegistered('authUsername') && dbSessionIsRegistered('authPassword'))) include('./lib/login.lib.' . C_EXTENSION); /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, true); /** * Defines some variables */ $dbLink = new pmcDB; $isRegDone = false; /** * Validates the submitted form then updates the profile */ if (isset($submitType) && $submitType == L_REG_16) { if (C_BAD_WORDS) include('./lib/swearing.lib.' . C_EXTENSION); // Validates the nick if (!$isJsValidated && trim($nick) == '') { $error = L_ERR_USR_5; } else if (!$isJsValidated && ereg('[\, ]', $nick)) { $error = L_ERR_USR_16; } else if (C_BAD_WORDS && checkWords($nick, true)) { $error = L_ERR_USR_18; } // Validates the password else if (!$isJsValidated && $password == '') { $error = L_ERR_USR_6; } // Validates the first and last names else if (!$isJsValidated && (trim($firstName) == '' || trim($lastName) == '')) { $error = L_ERR_USR_15; } // Validates the e-mail address else if (!$isJsValidated && trim($email) == '') { $error = L_ERR_USR_7; } else if (!$isJsValidated && !eregi('^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$', $email)) { $error = L_ERR_USR_8; } // Ensures the nick is not already reserved if it has been modified else { $slashedNick = pmcSlashSingleQuotes($nick); if ($nick != $dbSessionVars['authUsername']) { $dbLink->query("SELECT COUNT(*) FROM " . C_REG_TBL . " WHERE username = '$slashedNick'"); list($isReserved) = $dbLink->nextRecord(); $dbLink->cleanResults(); // Nick is already reserved if ($isReserved != 0) $error = L_ERR_USR_9; } } // end of the validation work // Udpates the profile if (!isset($error)) { $latin1 = (L_CHARSET == 'iso-8859-1'); $showEmail = (isset($showEmail) && $showEmail) ? 1 : 0; if (!isset($gender)) $gender = ''; // Gets the ip include('./lib/get_ip.lib.' . C_EXTENSION); // Defines the password $pwdHash = md5($password); // Updates the profile $dbLink->query("UPDATE " . C_REG_TBL . " SET username = '$slashedNick', latin1 = $latin1, password = '$pwdHash', firstname='" . pmcSlashSingleQuotes($firstName) . "', lastname = '" . pmcSlashSingleQuotes($lastName) . "', country = '" . pmcSlashSingleQuotes($spokenLang) . "', website = '$webSite', email = '$email', showemail = $showEmail, reg_time = " . time() . ", ip = '$ip', gender = '$gender' WHERE username = '" . pmcSlashSingleQuotes($dbSessionVars['authUsername']) . "'"); $message = L_REG_17; $isRegDone = true; } } // end of the updating profile work /** * Initializes some variables that will be used to display the form if it * hasn't been submitted yet */ if (!isset($submitType) || $submitType != L_REG_16) { $nick = $dbSessionVars['authUsername']; $dbLink->query("SELECT firstname, lastname, country, website, email, showemail, gender FROM " . C_REG_TBL . " WHERE username = '" . pmcSlashSingleQuotes($nick) . "' LIMIT 1"); list($firstName, $lastName, $spokenLang, $webSite, $email, $showEmail, $gender) = $dbLink->nextRecord(); $dbLink->cleanResults(); $firstName = pmcHandleMagicQuotes($firstName, '', 1, 'del'); $lastName = pmcHandleMagicQuotes($lastName, '', 1, 'del'); $spokenLang = pmcHandleMagicQuotes($spokenLang, '', 1, 'del'); } /** * Kills the instance of the DB class */ $dbLink->close(); /** * Displays the profile modification page */ $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(APP_NAME); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript"> <!-- var jsErrorNick1 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_5))); ?>'; var jsErrorNick2 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_16))); ?>'; var jsErrorPswd = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_6))); ?>'; var jsErrorName = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_15))); ?>'; var jsErrorEmail1 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_7))); ?>'; var jsErrorEmail2 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_8))); ?>'; var jsIsMailValid = false; var formName = 'editProfile'; // --> </script> <script src="lib/profile_work.lib.js" type="text/javascript" language="javascript"></script> </head> <body> <center> <p class="error"><?php echo((empty($error)) ? ' ' : $error); ?></p> <form action="profile_edit.<?php echo(C_EXTENSION); ?>" method="post" autocomplete="off" name="editProfile" onsubmit="return pmcRegProfileValidate()"> <?php // Put the session id in an hidden field echo(dbSessionSID('POST') . "\n"); ?> <input type="hidden" name="isJsValidated" value="0" /> <table border="0" cellpadding="3" class="table"> <tr> <td align="center"> <table border="0"> <tr> <th colspan="2" class="tabTitle"><?php echo(($isRegDone) ? $message : L_REG_34); ?></th> </tr> <tr> <th colspan="2"><?php if (!$isRegDone) echo(L_REG_37); ?></th> </tr> <tr><td> </td></tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_SET_2); ?> :</td> <td valign="top"> <?php // Do not allow modification of the nick if this popup is launched by the // profile command if (dbSessionIsRegistered('conservative')) { echo("\t\t\t\t" . $nick . "\n"); ?> <input type="hidden" name="nick" value="<?php echo(htmlspecialchars($nick)); ?>" /> <?php } else { ?> <input type="text" name="nick" size="11" maxlength="10" value="<?php echo(htmlspecialchars($nick)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo("\t\t\t" . '<span class="error">*</span>' . "\n"); } echo("\n"); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_7); ?> :</td> <td valign="top"> <?php // Do not allow modification of the password if this popup is launched by the // profile command if (dbSessionIsRegistered('conservative')) { echo("\t\t\t\t" . $password . "\n"); ?> <input type="hidden" name="password" value="<?php echo(htmlspecialchars($dbSessionVars['authPassword'])); ?>" /> <?php } else { ?> <input type="password" name="password" size="11" maxlength="16" value="<?php echo(htmlspecialchars($dbSessionVars['authPassword'])); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo("\t\t\t" . '<span class="error">*</span>' . "\n"); } echo("\n"); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_30); ?> :</td> <td valign="top"> <input type="text" name="firstName" size="11" maxlength="64" value="<?php echo(htmlspecialchars($firstName)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_31); ?> :</td> <td valign="top"> <input type="text" name="lastName" size="11" maxlength="64" value="<?php echo(htmlspecialchars($lastName)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_45); ?> :</td> <td valign="top"> <input type="radio" name="gender" value="1"<?php if (isset($gender) && $gender == 1) echo(' checked="checked"'); if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php echo(L_REG_46); ?><br /> <input type="radio" name="gender" value="2"<?php if (isset($gender) && $gender == 2) echo(' checked="checked"'); if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php echo(L_REG_47); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_36); ?> :</td> <td valign="top"> <input type="text" name="spokenLang" size="11" maxlength="64" value="<?php echo(htmlspecialchars($spokenLang)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_32); ?> :</td> <td valign="top"> <input type="text" name="webSite" size="11" maxlength="64" value="<?php echo(htmlspecialchars($webSite)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_8); ?> :</td> <td valign="top"> <input type="text" name="email" size="11" maxlength="64" value="<?php echo($email); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <tr> <td colspan="2" align="center"> <input type="checkbox" name="showEmail" value="1"<?php if (isset($showEmail) && $showEmail) echo(' checked="checked"'); if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php echo(L_REG_33); ?> </td> </tr> </table> <br /><br /> <?php if (!$isRegDone) { ?> <input type="submit" name="submitType" value="<?php echo(L_REG_16); ?>" /> <?php } echo("\n"); ?> <input type="submit" name="submitType" value="<?php echo(L_REG_25); ?>" onclick="pmcPutFocus(); self.close(); return false" /> </td> </tr> </table> </form> </center> </body> </html> <?php // Updates the session data if ($isRegDone) { $dbSessionVars['nick'] = $nick; $dbSessionVars['pwdHash'] = $pwdHash; $toUnreg = array('conservative', 'authUsername', 'authPassword'); dbSessionUnregister($toUnreg); dbSessionSave(); } ?> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script allows an user to register his/her profile. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // | & Jose' Carlos Pereira <php...@ab...> | // +--------------------------------------------------------------------------+ // // $Id: profile_reg.php3,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // Deletes the profile of an user. // /** * 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); /** * Gets the names and values for variables posted to this script * * Uses the 'pmcGrabGlobals()' and 'pmcHandleMagicQuotes()' function defined in * the 'chat/lib/common.lib.php3' library */ $toGrab = array('dbSessionId', '%POST'); pmcGrabGlobals($toGrab); // Unslashes values of variables sent to this script if (!empty($nick)) $nick = pmcHandleMagicQuotes($nick, '1', '', 'del'); if (!empty($password)) $password = pmcHandleMagicQuotes($password, '1', '', 'del'); if (!empty($firstName)) $firstName = pmcHandleMagicQuotes($firstName, '1', '', 'del'); if (!empty($lastName)) $lastName = pmcHandleMagicQuotes($lastName, '1', '', 'del'); if (!empty($spokenLang)) $spokenLang = pmcHandleMagicQuotes($spokenLang, '1', '', 'del'); if (!empty($submitType)) $submitType = pmcHandleMagicQuotes($submitType, '1', '', 'del'); /** * 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_SESS_DEL * 60, '' ); dbSessionstart(); /** * Defines the language to be used */ require('./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, true); /** * Validates the submitted form then registers the profile */ $isRegDone = false; if (isset($submitType) && $submitType == L_REG_3) { if (C_BAD_WORDS) include('./lib/swearing.lib.' . C_EXTENSION); // Validates the nick if (!$isJsValidated && trim($nick) == '') { $error = L_ERR_USR_5; } else if (!$isJsValidated && ereg('[\, ]', $nick)) { $error = L_ERR_USR_16; } else if (C_BAD_WORDS && checkWords($nick, true)) { $error = L_ERR_USR_18; } // Validates the password else if (!$isJsValidated && !C_EMAIL_PASWD && $password == '') { $error = L_ERR_USR_6; } // Validates the first and last names else if (!$isJsValidated && (trim($firstName) == '' || trim($lastName) == '')) { $error = L_ERR_USR_15; } // Validates the e-mail address else if (!$isJsValidated && trim($email) == '') { $error = L_ERR_USR_7; } else if (!$isJsValidated && !eregi('^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$', $email)) { $error = L_ERR_USR_8; } else if (C_EMAIL_PASWD && !checkdnsrr(substr(strstr($email, '@'), 1), 'ANY')) { $error = L_ERR_USR_8; } // Ensures the nick is not already reserved then registers the new profile else { $dbLink = new pmcDB; $slashedNick = pmcSlashSingleQuotes($nick); $dbLink->query("SELECT COUNT(*) FROM " . C_REG_TBL . " WHERE username = '$slashedNick'"); list($isReserved) = $dbLink->nextRecord(); $dbLink->cleanResults(); // Nick is already reserved if ($isReserved != 0) { $error = L_ERR_USR_9; } // Nick is free else { $latin1 = (L_CHARSET == 'iso-8859-1'); $showEmail = (isset($showEmail) && $showEmail) ? 1 : 0; if (!isset($gender)) $gender = ''; // Gets the ip include('./lib/get_ip.lib.' . C_EXTENSION); // Defines the password if (C_EMAIL_PASWD) { include('./lib/gen_password.lib.' . C_EXTENSION); $password = genPassword(); } $pwdHash = md5($password); // Sends the password to the e-mail address if required if (C_EMAIL_PASWD) { $recipient = array($email => array($nick, L_CHARSET)); $subject = '[' . APP_NAME . '] ' . L_EMAIL_VAL_1; $body = L_SET_2 . ': ' . $nick . "\n"; $body .= L_REG_7 . ': ' . $password . "\n\n"; $body .= L_EMAIL_VAL_2 . "\n"; $body .= C_CHAT_URL . "\n"; if (!defined('_LIB_PHPMYMAILER_LOADED')) include('./lib/mailer.lib.' . C_EXTENSION); $mailHandler = new PHPMYMAILER(C_REG_SENDER, C_REG_EMAIL); $mailHandler->pmmSendEmail( $recipient, L_CHARSET, $subject, $body); if (!$mailHandler->pmmIsSent) $error = sprintf(L_EMAIL_VAL_ERR, C_REG_EMAIL, C_REG_SENDER); unset($mailHandler); } // Save the profile in the database and add the nick and the // password to the sessions data if (empty($error)) { $dbLink->query("INSERT INTO " . C_REG_TBL . " VALUES ('$slashedNick', $latin1, '$pwdHash', '" . pmcSlashSingleQuotes($firstName) . "', '" . pmcSlashSingleQuotes($lastName) . "', '" . pmcSlashSingleQuotes($spokenLang) . "', '$webSite', '$email', $showEmail, 'user', '', " . time() . ", '$ip', '$gender')"); $message = L_REG_9; $isRegDone = true; $dbSessionVars['nick'] = $nick; $dbSessionVars['pwdHash'] = $pwdHash; dbSessionSave(); } } $dbLink->close(); } } // end of the 'do register' work /** * Displays the profile registration page */ $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(APP_NAME); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript"> <!-- var jsErrorNick1 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_5))); ?>'; var jsErrorNick2 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_16))); ?>'; var jsErrorPswd = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_6))); ?>'; var jsErrorName = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_15))); ?>'; var jsErrorEmail1 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_7))); ?>'; var jsErrorEmail2 = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_8))); ?>'; var jsIsMailValid = <?php echo(C_EMAIL_PASWD); ?>; var formName = 'regProfile'; // --> </script> <script src="lib/profile_work.lib.js" type="text/javascript" language="javascript"></script> </head> <body onload="if (typeof(window.focus) != 'undefined') pmcGetFocus()"> <center> <p class="error"><?php echo((empty($error)) ? ' ' : $error); ?></p> <form action="profile_reg.<?php echo(C_EXTENSION); ?>" method="post" autocomplete="off" name="regProfile" onsubmit="return pmcRegProfileValidate()"> <?php // Put the session id in an hidden field echo(dbSessionSID('POST') . "\n"); ?> <input type="hidden" name="isJsValidated" value="0" /> <table border="0" cellpadding="3" class="table"> <tr> <td align="center"> <table border="0"> <tr> <th colspan="2" class="tabTitle"><?php echo(($isRegDone) ? $message : L_REG_6); ?></th> </tr> <tr> <th colspan="2"><?php if (!$isRegDone) echo(L_REG_37); else if (C_EMAIL_PASWD) echo(L_EMAIL_VAL_DONE); ?></th> </tr> <tr><td> </td></tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_SET_2); ?> :</td> <td valign="top"> <input type="text" name="nick" size="11" maxlength="10" value="<?php if (isset($nick)) echo(htmlspecialchars($nick)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <?php if (!C_EMAIL_PASWD) { ?> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_7); ?> :</td> <td valign="top"> <input type="password" name="password" size="11" maxlength="16" value="<?php if (isset($password)) echo(htmlspecialchars($password)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <?php } echo("\n"); ?> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_30); ?> :</td> <td valign="top"> <input type="text" name="firstName" size="11" maxlength="64" value="<?php if (isset($firstName)) echo(htmlspecialchars($firstName)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_31); ?> :</td> <td valign="top"> <input type="text" name="lastName" size="11" maxlength="64" value="<?php if (isset($lastName)) echo(htmlspecialchars($lastName)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_45); ?> :</td> <td valign="top"> <input type="radio" name="gender" value="1"<?php if (isset($gender) && $gender == 1) echo(' checked="checked"'); if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php echo(L_REG_46); ?><br /> <input type="radio" name="gender" value="2"<?php if (isset($gender) && $gender == 2) echo(' checked="checked"'); if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php echo(L_REG_47); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_36); ?> :</td> <td valign="top"> <input type="text" name="spokenLang" size="11" maxlength="64" value="<?php if (isset($spokenLang)) echo(htmlspecialchars($spokenLang)); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_32); ?> :</td> <td valign="top"> <input type="text" name="webSite" size="11" maxlength="64" value="<?php if (isset($webSite)) echo($webSite); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_8); ?> :</td> <td valign="top"> <input type="text" name="email" size="11" maxlength="64" value="<?php if (isset($email)) echo($email); ?>"<?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php if (!$isRegDone) echo('<span class="error">*</span>'); ?> </td> </tr> <tr> <td colspan="2" align="center"> <input type="checkbox" name="showEmail" value="1"<?php if (isset($showEmail) && $showEmail) echo(' checked="checked"'); ?><?php if ($isRegDone) echo(' readonly="readonly"'); ?> /> <?php echo(L_REG_33); ?> </td> </tr> </table> <br /><br /> <?php if (!$isRegDone) { ?> <input type="submit" name="submitType" value="<?php echo(L_REG_3); ?>" /> <?php } echo("\n"); ?> <input type="submit" name="submitType" value="<?php echo(L_REG_25); ?>" onclick="<?php if ($isRegDone) echo('pmcLoginToIndex(); '); ?>self.close(); return false;" /> </td> </tr> </table> </form> </center> </body> </html> <?php ?> |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/lib Modified Files: mailer.lib.php3 Added Files: login.lib.js login.lib.php3 profile_work.lib.js Log Message: The first dev. version that works! Still many things to do, of course... --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | Set of JavaScript functions used by the login form of phpMyChat. | // | | // | This library is called by the 'chat/lib/login.lib.php3' script. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: login.lib.js,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // Set of JavaScript functions used by the login form of phpMyChat. // /** * Validates briefly the login form */ function pmcLoginValidate() { // The replace function (js1.2) isn't supported -> no js tests are done if (typeof(document.forms['loginForm'].elements['authUsername'].value.replace) == 'undefined') return true; var nickField = document.forms['loginForm'].elements['authUsername']; var pswdField = document.forms['loginForm'].elements['authPassword']; var re = /\\|,| /; // Brief nick validation if (nickField.value.replace(/ /g, '') == '') // nick is empty { nickField.value = ''; nickField.focus(); alert(jsLoginErr); return false; } else if (re.test(nickField.value)) // invalid characters in { // the nick nickField.focus(); alert(jsLoginErr); return false; } // Brief password validation if (pswdField.value.replace(/ /g, '') == '') // password is empty { pswdField.value = ''; pswdField.focus(); alert(jsLoginErr); return false; } // All the tests have been succesfully passed -> submit the from return true; } // end of the 'pmcLoginValidate()' function /** * Sets the focus to the convenient field */ function pmcGetFocus() { window.focus(); document.forms['loginForm'].elements[jsFocusTo].focus(); } // end of the 'pmcGetFocus()' function --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This library allows to ensure: | // | - an user who logs in with a password had typed in the good settings; | // | - the access to administration pages is reserved to the administrator. | // | | // | It is called by the 'chat/admin.php3', the 'chat/profile_reg.php3', | // | the 'chat/profile_edit.php3', and the 'chat/profile_del.php3' scripts. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: login.lib.php3,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // Validates login. // /** * The user has typed in values to log in * * The 'pmcSlashSingleQuotes()' function is defined inside the * 'chat/lib/common.lib.php3' library */ if ((!empty($authUsername)) && (!empty($authPassword))) { // Ensures the password is a correct one $dbLoginLink = new pmcDB; $dbLoginLink->query("SELECT password, perms FROM " . C_REG_TBL . " WHERE username = '". pmcSlashSingleQuotes($authUsername) . "' LIMIT 1"); if (list($pwdHash, $perms) = $dbLoginLink->nextRecord()) { // Valid password if ($pwdHash == md5($authPassword)) { // Ensure the one who lauches the admin.php3 script is the admin if (isset($mustBeAdmin) && $perms != 'admin') { $error = L_ERR_USR_11; } else { $dbSessionVars['authUsername'] = $authUsername; $dbSessionVars['authPassword'] = $authPassword; dbSessionSave(); $doNotLogin = true; } } } // Unknown user or invalid password if (!isset($doNotLogin)) { $error = L_ERR_USR_10; } $dbLoginLink->cleanResults(); $dbLoginLink->close(); } /** * Displays the login page */ if (!isset($doNotLogin)) { // Sends HTTP headers // Uses the pmcHttpHeaders() function defined in 'chat/lib/common.lib.php3' to // send no-cache and charset HTTP headers pmcHttpHeaders(L_CHARSET, true); // Gets the name of the script that called the login library if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; $from = basename($PHP_SELF); // Initialise the username field if (!isset($authUsername) && dbSessionIsRegistered('nick')) $authUsername = $dbSessionVars['nick']; // If username exist, put focus to the password field else to the username $focus = (!empty($authUsername)) ? 'authPassword' : 'authUsername'; $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(APP_NAME); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript1.1"> <!-- var jsLoginErr = '<?php echo(pmcSlashSingleQuotes(str_replace('\\', '\\\\', L_ERR_USR_10))); ?>'; var jsFocusTo = '<?php echo($focus); ?>'; // --> </script> <script src="lib/login.lib.js" type="text/javascript" language="javascript1.1"></script> </head> <body onload="if (typeof(window.focus) != 'undefined') pmcGetFocus();"> <center> <p class="error"><?php echo((empty($error)) ? ' ' : $error); ?></p> <form action="<?php echo($from); ?>" method="post" autocomplete="off" name="loginForm" onsubmit="return pmcLoginValidate()"> <?php // Put the session id in an hidden field echo(dbSessionSID('POST') . "\n"); ?> <table border="0" cellpadding="3" class="table"> <tr> <td align="center"> <table border="0"> <tr> <th colspan="2" class="tabTitle"><?php echo(L_REG_14); ?></th> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_SET_2); ?> :</td> <td valign="top"> <input type="text" name="authUsername" size="11" maxlength="10" value="<?php if (isset($authUsername)) echo(htmlspecialchars($authUsername)); ?>" /> </td> </tr> <tr> <td align="right" valign="top" nowrap="nowrap"><?php echo(L_REG_7); ?> :</td> <td valign="top"> <input type="password" name="authPassword" size="11" maxlength="16" value="<?php if (isset($authPassword)) echo(htmlspecialchars($authPassword)); ?>" /> </td> </tr> </table> <br /> <input type="submit" name="submitType" value="<?php echo(L_REG_15); ?>" /> </td> </tr> </table> </form> </center> </body> </html> <?php exit(); } // end if (!isset($doNotLogin)) ?> --- NEW FILE --- // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | Set of JavaScript functions used by the scripts that allows to register, | // | edit or delete a profile. | // | | // | This library is called by the 'chat/profile_del.php3', the | // | 'chat/profile_edit.php3' and the 'chat/profile_reg.php3' scripts. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: profile_work.lib.js,v 1.1 2001/04/03 20:14:52 loic1 Exp $ // // Set of JavaScript functions used for the profile work. // /** * Sets the focus to the convenient field inside registration form */ function pmcGetFocus() { window.focus(); document.forms[formName].elements['nick'].focus(); } // end of the function 'pmcGetFocus()' /** * Validates briefly the profile form */ function pmcRegProfileValidate() { // The replace function (js1.2) isn't supported -> no js tests are done if (typeof(document.forms[formName].elements['nick'].value.replace) == 'undefined') return true; var nickField = document.forms[formName].elements['nick']; if (!jsIsMailValid) var pswdField = document.forms[formName].elements['password']; var fNameField = document.forms[formName].elements['firstName']; var lNameField = document.forms[formName].elements['lastName']; var emailField = document.forms[formName].elements['email']; var reNick = /\\|,| /; var reEmail = /^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$/i; // Brief nick validation if (nickField.value.replace(/ /g, '') == '') // nick is empty { nickField.value = ''; nickField.focus(); alert(jsErrorNick1); return false; } else if (reNick.test(nickField.value)) // invalid characters in { // the nick nickField.focus(); alert(jsErrorNick2); return false; } // Brief password validation if (!jsIsMailValid && pswdField.value.replace(/ /g, '') == '') // password is empty { pswdField.value = ''; pswdField.focus(); alert(jsErrorPswd); return false; } // Brief first and last name validation if (fNameField.value.replace(/ /g, '') == '') // first name is empty { fNameField.value = ''; fNameField.focus(); alert(jsErrorName); return false; } if (lNameField.value.replace(/ /g, '') == '') // last name is empty { lNameField.value = ''; lNameField.focus(); alert(jsErrorName); return false; } // Brief email validation if (emailField.value.replace(/ /g, '') == '') // email is empty { emailField.value = ''; emailField.focus(); alert(jsErrorEmail1); return false; } else if (!reEmail.test(emailField.value)) // invalid email address { emailField.focus(); alert(jsErrorEmail2); return false; } // All the tests have been succesfully passed -> submit the from document.forms[formName].elements['isJsValidated'].value = 1; return true; } // end of the function 'pmcRegProfileValidate()' /** * Inserts the login and the password at the start page form */ function pmcLoginToIndex() { if (typeof(window.opener) == 'undefined' || typeof(window.opener.window.document.forms['startingForm']) == 'undefined') return; var indexForm = window.opener.window.document.forms['startingForm']; var regForm = document.forms[formName]; indexForm.elements['nick'].value = regForm.elements['nick'].value; if (!jsIsMailValid) indexForm.elements['password'].value = regForm.elements['password'].value; } // end of the function 'pmcLoginToIndex()' /** * Puts the focus to the 'message' box if the window has been called by the * 'profile' command */ function pmcPutFocus() { if (typeof(window.focus) == 'undefined') // window.focus is a js1.1 method return; if (typeof(window.opener) == 'undefined' || window.opener.closed) return; if (window.opener.window.document.title == 'Hidden Input frame') targetFrame = window.opener.window.parent.frames['input'].window; else targetFrame = window.opener.window; with (targetFrame) { focus(); if (typeof(document.forms['inputForm']) != 'undefined' && typeof(document.forms['inputForm'].elements['message']) != 'undefined') document.forms['inputForm'].elements['message'].focus(); } } // end of the function 'pmcPutFocus()' Index: mailer.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/mailer.lib.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 |
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:57
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/turkish
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/turkish
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/turkish/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:07 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 65,69 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 65,69 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 71,76 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 71,76 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 82,86 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
--- 82,86 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:56
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/slovak
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/slovak
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/slovak/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:29:01 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 66,70 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 66,70 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 72,77 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 72,77 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 83,87 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 83,87 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:56
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/german
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/german
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/german/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:43 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 66,70 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 66,70 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 72,77 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 72,77 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 83,87 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
--- 83,87 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:56
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/korean
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/korean
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/korean/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:51 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 66,70 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 66,70 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 72,77 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 72,77 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 83,87 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 83,87 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:56
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/italian
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/italian
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/italian/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:48 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 67,71 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 67,71 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 73,78 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 73,78 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 84,88 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 84,88 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:56
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/french_canadian
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/french_canadian
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/french_canadian/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:31 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 65,69 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 65,69 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 71,76 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 71,76 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 82,86 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 82,86 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:14:56
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/russian
In directory usw-pr-cvs1:/tmp/cvs-serv5164/chat/localization/russian
Modified Files:
localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/russian/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:58 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:14:52 1.2
***************
*** 64,68 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 64,68 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 70,75 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 70,75 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 81,85 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 81,85 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:13:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/finnish
In directory usw-pr-cvs1:/tmp/cvs-serv4229/chat/localization/finnish
Modified Files:
localized.chat.php3 localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.chat.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/finnish/localized.chat.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.chat.php3 2001/03/28 22:28:24 1.1.1.1
--- localized.chat.php3 2001/04/03 20:12:49 1.2
***************
*** 147,150 ****
--- 147,151 ----
define('L_BEEP', 'Piippaus/ei piippausta kävijän saapuessa');
define('L_PROFILE', 'Näytä profiili');
+ define('L_NO_PROFILE', 'No profile');
// input frame
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/finnish/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:26 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:12:49 1.2
***************
*** 65,69 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 65,69 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 71,76 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 71,76 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 82,86 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 82,86 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:13:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/dutch
In directory usw-pr-cvs1:/tmp/cvs-serv4229/chat/localization/dutch
Modified Files:
localized.chat.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.chat.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/dutch/localized.chat.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.chat.php3 2001/03/28 22:28:23 1.1.1.1
--- localized.chat.php3 2001/04/03 20:12:49 1.2
***************
*** 148,151 ****
--- 148,152 ----
define('L_BEEP', 'Beep/no beep at user entrance');
define('L_PROFILE', 'Display profile');
+ define('L_NO_PROFILE', 'No profile');
// input frame
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:13:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/french
In directory usw-pr-cvs1:/tmp/cvs-serv4229/chat/localization/french
Modified Files:
localized.chat.php3 localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.chat.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/french/localized.chat.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.chat.php3 2001/03/28 22:28:27 1.1.1.1
--- localized.chat.php3 2001/04/03 20:12:49 1.2
***************
*** 146,149 ****
--- 146,150 ----
define('L_BEEP', 'Bip ou non à l\'entrée d\'un nouvel utilisateur');
define('L_PROFILE', 'Voir le profil');
+ define('L_NO_PROFILE', 'Pas de profil');
// input frame
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/french/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:28 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:12:49 1.2
***************
*** 65,69 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 65,69 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 71,76 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 71,76 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 82,86 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
--- 82,86 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<p><a name="top"></a></p>
<table border="5" cellpadding="5">
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:13:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/estonian
In directory usw-pr-cvs1:/tmp/cvs-serv4229/chat/localization/estonian
Modified Files:
localized.chat.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.chat.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/estonian/localized.chat.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.chat.php3 2001/03/28 22:28:08 1.1.1.1
--- localized.chat.php3 2001/04/03 20:12:49 1.2
***************
*** 146,149 ****
--- 146,150 ----
define('L_BEEP', 'Hääl/mitte kasutaja sisenemisel');
define('L_PROFILE', 'Näita andmeid');
+ define('L_NO_PROFILE', 'No profile');
// input frame
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:13:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/english
In directory usw-pr-cvs1:/tmp/cvs-serv4229/chat/localization/english
Modified Files:
localized.chat.php3 localized.tutorial.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.chat.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/english/localized.chat.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.chat.php3 2001/03/28 22:28:09 1.1.1.1
--- localized.chat.php3 2001/04/03 20:12:49 1.2
***************
*** 146,149 ****
--- 146,150 ----
define('L_BEEP', 'Beep/no beep at user entrance');
define('L_PROFILE', 'Display profile');
+ define('L_NO_PROFILE', 'No profile');
// input frame
Index: localized.tutorial.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/english/localized.tutorial.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.tutorial.php3 2001/03/28 22:28:10 1.1.1.1
--- localized.tutorial.php3 2001/04/03 20:12:49 1.2
***************
*** 67,71 ****
<script type="text/javascript" language="javascript1.1">
<!--
! function killPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
--- 67,71 ----
<script type="text/javascript" language="javascript1.1">
<!--
! function pmcKillPointer()
{
if (typeof(window.opener) != 'undefined' && !window.opener.closed)
***************
*** 73,78 ****
with (window.opener)
{
! if (typeof(tutorialWin) != 'undefined')
! tutorialWin = null;
focus();
}
--- 73,78 ----
with (window.opener)
{
! if (typeof(jsTutorialWin) != 'undefined')
! jsTutorialWin = null;
focus();
}
***************
*** 84,88 ****
! <body bgcolor="#CCCCFF" onunload="killPointer()">
<!-- Remove this § in translation files -->
<?php
--- 84,88 ----
! <body bgcolor="#CCCCFF" onunload="pmcKillPointer()">
<!-- Remove this § in translation files -->
<?php
|
|
From: Lo?c C. <lo...@us...> - 2001-04-03 20:13:28
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/danish
In directory usw-pr-cvs1:/tmp/cvs-serv4229/chat/localization/danish
Modified Files:
localized.chat.php3
Log Message:
The first dev. version that works! Still many things to do, of course...
Index: localized.chat.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/danish/localized.chat.php3,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** localized.chat.php3 2001/03/28 22:28:22 1.1.1.1
--- localized.chat.php3 2001/04/03 20:12:49 1.2
***************
*** 146,149 ****
--- 146,150 ----
define('L_BEEP', 'Beep/no beep at user entrance');
define('L_PROFILE', 'Display profile');
+ define('L_NO_PROFILE', 'No profile');
// input frame
|