!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/squirrelmail/functions/encode/   drwxr-xr-x
Free 130.04 GB of 142.11 GB (91.51%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     utf_8.php (4.29 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * utf-8 encoding functions
 *
 * takes a string of unicode entities and converts it to a utf-8 encoded string
 * each unicode entitiy has the form &#nnn(nn); n={0..9} and can be displayed by utf-8 supporting
 * browsers. Ascii will not be modified.
 *
 * Original code is taken from www.php.net manual comments
 * Original author: ronen at greyzone dot com
 *
 * @copyright 2004-2010 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: utf_8.php 13893 2010-01-25 02:47:41Z pdontthink $
 * @package squirrelmail
 * @subpackage encode
 */

/**
 * Converts string to utf-8
 * @param string $string text with numeric unicode entities
 * @return string utf-8 encoded text
 */
function charset_encode_utf_8 ($string) {
   
// don't run encoding function, if there is no encoded characters
   
if (! preg_match("'&#[0-9]+;'",$string) ) return $string;

    
$string=preg_replace("/&#([0-9]+);/e","unicodetoutf8('\\1')",$string);
    
// $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoutf8(hexdec('\\1'))",$string);

    
return $string;
}

/**
 * Return utf8 symbol when unicode character number is provided
 *
 * This function is used internally by charset_encode_utf_8
 * function. It might be unavailable to other SquirrelMail functions.
 * Don't use it or make sure, that functions/encode/utf_8.php is
 * included.
 *
 * @param int $var decimal unicode value
 * @return string utf8 character
 */
function unicodetoutf8($var) {

    if (
$var 128) {
        
$ret chr ($var);
    } else if (
$var 2048) {
        
// Two byte utf-8
        
$binVal str_pad (decbin ($var), 11"0"STR_PAD_LEFT);
        
$binPart1 substr ($binVal05);
        
$binPart2 substr ($binVal5);

        
$char1 chr (192 bindec ($binPart1));
        
$char2 chr (128 bindec ($binPart2));
        
$ret $char1 $char2;
    } else if (
$var 65536) {
        
// Three byte utf-8
        
$binVal str_pad (decbin ($var), 16"0"STR_PAD_LEFT);
        
$binPart1 substr ($binVal04);
        
$binPart2 substr ($binVal46);
        
$binPart3 substr ($binVal10);

        
$char1 chr (224 bindec ($binPart1));
        
$char2 chr (128 bindec ($binPart2));
        
$char3 chr (128 bindec ($binPart3));
        
$ret $char1 $char2 $char3;
    } else if (
$var 2097152) {
        
// Four byte utf-8
        
$binVal str_pad (decbin ($var), 21"0"STR_PAD_LEFT);
        
$binPart1 substr ($binVal03);
        
$binPart2 substr ($binVal36);
        
$binPart3 substr ($binVal96);
        
$binPart4 substr ($binVal15);

        
$char1 chr (240 bindec ($binPart1));
        
$char2 chr (128 bindec ($binPart2));
        
$char3 chr (128 bindec ($binPart3));
        
$char4 chr (128 bindec ($binPart4));
        
$ret $char1 $char2 $char3 $char4;
    } else if (
$var 67108864) {
        
// Five byte utf-8
        
$binVal str_pad (decbin ($var), 26"0"STR_PAD_LEFT);
        
$binPart1 substr ($binVal02);
        
$binPart2 substr ($binVal26);
        
$binPart3 substr ($binVal86);
        
$binPart4 substr ($binVal14,6);
        
$binPart5 substr ($binVal20);

        
$char1 chr (248 bindec ($binPart1));
        
$char2 chr (128 bindec ($binPart2));
        
$char3 chr (128 bindec ($binPart3));
        
$char4 chr (128 bindec ($binPart4));
        
$char5 chr (128 bindec ($binPart5));
        
$ret $char1 $char2 $char3 $char4 $char5;
    } else if (
$var 2147483648) {
        
// Six byte utf-8
        
$binVal str_pad (decbin ($var), 31"0"STR_PAD_LEFT);
        
$binPart1 substr ($binVal01);
        
$binPart2 substr ($binVal16);
        
$binPart3 substr ($binVal76);
        
$binPart4 substr ($binVal13,6);
        
$binPart5 substr ($binVal19,6);
        
$binPart6 substr ($binVal25);

        
$char1 chr (252 bindec ($binPart1));
        
$char2 chr (128 bindec ($binPart2));
        
$char3 chr (128 bindec ($binPart3));
        
$char4 chr (128 bindec ($binPart4));
        
$char5 chr (128 bindec ($binPart5));
        
$char6 chr (128 bindec ($binPart6));
        
$ret $char1 $char2 $char3 $char4 $char5 $char6;
    } else {
        
// there is no such symbol in utf-8
        
$ret='?';
    }
    return 
$ret;
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0147 ]--