mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Close Connection when there is no connection value.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
034a5c0288
commit
f70ce644ce
1410 changed files with 7188 additions and 53541 deletions
|
|
@ -8,9 +8,9 @@
|
|||
<action name="getFileList" type="model" standalone="true" />
|
||||
<action name="procFileUpload" type="controller" standalone="true" />
|
||||
<action name="procFileIframeUpload" type="controller" standalone="true" />
|
||||
<action name="procFileImageResize" type="controller" standalone="true" />
|
||||
<action name="procFileImageResize" type="controller" standalone="true" ruleset="imageResize" />
|
||||
<action name="procFileDelete" type="controller" standalone="true" />
|
||||
<action name="procFileDownload" type="controller" standalone="true" />
|
||||
<action name="procFileDownload" type="controller" standalone="true" method="GET|POST" />
|
||||
<action name="procFileOutput" type="controller" standalone="true" />
|
||||
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" ruleset="deleteChecked" />
|
||||
<action name="procFileAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ class fileAdminController extends file
|
|||
{
|
||||
// An error appears if no document is selected
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_cart_is_null');
|
||||
if(!$cart) return $this->stop('msg_file_cart_is_null');
|
||||
if(!is_array($cart)) $file_srl_list= explode('|@|', $cart);
|
||||
else $file_srl_list = $cart;
|
||||
$file_count = count($file_srl_list);
|
||||
if(!$file_count) return $this->stop('msg_cart_is_null');
|
||||
if(!$file_count) return $this->stop('msg_file_cart_is_null');
|
||||
|
||||
$oFileController = &getController('file');
|
||||
// Delete the post
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class fileAdminView extends file
|
|||
// Get a list
|
||||
$oFileAdminModel = &getAdminModel('file');
|
||||
$columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'sid', 'module_srl'
|
||||
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress');
|
||||
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name');
|
||||
$output = $oFileAdminModel->getFileList($args, $columnList);
|
||||
// Get the document for looping a list
|
||||
if($output->data)
|
||||
|
|
@ -199,8 +199,8 @@ class fileAdminView extends file
|
|||
Context::set('page_navigation', $output->page_navigation);
|
||||
// Set a template
|
||||
$security = new Security();
|
||||
$security->encodeHTML('file_list..source_filename','file_list..ipaddress');
|
||||
$security->encodeHTML('module_list..browser_title','module_list..mid');
|
||||
$security->encodeHTML('file_list..');
|
||||
$security->encodeHTML('module_list..');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('file_list');
|
||||
|
|
|
|||
|
|
@ -89,18 +89,26 @@ class fileController extends file
|
|||
*/
|
||||
function procFileImageResize()
|
||||
{
|
||||
$source_src = Context::get('source_src');
|
||||
$file_srl = Context::get('file_srl');
|
||||
$width = Context::get('width');
|
||||
$height = Context::get('height');
|
||||
$type = Context::get('type');
|
||||
$output_src = Context::get('output_src');
|
||||
|
||||
if(!$source_src || !$width) return new Object(-1,'msg_invalid_request');
|
||||
if(!$output_src)
|
||||
if(!$file_srl || !$width)
|
||||
{
|
||||
$output_src = $source_src . '.resized' . strrchr($source_src,'.');
|
||||
return new Object(-1,'msg_invalid_request');
|
||||
}
|
||||
if(!$type) $type = 'ratio';
|
||||
|
||||
$oFileModel = getModel('file');
|
||||
$fileInfo = $oFileModel->getFile($file_srl);
|
||||
if(!$fileInfo || $fileInfo->direct_download != 'Y')
|
||||
{
|
||||
return new Object(-1,'msg_invalid_request');
|
||||
}
|
||||
|
||||
$source_src = $fileInfo->uploaded_filename;
|
||||
$output_src = $source_src . '.resized' . strrchr($source_src,'.');
|
||||
|
||||
$type = 'ratio';
|
||||
if(!$height) $height = $width-1;
|
||||
|
||||
if(FileHandler::createImageFile($source_src,$output_src,$width,$height,'','ratio'))
|
||||
|
|
@ -306,6 +314,8 @@ class fileController extends file
|
|||
|
||||
unset($_SESSION[$session_key][$file_srl]);
|
||||
|
||||
Context::close();
|
||||
|
||||
$fp = fopen($uploaded_filename, 'rb');
|
||||
if(!$fp) return $this->stop('msg_file_not_found');
|
||||
|
||||
|
|
@ -329,8 +339,6 @@ class fileController extends file
|
|||
fpassthru($fp);
|
||||
}
|
||||
|
||||
Context::close();
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@
|
|||
<value xml:lang="tr"><![CDATA[İndirmek için izniniz yok]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn không được quyền Download.]]></value>
|
||||
</item>
|
||||
<item name="msg_cart_is_null">
|
||||
<item name="msg_file_cart_is_null">
|
||||
<value xml:lang="ko"><![CDATA[삭제할 파일을 선택해주세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Please select a file(s) to delete.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[削除するファイルを選択してください]]></value>
|
||||
|
|
|
|||
7
modules/file/ruleset/imageResize.xml
Normal file
7
modules/file/ruleset/imageResize.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<fields>
|
||||
<field name="width" required="true" rule="number" />
|
||||
<field name="file_srl" required="true" rule="number" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
@ -1,16 +1,17 @@
|
|||
<div class="x_page-header">
|
||||
<h1>{$lang->file_upload} <a class="x_icon-question-sign" href="./help/index.html#UMAN_config_fileupload" target="_blank">{$lang->help}</a></h1>
|
||||
<h1>{$lang->file_upload} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_fileupload" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/file/tpl/adminConfig/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal section">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertConfig" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/file/tpl/adminConfig/1" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_outlink} <a class="x_icon-question-sign" href="./help/index.html#UMAN_config_file_outlink" target="_blank">{$lang->help}</a></label>
|
||||
<label class="x_control-label">{$lang->allow_outlink} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_file_outlink" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline"><input type="radio" name="allow_outlink" id="allow_outlink_y" value="Y" checked="checked"|cond="$config->allow_outlink == 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="allow_outlink" value="N" checked="checked"|cond="$config->allow_outlink == 'N'" /> {$lang->cmd_no}</label>
|
||||
|
|
@ -31,15 +32,15 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="filesize" class="x_control-label">{$lang->allowed_filesize} <a class="x_icon-question-sign" href="./help/index.html#UMAN_config_file_size" target="_blank">{$lang->help}</a></label>
|
||||
<label for="filesize" class="x_control-label">{$lang->allowed_filesize} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_file_size" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<input id="filesize" type="number" name="allowed_filesize" value="{$config->allowed_filesize}" style="width:50px" /> MB/{ini_get('upload_max_filesize')}
|
||||
<input type="number" id="filesize" name="allowed_filesize" value="{$config->allowed_filesize}" /> MB/{ini_get('upload_max_filesize')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="attachSize" class="x_control-label">{$lang->allowed_attach_size} <a class="x_icon-question-sign" href="./help/index.html#UMAN_config_file_document_attach_limit" target="_blank">{$lang->help}</a></label>
|
||||
<label for="attachSize" class="x_control-label">{$lang->allowed_attach_size} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_file_document_attach_limit" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<input id="attachSize" type="number" name="allowed_attach_size" value="{$config->allowed_attach_size}" style="width:50px" /> MB
|
||||
<input type="number" id="attachSize" name="allowed_attach_size" value="{$config->allowed_attach_size}" /> MB
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertConfig" action="./" method="post">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertConfig" />
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tr>
|
||||
<th scope="col">{$lang->allow_outlink}</th>
|
||||
<td class="text">
|
||||
<select name="allow_outlink">
|
||||
<option value="Y"<!--@if($config->allow_outlink=='Y')--> selected="selected"<!--@end-->>{$lang->enable}</option>
|
||||
<option value="N"<!--@if($config->allow_outlink=='N')--> selected="selected"<!--@end-->>{$lang->disable}</option>
|
||||
</select>
|
||||
<p>{$lang->about_allow_outlink}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allow_outlink_format}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allow_outlink_format" value="{$config->allow_outlink_format}" />
|
||||
<p>{$lang->about_allow_outlink_format}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allow_outlink_site}</th>
|
||||
<td class="text">
|
||||
<textarea name="allow_outlink_site" rows="8" cols="42">{$config->allow_outlink_site}</textarea>
|
||||
<p>{$lang->about_allow_outlink_site}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allowed_filesize}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_filesize" value="{$config->allowed_filesize}" size="3" />MB
|
||||
<p>{$lang->about_allowed_filesize}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allowed_attach_size}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_attach_size" value="{$config->allowed_attach_size}" size="3" />MB
|
||||
/ {ini_get('upload_max_filesize')}
|
||||
<p>{$lang->about_allowed_attach_size}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allowed_filetypes}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" />
|
||||
<p>{$lang->about_allowed_filetypes}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="btnArea">
|
||||
<input class="btn" type="submit" value="{$lang->cmd_registration}" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -6,9 +6,9 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<form id="fo_list" action="./" method="post">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->file} <a class="x_icon-question-sign" href="./help/index.html#UMAN_content_file" target="_blank">{$lang->help}</a></h1>
|
||||
<h1>{$lang->file} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_content_file" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/file/tpl/file_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<table id="fileListTable" class="x_table x_table-striped x_table-hover">
|
||||
|
|
@ -18,7 +18,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<a href="{getUrl('search_target','isvalid','search_keyword','Y')}" class="active"|cond="$search_target == 'isvalid' && $search_keyword == 'Y'">{$lang->is_valid}<block cond="$search_target == 'isvalid' && $search_keyword == 'Y'">({number_format($total_count)})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('search_target','isvalid','search_keyword','N')}" class="active"|cond="$search_target == 'isvalid' && $search_keyword == 'N'">{$lang->is_stand_by}<block cond="$search_target == 'isvalid' && $search_keyword == 'N'">({number_format($total_count)})</block></a>
|
||||
<a class="x_icon-question-sign" href="./help/index.html#UMAN_faq_file_status" target="_blank">{$lang->help}</a>
|
||||
<a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_faq_file_status" target="_blank">{$lang->help}</a>
|
||||
|
||||
<span class="x_pull-right"><a href="#listManager" class="x_btn modalAnchor" onclick="getFileList();">{$lang->delete}</a></span>
|
||||
</caption>
|
||||
|
|
@ -78,6 +78,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<a href="#popup_menu_area" class="member_{$document_list[$document_srl]->get('member_srl')}">{$document_list[$document_srl]->getNickName()}</a>
|
||||
<!--@elseif($val->upload_target_type == 'com' && $comment_list[$val->upload_target_srl])-->
|
||||
<a href="#popup_menu_area" class="member_{$comment_list[$val->upload_target_srl]->get('member_srl')}">{$comment_list[$val->upload_target_srl]->getNickName()}</a>
|
||||
<!--@else-->
|
||||
<a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->nick_name}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowr">{zdate($val->regdate,"Y-m-d H:i")}</td>
|
||||
|
|
@ -156,6 +158,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/file/tpl/file_list/1" />
|
||||
<div class="x_modal-header">
|
||||
<h1>{$lang->file_manager}: {$lang->delete}</h1>
|
||||
</div>
|
||||
|
|
@ -192,12 +195,12 @@ jQuery(function($){
|
|||
}
|
||||
}).change();
|
||||
// Button action
|
||||
$('a.modalAnchor').click(function(){
|
||||
$('a.modalAnchor').bind('before-open.mw', function(){
|
||||
if($docTable.find('tbody :checked').length == 0){
|
||||
$('body').css('overflow','auto');
|
||||
alert('{$lang->msg_cart_is_null}');
|
||||
alert('{$lang->msg_file_cart_is_null}');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
<div class="x_control-group">
|
||||
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="3" style="width:40px" /> MB
|
||||
<input type="number" min="0" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="3" /> MB
|
||||
<p class="x_help-inline">{$lang->about_allowed_filesize}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_attach_size" class="x_control-label">{$lang->allowed_attach_size}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="allowed_attach_size" id="allowed_attach_size" value="{$file_config->allowed_attach_size}" size="3" style="width:40px" /> MB
|
||||
<input type="number" min="0" name="allowed_attach_size" id="allowed_attach_size" value="{$file_config->allowed_attach_size}" size="3" /> MB
|
||||
/ {ini_get('upload_max_filesize')}
|
||||
<p class="x_help-inline">{$lang->about_allowed_attach_size}</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue