| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/components/com_sobi2/includes/ |
Upload File : |
<?php
/**
* @version $Id: string.class.php 5462 2010-08-18 08:25:37Z Sigrid Suski $
* @package: Sigsiu Online Business Index 2 (Sobi2)
* ===================================================
* @author
* Name: Sigrid & Radek Suski, Sigsiu.NET GmbH
* Email: sobi[at]sigsiu.net
* Url: http://www.sigsiu.net
* ===================================================
* @copyright Copyright (C) 2006 - 2010 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
* @license see http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*/
defined( '_SOBI2_' ) || exit("Restricted access");
class sobi2String {
function utf82iso88592( $tekscik )
{
$tekscik = str_replace("\xC4\x85", "???", $tekscik);
$tekscik = str_replace("\xC4\x84", '???', $tekscik);
$tekscik = str_replace("\xC4\x87", '???', $tekscik);
$tekscik = str_replace("\xC4\x86", '???', $tekscik);
$tekscik = str_replace("\xC4\x99", '???', $tekscik);
$tekscik = str_replace("\xC4\x98", '???', $tekscik);
$tekscik = str_replace("\xC5\x82", '???', $tekscik);
$tekscik = str_replace("\xC5\x81", '???', $tekscik);
$tekscik = str_replace("\xC3\xB3", '???', $tekscik);
$tekscik = str_replace("\xC3\x93", '???', $tekscik);
$tekscik = str_replace("\xC5\x9B", '???', $tekscik);
$tekscik = str_replace("\xC5\x9A", '???', $tekscik);
$tekscik = str_replace("\xC5\xBC", '???', $tekscik);
$tekscik = str_replace("\xC5\xBB", '???', $tekscik);
$tekscik = str_replace("\xC5\xBA", '???', $tekscik);
$tekscik = str_replace("\xC5\xB9", '???', $tekscik);
return $tekscik;
}
function iso885922utf8( $tekscik )
{
$tekscik = str_replace("ą", "\xC4\x85", $tekscik);
$tekscik = str_replace('Ą', "\xC4\x84", $tekscik);
$tekscik = str_replace('ć', "\xC4\x87", $tekscik);
$tekscik = str_replace('Ć', "\xC4\x86", $tekscik);
$tekscik = str_replace('ę', "\xC4\x99", $tekscik);
$tekscik = str_replace('Ę', "\xC4\x98", $tekscik);
$tekscik = str_replace('ł', "\xC5\x82", $tekscik);
$tekscik = str_replace('Ł', "\xC5\x81", $tekscik);
$tekscik = str_replace('ń', "\xC5\x84", $tekscik);
$tekscik = str_replace('Ń',"\xC5\x83", $tekscik);
$tekscik = str_replace('???', "\xC3\xB3", $tekscik);
$tekscik = str_replace('???', "\xC3\x93", $tekscik);
$tekscik = str_replace('ś', "\xC5\x9B", $tekscik);
$tekscik = str_replace('Ś', "\xC5\x9A", $tekscik);
$tekscik = str_replace('ż', "\xC5\xBC", $tekscik);
$tekscik = str_replace('Ż', "\xC5\xBB", $tekscik);
$tekscik = str_replace('ź', "\xC5\xBA", $tekscik);
$tekscik = str_replace('Ź', "\xC5\xB9", $tekscik);
return $tekscik;
}
function cleanString( $string )
{
$string = trim($string);
$badChars = '/(;|\*|\||`|>|<|&|~|!|@|#|\$|%|\*|:|;|\+|^|"|'."\n|\r|'".'|\{|\}|\[|\]|\)|\()/';
$string = preg_replace($badChars, "", $string);
return $string;
}
function jsAddSlashes($str)
{
$pattern = array(
"/\\\\/" , "/\n/" , "/\r/" , "/\"/" ,
"/\'/" , "/&/" , "/</" , "/>/"
);
$replace = array(
"\\\\\\\\", "\\n" , "\\r" , "\\\"" ,
"\\'" , "\\x26" , "\\x3C" , "\\x3E"
);
return preg_replace($pattern, $replace, $str);
}
}
?>