mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 04:09:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1466 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5004783084
commit
44cba86bde
5 changed files with 16 additions and 4 deletions
|
|
@ -14,6 +14,7 @@
|
|||
var $oCommentController = null;
|
||||
var $oTrackbackController = null;
|
||||
|
||||
var $total_count = '';
|
||||
var $position = 0;
|
||||
var $imported_count = 0;
|
||||
var $limit_count = 50;
|
||||
|
|
@ -124,6 +125,7 @@
|
|||
} else {
|
||||
$this->add('position', $this->imported_count);
|
||||
$this->add('is_finished', 'N');
|
||||
$this->setMessage( sprintf(Context::getLang('msg_importing'), $this->total_count, $this->imported_count) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,6 +147,7 @@
|
|||
$str = fgets($fp,1024);
|
||||
$buff .= $str;
|
||||
|
||||
$buff = preg_replace_callback("!<root([^>]*)>!is", array($this, '_parseRootInfo'), trim($buff));
|
||||
$buff = preg_replace_callback("!<member user_id=\"([^\"]*)\">(.*?)<\/member>!is", array($this, '_importMember'), trim($buff));
|
||||
|
||||
if($this->position+$this->limit_count <= $this->imported_count) {
|
||||
|
|
@ -221,6 +224,7 @@
|
|||
while(!feof($fp)) {
|
||||
$str = fread($fp,1024);
|
||||
$buff .= $str;
|
||||
$buff = preg_replace_callback("!<root([^>]*)>!is", array($this, '_parseRootInfo'), trim($buff));
|
||||
$buff = preg_replace_callback("!<document sequence=\"([^\"]*)\">(.*?)<\/document>!is", array($this, '_importDocument'), trim($buff));
|
||||
|
||||
if($this->position+$this->limit_count <= $this->imported_count) {
|
||||
|
|
@ -355,5 +359,14 @@
|
|||
|
||||
$this->setMessage('msg_sync_completed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief <root>정보를 읽어서 정보를 구함
|
||||
**/
|
||||
function _parseRootInfo($matches) {
|
||||
$root = $matches[0].'</root>';
|
||||
$xml_doc = $this->oXml->parse($root);
|
||||
$this->total_count = $xml_doc->root->attrs->count;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
$lang->msg_sync_member = '동기화 버튼을 클릭하시면 회원정보와 게시물정보의 동기화를 시작합니다.';
|
||||
$lang->msg_no_xml_file = 'XML파일을 찾을 수 없습니다. 경로를 다시 확인해주세요';
|
||||
$lang->msg_invalid_xml_file = '잘못된 형식의 XML파일입니다';
|
||||
$lang->msg_importing = '데이터를 입력중입니다. 혹시 아래 숫자가 변하지 않는다면 계속진행 버튼을 클릭해주세요.';
|
||||
$lang->msg_importing = '%d개의 데이터중 %d개를 입력중입니다. (계속 멈추어 있으면 "계속진행" 버튼을 클릭해주세요)';
|
||||
$lang->msg_import_finished = '%d개의 데이터 입력이 완료되었습니다. 상황에 따라 입력되지 못한 데이터가 있을 수 있습니다.';
|
||||
$lang->msg_sync_completed = '회원과 게시물, 댓글의 동기화가 완료되었습니다.';
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@
|
|||
<input type="submit" value="{$lang->cmd_next}" />
|
||||
</div>
|
||||
<div id="step2_status" style="display:none">
|
||||
<div>{$lang->msg_importing}</div>
|
||||
<div id="step2_position"></div>
|
||||
<div><input type="button" onclick="procFilter(); return false" value="{$lang->cmd_continue}" /></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ function completeImport(ret_obj) {
|
|||
} else {
|
||||
var fo_obj = xGetElementById('fo_step2');
|
||||
fo_obj.position.value = position;
|
||||
xInnerHtml('step2_position', position);
|
||||
xInnerHtml('step2_position', message);
|
||||
procFilter(fo_obj, import_xml);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue