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

include("ie_global.php");
include("ie_config.php");
include("ie_tpl.php");
include("lang.inc.php");
include_once("ie_count.php");
check( "logged" );
//



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

if ( $step == 1 )
{
	// show the config data
	$con = '
	<form action="setting_wizard.php" method="post">
	<p><span lang="zh-cn">'.$sw_txt[0].'<font size="5" color="#00FF00" face="Comic Sans MS"> 
IE++ </font>'.$sw_txt[1].'</span></p>
		<p>'.$sw_txt[2].'</p>
	  <table border="0" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[3].'</span></td>
      <td width="79%">
      <input type="text" name="nesitename" size="20" style="border: 1px solid #000000" value="'.$site_name.'"></td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[4].'</span></td>
      <td width="79%">
      <input type="text" name="neimgdir" size="20" style="border: 1px solid #000000" value="'.$img_dir.'"></td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[5].'</span></td>
      <td width="79%">
      <input type="text" name="nesysnotice" size="20" style="border: 1px solid #000000" value="'.$sys_notice.'"></td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[6].'</span></td>
      <td width="79%">
      <input type="text" name="neshowruntime" size="20" style="border: 1px solid #000000" value="'.$show_runtime.'">&nbsp;&nbsp;[on/off]</td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">&nbsp;</span></td>
      <td width="79%">¡¡</td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[7].'</span></td>
      <td width="79%">
      <input type="text" name="nelineinpage" size="20" style="border: 1px solid #000000" value="'.$line_in_page.'"></td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[8].'</span></td>
      <td width="79%">
      <input type="text" name="nedetaillen" size="20" style="border: 1px solid #000000" value="'.$detail_len.'"></td>
    </tr>
    <tr>
      <td width="21%">¡¡</td>
      <td width="79%">¡¡</td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[9].'</span></td>
      <td width="79%">
      <input type="text" name="nepicinpage" size="20" style="border: 1px solid #000000" value="'.$pic_in_page.'"></td>
    </tr>
    <tr>
      <td width="21%"><span lang="zh-cn">'.$sw_txt[10].'</span></td>
      <td width="79%">
      <input type="text" name="nesmimgstyle" size="20" style="border: 1px solid #000000" value="'.$smimg_style.'">&nbsp;&nbsp;[up/whole]</td>
    </tr>
    <tr>
      <td width="21%">¡¡</td>
      <td width="79%">¡¡</td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><span lang="zh-cn">'.$sw_txt[11].'</span></td>
    </tr>
    <tr>
      <td width="100%" colspan="2">
      <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FF0000" width="100%" id="AutoNumber2">
        <tr>
          <td width="100%">
          <table border="0" cellpadding="0" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">
            <tr>
              <td width="21%"><span lang="zh-cn">'.$sw_txt[12].'</span></td>
              <td width="79%">
              <input type="text" name="negdsupport" size="20" style="border: 1px solid #000000" value="'.$gd_support.'">&nbsp;&nbsp;[enable/disable]</td>
            </tr>
            <tr>
              <td width="21%"><span lang="zh-cn">'.$sw_txt[13].'</span></td>
              <td width="79%">
              <input type="text" name="nesmimgcreate" size="20" style="border: 1px solid #000000" value="'.$smimg_create.'">&nbsp;&nbsp;[on/off]</td>
            </tr>
          </table>
          </td>
        </tr>
      </table>
      </td>
    </tr>
  </table><p>
		<input type="hidden" name="step" value="2">
		<input type="submit" value="'.$sw_txt[14].'">
</form>
	';
	tpl_show( $con,$sw_txt[15]);
}

if ( $step == 2 )
{
	/*
if (!@ImageCreate (50, 100))
{
	$gd_s = 'disable';
	$sm_imgs = 'off';
}else
{
	$gd_s = 'enable';
	$sm_imgs = 'on';
}
*/
	$neconf = '<'.'?php '."\n".'
	$site_name = "'.$nesitename.'";
	$img_dir = "'.$neimgdir.'";
	$line_in_page = "'.$nelineinpage.'";
	$pic_in_page = "'.$nepicinpage.'";
	$sys_notice = "'.$nesysnotice.'";
	$show_runtime = "'.$neshowruntime.'";
	$detail_len = "'.$nedetaillen.'";
	$gd_support = "'.$negdsupport.'";
	$smimg_create = "'.$nesmimgcreate.'";
	$smimg_style = "'.$nesmimgstyle.'";	
	'."\n".' ?'.'>';

write2_file_new('ie_config.php',$neconf);

$con = '
'.$sw_txt[16].'<p>
<a href="javascript:history.back(-1)">'.$sw_txt[17].'</a><p>
<a href="ie_main.php">'.$sw_txt[18].'</a><p>
';

tpl_show( $con,$sw_txt[19]);
}
?>