From: Lo?c C. <lo...@us...> - 2001-04-04 17:30:51
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv21105 Added Files: help_popup.php3 Log Message: The help popup is running :) --- NEW FILE --- <?php // // +--------------------------------------------------------------------------+ // | phpMyChat version 0.15.0 | // +--------------------------------------------------------------------------+ // | Copyright (c) 2000-2001 The phpHeaven-team | // +--------------------------------------------------------------------------+ // | This script defines the 'help' popup. | // +--------------------------------------------------------------------------+ // | From the phpMyChat project: | // | http://www.phpheaven.net/projects/phpMyChat/ | // | | // | Authors: the phpHeaven-team <php...@ya...> | // +--------------------------------------------------------------------------+ // // $Id: help_popup.php3,v 1.1 2001/04/04 17:30:47 loic1 Exp $ // // The 'help' popup. // /** * Gets the extension for the php scripts */ if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; define('C_EXTENSION', (substr($PHP_SELF, -1) == 3) ? 'php3' : 'php'); /** * Gets some core libraries */ require('./config/config.lib.' . C_EXTENSION); require('./lib/common.lib.' . C_EXTENSION); /** * Gets the variables sent to this script * * Uses the 'pmcGrabGlobals()' function defined in the * 'chat/lib/common.lib.php3' library. */ pmcGrabGlobals('%GET'); /** * Defines the language to be used */ // set a "fake" dbSession array to avoid a security issue if (file_exists('./localization/' . $lang . '/localized.chat.' . C_EXTENSION)) { $dbSessionVars['lang'] = $lang; unset($lang); } if (!isset($dbSessionVars)) include('./localization/languages.lib.' . C_EXTENSION); require('./localization/' . $dbSessionVars['lang'] . '/localized.chat.' . C_EXTENSION); /** * Sends HTTP headers * * The 'pmcHttpHeaders()' fonction is defined in the 'chat/lib/common.lib.php3' * library */ pmcHttpHeaders(L_CHARSET, false); /** * Displays the frame * * Uses the 'pmcUrlForStyleSheet()' function from the * 'chat/lib/common.lib.php3' library */ // The url for the style sheet $cssUrl = pmcUrlForStyleSheet('style', L_CHARSET, (defined('L_FONT_NAME')) ? L_FONT_NAME : '', L_FONT_SIZE); // Text direction and horizontal alignment for cells topic $textDirection = (L_CHARSET == 'windows-1256') ? 'rtl' : 'ltr'; $cellAlign = (L_CHARSET == 'windows-1256') ? 'right' : 'left'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html dir="<?php echo($textDirection); ?>"> <head> <title><?php echo(L_HLP); ?></title> <link rel="stylesheet" href="<?php echo($cssUrl); ?>" type="text/css" /> <script type="text/javascript" language="javascript1.1"> <!-- function targetWin() { if (typeof(window.opener) == 'undefined') return null; else if (window.opener.window.document.title == '<?php echo(APP_NAME); ?>') return window.opener.frames['input'].window; else if (window.opener.window.document.title == 'Handle input hidden frame') return window.opener.window.parent.frames['input'].window; else return window.opener.window; } function smiley2Input(code) { window.focus(); if (typeof(window.opener) != 'undefined' && window.opener && !window.opener.closed) { addTo = targetWin(); if (addTo && !addTo.closed) addTo.document.forms['inputForm'].elements['message'].value += code; } } function cmd2Input(code, addString) { window.focus(); if (typeof(window.opener) != 'undefined' && window.opener && !window.opener.closed) { addTo = targetWin(); if (addTo && !addTo.closed) { oldStr = (addString) ? addTo.document.forms['inputForm'].elements['message'].value : ''; if (addString && (oldStr == '' || oldStr.substring(0,1) != ' ')) oldStr = ' ' + oldStr; addTo.document.forms['inputForm'].elements['message'].value = code + oldStr; } } } //--> </script> </head> <body class="mainframe" onload="if (window.focus) window.focus()"> <center> <?php // Display smilies if (C_USE_SMILIES == 1) { include('./lib/smilies.lib.' . C_EXTENSION); $smiliesCnt = count($smilies); $smiliesCodes = array(); displaySmilies($smiliesCodes, $smilies, $smiliesCnt, 'help'); unset($smilies); ?> <!-- Smilies codes --> <table border="0" cellpadding="3" width="574" class="table"> <tr> <th class="tabtitle" colspan="<?php echo($smiliesCnt); ?>"><?php echo(L_HELP_TIT_1); ?></th> </tr> <?php $i = 0; $smiliesCnt = count($smiliesCodes); while ($i < $smiliesCnt) { if ($i > 0) echo("\t"); echo('<tr valign="bottom">' . "\n"); echo($smiliesCodes[$i]); echo("\t" . '</tr>' . "\n"); echo("\t" . '<tr>' . "\n"); $i++; echo($smiliesCodes[$i]); echo("\t" . '</tr>' . "\n"); $i++; } unset($smiliesCodes); ?> </table> <br /> <?php } // end of display smilies if (C_HTML_TAGS_KEEP != 'none') { echo("\n"); ?> <!-- Text formatting help --> <table border="0" cellpadding="3" width="574" class="table"> <tr><td align="center" class="tabtitle"><?php echo(L_HELP_TIT_2); ?></td></tr> <tr><td align="<?php echo($cellAlign); ?>"><?php echo(L_HELP_FMT_1); ?></td></tr> <tr><td align="<?php echo($cellAlign); ?>"><?php echo(L_HELP_FMT_2); ?></td></tr> </table> <br /> <?php } echo("\n"); ?> <!-- Commands help --> <table border="0" cellpadding="3" width="574" class="table"> <tr><th align="center" class="tabtitle" colspan="2"><?php echo(L_HELP_TIT_3); ?></th></tr> <tr><th align="center" colspan="2"><?php echo(L_HELP_CMD_0); ?></th></tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/!', false); return false" class="sender">/!</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_7); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/ANNOUNCE', true); return false" class="sender">/announce {<?php echo(L_HELP_MSG); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_17); ?></td> </tr> <?php if (C_BANISH != 0) { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/BAN', true); return false" class="sender">/ban <bdo dir="<?php echo($textDirection); ?>">[*]</bdo> {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_19); ?></td> </tr> <?php } // $jsVersion value is 'high' for dynamic rendering of the messages frame, 'low' // or 'medium' in other case if ($jsVersion == 'high') { echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/CLEAR', false); return false" class="sender">/clear</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_15); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/IGNORE', true); return false" class="sender">/ignore <bdo dir="<?php echo($textDirection); ?>">[-]</bdo> <?php echo('[' . L_HELP_USR . '[,' . L_HELP_USR . '...]]'); ?></a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_6); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/INVITE', true); return false" class="sender">/invite {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_18); ?></td> </tr> <?php if (C_VERSION > 0) { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/JOIN', true); return false" class="sender">/join <bdo dir="<?php echo($textDirection); ?>">[n]</bdo> {#<?php echo(L_HELP_ROOM); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_4); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/KICK', true); return false" class="sender">/kick {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_9); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/ME', true); return false" class="sender">/me {<?php echo(L_HELP_MSG); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_20); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"> <a href="#" onclick="cmd2Input('/MSG', true); return false" class="sender">/msg <?php echo('{' . L_HELP_USR . '} {' . L_HELP_MSG .'}'); ?></a><br /> <a href="#" onclick="cmd2Input('/TO', true); return false" class="sender">/to <?php echo('{' . L_HELP_USR . '} {' . L_HELP_MSG . '}'); ?></a> </th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_10); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/NOTIFY', false); return false" class="sender">/notify</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_13); ?></td> </tr> <?php if ($jsVersion == 'high') { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/ORDER', false); return false" class="sender">/order</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_3); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/PROFILE', false); return false" class="sender">/profile</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_12); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/PROMOTE', true); return false" class="sender">/promote {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_14); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"> <a href="#" onclick="cmd2Input('/QUIT', true); return false" class="sender">/quit [<?php echo(L_HELP_MSG); ?>]</a><br /> <a href="#" onclick="cmd2Input('/EXIT', true); return false" class="sender">/exit [<?php echo(L_HELP_MSG); ?>]</a><br /> <a href="#" onclick="cmd2Input('/BYE', true); return false" class="sender">/bye [<?php echo(L_HELP_MSG); ?>]</a> </th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_5); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/REFRESH', true); return false" class="sender">/refresh <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a></th></tr> <tr> <td width="10"> </td> <td><?php echo(($jsVersion == 'high') ? L_HELP_CMD_2b : L_HELP_CMD_2a); ?></td> </tr> <?php if (C_SAVE != 0) { ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/SAVE', true); return false" class="sender">/save <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_16); ?></td> </tr> <?php } echo("\n"); ?> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"> <a href="#" onclick="cmd2Input('/SHOW', true); return false" class="sender">/show <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a> <?php if ($jsVersion == 'high') { ?> <br /> <a href="#" onclick="cmd2Input('/LAST', true); return false" class="sender">/last <bdo dir="<?php echo($textDirection); ?>">[n]</bdo></a> <?php } echo("\n"); ?> </th></tr> <tr> <td width="10"> </td> <td><?php echo(($jsVersion == 'high') ? L_HELP_CMD_1b : L_HELP_CMD_1a); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/TIMESTAMP', false); return false" class="sender">/timestamp</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_8); ?></td> </tr> <tr><th align="<?php echo($cellAlign); ?>" colspan="2"><a href="#" onclick="cmd2Input('/WHOIS', true); return false" class="sender">/whois {<?php echo(L_HELP_USR); ?>}</a></th></tr> <tr> <td width="10"> </td> <td><?php echo(L_HELP_CMD_11); ?></td> </tr> </table> </center> </body> </html> |