<link href="/css/admin/member_link.css" media="screen" rel="stylesheet" type="text/css" />
<ul class="member-link navbar-nav me-auto mb-2 mb-lg-0">
  <li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-fast-forward" aria-hidden="true"></i>Quick Link</a>
    <ul class="dropdown-menu">
      <li><a href="/admin/cloudflare/zone"><i class="fa fa-comment"></i>Zone관리</a></li>
      <li>
        <a href="#" data-bs-toggle="modal" data-bs-target="#CustomerModal">
          <i class="fa fa-comment"></i>고객용 도메인
        </a>
      </li>
    </ul>
  </li>
  <li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-id-card"></i></i><?= $session->get('name') ?></a>
    <ul class="dropdown-menu dropdown-menu-end">
      <li><a href="/admin/user/update/<?= $session->get('uid') ?>"><i class="fa fa-cog"></i>내정보수정</a></li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li><a href="/logout"><i class="fa fa-sign-out" aria-hidden="true"></i>Logout</a></li>
    </ul>
  </li>
</ul>
<!-- Modal -->
<div class="modal fade" id="CustomerModal" tabindex="-1" aria-labelledby="CustomerModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="CustomerModalLabel">고객용 도메인</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <table class="table table-bordered">
          <tr>
            <td>ziensys@cf-prime.com(지앤시스) </td>
            <td class="dnsname" onclick="copyToClipboard2(this,'frida.ns.cloudflare.com')">frida.ns.cloudflare.com</td>
            <td class="dnsname" onclick="copyToClipboard2(this,'lex.ns.cloudflare.com');">lex.ns.cloudflare.com</td>
          </tr>
          <tr>
            <td>inpotech@cf-prime.com(인포텍)</td>
            <td class="dnsname" onclick="copyToClipboard2(this,'priscilla.ns.cloudflare.com');">priscilla.ns.cloudflare.com</td>
            <td class="dnsname" onclick="copyToClipboard2(this,'yichun.ns.cloudflare.com');">yichun.ns.cloudflare.com</td>
          </tr>
        </table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
<script>
  function copyToClipboard2(element, domain) {
    navigator.clipboard.writeText(domain);
    element.style.backgroundColor = '#fde9bf';
  }
</script>
<!-- Modal -->