File indexing completed on 2024-12-22 05:33:23
0001 <?php 0002 0003 /* 0004 * GFX 4 0005 * 0006 * support: happy.snizzo@gmail.com 0007 * website: http://www.gfx3.org 0008 * credits: Claudio Desideri 0009 * 0010 * This software is released under the MIT License. 0011 * http://opensource.org/licenses/mit-license.php 0012 */ 0013 0014 class EUtility { 0015 0016 //actually this function is needed by some files, but I don't actually know why. 0017 //and what this function did. Put this for now, but can generate errors. 0018 public static function stripslashes($string) { 0019 return str_replace('\\','',$string); 0020 } 0021 0022 public static function br2nl($string) { 0023 return str_replace('<br>', '\r\n', $string); 0024 } 0025 0026 public static function nl2br($string) { 0027 $string = str_replace('\r\n', '<br>', $string); 0028 $string = str_replace('\r', '<br>', $string); 0029 $string = str_replace('\n', '<br>', $string); 0030 return $string; 0031 } 0032 0033 public static function redirect($page) 0034 { 0035 header('location: $page'); 0036 } 0037 0038 /* 0039 * TODO DOC 0040 */ 0041 public static function hide_output() 0042 { 0043 ob_start(); 0044 } 0045 0046 public static function show_output() 0047 { 0048 return ob_get_clean(); 0049 } 0050 0051 /** 0052 * DEPRECATED 0053 * moved to EPageProperties 0054 * kept this for retrocompatibility 0055 * use EPageProperties 0056 */ 0057 public static function get_domain($domain, $debug = false) 0058 { 0059 return EPageProperties::get_domain($domain, $debug); 0060 } 0061 0062 /** 0063 * DEPRECATED 0064 * moved to EPageProperties 0065 * kept this for retrocompatibility 0066 * use EPageProperties 0067 */ 0068 public static function get_clear_domain($domain) 0069 { 0070 return EPageProperties::get_clear_domain($domain); 0071 } 0072 0073 0074 } 0075 0076 ?>