security=true; $smarty->secure_dir=array("./"); $smarty->compile_dir = $temporary_directory; $smarty->assign("umLanguageFile",$selected_language.".txt"); $smarty->assign("umEmail",$f_email); $jssource = " "; //$smarty->debugging = true; $smarty->assign("umServerType",strtoupper($mail_server_type)); switch(strtoupper($mail_server_type)) { case "DETECT": break; case "ONE-FOR-EACH": $aval_servers = count($mail_servers); $smarty->assign("umAvailableServers",$aval_servers); $php_ver = phpversion();$php_ver = explode(".", $php_ver);$phpver = $php_ver[0]; if ($phpver==4){ $name_url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $name_url = strtolower($name_url); $name_url = ereg_replace("www.","",$name_url); $name_urlex = explode("/",$name_url); $name_url = $name_urlex[0]; $name_url = ereg_replace("webmail.","",$name_url); }else if ($phpver==5){ $name_url = $_SERVER["HTTP_X_FORWARDED_HOST"]; if ($name_url==''){$name_url=$_SERVER["SERVER_NAME"];} if ($name_url=='tht.in'){$name_url=$_SERVER["HTTP_HOST"];} $name_url = strtolower($name_url); $name_url = ereg_replace("www.","",$name_url); $name_url = ereg_replace("webmail.","",$name_url); } if(!$aval_servers) die("You must set at least one server in \$mail_servers, please review your config.php"); if ($aval_servers == 1) { $strServers = "@".$name_url." "; } else { $strServers = "\r"; } $smarty->assign("umServer",$strServers); break; case "ONE-FOR-ALL": break; default: die("Unknown server mode, please see config.php"); } $smarty->assign("umUser",$f_user); $smarty->assign("umPass",$f_pass); $smarty->assign("umJS",$jssource); $avallangs = count($languages); if($avallangs == 0) die("You must provide at least one language"); $avalthemes = count($themes); if($avalthemes == 0) die("You must provide at least one theme"); $smarty->assign("umAllowSelectLanguage",$allow_user_change_language); $func($textout); if($allow_user_change_language) { $def_lng = (is_numeric($lid))?$lid:$default_language; $langsel = "\r"; $smarty->assign("umLanguages",$langsel); } $smarty->assign("umAllowSelectTheme",$allow_user_change_theme); if($allow_user_change_theme) { $def_tem = (is_numeric($tid))?$tid:$default_theme; $themsel = "\r"; $smarty->assign("umThemes", $themsel); } $smarty->display("$selected_theme/login.htm");