Server : Apache
System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/saimikebio.com/ecshopjcw/templates/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/saimikebio.com/ecshopjcw/templates/convert_main.htm
<!-- $Id: convert_main.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{include file="pageheader.htm"}
<div class="list-div">
<form name="theForm">
<table cellpadding="3" cellspacing="1">
  <tr>
    <td colspan="4"><span style="color:#FF0000;"><strong>{$lang.confirm_convert}</strong></span><br />
    {$lang.backup_data}<a href="database.php?act=backup"><strong>{$lang.backup}</strong></a></td>
  </tr>
  <tr>
    <td colspan="4">{$lang.select_system}
      <select name="selModule" id="selModule">
        {foreach from=$module_list item=module}
          <option value="{$module.code}">{$module.desc}</option>
        {/foreach}
      </select>
      {$lang.note_select_system}</td>
    </tr>
  <tr>
    <td colspan="4">{$lang.select_charset}
      <select name="selCharset" id="selCharset">
        {html_options options=$charset_list}
      </select>
      {$lang.note_select_charset}</td>
  </tr>
  <tr>
    <td colspan="4"><strong>{$lang.your_config}</strong><br />{$lang.dir_notes}</td>
    </tr>
  <tr>
    <td><div align="right"><strong>{$lang.your_host}</strong></div></td>
    <td><input name="host" type="text" id="host" value="{$def_val.host}" /></td>
    <td><div align="right"><strong>{$lang.your_db}</strong></div></td>
  <td><input name="db" type="text" id="db" value="{$def_val.db}" /></td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.your_user}</strong></div></td>
    <td><input name="user" type="text" id="user" value="{$def_val.user}" /></td>
    <td><div align="right"><strong>{$lang.your_pass}</strong></div></td>
    <td><input name="pass" type="password" id="pass" value="{$def_val.pass}" /></td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.your_prefix}</strong></div></td>
    <td><input name="prefix" type="text" id="prefix" value="{$def_val.prefix}" /></td>
    <td><div align="right"><strong>{$lang.your_path}</strong></div></td>
    <td><input name="path" type="text" id="path" value="{$def_val.path}" /></td>
  </tr>
  <tr>
    <td colspan="4"><div align="center">
        <input name="convert" type="button" class="button" id="convert" onclick="convertData()" value="{$lang.convert}" />
    </div></td>
    </tr>
  <tr>
    <td colspan="4"><span id="status_1"></span><br /><span id="status_2"></span><br /><span id="status_3"></span></td>
  </tr>
  <tr>
    <td colspan="4"><strong>{$lang.remark}</strong><br />{$lang.remark_info}</td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="javascript">
  /**
   * 检查可选系统
   */
  function checkSystem()
  {
    var sel = document.forms['theForm'].elements['selModule'];
    if (sel.options.length <= 0)
    {
      alert(no_system);
      return false;
    }
    return true;
  }

  /**
   * 检查设置
   */
  function checkConfig()
  {
    if (!checkSystem())
    {
      return false;
    }
    var validator = new Validator('theForm');
    validator.required('host', host_not_null);
    validator.required('db', db_not_null);
    validator.required('user', user_not_null);
    validator.required('path', path_not_null);
    return validator.passed();
  }

  /**
   * 转换
   */
  function convertData()
  {
    // 检查设置
    if (!checkConfig())
    {
      return;
    }

    // 取得设置
    var config = new Object();
    var ele = document.forms['theForm'].elements;
    config.host    = ele['host'].value;
    config.db      = ele['db'].value;
    config.user    = ele['user'].value;
    config.pass    = ele['pass'].value;
    config.prefix  = ele['prefix'].value;
    config.code    = ele['selModule'].value;
    config.path    = ele['path'].value;
    config.charset = ele['selCharset'].value;

    // 测试数据库链接,检查表,检查目录
    output(check_your_db);
    Ajax.call('convert.php?is_ajax=1&act=check', config, response, 'POST', 'JSON');
  }

  function response(result)
  {
    if (!result.error)
    {
      if (result.content.length > 0)
      {
        output(result.message);
        Ajax.call('convert.php?is_ajax=1&act=process', 'step=' + result.content, response, 'POST', 'JSON');
      }
      else
      {
        output(act_ok);
        alert(act_ok);
      }
    }
    else
    {
      output(result.message);
      alert(result.message);
    }
  }

  /**
   * 输出信息
   * @param string msg
   */
  function output(msg)
  {
    today = new Date();
    msg = today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds() + '   ' + msg;
    for (i = 3; i > 1; i--)
    {
      document.getElementById('status_' + i).innerHTML = document.getElementById('status_' + (i - 1)).innerHTML;
    }
    document.getElementById('status_1').innerHTML = msg;
  }
</script>
{/literal}
{include file="pagefooter.htm"}