<?php

	$thisurl=$_SERVER['PHP_SELF'];   //  /ar/ls_admin/Checklogin.php
	$strpos=strripos($thisurl, "/");  // ls_admin 下运行
	$thisurl=substr($thisurl,0,$strpos);
	$strpos=strripos($thisurl, "/");
	$thisurl=substr($thisurl,$strpos-3,3);
	//echo $thisurl."===".$thisurllang;exit;
	if(substr($thisurl,0,1)=="/") {
		$thisurllang=substr($thisurl,1,2);
		
		if(deep_in_array($thisurllang, $translate_name) ){
			$_SESSION['landir']= $thisurllang;
			$_SESSION['dda']="../"; //多语种加一级路径
			foreach($translate_name as $k=>$val){ 
				if($val["translate_name"]==$thisurllang) $_SESSION['currLanName']= $val["name"];
			}
		}
		else
		{
			$_SESSION['landir']="";// /ar
			$_SESSION['currLanName']= "";
			$_SESSION['dda']= "";
		}
	} 
	else  
	{
		$_SESSION['landir']="";// /ar
		$_SESSION['currLanName']= "";
		$_SESSION['dda']= "";
	}

?>