mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Merge branch 'rhymix:develop' into develop
This commit is contained in:
commit
4c73b1fa93
209 changed files with 2643 additions and 1707 deletions
|
|
@ -225,6 +225,12 @@ class Cleanup extends Base
|
|||
'.travis.yml' => 'deleted:xe',
|
||||
|
||||
// Deleted files and directories
|
||||
'addons/blogapi/' => 'deleted:xe',
|
||||
'addons/captcha/' => 'deleted:xe',
|
||||
'addons/captcha_member/' => 'deleted:xe',
|
||||
'addons/member_communication/' => 'deleted:xe',
|
||||
'addons/mobile/' => 'deleted:xe',
|
||||
'addons/openid_delegation_id/' => 'deleted:xe',
|
||||
'classes/cache/CacheApc.class.php' => 'deleted:xe',
|
||||
'classes/cache/CacheFile.class.php' => 'deleted:xe',
|
||||
'classes/cache/CacheMemcache.class.php' => 'deleted:xe',
|
||||
|
|
@ -263,6 +269,7 @@ class Cleanup extends Base
|
|||
'modules/admin/tpl/config_ftp.html' => 'deleted',
|
||||
'modules/admin/tpl/img/faviconSample.png' => 'deleted',
|
||||
'modules/admin/tpl/img/mobiconSample.png' => 'deleted',
|
||||
'modules/board/board.wap.php' => 'deleted:xe',
|
||||
'modules/counter/queries/deleteSiteCounter.xml' => 'deleted:xe',
|
||||
'modules/counter/queries/deleteSiteCounterLog.xml' => 'deleted:xe',
|
||||
'modules/counter/queries/getSiteCounterStatus.xml' => 'deleted:xe',
|
||||
|
|
@ -275,6 +282,9 @@ class Cleanup extends Base
|
|||
'modules/counter/queries/updateSiteTotalCounterUnique.xml' => 'deleted:xe',
|
||||
'modules/editor/skins/xpresseditor/' => 'deleted:xe',
|
||||
'modules/editor/styles/' => 'deleted:xe',
|
||||
'modules/module/schemas/site_admin.xml' => 'deleted',
|
||||
'modules/page/page.wap.php' => 'deleted:xe',
|
||||
'modules/spamfilter/spamfilter.lib.php' => 'deleted',
|
||||
'modules/spamfilter/ruleset/' => 'deleted',
|
||||
'phpDoc/' => 'deleted:xe',
|
||||
'tools/' => 'deleted:xe',
|
||||
|
|
|
|||
|
|
@ -101,13 +101,13 @@ class Advanced extends Base
|
|||
Context::set('mobile_viewport', config('mobile.viewport') ?? HTMLDisplayHandler::DEFAULT_VIEWPORT);
|
||||
Context::set('use_ssl', Config::get('url.ssl'));
|
||||
Context::set('delay_session', Config::get('session.delay'));
|
||||
Context::set('delay_template_compile', Config::get('view.delay_compile'));
|
||||
Context::set('use_db_session', Config::get('session.use_db'));
|
||||
Context::set('manager_layout', Config::get('view.manager_layout'));
|
||||
Context::set('minify_scripts', Config::get('view.minify_scripts'));
|
||||
Context::set('concat_scripts', Config::get('view.concat_scripts'));
|
||||
Context::set('jquery_version', Config::get('view.jquery_version'));
|
||||
Context::set('use_server_push', Config::get('view.server_push'));
|
||||
Context::set('use_gzip', Config::get('view.use_gzip'));
|
||||
|
||||
$this->setTemplateFile('config_advanced');
|
||||
}
|
||||
|
|
@ -212,9 +212,9 @@ class Advanced extends Base
|
|||
Config::set('view.manager_layout', $vars->manager_layout ?: 'module');
|
||||
Config::set('view.minify_scripts', $vars->minify_scripts ?: 'common');
|
||||
Config::set('view.concat_scripts', $vars->concat_scripts ?: 'none');
|
||||
Config::set('view.delay_compile', intval($vars->delay_template_compile));
|
||||
Config::set('view.jquery_version', $vars->jquery_version == 3 ? 3 : 2);
|
||||
Config::set('view.server_push', $vars->use_server_push === 'Y');
|
||||
Config::set('view.use_gzip', $vars->use_gzip === 'Y');
|
||||
|
||||
// Save
|
||||
if (!Config::save())
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use Rhymix\Framework\Storage;
|
|||
use Rhymix\Framework\URL;
|
||||
use Rhymix\Modules\Admin\Controllers\Base;
|
||||
use Rhymix\Modules\Admin\Models\Icon as IconModel;
|
||||
use Rhymix\Modules\Admin\Models\Utility as UtilityModel;
|
||||
|
||||
class Domains extends Base
|
||||
{
|
||||
|
|
@ -340,8 +341,8 @@ class Domains extends Base
|
|||
$vars->meta_description = utf8_trim($vars->meta_description);
|
||||
|
||||
// Clean up the header and footer scripts.
|
||||
$vars->html_header = utf8_trim($vars->html_header);
|
||||
$vars->html_footer = utf8_trim($vars->html_footer);
|
||||
$vars->html_header = UtilityModel::cleanHeaderAndFooterScripts($vars->html_header ?? '');
|
||||
$vars->html_footer = UtilityModel::cleanHeaderAndFooterScripts($vars->html_footer ?? '');
|
||||
|
||||
// Validate the color scheme setting.
|
||||
$valid_color_scheme_options = array('auto', 'light', 'dark');
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class Security extends Base
|
|||
Context::set('use_cookies_ssl', Config::get('session.use_ssl_cookies'));
|
||||
Context::set('check_csrf_token', Config::get('security.check_csrf_token'));
|
||||
Context::set('use_nofollow', Config::get('security.nofollow'));
|
||||
Context::set('x_frame_options', Config::get('security.x_frame_options'));
|
||||
Context::set('x_content_type_options', Config::get('security.x_content_type_options'));
|
||||
|
||||
$this->setTemplateFile('config_security');
|
||||
}
|
||||
|
|
@ -106,11 +108,22 @@ class Security extends Base
|
|||
}
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$vars->use_samesite = preg_replace('/[^a-zA-Z]/', '', $vars->use_samesite);
|
||||
if (!in_array($vars->use_samesite ?? '', ['Strict', 'Lax', 'None', '']))
|
||||
{
|
||||
$vars->use_samesite = '';
|
||||
}
|
||||
if ($vars->use_samesite === 'None' && ($vars->use_session_ssl !== 'Y' || $site_module_info->security !== 'always'))
|
||||
{
|
||||
$vars->use_samesite = '';
|
||||
}
|
||||
if (!in_array($vars->x_frame_options ?? '', ['DENY', 'SAMEORIGIN', '']))
|
||||
{
|
||||
$vars->x_frame_options = '';
|
||||
}
|
||||
if (!in_array($vars->x_content_type_options ?? '', ['nosniff', '']))
|
||||
{
|
||||
$vars->x_content_type_options = '';
|
||||
}
|
||||
|
||||
Config::set('admin.allow', array_values($allowed_ip));
|
||||
Config::set('admin.deny', array_values($denied_ip));
|
||||
|
|
@ -120,6 +133,8 @@ class Security extends Base
|
|||
Config::set('session.use_ssl_cookies', $vars->use_cookies_ssl === 'Y');
|
||||
Config::set('security.check_csrf_token', $vars->check_csrf_token === 'Y');
|
||||
Config::set('security.nofollow', $vars->use_nofollow === 'Y');
|
||||
Config::set('security.x_frame_options', strtoupper($vars->x_frame_options));
|
||||
Config::set('security.x_content_type_options', strtolower($vars->x_content_type_options));
|
||||
|
||||
// Save
|
||||
if (!Config::save())
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ $lang->cmd_https_port = 'HTTPS Port';
|
|||
$lang->cmd_index_module_srl = 'Main Module';
|
||||
$lang->cmd_index_document_srl = 'Main Document';
|
||||
$lang->cmd_default_language = 'Default Language';
|
||||
$lang->cmd_any_domain = 'Any Domain';
|
||||
$lang->cmd_new_domain = 'Add New Domain';
|
||||
$lang->cmd_edit_domain = 'Edit Domain';
|
||||
$lang->cmd_is_default_domain = 'Default Domain';
|
||||
|
|
@ -156,6 +157,8 @@ $lang->use_gzip = 'gzip Compression';
|
|||
$lang->about_use_gzip = 'This option should be left off unless you know for sure that your webserver doesn\'t compress output by default.';
|
||||
$lang->delay_session = 'Delay session start';
|
||||
$lang->about_delay_session = 'To improve performance when using a caching proxy server such as Varnish, do not issue sessions to visitors until they log in.<br>Selecting this option may interfere with autologin, and visitor counts may become inaccurate.';
|
||||
$lang->delay_template_compile = 'Delay template compile';
|
||||
$lang->about_delay_template_compile = 'Wait a few seconds before compiling an updated template file.<br />This may help avoid errors when you are editing templates over a slow connection.';
|
||||
$lang->mediafilter_whitelist = 'Allow external media';
|
||||
$lang->about_mediafilter_whitelist = 'This list defines other websites from which users are allowed to embed multimedia content using <iframe> or <video> tags.<br />The restriction does not apply to attachments or any media embedded by the administrator.';
|
||||
$lang->mediafilter_classes = 'Allow HTML class';
|
||||
|
|
@ -165,6 +168,8 @@ $lang->about_robot_user_agents = 'This list defines the list of browser user-age
|
|||
$lang->use_samesite = 'SameSite attribute';
|
||||
$lang->use_samesite_empty = 'Do not use';
|
||||
$lang->about_use_samesite = 'Set the SameSite attribute for session cookies and session keys.<br>Lax is the recommended setting for most sites. You may need to use None if you are having difficulties integrating with external services such as payment gateways.<br>However, None is only valid when used with SSL-only sessions.';
|
||||
$lang->about_x_frame_options = 'Block loading this site in an iframe from another site. This helps prevent clickjacking attacks.<br />SameOrigin is recommended for most sites. Deny will make iframes stop working even on this site.<br />Do not use this setting if you have already enabled the X-Frame-Options header in your server configuration.';
|
||||
$lang->about_x_content_type_options = 'Prevent browser sniffing of MIME types of documents and attached files.<br />Do not use this setting if you have already enabled the X-Content-Type-Options header in your server configuration.';
|
||||
$lang->use_session_keys = 'Use session security keys';
|
||||
$lang->about_use_session_keys = 'Use additional security keys to guard against session theft. This setting is highly recommended if you don\'t use SSL-only sessions.<br>This setting may cause some users to become logged out.';
|
||||
$lang->use_session_ssl = 'Use SSL-only session';
|
||||
|
|
@ -173,7 +178,7 @@ $lang->use_cookies_ssl = 'Use SSL-only cookies';
|
|||
$lang->about_use_cookies_ssl = 'Force all cookies to be SSL-only.';
|
||||
$lang->check_csrf_token = 'Use CSRF tokens';
|
||||
$lang->about_check_csrf_token = 'Use CSRF tokens to validate requests. This is more secure but may break some functionality.<br>If not selected, Rhymix will use only the Referer header to defend against CSRF attacks.';
|
||||
$lang->use_nofollow = 'Use nofollow attribute';
|
||||
$lang->use_nofollow = 'Add nofollow attribute to Links';
|
||||
$lang->about_use_nofollow = 'Add rel="nofollow" to all links submitted by users in order to reduce the effectiveness of spamming.<br>This does not apply to content submitted by the administrator.';
|
||||
$lang->use_object_cache = 'Use Cache';
|
||||
$lang->cache_default_ttl = 'Cache default TTL';
|
||||
|
|
@ -427,7 +432,7 @@ $lang->cmd_cleanup_reason = 'Reason to delete';
|
|||
$lang->cmd_cleanup_reason_deleted = 'Not used anymore';
|
||||
$lang->cmd_cleanup_reason_deleted_xe = 'This %s was only used in XE';
|
||||
$lang->cmd_cleanup_reason_deleted_xmllang = 'This is an XML lang file only used in XE';
|
||||
$lang->cmd_cleanup_reason_moved = 'Moved';
|
||||
$lang->cmd_cleanup_reason_moved = 'Moved to';
|
||||
$lang->cmd_cleanup_reason_case = 'Changed case';
|
||||
$lang->cmd_cleanup_error_reason = 'Reason for failure';
|
||||
$lang->msg_cleanup_list_empty = 'There is no file to clean up.';
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ $lang->cmd_https_port = 'HTTPS 포트';
|
|||
$lang->cmd_index_module_srl = '메인 모듈';
|
||||
$lang->cmd_index_document_srl = '메인 문서';
|
||||
$lang->cmd_default_language = '기본 언어';
|
||||
$lang->cmd_any_domain = '모든 도메인';
|
||||
$lang->cmd_new_domain = '새 도메인 추가';
|
||||
$lang->cmd_edit_domain = '도메인 정보 수정';
|
||||
$lang->cmd_is_default_domain = '기본 도메인';
|
||||
|
|
@ -157,15 +158,19 @@ $lang->use_gzip = 'gzip 압축';
|
|||
$lang->about_use_gzip = '웹서버가 gzip을 지원하지 않더라도 페이지를 강제로 압축하는 기능입니다. 대부분의 서버에는 필요하지 않습니다.';
|
||||
$lang->delay_session = '세션 시작 지연';
|
||||
$lang->about_delay_session = 'Varnish 등의 프록시 캐싱 서버 사용시 성능 개선을 위해, 로그인하지 않은 사용자에게는 인증 세션을 부여하지 않습니다.<br>이 옵션을 사용하면 자동 로그인이 되지 않으며, 방문자 수 집계가 정확하게 이루어지지 않을 수 있습니다.';
|
||||
$lang->delay_template_compile = '템플릿 변환 지연';
|
||||
$lang->about_delay_template_compile = '템플릿 파일이 업데이트되었을 때 즉시 변환하지 않고 몇 초간 기다리도록 할 수 있습니다.<br />업로드 중인 템플릿을 로딩하다가 오류가 발생하는 것을 막는 데 도움이 됩니다.';
|
||||
$lang->mediafilter_whitelist = '외부 멀티미디어 허용';
|
||||
$lang->about_mediafilter_whitelist = '<iframe>, <video> 등으로 본문 삽입을 허용할 주소 목록입니다. 서비스마다 공통으로 사용하는 앞부분만 입력하면 됩니다.<br />직접 첨부한 파일이나 관리자가 작성한 글은 제한을 받지 않습니다.';
|
||||
$lang->mediafilter_classes = 'HTML class 허용';
|
||||
$lang->about_mediafilter_classes = '게시물, 댓글 등에서 허용되는 HTML class 속성의 목록을 지정할 수 있습니다.<br />사이트 디자인이나 기능과 중복되는 class를 허용할 경우 악의적으로 디자인을 망가뜨리거나 다른 사용자의 혼란을 유발할 수 있습니다.<br />관리자가 작성한 글은 제한을 받지 않습니다.';
|
||||
$lang->robot_user_agents = '로봇 user-agent';
|
||||
$lang->about_robot_user_agents = '일반적인 검색엔진 크롤러 외에 로봇으로 취급해야 할 user-agent가 있다면 한 줄에 하나씩 입력해 주십시오.<br />악성 크롤러로 인한 서버 부하 및 과도한 트래픽을 방지하는 데 도움이 될 수 있습니다.';
|
||||
$lang->use_samesite = 'SameSite 속성 사용';
|
||||
$lang->use_samesite = 'SameSite 속성';
|
||||
$lang->use_samesite_empty = '표기하지 않음';
|
||||
$lang->about_use_samesite = '세션 쿠키, 보안키 등에 적용되는 SameSite 속성을 선택할 수 있습니다.<br>대부분의 사이트에는 Lax를 권장하며, 최신 브라우저에서 결제 연동 등에 문제가 있는 경우 None을 선택하시기 바랍니다.<br>단, None을 선택할 경우 SSL 전용 세션을 사용하여야 정상 작동합니다.';
|
||||
$lang->about_x_frame_options = '다른 사이트에서 이 사이트를 iframe으로 로딩하는 것을 차단합니다. Clickjacking 공격 방지에 도움이 됩니다.<br />대부분의 사이트에는 SameOrigin을 추천합니다. Deny로 설정하면 같은 사이트 내에서도 iframe이 작동하지 않습니다.<br />웹서버 설정에서 이미 X-Frame-Options 헤더를 출력하고 있는 경우에는 중복 사용하지 마십시오.';
|
||||
$lang->about_x_content_type_options = '브라우저가 문서나 첨부파일의 MIME type을 스니핑하여 임의로 처리하는 것을 막습니다.<br />웹서버 설정에서 이미 X-Content-Type-Options 헤더를 출력하고 있는 경우에는 중복 사용하지 마십시오.';
|
||||
$lang->use_session_keys = '세션 보안키 사용';
|
||||
$lang->about_use_session_keys = '세션 탈취를 방지하기 위한 보안키를 사용합니다. SSL 전용 세션을 사용하지 않을 경우 반드시 보안키를 사용하시기를 권장합니다.<br>사용자 환경에 따라 로그인이 풀리는 문제가 발생할 수 있습니다.';
|
||||
$lang->use_session_ssl = 'SSL 전용 세션 사용';
|
||||
|
|
@ -174,7 +179,7 @@ $lang->use_cookies_ssl = 'SSL 전용 쿠키 사용';
|
|||
$lang->about_use_cookies_ssl = '세션뿐 아니라 모든 쿠키를 SSL 전용으로 지정합니다.<br>SSL을 항상 사용하도록 설정되어 있는 경우에만 활성화됩니다.';
|
||||
$lang->check_csrf_token = 'CSRF 토큰 사용';
|
||||
$lang->about_check_csrf_token = 'CSRF 토큰을 사용하여 정상적인 요청 여부를 확인합니다. 보안이 향상되지만, 일부 서드파티 자료와 호환되지 않을 수 있습니다.<br>사용하지 않을 경우 리퍼러 헤더 확인만으로 CSRF 공격에 방어합니다.';
|
||||
$lang->use_nofollow = 'Nofollow 속성 사용';
|
||||
$lang->use_nofollow = '링크에 nofollow 추가';
|
||||
$lang->about_use_nofollow = '사용자들이 작성한 글에 포함된 모든 링크에 rel="nofollow" 속성을 추가하여 스팸으로 인한 사이트 신뢰도 저하를 방지합니다.<br>관리자가 작성한 글에는 적용되지 않습니다.';
|
||||
$lang->use_object_cache = '캐시 사용';
|
||||
$lang->cache_default_ttl = '캐시 기본 TTL';
|
||||
|
|
@ -423,7 +428,7 @@ $lang->cmd_cleanup_reason = '삭제 이유';
|
|||
$lang->cmd_cleanup_reason_deleted = '사용하지 않음';
|
||||
$lang->cmd_cleanup_reason_deleted_xe = 'XE에서 사용하던 %s';
|
||||
$lang->cmd_cleanup_reason_deleted_xmllang = 'XE에서 사용하던 XML 언어 파일';
|
||||
$lang->cmd_cleanup_reason_moved = '이동';
|
||||
$lang->cmd_cleanup_reason_moved = '이동됨';
|
||||
$lang->cmd_cleanup_reason_case = '대소문자 구분 변경';
|
||||
$lang->cmd_cleanup_error_reason = '삭제 실패 이유';
|
||||
$lang->msg_cleanup_list_empty = '삭제할 파일이 없습니다.';
|
||||
|
|
|
|||
19
modules/admin/models/Utility.php
Normal file
19
modules/admin/models/Utility.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Rhymix\Modules\Admin\Models;
|
||||
|
||||
class Utility
|
||||
{
|
||||
/**
|
||||
* Clean up header and footer scripts.
|
||||
*
|
||||
* @param string $content
|
||||
* @return string
|
||||
*/
|
||||
public static function cleanHeaderAndFooterScripts(string $content)
|
||||
{
|
||||
$content = utf8_clean($content);
|
||||
$content = preg_replace('!</?(html|head|body)[^>]*>!', '', $content);
|
||||
return utf8_trim($content);
|
||||
}
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<a class="default_header" href="{getUrl(['module' => 'admin'])}"><i class="xi xi-cog"></i></a>
|
||||
<a class="mobile_menu_open" href="#gnbNav"><i class="xi xi-bars"></i></a>
|
||||
</h1>
|
||||
<p class="site"><a href="{getUrl('')}">{$site_module_info->settings->title ?: $site_module_info->domain}</a></p>
|
||||
<p class="site"><a href="{getUrl('')}">{Context::replaceUserLang($site_module_info->settings->title ?: $site_module_info->domain)}</a></p>
|
||||
<!--@end-->
|
||||
<div class="account">
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<!--@if($reason === 'deleted:xe')-->{sprintf($lang->cmd_cleanup_reason_deleted_xe, $filetype)}<!--@endif-->
|
||||
<!--@if($reason === 'deleted:xmllang')-->{$lang->cmd_cleanup_reason_deleted_xmllang}<!--@endif-->
|
||||
<!--@if($reason === 'case')-->{$lang->cmd_cleanup_reason_case}<!--@endif-->
|
||||
<!--@if(preg_match('/^moved:(.+)$/', $reason, $matches))-->{$lang->cmd_cleanup_reason_moved}: {$matches[1]}<!--@endif-->
|
||||
<!--@if(preg_match('/^moved:(.+)$/', $reason, $matches))-->{$lang->cmd_cleanup_reason_moved}: <s style="color:#999">{$matches[1]}</s><!--@endif-->
|
||||
</td>
|
||||
<!--@if($cleanup_errors)-->
|
||||
<td scope="col" class="nowr" style="color:red">
|
||||
|
|
|
|||
|
|
@ -110,6 +110,18 @@
|
|||
<p class="x_help-block">{$lang->about_delay_session}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="delay_template_compile">{$lang->delay_template_compile}</label>
|
||||
<div class="x_controls">
|
||||
<select name="delay_template_compile" id="delay_template_compile">
|
||||
<option value="0" selected="selected"|cond="$delay_template_compile == 0">0 {$lang->unit_sec}</option>
|
||||
<option value="1" selected="selected"|cond="$delay_template_compile == 1">1 {$lang->unit_sec}</option>
|
||||
<option value="2" selected="selected"|cond="$delay_template_compile == 2">2 {$lang->unit_sec}</option>
|
||||
<option value="3" selected="selected"|cond="$delay_template_compile == 3">3 {$lang->unit_sec}</option>
|
||||
</select>
|
||||
<p class="x_help-block">{$lang->about_delay_template_compile}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->thumbnail_target}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -227,15 +239,6 @@
|
|||
<p class="x_help-block">{$lang->about_use_server_push}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_gzip}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_gzip_y" class="x_inline"><input type="radio" name="use_gzip" id="use_gzip_y" value="Y" checked="checked"|cond="$use_gzip" /> {$lang->cmd_yes}</label>
|
||||
<label for="use_gzip_n" class="x_inline"><input type="radio" name="use_gzip" id="use_gzip_n" value="N" checked="checked"|cond="!$use_gzip" /> {$lang->cmd_no}</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_use_gzip}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
|
|
|
|||
|
|
@ -45,17 +45,6 @@
|
|||
<p class="x_help-block">{$lang->about_admin_ip_deny}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_samesite}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_samesite_strict" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_strict" value="Strict" checked="checked"|cond="$use_samesite === 'Strict'" /> Strict</label>
|
||||
<label for="use_samesite_lax" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_lax" value="Lax" checked="checked"|cond="$use_samesite === 'Lax'" /> Lax</label>
|
||||
<label for="use_samesite_none" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_none" value="None" checked="checked"|cond="$use_samesite === 'None'" disabled="disabled"|cond="!$use_session_ssl || $site_module_info->security !== 'always'" /> None</label>
|
||||
<label for="use_samesite_empty" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_empty" value="" checked="checked"|cond="!$use_samesite" /> {$lang->use_samesite_empty}</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_use_samesite}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_session_keys}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -101,6 +90,36 @@
|
|||
<p class="x_help-block">{$lang->about_use_nofollow}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_samesite}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_samesite_strict" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_strict" value="Strict" checked="checked"|cond="$use_samesite === 'Strict'" /> Strict</label>
|
||||
<label for="use_samesite_lax" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_lax" value="Lax" checked="checked"|cond="$use_samesite === 'Lax'" /> Lax</label>
|
||||
<label for="use_samesite_none" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_none" value="None" checked="checked"|cond="$use_samesite === 'None'" disabled="disabled"|cond="!$use_session_ssl || $site_module_info->security !== 'always'" /> None</label>
|
||||
<label for="use_samesite_empty" class="x_inline"><input type="radio" name="use_samesite" id="use_samesite_empty" value="" checked="checked"|cond="!$use_samesite" /> {$lang->use_samesite_empty}</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_use_samesite}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">X-Frame-Options</label>
|
||||
<div class="x_controls">
|
||||
<label for="x_frame_options_deny" class="x_inline"><input type="radio" name="x_frame_options" id="x_frame_options_deny" value="DENY" checked="checked"|cond="$x_frame_options === 'DENY'" /> Deny</label>
|
||||
<label for="x_frame_options_sameorigin" class="x_inline"><input type="radio" name="x_frame_options" id="x_frame_options_sameorigin" value="SAMEORIGIN" checked="checked"|cond="$x_frame_options === 'SAMEORIGIN'" /> SameOrigin</label>
|
||||
<label for="x_frame_options_empty" class="x_inline"><input type="radio" name="x_frame_options" id="x_frame_options_empty" value="" checked="checked"|cond="!$x_frame_options" /> {$lang->use_samesite_empty}</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_x_frame_options}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">X-Content-Type-Options</label>
|
||||
<div class="x_controls">
|
||||
<label for="x_content_type_options_nosniff" class="x_inline"><input type="radio" name="x_content_type_options" id="x_content_type_options_nosniff" value="nosniff" checked="checked"|cond="$x_content_type_options === 'nosniff'" /> nosniff</label>
|
||||
<label for="x_content_type_options_empty" class="x_inline"><input type="radio" name="x_content_type_options" id="x_content_type_options_empty" value="" checked="checked"|cond="!$x_content_type_options" /> {$lang->use_samesite_empty}</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_x_content_type_options}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ body>.x,
|
|||
.x button {
|
||||
font-size: 13px;
|
||||
}
|
||||
.x strong,
|
||||
.x strong,
|
||||
.x th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
|
@ -151,13 +151,13 @@ body>.x,
|
|||
height: 26px;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
.x .x_pagination ul>li>a,
|
||||
.x .x_pagination ul>li>a,
|
||||
.x .x_pagination ul>li>span,
|
||||
.x .x_pagination ul>li>strong {
|
||||
line-height: 24px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.x .x_pagination ul>.x_active>a,
|
||||
.x .x_pagination ul>.x_active>a,
|
||||
.x .x_pagination ul>.x_active>span,
|
||||
.x .x_pagination ul>.x_active>strong {
|
||||
line-height: 26px;
|
||||
|
|
@ -234,15 +234,15 @@ body>.x,
|
|||
.x .x_btn-group>.x_btn-inverse+.x_btn-inverse {
|
||||
border-left-color: #555;
|
||||
}
|
||||
.x input[type="radio"],
|
||||
.x input[type="radio"],
|
||||
.x input[type="checkbox"] {
|
||||
margin: 0;
|
||||
}
|
||||
.x input[type="file"] {
|
||||
height: auto;
|
||||
}
|
||||
.x td select,
|
||||
.x td textarea,
|
||||
.x td select,
|
||||
.x td textarea,
|
||||
.x td input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
@ -331,12 +331,12 @@ body>.x,
|
|||
.x .x_input-append>* {
|
||||
vertical-align: top;
|
||||
}
|
||||
.x .x_input-append a.x_add-on,
|
||||
.x .x_input-append a.x_add-on,
|
||||
.x .x_input-prepend a.x_add-on {
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.x .x_input-append button.x_add-on,
|
||||
.x .x_input-append button.x_add-on,
|
||||
.x .x_input-prepend button.x_add-on {
|
||||
height: 24px;
|
||||
line-height: 16px;
|
||||
|
|
@ -418,18 +418,18 @@ body>.x,
|
|||
.x .x_form-horizontal .x_control-group {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.x input[type="text"],
|
||||
.x input[type="password"],
|
||||
.x input[type="datetime"],
|
||||
.x input[type="datetime-local"],
|
||||
.x input[type="date"],
|
||||
.x input[type="month"],
|
||||
.x input[type="time"],
|
||||
.x input[type="week"],
|
||||
.x input[type="number"],
|
||||
.x input[type="email"],
|
||||
.x input[type="url"],
|
||||
.x input[type="search"],
|
||||
.x input[type="text"],
|
||||
.x input[type="password"],
|
||||
.x input[type="datetime"],
|
||||
.x input[type="datetime-local"],
|
||||
.x input[type="date"],
|
||||
.x input[type="month"],
|
||||
.x input[type="time"],
|
||||
.x input[type="week"],
|
||||
.x input[type="number"],
|
||||
.x input[type="email"],
|
||||
.x input[type="url"],
|
||||
.x input[type="search"],
|
||||
.x input[type="tel"] {
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
|
|
@ -489,7 +489,7 @@ margin-bottom: 10px;
|
|||
.x .x_help-inline {
|
||||
display: inline;
|
||||
}
|
||||
.x .x_btn.x_disabled,
|
||||
.x .x_btn.x_disabled,
|
||||
.x .x_btn[disabled] {
|
||||
opacity: .5;
|
||||
filter: alpha(opacity=50);
|
||||
|
|
@ -1866,8 +1866,8 @@ html[lang="id"] .x .g11n.active>[disabled],
|
|||
/* ---------- Deprecated UI: Please do not use this CSS styles below. It will be removed as soon as possible. ---------- */
|
||||
|
||||
/* Section & Heading */
|
||||
.x .h2,
|
||||
.x .h3,
|
||||
.x .h2,
|
||||
.x .h3,
|
||||
.x .h4 {
|
||||
position: relative;
|
||||
border-style: solid;
|
||||
|
|
@ -1903,9 +1903,9 @@ html[lang="id"] .x .g11n.active>[disabled],
|
|||
.x .h2 + ul,
|
||||
.x .h3 + ul,
|
||||
.x .h4 + ul,
|
||||
.x .h1 + .table table,
|
||||
.x .h2 + .table table,
|
||||
.x .h3 + .table table,
|
||||
.x .h1 + .table table,
|
||||
.x .h2 + .table table,
|
||||
.x .h3 + .table table,
|
||||
.x .h4 + .table table {
|
||||
border-top: 0 !important;
|
||||
margin-top: -1em !important;
|
||||
|
|
@ -2091,7 +2091,7 @@ html[lang="id"] .x .g11n.active>[disabled],
|
|||
vertical-align: top;
|
||||
resize: both;
|
||||
}
|
||||
.x .form span.desc,
|
||||
.x .form span.desc,
|
||||
.x .form em.desc {
|
||||
line-height: 22px;
|
||||
vertical-align: middle;
|
||||
|
|
@ -2286,9 +2286,9 @@ html[lang="id"] .x .g11n.active>[disabled],
|
|||
zoom: 1;
|
||||
box-shadow: 0 0 6px #000;
|
||||
}
|
||||
.modal ul,
|
||||
.modal ol,
|
||||
.modal .lined,
|
||||
.modal ul,
|
||||
.modal ol,
|
||||
.modal .lined,
|
||||
.modal .table {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
|
@ -2338,6 +2338,24 @@ html[lang="id"] .x .g11n.active>[disabled],
|
|||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
.x .x_table th.domain_prefix {
|
||||
text-align: right;
|
||||
padding-right: 0;
|
||||
}
|
||||
.x .x_table td.domain_prefix {
|
||||
color: #888;
|
||||
text-align: right;
|
||||
padding-right: 0;
|
||||
}
|
||||
.x .x_table td.domain_prefix span.domain {
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
color: #333;
|
||||
}
|
||||
.x .x_table .domain_prefix + th,
|
||||
.x .x_table .domain_prefix + td {
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
/* language specific styles */
|
||||
/* English admin_en.css */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* @brief board module admin controller class
|
||||
**/
|
||||
|
||||
class boardAdminController extends board {
|
||||
class BoardAdminController extends Board {
|
||||
|
||||
/**
|
||||
* @brief initialization
|
||||
|
|
@ -85,6 +85,8 @@ class boardAdminController extends board {
|
|||
$args->browser_title = trim(utf8_normalize_spaces($args->browser_title));
|
||||
$args->meta_keywords = $args->meta_keywords ? implode(', ', array_map('trim', explode(',', $args->meta_keywords))) : '';
|
||||
$args->meta_description = trim(utf8_normalize_spaces($args->meta_description));
|
||||
$args->header_text = Rhymix\Modules\Admin\Models\Utility::cleanHeaderAndFooterScripts($args->header_text ?? '');
|
||||
$args->footer_text = Rhymix\Modules\Admin\Models\Utility::cleanHeaderAndFooterScripts($args->footer_text ?? '');
|
||||
|
||||
// if there is an existed module
|
||||
if ($args->module_srl && $module_info->module_srl != $args->module_srl)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* @package /modules/board
|
||||
* @version 0.1
|
||||
*/
|
||||
class boardAdminModel extends board
|
||||
class BoardAdminModel extends Board
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* @brief board module admin view class
|
||||
**/
|
||||
|
||||
class boardAdminView extends board {
|
||||
class BoardAdminView extends Board {
|
||||
|
||||
/**
|
||||
* @brief initialization
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* @brief board module View Action에 대한 API 처리
|
||||
**/
|
||||
|
||||
class boardAPI extends board
|
||||
class BoardAPI extends Board
|
||||
{
|
||||
/**
|
||||
* @brief notice list
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* @brief board module high class
|
||||
**/
|
||||
|
||||
class board extends ModuleObject
|
||||
class Board extends ModuleObject
|
||||
{
|
||||
var $search_option = array('title_content','title','content','comment','user_name','nick_name','user_id','tag'); ///< 검색 옵션
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* @brief board module Controller class
|
||||
**/
|
||||
|
||||
class boardController extends board
|
||||
class BoardController extends Board
|
||||
{
|
||||
/**
|
||||
* @brief initialization
|
||||
|
|
@ -62,6 +62,34 @@ class boardController extends board
|
|||
throw new Rhymix\Framework\Exception('msg_content_too_long');
|
||||
}
|
||||
|
||||
// Check category
|
||||
$category_list = DocumentModel::getCategoryList($this->module_srl);
|
||||
if (count($category_list) > 0)
|
||||
{
|
||||
if ($obj->category_srl)
|
||||
{
|
||||
if (isset($category_list[$obj->category_srl]))
|
||||
{
|
||||
if (!$category_list[$obj->category_srl]->grant)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_permitted');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->category_srl = 0;
|
||||
}
|
||||
}
|
||||
if (!$obj->category_srl && ($this->module_info->allow_no_category ?? 'N') !== 'Y')
|
||||
{
|
||||
if (!$this->grant->manager)
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('categoryneeded');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// unset document style if not manager
|
||||
if(!$this->grant->manager)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
|
||||
class boardMobile extends boardView
|
||||
class BoardMobile extends BoardView
|
||||
{
|
||||
function getBoardCommentPage()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief board module Model class
|
||||
**/
|
||||
class boardModel extends module
|
||||
class BoardModel extends Board
|
||||
{
|
||||
/**
|
||||
* @brief initialization
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief board module View class
|
||||
**/
|
||||
class boardView extends board
|
||||
class BoardView extends Board
|
||||
{
|
||||
var $listConfig;
|
||||
var $columnList;
|
||||
|
|
@ -105,7 +105,11 @@ class boardView extends board
|
|||
* load javascript, JS filters
|
||||
**/
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml');
|
||||
Context::addJsFile($this->module_path.'tpl/js/board.js');
|
||||
Context::loadFile([$this->module_path.'tpl/js/board.js', 'head']);
|
||||
if (config('url.rewrite') > 1)
|
||||
{
|
||||
Context::loadFile([$this->module_path.'tpl/js/rewrite.js', 'body']);
|
||||
}
|
||||
Context::loadLang('./modules/document/lang');
|
||||
Context::loadLang('./modules/comment/lang');
|
||||
|
||||
|
|
@ -926,7 +930,7 @@ class boardView extends board
|
|||
/**
|
||||
* add JS filters
|
||||
**/
|
||||
if(Context::get('logged_info')->is_admin == 'Y' || $this->module_info->allow_no_category == 'Y')
|
||||
if($this->grant->manager || $this->module_info->allow_no_category == 'Y')
|
||||
{
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert_admin.xml');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,138 +0,0 @@
|
|||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
|
||||
/**
|
||||
* @class boardWAP
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief board module WAP class
|
||||
**/
|
||||
|
||||
class boardWAP extends board
|
||||
{
|
||||
/**
|
||||
* @brief wap procedure method
|
||||
**/
|
||||
function procWAP(&$oMobile)
|
||||
{
|
||||
// check grant
|
||||
if(!$this->grant->list || $this->module_info->consultation == 'Y')
|
||||
{
|
||||
return $oMobile->setContent(lang('msg_not_permitted'));
|
||||
}
|
||||
|
||||
// generate document model object
|
||||
$oDocumentModel = getModel('document');
|
||||
|
||||
// if the doument is existed
|
||||
$document_srl = Context::get('document_srl');
|
||||
if($document_srl)
|
||||
{
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if($oDocument->isExists())
|
||||
{
|
||||
// check the grant
|
||||
if(!$this->grant->view)
|
||||
{
|
||||
return $oMobile->setContent(lang('msg_not_permitted'));
|
||||
}
|
||||
|
||||
// setup the browser title
|
||||
Context::setBrowserTitle($oDocument->getTitleText());
|
||||
|
||||
// if the act is display comment list
|
||||
if($this->act=='dispBoardContentCommentList')
|
||||
{
|
||||
|
||||
$oCommentModel = getModel('comment');
|
||||
$output = $oCommentModel->getCommentList($oDocument->document_srl, 0, false, $oDocument->getCommentCount());
|
||||
|
||||
$content = '';
|
||||
if(count($output->data))
|
||||
{
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
$oComment = new commentItem();
|
||||
$oComment->setAttribute($val);
|
||||
|
||||
if(!$oComment->isAccessible()) continue;
|
||||
|
||||
$content .= "<b>".$oComment->getNickName()."</b> (".$oComment->getRegdate("Y-m-d").")<br>\r\n".$oComment->getContent(false,false)."<br>\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
// setup mobile contents
|
||||
$oMobile->setContent( $content );
|
||||
|
||||
// setup upper URL
|
||||
$oMobile->setUpperUrl( getUrl('act',''), lang('cmd_go_upper') );
|
||||
|
||||
// display the document if the act is not display the comment list
|
||||
} else {
|
||||
|
||||
// setup contents (strip all html tags)
|
||||
$content = strip_tags(str_replace('<p>','<br> ',$oDocument->getContent(false,false,false)),'<br><b><i><u><em><small><strong><big>');
|
||||
|
||||
|
||||
// setup content information(include the comments link)
|
||||
$content = lang('replies').' : <a href="'.getUrl('act','dispBoardContentCommentList').'">'.$oDocument->getCommentCount().'</a><br>'."\r\n".$content;
|
||||
$content = '<b>'.$oDocument->getNickName().'</b> ('.$oDocument->getRegdate("Y-m-d").")<br>\r\n".$content;
|
||||
|
||||
// setup mobile contents
|
||||
$oMobile->setContent( $content );
|
||||
|
||||
// setup upper URL
|
||||
$oMobile->setUpperUrl( getUrl('document_srl',''), lang('cmd_list') );
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// board index
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $this->module_srl;
|
||||
$args->page = Context::get('page');;
|
||||
$args->list_count = 9;
|
||||
$args->sort_index = $this->module_info->order_target?$this->module_info->order_target:'list_order';
|
||||
$args->order_type = $this->module_info->order_type?$this->module_info->order_type:'asc';
|
||||
$output = $oDocumentModel->getDocumentList($args, $this->except_notice);
|
||||
$document_list = $output->data;
|
||||
$page_navigation = $output->page_navigation;
|
||||
|
||||
$childs = array();
|
||||
if($document_list && count($document_list))
|
||||
{
|
||||
foreach($document_list as $key => $val)
|
||||
{
|
||||
$href = getUrl('mid',$_GET['mid'],'document_srl',$val->document_srl);
|
||||
$obj = null;
|
||||
$obj['href'] = $val->getPermanentUrl();
|
||||
|
||||
$title = htmlspecialchars($val->getTitleText());
|
||||
if($val->getCommentCount()) $title .= ' ['.$val->getCommentCount().']';
|
||||
$obj['link'] = $obj['text'] = '['.$val->getNickName().'] '.$title;
|
||||
$childs[] = $obj;
|
||||
}
|
||||
$oMobile->setChilds($childs);
|
||||
}
|
||||
|
||||
$totalPage = $page_navigation->last_page;
|
||||
$page = (int)Context::get('page');
|
||||
if(!$page) $page = 1;
|
||||
|
||||
// next/prevUrl specification
|
||||
if($page > 1)
|
||||
{
|
||||
$oMobile->setPrevUrl(getUrl('mid',$_GET['mid'],'page',$page-1), sprintf('%s (%d/%d)', lang('cmd_prev'), $page-1, $totalPage));
|
||||
}
|
||||
|
||||
if($page < $totalPage)
|
||||
{
|
||||
$oMobile->setNextUrl(getUrl('mid',$_GET['mid'],'page',$page+1), sprintf('%s (%d/%d)', lang('cmd_next'), $page+1, $totalPage));
|
||||
}
|
||||
|
||||
$oMobile->mobilePage = $page;
|
||||
$oMobile->totalPage = $totalPage;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,16 @@
|
|||
<query id="getBoardList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
<table name="domains" type="left join">
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.domain_srl" default="domains.domain_srl" />
|
||||
<condition operation="notequal" column="modules.domain_srl" default="-1" />
|
||||
</conditions>
|
||||
</table>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
<column name="modules.*" />
|
||||
<column name="domains.domain" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module" default="board" />
|
||||
|
|
|
|||
|
|
@ -15,11 +15,17 @@
|
|||
<section class="section">
|
||||
<h1>{$lang->subtitle_primary}</h1>
|
||||
<div cond="$logged_info->is_admin == 'Y'" class="x_control-group">
|
||||
<label class="x_control-label" for="board_name">{$lang->mid}</label>
|
||||
<label class="x_control-label" for="board_name">{$lang->url}</label>
|
||||
<div class="x_controls">
|
||||
<select name="domain_srl" id="domain_srl">
|
||||
<option value="-1" selected="selected"|cond="!isset($module_info->domain_srl) || $module_info->domain_srl == -1">{$lang->cmd_any_domain}</option>
|
||||
<!--@foreach(ModuleModel::getAllDomains(100)->data as $domain)-->
|
||||
<option value="{$domain->domain_srl}" selected="selected"|cond="$domain->domain_srl == $module_info->domain_srl">{$domain->domain}</option>
|
||||
<!--@endif-->
|
||||
</select>
|
||||
<span class="baseurl">{\RX_BASEURL}<!--@if(!config('url.rewrite'))-->index.php?mid=<!--@endif--></span>
|
||||
<input type="text" name="board_name" id="board_name" value="{$module_info->mid}" />
|
||||
<a href="#module_name_help" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
|
||||
<p id="module_name_help" class="x_help-block" hidden>{$lang->about_mid}</p>
|
||||
<p class="x_help-block">{$lang->about_mid}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
<tr>
|
||||
<th scope="col">{$lang->no}</th>
|
||||
<th scope="col">{$lang->module_category}</th>
|
||||
<th scope="col">{$lang->mid}</th>
|
||||
<th scope="col" class="domain_prefix">{$lang->domain} /</th>
|
||||
<th scope="col">{$lang->url}</th>
|
||||
<th scope="col">{$lang->browser_title}</th>
|
||||
<th scope="col">{$lang->regdate}</th>
|
||||
<th scope="col">{$lang->cmd_edit}</th>
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
</block>
|
||||
<block cond="$val->module_category_srl">{$module_category[$val->module_category_srl]->title}</block>
|
||||
</td>
|
||||
<td class="domain_prefix"><span class="domain">{$val->domain ?? ''}</span>{\RX_BASEURL}</td>
|
||||
<td>{$val->mid}</td>
|
||||
<td><a href="{getSiteUrl($val->domain,'','mid',$val->mid)}">{$val->browser_title}</a></td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
|
|
|
|||
|
|
@ -1,192 +1,177 @@
|
|||
/**
|
||||
* @file modules/board/js/board.js
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief board 모듈의 javascript
|
||||
**/
|
||||
|
||||
/* complete tp insert document */
|
||||
function completeDocumentInserted(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var category_srl = ret_obj.category_srl;
|
||||
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url;
|
||||
if(!document_srl)
|
||||
{
|
||||
url = current_url.setQuery('mid',mid).setQuery('act','');
|
||||
}
|
||||
else
|
||||
{
|
||||
url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
}
|
||||
if(category_srl) url = url.setQuery('category',category_srl);
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete the document */
|
||||
function completeDeleteDocument(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var page = ret_obj.page;
|
||||
|
||||
var url = current_url.setQuery('mid',mid).setQuery('act','').setQuery('document_srl','');
|
||||
if(page) url = url.setQuery('page',page);
|
||||
redirect(url);
|
||||
}
|
||||
|
||||
/* document search */
|
||||
function completeSearch(ret_obj, response_tags, params, fo_obj)
|
||||
{
|
||||
fo_obj.submit();
|
||||
}
|
||||
|
||||
function completeVote(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
redirect(window.location.href);
|
||||
}
|
||||
|
||||
// current page reload
|
||||
function completeReload(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
redirect(window.location.href);
|
||||
}
|
||||
|
||||
/* complete to insert comment*/
|
||||
function completeInsertComment(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var comment_srl = ret_obj.comment_srl;
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
if (comment_srl) url = url.setQuery('comment_srl',comment_srl)+"#comment_"+comment_srl;
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete the comment */
|
||||
function completeDeleteComment(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var page = ret_obj.page;
|
||||
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
if (page) url = url.setQuery('page',page);
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete the trackback */
|
||||
function completeDeleteTrackback(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var page = ret_obj.page;
|
||||
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
if (page) url = url.setQuery('page',page);
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* change category */
|
||||
function doChangeCategory()
|
||||
{
|
||||
var category_srl = jQuery('#board_category option:selected').val();
|
||||
location.href = decodeURI(current_url).setQuery('category',category_srl).setQuery('page', '');
|
||||
}
|
||||
|
||||
/* scrap */
|
||||
function doScrap(document_srl)
|
||||
{
|
||||
var params = [];
|
||||
params.document_srl = document_srl;
|
||||
jQuery.exec_json('member.procMemberScrapDocument', params);
|
||||
}
|
||||
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
/* remove comment_srl and unnecessary page number from short URL */
|
||||
var match = location.pathname.match(/\/([a-zA-Z0-9_]+)\/([0-9]+)\/(comment|page)\/([0-9]+)$/);
|
||||
if (match && match[1] === window.current_mid) {
|
||||
var newpath = location.pathname.replace(/\/(comment|page)\/([0-9]+)$/, '');
|
||||
if (location.hash && location.hash !== '#') {
|
||||
newpath += location.hash;
|
||||
}
|
||||
if (history.replaceState) {
|
||||
history.replaceState({
|
||||
rx_replaced: true,
|
||||
prev: location.pathname,
|
||||
}, '', newpath);
|
||||
}
|
||||
}
|
||||
|
||||
$(document.body).click(function(e){
|
||||
var t = $(e.target), act, params = {};
|
||||
|
||||
if(t.parents('.layer_voted_member').length === 0 && !t.is('.layer_voted_member')){
|
||||
$('.layer_voted_member').hide().remove();
|
||||
}
|
||||
|
||||
if(!t.is('a[class^=voted_member_]')) return;
|
||||
|
||||
var srl = parseInt(t.attr('class').replace(/[^0-9]/g,''));
|
||||
if(!srl) return;
|
||||
|
||||
if(t.hasClass('comment')){
|
||||
act = 'comment.getCommentVotedMemberList';
|
||||
params =
|
||||
{'comment_srl':srl,'point':(t.hasClass('votedup')?1:-1)};
|
||||
}else{
|
||||
act = 'document.getDocumentVotedMemberList';
|
||||
params =
|
||||
{'document_srl':srl,'point':(t.hasClass('votedup')?1:-1)};
|
||||
}
|
||||
|
||||
$.exec_json(act, params, function(data){
|
||||
var l = data.voted_member_list;
|
||||
var ul = [];
|
||||
|
||||
if(!l || l.length === 0) return;
|
||||
|
||||
$.each(l,function(){
|
||||
ul.push(this.nick_name);
|
||||
});
|
||||
|
||||
t.after($('<ul>')
|
||||
.addClass('layer_voted_member')
|
||||
.css({'position':'absolute','top':e.pageY+5,'left':e.pageX})
|
||||
.append('<li>'+ul.join('</li><li>')+'</li>')
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
/**
|
||||
* @file modules/board/js/board.js
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief board 모듈의 javascript
|
||||
**/
|
||||
|
||||
/* complete tp insert document */
|
||||
function completeDocumentInserted(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var category_srl = ret_obj.category_srl;
|
||||
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url;
|
||||
if(!document_srl)
|
||||
{
|
||||
url = current_url.setQuery('mid',mid).setQuery('act','');
|
||||
}
|
||||
else
|
||||
{
|
||||
url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
}
|
||||
if(category_srl) url = url.setQuery('category',category_srl);
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete the document */
|
||||
function completeDeleteDocument(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var page = ret_obj.page;
|
||||
|
||||
var url = current_url.setQuery('mid',mid).setQuery('act','').setQuery('document_srl','');
|
||||
if(page) url = url.setQuery('page',page);
|
||||
redirect(url);
|
||||
}
|
||||
|
||||
/* document search */
|
||||
function completeSearch(ret_obj, response_tags, params, fo_obj)
|
||||
{
|
||||
fo_obj.submit();
|
||||
}
|
||||
|
||||
function completeVote(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
redirect(window.location.href);
|
||||
}
|
||||
|
||||
// current page reload
|
||||
function completeReload(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
redirect(window.location.href);
|
||||
}
|
||||
|
||||
/* complete to insert comment*/
|
||||
function completeInsertComment(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var comment_srl = ret_obj.comment_srl;
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
if (comment_srl) url = url.setQuery('comment_srl',comment_srl)+"#comment_"+comment_srl;
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete the comment */
|
||||
function completeDeleteComment(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var page = ret_obj.page;
|
||||
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
if (page) url = url.setQuery('page',page);
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete the trackback */
|
||||
function completeDeleteTrackback(ret_obj)
|
||||
{
|
||||
var error = ret_obj.error;
|
||||
var message = ret_obj.message;
|
||||
var mid = ret_obj.mid;
|
||||
var document_srl = ret_obj.document_srl;
|
||||
var page = ret_obj.page;
|
||||
|
||||
if (ret_obj.redirect_url) {
|
||||
redirect(ret_obj.redirect_url);
|
||||
} else {
|
||||
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
if (page) url = url.setQuery('page',page);
|
||||
redirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
/* change category */
|
||||
function doChangeCategory()
|
||||
{
|
||||
var category_srl = jQuery('#board_category option:selected').val();
|
||||
location.href = decodeURI(current_url).setQuery('category',category_srl).setQuery('page', '');
|
||||
}
|
||||
|
||||
/* scrap */
|
||||
function doScrap(document_srl)
|
||||
{
|
||||
var params = [];
|
||||
params.document_srl = document_srl;
|
||||
jQuery.exec_json('member.procMemberScrapDocument', params);
|
||||
}
|
||||
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
$(document.body).click(function(e){
|
||||
var t = $(e.target), act, params = {};
|
||||
|
||||
if(t.parents('.layer_voted_member').length === 0 && !t.is('.layer_voted_member')){
|
||||
$('.layer_voted_member').hide().remove();
|
||||
}
|
||||
|
||||
if(!t.is('a[class^=voted_member_]')) return;
|
||||
|
||||
var srl = parseInt(t.attr('class').replace(/[^0-9]/g,''));
|
||||
if(!srl) return;
|
||||
|
||||
if(t.hasClass('comment')){
|
||||
act = 'comment.getCommentVotedMemberList';
|
||||
params =
|
||||
{'comment_srl':srl,'point':(t.hasClass('votedup')?1:-1)};
|
||||
}else{
|
||||
act = 'document.getDocumentVotedMemberList';
|
||||
params =
|
||||
{'document_srl':srl,'point':(t.hasClass('votedup')?1:-1)};
|
||||
}
|
||||
|
||||
$.exec_json(act, params, function(data){
|
||||
var l = data.voted_member_list;
|
||||
var ul = [];
|
||||
|
||||
if(!l || l.length === 0) return;
|
||||
|
||||
$.each(l,function(){
|
||||
ul.push(this.nick_name);
|
||||
});
|
||||
|
||||
t.after($('<ul>')
|
||||
.addClass('layer_voted_member')
|
||||
.css({'position':'absolute','top':e.pageY+5,'left':e.pageX})
|
||||
.append('<li>'+ul.join('</li><li>')+'</li>')
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
20
modules/board/tpl/js/rewrite.js
Normal file
20
modules/board/tpl/js/rewrite.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* Remove comment_srl and unnecessary page number from short URL
|
||||
*/
|
||||
(function() {
|
||||
var match = location.pathname.match(/\/([a-zA-Z0-9_]+)\/([0-9]+)\/(comment|page)\/([0-9]+)$/);
|
||||
if (match && match[1] === window.current_mid) {
|
||||
var newpath = location.pathname.replace(/\/(comment|page)\/([0-9]+)$/, '');
|
||||
if (location.hash && location.hash !== '#') {
|
||||
newpath += location.hash;
|
||||
}
|
||||
if (history.replaceState) {
|
||||
history.replaceState({
|
||||
rx_replaced: true,
|
||||
prev: location.pathname,
|
||||
}, '', newpath);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
@ -486,7 +486,7 @@ class CommentController extends Comment
|
|||
// even for manual_inserted if password exists, hash it.
|
||||
if($obj->password)
|
||||
{
|
||||
$obj->password = MemberModel::hashPassword($obj->password);
|
||||
$obj->password = \Rhymix\Framework\Password::hashPassword($obj->password, \Rhymix\Framework\Password::getBackwardCompatibleAlgorithm());
|
||||
}
|
||||
|
||||
// get the original posting
|
||||
|
|
@ -871,7 +871,7 @@ class CommentController extends Comment
|
|||
|
||||
if($obj->password)
|
||||
{
|
||||
$obj->password = MemberModel::hashPassword($obj->password);
|
||||
$obj->password = \Rhymix\Framework\Password::hashPassword($obj->password, \Rhymix\Framework\Password::getBackwardCompatibleAlgorithm());
|
||||
}
|
||||
|
||||
if($obj->homepage)
|
||||
|
|
|
|||
|
|
@ -459,6 +459,7 @@ class CommentItem extends BaseObject
|
|||
$content = $this->get('content');
|
||||
}
|
||||
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $content);
|
||||
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
|
||||
if($strlen)
|
||||
{
|
||||
|
|
@ -490,9 +491,10 @@ class CommentItem extends BaseObject
|
|||
$content = $this->get('content');
|
||||
}
|
||||
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $content);
|
||||
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
|
||||
if($strlen)
|
||||
{
|
||||
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
|
||||
$content = cut_str($content, $strlen, '...');
|
||||
}
|
||||
return escape($content);
|
||||
|
|
@ -564,7 +566,9 @@ class CommentItem extends BaseObject
|
|||
function getSummary($str_size = 50, $tail = '...')
|
||||
{
|
||||
// Remove tags
|
||||
$content = strip_tags($this->getContent(false, false));
|
||||
$content = $this->getContent(false, false);
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $content);
|
||||
$content = strip_tags($content);
|
||||
|
||||
// Convert temporarily html entity for truncate
|
||||
$content = html_entity_decode($content, ENT_QUOTES);
|
||||
|
|
|
|||
|
|
@ -174,6 +174,30 @@ class communicationController extends communication
|
|||
$message_srl = $temp_srl ?: getNextSequence();
|
||||
$related_srl = getNextSequence();
|
||||
|
||||
// Call a trigger (before)
|
||||
$trigger_obj = new stdClass();
|
||||
$trigger_obj->sender_srl = $sender_srl;
|
||||
$trigger_obj->receiver_srl = $receiver_srl;
|
||||
$trigger_obj->message_srl = $message_srl;
|
||||
$trigger_obj->related_srl = $related_srl;
|
||||
$trigger_obj->title = $title;
|
||||
$trigger_obj->content = $content;
|
||||
$trigger_obj->sender_log = $sender_log;
|
||||
$trigger_obj->use_spamfilter = $use_spamfilter;
|
||||
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
|
||||
if(!$trigger_output->toBool())
|
||||
{
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
// Copy trigger result
|
||||
$sender_srl = $trigger_obj->sender_srl ?? $sender_srl;
|
||||
$receiver_srl = $trigger_obj->receiver_srl ?? $receiver_srl;
|
||||
$title = $trigger_obj->title ?? $title;
|
||||
$content = $trigger_obj->content ?? $content;
|
||||
$sender_log = boolval($trigger_obj->sender_log ?? $sender_log);
|
||||
$use_spamfilter = boolval($trigger_obj->use_spamfilter ?? $use_spamfilter);
|
||||
|
||||
// messages to save in the sendor's message box
|
||||
$sender_args = new stdClass();
|
||||
$sender_args->sender_srl = $sender_srl;
|
||||
|
|
@ -204,22 +228,6 @@ class communicationController extends communication
|
|||
$receiver_args->readed = 'N';
|
||||
$receiver_args->regdate = date("YmdHis");
|
||||
|
||||
// Call a trigger (before)
|
||||
$trigger_obj = new stdClass();
|
||||
$trigger_obj->sender_srl = $sender_srl;
|
||||
$trigger_obj->receiver_srl = $receiver_srl;
|
||||
$trigger_obj->message_srl = $message_srl;
|
||||
$trigger_obj->related_srl = $related_srl;
|
||||
$trigger_obj->title = $title;
|
||||
$trigger_obj->content = $content;
|
||||
$trigger_obj->sender_log = $sender_log;
|
||||
$trigger_obj->use_spamfilter = $use_spamfilter;
|
||||
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
|
||||
if(!$trigger_output->toBool())
|
||||
{
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,38 +11,9 @@ class communicationMobile extends communicationView
|
|||
|
||||
function init()
|
||||
{
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
$this->config = $oCommunicationModel->getConfig();
|
||||
$this->config = CommunicationModel::getConfig();
|
||||
Context::set('communication_config', $this->config);
|
||||
|
||||
$mskin = $this->config->mskin;
|
||||
if(!$mskin)
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s/', $this->module_path, 'default');
|
||||
}
|
||||
elseif($mskin === '/USE_RESPONSIVE/')
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->config->skin);
|
||||
if(!is_dir($template_path) || !$this->config->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
|
||||
}
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->config->mlayout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->mlayout_srl = $this->config->mlayout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
|
||||
$this->setTemplatePath($template_path);
|
||||
$this->setLayoutAndTemplatePaths('M', $this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,6 +22,14 @@ class communicationMobile extends communicationView
|
|||
*/
|
||||
function dispCommunicationMessageBoxList()
|
||||
{
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
$this->setTemplateFile('message_box');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,9 +226,12 @@ class communicationModel extends communication
|
|||
* get a message list
|
||||
* @param string $message_type (R: Received Message, S: Sent Message, T: Archive)
|
||||
* @param array $columnList
|
||||
* @param string $search_target
|
||||
* @param string $search_keyword
|
||||
* @param int $page
|
||||
* @return Object
|
||||
*/
|
||||
public static function getMessages($message_type = "R", $columnList = array())
|
||||
public static function getMessages($message_type = 'R', $columnList = [], $search_target = null, $search_keyword = null, $page = null)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args = new stdClass();
|
||||
|
|
@ -260,9 +263,15 @@ class communicationModel extends communication
|
|||
break;
|
||||
}
|
||||
|
||||
// Search conditions
|
||||
if ($search_target && $search_keyword)
|
||||
{
|
||||
$args->{'s_' . $search_target} = $search_keyword;
|
||||
}
|
||||
|
||||
// Other variables
|
||||
$args->sort_index = 'message.list_order';
|
||||
$args->page = Context::get('page');
|
||||
$args->page = $page ?? max(1, intval(Context::get('page')));
|
||||
$args->list_count = 20;
|
||||
$args->page_count = 10;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,33 +15,9 @@ class communicationView extends communication
|
|||
*/
|
||||
function init()
|
||||
{
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
$this->config = $oCommunicationModel->getConfig();
|
||||
$skin = $this->config->skin;
|
||||
|
||||
$this->config = CommunicationModel::getConfig();
|
||||
Context::set('communication_config', $this->config);
|
||||
|
||||
$config_parse = explode('|@|', $skin);
|
||||
|
||||
if(count($config_parse) > 1)
|
||||
{
|
||||
$tpl_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
}
|
||||
|
||||
$this->setTemplatePath($tpl_path);
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->config->layout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->layout_srl = $this->config->layout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
$this->setLayoutAndTemplatePaths('P', $this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -61,6 +37,14 @@ class communicationView extends communication
|
|||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// Set the variables
|
||||
|
|
@ -86,28 +70,28 @@ class communicationView extends communication
|
|||
case 'R':
|
||||
if($message->receiver_srl != $logged_info->member_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
if($message->sender_srl != $logged_info->member_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
if($message->receiver_srl != $logged_info->member_srl && $message->sender_srl != $logged_info->member_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
if($message->receiver_srl != $logged_info->member_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -129,9 +113,20 @@ class communicationView extends communication
|
|||
}
|
||||
}
|
||||
|
||||
// Set search conditions
|
||||
$search_target = Context::get('search_target');
|
||||
if (!in_array($search_target, ['title', 'title_content', 'content']))
|
||||
{
|
||||
$search_target = null;
|
||||
}
|
||||
$search_keyword = utf8_clean(Context::get('search_keyword'));
|
||||
Context::set('search_target', $search_target);
|
||||
Context::set('search_keyword', $search_keyword !== '' ? $search_keyword : null);
|
||||
|
||||
// Extract a list
|
||||
$columnList = array('message_srl', 'message_type', 'related_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
|
||||
$output = $oCommunicationModel->getMessages($message_type, $columnList);
|
||||
$page = max(1, intval(Context::get('page')));
|
||||
$output = $oCommunicationModel->getMessages($message_type, $columnList, $search_target, $search_keyword, $page);
|
||||
|
||||
// set a template file
|
||||
Context::set('total_count', $output->total_count);
|
||||
|
|
@ -166,11 +161,17 @@ class communicationView extends communication
|
|||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
$oCommunicationModel = getModel('communication');
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
// get a new message
|
||||
$columnList = array('message_srl', 'member_srl', 'nick_name', 'title', 'content', 'sender_srl');
|
||||
$message = $oCommunicationModel->getNewMessage($columnList);
|
||||
$message = CommunicationModel::getInstance()->getNewMessage($columnList);
|
||||
if($message)
|
||||
{
|
||||
stripEmbedTagForAdmin($message->content, $message->sender_srl);
|
||||
|
|
@ -196,23 +197,33 @@ class communicationView extends communication
|
|||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
// Error appears if not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
// Check permission
|
||||
if(!getModel('communication')->checkGrant($this->config->grant_send))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
// Fix missing mid (it causes errors when uploading)
|
||||
if(!Context::get('mid'))
|
||||
{
|
||||
Context::set('mid', Context::get('site_module_info')->mid);
|
||||
}
|
||||
|
||||
// Error appears if not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// get receipient's information
|
||||
|
|
@ -299,6 +310,14 @@ class communicationView extends communication
|
|||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
// get a group list
|
||||
|
|
@ -358,6 +377,14 @@ class communicationView extends communication
|
|||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$target_srl = Context::get('target_srl');
|
||||
|
||||
|
|
@ -408,7 +435,13 @@ class communicationView extends communication
|
|||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
// Check member mid
|
||||
$oMemberView = MemberView::getInstance();
|
||||
if (!$oMemberView->checkMidAndRedirect())
|
||||
{
|
||||
$this->setRedirectUrl($oMemberView->getRedirectUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
// change to edit mode when getting the group_srl
|
||||
$friend_group_srl = Context::get('friend_group_srl');
|
||||
|
|
|
|||
|
|
@ -2,14 +2,19 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispCommunicationMessages" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispCommunicationSendMessage" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispCommunicationNewMessage" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispCommunicationFriend" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispCommunicationAddFriend" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispCommunicationAddFriendGroup" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispCommunicationMessageBoxList" type="mobile" permission="member" meta-noindex="true" />
|
||||
|
||||
<action name="dispCommunicationMessages" type="view" permission="member" meta-noindex="true">
|
||||
<route route="messages" />
|
||||
<route route="messages/$message_srl:int" />
|
||||
<route route="messages/type/$message_type:word" />
|
||||
<route route="messages/type/$message_type:word/$message_srl:int" />
|
||||
</action>
|
||||
<action name="dispCommunicationSendMessage" type="view" permission="member" route="messages/send" meta-noindex="true" />
|
||||
<action name="dispCommunicationNewMessage" type="view" permission="member" route="messages/new" meta-noindex="true" />
|
||||
<action name="dispCommunicationFriend" type="view" permission="member" route="friends" meta-noindex="true" />
|
||||
<action name="dispCommunicationAddFriend" type="view" permission="member" route="friends/add" meta-noindex="true" />
|
||||
<action name="dispCommunicationAddFriendGroup" type="view" permission="member" route="friends/addGroup" meta-noindex="true" />
|
||||
<action name="dispCommunicationMessageBoxList" type="mobile" permission="member" route="messages/boxes" meta-noindex="true" />
|
||||
|
||||
<action name="procCommunicationUpdateAllowMessage" type="controller" permission="member" />
|
||||
<action name="procCommunicationSendMessage" type="controller" permission="member" ruleset="sendMessage" />
|
||||
<action name="procCommunicationStoreMessage" type="controller" permission="member" />
|
||||
|
|
@ -22,7 +27,7 @@
|
|||
<action name="procCommunicationDeleteFriend" type="controller" permission="member" ruleset="deleteCheckedFriend" />
|
||||
<action name="procCommunicationDeleteFriendGroup" type="controller" permission="member" />
|
||||
<action name="procCommunicationRenameFriendGroup" type="controller" permission="member" />
|
||||
|
||||
|
||||
<action name="dispCommunicationAdminConfig" type="view" admin_index="true" />
|
||||
<action name="getCommunicationAdminColorset" type="model" />
|
||||
<action name="procCommunicationAdminInsertConfig" type="controller" ruleset="insertConfig" />
|
||||
|
|
|
|||
|
|
@ -109,13 +109,16 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
|
|||
.bna{text-align:center;padding:0 10px;margin:10px 0;zoom:1}
|
||||
.bna:after{content:"";display:block;clear:both}
|
||||
.bn{display:inline-block;line-height:26px !important;padding:0 10px;font-size:12px;font-weight:bold;border:1px solid;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;cursor:pointer;vertical-align:middle}
|
||||
.bn[type=submit],
|
||||
.bn[type=submit],
|
||||
.bn[type=button]{height:28px}
|
||||
.bn[href]{height:26px}
|
||||
.bn.dark{border-color:#666;background:-webkit-linear-gradient(top,#7e7c78,#5c5b58);background:-moz-linear-gradient(top,#7e7c78,#5c5b58);background:-o-linear-gradient(top,#7e7c78,#5c5b58);background:-ms-linear-gradient(top,#7e7c78,#5c5b58);background:linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset}
|
||||
.bn.white{border-color:#b5b5b5;background:-webkit-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6 100%);background:-moz-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6 100%);background:-o-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6 100%);background:-ms-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6 100%);background:linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6 100%);background-color:#fff;color:#000;margin-right:2px}
|
||||
/* Search */
|
||||
.search { text-align: center; text-align:center;background:#f2f0ec;padding:15px 0 0 0; }
|
||||
.search select { height: 26px; }
|
||||
/* Pagination */
|
||||
.pn{font-size:12px;text-align:center;background:#f2f0ec;padding:15px 0;border-top:1px solid #fff}
|
||||
.pn{font-size:12px;text-align:center;background:#f2f0ec;padding:15px 0;}
|
||||
.pn a{color:#333;text-decoration:none}
|
||||
.pn strong{margin:0 10px}
|
||||
.pn .prev:before{content:"";display:inline-block;width:0;height:0;margin:0 4px 0 0;border:4px solid;border-color:transparent;border-right-color:#999}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,21 @@
|
|||
<span class="memberInfo">{$val->nick_name} ({zdate($val->regdate,"Y-m-d")})</span>
|
||||
</li>
|
||||
</ul>
|
||||
<form action="{Context::getRequestUri()}" method="get" no-error-return-url="true" class="search">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="message_type" value="{$message_type ?? 'R'}" />
|
||||
<select name="search_target" title="{$lang->search_target}">
|
||||
<option value="title" selected="selected"|cond="isset($search_target) && $search_target == 'title'">{$lang->title}</option>
|
||||
<option value="title_content" selected="selected"|cond="isset($search_target) && $search_target == 'title_content'">{$lang->title_content}</option>
|
||||
<option value="content" selected="selected"|cond="isset($search_target) && $search_target == 'content'">{$lang->content}</option>
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{escape($search_keyword ?? '', false)}">
|
||||
<button type="submit" class="btn">{$lang->cmd_search}</button>
|
||||
</form>
|
||||
<div class="pn">
|
||||
<a cond="$page != 1" href="{getUrl('page',$page-1,'document_srl','')}" class="prev">{$lang->cmd_prev}</a>
|
||||
<strong>{$page} / {$page_navigation->last_page}</strong>
|
||||
<a cond="$page != $page_navigation->last_page" href="{getUrl('page',$page+1,'document_srl','')}" class="next">{$lang->cmd_next}</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,14 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="message.readed" var="readed" notnull="notnull" />
|
||||
<condition operation="equal" column="message.receiver_srl" var="member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="R" pipe="and" />
|
||||
<condition operation="equal" column="message.receiver_srl" var="member_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="R" />
|
||||
<condition operation="search" column="message.title" var="s_title" />
|
||||
<condition operation="search" column="message.content" var="s_content" />
|
||||
<group>
|
||||
<condition operation="search" column="message.title" var="s_title_content" />
|
||||
<condition operation="search" column="message.content" var="s_title_content" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="message.receiver_srl" var="member_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="R" pipe="and" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="R" />
|
||||
<condition operation="search" column="message.title" var="s_title" />
|
||||
<condition operation="search" column="message.content" var="s_content" />
|
||||
<group>
|
||||
<condition operation="search" column="message.title" var="s_title_content" />
|
||||
<condition operation="search" column="message.content" var="s_title_content" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="message.sender_srl" var="member_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="S" pipe="and" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="S" />
|
||||
<condition operation="search" column="message.title" var="s_title" />
|
||||
<condition operation="search" column="message.content" var="s_content" />
|
||||
<group>
|
||||
<condition operation="search" column="message.title" var="s_title_content" />
|
||||
<condition operation="search" column="message.content" var="s_title_content" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@
|
|||
<conditions>
|
||||
<condition operation="equal" column="message.receiver_srl" var="member_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="T" pipe="and" />
|
||||
<condition operation="search" column="message.title" var="s_title" />
|
||||
<condition operation="search" column="message.content" var="s_content" />
|
||||
<group>
|
||||
<condition operation="search" column="message.title" var="s_title_content" />
|
||||
<condition operation="search" column="message.content" var="s_title_content" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ function completeSendMessage(ret_obj) {
|
|||
|
||||
function doSendMessage(member_srl, message_srl) {
|
||||
if(typeof(message_srl)=='undefined') message_srl = 0;
|
||||
var url = request_uri.setQuery('module','communication').setQuery('act','dispCommunicationSendMessage').setQuery('receiver_srl',member_srl).setQuery('message_srl',message_srl);
|
||||
var url = request_uri.setQuery('mid',current_mid).setQuery('act','dispCommunicationSendMessage').setQuery('receiver_srl',member_srl).setQuery('message_srl',message_srl);
|
||||
popopen(url, 'sendMessage');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,13 +92,26 @@
|
|||
<input type="submit" class="btn" value="{$lang->cmd_delete}" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="pagination pagination-centered">
|
||||
<ul>
|
||||
<div class="pagination">
|
||||
<form action="{Context::getRequestUri()}" method="get" no-error-return-url="true" style="float:left">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="message_type" value="{$message_type ?? 'R'}" />
|
||||
<select name="search_target" title="{$lang->search_target}">
|
||||
<option value="title" selected="selected"|cond="isset($search_target) && $search_target == 'title'">{$lang->title}</option>
|
||||
<option value="title_content" selected="selected"|cond="isset($search_target) && $search_target == 'title_content'">{$lang->title_content}</option>
|
||||
<option value="content" selected="selected"|cond="isset($search_target) && $search_target == 'content'">{$lang->content}</option>
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{escape($search_keyword ?? '', false)}">
|
||||
<button type="submit" class="btn">{$lang->cmd_search}</button>
|
||||
</form>
|
||||
<ul style="float:right;margin:0;padding:0">
|
||||
<li><a href="{getUrl('page','','document_srl','')}" class="direction">« {$lang->first_page}</a></li>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<li class="active"|cond="$page == $page_no"><a href="{getUrl('page',$page_no,'document_srl','')}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
<li><a href="{getUrl('page',$page_navigation->last_page,'document_srl','')}" class="direction">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
<include target="./common_footer.html" />
|
||||
|
|
|
|||
|
|
@ -608,11 +608,20 @@ class DocumentController extends Document
|
|||
if($obj->category_srl)
|
||||
{
|
||||
$category_list = DocumentModel::getCategoryList($obj->module_srl);
|
||||
if(count($category_list) > 0 && !$category_list[$obj->category_srl]->grant)
|
||||
if (count($category_list) > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_permitted');
|
||||
if (isset($category_list[$obj->category_srl]))
|
||||
{
|
||||
if (!$category_list[$obj->category_srl]->grant)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_permitted');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->category_srl = 0;
|
||||
}
|
||||
}
|
||||
if(count($category_list) > 0 && !$category_list[$obj->category_srl]) $obj->category_srl = 0;
|
||||
}
|
||||
|
||||
// Set the read counts and update order.
|
||||
|
|
@ -623,7 +632,7 @@ class DocumentController extends Document
|
|||
// Check the status of password hash for manually inserting. Apply hashing for otherwise.
|
||||
if($obj->password && !$obj->password_is_hashed)
|
||||
{
|
||||
$obj->password = MemberModel::hashPassword($obj->password);
|
||||
$obj->password = \Rhymix\Framework\Password::hashPassword($obj->password, \Rhymix\Framework\Password::getBackwardCompatibleAlgorithm());
|
||||
}
|
||||
|
||||
// Insert member's information only if the member is logged-in and not manually registered.
|
||||
|
|
@ -720,7 +729,10 @@ class DocumentController extends Document
|
|||
}
|
||||
|
||||
// Update the category if the category_srl exists.
|
||||
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
|
||||
if($obj->category_srl)
|
||||
{
|
||||
$this->updateCategoryCount($obj->module_srl, $obj->category_srl);
|
||||
}
|
||||
|
||||
// Call a trigger (after)
|
||||
if($obj->update_log_setting === 'Y')
|
||||
|
|
@ -884,14 +896,22 @@ class DocumentController extends Document
|
|||
unset($obj->_saved_doc_message);
|
||||
|
||||
// Set the category_srl to 0 if the changed category is not exsiting.
|
||||
if($source_obj->get('category_srl')!=$obj->category_srl)
|
||||
if ($source_obj->get('category_srl') != $obj->category_srl)
|
||||
{
|
||||
$category_list = DocumentModel::getCategoryList($obj->module_srl);
|
||||
if(!$category_list[$obj->category_srl]) $obj->category_srl = 0;
|
||||
|
||||
if($obj->category_srl > 0 && !$category_list[$obj->category_srl]->grant)
|
||||
if (count($category_list) > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_permitted');
|
||||
if (isset($category_list[$obj->category_srl]))
|
||||
{
|
||||
if (!$category_list[$obj->category_srl]->grant)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_permitted');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->category_srl = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -901,7 +921,7 @@ class DocumentController extends Document
|
|||
// Hash the password if it exists
|
||||
if($obj->password)
|
||||
{
|
||||
$obj->password = MemberModel::hashPassword($obj->password);
|
||||
$obj->password = \Rhymix\Framework\Password::hashPassword($obj->password, \Rhymix\Framework\Password::getBackwardCompatibleAlgorithm());
|
||||
}
|
||||
|
||||
// If an author is identical to the modifier or history is used, use the logged-in user's information.
|
||||
|
|
@ -1041,8 +1061,14 @@ class DocumentController extends Document
|
|||
// Update the category if the category_srl exists.
|
||||
if($source_obj->get('category_srl') != $obj->category_srl || $source_obj->get('module_srl') == $logged_info->member_srl)
|
||||
{
|
||||
if($source_obj->get('category_srl') != $obj->category_srl) $this->updateCategoryCount($obj->module_srl, $source_obj->get('category_srl'));
|
||||
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
|
||||
if($source_obj->get('category_srl') != $obj->category_srl)
|
||||
{
|
||||
$this->updateCategoryCount($obj->module_srl, $source_obj->get('category_srl'));
|
||||
}
|
||||
if($obj->category_srl)
|
||||
{
|
||||
$this->updateCategoryCount($obj->module_srl, $obj->category_srl);
|
||||
}
|
||||
}
|
||||
|
||||
// Update log
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ class DocumentItem extends BaseObject
|
|||
return lang('msg_is_secret');
|
||||
}
|
||||
|
||||
$content = $this->get('content');
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $this->get('content'));
|
||||
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
|
||||
if($strlen)
|
||||
{
|
||||
|
|
@ -647,7 +647,7 @@ class DocumentItem extends BaseObject
|
|||
return lang('msg_is_secret');
|
||||
}
|
||||
|
||||
$content = $this->get('content');
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $this->get('content'));
|
||||
$content = preg_replace_callback('/<(object|param|embed)[^>]*/is', array($this, '_checkAllowScriptAccess'), $content);
|
||||
$content = preg_replace_callback('/<object[^>]*>/is', array($this, '_addAllowScriptAccess'), $content);
|
||||
if($strlen)
|
||||
|
|
@ -790,6 +790,7 @@ class DocumentItem extends BaseObject
|
|||
{
|
||||
// Remove tags
|
||||
$content = $this->getContent(false, false);
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $content);
|
||||
$content = strip_tags(preg_replace('!<(style|script)\b.+?</\\1>!is', '', $content));
|
||||
|
||||
// Convert temporarily html entity for truncate
|
||||
|
|
|
|||
|
|
@ -1351,9 +1351,16 @@ class DocumentModel extends Document
|
|||
}
|
||||
$args->order_type = (isset($searchOpt->order_type) && $searchOpt->order_type === 'desc') ? 'desc' : 'asc';
|
||||
$args->sort_index = $searchOpt->sort_index;
|
||||
$args->page = $searchOpt->page ?? 1;
|
||||
$args->list_count = $searchOpt->list_count ?? 20;
|
||||
$args->page_count = $searchOpt->page_count ?? 10;
|
||||
$args->page = intval($searchOpt->page ?? 1);
|
||||
if ($args->page > 0)
|
||||
{
|
||||
$args->page_count = $searchOpt->page_count ?? 10;
|
||||
}
|
||||
elseif (isset($searchOpt->offset) && $searchOpt->offset > 0)
|
||||
{
|
||||
$args->offset = intval($searchOpt->offset);
|
||||
}
|
||||
$args->start_date = $searchOpt->start_date ?? null;
|
||||
$args->end_date = $searchOpt->end_date ?? null;
|
||||
$args->start_regdate = $searchOpt->start_regdate ?? null;
|
||||
|
|
@ -1489,10 +1496,6 @@ class DocumentModel extends Document
|
|||
$args->sort_index = 'extra_sort.value';
|
||||
}
|
||||
$query_id = 'document.getDocumentListWithExtraVars';
|
||||
if($args->columnList && !in_array($args->sort_index, $args->columnList))
|
||||
{
|
||||
$args->columnList[] = $args->sort_index;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1550,6 +1553,10 @@ class DocumentModel extends Document
|
|||
}
|
||||
$args->columnList[$key] = 'documents.' . $column;
|
||||
}
|
||||
if($args->columnList && $args->sort_index && !in_array($args->sort_index, $args->columnList))
|
||||
{
|
||||
$args->columnList[] = $args->sort_index;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -48,5 +48,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -16,5 +16,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -54,5 +54,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -51,5 +51,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -51,5 +51,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -28,5 +28,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -21,5 +21,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -59,5 +59,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -36,5 +36,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@
|
|||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
<offset var="offset" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_desc">{$lang->description}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="desc" id="desc" value="{$selected_var->desc}" class="lang_code" />
|
||||
<input type="text" name="desc" id="desc" value="<!--@if(strpos($selected_var->desc, '$user_lang->') === false)-->{$selected_var->desc}<!--@else-->{escape($selected_var->desc, false)}<!--@end-->" class="lang_code" />
|
||||
<p class="x_help-block">{$lang->about_extra_vars_description}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="0.2">
|
||||
<title xml:lang="ko">첨부파일</title>
|
||||
<title xml:lang="ko">파일</title>
|
||||
<title xml:lang="zh-CN">附件管理</title>
|
||||
<title xml:lang="en">Attachment</title>
|
||||
<title xml:lang="en">File</title>
|
||||
<title xml:lang="vi">Đính kèm</title>
|
||||
<title xml:lang="es">Adjuntar archivos</title>
|
||||
<title xml:lang="jp">添付ファイル</title>
|
||||
<title xml:lang="es">Archivos</title>
|
||||
<title xml:lang="jp">ファイル</title>
|
||||
<title xml:lang="ru">Вложения</title>
|
||||
<title xml:lang="zh-TW">附加檔案</title>
|
||||
<title xml:lang="tr">Ekler</title>
|
||||
<description xml:lang="ko">첨부 파일을 관리합니다.</description>
|
||||
<description xml:lang="ko">문서 등에 첨부된 파일을 관리합니다.</description>
|
||||
<description xml:lang="zh-CN">管理附件的模块。</description>
|
||||
<description xml:lang="en">Managing attachments.</description>
|
||||
<description xml:lang="en">Manage files attached to documents and other data.</description>
|
||||
<description xml:lang="vi">Module quản lý File đính kèm.</description>
|
||||
<description xml:lang="es">Módulo para manejar los archivos adjuntos.</description>
|
||||
<description xml:lang="jp">添付ファイルを管理するモジュールです。</description>
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ class FileController extends File
|
|||
'width' => $image_info['width'],
|
||||
'height' => $image_info['height'],
|
||||
'type' => $image_info['type'],
|
||||
'quality' => $config->image_quality_adjustment,
|
||||
'quality' => $config->image_quality_adjustment ?: 75,
|
||||
'rotate' => 0,
|
||||
];
|
||||
$is_animated = Rhymix\Framework\Image::isAnimatedGIF($file_info['tmp_name']);
|
||||
|
|
@ -1234,11 +1234,14 @@ class FileController extends File
|
|||
$adjusted['height'] -= $adjusted['height'] % 2;
|
||||
|
||||
// Convert using magick
|
||||
$command = vsprintf('%s %s -resize %dx%d %s', [
|
||||
$command = vsprintf('%s %s -resize %dx%d -quality %d %s %s %s', [
|
||||
\RX_WINDOWS ? escapeshellarg($config->magick_command) : $config->magick_command,
|
||||
escapeshellarg($file_info['tmp_name']),
|
||||
$adjusted['width'],
|
||||
$adjusted['height'],
|
||||
intval($adjusted['quality'] ?: 75),
|
||||
'-auto-orient -strip',
|
||||
'-limit memory 64MB -limit map 128MB -limit disk 1GB',
|
||||
escapeshellarg($output_name),
|
||||
]);
|
||||
@exec($command, $output, $return_var);
|
||||
|
|
@ -1246,11 +1249,29 @@ class FileController extends File
|
|||
}
|
||||
else
|
||||
{
|
||||
// Try resizing with GD.
|
||||
$result = FileHandler::createImageFile($file_info['tmp_name'], $output_name, $adjusted['width'], $adjusted['height'], $adjusted['type'], 'fill', $adjusted['quality'], $adjusted['rotate']);
|
||||
|
||||
// If the image cannot be resized using GD, try ImageMagick.
|
||||
if (!$result && !empty($config->magick_command))
|
||||
{
|
||||
$command = vsprintf('%s %s -resize %dx%d -quality %d %s %s %s', [
|
||||
\RX_WINDOWS ? escapeshellarg($config->magick_command) : $config->magick_command,
|
||||
escapeshellarg($file_info['tmp_name']),
|
||||
$adjusted['width'],
|
||||
$adjusted['height'],
|
||||
intval($adjusted['quality'] ?: 75),
|
||||
'-auto-orient -strip',
|
||||
'-limit memory 64MB -limit map 128MB -limit disk 1GB',
|
||||
escapeshellarg($output_name),
|
||||
]);
|
||||
@exec($command, $output, $return_var);
|
||||
$result = $return_var === 0 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
// Change to information in the output file
|
||||
if ($result)
|
||||
if ($result && file_exists($output_name))
|
||||
{
|
||||
$file_info['tmp_name'] = $output_name;
|
||||
$file_info['size'] = filesize($output_name);
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ $lang->ffmpeg_path = 'Absolute Path to ffmpeg';
|
|||
$lang->ffprobe_path = 'Absolute Path to ffprobe';
|
||||
$lang->magick_path = 'Absolute Path to magick';
|
||||
$lang->about_ffmpeg_path = 'Rhymix uses ffmpeg to convert video files.';
|
||||
$lang->about_magick_path = 'Rhymix uses magick to convert newer image formats such as AVIF and HEIC.<br />Note that the \'convert\' command from previous versions of ImageMagick doesn\'t support these formats.';
|
||||
$lang->about_magick_path = 'Rhymix uses magick to convert newer image formats such as AVIF and HEIC.<br />Note that the \'convert\' command from previous versions of ImageMagick doesn\'t support these formats.<br />The latest version can be downloaded from their <a href="https://imagemagick.org/script/download.php" target="_blank">official site</a>.';
|
||||
$lang->msg_cannot_use_ffmpeg = 'In order to use this feature, PHP must be able to execute \'ffmpeg\' and \'ffprobe\' commands.';
|
||||
$lang->msg_cannot_use_exif = 'In order to use this feature, PHP must be installed with the \'exif\' extension.';
|
||||
$lang->msg_need_magick = 'In order to handle AVIF and HEIC formats, PHP must be able to execute the \'magick\' command from ImageMagick 7.x or higher.';
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ $lang->ffmpeg_path = 'ffmpeg 절대경로';
|
|||
$lang->ffprobe_path = 'ffprobe 절대경로';
|
||||
$lang->magick_path = 'magick 절대경로';
|
||||
$lang->about_ffmpeg_path = '동영상 변환에 사용합니다.';
|
||||
$lang->about_magick_path = 'AVIF, HEIC 등 일부 이미지 변환에 사용합니다.<br />구 버전 ImageMagick의 convert 명령은 이러한 포맷을 지원하지 않습니다.';
|
||||
$lang->about_magick_path = 'AVIF, HEIC 등 일부 이미지 변환에 사용합니다.<br />구 버전 ImageMagick의 convert 명령은 이러한 포맷을 지원하지 않습니다.<br />새 버전은 <a href="https://imagemagick.org/script/download.php" target="_blank">공식 사이트</a>에서 다운받을 수 있습니다.';
|
||||
$lang->msg_cannot_use_ffmpeg = '이 기능을 사용하려면 PHP에서 ffmpeg 및 ffprobe 명령을 실행할 수 있어야 합니다.';
|
||||
$lang->msg_cannot_use_exif = '이 기능을 사용하려면 PHP exif 확장모듈이 필요합니다.';
|
||||
$lang->msg_need_magick = 'AVIF, HEIC 변환을 위해서는 PHP에서 ImageMagick 7.x 이상의 magick 명령을 실행할 수 있어야 합니다.';
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class installController extends install
|
|||
// Check connection to the DB.
|
||||
$oDB = DB::getInstance();
|
||||
$output = $oDB->getError();
|
||||
if (!$output->toBool() || !$oDB->isConnected())
|
||||
if (!$output->toBool() || !$oDB->getHandle())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ class installController extends install
|
|||
if(stripos($config->db_type, 'mysql') !== false)
|
||||
{
|
||||
// Check if InnoDB is supported.
|
||||
$show_engines = $oDB->_fetch($oDB->_query('SHOW ENGINES'));
|
||||
$show_engines = $oDB->query('SHOW ENGINES')->fetchAll();
|
||||
foreach($show_engines as $engine_info)
|
||||
{
|
||||
if ($engine_info->Engine === 'InnoDB' && $engine_info->Support !== 'NO')
|
||||
|
|
@ -209,8 +209,8 @@ class installController extends install
|
|||
Context::loadDBInfo($config);
|
||||
|
||||
// Check DB.
|
||||
$oDB = DB::getInstance();
|
||||
if (!$oDB->isConnected())
|
||||
$oDB = DB::getInstance('master');
|
||||
if (!$oDB->getHandle())
|
||||
{
|
||||
return $oDB->getError();
|
||||
}
|
||||
|
|
@ -487,6 +487,7 @@ class installController extends install
|
|||
|
||||
// Determine the order of module installation depending on category
|
||||
$install_step = array('system','content','member');
|
||||
$update_order = [];
|
||||
|
||||
// Install all the remaining modules
|
||||
foreach($install_step as $category)
|
||||
|
|
@ -497,7 +498,7 @@ class installController extends install
|
|||
{
|
||||
if($module == 'module') continue;
|
||||
$this->installModule($module, sprintf('./modules/%s', $module));
|
||||
$this->updateModule($module);
|
||||
$update_order[] = $module;
|
||||
}
|
||||
unset($modules[$category]);
|
||||
}
|
||||
|
|
@ -514,12 +515,18 @@ class installController extends install
|
|||
{
|
||||
if($module == 'module') continue;
|
||||
$this->installModule($module, sprintf('./modules/%s', $module));
|
||||
$this->updateModule($module);
|
||||
$update_order[] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update all modules
|
||||
foreach ($update_order as $module)
|
||||
{
|
||||
$this->updateModule($module);
|
||||
}
|
||||
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,12 +80,16 @@ $lang->layout_manager['51'] = 'Reset';
|
|||
$lang->layout_manager['52'] = 'Text';
|
||||
$lang->layout_manager['53'] = 'Font';
|
||||
$lang->layout_manager['54'] = 'Font Color';
|
||||
$lang->layout_editing_deprecated_p1 = 'Layout editing is no longer supported. It is allowed for a limited time only for layouts that have already been edited, but this allowance may be removed completely in the future.';
|
||||
$lang->layout_editing_deprecated_p2 = 'Layout editing is supported for a limited time only for layouts that have already been edited.<br />Using this screen to edit soure code is not recommended.<br />Please use FTP or a code editor to edit the HTML and CSS of the original layout source code.';
|
||||
$lang->layout_editing_deprecated_p3 = 'For your information, edited source code is currently stored in the following files.';
|
||||
$lang->layout_editing_deprecated_p4 = 'The original source code is stored in the following file, as well as any file included/referenced therein.';
|
||||
$lang->layout_editing_deprecated_p5 = 'Caution: Clicking Reset will roll back the layout source code to the original. You cannot return to this screen afterward.<br />Please back up the edited source code below before clicking Reset.';
|
||||
$lang->layout_image_repository = 'Layout Repository';
|
||||
$lang->about_layout_image_repository = 'You can upload image/flash files for the selected layout. They will be included in exports.';
|
||||
$lang->msg_layout_image_target = 'Only gif, png, jpg, swf, flv files are allowed';
|
||||
$lang->layout_migration = 'Layout Migration';
|
||||
$lang->about_layout_migration = 'You can export or import the editted layout as a tar file.
|
||||
(So far only FaceOff supports exports/imports)';
|
||||
$lang->about_layout_migration = 'You can export or import the editted layout as a tar file. (So far only FaceOff supports exports/imports)';
|
||||
$lang->about_faceoff['title'] = 'Rhymix FaceOff Layout Manager';
|
||||
$lang->about_faceoff['description'] = 'FaceOff Layout Manager willl help you design layout on the web easily.<br/>Please design your own layout with components and functions as shown below.';
|
||||
$lang->about_faceoff['layout'] = 'FaceOff has HTML structure as above.<br/>You can arrange/align with CSS, or use Style to design.<br/>You can add widget from Extension(e1, e2), Neck and Knee.<br/>Also Body, Layout, Header, Body, Footer can designed by Style, and Content will display content.';
|
||||
|
|
|
|||
|
|
@ -80,12 +80,16 @@ $lang->layout_manager['51'] = '초기화';
|
|||
$lang->layout_manager['52'] = '글자';
|
||||
$lang->layout_manager['53'] = '글자 폰트';
|
||||
$lang->layout_manager['54'] = '글자 색';
|
||||
$lang->layout_editing_deprecated_p1 = '레이아웃 편집 기능은 더이상 제공하지 않습니다. 이미 편집된 레이아웃에 한하여 편집을 허용하나, 추후 완전히 제거될 수 있습니다.';
|
||||
$lang->layout_editing_deprecated_p2 = '레이아웃 편집 기능은 이미 편집된 레이아웃에 한하여 일시적으로 제공됩니다.<br />이 화면에서 레이아웃 소스를 직접 수정하는 것은 권장하지 않습니다.<br />FTP 또는 에디터를 사용하여 원본 레이아웃의 HTML, CSS 소스 코드를 직접 편집하시기 바랍니다.';
|
||||
$lang->layout_editing_deprecated_p3 = '편집된 소스 코드는 아래의 경로에 저장되어 있으니 참고하십시오.';
|
||||
$lang->layout_editing_deprecated_p4 = '원본 소스 코드는 아래의 경로에 있으며, 그곳에서 인클루드 또는 참조된 다른 파일이 더 있을 수 있습니다.';
|
||||
$lang->layout_editing_deprecated_p5 = '주의: 초기화를 클릭하면 편집된 소스 코드가 원본으로 대체되며, 이 화면으로 다시 돌아올 수 없습니다.<br />초기화하기 전에 편집된 소스 코드를 백업해 두시기 바랍니다.';
|
||||
$lang->layout_image_repository = '레이아웃 파일 저장소';
|
||||
$lang->about_layout_image_repository = '선택한 레이아웃에 사용될 이미지/플래시파일 등을 올릴 수 있습니다. 내보내기에 같이 포함 됩니다.';
|
||||
$lang->msg_layout_image_target = 'gif, png, jpg, swf, flv파일만 가능합니다.';
|
||||
$lang->layout_migration = '레이아웃 내보내기/들이기';
|
||||
$lang->about_layout_migration = '수정된 레이아웃을 tar 파일로 내보내거나 tar 파일로 저장된 것을 불러올 수 있습니다
|
||||
(아직은 faceOff레이아웃만 내보내기/들이기가 됩니다.)';
|
||||
$lang->about_layout_migration = '수정된 레이아웃을 tar 파일로 내보내거나 tar 파일로 저장된 것을 불러올 수 있습니다. (아직은 faceOff레이아웃만 내보내기/들이기가 됩니다.)';
|
||||
$lang->about_faceoff['title'] = 'Rhymix FaceOff Layout 관리자';
|
||||
$lang->about_faceoff['description'] = 'FaceOff Layout관리자로 웹상에서 쉽게 레이아웃을 꾸밀 수 있습니다.<br/>아래 그림을 보고 구성요소와 기능을 이용하여 원하는 레이아웃을 만드세요.';
|
||||
$lang->about_faceoff['layout'] = 'FaceOff는 위와 같은 HTML 구조로 되어 있습니다.<br/>이 구조에서 CSS를 이용하여 형태/배열/정렬을 할 수 있고 또 Style을 이용하여 꾸밀 수 있습니다.<br/>위젯 추가는 Extension(e1, e2)과 Neck, Knee에서 가능합니다.<br/>이 외 Body, Layout, Header, Body, Footer는 Style을 꾸밀 수 있고 Content는 내용이 출력됩니다.';
|
||||
|
|
|
|||
|
|
@ -175,7 +175,8 @@ class layoutAdminController extends layout
|
|||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
$layout_config = new stdClass();
|
||||
$layout_config->header_script = Context::get('header_script');
|
||||
$layout_config->header_script = Context::get('header_script') ?? '';
|
||||
$layout_config->header_script = Rhymix\Modules\Admin\Models\Utility::cleanHeaderAndFooterScripts($layout_config->header_script);
|
||||
$oModuleController->insertModulePartConfig('layout',$args->layout_srl,$layout_config);
|
||||
// Save a title of the menu
|
||||
$extra_vars->menu_name_list = $menu_name_list;
|
||||
|
|
|
|||
|
|
@ -236,6 +236,12 @@ class layoutAdminView extends layout
|
|||
// Error appears if there is no layout information is registered
|
||||
if(!$layout_info) return $this->dispLayoutAdminInstalledList();
|
||||
|
||||
// Prevent editing if the layout has not already been edited #2121
|
||||
if(!$layout_info->is_edited)
|
||||
{
|
||||
return new BaseObject(-1, 'layout.layout_editing_deprecated_p1');
|
||||
}
|
||||
|
||||
// Get Layout Code
|
||||
if($oLayoutModel->useDefaultLayout($layout_info->layout_srl))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -139,6 +139,16 @@ class layoutModel extends layout
|
|||
{
|
||||
foreach($output->data as $no => $iInfo)
|
||||
{
|
||||
if (file_exists(\RX_BASEDIR . 'files/faceOff/' . getNumberingPath($iInfo->layout_srl) . 'layout.html') ||
|
||||
file_exists(\RX_BASEDIR . 'files/faceOff/' . getNumberingPath($iInfo->layout_srl) . 'layout.css'))
|
||||
{
|
||||
$iInfo->is_edited = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$iInfo->is_edited = false;
|
||||
}
|
||||
|
||||
if($this->isExistsLayoutFile($iInfo->layout, $iInfo->layout_type) && $iInfo->layout_type === $layoutType)
|
||||
{
|
||||
$instanceList[] = $iInfo->layout;
|
||||
|
|
@ -276,6 +286,17 @@ class layoutModel extends layout
|
|||
// Return xml file informaton after listing up the layout and extra_vars
|
||||
$layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type);
|
||||
|
||||
// Check if layout has been edited
|
||||
if (file_exists(\RX_BASEDIR . 'files/faceOff/' . getNumberingPath($layout_srl) . 'layout.html') ||
|
||||
file_exists(\RX_BASEDIR . 'files/faceOff/' . getNumberingPath($layout_srl) . 'layout.css'))
|
||||
{
|
||||
$layout_info->is_edited = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$layout_info->is_edited = false;
|
||||
}
|
||||
|
||||
// Store in cache
|
||||
Rhymix\Framework\Cache::set("layout:$layout_srl", $layout_info);
|
||||
return $layout_info;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,13 @@
|
|||
<td>{$item->title} ({$layout_name})</td>
|
||||
<td>{zdate($item->regdate, "Y-m-d")}</td>
|
||||
<td><a href="{getUrl('act', 'dispLayoutAdminModify', 'layout_srl', $item->layout_srl)}">{$lang->cmd_setup}</a></td>
|
||||
<td><a href="{getUrl('act', 'dispLayoutAdminEdit', 'layout_srl', $item->layout_srl)}">{$lang->cmd_edit}</a></td>
|
||||
<td>
|
||||
<!--@if($item->is_edited)-->
|
||||
<a href="{getUrl('act', 'dispLayoutAdminEdit', 'layout_srl', $item->layout_srl)}">{$lang->cmd_edit}</a>
|
||||
<!--@else-->
|
||||
<span style="color:#999">편집</span>
|
||||
<!--@endif-->
|
||||
</td>
|
||||
<td><a href="{getUrl('', 'module', 'layout', 'act', 'dispLayoutAdminCopyLayout', 'layout_srl', $item->layout_srl)}" onclick="popopen(this.href);return false;" title="{$lang->cmd_copy}">{$lang->cmd_copy}</a></td>
|
||||
<td class="rx_detail_marks">
|
||||
<form cond="count($layout) > 1" class="layout_delete_form" ruleset="deleteLayout" action="./" method="post">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,20 @@
|
|||
<include target="header.html" />
|
||||
<load target="js/adminEdit.js" />
|
||||
<p>{nl2br($lang->about_layout_code)}</p>
|
||||
|
||||
<div class="message error">
|
||||
<p>{$lang->layout_editing_deprecated_p2}</p>
|
||||
<p>{$lang->layout_editing_deprecated_p3}</p>
|
||||
<ul>
|
||||
<li>files/faceOff/{getNumberingPath($layout_srl)}layout.html</li>
|
||||
<li>files/faceOff/{getNumberingPath($layout_srl)}layout.css</li>
|
||||
</ul>
|
||||
<p>{$lang->layout_editing_deprecated_p4}</p>
|
||||
<ul>
|
||||
<li>layouts/{$selected_layout->layout}/layout.html</li>
|
||||
</ul>
|
||||
<p>{$lang->layout_editing_deprecated_p5}</p>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
<h1>{$lang->layout_image_repository}</h1>
|
||||
<p>{nl2br($lang->about_layout_image_repository)}</p>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,13 @@ xe.lang.confirm_delete = '{$lang->confirm_delete}';
|
|||
<td class="title">{$layout->title}</td>
|
||||
<td class="nowr">{zdate($layout->regdate, "Y-m-d")}</td>
|
||||
<td class="nowr"><a href="{getUrl('act', 'dispLayoutAdminModify', 'layout_srl', $layout->layout_srl)}">{$lang->cmd_setup}</a></td>
|
||||
<td class="nowr"><a href="{getUrl('act', 'dispLayoutAdminEdit', 'layout_srl', $layout->layout_srl)}">{$lang->cmd_edit}</a></td>
|
||||
<td class="nowr">
|
||||
<!--@if($layout->is_edited)-->
|
||||
<a href="{getUrl('act', 'dispLayoutAdminEdit', 'layout_srl', $layout->layout_srl)}">{$lang->cmd_edit}</a>
|
||||
<!--@else-->
|
||||
<span style="color:#999">편집</span>
|
||||
<!--@endif-->
|
||||
</td>
|
||||
<td class="nowr"><a href="{getUrl('', 'module', 'layout', 'act', 'dispLayoutAdminCopyLayout', 'layout_srl', $layout->layout_srl)}" onclick="popopen(this.href);return false;" title="{$lang->cmd_copy}">{$lang->cmd_copy}</a></td>
|
||||
<td class="nowr">
|
||||
<form cond="$isDeletable" class="layout_delete_form" ruleset="deleteLayout" action="./" method="post">
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispMemberIndex" type="view" index="true" />
|
||||
<action name="dispMemberSignUpForm" type="view" meta-noindex="true">
|
||||
<route route="signup" />
|
||||
<route route="signup$document_srl:delete" />
|
||||
|
|
@ -31,11 +32,11 @@
|
|||
<action name="dispMemberModifyNicknameLog" type="view" permission="member" meta-noindex="true" />
|
||||
<action name="dispMemberLogout" type="view" meta-noindex="true" />
|
||||
<action name="dispMemberSpammer" type="view" permission="manager" check_var="module_srl" meta-noindex="true" />
|
||||
|
||||
|
||||
<action name="getLoginStatus" type="model" method="POST" check_csrf="false" meta-noindex="true" />
|
||||
<action name="getMemberMenu" type="model" />
|
||||
<action name="getApiGroups" type="model" permission="root" />
|
||||
|
||||
|
||||
<action name="procMemberInsert" type="controller" route="signup" />
|
||||
<action name="procMemberCheckValue" type="controller" />
|
||||
<action name="procMemberLogin" type="controller" route="login" />
|
||||
|
|
@ -70,12 +71,12 @@
|
|||
<action name="procMemberSiteLeave" type="controller" permission="member" />
|
||||
<action name="procMemberLogout" type="controller" permission="member" />
|
||||
<action name="procMemberSpammerManage" type="controller" permission="manager" check_var="module_srl" />
|
||||
|
||||
|
||||
<action name="procMemberRegisterDevice" class="Controllers\Device" route="device/register" standalone="true" />
|
||||
<action name="procMemberLoginWithDevice" class="Controllers\Device" route="device/login" standalone="true" />
|
||||
<action name="procMemberUnregisterDevice" class="Controllers\Device" route="device/unregister" standalone="true" />
|
||||
<action name="procMemberDeleteDevice" class="Controllers\Device" permission="member" standalone="true" />
|
||||
|
||||
|
||||
<action name="dispMemberAdminList" type="view" admin_index="true" menu_name="userList" menu_index="true"/>
|
||||
<action name="dispMemberAdminInfo" type="view" menu_name="userList" />
|
||||
<action name="dispMemberAdminInsert" type="view" menu_name="userList" />
|
||||
|
|
@ -88,11 +89,11 @@
|
|||
<action name="dispMemberAdminNickNameLog" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminGroupList" type="view" menu_name="userGroup" menu_index="true" />
|
||||
<action name="dispMemberAdminInsertJoinForm" type="view" />
|
||||
|
||||
|
||||
<action name="getMemberAdminColorset" type="model" />
|
||||
<action name="getMemberAdminInsertJoinForm" type="model" />
|
||||
<action name="getMemberAdminIPCheck" type="model" />
|
||||
|
||||
|
||||
<action name="procMemberAdminInsert" type="controller" ruleset="insertAdminMember" />
|
||||
<action name="procMemberAdminDelete" type="controller" />
|
||||
<action name="procMemberAdminSelectedMemberManage" type="controller" ruleset="updateSeletecdMemberInfo" />
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ $lang->group_image_mark = 'Group image mark';
|
|||
$lang->group_image_mark_max_width = 'Max Width';
|
||||
$lang->group_image_mark_max_height = 'Max Height';
|
||||
$lang->signature_max_height = 'Max Signature Height';
|
||||
$lang->cmd_force_member_mid = 'Force';
|
||||
$lang->msg_exists_member_mid = 'The URL \'%s\' required by the member module is already used by another module. Please change the URL of the other module and try again.';
|
||||
$lang->enable_join = 'Accept New Members';
|
||||
$lang->enable_join_only_with_url_key = 'Only with valid URL key';
|
||||
$lang->enable_join_url_key = 'URL Key';
|
||||
|
|
@ -144,10 +146,11 @@ $lang->cmd_trace_comment = 'Trace Written Comments';
|
|||
$lang->cmd_view_scrapped_document = 'Scraps';
|
||||
$lang->cmd_view_saved_document = 'Saved Articles';
|
||||
$lang->cmd_send_email = 'Send Mail';
|
||||
$lang->cmd_modify_nickname_allow = 'Allow Nickname Change';
|
||||
$lang->cmd_modify_nickname_log = 'Nickname Change Log';
|
||||
$lang->cmd_nickname_symbols = 'Allow Symbols in Nickname';
|
||||
$lang->cmd_nickname_symbols_list = 'Only Allow:';
|
||||
$lang->cmd_member_profile_view = 'Show member profile picture';
|
||||
$lang->cmd_member_profile_view = 'Show member profile picture';
|
||||
$lang->cmd_allow_duplicate_nickname = 'Allow Duplicate Nicknames';
|
||||
$lang->about_allow_duplicate_nickname = 'Allow more than one member to use the same nickname.';
|
||||
$lang->msg_special_code_incorrect_format = 'The verification code should be a 6-digit number.';
|
||||
|
|
@ -163,14 +166,14 @@ $lang->msg_find_account_title = 'Account Info';
|
|||
$lang->msg_find_account_info = 'This is requested account info.';
|
||||
$lang->msg_find_account_comment = 'Your password will be changed to the one above if you click the link below.<br />Please change the password again as soon as possible after you are able to log in.<br />Your password will remain unchanged until you click the link below.';
|
||||
$lang->msg_confirm_account_title = 'Rhymix Account Activation';
|
||||
$lang->title_modify_email_address = 'This letter is sent for a confirmation of the changing e-mail address.';
|
||||
$lang->title_modify_email_address = 'This letter is sent for a confirmation of the changing e-mail address.';
|
||||
$lang->msg_confirm_account_info = 'This is your account information:';
|
||||
$lang->msg_confirm_account_comment = 'Click on the following link to complete your account activation.';
|
||||
$lang->msg_confirm_email_address_change = 'The email address will be modified to %s after clicking below.';
|
||||
$lang->msg_confirm_email_address_change = 'The email address will be modified to %s after clicking below.';
|
||||
$lang->msg_auth_mail_sent = 'The activation mail has been sent to %s. Please check your mail.';
|
||||
$lang->msg_confirm_mail_sent = 'We have just sent the activation email to %s. Please check your mail.';
|
||||
$lang->msg_change_mail_sent = 'The letter was sent to %s for the changing email address. Please, check your email.';
|
||||
$lang->msg_invalid_modify_email_auth_key = 'Invalid request for changing the email address.<br />Please, request again or contact the website administrator.';
|
||||
$lang->msg_change_mail_sent = 'The letter was sent to %s for the changing email address. Please, check your email.';
|
||||
$lang->msg_invalid_modify_email_auth_key = 'Invalid request for changing the email address.<br />Please, request again or contact the website administrator.';
|
||||
$lang->msg_invalid_auth_key = 'This is an invalid request of verification.<br />Please retry finding account info or contact the administrator.';
|
||||
$lang->msg_expired_auth_key = 'Your verification link has expired. Please request a new verification email.';
|
||||
$lang->msg_success_authed = 'Please use the password you received in the email to log in, and change it to a password of your choice as soon as possible.';
|
||||
|
|
@ -190,6 +193,8 @@ $lang->msg_exists_phone_number = 'This phone number has already been registered.
|
|||
$lang->msg_invalid_phone_country = 'The phone number belongs to an unsupported country.';
|
||||
$lang->msg_invalid_phone_number = 'The phone number you have entered is invalid.';
|
||||
$lang->msg_exists_nick_name = 'This nickname already exists. Please try another one.';
|
||||
$lang->msg_nickname_not_changeable = 'The nickname cannot be changed.';
|
||||
$lang->msg_email_address_not_changeable = 'You cannot change your email address here. Please use the "Change Email Address" page to do so.';
|
||||
$lang->msg_signup_disabled = 'You are not able to sign up';
|
||||
$lang->msg_already_logged = 'You have already signed up.';
|
||||
$lang->msg_not_logged = 'Please log in.';
|
||||
|
|
@ -217,9 +222,9 @@ $lang->password_strength_low = 'low';
|
|||
$lang->password_strength_normal = 'normal';
|
||||
$lang->password_strength_high = 'high';
|
||||
$lang->about_password_strength_config = 'When members register or change the password, the password should meet the specified password strength. However, the administrator is an exception.';
|
||||
$lang->about_password_hashing_algorithm = 'You can choose how to encrypt (hash) members\' passwords stored in the database.';
|
||||
$lang->about_password_hashing_work_factor = 'Higher work factors are more secure, but login may take a long time. This only applies to bcrypt and pbkdf2.';
|
||||
$lang->about_password_hashing_auto_upgrade = 'Passwords encrypted using different algorithms will be automatically converted to the configured algorithm at next login.';
|
||||
$lang->about_password_hashing_algorithm = 'Choose how to encrypt (hash) passwords stored in the database.<br />For better security, it is recommened that you choose one of bcrypt, pbkdf2, or argon2id.';
|
||||
$lang->about_password_hashing_work_factor = 'Higher work factors result in more security, but at the cost of delays at login and increased server load.<br />With bcrypt, each step takes twice as long as the step below. Similar conversions are applied to pbkdf2 and argon2id.';
|
||||
$lang->about_password_hashing_auto_upgrade = 'Passwords not encrypted using the method configured above will be automatically converted to the configured method at next login.';
|
||||
$lang->about_password_change_invalidate_other_sessions = 'Sign out all other devices (browsers) when a member changes the password.';
|
||||
$lang->about_login_invalidate_other_sessions = 'Allow login from only one device. Previously used machines will be signed out automatically.';
|
||||
$lang->about_password_strength['low'] = 'the password should be longer, at least four characters';
|
||||
|
|
@ -266,10 +271,11 @@ $lang->about_member_default = 'It will be set as the default group on sign up';
|
|||
$lang->about_find_member_account = 'Please input the email address you have entered during the registration and we will send your account info to this email address.';
|
||||
$lang->about_ssl_port = 'Please enter if you are using non-default SSL port';
|
||||
$lang->about_resend_auth_mail = 'You can request the activation email again if you have not received it.';
|
||||
$lang->about_reset_auth_mail_submit = 'If you use the address as an identifier, a new email address would be required for the login.';
|
||||
$lang->about_update_nickname_log = 'Record the nickname change history. If you use this option, you can see the nickname changing history.';
|
||||
$lang->about_nickname_symbols = 'Allow or prohibit the use of special characters in nicknames.';
|
||||
$lang->about_member_profile_view = 'Option to view the member\'s profile image on the admin member list page. Select No if you do not want to see your profile picture in the member panel.';
|
||||
$lang->about_reset_auth_mail_submit = 'If you use the address as an identifier, a new email address would be required for the login.';
|
||||
$lang->about_allow_nickname_change = 'Allow members to change their nicknames. This requires a skin that displays the nickname change input.';
|
||||
$lang->about_update_nickname_log = 'Record the nickname change history. If you use this option, you can see the nickname changing history.';
|
||||
$lang->about_nickname_symbols = 'Allow or prohibit the use of special characters in nicknames.';
|
||||
$lang->about_member_profile_view = 'Option to view the member\'s profile image on the admin member list page. Select No if you do not want to see your profile picture in the member panel.';
|
||||
$lang->no_article = 'No articles';
|
||||
$lang->find_account_question = 'Question for a temporary password.';
|
||||
$lang->find_account_answer = 'Answer for a temporary password.';
|
||||
|
|
@ -354,7 +360,7 @@ $lang->msg_groups_exist = 'groups exist.';
|
|||
$lang->cmd_member_config = 'Member Configuration';
|
||||
$lang->cmd_member_sync = 'Sync member information';
|
||||
$lang->about_member_sync = 'Synchronize member information and post/comment information. This can take a long time if you have a lot of data. <strong>If there are many users, be sure to stop the service before proceeding.</strong>';
|
||||
$lang->msg_success_modify_email_address = 'Your email address has been successfully changed. You can log in with the changed email address.';
|
||||
$lang->msg_success_modify_email_address = 'Your email address has been successfully changed. You can log in with the changed email address.';
|
||||
|
||||
$lang->group = 'Group';
|
||||
$lang->retrieve_password = 'Retrieve password';
|
||||
|
|
@ -371,7 +377,7 @@ $lang->btn_spammer_delete_all = 'Delete all';
|
|||
$lang->spammer_move_to_trash = 'Move to trash';
|
||||
$lang->msg_spammer_complete = 'Completed.';
|
||||
$lang->nick_name_before_changing = 'Old nickname';
|
||||
$lang->nick_name_after_changing = 'New nickname';
|
||||
$lang->nick_name_after_changing = 'New nickname';
|
||||
|
||||
$lang->cmd_login_browser_info = 'Browser Information';
|
||||
$lang->cmd_login_device_info = 'Device Information';
|
||||
|
|
@ -384,4 +390,4 @@ $lang->scrap_folder_create = 'New Folder';
|
|||
$lang->scrap_folder_rename = 'Rename';
|
||||
$lang->scrap_folder_delete = 'Delete';
|
||||
$lang->member_unauthenticated = 'Unauthenticated';
|
||||
$lang->member_number = 'Member identification number';
|
||||
$lang->member_number = 'Member identification number';
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ $lang->group_image_mark = '그룹 이미지 마크';
|
|||
$lang->group_image_mark_max_width = '가로 제한 길이';
|
||||
$lang->group_image_mark_max_height = '세로 제한 길이';
|
||||
$lang->signature_max_height = '서명 높이 제한';
|
||||
$lang->cmd_force_member_mid = '강제 적용';
|
||||
$lang->msg_exists_member_mid = '회원 모듈이 요구하는 \'%s\' URL은 다른 모듈이 이미 사용하고 있습니다. 회원 모듈과 충돌하는 URL을 가진 게시판이나 페이지의 주소를 변경해 주십시오.';
|
||||
$lang->enable_join = '회원 가입 허가';
|
||||
$lang->enable_join_only_with_url_key = 'URL 키가 일치하는 경우에만 허가';
|
||||
$lang->enable_join_url_key = 'URL 키';
|
||||
|
|
@ -146,6 +148,7 @@ $lang->cmd_trace_comment = '작성 댓글 추적';
|
|||
$lang->cmd_view_scrapped_document = '스크랩 보기';
|
||||
$lang->cmd_view_saved_document = '저장함 보기';
|
||||
$lang->cmd_send_email = '메일 보내기';
|
||||
$lang->cmd_modify_nickname_allow = '닉네임 변경 허용';
|
||||
$lang->cmd_modify_nickname_log = '닉네임 변경 기록';
|
||||
$lang->cmd_nickname_symbols = '닉네임에 특수문자 허용';
|
||||
$lang->cmd_nickname_symbols_list = '다음의 문자만 허용:';
|
||||
|
|
@ -192,6 +195,8 @@ $lang->msg_exists_phone_number = '이미 가입된 전화번호입니다.';
|
|||
$lang->msg_invalid_phone_country = '전화번호의 국가가 잘못 선택되었습니다.';
|
||||
$lang->msg_invalid_phone_number = '전화번호가 형식에 맞지 않습니다.';
|
||||
$lang->msg_exists_nick_name = '이미 사용중인 닉네임입니다. 다른 닉네임을 선택해 주세요.';
|
||||
$lang->msg_nickname_not_changeable = '닉네임은 변경할 수 없습니다.';
|
||||
$lang->msg_email_address_not_changeable = '이메일 주소는 이 화면에서 변경할 수 없습니다. "이메일 주소 변경" 메뉴를 이용해 주세요.';
|
||||
$lang->msg_signup_disabled = '회원 가입할 수 없습니다.';
|
||||
$lang->msg_already_logged = '이미 로그인되어 있습니다.';
|
||||
$lang->msg_not_logged = '로그인이 필요합니다.';
|
||||
|
|
@ -210,18 +215,18 @@ $lang->about_rechecked_password = '회원의 정보를 안전하게 보호하기
|
|||
$lang->about_user_id = '회원 ID는 3~20자 사이의 영문+숫자로 이루어져야 하며 영문으로 시작해야 합니다.';
|
||||
$lang->about_password = '비밀번호는 6~20자로 되어야 합니다.';
|
||||
$lang->cmd_config_password_strength = '비밀번호 보안수준';
|
||||
$lang->cmd_password_hashing_algorithm = '비밀번호 암호화 알고리듬';
|
||||
$lang->cmd_password_hashing_algorithm = '비밀번호 암호화 알고리즘';
|
||||
$lang->cmd_password_hashing_work_factor = '비밀번호 암호화 소요시간';
|
||||
$lang->cmd_password_hashing_auto_upgrade = '알고리듬 자동 업그레이드';
|
||||
$lang->cmd_password_hashing_auto_upgrade = '알고리즘 자동 업그레이드';
|
||||
$lang->cmd_password_change_invalidate_other_sessions = '비번 변경시 다른 기기 로그아웃';
|
||||
$lang->cmd_login_invalidate_other_sessions = '다른 기기 로그아웃';
|
||||
$lang->password_strength_low = '낮음';
|
||||
$lang->password_strength_normal = '보통';
|
||||
$lang->password_strength_high = '높음';
|
||||
$lang->about_password_strength_config = '회원들이 비밀번호를 등록/변경할 때, 비밀번호가 설정된 보안수준을 만족해야 합니다. 단, 관리자가 직접 등록할 경우에는 적용되지 않습니다.';
|
||||
$lang->about_password_hashing_algorithm = '회원들의 비밀번호를 DB에 저장할 때 암호화(해싱)하는 방식을 지정할 수 있습니다.';
|
||||
$lang->about_password_hashing_work_factor = '시간이 오래 걸리는 알고리듬일수록 보안이 강하지만, 로그인이 오래 걸릴 수 있습니다. bcrypt 및 pbkdf2 알고리듬에만 적용됩니다.';
|
||||
$lang->about_password_hashing_auto_upgrade = '설정된 알고리듬과 다른 방법으로 암호화된 비밀번호가 있으면 다음 로그인시 설정된 알고리듬으로 자동 변환합니다.';
|
||||
$lang->about_password_hashing_algorithm = '회원들의 비밀번호를 DB에 저장할 때 암호화(해싱)하는 방식을 지정할 수 있습니다.<br />보안을 위해 bcrypt, pbkdf2, argon2id 중 하나를 추천합니다.';
|
||||
$lang->about_password_hashing_work_factor = '오래 걸리는 암호화 방식일수록 안전하지만, 로그인이 오래 걸리거나 서버 부하가 상승할 수 있습니다.<br />소요시간은 bcrypt 기준 각 단계마다 2배씩 늘어나며, pbkdf2와 argon2id에서도 유사한 기준으로 적용됩니다.';
|
||||
$lang->about_password_hashing_auto_upgrade = '위에서 설정된 것과 다른 방법으로 암호화된 비밀번호가 있으면 다음 로그인시 설정된 알고리즘으로 자동 변환합니다.';
|
||||
$lang->about_password_change_invalidate_other_sessions = '비밀번호를 변경하면 현재 기기(브라우저)를 제외한 모든 로그인이 풀리도록 합니다.';
|
||||
$lang->about_login_invalidate_other_sessions = '한 번에 하나의 기기에서만 로그인할 수 있도록 합니다.';
|
||||
$lang->about_password_strength['low'] = '비밀번호는 4자 이상이어야 합니다.';
|
||||
|
|
@ -271,7 +276,8 @@ $lang->about_ssl_port = '기본 포트 이외의 보안접속(SSL) 포트를 사
|
|||
$lang->about_reset_auth_mail = '현재등록된 이메일 주소는 %s입니다. 이메일 주소를 변경하고자 하는 경우 새로운 이메일 주소로 회원정보 갱신 후 인증메일을 재발송할 수 있습니다.';
|
||||
$lang->about_resend_auth_mail = '가입 인증 메일을 받지 못한 경우 다시 받을 수 있습니다.';
|
||||
$lang->about_reset_auth_mail_submit = '이메일을 로그인 계정으로 사용할 경우 신규 메일주소로 로그인해야 합니다.';
|
||||
$lang->about_update_nickname_log = '닉네임 변경 기록을 저장합니다. 이 옵션을 사용하게 되면, 닉네임 변경 이력을 확인할 수 있습니다.';
|
||||
$lang->about_allow_nickname_change = '닉네임 변경을 허용합니다. 사용하는 스킨에 따라 입력란이 표시되지 않을 수도 있습니다.';
|
||||
$lang->about_update_nickname_log = '닉네임 변경 이력을 저장합니다.';
|
||||
$lang->about_nickname_symbols = '닉네임에 특수문자를 사용할 수 있도록 허용하거나 금지합니다.';
|
||||
$lang->about_member_profile_view = '관리자 회원목록 페이지에서 프로필 이미지를 볼 수 있는 옵션입니다. 회원목록에서 프로필 사진을 보기 원치 않을 경우에는 아니요를 선택하세요.';
|
||||
$lang->no_article = '글이 없습니다.';
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ class MemberAdminController extends Member
|
|||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date');
|
||||
$args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','is_admin','denied','status','description','group_srl_list','limit_date');
|
||||
$oMemberModel = getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig ();
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
$getVars = array();
|
||||
if($config->signupForm)
|
||||
{
|
||||
|
|
@ -80,7 +80,7 @@ class MemberAdminController extends Member
|
|||
{
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', ['member_srl' => $args->member_srl], ['extra_vars']);
|
||||
$extra_vars = ($output->data && $output->data->extra_vars) ? unserialize($output->data->extra_vars) : new stdClass;
|
||||
foreach($this->nouse_extra_vars as $key)
|
||||
foreach(self::NOUSE_EXTRA_VARS as $key)
|
||||
{
|
||||
unset($extra_vars->$key);
|
||||
}
|
||||
|
|
@ -99,12 +99,19 @@ class MemberAdminController extends Member
|
|||
$extra_vars->{$formInfo->name} = $all_args->{$formInfo->name};
|
||||
}
|
||||
}
|
||||
foreach($this->admin_extra_vars as $key)
|
||||
foreach(self::ADMIN_EXTRA_VARS as $key)
|
||||
{
|
||||
$extra_vars->{$key} = escape(utf8_clean($all_args->{$key} ?? ''));
|
||||
}
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
// Normalize denied and status columns
|
||||
if (!in_array($args->status ?? '', self::STATUS_LIST))
|
||||
{
|
||||
$args->status = 'APPROVED';
|
||||
}
|
||||
$args->denied = ($args->status === 'APPROVED') ? 'N' : 'Y';
|
||||
|
||||
// Delete invalid or past limit dates #1334
|
||||
if (!isset($args->limit_date))
|
||||
{
|
||||
|
|
@ -222,6 +229,8 @@ class MemberAdminController extends Member
|
|||
public function procMemberAdminInsertDefaultConfig()
|
||||
{
|
||||
$args = Context::gets(
|
||||
'member_mid',
|
||||
'force_mid',
|
||||
'enable_join',
|
||||
'enable_join_key',
|
||||
'enable_confirm',
|
||||
|
|
@ -232,6 +241,7 @@ class MemberAdminController extends Member
|
|||
'password_hashing_work_factor',
|
||||
'password_hashing_auto_upgrade',
|
||||
'password_change_invalidate_other_sessions',
|
||||
'allow_nickname_change',
|
||||
'update_nickname_log',
|
||||
'nickname_symbols',
|
||||
'nickname_symbols_allowed_list',
|
||||
|
|
@ -239,6 +249,48 @@ class MemberAdminController extends Member
|
|||
'member_profile_view'
|
||||
);
|
||||
|
||||
// Update member mid
|
||||
$config = MemberModel::getMemberConfig();
|
||||
if ($args->member_mid !== ($config->mid ?? null))
|
||||
{
|
||||
if (!preg_match('/^[a-z][a-z0-9_]+$/i', $args->member_mid))
|
||||
{
|
||||
return new BaseObject(-1, 'msg_limit_mid');
|
||||
}
|
||||
|
||||
if (!empty($config->mid) && $this->checkMid($config->mid) == 1)
|
||||
{
|
||||
$module_info = \ModuleModel::getModuleInfoByMid($config->mid);
|
||||
}
|
||||
else
|
||||
{
|
||||
$module_info = null;
|
||||
}
|
||||
|
||||
if ($module_info)
|
||||
{
|
||||
$module_info->mid = $args->member_mid;
|
||||
$output = ModuleController::getInstance()->updateModule($module_info);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $this->createMid($args->member_mid, $config->skin ?: 'default', $config->mskin ?: 'default');
|
||||
}
|
||||
|
||||
if ($output->toBool())
|
||||
{
|
||||
$args->mid = $args->member_mid;
|
||||
unset($args->member_mid);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
$args->force_mid = ($args->force_mid === 'Y');
|
||||
|
||||
// Update join key
|
||||
if ($args->enable_join === 'KEY')
|
||||
{
|
||||
$args->enable_join = 'N';
|
||||
|
|
@ -563,8 +615,15 @@ class MemberAdminController extends Member
|
|||
{
|
||||
return new BaseObject(-1, 'msg_need_enabled_identifier');
|
||||
}
|
||||
if (in_array('email_address', $args->identifiers) && $config->enable_confirm === 'Y')
|
||||
{
|
||||
$args->identifier = 'email_address';
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->identifier = array_first($args->identifiers) === 'email_address' ? 'email_address' : 'user_id';
|
||||
}
|
||||
$args->signupForm = $config->signupForm;
|
||||
$args->identifier = (count($args->identifiers) == 1 && $args->identifiers[0] == 'email_address') ? 'email_address' : 'user_id';
|
||||
|
||||
if(!$args->change_password_date)
|
||||
{
|
||||
|
|
@ -982,6 +1041,7 @@ class MemberAdminController extends Member
|
|||
if($var->denied)
|
||||
{
|
||||
$args->denied = $var->denied;
|
||||
$args->status = $var->denied === 'Y' ? 'DENIED' : 'APPROVED';
|
||||
$output = executeQuery('member.updateMemberDeniedInfo', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,17 +42,24 @@ class MemberAdminModel extends Member
|
|||
{
|
||||
// Search option
|
||||
$args = new stdClass();
|
||||
$args->is_admin = Context::get('is_admin')=='Y'?'Y':'';
|
||||
$args->is_denied = Context::get('is_denied')=='Y'?'Y':'';
|
||||
$args->is_admin = Context::get('is_admin') === 'Y' ? 'Y' : null;
|
||||
$args->status = Context::get('is_denied') === 'Y' ? 'DENIED' : null;
|
||||
$args->selected_group_srl = Context::get('selected_group_srl');
|
||||
|
||||
$filter = Context::get('filter_type');
|
||||
switch($filter)
|
||||
{
|
||||
case 'super_admin' : $args->is_admin = 'Y';break;
|
||||
case 'site_admin' : $args->member_srls = $this->getSiteAdminMemberSrls();break;
|
||||
case 'enable' : $args->is_denied = 'N';break;
|
||||
case 'disable' : $args->is_denied = 'Y';break;
|
||||
case 'admin':
|
||||
case 'super_admin':
|
||||
$args->is_admin = 'Y'; break;
|
||||
case 'approved':
|
||||
case 'enable':
|
||||
$args->status = 'APPROVED'; break;
|
||||
case 'denied':
|
||||
case 'disable':
|
||||
$args->status = 'DENIED'; break;
|
||||
case 'unauthed':
|
||||
$args->status = 'UNAUTHED'; break;
|
||||
}
|
||||
|
||||
$search_target = trim(Context::get('search_target') ?? '');
|
||||
|
|
|
|||
|
|
@ -117,29 +117,6 @@ class MemberAdminView extends Member
|
|||
}
|
||||
}
|
||||
|
||||
// Get list of new members who have not completed email auth
|
||||
$check_list = array();
|
||||
foreach ($output->data as $member)
|
||||
{
|
||||
if ($member->denied !== 'N')
|
||||
{
|
||||
$check_list[$member->member_srl] = false;
|
||||
}
|
||||
}
|
||||
if (count($check_list))
|
||||
{
|
||||
$args2 = new stdClass;
|
||||
$args2->member_srl = array_keys($check_list);
|
||||
$output2 = executeQueryArray('member.getAuthMailType', $args2);
|
||||
foreach ($output2->data as $item)
|
||||
{
|
||||
if ($item->is_register === 'Y')
|
||||
{
|
||||
$check_list[$item->member_srl] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
|
|
@ -148,7 +125,6 @@ class MemberAdminView extends Member
|
|||
Context::set('sort_index', Context::get('sort_index'));
|
||||
Context::set('member_config', $oMemberModel->getMemberConfig());
|
||||
Context::set('member_list', $output->data);
|
||||
Context::set('new_member_check_list', $check_list);
|
||||
Context::set('usedIdentifiers', $usedIdentifiers);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('profileImageConfig', $config->profile_image);
|
||||
|
|
@ -488,22 +464,6 @@ class MemberAdminView extends Member
|
|||
$member_info->limit_date = '';
|
||||
}
|
||||
|
||||
$member_unauthenticated = false;
|
||||
if ($member_info->member_srl && $member_info->denied !== 'N')
|
||||
{
|
||||
$args2 = new stdClass;
|
||||
$args2->member_srl = $member_info->member_srl;
|
||||
$output2 = executeQueryArray('member.getAuthMailType', $args2);
|
||||
foreach ($output2->data as $item)
|
||||
{
|
||||
if ($item->is_register === 'Y')
|
||||
{
|
||||
$member_unauthenticated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('member_unauthenticated', $member_unauthenticated);
|
||||
|
||||
$this->setTemplateFile('insert_member');
|
||||
}
|
||||
|
||||
|
|
@ -537,13 +497,15 @@ class MemberAdminView extends Member
|
|||
{
|
||||
$member_config = $this->memberConfig = $oMemberModel->getMemberConfig();
|
||||
}
|
||||
$identifiers = $member_config->identifiers ?? [$member_config->identifier];
|
||||
$identifiers = array_intersect($identifiers, ['user_id', 'email_address']);
|
||||
|
||||
global $lang;
|
||||
$formTags = array();
|
||||
|
||||
foreach($member_config->signupForm as $no=>$formInfo)
|
||||
{
|
||||
if(!$formInfo->isUse || $formInfo->name == $member_config->identifier || $formInfo->name == 'password')
|
||||
if(!$formInfo->isUse || (in_array($formInfo->name, $identifiers) && $formInfo->name === array_first($identifiers)) || $formInfo->name == 'password')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -633,8 +595,16 @@ class MemberAdminView extends Member
|
|||
}
|
||||
else if($formInfo->name == 'email_address')
|
||||
{
|
||||
if(isset($member_config->enable_confirm) && $member_config->enable_confirm === 'Y' && !$isAdmin)
|
||||
{
|
||||
$readonly = 'readonly="readonly" ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$readonly = '';
|
||||
}
|
||||
$formTag->type = 'email';
|
||||
$inputTag = '<input type="email" name="email_address" id="email_address" value="'.$memberInfo['email_address'].'" />';
|
||||
$inputTag = '<input type="email" name="email_address" id="email_address" value="'.$memberInfo['email_address'].'" ' . $readonly . '/>';
|
||||
}
|
||||
else if($formInfo->name == 'phone_number')
|
||||
{
|
||||
|
|
@ -703,11 +673,21 @@ class MemberAdminView extends Member
|
|||
}
|
||||
else
|
||||
{
|
||||
if($formInfo->name === 'nick_name' && ($member_config->allow_nickname_change ?? 'Y') === 'N')
|
||||
{
|
||||
$readonly = 'readonly="readonly" ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$readonly = '';
|
||||
}
|
||||
$formTag->type = 'text';
|
||||
$inputTag = sprintf('<input type="text" name="%s" id="%s" value="%s" />',
|
||||
$inputTag = sprintf('<input type="text" name="%s" id="%s" value="%s" %s/>',
|
||||
$formInfo->name,
|
||||
$formInfo->name,
|
||||
$memberInfo[$formInfo->name]);
|
||||
$memberInfo[$formInfo->name],
|
||||
$readonly);
|
||||
|
||||
}
|
||||
}//end isDefaultForm
|
||||
else
|
||||
|
|
|
|||
|
|
@ -8,10 +8,11 @@
|
|||
class Member extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* Extra vars for admin purposes
|
||||
* Constants
|
||||
*/
|
||||
public $admin_extra_vars = ['refused_reason', 'limited_reason'];
|
||||
public $nouse_extra_vars = ['error_return_url', 'success_return_url', '_rx_ajax_compat', '_rx_csrf_token', 'ruleset', 'captchaType', 'use_editor', 'use_html'];
|
||||
public const ADMIN_EXTRA_VARS = ['refused_reason', 'limited_reason'];
|
||||
public const NOUSE_EXTRA_VARS = ['error_return_url', 'success_return_url', '_rx_ajax_compat', '_rx_csrf_token', 'ruleset', 'captchaType', 'use_editor', 'use_html'];
|
||||
public const STATUS_LIST = ['APPROVED', 'DENIED', 'UNAUTHED', 'SUSPENDED', 'DELETED'];
|
||||
|
||||
/**
|
||||
* constructor
|
||||
|
|
@ -37,6 +38,9 @@ class Member extends ModuleObject
|
|||
if(!$config)
|
||||
{
|
||||
$config = MemberModel::getMemberConfig();
|
||||
$config->mid = 'member';
|
||||
$config->force_mid = true;
|
||||
$this->createMid($config->mid);
|
||||
$oModuleController->insertModuleConfig('member', $config);
|
||||
}
|
||||
|
||||
|
|
@ -125,6 +129,10 @@ class Member extends ModuleObject
|
|||
{
|
||||
return true;
|
||||
}
|
||||
if($oDB->getColumnInfo('member_auth_mail', 'new_password')->size < 250)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Add columns for phone number
|
||||
if(!$oDB->isColumnExists("member", "phone_number")) return true;
|
||||
|
|
@ -140,6 +148,10 @@ class Member extends ModuleObject
|
|||
if(!$oDB->isColumnExists("member", "last_login_ipaddress")) return true;
|
||||
if(!$oDB->isIndexExists("member","idx_last_login_ipaddress")) return true;
|
||||
|
||||
// Add column for status
|
||||
if(!$oDB->isColumnExists("member", "status")) return true;
|
||||
if(!$oDB->isIndexExists("member", "idx_status")) return true;
|
||||
|
||||
// Add column for list order
|
||||
if(!$oDB->isColumnExists("member", "list_order")) return true;
|
||||
if(!$oDB->isIndexExists("member","idx_list_order")) return true;
|
||||
|
|
@ -161,7 +173,19 @@ class Member extends ModuleObject
|
|||
if(!$oDB->isColumnExists('member_devices', 'device_token_type')) return true;
|
||||
if(!$oDB->isColumnExists('member_devices', 'last_active_date')) return true;
|
||||
|
||||
// Update status column
|
||||
$output = executeQuery('member.getDeniedAndStatus');
|
||||
if ($output->data->count)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check mid
|
||||
$config = ModuleModel::getModuleConfig('member');
|
||||
if (empty($config->mid) || $this->checkMid($config->mid) !== 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check members with phone country in old format
|
||||
if ($config->phone_number_default_country && !preg_match('/^[A-Z]{3}$/', $config->phone_number_default_country))
|
||||
|
|
@ -256,6 +280,10 @@ class Member extends ModuleObject
|
|||
{
|
||||
$oDB->modifyColumn('member', 'password', 'varchar', 250, null, true);
|
||||
}
|
||||
if($oDB->getColumnInfo('member_auth_mail', 'new_password')->size < 250)
|
||||
{
|
||||
$oDB->modifyColumn('member_auth_mail', 'new_password', 'varchar', 250, null, true);
|
||||
}
|
||||
|
||||
// Add columns for phone number
|
||||
if(!$oDB->isColumnExists("member", "phone_number"))
|
||||
|
|
@ -301,6 +329,16 @@ class Member extends ModuleObject
|
|||
$oDB->addIndex("member","idx_last_login_ipaddress", array("last_login_ipaddress"));
|
||||
}
|
||||
|
||||
// Add column for status
|
||||
if(!$oDB->isColumnExists("member", "status"))
|
||||
{
|
||||
$oDB->addColumn("member", "status", "varchar", 20, 'APPROVED', true, 'denied');
|
||||
}
|
||||
if(!$oDB->isIndexExists("member", "idx_status"))
|
||||
{
|
||||
$oDB->addIndex("member", "idx_status", array("status"));
|
||||
}
|
||||
|
||||
// Add column for list order
|
||||
if(!$oDB->isColumnExists("member", "list_order"))
|
||||
{
|
||||
|
|
@ -359,9 +397,52 @@ class Member extends ModuleObject
|
|||
$oDB->query("UPDATE member_devices SET last_active_date = regdate WHERE last_active_date = ''");
|
||||
}
|
||||
|
||||
// Update status column
|
||||
$output = executeQuery('member.getDeniedAndStatus');
|
||||
if ($output->data->count)
|
||||
{
|
||||
$oDB->begin();
|
||||
$result = $oDB->query("UPDATE `member` SET `status` = 'DENIED' WHERE `denied` = 'Y'");
|
||||
if ($result)
|
||||
{
|
||||
$result = $oDB->query("UPDATE `member` AS `m` " .
|
||||
"JOIN `member_auth_mail` AS `a` ON `m`.`member_srl` = `a`.`member_srl` " .
|
||||
"SET `m`.`status` = 'UNAUTHED' WHERE `m`.`status` = 'DENIED' " .
|
||||
"AND `a`.`is_register` = 'Y'");
|
||||
if ($result)
|
||||
{
|
||||
$oDB->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
var_dump($result);
|
||||
var_dump(Rhymix\Framework\Debug::getErrors());
|
||||
$oDB->rollback();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$oDB->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
// Get module config
|
||||
$config = ModuleModel::getModuleConfig('member') ?: new stdClass;
|
||||
$changed = false;
|
||||
|
||||
// Check mid
|
||||
if (empty($config->mid) || $this->checkMid($config->mid) !== 1)
|
||||
{
|
||||
$config->mid = 'member';
|
||||
$output = $this->createMid($config->mid, $config->skin ?: 'default', $config->mskin ?: 'default');
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
$changed = true;
|
||||
}
|
||||
|
||||
// Check members with phone country in old format
|
||||
if ($config->phone_number_default_country && !preg_match('/^[A-Z]{3}$/', $config->phone_number_default_country))
|
||||
{
|
||||
|
|
@ -518,12 +599,64 @@ class Member extends ModuleObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
* Check mid
|
||||
*
|
||||
* @return void
|
||||
* This method returns 0 if the mid doesn't exist,
|
||||
* 1 if the mid exists and belongs to this module,
|
||||
* and -1 if the mid exists but belongs to a different module.
|
||||
*
|
||||
* @param string $mid
|
||||
* @return int
|
||||
*/
|
||||
function recompileCache()
|
||||
public function checkMid($mid = 'member')
|
||||
{
|
||||
$module_info = \ModuleModel::getModuleInfoByMid($mid);
|
||||
if (!$module_info)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
elseif ($module_info->module === $this->module)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create mid
|
||||
*
|
||||
* @param string $mid
|
||||
* @param string $skin
|
||||
* @param string $mskin
|
||||
* @return BaseObject
|
||||
*/
|
||||
public function createMid($mid = 'member', $skin = 'default', $mskin = 'default')
|
||||
{
|
||||
$check = $this->checkMid($mid);
|
||||
if ($check == 1)
|
||||
{
|
||||
return new BaseObject();
|
||||
}
|
||||
if ($check == -1)
|
||||
{
|
||||
return new BaseObject(-1, sprintf(lang('msg_exists_member_mid'), $mid));
|
||||
}
|
||||
|
||||
return ModuleController::getInstance()->insertModule((object)array(
|
||||
'mid' => $mid,
|
||||
'module' => $this->module,
|
||||
'browser_title' => lang('member'),
|
||||
'description' => '',
|
||||
'layout_srl' => -1,
|
||||
'mlayout_srl' => -1,
|
||||
'skin' => $skin,
|
||||
'mskin' => $mskin,
|
||||
'use_mobile' => 'Y',
|
||||
'isMenuCreate' => false,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -766,7 +766,11 @@ class MemberController extends Member
|
|||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
// Set the user state as "denied" when using mail authentication
|
||||
if($config->enable_confirm == 'Y') $args->denied = 'Y';
|
||||
if($config->enable_confirm == 'Y')
|
||||
{
|
||||
$args->denied = 'Y';
|
||||
$args->status = 'UNAUTHED';
|
||||
}
|
||||
|
||||
// remove whitespace
|
||||
$checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address');
|
||||
|
|
@ -867,25 +871,27 @@ class MemberController extends Member
|
|||
// Call a trigger (after)
|
||||
ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config);
|
||||
|
||||
if($config->redirect_url)
|
||||
self::clearMemberCache($args->member_srl);
|
||||
|
||||
// Redirect
|
||||
if ($config->redirect_url)
|
||||
{
|
||||
$returnUrl = $config->redirect_url;
|
||||
}
|
||||
elseif (Context::get('success_return_url'))
|
||||
{
|
||||
$returnUrl = Context::get('success_return_url');
|
||||
}
|
||||
elseif (isset($_SESSION['member_auth_referer']))
|
||||
{
|
||||
$returnUrl = $_SESSION['member_auth_referer'];
|
||||
unset($_SESSION['member_auth_referer']);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Context::get('success_return_url'))
|
||||
{
|
||||
$returnUrl = Context::get('success_return_url');
|
||||
}
|
||||
else if($_COOKIE['XE_REDIRECT_URL'])
|
||||
{
|
||||
$returnUrl = $_COOKIE['XE_REDIRECT_URL'];
|
||||
setcookie("XE_REDIRECT_URL", '', 1);
|
||||
}
|
||||
$returnUrl = getNotEncodedUrl('');
|
||||
}
|
||||
|
||||
self::clearMemberCache($args->member_srl);
|
||||
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
|
|
@ -1023,7 +1029,7 @@ class MemberController extends Member
|
|||
// Get existing extra vars
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', ['member_srl' => $args->member_srl], ['extra_vars']);
|
||||
$extra_vars = ($output->data && $output->data->extra_vars) ? unserialize($output->data->extra_vars) : new stdClass;
|
||||
foreach($this->nouse_extra_vars as $key)
|
||||
foreach(self::NOUSE_EXTRA_VARS as $key)
|
||||
{
|
||||
unset($extra_vars->$key);
|
||||
}
|
||||
|
|
@ -1050,6 +1056,24 @@ class MemberController extends Member
|
|||
}
|
||||
}
|
||||
|
||||
// Check if nickname change is allowed
|
||||
if(isset($config->allow_nickname_change) && $config->allow_nickname_change === 'N')
|
||||
{
|
||||
if (!empty($args->nick_name) && $args->nick_name !== $logged_info->nick_name)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_nickname_not_changeable');
|
||||
}
|
||||
}
|
||||
|
||||
// Check if email address change is allowed
|
||||
if(isset($config->enable_confirm) && $config->enable_confirm === 'Y')
|
||||
{
|
||||
if (!empty($args->email_address) && $args->email_address !== $logged_info->email_address)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_email_address_not_changeable');
|
||||
}
|
||||
}
|
||||
|
||||
// Check symbols in nickname
|
||||
if($config->nickname_symbols === 'N')
|
||||
{
|
||||
|
|
@ -1770,16 +1794,21 @@ class MemberController extends Member
|
|||
$is_register = $output->data->is_register;
|
||||
|
||||
// If credentials are correct, change the password to a new one
|
||||
$args = new stdClass;
|
||||
$args->member_srl = $member_srl;
|
||||
if($is_register === 'Y')
|
||||
{
|
||||
$args->denied = 'N';
|
||||
$args->status = 'APPROVED';
|
||||
$query_id = 'member.updateMemberStatus';
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->password = MemberModel::hashPassword($output->data->new_password);
|
||||
$query_id = 'member.updateMemberPassword';
|
||||
}
|
||||
|
||||
$output = executeQuery('member.updateMemberPassword', $args);
|
||||
$output = executeQuery($query_id, $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
|
|
@ -1830,7 +1859,7 @@ class MemberController extends Member
|
|||
{
|
||||
throw new Rhymix\Framework\Exception('msg_not_exists_member');
|
||||
}
|
||||
if($member_info->denied !== 'Y')
|
||||
if($member_info->status !== 'UNAUTHED')
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('msg_activation_not_needed');
|
||||
}
|
||||
|
|
@ -2332,17 +2361,17 @@ class MemberController extends Member
|
|||
}
|
||||
|
||||
// If denied == 'Y', notify
|
||||
if($member_info->denied == 'Y')
|
||||
if($member_info->denied === 'Y')
|
||||
{
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
$output = executeQuery('member.chkAuthMail', $args);
|
||||
if ($output->toBool() && $output->data->count)
|
||||
if ($member_info->status === 'UNAUTHED')
|
||||
{
|
||||
return new BaseObject(-1, sprintf(lang('msg_user_not_confirmed'), $member_info->email_address));
|
||||
}
|
||||
|
||||
$refused_reason = $member_info->refused_reason ? ('<br>' . lang('refused_reason') . ': ' . $member_info->refused_reason) : '';
|
||||
return new BaseObject(-1, lang('msg_user_denied') . $refused_reason);
|
||||
else
|
||||
{
|
||||
$refused_reason = $member_info->refused_reason ? ('<br>' . lang('refused_reason') . ': ' . $member_info->refused_reason) : '';
|
||||
return new BaseObject(-1, lang('msg_user_denied') . $refused_reason);
|
||||
}
|
||||
}
|
||||
|
||||
// Notify if user is limited
|
||||
|
|
@ -2742,10 +2771,16 @@ class MemberController extends Member
|
|||
}
|
||||
}
|
||||
|
||||
// Set status
|
||||
if (!isset($args->status))
|
||||
{
|
||||
$args->status = ($args->denied === 'Y') ? 'UNAUTHED' : 'APPROVED';
|
||||
}
|
||||
|
||||
// Insert data into the DB
|
||||
$args->list_order = -1 * $args->member_srl;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$output = executeQuery('member.insertMember', $args);
|
||||
|
|
@ -2853,6 +2888,7 @@ class MemberController extends Member
|
|||
if($is_admin == false)
|
||||
{
|
||||
unset($args->denied);
|
||||
unset($args->status);
|
||||
}
|
||||
if($logged_info->member_srl != $args->member_srl && $is_admin == false)
|
||||
{
|
||||
|
|
@ -2969,24 +3005,30 @@ class MemberController extends Member
|
|||
}
|
||||
|
||||
// Check if email address or user ID is duplicate
|
||||
if($config->identifier == 'email_address')
|
||||
$identifiers = $config->identifiers ?? [$config->identifier];
|
||||
if(in_array('email_address', $identifiers))
|
||||
{
|
||||
$member_srl = MemberModel::getMemberSrlByEmailAddress($args->email_address);
|
||||
if($member_srl && $args->member_srl != $member_srl)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_exists_email_address');
|
||||
}
|
||||
$args->email_address = $orgMemberInfo->email_address;
|
||||
if($logged_info->is_admin !== 'Y')
|
||||
{
|
||||
$args->email_address = $orgMemberInfo->email_address;
|
||||
}
|
||||
}
|
||||
else
|
||||
if(in_array('user_id', $identifiers))
|
||||
{
|
||||
$member_srl = MemberModel::getMemberSrlByUserID($args->user_id);
|
||||
if($member_srl && $args->member_srl != $member_srl)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_exists_user_id');
|
||||
}
|
||||
|
||||
$args->user_id = $orgMemberInfo->user_id;
|
||||
if($logged_info->is_admin !== 'Y')
|
||||
{
|
||||
$args->user_id = $orgMemberInfo->user_id;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if phone number is duplicate
|
||||
|
|
@ -3701,7 +3743,8 @@ class MemberController extends Member
|
|||
$args->email_address = $member_info->email_address;
|
||||
$args->user_id = $member_info->user_id;
|
||||
$args->nick_name = $member_info->nick_name;
|
||||
$args->denied = "Y";
|
||||
$args->denied = 'Y';
|
||||
$args->status = 'DENIED';
|
||||
$args->description = trim(vsprintf("%s\n%s [%s %s]\ninfo: %s\ndocuments: %d\ncomments: %d]", [
|
||||
trim($member_info->description),
|
||||
lang('cmd_spammer'),
|
||||
|
|
|
|||
|
|
@ -18,25 +18,6 @@ class MemberMobile extends MemberView
|
|||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('member_config.signupForm..');
|
||||
|
||||
// Set the template path
|
||||
$mskin = $this->member_config->mskin;
|
||||
if(!$mskin)
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s/', $this->module_path, 'default');
|
||||
}
|
||||
elseif($mskin === '/USE_RESPONSIVE/')
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->member_config->skin);
|
||||
if(!is_dir($template_path) || !$this->member_config->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
|
||||
}
|
||||
|
||||
// if member_srl exists, set memberInfo
|
||||
$member_srl = Context::get('member_srl');
|
||||
if($member_srl)
|
||||
|
|
@ -53,15 +34,8 @@ class MemberMobile extends MemberView
|
|||
}
|
||||
}
|
||||
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->member_config->mlayout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->mlayout_srl = $this->member_config->mlayout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
// Set layout and skin paths
|
||||
$this->setLayoutAndTemplatePaths('M', $this->member_config);
|
||||
}
|
||||
|
||||
function dispMemberModifyInfo()
|
||||
|
|
|
|||
|
|
@ -106,7 +106,14 @@ class MemberModel extends Member
|
|||
|
||||
// Set login config
|
||||
$config->identifiers = $config->identifiers ?? array('user_id', 'email_address');
|
||||
$config->identifier = (count($config->identifiers) == 1 && $config->identifiers[0] == 'email_address') ? 'email_address' : 'user_id';
|
||||
if (in_array('email_address', $config->identifiers) && $config->enable_confirm === 'Y')
|
||||
{
|
||||
$config->identifier = 'email_address';
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->identifier = array_first($config->identifiers) === 'email_address' ? 'email_address' : 'user_id';
|
||||
}
|
||||
$config->change_password_date = $config->change_password_date ?? 0;
|
||||
$config->enable_login_fail_report = $config->enable_login_fail_report ?? 'Y';
|
||||
$config->max_error_count = $config->max_error_count ?? 10;
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@
|
|||
*/
|
||||
class MemberView extends Member
|
||||
{
|
||||
var $group_list = NULL; // /< Group list information
|
||||
var $member_info = NULL; // /< Member information of the user
|
||||
var $skin = 'default';
|
||||
public $member_config;
|
||||
public $member_info;
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
|
|
@ -22,34 +21,90 @@ class MemberView extends Member
|
|||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('member_config.signupForm..');
|
||||
|
||||
$skin = $this->member_config->skin;
|
||||
// Set the template path
|
||||
if(!$skin)
|
||||
// Set layout and skin paths
|
||||
$this->setLayoutAndTemplatePaths('P', $this->member_config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the referer for login and signup pages.
|
||||
*/
|
||||
public function checkRefererUrl()
|
||||
{
|
||||
// Get the referer URL from Context var or HTTP header.
|
||||
$referer_url = Context::get('referer_url') ?: ($_SERVER['HTTP_REFERER'] ?? '');
|
||||
|
||||
// Check if the referer is an internal URL.
|
||||
$is_valid_referer = !empty($referer_url) && Rhymix\Framework\URL::isInternalURL($referer_url);
|
||||
|
||||
// Check if the referer is the login or signup page, to prevent redirect loops.
|
||||
if (preg_match('!\b(dispMemberLoginForm|dispMemberSignUpForm|dispMemberFindAccount|dispMemberResendAuthMail|procMember)!', $referer_url))
|
||||
{
|
||||
$skin = 'default';
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
$is_valid_referer = false;
|
||||
}
|
||||
if (preg_match('!/(login|signup)\b!', $referer_url))
|
||||
{
|
||||
$is_valid_referer = false;
|
||||
}
|
||||
|
||||
// Store valid referer info in the session.
|
||||
if ($is_valid_referer)
|
||||
{
|
||||
return $_SESSION['member_auth_referer'] = $referer_url;
|
||||
}
|
||||
elseif (isset($_SESSION['member_auth_referer']))
|
||||
{
|
||||
return $_SESSION['member_auth_referer'];
|
||||
}
|
||||
elseif ($this->mid && !empty($this->member_config->mid) && $this->mid === $this->member_config->mid)
|
||||
{
|
||||
return getNotEncodedUrl('');
|
||||
}
|
||||
else
|
||||
{
|
||||
//check theme
|
||||
$config_parse = explode('|@|', $skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
}
|
||||
return getNotEncodedUrl('act', '');
|
||||
}
|
||||
// Template path
|
||||
$this->setTemplatePath($template_path);
|
||||
}
|
||||
|
||||
$layout_info = LayoutModel::getInstance()->getLayout($this->member_config->layout_srl);
|
||||
if($layout_info)
|
||||
/**
|
||||
* Check redirect to member mid.
|
||||
*/
|
||||
public function checkMidAndRedirect()
|
||||
{
|
||||
if (!$this->member_config)
|
||||
{
|
||||
$this->module_info->layout_srl = $this->member_config->layout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
$this->member_config = MemberModel::getMemberConfig();
|
||||
}
|
||||
if (!$this->member_config->mid || !$this->member_config->force_mid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (ModuleModel::getModuleInfoByMid($this->member_config->mid)->module !== $this->module)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Context::get('mid') === $this->member_config->mid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$vars = get_object_vars(Context::getRequestVars());
|
||||
$vars['mid'] = $this->member_config->mid;
|
||||
$this->setRedirectUrl(getNotEncodedUrl($vars));
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Module index
|
||||
*/
|
||||
public function dispMemberIndex()
|
||||
{
|
||||
if ($this->user->isMember())
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl(['mid' => $this->mid, 'act' => 'dispMemberInfo']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl(['mid' => $this->mid, 'act' => 'dispMemberLoginForm']));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -58,21 +113,30 @@ class MemberView extends Member
|
|||
*/
|
||||
function dispMemberInfo()
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
// Don't display member info to non-logged user
|
||||
if(!$logged_info->member_srl) throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
|
||||
$member_srl = Context::get('member_srl');
|
||||
if(!$member_srl && Context::get('is_logged'))
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
$member_srl = $logged_info->member_srl;
|
||||
return;
|
||||
}
|
||||
elseif(!$member_srl)
|
||||
|
||||
// Don't display member info to non-logged user
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl)
|
||||
{
|
||||
return $this->dispMemberSignUpForm();
|
||||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
$member_srl = Context::get('member_srl') ?: $logged_info->member_srl;
|
||||
if(!$member_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
$member_info = MemberModel::getMemberInfoByMemberSrl($member_srl);
|
||||
if (!$member_info->member_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
|
||||
unset($member_info->password);
|
||||
unset($member_info->email_id);
|
||||
unset($member_info->email_host);
|
||||
|
|
@ -84,8 +148,6 @@ class MemberView extends Member
|
|||
$member_info->email_address = sprintf('%s@%s', $protect_id, $email_host);
|
||||
}
|
||||
|
||||
if(!$member_info->member_srl) return $this->dispMemberSignUpForm();
|
||||
|
||||
Context::set('memberInfo', get_object_vars($member_info));
|
||||
|
||||
$extendForm = MemberModel::getCombineJoinForm($member_info);
|
||||
|
|
@ -201,14 +263,24 @@ class MemberView extends Member
|
|||
*/
|
||||
function dispMemberSignUpForm()
|
||||
{
|
||||
//setcookie for redirect url in case of going to member sign up
|
||||
setcookie("XE_REDIRECT_URL", $_SERVER['HTTP_REFERER'], 0, '/', null, !!config('session.use_ssl_cookies'));
|
||||
// Check referer URL
|
||||
$referer_url = $this->checkRefererUrl();
|
||||
|
||||
$member_config = $this->member_config;
|
||||
// Redirect to member mid if necessary.
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Return to previous screen if already logged in.
|
||||
if($this->user->isMember())
|
||||
{
|
||||
$this->setRedirectUrl($referer_url);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the member information if logged-in
|
||||
if($this->user->member_srl) throw new Rhymix\Framework\Exception('msg_already_logged');
|
||||
// call a trigger (before)
|
||||
$member_config = $this->member_config;
|
||||
$trigger_output = ModuleHandler::triggerCall('member.dispMemberSignUpForm', 'before', $member_config);
|
||||
if(!$trigger_output->toBool()) return $trigger_output;
|
||||
|
||||
|
|
@ -283,6 +355,11 @@ class MemberView extends Member
|
|||
|
||||
function dispMemberModifyInfoBefore()
|
||||
{
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl)
|
||||
{
|
||||
|
|
@ -323,6 +400,11 @@ class MemberView extends Member
|
|||
return;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$_SESSION['rechecked_password_step'] = 'INPUT_DATA';
|
||||
|
||||
$member_config = $this->member_config;
|
||||
|
|
@ -392,6 +474,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// A message appears if the user is not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
|
|
@ -436,6 +523,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// A message appears if the user is not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
|
|
@ -478,6 +570,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// A message appears if the user is not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
|
|
@ -573,6 +670,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// A message appears if the user is not logged-in
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl) throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
|
|
@ -602,6 +704,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
|
|
@ -631,25 +738,18 @@ class MemberView extends Member
|
|||
*/
|
||||
function dispMemberLoginForm()
|
||||
{
|
||||
// Get referer URL
|
||||
$referer_url = Context::get('referer_url') ?: ($_SERVER['HTTP_REFERER'] ?? '');
|
||||
$is_valid_referer = !empty($referer_url) && Rhymix\Framework\URL::isInternalURL($referer_url);
|
||||
if (preg_match('!\b(dispMemberLoginForm|dispMemberSignUpForm|dispMemberFindAccount|dispMemberResendAuthMail|procMember)!', $referer_url))
|
||||
{
|
||||
$is_valid_referer = false;
|
||||
}
|
||||
if (preg_match('!/(login|signup)\b!', $referer_url))
|
||||
{
|
||||
$is_valid_referer = false;
|
||||
}
|
||||
if (!$is_valid_referer)
|
||||
{
|
||||
$referer_url = getNotEncodedUrl('act', '');
|
||||
}
|
||||
// Check referer URL
|
||||
$referer_url = $this->checkRefererUrl();
|
||||
Context::set('referer_url', $referer_url);
|
||||
|
||||
// Redirect to member mid if necessary.
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Return to previous screen if already logged in.
|
||||
if(Context::get('is_logged'))
|
||||
if($this->user->isMember())
|
||||
{
|
||||
$this->setRedirectUrl($referer_url);
|
||||
return;
|
||||
|
|
@ -679,8 +779,12 @@ class MemberView extends Member
|
|||
// A message appears if the user is not logged-in
|
||||
if(!$this->user->member_srl) throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
|
||||
$memberConfig = $this->member_config;
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$memberConfig = $this->member_config;
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
|
|
@ -710,8 +814,12 @@ class MemberView extends Member
|
|||
// A message appears if the user is not logged-in
|
||||
if(!$this->user->member_srl) throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
|
||||
$memberConfig = $this->member_config;
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$memberConfig = $this->member_config;
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
|
|
@ -767,9 +875,12 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exception('already_logged');
|
||||
}
|
||||
|
||||
$config = $this->member_config;
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Context::set('identifier', $config->identifier);
|
||||
Context::set('identifier', $this->member_config->identifier);
|
||||
Context::set('enable_find_account_question', 'N');
|
||||
|
||||
$this->setTemplateFile('find_member_account');
|
||||
|
|
@ -785,6 +896,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exception('already_logged');
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->setTemplateFile('resend_auth_mail');
|
||||
}
|
||||
|
||||
|
|
@ -797,6 +913,11 @@ class MemberView extends Member
|
|||
return;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$_SESSION['rechecked_password_step'] = 'INPUT_DATA';
|
||||
|
||||
$this->setTemplateFile('modify_email_address');
|
||||
|
|
@ -846,7 +967,15 @@ class MemberView extends Member
|
|||
**/
|
||||
function dispMemberSpammer()
|
||||
{
|
||||
if(!Context::get('is_logged')) throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
if (!Context::get('is_logged'))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$member_srl = Context::get('member_srl');
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
|
@ -881,6 +1010,11 @@ class MemberView extends Member
|
|||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
if (!$this->checkMidAndRedirect())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$member_srl = Context::get('member_srl');
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$member_srl)
|
||||
|
|
|
|||
12
modules/member/queries/getDeniedAndStatus.xml
Normal file
12
modules/member/queries/getDeniedAndStatus.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getDeniedAndStatus" action="select">
|
||||
<tables>
|
||||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="denied" default="Y" />
|
||||
<condition operation="equal" column="status" default="APPROVED" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<conditions>
|
||||
<condition operation="equal" column="is_admin" var="is_admin" />
|
||||
<condition operation="equal" column="denied" var="is_denied" pipe="and" />
|
||||
<condition operation="equal" column="status" var="status" pipe="and" />
|
||||
<condition operation="in" column="member_srl" var="member_srls" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="user_id" var="s_user_id" />
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<condition operation="in" column="mgm.group_srl" var="selected_group_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="member.is_admin" var="is_admin" />
|
||||
<condition operation="equal" column="member.denied" var="is_denied" pipe="and" />
|
||||
<condition operation="equal" column="member.status" var="status" pipe="and" />
|
||||
<condition operation="in" column="member.member_srl" var="member_srls" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="member.user_id" var="s_user_id" />
|
||||
|
|
|
|||
|
|
@ -21,14 +21,15 @@
|
|||
<column name="birthday" var="birthday" />
|
||||
<column name="allow_mailing" var="allow_mailing" default="Y" />
|
||||
<column name="allow_message" var="allow_message" default="Y" />
|
||||
<column name="is_admin" var="is_admin" default="N" />
|
||||
<column name="denied" var="denied" default="N" />
|
||||
<column name="status" var="status" default="APPROVED" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="last_login" var="last_login" default="curdate()" />
|
||||
<column name="last_login_ipaddress" var="last_login_ipaddress" default="ipaddress()" />
|
||||
<column name="change_password_date" var="change_password_date" default="curdate()" />
|
||||
<column name="limit_date" var="limit_date" />
|
||||
<column name="is_admin" var="is_admin" default="N" />
|
||||
<column name="description" var="description" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="list_order" var="list_order" />
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="password" var="password" notnull="notnull" />
|
||||
<column name="user_name" var="user_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="user_id" var="user_id" notnull="notnull" />
|
||||
<column name="password" var="password" notnull="notnull" />
|
||||
<column name="email_address" var="email_address" notnull="notnull" />
|
||||
<column name="email_id" var="email_id" />
|
||||
<column name="email_host" var="email_host" />
|
||||
<column name="phone_number" var="phone_number" />
|
||||
<column name="phone_country" var="phone_country" />
|
||||
<column name="phone_type" var="phone_type" />
|
||||
<column name="user_name" var="user_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="find_account_question" var="find_account_question" />
|
||||
<column name="find_account_answer" var="find_account_answer" default="" />
|
||||
<column name="homepage" var="homepage" default="" />
|
||||
|
|
@ -20,9 +20,10 @@
|
|||
<column name="birthday" var="birthday" />
|
||||
<column name="allow_mailing" var="allow_mailing" default="Y" />
|
||||
<column name="allow_message" var="allow_message" />
|
||||
<column name="denied" var="denied" />
|
||||
<column name="limit_date" var="limit_date" />
|
||||
<column name="is_admin" var="is_admin" />
|
||||
<column name="denied" var="denied" />
|
||||
<column name="status" var="status" />
|
||||
<column name="limit_date" var="limit_date" />
|
||||
<column name="description" var="description" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
</columns>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<query id="updatememberDeniedInfo" action="update">
|
||||
<query id="updateMemberDeniedInfo" action="update">
|
||||
<tables>
|
||||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="denied" var="denied" notnull="notnull" />
|
||||
<column name="status" var="status" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" filter="number" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="password" var="password" />
|
||||
<column name="denied" var="denied" />
|
||||
<column name="change_password_date" var="change_password_date" default="curdate()" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" filter="number" />
|
||||
|
|
|
|||
12
modules/member/queries/updateMemberStatus.xml
Normal file
12
modules/member/queries/updateMemberStatus.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updateMemberStatus" action="update">
|
||||
<tables>
|
||||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="denied" var="denied" />
|
||||
<column name="status" var="status" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" filter="number" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -1,31 +1,32 @@
|
|||
<table name="member">
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="user_id" type="varchar" size="80" notnull="notnull" unique="unique_user_id" />
|
||||
<column name="password" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="email_address" type="varchar" size="80" notnull="notnull" unique="unique_email_address" />
|
||||
<column name="email_id" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="email_host" type="varchar" size="80" index="idx_email_host" />
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="user_id" type="varchar" size="80" notnull="notnull" unique="unique_user_id" />
|
||||
<column name="password" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="email_address" type="varchar" size="80" notnull="notnull" unique="unique_email_address" />
|
||||
<column name="email_id" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="email_host" type="varchar" size="80" index="idx_email_host" />
|
||||
<column name="phone_number" type="varchar" size="80" index="idx_phone_number" />
|
||||
<column name="phone_country" type="varchar" size="10" index="idx_phone_country" />
|
||||
<column name="phone_type" type="varchar" size="10" index="idx_phone_type" />
|
||||
<column name="user_name" type="varchar" size="40" notnull="notnull" />
|
||||
<column name="nick_name" type="varchar" size="40" notnull="notnull" index="idx_nick_name" />
|
||||
<column name="find_account_question" type="number" size="11" />
|
||||
<column name="find_account_answer" type="varchar" size="250" />
|
||||
<column name="homepage" type="varchar" size="250" />
|
||||
<column name="blog" type="varchar" size="250" />
|
||||
<column name="birthday" type="char" size="8" />
|
||||
<column name="allow_mailing" type="char" size="1" default="Y" notnull="notnull" index="idx_allow_mailing" />
|
||||
<column name="allow_message" type="char" size="1" default="Y" notnull="notnull" />
|
||||
<column name="denied" type="char" size="1" default="N" index="idx_is_denied" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="user_name" type="varchar" size="40" notnull="notnull" />
|
||||
<column name="nick_name" type="varchar" size="40" notnull="notnull" index="idx_nick_name" />
|
||||
<column name="find_account_question" type="number" size="11" />
|
||||
<column name="find_account_answer" type="varchar" size="250" />
|
||||
<column name="homepage" type="varchar" size="250" />
|
||||
<column name="blog" type="varchar" size="250" />
|
||||
<column name="birthday" type="char" size="8" />
|
||||
<column name="allow_mailing" type="char" size="1" notnull="notnull" default="Y" index="idx_allow_mailing" />
|
||||
<column name="allow_message" type="char" size="1" notnull="notnull" default="Y" />
|
||||
<column name="is_admin" type="char" size="1" notnull="notnull" default="N" index="idx_is_admin" />
|
||||
<column name="denied" type="char" size="1" notnull="notnull" default="N" index="idx_is_denied" />
|
||||
<column name="status" type="varchar" size="20" notnull="notnull" default="APPROVED" index="idx_status" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="ipaddress" type="varchar" size="60" index="idx_ipaddress" />
|
||||
<column name="last_login" type="date" index="idx_last_login" />
|
||||
<column name="last_login" type="date" index="idx_last_login" />
|
||||
<column name="last_login_ipaddress" type="varchar" size="60" index="idx_last_login_ipaddress" />
|
||||
<column name="limit_date" type="date" />
|
||||
<column name="change_password_date" type="date" />
|
||||
<column name="is_admin" type="char" size="1" default="N" index="idx_is_admin" />
|
||||
<column name="description" type="text" />
|
||||
<column name="extra_vars" type="text" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
<column name="change_password_date" type="date" />
|
||||
<column name="limit_date" type="date" />
|
||||
<column name="description" type="text" />
|
||||
<column name="extra_vars" type="text" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<label for="{$identifierForm->name}" class="control-label">{$identifierForm->title} <em style="color:red">*</em></label>
|
||||
<div class="controls">
|
||||
<input type="hidden" name="{$identifierForm->name}" value="{$identifierForm->value}" />
|
||||
<input type="text" name="{$identifierForm->name}" id="{$identifierForm->name}" value="{$identifierForm->value}" disabled="disabled" />
|
||||
<input type="text" name="{$identifierForm->name}" id="{$identifierForm->name}" value="{$identifierForm->value}" readonly="readonly" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" loop="$formTags=>$formTag">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
<input type="hidden" name="act" value="procMemberInsert" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('act','dispMemberInfo')}" />
|
||||
<input type="hidden" name="success_return_url" value="" />
|
||||
<div class="agreement" loop="$member_config->agreements => $i, $agreement" cond="$agreement->type !== 'disabled'">
|
||||
<div class="title">
|
||||
{$agreement->title}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,21 @@
|
|||
<input type="hidden" name="act" value="procMemberAdminInsertDefaultConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', $act)}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/tpl/1" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="member_mid">{$lang->url}</label>
|
||||
<div class="x_controls">
|
||||
<span class="baseurl" style="display:inline-block;transform:translateY(2px)">
|
||||
{$site_module_info->security === 'always' ? 'https://' : 'http://'}{$site_module_info->domain}{\RX_BASEURL}<!--@if(!config('url.rewrite'))-->index.php?mid=<!--@endif-->
|
||||
</span>
|
||||
<input type="text" name="member_mid" id="member_mid" value="{$config->mid ?? 'member'}" />
|
||||
|
||||
<label class="x_inline" for="force_mid">
|
||||
<input type="checkbox" name="force_mid" id="force_mid" value="Y" checked="checked"|cond="!empty($config->force_mid)" />
|
||||
{$lang->cmd_force_member_mid}
|
||||
</label>
|
||||
<p class="x_help-block" style="margin-top:10px">{$lang->about_mid}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->enable_join}</div>
|
||||
<div class="x_controls">
|
||||
|
|
@ -44,6 +59,14 @@
|
|||
<p class="x_help-block">{$lang->about_member_profile_view}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_modify_nickname_allow}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="allow_nickname_change_yes"><input type="radio" name="allow_nickname_change" id="allow_nickname_change_yes" value="Y" checked="checked"|cond="$config->allow_nickname_change != 'N'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="allow_nickname_change_no"><input type="radio" name="allow_nickname_change" id="allow_nickname_change_no" value="N" checked="checked"|cond="$config->allow_nickname_change == 'N'"/> {$lang->cmd_no}</label>
|
||||
<p class="x_help-block">{$lang->about_allow_nickname_change}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_modify_nickname_log}</div>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<div class="x_control-group">
|
||||
<label for="column_title" class="x_control-label"><em style="color:red">*</em> {$lang->column_title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="column_title" name="column_title" value="{$formInfo->column_title}" />
|
||||
<input type="text" id="column_title" name="column_title" value="{$formInfo->column_title}" class="lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
|
|
@ -72,11 +72,9 @@
|
|||
<div class="x_control-group" cond="$member_srl">
|
||||
<label class="x_control-label">{$lang->status}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="appoval"><input type="radio" name="denied" id="appoval" value="N" checked="checked"|cond="$member_info->denied == 'N'" disabled="disabled"|cond="$member_info->member_srl == $logged_info->member_srl" /> {$lang->approval}</label>
|
||||
<label class="x_inline" for="deny"><input type="radio" name="denied" id="deny" value="Y" checked="checked"|cond="$member_info->denied == 'Y' && !$member_unauthenticated" disabled="disabled"|cond="$member_unauthenticated || $member_info->member_srl == $logged_info->member_srl" /> {$lang->denied}</label>
|
||||
<!--@if($member_unauthenticated)-->
|
||||
<label class="x_inline" for="deny2"><input type="radio" name="denied" id="deny2" value="Y" checked="checked"|cond="($member_info->denied == 'Y' && $member_unauthenticated) || $member_info->member_srl == $logged_info->member_srl" /> {$lang->member_unauthenticated}</label>
|
||||
<!--@endif-->
|
||||
<label class="x_inline" for="status_approved"><input type="radio" name="status" id="status_approved" value="APPROVED" checked="checked"|cond="$member_info->status == 'APPROVED' || $member_info->denied == 'Y' || $member_info->member_srl == $logged_info->member_srl" /> {$lang->approval}</label>
|
||||
<label class="x_inline" for="status_denied"><input type="radio" name="status" id="status_denied" value="DENIED" checked="checked"|cond="$member_info->status == 'DENIED' && $member_info->member_srl != $logged_info->member_srl" disabled="disabled"|cond="$member_info->member_srl == $logged_info->member_srl" /> {$lang->denied}</label>
|
||||
<label class="x_inline" for="status_unauthed"><input type="radio" name="status" id="status_unauthed" value="UNAUTHED" checked="checked"|cond="$member_info->status == 'UNAUTHED' && $member_info->member_srl != $logged_info->member_srl" disabled="disabled"|cond="$member_info->member_srl == $logged_info->member_srl" /> {$lang->member_unauthenticated}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group div_refused_reason">
|
||||
|
|
@ -198,7 +196,7 @@
|
|||
refused_reason_division.slideUp(200);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(!$('#until').val())
|
||||
{
|
||||
$('.div_limited_reason').hide();
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ jQuery(function($){
|
|||
{member_join_form_srl:memberFormSrl},
|
||||
function(ret){
|
||||
var tpl = ret.tpl.replace(/\|@\|/g, '\n');
|
||||
$('#extendForm').html(tpl);
|
||||
$('#extendForm').html(tpl).find('.lang_code').xeApplyMultilingualUI();
|
||||
|
||||
if (checked)$('#extendForm #radio_'+checked).attr('checked', 'checked');
|
||||
},
|
||||
|
|
@ -109,7 +109,7 @@ jQuery(function($){
|
|||
);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('a._extendFormDelete').click(function(event){
|
||||
event.preventDefault();
|
||||
if (!confirm(xe.lang.msg_delete_extend_form)) return;
|
||||
|
|
@ -135,7 +135,7 @@ jQuery(function($){
|
|||
$('#prohibited_id').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ids = ids.replace(/\n/g, ',');
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ jQuery(function($){
|
|||
$('#prohibited_nick_name').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ids = ids.replace(/\n/g, ',');
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ jQuery(function($){
|
|||
jQuery.exec_json('member.procMemberAdminUpdateDeniedNickName', {'nick_name': ids}, on_complete);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#userDefine').submit(function(e) {
|
||||
var id_list = $(this).find('input[name=join_form_id_list]').val();
|
||||
var id_list_arr = id_list.split(',');
|
||||
|
|
|
|||
|
|
@ -16,11 +16,13 @@
|
|||
<caption>
|
||||
<a href="{getUrl('filter_type', '', 'page', '')}" class="active"|cond="!$filter_type">{$lang->cmd_show_all_member}<block cond="!$filter_type">({$total_count})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('filter_type', 'super_admin', 'page', '')}" class="active"|cond="$filter_type=='super_admin'">{$lang->cmd_show_super_admin_member}<block cond="$filter_type=='super_admin'">({$total_count})</block></a>
|
||||
<a href="{getUrl('filter_type', 'admin', 'page', '')}" class="active"|cond="$filter_type=='admin'">{$lang->cmd_show_super_admin_member}<block cond="$filter_type=='admin'">({$total_count})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('filter_type', 'enable', 'page', '')}" class="active"|cond="$filter_type=='enable'">{$lang->approval}<block cond="$filter_type=='enable'">({$total_count})</block></a>
|
||||
<a href="{getUrl('filter_type', 'approved', 'page', '')}" class="active"|cond="$filter_type=='approved'">{$lang->approval}<block cond="$filter_type=='approved'">({$total_count})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('filter_type', 'disable', 'page', '')}" class="active"|cond="$filter_type=='disable'">{$lang->denied}<block cond="$filter_type=='disable'">({$total_count})</block></a>
|
||||
<a href="{getUrl('filter_type', 'denied', 'page', '')}" class="active"|cond="$filter_type=='denied'">{$lang->denied}<block cond="$filter_type=='denied'">({$total_count})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('filter_type', 'unauthed', 'page', '')}" class="active"|cond="$filter_type=='unauthed'">{$lang->member_unauthenticated}<block cond="$filter_type=='unauthed'">({$total_count})</block></a>
|
||||
<div class="x_pull-right x_btn-group">
|
||||
<a class="x_btn x_btn-inverse" href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->msg_new_member}</a>
|
||||
<a href="#listManager" data-value="modify" class="modalAnchor _member x_btn">{$lang->modify}</a>
|
||||
|
|
@ -76,16 +78,16 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowr">
|
||||
<!--@if($member_info['denied']=='Y')-->
|
||||
<!--@if(isset($new_member_check_list[$member_info['member_srl']]) && $new_member_check_list[$member_info['member_srl']])-->
|
||||
<span style="color:red;">{$lang->member_unauthenticated}</span>
|
||||
<!--@else-->
|
||||
<span style="color:red;">{$lang->denied}</span>
|
||||
<!--@endif-->
|
||||
<!--@if($member_info['status'] == 'APPROVED')-->
|
||||
{$lang->approval}
|
||||
<!--@elseif($member_info['status'] == 'DENIED')-->
|
||||
<span style="color:red;">{$lang->denied}</span>
|
||||
<!--@elseif($member_info['status'] == 'UNAUTHED')-->
|
||||
<span style="color:red;">{$lang->member_unauthenticated}</span>
|
||||
<!--@elseif($member_info['limit_date'] && substr($member_info['limit_date'], 0, 8) >= date('Ymd'))-->
|
||||
<span style="color:red;">{$lang->member_limited}</span>
|
||||
<!--@else-->
|
||||
{$lang->approval}
|
||||
<span style="color:red;">{$member_info['status']}</span>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowr rx_detail_marks" title="{zdate($member_info['regdate'], 'Y-m-d H:i:s')}<!--@if($member_info['ipaddress'])--> ({$member_info['ipaddress']})<!--@end-->">
|
||||
|
|
@ -119,7 +121,7 @@
|
|||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<ul>
|
||||
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
||||
|
||||
|
||||
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
|
||||
<li>
|
||||
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
||||
|
|
@ -129,12 +131,12 @@
|
|||
</span>
|
||||
</li>
|
||||
</block>
|
||||
|
||||
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
{@$last_page = $page_no}
|
||||
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
|
||||
|
||||
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
|
||||
<li>
|
||||
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
||||
|
|
@ -143,9 +145,9 @@
|
|||
<button type="submit" class="x_add-on">Go</button>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
|
||||
</block>
|
||||
|
||||
|
||||
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -106,9 +106,12 @@ $lang->site_default_skin_settings = 'Site default skin settings';
|
|||
$lang->install_other_skins = 'Install other themes';
|
||||
$lang->no_downloadable_item = 'There are no downloadable item.';
|
||||
$lang->confirm_sitemap_delete = 'Do you want to remove this sitemap?';
|
||||
$lang->confirm_menu_delete = 'Do you want to remove this menu item?';
|
||||
$lang->confirm_delete_all_contents = 'I understand that the contents will be deleted as well.';
|
||||
$lang->confirm_shortcut_delete = 'Do you want to remove this shortcut item?';
|
||||
$lang->confirm_menu_delete = 'Delete menu item?';
|
||||
$lang->confirm_menu_delete_desc = 'Would you like to delete all content belonging to this menu, such as posts, comments and files?';
|
||||
$lang->confirm_delete_not_contents = 'Only delete the menu item, and keep the content.';
|
||||
$lang->confirm_delete_all_contents = 'Delete all content.';
|
||||
$lang->confirm_shortcut_delete = 'Delete shortcut';
|
||||
$lang->confirm_shortcut_desc = 'The linked content will not be deleted.';
|
||||
$lang->confirm_delete_all_sub_items_title = 'The menu has sub-menu(s)';
|
||||
$lang->confirm_delete_all_sub_items = 'Do you want to delete all the sub-menu(s)?';
|
||||
$lang->confirm_delete_all_item = 'I know delete all menu of sitemap.';
|
||||
|
|
@ -129,4 +132,4 @@ $lang->skin_settings = 'Skin settings';
|
|||
$lang->no_use_skin = 'Will not use any skin';
|
||||
$lang->menu_desc = 'Description';
|
||||
$lang->menu_icon = 'Icon';
|
||||
$lang->about_menu_icon = 'If and how the icon code is interpreted is up to the layout designer.';
|
||||
$lang->about_menu_icon = 'If and how the icon code is interpreted is up to the layout designer.';
|
||||
|
|
|
|||
|
|
@ -113,9 +113,11 @@ $lang->install_other_skins = '다른 스킨 설치';
|
|||
$lang->no_downloadable_item = '다운로드 가능한 항목이 없습니다.';
|
||||
$lang->confirm_sitemap_delete = '사이트맵을 삭제 하겠습니까?';
|
||||
$lang->confirm_menu_delete = '메뉴를 삭제 하겠습니까?';
|
||||
$lang->confirm_delete_all_contents = '메뉴와 연결된 콘텐츠도 모두 삭제된다는 것을 이해하고 있습니다.';
|
||||
$lang->confirm_menu_delete_desc = '메뉴와 연결된 게시판, 페이지, 댓글, 첨부파일 등의 콘텐츠도 모두 삭제할까요?';
|
||||
$lang->confirm_delete_not_contents = '메뉴만 삭제하고 콘텐츠는 그대로 둡니다.';
|
||||
$lang->confirm_delete_all_contents = '콘텐츠도 모두 삭제합니다.';
|
||||
$lang->confirm_shortcut_delete = '바로가기를 삭제 하겠습니까?';
|
||||
$lang->confirm_shortcut_desc = '바로가기를 삭제해도 실제 메뉴는 지워지지 않습니다.';
|
||||
$lang->confirm_shortcut_desc = '바로가기를 삭제해도 연결된 콘텐츠는 지워지지 않습니다.';
|
||||
$lang->confirm_delete_all_sub_items_title = '하위 메뉴가 있습니다.';
|
||||
$lang->confirm_delete_all_sub_items = '하위 메뉴도 함께 삭제 하시겠습니까?';
|
||||
$lang->confirm_delete_all_item = '사이트맵에 포함된 메뉴 모두 삭제된다는 것을 이해하고 있습니다.';
|
||||
|
|
@ -146,4 +148,4 @@ $lang->no_skin = '스킨 없음';
|
|||
$lang->no_use_skin = '스킨 사용 안 함';
|
||||
$lang->menu_desc = '메뉴 설명';
|
||||
$lang->menu_icon = '메뉴 아이콘';
|
||||
$lang->about_menu_icon = '아이콘 코드를 어떻게 해석하는지는 레이아웃에 따라 다를 수 있습니다.';
|
||||
$lang->about_menu_icon = '아이콘 코드를 어떻게 해석하는지는 레이아웃에 따라 다를 수 있습니다.';
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class menuAdminController extends menu
|
|||
{
|
||||
$unlinked_modules = false;
|
||||
$args = new stdClass;
|
||||
$args->site_srl = 0;
|
||||
$args->menu_srl = 0;
|
||||
$output = executeQueryArray('module.getNotLinkedModuleBySiteSrl',$args);
|
||||
if($output->toBool() && $output->data)
|
||||
{
|
||||
|
|
@ -206,9 +206,7 @@ class menuAdminController extends menu
|
|||
$moduleInfo->menu_srl = $menuSrl;
|
||||
}
|
||||
|
||||
$output = executeQuery('module.updateModule', $moduleInfo);
|
||||
|
||||
return $output;
|
||||
ModuleController::getInstance()->updateModule($moduleInfo);
|
||||
}
|
||||
|
||||
Rhymix\Framework\Cache::clearGroup('site_and_module');
|
||||
|
|
@ -298,6 +296,7 @@ class menuAdminController extends menu
|
|||
function procMenuAdminDelete()
|
||||
{
|
||||
$menu_srl = Context::get('menu_srl');
|
||||
$delete_module = Context::get('delete_module') === 'Y';
|
||||
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$menuInfo = $oMenuAdminModel->getMenu($menu_srl);
|
||||
|
|
@ -338,7 +337,7 @@ class menuAdminController extends menu
|
|||
throw new Rhymix\Framework\Exception('msg_cannot_delete_homemenu');
|
||||
}
|
||||
|
||||
$output = $this->deleteMenu($menu_srl);
|
||||
$output = $this->deleteMenu($menu_srl, $delete_module);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
throw new Rhymix\Framework\Exception($output->message);
|
||||
|
|
@ -354,7 +353,7 @@ class menuAdminController extends menu
|
|||
* Delete menu_item and xml cache files
|
||||
* @return Object
|
||||
*/
|
||||
function deleteMenu($menu_srl)
|
||||
function deleteMenu($menu_srl, $delete_module = false)
|
||||
{
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
|
@ -365,25 +364,33 @@ class menuAdminController extends menu
|
|||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$menuInfo = $oMenuAdminModel->getMenu($args->menu_srl);
|
||||
|
||||
// Delete modules
|
||||
// Delete menu
|
||||
$output = executeQueryArray('menu.getMenuItems', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$oModuleController = getController('module');
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
// Delete linked module
|
||||
$oModuleController = ModuleController::getInstance();
|
||||
foreach($output->data as $itemInfo)
|
||||
{
|
||||
if($itemInfo->is_shortcut != 'Y' && strncasecmp('http', $itemInfo->url, 4) !== 0)
|
||||
if ($itemInfo->is_shortcut != 'Y' && strncasecmp('http', $itemInfo->url, 4) !== 0)
|
||||
{
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($itemInfo->url, $menuInfo->site_srl);
|
||||
if($moduleInfo->module_srl)
|
||||
$moduleInfo = ModuleModel::getModuleInfoByMid($itemInfo->url, $menuInfo->site_srl);
|
||||
if ($moduleInfo->module_srl)
|
||||
{
|
||||
$output = $oModuleController->onlyDeleteModule($moduleInfo->module_srl);
|
||||
if(!$output->toBool())
|
||||
if ($delete_module)
|
||||
{
|
||||
$output = $oModuleController->onlyDeleteModule($moduleInfo->module_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleInfo->menu_srl = 0;
|
||||
$output = $oModuleController->updateModule($moduleInfo);
|
||||
}
|
||||
|
||||
if (!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
|
|
@ -399,6 +406,7 @@ class menuAdminController extends menu
|
|||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Delete the menu
|
||||
$output = executeQuery("menu.deleteMenu", $args);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -407,6 +415,8 @@ class menuAdminController extends menu
|
|||
return $output;
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
// Delete cache files
|
||||
$cache_list = FileHandler::readDir("./files/cache/menu","",false,true);
|
||||
if(count($cache_list))
|
||||
|
|
@ -421,8 +431,6 @@ class menuAdminController extends menu
|
|||
$image_path = sprintf('./files/attach/menu_button/%d', $menu_srl);
|
||||
FileHandler::removeDir($image_path);
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
return new BaseObject(0,'success_deleted');
|
||||
}
|
||||
|
||||
|
|
@ -870,8 +878,9 @@ class menuAdminController extends menu
|
|||
$args->menu_srl = Context::get('menu_srl');
|
||||
$args->menu_item_srl = Context::get('menu_item_srl');
|
||||
$args->is_force = Context::get('is_force');
|
||||
$delete_module = Context::get('delete_module') === 'Y';
|
||||
|
||||
$returnObj = $this->deleteItem($args);
|
||||
$returnObj = $this->deleteItem($args, $delete_module);
|
||||
if(is_object($returnObj))
|
||||
{
|
||||
$this->setError($returnObj->error);
|
||||
|
|
@ -891,7 +900,7 @@ class menuAdminController extends menu
|
|||
* @args menu_srl, menu_item_srl, is_force
|
||||
* @return void|Object
|
||||
*/
|
||||
public function deleteItem($args)
|
||||
public function deleteItem($args, $delete_module = false)
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
|
|
@ -950,7 +959,7 @@ class menuAdminController extends menu
|
|||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$this->_recursiveDeleteMenuItem($oDB, $menuInfo, $originMenu);
|
||||
$this->_recursiveDeleteMenuItem($oDB, $menuInfo, $originMenu, $delete_module);
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
|
|
@ -980,11 +989,10 @@ class menuAdminController extends menu
|
|||
}
|
||||
}
|
||||
|
||||
private function _deleteMenuItem(&$oDB, &$menuInfo, $node)
|
||||
private function _deleteMenuItem(&$oDB, &$menuInfo, $node, $delete_module = false)
|
||||
{
|
||||
// Remove from the DB
|
||||
$args = new stdClass();
|
||||
$args->menu_srl = $menuSrl;
|
||||
$args->menu_item_srl = $node['node_srl'];
|
||||
$output = executeQuery("menu.deleteMenuItem", $args);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -1003,9 +1011,6 @@ class menuAdminController extends menu
|
|||
// Delete module
|
||||
if($node['is_shortcut'] != 'Y' && strncasecmp('http', $node['url'], 4) !== 0)
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
// reference menu's url modify
|
||||
$args->url = $node['url'];
|
||||
$args->site_srl = $menuInfo->site_srl;
|
||||
|
|
@ -1023,10 +1028,20 @@ class menuAdminController extends menu
|
|||
}
|
||||
}
|
||||
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($node['url'], $menuInfo->site_srl);
|
||||
$oModuleController = ModuleController::getInstance();
|
||||
$moduleInfo = ModuleModel::getModuleInfoByMid($node['url'], $menuInfo->site_srl);
|
||||
if($moduleInfo->module_srl)
|
||||
{
|
||||
$output = $oModuleController->onlyDeleteModule($moduleInfo->module_srl);
|
||||
if ($delete_module)
|
||||
{
|
||||
$output = $oModuleController->onlyDeleteModule($moduleInfo->module_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleInfo->menu_srl = 0;
|
||||
$output = $oModuleController->updateModule($moduleInfo);
|
||||
}
|
||||
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
|
|
@ -1037,9 +1052,9 @@ class menuAdminController extends menu
|
|||
return new BaseObject(0, 'success');
|
||||
}
|
||||
|
||||
private function _recursiveDeleteMenuItem(&$oDB, &$menuInfo, $node)
|
||||
private function _recursiveDeleteMenuItem(&$oDB, &$menuInfo, $node, $delete_module = false)
|
||||
{
|
||||
$output = $this->_deleteMenuItem($oDB, $menuInfo, $node);
|
||||
$output = $this->_deleteMenuItem($oDB, $menuInfo, $node, $delete_module);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
throw new Rhymix\Framework\Exception($output->message);
|
||||
|
|
@ -1049,7 +1064,7 @@ class menuAdminController extends menu
|
|||
{
|
||||
foreach($node['list'] AS $key=>$value)
|
||||
{
|
||||
$this->_recursiveDeleteMenuItem($oDB, $menuInfo, $value);
|
||||
$this->_recursiveDeleteMenuItem($oDB, $menuInfo, $value, $delete_module);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1136,6 +1151,7 @@ class menuAdminController extends menu
|
|||
{
|
||||
if(is_array($node))
|
||||
{
|
||||
$oModuleController = ModuleController::getInstance();
|
||||
foreach($node AS $key=>$node)
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
|
@ -1146,12 +1162,10 @@ class menuAdminController extends menu
|
|||
//module's menu_srl move also
|
||||
if($node['is_shortcut'] == 'N' && !empty($node['url']))
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($node['url']);
|
||||
$moduleInfo = ModuleModel::getModuleInfoByMid($node['url']);
|
||||
if($menu_srl != $moduleInfo->menu_srl)
|
||||
{
|
||||
$moduleInfo->menu_srl = $menu_srl;
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->updateModule($moduleInfo);
|
||||
}
|
||||
}
|
||||
|
|
@ -1493,12 +1507,11 @@ class menuAdminController extends menu
|
|||
//module's menu_srl move also
|
||||
if($isShortcut == 'N' && !empty($url))
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($url);
|
||||
$moduleInfo = ModuleModel::getModuleInfoByMid($url);
|
||||
if($menu_srl != $moduleInfo->menu_srl)
|
||||
{
|
||||
$moduleInfo->menu_srl = $menu_srl;
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController = ModuleController::getInstance();
|
||||
$output = $oModuleController->updateModule($moduleInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -713,6 +713,8 @@
|
|||
xe.lang.msg_url_is_required = '{$lang->msg_url_is_required}';
|
||||
xe.lang.confirm_sitemap_delete = '{$lang->confirm_sitemap_delete}';
|
||||
xe.lang.confirm_menu_delete = '{$lang->confirm_menu_delete}';
|
||||
xe.lang.confirm_menu_delete_desc = '{$lang->confirm_menu_delete_desc}';
|
||||
xe.lang.confirm_delete_not_contents = '{$lang->confirm_delete_not_contents}';
|
||||
xe.lang.confirm_delete_all_contents = '{$lang->confirm_delete_all_contents}';
|
||||
xe.lang.confirm_shortcut_delete = '{$lang->confirm_shortcut_delete}';
|
||||
xe.lang.confirm_shortcut_desc = '{$lang->confirm_shortcut_desc}';
|
||||
|
|
@ -1922,7 +1924,7 @@ jQuery(function($){
|
|||
params['is_shortcut'] = isShortCut;
|
||||
params['parent_srl'] = sSelectedMenuSrl;
|
||||
params[sTargetKey] = sUrl;
|
||||
|
||||
|
||||
$.exec_json("menu.procMenuAdminInsertItem", params, function(htData){
|
||||
// select the newly created menu
|
||||
//$._xeAdminVar.sSelectOnload = htData.menu_item_srl;
|
||||
|
|
@ -3440,10 +3442,11 @@ jQuery(function($){
|
|||
scrollToRight();
|
||||
});
|
||||
|
||||
function doDelete(sMenuSrl, bForce, sSelectOnload){
|
||||
function doDelete(sMenuSrl, bForce, sSelectOnload, deleteModule){
|
||||
var params = {
|
||||
menu_item_srl : sMenuSrl,
|
||||
is_force : bForce ? 'Y' : 'N'
|
||||
is_force : bForce ? 'Y' : 'N',
|
||||
delete_module : deleteModule ? deleteModule : 'N'
|
||||
};
|
||||
|
||||
$.exec_json("menu.procMenuAdminDeleteItem", params, function(htData){
|
||||
|
|
@ -3458,7 +3461,7 @@ jQuery(function($){
|
|||
bDanger : true,
|
||||
|
||||
fnOnOK : function(){
|
||||
doDelete(sMenuSrl, true, sSelectOnload);
|
||||
doDelete(sMenuSrl, true, sSelectOnload, deleteModule);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -3483,46 +3486,29 @@ jQuery(function($){
|
|||
if(htInfo.is_shortcut == 'Y')
|
||||
{
|
||||
tmpTitle = xe.lang.confirm_shortcut_delete;
|
||||
tmpText = xe.lang.confirm_shortcut_desc;
|
||||
tmpText = '<p>' + xe.lang.confirm_shortcut_desc + '</p>';
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpTitle = xe.lang.confirm_menu_delete;
|
||||
tmpText = xe.lang.confirm_delete_all_contents;
|
||||
tmpText = '<p>' + xe.lang.confirm_menu_delete_desc + '</p>' +
|
||||
'<p><label><input type="radio" name="delete_module" value="N" checked="checked"> ' + xe.lang.confirm_delete_not_contents + '</label>' +
|
||||
'<label><input type="radio" name="delete_module" value="Y"> ' + xe.lang.confirm_delete_all_contents + '</label></p>';
|
||||
}
|
||||
|
||||
$.xeMsgBox.confirmDialog({
|
||||
sTitle : tmpTitle,
|
||||
|
||||
sText : '<label><input type="checkbox"> ' + tmpText + '</label>',
|
||||
sText : tmpText,
|
||||
|
||||
bDanger : true,
|
||||
|
||||
fnOnOK : function(){
|
||||
if(!$.xeMsgBox.$msgBox.find('input[type="checkbox"]').attr('checked')) return true;
|
||||
|
||||
var sSelectedMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
|
||||
|
||||
var sParentSrl = htNodeInfo[sSelectedMenuSrl].parent_srl;
|
||||
|
||||
doDelete(sSelectedMenuSrl, false, sParentSrl);
|
||||
var deleteModule = $.xeMsgBox.$msgBox.find('input[type="radio"]:checked').val();
|
||||
doDelete(sSelectedMenuSrl, false, sParentSrl, deleteModule);
|
||||
},
|
||||
|
||||
fnOnShow : function(){
|
||||
$.xeMsgBox.$msgBox.find("._ok").addClass("x_disabled");
|
||||
|
||||
$.xeMsgBox.$msgBox.find('input[type="checkbox"]').click(function(){
|
||||
if($(this).attr('checked')){
|
||||
$.xeMsgBox.$msgBox.find("._ok").removeClass("x_disabled");
|
||||
}else{
|
||||
$.xeMsgBox.$msgBox.find("._ok").addClass("x_disabled");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
fnOnHide : function(){
|
||||
$.xeMsgBox.$msgBox.find("._ok").removeClass("x_disabled");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue