From: Lo?c C. <lo...@us...> - 2001-05-31 19:56:36
|
Update of /cvsroot/phpmychat/phpMyChat-0.15 In directory usw-pr-cvs1:/tmp/cvs-serv5411 Added Files: phpMyChat.php3 chat_activity.php3 Log Message: Initial commit --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html | // +--------------------------------------------------------------------------+ // | This script is an example of what may be done to include phpMyChat into | // | an existing web page, regardless of its name (another example is the | // | the 'chat/index.php3' script). | // | You can also include such a file in a frameset. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <te...@ph...> | // +--------------------------------------------------------------------------+ // // $Id: phpMyChat.php3,v 1.1 2001/05/31 19:56:32 loic1 Exp $ // // Launches the phpMyChat script. // /** * Defines the relative path to the chat directory and gets the main library * * The lines below must be at the top of your file because * 'main_index.lib.php3' sets headers and cookies. */ // relative path from this file to the chat directory (empty if this file is in // the same directory than the chat) define('_CHAT_PATH', 'chat/'); // 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'); require('./' . _CHAT_PATH .'lib/index_libs/main_index.lib.' . C_EXTENSION); /** * Displays the starting form * * The 'pmcStartpageHeaders()' and 'pmcStartpageLayout()' functions are defined * inside the 'chat/lib/index_libs/main_index.lib.php3' library */ ?> <!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> <?php // You can put html head statements right after the '<head>' tag pmcStartpageHeaders(1, 1); ?> </head> <body class="chatBody"> <?php // If nothing other than phpMyChat is loaded in this page, or if you want // to have the same background color as phpMyChat for the whole page, // you have to modify the '<body>' tag to '<body class="chatBody">' // You can put html statements right after the '<body>' tag or add // php code here. pmcStartpageLayout(); // You can add php code here, or add html statements before the '</body>' tag. ?> </body> </html> --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html | // +--------------------------------------------------------------------------+ // | This script is an example of how to display in another page of your | // | website the list or number of users currently connected to the chat. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <te...@ph...> | // +--------------------------------------------------------------------------+ // // $Id: chat_activity.php3,v 1.1 2001/05/31 19:56:32 loic1 Exp $ // // Example of how to display the chat activity on a page. // /** * CONFIGURATION * * These lines must be at the top of your file and completed according to your * settings */ // Relative path from this page to your chat directory (empty if this file is // in the same directory than the chat) define('CA_CHAT_PATH', 'chat/'); // Build the HTML link to launch the chat (used by constants below) $chatLaunch = '<a href="phpMyChat.php3" target="_self">chatting</a>'; // Define what you want to be displayed $doShowPrivate = 0; // 1 to display users even if they are in a private room, // 0 else $doDisplayUsers = 1; // 0 to display only the number of connected users // 1 to display a list of users // Define some sentences define('CA_USERS_ON', '%s users are currently ' . $chatLaunch . (($doDisplayUsers) ? ':' : '.')); define('CA_USERS_OFF', 'Nobody is currently ' . $chatLaunch . '.'); /** * 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 the library that will grab the conncted users */ require('./' . CA_CHAT_PATH . 'lib/connected_users.lib.' . C_EXTENSION); /** * The html page */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <head> <title>Integration of the chat activity into your own web page</title> </head> <body> <table border="3" cellpadding="5"> <tr> <td> <?php echo pmcDisplayConnected($doShowPrivate, $doDisplayUsers); ?> </td> </tr> </table> </body> </html> |