feat: GTSIT 사이트 구축
This commit is contained in:
1
app/Views/admin/company.php
Normal file
1
app/Views/admin/company.php
Normal file
@@ -0,0 +1 @@
|
||||
<header class="admin-page-heading"><div><span>SETTINGS</span><h1>회사 정보</h1><p>저장한 정보는 공개 화면의 연락처와 사업자 정보에 반영됩니다.</p></div></header><?php if ($errors): ?><div class="admin-error" role="alert"><ul><?php foreach($errors as $error): ?><li><?= e($error) ?></li><?php endforeach; ?></ul></div><?php endif; ?><form class="admin-form" method="post" action="/admin/company"><?= csrf_field() ?><div class="admin-field-grid"><label>법인명<input name="legal_name" value="<?= old('legal_name',$settings['legal_name']) ?>" required maxlength="120"></label><label>대표자<input name="ceo" value="<?= old('ceo',$settings['ceo']) ?>" maxlength="100"></label></div><div class="admin-field-grid"><label>대표번호<input name="phone" value="<?= old('phone',$settings['phone']) ?>" required maxlength="30"></label><label>지점번호<input name="phone_sub" value="<?= old('phone_sub',$settings['phone_sub']) ?>" maxlength="30"></label></div><div class="admin-field-grid"><label>FAX<input name="fax" value="<?= old('fax',$settings['fax']) ?>" maxlength="30"></label><label>이메일<input type="email" name="email" value="<?= old('email',$settings['email']) ?>" maxlength="190"></label></div><label>주소<input name="address" value="<?= old('address',$settings['address']) ?>" maxlength="255"></label><div class="admin-field-grid"><label>사업자등록번호<input name="bizno" value="<?= old('bizno',$settings['bizno']) ?>" maxlength="30"></label><label>영업시간<input name="business_hours" value="<?= old('business_hours',$settings['business_hours']) ?>" maxlength="120"></label></div><button class="button button-primary" type="submit">회사 정보 저장</button></form>
|
||||
1
app/Views/admin/dashboard.php
Normal file
1
app/Views/admin/dashboard.php
Normal file
@@ -0,0 +1 @@
|
||||
<header class="admin-page-heading"><div><span>OVERVIEW</span><h1>대시보드</h1><p>사이트 콘텐츠와 문의 현황입니다.</p></div></header><section class="metric-grid" aria-label="운영 현황"><a href="/admin/posts"><span>전체 글</span><strong><?= e($counts['posts']) ?></strong></a><a href="/admin/posts"><span>공개 글</span><strong><?= e($counts['published']) ?></strong></a><a href="/admin/inquiries"><span>전체 문의</span><strong><?= e($counts['inquiries']) ?></strong></a><a href="/admin/inquiries"><span>처리 대기</span><strong><?= e($counts['pending']) ?></strong></a></section>
|
||||
1
app/Views/admin/inquiries/index.php
Normal file
1
app/Views/admin/inquiries/index.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php $labels=['pending'=>'대기','in_progress'=>'확인 중','replied'=>'답변 완료','closed'=>'종료']; ?><header class="admin-page-heading"><div><span>INQUIRIES</span><h1>문의 관리</h1><p>접수된 상담과 처리 상태를 확인합니다.</p></div></header><?php if ($inquiries): ?><div class="inquiry-admin-list"><?php foreach ($inquiries as $item): ?><article><div><span class="status status-<?= e($item['status']) ?>"><?= e($labels[$item['status']] ?? $item['status']) ?></span><small><?= e($item['ticket']) ?></small></div><h2><a href="/admin/inquiries/<?= e($item['id']) ?>"><?= e($item['title']) ?></a></h2><p><?= e($item['name']) ?> · <?= e($item['phone']) ?> · <?= e(date('Y.m.d H:i', strtotime($item['created_at']))) ?></p></article><?php endforeach; ?></div><?php else: ?><div class="empty-state"><h2>접수된 문의가 없습니다</h2><p>온라인 상담 문의가 등록되면 이곳에 표시됩니다.</p></div><?php endif; ?>
|
||||
1
app/Views/admin/inquiries/show.php
Normal file
1
app/Views/admin/inquiries/show.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php $labels=['pending'=>'대기','in_progress'=>'확인 중','replied'=>'답변 완료','closed'=>'종료']; ?><a class="back-link" href="/admin/inquiries">← 문의 목록</a><header class="admin-page-heading inquiry-heading"><div><span><?= e($inquiry['ticket']) ?></span><h1><?= e($inquiry['title']) ?></h1><p><?= e(date('Y.m.d H:i', strtotime($inquiry['created_at']))) ?> 접수</p></div></header><div class="inquiry-detail-grid"><article class="inquiry-content"><div class="contact-summary"><span><?= e($labels[$inquiry['status']] ?? $inquiry['status']) ?></span><p><strong><?= e($inquiry['name']) ?></strong><br><?= e($inquiry['phone']) ?><?php if ($inquiry['email']): ?><br><?= e($inquiry['email']) ?><?php endif; ?></p></div><h2>문의 내용</h2><p><?= nl2br(e($inquiry['body'])) ?></p></article><form class="admin-form reply-form" method="post" action="/admin/inquiries/<?= e($inquiry['id']) ?>"><?= csrf_field() ?><h2>처리 및 답변</h2><label>처리 상태<select name="status"><?php foreach($labels as $value=>$label): ?><option value="<?= e($value) ?>"<?= $inquiry['status']===$value?' selected':'' ?>><?= e($label) ?></option><?php endforeach; ?></select></label><label>고객 공개 답변<textarea name="reply" rows="10" maxlength="5000"><?= e($inquiry['reply'] ?? '') ?></textarea><small>저장한 답변은 고객의 문의 조회 화면에 표시됩니다.</small></label><button class="button button-primary" type="submit">처리 내용 저장</button></form></div>
|
||||
15
app/Views/admin/login.php
Normal file
15
app/Views/admin/login.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<section class="login-panel">
|
||||
<div class="login-heading">
|
||||
<img class="login-logo" src="<?= e(asset('images/company-logo-v3.png')) ?>" alt="" width="112" height="52">
|
||||
<h1>관리자 로그인</h1>
|
||||
<p>콘텐츠와 문의를 관리하려면 로그인해 주세요.</p>
|
||||
</div>
|
||||
<?php if (!empty($notice)): ?><p class="admin-notice" role="status"><?= e($notice) ?></p><?php endif; ?>
|
||||
<?php if ($error): ?><p class="admin-error" role="alert"><?= e($error) ?></p><?php endif; ?>
|
||||
<form method="post" action="/admin/login">
|
||||
<?= csrf_field() ?>
|
||||
<label>아이디<input name="username" value="<?= e($username) ?>" required maxlength="80" autocomplete="username"></label>
|
||||
<label>비밀번호<input type="password" name="password" required maxlength="200" autocomplete="current-password"></label>
|
||||
<button class="button button-primary button-full" type="submit">로그인</button>
|
||||
</form>
|
||||
</section>
|
||||
23
app/Views/admin/posts/form.php
Normal file
23
app/Views/admin/posts/form.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<header class="admin-page-heading">
|
||||
<div><span>CONTENTS</span><h1><?= $post ? '글 수정' : '새 글 작성' ?></h1><p>초안으로 저장하거나 공개 상태로 게시합니다.</p></div>
|
||||
</header>
|
||||
<?php if ($errors): ?><div class="admin-error" role="alert"><strong>입력 내용을 확인해 주세요.</strong><ul><?php foreach ($errors as $error): ?><li><?= e($error) ?></li><?php endforeach; ?></ul></div><?php endif; ?>
|
||||
<form class="admin-form" method="post" enctype="multipart/form-data" action="<?= $post ? '/admin/posts/' . e($post['id']) . '/edit' : '/admin/posts/new' ?>">
|
||||
<?= csrf_field() ?>
|
||||
<label>제목 <span>*</span><input name="title" value="<?= old('title', $post['title'] ?? '') ?>" required maxlength="200"></label>
|
||||
<div class="admin-field-grid">
|
||||
<label>URL slug <span>*</span><input name="slug" value="<?= old('slug', $post['slug'] ?? '') ?>" required maxlength="220" pattern="[a-z0-9-]+" placeholder="office-network-checklist"><small>영문 소문자, 숫자, 하이픈만 사용</small></label>
|
||||
<label>카테고리<select name="category"><?php $currentCategory=$_POST['category']??$post['category']??'네트워크'; foreach(['네트워크','키폰시스템','CCTV','시공사례'] as $option): ?><option<?= $currentCategory===$option?' selected':'' ?>><?= e($option) ?></option><?php endforeach; ?></select></label>
|
||||
</div>
|
||||
<label>목록 요약<textarea name="excerpt" rows="3" maxlength="500"><?= old('excerpt', $post['excerpt'] ?? '') ?></textarea></label>
|
||||
<fieldset class="admin-upload-field">
|
||||
<legend>대표 이미지</legend>
|
||||
<?php if (!empty($post['image_path'])): ?><img src="<?= e($post['image_path']) ?>" alt="<?= e($post['image_alt']) ?>"><p>새 파일을 선택하면 현재 대표 이미지가 교체됩니다.</p><?php endif; ?>
|
||||
<label>이미지 파일<input type="file" name="image" accept="image/jpeg,image/png,image/webp"><small>JPG, PNG, WebP · 최대 8MB · 최대 6000×6000px</small></label>
|
||||
<label>대체 텍스트<input name="image_alt" value="<?= old('image_alt', $post['image_alt'] ?? '') ?>" maxlength="255"><small>이미지 내용을 간단히 설명합니다. 이미지를 등록할 때 필수입니다.</small></label>
|
||||
</fieldset>
|
||||
<label>본문 <span>*</span><textarea name="body" rows="16" required><?= old('body', $post['body'] ?? '') ?></textarea><small>빈 줄을 기준으로 문단이 구분됩니다.</small></label>
|
||||
<div class="admin-field-grid"><label>작성자<input name="author" value="<?= old('author', $post['author'] ?? config('app.legal_name')) ?>" maxlength="100"></label><label>공개 상태<select name="status"><option value="draft"<?= ($_POST['status']??$post['status']??'draft')==='draft'?' selected':'' ?>>초안</option><option value="published"<?= ($_POST['status']??$post['status']??'draft')==='published'?' selected':'' ?>>공개</option></select></label></div>
|
||||
<div class="admin-form-actions"><button class="button button-primary" type="submit">저장하기</button><a class="button button-secondary" href="/admin/posts">취소</a></div>
|
||||
</form>
|
||||
<?php if ($post): ?><form class="danger-zone" method="post" action="/admin/posts/<?= e($post['id']) ?>/delete" onsubmit="return confirm('이 글을 삭제할까요? 삭제 후 목록에 표시되지 않습니다.');"><?= csrf_field() ?><div><strong>글 삭제</strong><p>게시글을 복구 가능한 삭제 상태로 전환합니다.</p></div><button type="submit">삭제</button></form><?php endif; ?>
|
||||
1
app/Views/admin/posts/index.php
Normal file
1
app/Views/admin/posts/index.php
Normal file
@@ -0,0 +1 @@
|
||||
<header class="admin-page-heading"><div><span>CONTENTS</span><h1>글 관리</h1><p>블로그 글을 작성하고 공개 상태를 관리합니다.</p></div><a class="button button-primary" href="/admin/posts/new">새 글 작성</a></header><?php if ($posts): ?><div class="admin-table-wrap"><table class="admin-table"><thead><tr><th>제목</th><th>분류</th><th>상태</th><th>공개일</th><th>관리</th></tr></thead><tbody><?php foreach ($posts as $post): ?><tr><td data-label="제목"><strong><?= e($post['title']) ?></strong><small>/blog/<?= e($post['slug']) ?></small></td><td data-label="분류"><?= e($post['category']) ?></td><td data-label="상태"><span class="status status-<?= e($post['status']) ?>"><?= $post['status'] === 'published' ? '공개' : '초안' ?></span></td><td data-label="공개일"><?= $post['published_at'] ? e(date('Y.m.d', strtotime($post['published_at']))) : '-' ?></td><td data-label="관리"><a href="/admin/posts/<?= e($post['id']) ?>/edit">수정</a></td></tr><?php endforeach; ?></tbody></table></div><?php else: ?><div class="empty-state"><h2>등록된 글이 없습니다</h2><p>새 글을 작성해 콘텐츠를 추가해 주세요.</p></div><?php endif; ?>
|
||||
16
app/Views/admin/setup.php
Normal file
16
app/Views/admin/setup.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<section class="login-panel">
|
||||
<div class="login-heading">
|
||||
<img class="login-logo" src="<?= e(asset('images/company-logo-v3.png')) ?>" alt="" width="112" height="52">
|
||||
<h1>관리자 계정 등록</h1>
|
||||
<p>비밀번호는 서버에 안전하게 해시하여 저장됩니다.</p>
|
||||
</div>
|
||||
<?php if ($errors): ?><div class="admin-error" role="alert"><ul><?php foreach ($errors as $error): ?><li><?= e($error) ?></li><?php endforeach; ?></ul></div><?php endif; ?>
|
||||
<form method="post" action="/admin/setup">
|
||||
<?= csrf_field() ?>
|
||||
<label>관리자 아이디<input value="<?= e($username) ?>" readonly></label>
|
||||
<label>표시 이름<input name="display_name" value="<?= old('display_name', $displayName) ?>" required maxlength="100" autocomplete="name"></label>
|
||||
<label>비밀번호<input type="password" name="password" required minlength="12" maxlength="72" autocomplete="new-password"><small>영문과 숫자를 포함한 12자 이상</small></label>
|
||||
<label>비밀번호 확인<input type="password" name="password_confirmation" required minlength="12" maxlength="72" autocomplete="new-password"></label>
|
||||
<button class="button button-primary button-full" type="submit">관리자 계정 만들기</button>
|
||||
</form>
|
||||
</section>
|
||||
Reference in New Issue
Block a user