| Server IP : 104.21.17.213 / Your IP : 216.73.217.141 Web Server : Apache System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64 User : corbizre ( 1013) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/corbizre/nextgreathome.com/lib/ |
Upload File : |
<?php
function spin($pass){
$mytext = $pass;
while(inStr("}",$mytext)){
$rbracket = strpos($mytext,"}",0);
$tString = substr($mytext,0,$rbracket);
$tStringToken = explode("{",$tString);
$tStringCount = count($tStringToken) - 1;
$tString = $tStringToken[$tStringCount];
$tStringToken = explode("|",$tString);
$tStringCount = count($tStringToken) - 1;
$i = rand(0,$tStringCount);
$replace = $tStringToken[$i];
$tString = "{".$tString."}";
$mytext = str_replaceFirst($tString,$replace,$mytext);
}
return $mytext;
}
function str_replaceFirst($s,$r,$str){
$l = strlen($str);
$a = strpos($str,$s);
$b = $a + strlen($s);
$temp = substr($str,0,$a) . $r . substr($str,$b,($l-$b));
return $temp;
}
function inStr($needle, $haystack){
return @strpos($haystack, $needle) !== false;
}
function getvar($tKey, $tSrcArr, $tDefValue=false)
{
$res = $tDefValue;
if (isset($tSrcArr[$tKey])){
$res = $tSrcArr[$tKey];
}
return $res;
}
function replace_images($template_content)
{
$allchars = '-:=%;a-zA-Z\\/0-9_\. ';
$eregReplacePattern = "(<img[$allchars\'\"]*src=)([\"'])([$allchars]*)([\"'])";
return preg_replace('/' . addcslashes($eregReplacePattern, '/') . '/', "\\1\\2". HTTP_PATH ."\\3\\4", $template_content);
}
function getstr($key, $arr, $defval = '')
{
return trim(stripslashes(getvar($key, $arr, $defval)));
}
function getint($key, $arr, $defval = 0)
{
$str = getstr($key, $arr, $defval);
if (preg_match('/^\-{0,1}[0-9]+$/', $str)){
return $str;
}
return $defval;
}
function isArray($arr)
{
return is_array($arr) && count($arr) > 0;
}
function is_ie()
{
return substr_count($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0') > 0;
}
function is_validator()
{
return substr_count($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') > 0;
}
function is_gecko()
{
return substr_count($_SERVER['HTTP_USER_AGENT'], 'Gecko') > 0;
}
function gebug($debug,$message){
if($debug){ echo $message;}
}
function print_gzipped_page() {
global $HTTP_ACCEPT_ENCODING;
if( headers_sent() ){
$encoding = false;
}elseif( strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false ){
$encoding = 'x-gzip';
}elseif( strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false ){
$encoding = 'gzip';
}else{
$encoding = false;
}
if( $encoding ){
$contents = ob_get_contents();
ob_end_clean();
header('Content-Encoding: '.$encoding);
print("\x1f\x8b\x08\x00\x00\x00\x00\x00");
$size = strlen($contents);
$contents = gzcompress($contents, 9);
$contents = substr($contents, 0, $size);
print($contents);
exit();
}else{
ob_end_flush();
exit();
}
}
/*
Copyright 2007-2008 Brenton Fletcher. http://bloople.net/num2text
You can use this freely and modify it however you want.
*/
function convertNumber($num,$dec = 0) {
@list ($num, $dec) = explode ( ".", $num );
$output = "";
if ($num[0] == "-") {
$output = "negative ";
$num = ltrim ( $num, "-" );
} else if ($num[0] == "+") {
$output = "positive ";
$num = ltrim ( $num, "+" );
}
if ($num[0] == "0") {
$output .= "zero";
} else {
$num = str_pad ( $num, 36, "0", STR_PAD_LEFT );
$group = rtrim ( chunk_split ( $num, 3, " " ), " " );
$groups = explode ( " ", $group );
$groups2 = array ();
foreach ( $groups as $g )
$groups2 [] = convertThreeDigit ( $g[0], $g[1], $g[2] );
for ($z = 0; $z < count($groups2); $z ++) {
if ($groups2 [$z] != "") {
$output .= $groups2 [$z] . convertGroup ( 11 - $z ) . ($z < 11 && ! array_search ( '', array_slice ( $groups2, $z + 1, - 1 ) ) && $groups2 [11] != '' && $groups [11][0] == '0' ? " and " : ", ");
}
}
$output = rtrim ( $output, ", " );
}
if ($dec > 0) {
$output .= " point";
for($i = 0; $i < strlen ( $dec ); $i ++)
$output .= " " . convertDigit ( $dec[$i] );
}
return $output;
}
function convertGroup($index) {
switch ($index) {
case 11 :
return " decillion";
case 10 :
return " nonillion";
case 9 :
return " octillion";
case 8 :
return " septillion";
case 7 :
return " sextillion";
case 6 :
return " quintrillion";
case 5 :
return " quadrillion";
case 4 :
return " trillion";
case 3 :
return " billion";
case 2 :
return " million";
case 1 :
return " thousand";
case 0 :
return "";
}
}
function convertThreeDigit($dig1, $dig2, $dig3) {
$output = "";
if ($dig1 == "0" && $dig2 == "0" && $dig3 == "0")
return "";
if ($dig1 != "0") {
$output .= convertDigit ( $dig1 ) . " hundred";
if ($dig2 != "0" || $dig3 != "0")
$output .= " and ";
}
if ($dig2 != "0")
$output .= convertTwoDigit ( $dig2, $dig3 );
else if ($dig3 != "0")
$output .= convertDigit ( $dig3 );
return $output;
}
function convertTwoDigit($dig1, $dig2) {
if ($dig2 == "0") {
switch ($dig1) {
case "1" :
return "ten";
case "2" :
return "twenty";
case "3" :
return "thirty";
case "4" :
return "forty";
case "5" :
return "fifty";
case "6" :
return "sixty";
case "7" :
return "seventy";
case "8" :
return "eighty";
case "9" :
return "ninety";
}
} else if ($dig1 == "1") {
switch ($dig2) {
case "1" :
return "eleven";
case "2" :
return "twelve";
case "3" :
return "thirteen";
case "4" :
return "fourteen";
case "5" :
return "fifteen";
case "6" :
return "sixteen";
case "7" :
return "seventeen";
case "8" :
return "eighteen";
case "9" :
return "nineteen";
}
} else {
$temp = convertDigit ( $dig2 );
switch ($dig1) {
case "2" :
return "twenty-$temp";
case "3" :
return "thirty-$temp";
case "4" :
return "forty-$temp";
case "5" :
return "fifty-$temp";
case "6" :
return "sixty-$temp";
case "7" :
return "seventy-$temp";
case "8" :
return "eighty-$temp";
case "9" :
return "ninety-$temp";
}
}
}
function convertDigit($digit) {
switch ($digit) {
case "0" :
return "zero";
case "1" :
return "one";
case "2" :
return "two";
case "3" :
return "three";
case "4" :
return "four";
case "5" :
return "five";
case "6" :
return "six";
case "7" :
return "seven";
case "8" :
return "eight";
case "9" :
return "nine";
}
}
?>