mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1452 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8970157801
commit
422c6e9fd6
7 changed files with 47 additions and 17 deletions
|
|
@ -133,23 +133,23 @@
|
|||
|
||||
if(!$url_info['port']) $url_info['port'] = 80;
|
||||
|
||||
$fp = fsockopen($url_info['host'], $url_info['port']);
|
||||
$fp = @fsockopen($url_info['host'], $url_info['port']);
|
||||
if(!$fp) return;
|
||||
|
||||
$header = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nReferer: %s://%s\r\n\r\n", $url_info['path'], $url_info['host'], $url_info['scheme'], $url_info['host']);
|
||||
fwrite($fp, $header);
|
||||
@fwrite($fp, $header);
|
||||
|
||||
$ft = fopen($target_filename, 'w');
|
||||
$ft = @fopen($target_filename, 'w');
|
||||
if(!$ft) return;
|
||||
|
||||
$begin = false;
|
||||
while(!feof($fp)) {
|
||||
$str = fgets($fp, 1024);
|
||||
if($begin) fwrite($ft, $str);
|
||||
if($begin) @fwrite($ft, $str);
|
||||
if(!trim($str)) $begin = true;
|
||||
}
|
||||
fclose($ft);
|
||||
fclose($fp);
|
||||
@fclose($ft);
|
||||
@fclose($fp);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="readed_count" var="readed_count" default="0" />
|
||||
<column name="voted_count" var="voted_count" default="0" />
|
||||
<column name="comment_count" var="voted_count" default="0" />
|
||||
<column name="trackback_count" var="voted_count" default="0" />
|
||||
<column name="comment_count" var="comment_count" default="0" />
|
||||
<column name="trackback_count" var="trackback_count" default="0" />
|
||||
<column name="uploaded_count" var="uploaded_count" default="0" />
|
||||
<column name="password" var="password" minlength="2" maxlength="60" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<!--%import("filter/delete_checked.xml")-->
|
||||
<!--%import("js/document_admin.js")-->
|
||||
|
||||
<!-- 문서 정보 -->
|
||||
<div>
|
||||
|
|
@ -6,14 +7,15 @@
|
|||
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<!-- 목록 -->
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2">{$lang->no}</th>
|
||||
<th>{$lang->no}</th>
|
||||
<th><input type="checkbox" onclick="doCheckAll(); return false;" /></th>
|
||||
<th>{$lang->module}</th>
|
||||
<th>{$lang->title}</th>
|
||||
<th>{$lang->user_name}</th>
|
||||
|
|
|
|||
6
modules/document/tpl/js/document_admin.js
Normal file
6
modules/document/tpl/js/document_admin.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function doCheckAll() {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
if(fo_obj[i].name == 'cart') fo_obj[i].checked = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<!--%import("filter/delete_checked.xml")-->
|
||||
<!--%import("js/file_admin.js")-->
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<div>
|
||||
|
|
@ -6,14 +7,15 @@
|
|||
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<!-- 목록 -->
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2">{$lang->no}</th>
|
||||
<th>{$lang->no}</th>
|
||||
<th><input type="checkbox" onclick="doCheckAll(); return false;" /></th>
|
||||
<th>{$lang->module}</th>
|
||||
<th>{$lang->file_name}</th>
|
||||
<th>{$lang->file_size}</th>
|
||||
|
|
|
|||
6
modules/file/tpl/js/file_admin.js
Normal file
6
modules/file/tpl/js/file_admin.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function doCheckAll() {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
if(fo_obj[i].name == 'cart') fo_obj[i].checked = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
@set_time_limit(0);
|
||||
|
||||
// 디버그 메세지의 양이 무척 커지기에 디버그 메세지 생성을 중단
|
||||
define('__STOP_DEBUG__', true);
|
||||
//define('__STOP_DEBUG__', true);
|
||||
|
||||
// 변수 체크
|
||||
$this->module_srl = Context::get('module_srl');
|
||||
|
|
@ -110,8 +110,8 @@
|
|||
$this->oXml = new XmlParser();
|
||||
|
||||
// module_srl이 있으면 module데이터로 판단하여 처리, 아니면 회원정보로..
|
||||
if($this->module_srl) $this->importDocument($xml_file);
|
||||
else $this->importMember($xml_file);
|
||||
if($this->module_srl) $is_finished = $this->importDocument($xml_file);
|
||||
else $is_finished = $this->importMember($xml_file);
|
||||
|
||||
if($this->position+$this->limit_count > $this->imported_count) {
|
||||
$this->add('is_finished', 'Y');
|
||||
|
|
@ -131,6 +131,8 @@
|
|||
|
||||
$this->oMemberController = &getController('member');
|
||||
|
||||
$is_finished = true;
|
||||
|
||||
$fp = @fopen($xml_file, "r");
|
||||
if($fp) {
|
||||
$buff = '';
|
||||
|
|
@ -140,10 +142,15 @@
|
|||
|
||||
$buff = preg_replace_callback("!<member user_id=\"([^\"]*)\">(.*?)<\/member>!is", array($this, '_importMember'), trim($buff));
|
||||
|
||||
if($this->position+$this->limit_count <= $this->imported_count) break;
|
||||
if($this->position+$this->limit_count <= $this->imported_count) {
|
||||
$is_finished = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
return $is_finished;
|
||||
}
|
||||
|
||||
function _importMember($matches) {
|
||||
|
|
@ -201,6 +208,8 @@
|
|||
$this->oCommentController = &getController('comment');
|
||||
$this->oTrackbackController = &getController('trackback');
|
||||
|
||||
$is_finished = true;
|
||||
|
||||
$fp = @fopen($xml_file, "r");
|
||||
if($fp) {
|
||||
$buff = '';
|
||||
|
|
@ -210,10 +219,15 @@
|
|||
flush();
|
||||
$buff = preg_replace_callback("!<document sequence=\"([^\"]*)\">(.*?)<\/document>!is", array($this, '_importDocument'), trim($buff));
|
||||
|
||||
if($this->position+$this->limit_count <= $this->imported_count) break;
|
||||
if($this->position+$this->limit_count <= $this->imported_count) {
|
||||
$is_finished = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
return $is_finished;
|
||||
}
|
||||
|
||||
function _importDocument($matches) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue