2026-03-26 15:29:55 +09:00
<! DOCTYPE html >
< html lang = " ko " >
< head >
< meta charset = " utf-8 " />
< meta content = " width=device-width, initial-scale=1.0 " name = " viewport " />
2026-04-08 00:23:21 +09:00
< title > 2 차 인증 등록 - 종량제 시스템 </ title >
2026-03-26 15:29:55 +09:00
< script src = " https://cdn.tailwindcss.com?plugins=forms,container-queries " ></ script >
< link href = " https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap " rel = " stylesheet " />
< script >
tailwind . config = {
theme : {
extend : {
fontFamily : { sans : [ '"Malgun Gothic"' , '"Noto Sans KR"' , 'sans-serif' ] },
colors : {
'title-bar' : '#2c3e50' ,
'control-panel' : '#f8f9fa' ,
'btn-search' : '#1c4e80' ,
}
}
}
}
</ script >
< style > body { - webkit - font - smoothing : antialiased ; - moz - osx - font - smoothing : grayscale ; } </ style >
</ head >
< body class = " bg-gray-100 text-gray-800 flex flex-col min-h-screen font-sans antialiased " >
< header class = " bg-white border-b border-gray-300 h-12 flex items-center px-4 shrink-0 " >
2026-04-08 00:23:21 +09:00
< ? = view ( 'components/header_brand' ) ?>
2026-03-26 15:29:55 +09:00
</ header >
< div class = " bg-title-bar text-white px-4 py-2 text-sm font-medium shrink-0 " >
2 차 인증 앱 등록
</ div >
< ? php if ( session () -> getFlashdata ( 'error' )) : ?>
< div class = " mx-4 mt-2 p-3 rounded-lg bg-red-50 text-red-700 text-sm " role = " alert " >< ? = esc ( session () -> getFlashdata ( 'error' )) ?> </div>
< ? php endif ; ?>
< ? php if ( session () -> getFlashdata ( 'errors' )) : ?>
< div class = " mx-4 mt-2 p-3 rounded-lg bg-red-50 text-red-700 text-sm space-y-1 " role = " alert " >
< ? php foreach ( session () -> getFlashdata ( 'errors' ) as $error ) : ?> <p><?= esc($error) ?></p><?php endforeach; ?>
</ div >
< ? php endif ; ?>
< main class = " flex-grow bg-control-panel border-b border-gray-300 p-6 flex items-center justify-center " >
< section class = " w-full max-w-lg bg-white border border-gray-300 rounded shadow-sm p-6 space-y-4 " >
< p class = " text-sm text-gray-600 " > 관리자 계정 < strong class = " text-gray-800 " >< ? = esc ( $memberId ) ?> </strong> 에 Google Authenticator, Microsoft Authenticator 등으로 아래 시크릿 또는 QR을 등록한 뒤, 표시되는 6자리 코드를 입력해 주세요.</p>
< ? php if ( ! empty ( $qrDataUri )) : ?>
< div class = " flex justify-center " >
< img src = " <?= esc( $qrDataUri , 'attr') ?> " alt = " TOTP QR 코드 " class = " border border-gray-200 rounded max-w-[200px] h-auto " />
</ div >
< ? php else : ?>
< p class = " text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded p-2 " > QR 이미지를 불러올 수 없습니다 . 아래 시크릿을 앱에 직접 입력해 주세요 .</ p >
< ? php endif ; ?>
< div >
< span class = " block text-xs font-semibold text-gray-500 mb-1 " > 수동 입력용 시크릿 </ span >
< code class = " block text-sm bg-gray-100 border border-gray-200 rounded px-3 py-2 break-all select-all " >< ? = esc ( $secret ) ?> </code>
</ div >
< form action = " <?= base_url('login/totp-setup') ?> " method = " POST " class = " space-y-4 pt-2 border-t border-gray-200 " >
< ? = csrf_field () ?>
< div >
< label class = " block text-sm font-bold text-gray-700 mb-1 " for = " totp_code " > 확인용 인증 코드 </ label >
< input class = " block w-full border border-gray-300 rounded px-3 py-2 text-sm tracking-widest focus:ring-blue-500 focus:border-blue-500 " id = " totp_code " name = " totp_code " type = " text " inputmode = " numeric " pattern = " [0-9]* " maxlength = " 6 " autocomplete = " one-time-code " autofocus placeholder = " 000000 " value = " <?= esc(old('totp_code')) ?> " />
</ div >
< div class = " flex gap-2 " >
< button type = " submit " class = " bg-btn-search text-white px-4 py-2 rounded-sm text-sm font-medium shadow hover:opacity-90 transition border border-transparent " > 등록 완료 </ button >
< a href = " <?= base_url('login') ?> " class = " bg-white text-gray-700 border border-gray-300 px-4 py-2 rounded-sm text-sm shadow hover:bg-gray-50 transition " > 취소 </ a >
</ div >
</ form >
</ section >
</ main >
2026-04-08 00:23:21 +09:00
< footer class = " bg-gray-200 border-t border-gray-300 px-4 py-1 text-xs text-gray-600 shrink-0 " > 종량제 시스템 </ footer >
2026-03-26 15:29:55 +09:00
</ body >
</ html >