* finish task#762
This commit is contained in:
@@ -104,7 +104,9 @@ $lang->searchTips = 'Id here';
|
||||
$lang->exportFileTypeList['csv'] = 'csv';
|
||||
$lang->exportFileTypeList['xml'] = 'xml';
|
||||
$lang->exportFileTypeList['html'] = 'html';
|
||||
|
||||
/*code*/
|
||||
$lang->exportCodeTypeList['gbk'] = 'gbk';
|
||||
$lang->exportCodeTypeList['utf-8']= 'utf-8';
|
||||
/* Themes. */
|
||||
$lang->themes['default'] = 'Default';
|
||||
$lang->themes['green'] = 'Green';
|
||||
|
||||
@@ -104,7 +104,9 @@ $lang->searchTips = '输入编号';
|
||||
$lang->exportFileTypeList['csv'] = 'csv';
|
||||
$lang->exportFileTypeList['xml'] = 'xml';
|
||||
$lang->exportFileTypeList['html'] = 'html';
|
||||
|
||||
/*编码*/
|
||||
$lang->exportCodeTypeList['gbk'] = 'gbk';
|
||||
$lang->exportCodeTypeList['utf-8']= 'utf-8';
|
||||
/* 风格列表。*/
|
||||
$lang->themes['default'] = '默认';
|
||||
$lang->themes['green'] = '绿色';
|
||||
|
||||
@@ -103,7 +103,9 @@ $lang->searchTips = '輸入編號';
|
||||
$lang->exportFileTypeList['csv'] = 'csv';
|
||||
$lang->exportFileTypeList['xml'] = 'xml';
|
||||
$lang->exportFileTypeList['html'] = 'html';
|
||||
|
||||
/*編碼*/
|
||||
$lang->exportCodeTypeList['gbk'] = 'gbk';
|
||||
$lang->exportCodeTyprList['utf-8']= 'utf-8;
|
||||
/* 風格列表。*/
|
||||
$lang->themes['default'] = '預設';
|
||||
$lang->themes['green'] = '綠色';
|
||||
|
||||
@@ -117,18 +117,15 @@ class file extends control
|
||||
$this->view->fields = $this->post->fields;
|
||||
$this->view->rows = $this->post->rows;
|
||||
$output = $this->parse('file', 'export2csv');
|
||||
|
||||
/* If the language is zh-cn, convert to gbk. */
|
||||
$clientLang = $this->app->getClientLang();
|
||||
if($clientLang == 'zh-cn')
|
||||
if( $this->post->CodeType != "utf-8")
|
||||
{
|
||||
if(function_exists('mb_convert_encoding'))
|
||||
{
|
||||
$output = @mb_convert_encoding($output, 'gbk', 'utf-8');
|
||||
$output = @mb_convert_encoding($output, $this->post->CodeType , 'utf-8');
|
||||
}
|
||||
elseif(function_exists('iconv'))
|
||||
{
|
||||
$output = @iconv('utf-8', 'gbk', $output);
|
||||
$output = @iconv('utf-8', $this->post->CodeType, $output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,17 @@ function closeWindow()
|
||||
}
|
||||
i ++;
|
||||
}
|
||||
function switchCodeType(fileType)
|
||||
{
|
||||
if(fileType == 'csv')
|
||||
{
|
||||
$('#CodeType').removeAttr('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#CodeType').attr('hidden','hidden');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<br /><br />
|
||||
<form method='post' target='hiddenwin' onsubmit='setDownloading();'>
|
||||
@@ -42,7 +53,8 @@ function closeWindow()
|
||||
<td class='a-center'>
|
||||
<?php echo $lang->setFileName;?>
|
||||
<?php echo html::input('fileName', '', 'size=15');?>
|
||||
<?php echo html::select('fileType', $lang->exportFileTypeList);?>
|
||||
<?php echo html::select('fileType', $lang->exportFileTypeList,'csv', 'onchange=switchCodeType(this.value)');?>
|
||||
<?php echo html::select('CodeType', $lang->exportCodeTypeList, 'gbk');?>
|
||||
<?php echo html::submitButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -733,7 +733,6 @@ class story extends control
|
||||
$story->verify = str_replace("<br />", "\n", $story->verify);
|
||||
$story->verify = str_replace('"', '""', $story->verify);
|
||||
}
|
||||
|
||||
/* fill some field with useful value. */
|
||||
if(isset($products[$story->product])) $story->product = $products[$story->product];
|
||||
if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module];
|
||||
|
||||
@@ -119,7 +119,6 @@ class todo extends control
|
||||
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->dates = $this->todo->buildDateList();
|
||||
$this->view->times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->todo = $todo;
|
||||
$this->display();
|
||||
|
||||
Reference in New Issue
Block a user