<?php 
defined('IN_HS') or exit('Access Denied');
include admintpl('header');
?>

<table cellpadding="2" cellspacing="1" class="tableborder">
  <tr>
    <th colspan=4><strong>外部数据导入配置</strong></th>
  </tr>
  <form name="myform" method="post" action="?mod=<?=$mod?>&file=<?=$file?>&action=<?=$action?>">
   <input name="setting[importtime]" type="hidden" <?php if(isset($setting['importtime'])){ ?> value="<?=$setting['importtime']?>" <?php } ?>>
	<tr> 
      <td class="tablerow" width="40%"><b>配置名称</b><font color="red">*</font><br>只能由小写字母和数字组成</td>
      <td colspan=3 class="tablerow"><input name="setting[name]" type="text" size="20" value="<?=$setting['name']?>"></td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>配置说明</b><br>可用中文</td>
      <td colspan=3 class="tablerow"><input name="setting[note]" type="text" size="50" value="<?=$setting['note']?>"></td>
    </tr>
    <tr> 
	<th colspan=4>数据库配置</th>
    </tr>


    <tr> 
      <td class="tablerow" width="40%"><b>数据库系统类型</b><font color="red">*</font></td>
      <td  colspan=3 class="tablerow"><input class="radio_style" type="radio" name="setting[database]" value="mysql" <? if($setting['database']=='mysql') { ?>checked<? } ?> >MYSQL&nbsp;&nbsp;&nbsp;&nbsp;<input class="radio_style" type="radio" name="setting[database]" value="mssql" <? if($setting['database']=='mssql') { ?>checked<? } ?> >MSSQL</td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>数据库主机地址</b><font color="red">*</font><br>
        如果是远程主机，请打开读取权限。</td>
      <td colspan=3 class="tablerow"><input name="setting[dbhost]" type="text" size="30" value="<?=$setting['dbhost']?>">	  </td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>数据库帐号</b><font color="red">*</font></td>
      <td  colspan=3 class="tablerow"><input name="setting[dbuser]" type="text" size="20" value="<?=$setting['dbuser']?>"></td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>数据库密码</b><font color="red">*</font></td>
      <td  colspan=3 class="tablerow"><input name="setting[dbpw]" type="password" size="20" value="<?=$setting['dbpw']?>"></td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>数据库名称</b><font color="red">*</font></td>
      <td  colspan=3 class="tablerow"><input name="setting[dbname]" type="text" size="20" value="<?=$setting['dbname']?>"></td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>数据表名称</b><font color="red">*</font></td>
      <td  colspan=3 class="tablerow"><input name="setting[table]" type="text" size="30" value="<?=$setting['table']?>"></td>
    </tr>
    <tr> 
      <th colspan=4>数据导入执行设置</th>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>导入后激活游戏分区ID</b><br>请以半角逗号隔开</td>
      <td colspan=3 class="tablerow"><input name="setting[actserv]" type="text" size="15" value="<?=$setting['actserv']?>"> 里面填服务器分区ID<br><?php foreach($areas as $value) { ?><font color=blue><?=$value['servername']?>的ID为：<?=$value['id']?></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?></td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>php执行超时时间</b></td>
      <td colspan=3 class="tablerow"><input name="setting[timelimit]" type="text" size="5" value="<?=$setting['timelimit']?>"> 秒</td>
    </tr>
    <tr> 
      <td class="tablerow" width="40%"><b>每次提取并导入数据条数</b></td>
      <td colspan=3 class="tablerow"><input name="setting[number]" type="text" size="5" value="<?=$setting['number']?>"> 条</td>
    </tr>
    <tr> 
      <td class="tablerow"></td>
      <td colspan=3 class="tablerow">
	  <input type="submit" class="btn" name="dosubmit" value=" 确定 "></td>
    </tr>
  </form>
</table>
</body>
</html>