Documentation is available at functions.inc
- <?php //-*-php-*-
- /* ******************************************************************** **
- ** Copyright notice **
- ** **
- ** (c) 1995-2003 PHPOpenChat Development Team **
- ** http://phpopenchat.sourceforge.net/ **
- ** **
- ** All rights reserved **
- ** **
- ** This script is part of the PHPOpenChat project. The PHPOpenChat **
- ** project is free software; you can redistribute it and/or modify **
- ** it under the terms of the GNU General Public License as published by **
- ** the Free Software Foundation; either version 2 of the License, or **
- ** (at your option) any later version. **
- ** **
- ** The GNU General Public License can be found at **
- ** http://www.gnu.org/copyleft/gpl.html. **
- ** A copy is found in the textfile GPL and important notices to the **
- ** license from the team is found in the textfile LICENSE distributed **
- ** with these scripts. **
- ** **
- ** This script is distributed in the hope that it will be useful, **
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of **
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
- ** GNU General Public License for more details. **
- ** **
- ** This copyright notice MUST APPEAR in all copies of the script! **
- ** ******************************************************************** */
- function escape_html ( $text ) {
- $text = preg_replace("/\'/", ''', $text );
- $text = preg_replace('/(.{70})/', '\0­', $text );//­ forces a line break if needed
- $text = preg_replace('/</', '<', $text ); //disallow html
- return ( $text );
- }
- function html_breaklines ($text) {
- if(MULTIPLE_LINE_INPUT) {
- $text = preg_replace('/\r\n|\n|\r/', '<br />', $text );
- $text = preg_replace('/><br \/>/', '>', $text );
- $text = '<p style="padding-left:50px;margin-top:0">'.$text.'</p>';
- }
- return($text);
- }
- function handle_adodb ($text) {
- // adodb doesn't update, if old value equals new value.
- // To force an update, we add a random comment (to the html line)
- // $text = $text.'<!--'.rand(0,15).'-->';
- return($text);
- }
- function deb ( $line, $what = 'all' ) {
- $_SESSION['logger']->debug($line);
- }
- ?>
Documentation generated on Tue, 29 Jun 2004 14:42:25 +0200 by phpDocumentor 1.3.0RC3