<?php
/**
 * The export view file of contract module of ZDOO.
 *
 * @copyright   Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Gang Liu <liugang@cnezsoft.com> 
 * @package     contract
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../../../sys/file/view/export2excel.html.php';?>
<?php
$clientLang = $this->app->getClientLang();
$encode     = ($clientLang == 'zh-cn' ? 'gbk' : ($clientLang == 'zh-tw' ? 'big5' : 'utf-8'));
$csvHtml    = "<span class='input-group-addon fix-border csv'>{$lang->setCharset}</span>";
$csvHtml   .= html::select('encode', $config->charsets[$this->cookie->lang], $encode, "class='form-control csv'");
?>
<script>
$('#fileType').append("<option value='csv'>csv</option>");
$('#fileType').after(<?php echo helper::jsonEncode($csvHtml);?>);
$('#fileType').change(function()
{
    $('.csv').toggle($(this).val() == 'csv');
    $('.input-group').fixInputGroup();
});
$('#fileType').change();
</script>
