mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Implement login management screen in default member skin
This commit is contained in:
parent
59c3fa1381
commit
8afddb8b5e
8 changed files with 108 additions and 1 deletions
|
|
@ -16,6 +16,7 @@
|
|||
<action name="dispMemberOwnDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberScrappedDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberSavedDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberActiveLogins" type="view" standalone="true" />
|
||||
<action name="dispMemberFindAccount" type="view" standalone="true" />
|
||||
<action name="dispMemberGetTempPassword" type="view" standalone="true" />
|
||||
<action name="dispMemberResendAuthMail" type="view" standalone="true" />
|
||||
|
|
@ -62,6 +63,7 @@
|
|||
<action name="procMemberDeleteScrap" type="controller" standalone="true" />
|
||||
<action name="procMemberSaveDocument" type="controller" standalone="true" />
|
||||
<action name="procMemberDeleteSavedDocument" type="controller" standalone="true" />
|
||||
<action name="procMemberDeleteAutologin" type="controller" standalone="true" />
|
||||
|
||||
<action name="procMemberFindAccount" type="controller" method="GET|POST" ruleset="findAccount" standalone="true" />
|
||||
<action name="procMemberFindAccountByQuestion" type="controller" method="GET|POST" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ $lang->cmd_manage_email_host = 'E-mail provider check';
|
|||
$lang->cmd_manage_nick_name = 'Prohibited NickNames';
|
||||
$lang->cmd_manage_form = 'Signup Form';
|
||||
$lang->cmd_view_own_document = 'Written Articles';
|
||||
$lang->cmd_view_active_logins = 'Active Logins';
|
||||
$lang->cmd_manage_member_info = 'Manage Member Info';
|
||||
$lang->cmd_trace_document = 'Trace Written Articles';
|
||||
$lang->cmd_trace_comment = 'Trace Written Comments';
|
||||
|
|
@ -297,3 +298,6 @@ $lang->spammer_description = '<p>Spam user management. This function denied user
|
|||
$lang->btn_spammer_delete_all = 'Delete all';
|
||||
$lang->spammer_move_to_trash = 'Move to trash';
|
||||
$lang->msg_spammer_complete = 'Completed.';
|
||||
$lang->cmd_login_browser_info = 'Browser Information';
|
||||
$lang->cmd_initial_login = 'First Login';
|
||||
$lang->cmd_recent_visit = 'Recent Visit';
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ $lang->cmd_manage_email_host = '이메일 제공자 관리';
|
|||
$lang->cmd_manage_nick_name = '금지 닉네임 관리';
|
||||
$lang->cmd_manage_form = '가입 폼 관리';
|
||||
$lang->cmd_view_own_document = '작성 글 보기';
|
||||
$lang->cmd_view_active_logins = '로그인 관리';
|
||||
$lang->cmd_manage_member_info = '회원 정보 관리';
|
||||
$lang->cmd_trace_document = '작성글 추적';
|
||||
$lang->cmd_trace_comment = '작성 댓글 추적';
|
||||
|
|
@ -317,3 +318,6 @@ $lang->spammer_move_to_trash = '휴지통으로 이동';
|
|||
$lang->msg_spammer_complete = '완료되었습니다.';
|
||||
$lang->nick_name_before_changing = '닉네임 변경 전';
|
||||
$lang->nick_name_after_changing = '닉네임 변경 후';
|
||||
$lang->cmd_login_browser_info = '브라우저 정보';
|
||||
$lang->cmd_initial_login = '최초 로그인';
|
||||
$lang->cmd_recent_visit = '최근 방문';
|
||||
|
|
|
|||
|
|
@ -205,6 +205,32 @@ class memberController extends member
|
|||
$oDocumentController->deleteDocument($document_srl, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an autologin
|
||||
*/
|
||||
function procMemberDeleteAutologin()
|
||||
{
|
||||
// Check login information
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$autologin_id = intval(Context::get('autologin_id'));
|
||||
$autologin_key = Context::get('autologin_key');
|
||||
|
||||
$args = new stdClass;
|
||||
$args->autologin_id = $autologin_id;
|
||||
$args->autologin_key = $autologin_key;
|
||||
$output = executeQueryArray('member.getAutologin', $args);
|
||||
if ($output->toBool() && $output->data)
|
||||
{
|
||||
$autologin_info = array_first($output->data);
|
||||
if ($autologin_info->member_srl == $logged_info->member_srl)
|
||||
{
|
||||
executeQuery('member.deleteAutologin', $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check values when member joining
|
||||
*
|
||||
|
|
@ -1906,6 +1932,7 @@ class memberController extends member
|
|||
$this->addMemberMenu( 'dispMemberScrappedDocument', 'cmd_view_scrapped_document');
|
||||
$this->addMemberMenu( 'dispMemberSavedDocument', 'cmd_view_saved_document');
|
||||
$this->addMemberMenu( 'dispMemberOwnDocument', 'cmd_view_own_document');
|
||||
$this->addMemberMenu( 'dispMemberActiveLogins', 'cmd_view_active_logins');
|
||||
if($config->update_nickname_log == 'Y')
|
||||
{
|
||||
$this->addMemberMenu( 'dispMemberModifyNicknameLog', 'cmd_modify_nickname_log');
|
||||
|
|
|
|||
|
|
@ -430,6 +430,30 @@ class memberView extends member
|
|||
$this->setTemplateFile('saved_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display the login management page
|
||||
*/
|
||||
function dispMemberActiveLogins()
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->page = (int)Context::get('page');
|
||||
$output = executeQueryArray('member.getAutologin', $args);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('active_logins', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('active_logins');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display the login form
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member.member_srl" var="member_autologin.member_srl" />
|
||||
<condition operation="equal" column="member_autologin.id" var="autologin_id" pipe="and" />
|
||||
<condition operation="equal" column="member_autologin.autologin_key" var="autologin_key" pipe="and" />
|
||||
<condition operation="equal" column="member_autologin.member_srl" var="member_srl" pipe="and" />
|
||||
</conditions>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<table name="member_autologin">
|
||||
<column name="id" type="number" primary_key="primary_key" auto_increment="auto_increment" />
|
||||
<column name="autologin_key" type="varchar" size="80" notnull="notnull" index="idx_autologin_key" />
|
||||
<column name="autologin_key" type="varchar" size="80" notnull="notnull" unique="unique_autologin_key" />
|
||||
<column name="security_key" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="member_srl" type="number" notnull="notnull" index="idx_member_srl" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
|
|
|
|||
45
modules/member/skins/default/active_logins.html
Normal file
45
modules/member/skins/default/active_logins.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<include target="./common_header.html" />
|
||||
<h1>{$member_title = $lang->cmd_view_active_logins }</h1>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lang->no}</th>
|
||||
<th class="title">{$lang->cmd_login_browser_info}</th>
|
||||
<th>{$lang->cmd_initial_login}</th>
|
||||
<th>{$lang->cmd_recent_visit}</th>
|
||||
<th>{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr loop="$active_logins => $no, $autologin_info">
|
||||
{@ $autologin_info->user_agent = @json_decode($autologin_info->user_agent) ?: new stdClass()}
|
||||
<td>{$no}</td>
|
||||
<td class="title">
|
||||
{$autologin_info->user_agent->browser} {$autologin_info->user_agent->version}<br />
|
||||
{$autologin_info->user_agent->os} {$autologin_info->user_agent->is_tablet ? 'Tablet' : ($autologin_info->user_agent->is_mobile ? 'Mobile' : 'PC')}
|
||||
</td>
|
||||
<td>{zdate($autologin_info->regdate, 'Y-m-d H:i')}<br />{$autologin_info->ipaddress}</td>
|
||||
<td>{zdate($autologin_info->last_visit, 'Y-m-d H:i')}<br />{$autologin_info->last_ipaddress}</td>
|
||||
<td><button class="delele_autologin" data-autologin-id="{$autologin_info->id}" data-autologin-key="{$autologin_info->autologin_key}">{$lang->cmd_delete}</button>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination pagination-centered">
|
||||
<ul>
|
||||
<li><a href="{getUrl('page','','module_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,'module_srl','')}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
<li><a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$("button.delele_autologin").on("click", function() {
|
||||
exec_json('member.procMemberDeleteAutologin', { autologin_id: $(this).data("autologin-id"), autologin_key: $(this).data("autologin-key") }, function(data) {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<include target="./common_footer.html" />
|
||||
Loading…
Add table
Add a link
Reference in a new issue