<?php
// -------------------------------------------------
// included files

include("ie_global.php");
include("ie_config.php");
include("ie_tpl.php");
include("lang.inc.php");
include("admin.inc.php");

if ( $step == '' )
{
	$step = 1;
}

if ( $step == 1 )
{
	// show the form
	$con = '
 <form action="login.php" method="post">
  <p><span lang="zh-cn">'.$log_txt[0].' </span></p>
  <p><span lang="zh-cn">'.$log_txt[1].' </span>
  <input type="text" name="name" size="20" style="border: 1px solid #000000"></p>
  <p><span lang="zh-cn">'.$log_txt[2].' </span>
  <input type="password" name="pass" size="20" style="border: 1px solid #000000"></p>
  <input type="hidden" name="step" value="2">
  <p> </p>
  <p> </p>
  <input type="submit" value="'.$log_txt[3].'">
</form>
	';

	tpl_show( $con,$log_txt[4]);
}

if ( $step == 2 )
{
	if (($name == $superadmin)&&($pass == $password))
	{
		add_session( "logged" );
		$con = '
<p><span lang="zh-cn">'.$log_txt[5].'</span></p>
  <ul>
    <li><span lang="zh-cn"><a href="setting_wizard.php">'.$log_txt[6].'</a></span></li>
    <li><span lang="zh-cn"><a href="admin_wizard.php">'.$log_txt[7].'</a></span></li>
  </ul>

		';

		tpl_show( $con,$log_txt[8]);
		exit;
	}
	else
	{
		$con = '<a href="login.php" >'.$log_txt[9].'</a>...<p>';
		tpl_show( $con,$log_txt[10]);
		exit;
	}
}


?>