<?php
/************************************************************************
	UebiMiau is a GPL'ed software developed by 
	 - Aldoir Ventura - aldoir@users.sourceforge.net
	 - http://uebimiau.sourceforge.net SåÐ Paulo - Brasil
   		
	***********************************************************************
	Version 3.2.0 Upgrades and templates developed by
	 - Todd Henderson - Lead Developer - http://tdah.us 
	 - Dave Rodgers - Developer - http://www.manvel.net 
	 - Laurent (AdNovea) - Developer - http://adnovea.free.fr
	 
	***********************************************************************
	 - Special thanks to the developers at 
	codeworxtech.com, tinymce.moxiecode.com
	telaen.org, phptoys.com, winged.info, ngcoders.com
	without help this project wouldn't be possible 
	
	***********************************************************************/

// load the configurations
  require_once("./inc/config/config.system.php");
	require(CFG_APPS);
	require(SYS_LIB);
	
	require_once($SMARTY_DIR."Smarty.class.php");
	
	$smarty = new Smarty;
	
	$smarty->security=true;
	$smarty->secure_dir=array("./");
	$smarty->compile_dir = $temporary_directory."cached_templates";
	$smarty->template_dir =  './themes';
	$smarty->config_dir = substr(PATH_LANGS,0,-1);
	$smarty->use_sub_dirs = true;


	$smarty->assign("umLanguageFile",$selected_language.".txt");
	$smarty->assign("umCompany",$company);
	$smarty->assign("umEmail",$f_email);
	
	$error = ereg_replace("\[\]", "", $error);

// Log report	
	$blf = ($temporary_directory.DB_LOG_FILE);
	$date = date(LOG_DATE);
	$line = "<span class=\"log_date\">$date</span><span class=\"log_bad\">$f_user from $company had a log in error.</span><br>\n";
	$file = fopen($blf, 'a+');
	fwrite($file, $line);
	fclose($file);
	
// Set SMARTY variables for templates and display
	$smarty->assign("umDocType",DOC_TYPE);
	$smarty->assign("umServerResponse",$error);
	$smarty->assign("umLid",$lid);
	$smarty->assign("umTid",$selected_theme);
	$smarty->assign("umTPath",$selected_theme);			// Selected Theme path
	$smarty->assign("umSkin","default");				// No skin because not yet logged!
	
	$smarty->display("$selected_theme/".HTML_BAD_LOGIN);
	

?>