1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta content="width=device-width, initial-scale=1.0" name="viewport">
- <title>Ark Cards</title>
- <meta content="" name="description">
- <meta content="" name="keywords">
- <!-- Favicons -->
- <link href="assets/img/favicon.png" rel="icon">
- <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
- <!-- Google Fonts -->
- <link href="https://fonts.gstatic.com" rel="preconnect">
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
- <!-- Vendor CSS Files -->
- <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
- <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
- <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
- <link href="assets/vendor/quill/quill.snow.css" rel="stylesheet">
- <link href="assets/vendor/quill/quill.bubble.css" rel="stylesheet">
- <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
- <link href="assets/vendor/simple-datatables/style.css" rel="stylesheet">
- <!-- Template Main CSS File -->
- <link href="assets/css/style.css" rel="stylesheet">
- <!-- Ark Cards -->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
- <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
- <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
- <!-- =======================================================
- * Template Name: NiceAdmin - v2.2.0
- * Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
- * Author: BootstrapMade.com
- * License: https://bootstrapmade.com/license/
- ======================================================== -->
- </head>
- <body>
- <!-- ======= Header ======= -->
- <header id="header" class="header fixed-top d-flex align-items-center">
- <div class="d-flex align-items-center justify-content-between">
- <a href="index.html" class="logo d-flex align-items-center">
- <!-- <img src="assets/img/logo.png" alt=""> -->
- <img src="assets/img/ark_logo.png" alt="Ark Cards">
- <span class="d-none d-lg-block">Ark Cards</span>
- </a>
- <i class="bi bi-list toggle-sidebar-btn"></i>
- </div>
- <!--
- <div class="search-bar">
- <form class="search-form d-flex align-items-center" method="POST" action="#">
- <input type="text" name="query" placeholder="Search" title="Enter search keyword">
- <button type="submit" title="Search"><i class="bi bi-search"></i></button>
- </form>
- </div>
- <nav class="header-nav ms-auto">
- <ul class="d-flex align-items-center">
- <li class="nav-item d-block d-lg-none">
- <a class="nav-link nav-icon search-bar-toggle " href="#">
- <i class="bi bi-search"></i>
- </a>
- </li>
- <li class="nav-item dropdown">
- <a class="nav-link nav-icon" href="#" data-bs-toggle="dropdown">
- <i class="bi bi-bell"></i>
- <span class="badge bg-primary badge-number">4</span>
- </a>
- <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications">
- <li class="dropdown-header">
- You have 4 new notifications
- <a href="#"><span class="badge rounded-pill bg-primary p-2 ms-2">View all</span></a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="notification-item">
- <i class="bi bi-exclamation-circle text-warning"></i>
- <div>
- <h4>Lorem Ipsum</h4>
- <p>Quae dolorem earum veritatis oditseno</p>
- <p>30 min. ago</p>
- </div>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="notification-item">
- <i class="bi bi-x-circle text-danger"></i>
- <div>
- <h4>Atque rerum nesciunt</h4>
- <p>Quae dolorem earum veritatis oditseno</p>
- <p>1 hr. ago</p>
- </div>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="notification-item">
- <i class="bi bi-check-circle text-success"></i>
- <div>
- <h4>Sit rerum fuga</h4>
- <p>Quae dolorem earum veritatis oditseno</p>
- <p>2 hrs. ago</p>
- </div>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="notification-item">
- <i class="bi bi-info-circle text-primary"></i>
- <div>
- <h4>Dicta reprehenderit</h4>
- <p>Quae dolorem earum veritatis oditseno</p>
- <p>4 hrs. ago</p>
- </div>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="dropdown-footer">
- <a href="#">Show all notifications</a>
- </li>
- </ul>
- </li>
- <li class="nav-item dropdown">
- <a class="nav-link nav-icon" href="#" data-bs-toggle="dropdown">
- <i class="bi bi-chat-left-text"></i>
- <span class="badge bg-success badge-number">3</span>
- </a>
- <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow messages">
- <li class="dropdown-header">
- You have 3 new messages
- <a href="#"><span class="badge rounded-pill bg-primary p-2 ms-2">View all</span></a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="message-item">
- <a href="#">
- <img src="assets/img/messages-1.jpg" alt="" class="rounded-circle">
- <div>
- <h4>Maria Hudson</h4>
- <p>Velit asperiores et ducimus soluta repudiandae labore officia est ut...</p>
- <p>4 hrs. ago</p>
- </div>
- </a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="message-item">
- <a href="#">
- <img src="assets/img/messages-2.jpg" alt="" class="rounded-circle">
- <div>
- <h4>Anna Nelson</h4>
- <p>Velit asperiores et ducimus soluta repudiandae labore officia est ut...</p>
- <p>6 hrs. ago</p>
- </div>
- </a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="message-item">
- <a href="#">
- <img src="assets/img/messages-3.jpg" alt="" class="rounded-circle">
- <div>
- <h4>David Muldon</h4>
- <p>Velit asperiores et ducimus soluta repudiandae labore officia est ut...</p>
- <p>8 hrs. ago</p>
- </div>
- </a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li class="dropdown-footer">
- <a href="#">Show all messages</a>
- </li>
- </ul>
- </li>
- <li class="nav-item dropdown pe-3">
- <a class="nav-link nav-profile d-flex align-items-center pe-0" href="#" data-bs-toggle="dropdown">
- <img src="assets/img/profile-img.jpg" alt="Profile" class="rounded-circle">
- <span class="d-none d-md-block dropdown-toggle ps-2">K. Anderson</span>
- </a>
- <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow profile">
- <li class="dropdown-header">
- <h6>Kevin Anderson</h6>
- <span>Web Designer</span>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li>
- <a class="dropdown-item d-flex align-items-center" href="users-profile.html">
- <i class="bi bi-person"></i>
- <span>My Profile</span>
- </a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li>
- <a class="dropdown-item d-flex align-items-center" href="users-profile.html">
- <i class="bi bi-gear"></i>
- <span>Account Settings</span>
- </a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li>
- <a class="dropdown-item d-flex align-items-center" href="pages-faq.html">
- <i class="bi bi-question-circle"></i>
- <span>Need Help?</span>
- </a>
- </li>
- <li>
- <hr class="dropdown-divider">
- </li>
- <li>
- <a class="dropdown-item d-flex align-items-center" href="#">
- <i class="bi bi-box-arrow-right"></i>
- <span>Sign Out</span>
- </a>
- </li>
- </ul>
- </li> -->
- </ul>
- </nav>
- </header>
- <!-- ======= Sidebar ======= -->
- <aside id="sidebar" class="sidebar">
- <ul class="sidebar-nav" id="sidebar-nav">
- <li class="nav-item">
- <a class="nav-link collapsed" href="transaction.html">
- <i class="bi bi-grid"></i>
- <span>交易記錄</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="nft.html">
- <i class="bi bi-grid"></i>
- <span>NFT管理</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="user.html">
- <i class="bi bi-grid"></i>
- <span>會員帳號管理</span>
- </a>
- </li>
- <!-- <li class="nav-item">
- <a class="nav-link collapsed" href="mint.html">
- <i class="bi bi-grid"></i>
- <span>Mint管理</span>
- </a>
- </li> -->
- <!-- <li class="nav-item">
- <a class="nav-link collapsed" href="index.html">
- <i class="bi bi-grid"></i>
- <span>Dashboard</span>
- </a>
- </li>
-
- <li class="nav-item">
- <a class="nav-link collapsed" data-bs-target="#components-nav" data-bs-toggle="collapse" href="#">
- <i class="bi bi-menu-button-wide"></i><span>Components</span><i class="bi bi-chevron-down ms-auto"></i>
- </a>
- <ul id="components-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
- <li>
- <a href="components-alerts.html">
- <i class="bi bi-circle"></i><span>Alerts</span>
- </a>
- </li>
- <li>
- <a href="components-accordion.html">
- <i class="bi bi-circle"></i><span>Accordion</span>
- </a>
- </li>
- <li>
- <a href="components-badges.html">
- <i class="bi bi-circle"></i><span>Badges</span>
- </a>
- </li>
- <li>
- <a href="components-breadcrumbs.html">
- <i class="bi bi-circle"></i><span>Breadcrumbs</span>
- </a>
- </li>
- <li>
- <a href="components-buttons.html">
- <i class="bi bi-circle"></i><span>Buttons</span>
- </a>
- </li>
- <li>
- <a href="components-cards.html">
- <i class="bi bi-circle"></i><span>Cards</span>
- </a>
- </li>
- <li>
- <a href="components-carousel.html">
- <i class="bi bi-circle"></i><span>Carousel</span>
- </a>
- </li>
- <li>
- <a href="components-list-group.html">
- <i class="bi bi-circle"></i><span>List group</span>
- </a>
- </li>
- <li>
- <a href="components-modal.html">
- <i class="bi bi-circle"></i><span>Modal</span>
- </a>
- </li>
- <li>
- <a href="components-tabs.html">
- <i class="bi bi-circle"></i><span>Tabs</span>
- </a>
- </li>
- <li>
- <a href="components-pagination.html">
- <i class="bi bi-circle"></i><span>Pagination</span>
- </a>
- </li>
- <li>
- <a href="components-progress.html">
- <i class="bi bi-circle"></i><span>Progress</span>
- </a>
- </li>
- <li>
- <a href="components-spinners.html">
- <i class="bi bi-circle"></i><span>Spinners</span>
- </a>
- </li>
- <li>
- <a href="components-tooltips.html">
- <i class="bi bi-circle"></i><span>Tooltips</span>
- </a>
- </li>
- </ul>
- </li>
- <li class="nav-item">
- <a class="nav-link " data-bs-target="#forms-nav" data-bs-toggle="collapse" href="#">
- <i class="bi bi-journal-text"></i><span>Forms</span><i class="bi bi-chevron-down ms-auto"></i>
- </a>
- <ul id="forms-nav" class="nav-content collapse show" data-bs-parent="#sidebar-nav">
- <li>
- <a href="nft_add.html" class="active">
- <i class="bi bi-circle"></i><span>Form Elements</span>
- </a>
- </li>
- <li>
- <a href="forms-layouts.html">
- <i class="bi bi-circle"></i><span>Form Layouts</span>
- </a>
- </li>
- <li>
- <a href="forms-editors.html">
- <i class="bi bi-circle"></i><span>Form Editors</span>
- </a>
- </li>
- <li>
- <a href="forms-validation.html">
- <i class="bi bi-circle"></i><span>Form Validation</span>
- </a>
- </li>
- </ul>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="collapse" href="#">
- <i class="bi bi-layout-text-window-reverse"></i><span>Tables</span><i class="bi bi-chevron-down ms-auto"></i>
- </a>
- <ul id="tables-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
- <li>
- <a href="tables-general.html">
- <i class="bi bi-circle"></i><span>General Tables</span>
- </a>
- </li>
- <li>
- <a href="user.html">
- <i class="bi bi-circle"></i><span>Data Tables</span>
- </a>
- </li>
- </ul>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" data-bs-target="#charts-nav" data-bs-toggle="collapse" href="#">
- <i class="bi bi-bar-chart"></i><span>Charts</span><i class="bi bi-chevron-down ms-auto"></i>
- </a>
- <ul id="charts-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
- <li>
- <a href="charts-chartjs.html">
- <i class="bi bi-circle"></i><span>Chart.js</span>
- </a>
- </li>
- <li>
- <a href="charts-apexcharts.html">
- <i class="bi bi-circle"></i><span>ApexCharts</span>
- </a>
- </li>
- <li>
- <a href="charts-echarts.html">
- <i class="bi bi-circle"></i><span>ECharts</span>
- </a>
- </li>
- </ul>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" data-bs-target="#icons-nav" data-bs-toggle="collapse" href="#">
- <i class="bi bi-gem"></i><span>Icons</span><i class="bi bi-chevron-down ms-auto"></i>
- </a>
- <ul id="icons-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
- <li>
- <a href="icons-bootstrap.html">
- <i class="bi bi-circle"></i><span>Bootstrap Icons</span>
- </a>
- </li>
- <li>
- <a href="icons-remix.html">
- <i class="bi bi-circle"></i><span>Remix Icons</span>
- </a>
- </li>
- <li>
- <a href="icons-boxicons.html">
- <i class="bi bi-circle"></i><span>Boxicons</span>
- </a>
- </li>
- </ul>
- </li>
- <li class="nav-heading">Pages</li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="users-profile.html">
- <i class="bi bi-person"></i>
- <span>Profile</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="pages-faq.html">
- <i class="bi bi-question-circle"></i>
- <span>F.A.Q</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="pages-contact.html">
- <i class="bi bi-envelope"></i>
- <span>Contact</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="pages-register.html">
- <i class="bi bi-card-list"></i>
- <span>Register</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="login.html">
- <i class="bi bi-box-arrow-in-right"></i>
- <span>Login</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="pages-error-404.html">
- <i class="bi bi-dash-circle"></i>
- <span>Error 404</span>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link collapsed" href="pages-blank.html">
- <i class="bi bi-file-earmark"></i>
- <span>Blank</span>
- </a>
- </li> -->
- </ul>
- </aside>
- <main id="main" class="main">
- <div class="pagetitle">
- <h1>NFT 管理</h1>
- <nav>
- <ol class="breadcrumb">
- <li class="breadcrumb-item"><a href="index.html">Home</a></li>
- <li class="breadcrumb-item active">NFT_Add</li>
- </ol>
- </nav>
- </div><!-- End Page Title -->
- <section class="section">
- <div class="row">
- <div class="col-lg-6">
- <div class="card">
- <div class="card-body">
- <h5 class="card-title">NFT</h5>
- <form id="nft_add_form" method="post" enctype="multipart/form-data">
- <div class="row mb-3">
- <label for="inputText" class="col-sm-2 col-form-label">名稱</label>
- <div class="col-sm-10">
- <input id="title" name="title" type="text" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputDesc" class="col-sm-2 col-form-label">描述</label>
- <div class="col-sm-10">
- <input id="desc" name="inputDesc" type="text" class="form-control">
- </div>
- </div>
- <!-- <div class="row mb-3">
- <div class="col-12 text-center">
- <img src="" alt="" id="img" width="60" height="60">
- </div>
- </div> -->
- <div class="row mb-3">
- <label for="inputNumber" class="col-sm-2 col-form-label">圖片</label>
- <div class="col-sm-10 blk-file">
- <input id="image" name="image" class="form-control" type="file">
- </div>
- <div class="col-sm-10 blk-imgurl">
- <div id="imgUrl"></div>
- </div>
- <span class="btn-changeImg btn">更改圖片</span>
- </div>
- <div class="row mb-3">
- <legend class="col-form-label col-sm-2 pt-0">顯示</legend>
- <div class="col-sm-10">
- <div class="form-check">
- <input id="is_active_checkbox" name="is_active_checkbox" class="form-check-input" type="checkbox">
- <!-- <label class="form-check-label" for="is_active"></label> -->
- <input id="is_active" name="is_active" type="text" class="form-control d-none">
- </div>
- </div>
- </div>
- <div class="row mb-3">
- <div class="text-center">
- <button id="btn_nft_add" type="submit" class="btn btn-primary">編輯完成</button>
- <span id="btn_nft_delete" class="btn btn-danger">刪除</span>
- </div>
- </div>
- </form>
- <!-- General Form Elements -->
- <!-- <form>
- <div class="row mb-3">
- <label for="inputText" class="col-sm-2 col-form-label">Text</label>
- <div class="col-sm-10">
- <input type="text" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputEmail" class="col-sm-2 col-form-label">Email</label>
- <div class="col-sm-10">
- <input type="email" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputPassword" class="col-sm-2 col-form-label">Password</label>
- <div class="col-sm-10">
- <input type="password" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputNumber" class="col-sm-2 col-form-label">Number</label>
- <div class="col-sm-10">
- <input type="number" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputNumber" class="col-sm-2 col-form-label">File Upload</label>
- <div class="col-sm-10">
- <input class="form-control" type="file" id="formFile">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputDate" class="col-sm-2 col-form-label">Date</label>
- <div class="col-sm-10">
- <input type="date" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputTime" class="col-sm-2 col-form-label">Time</label>
- <div class="col-sm-10">
- <input type="time" class="form-control">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputColor" class="col-sm-2 col-form-label">Color Picker</label>
- <div class="col-sm-10">
- <input type="color" class="form-control form-control-color" id="exampleColorInput" value="#4154f1" title="Choose your color">
- </div>
- </div>
- <div class="row mb-3">
- <label for="inputPassword" class="col-sm-2 col-form-label">Textarea</label>
- <div class="col-sm-10">
- <textarea class="form-control" style="height: 100px"></textarea>
- </div>
- </div>
- <fieldset class="row mb-3">
- <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
- <div class="col-sm-10">
- <div class="form-check">
- <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
- <label class="form-check-label" for="gridRadios1">
- First radio
- </label>
- </div>
- <div class="form-check">
- <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
- <label class="form-check-label" for="gridRadios2">
- Second radio
- </label>
- </div>
- <div class="form-check disabled">
- <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios" value="option" disabled>
- <label class="form-check-label" for="gridRadios3">
- Third disabled radio
- </label>
- </div>
- </div>
- </fieldset>
- <div class="row mb-3">
- <legend class="col-form-label col-sm-2 pt-0">Checkboxes</legend>
- <div class="col-sm-10">
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="gridCheck1">
- <label class="form-check-label" for="gridCheck1">
- Example checkbox
- </label>
- </div>
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="gridCheck2" checked>
- <label class="form-check-label" for="gridCheck2">
- Example checkbox 2
- </label>
- </div>
- </div>
- </div>
- <div class="row mb-3">
- <label class="col-sm-2 col-form-label">Disabled</label>
- <div class="col-sm-10">
- <input type="text" class="form-control" value="Read only / Disabled" disabled>
- </div>
- </div>
- <div class="row mb-3">
- <label class="col-sm-2 col-form-label">Select</label>
- <div class="col-sm-10">
- <select class="form-select" aria-label="Default select example">
- <option selected>Open this select menu</option>
- <option value="1">One</option>
- <option value="2">Two</option>
- <option value="3">Three</option>
- </select>
- </div>
- </div>
- <div class="row mb-3">
- <label class="col-sm-2 col-form-label">Multi Select</label>
- <div class="col-sm-10">
- <select class="form-select" multiple aria-label="multiple select example">
- <option selected>Open this select menu</option>
- <option value="1">One</option>
- <option value="2">Two</option>
- <option value="3">Three</option>
- </select>
- </div>
- </div>
- <div class="row mb-3">
- <label class="col-sm-2 col-form-label">Submit Button</label>
- <div class="col-sm-10">
- <button type="submit" class="btn btn-primary">Submit Form</button>
- </div>
- </div>
- </form> -->
- </div>
- </div>
- </div>
- <!-- <div class="col-lg-6">
- <div class="card">
- <div class="card-body">
- <h5 class="card-title">Advanced Form Elements</h5>
- <form>
- <div class="row mb-5">
- <label class="col-sm-2 col-form-label">Switches</label>
- <div class="col-sm-10">
- <div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
- <label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label>
- </div>
- <div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
- <label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label>
- </div>
- <div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckDisabled" disabled>
- <label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label>
- </div>
- <div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckCheckedDisabled" checked disabled>
- <label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label>
- </div>
- </div>
- </div>
- <div class="row mb-5">
- <label class="col-sm-2 col-form-label">Ranges</label>
- <div class="col-sm-10">
- <div>
- <label for="customRange1" class="form-label">Example range</label>
- <input type="range" class="form-range" id="customRange1">
- </div>
- <div>
- <label for="disabledRange" class="form-label">Disabled range</label>
- <input type="range" class="form-range" id="disabledRange" disabled>
- </div>
- <div>
- <label for="customRange2" class="form-label">Min and max with steps</label>
- <input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange2">
- </div>
- </div>
- </div>
- <div class="row mb-3">
- <label class="col-sm-2 col-form-label">Floating labels</label>
- <div class="col-sm-10">
- <div class="form-floating mb-3">
- <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
- <label for="floatingInput">Email address</label>
- </div>
- <div class="form-floating mb-3">
- <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
- <label for="floatingPassword">Password</label>
- </div>
- <div class="form-floating mb-3">
- <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea" style="height: 100px;"></textarea>
- <label for="floatingTextarea">Comments</label>
- </div>
- <div class="form-floating mb-3">
- <select class="form-select" id="floatingSelect" aria-label="Floating label select example">
- <option selected>Open this select menu</option>
- <option value="1">One</option>
- <option value="2">Two</option>
- <option value="3">Three</option>
- </select>
- <label for="floatingSelect">Works with selects</label>
- </div>
- </div>
- </div>
- <div class="row mb-5">
- <label class="col-sm-2 col-form-label">Input groups</label>
- <div class="col-sm-10">
- <div class="input-group mb-3">
- <span class="input-group-text" id="basic-addon1">@</span>
- <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
- </div>
- <div class="input-group mb-3">
- <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2">
- <span class="input-group-text" id="basic-addon2">@example.com</span>
- </div>
- <label for="basic-url" class="form-label">Your vanity URL</label>
- <div class="input-group mb-3">
- <span class="input-group-text" id="basic-addon3">https://example.com/users/</span>
- <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3">
- </div>
- <div class="input-group mb-3">
- <span class="input-group-text">$</span>
- <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
- <span class="input-group-text">.00</span>
- </div>
- <div class="input-group mb-3">
- <input type="text" class="form-control" placeholder="Username" aria-label="Username">
- <span class="input-group-text">@</span>
- <input type="text" class="form-control" placeholder="Server" aria-label="Server">
- </div>
- <div class="input-group">
- <span class="input-group-text">With textarea</span>
- <textarea class="form-control" aria-label="With textarea"></textarea>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div> -->
- </div>
- </section>
- </main><!-- End #main -->
- <!-- ======= Footer ======= -->
- <footer id="footer" class="footer">
- <div class="copyright">
- © Copyright <strong><span>Ark Cards</span></strong>. All Rights Reserved
- </div>
- <div class="credits">
- <!-- All the links in the footer should remain intact. -->
- <!-- You can delete the links only if you purchased the pro version. -->
- <!-- Licensing information: https://bootstrapmade.com/license/ -->
- <!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -->
- Designed by <a href="https://ai.choozmo.com/">Choozmo</a>
- </div>
- </footer><!-- End Footer -->
- <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
- <!-- Vendor JS Files -->
- <script src="assets/vendor/apexcharts/apexcharts.min.js"></script>
- <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
- <script src="assets/vendor/chart.js/chart.min.js"></script>
- <script src="assets/vendor/echarts/echarts.min.js"></script>
- <script src="assets/vendor/quill/quill.min.js"></script>
- <script src="assets/vendor/simple-datatables/simple-datatables.js"></script>
- <script src="assets/vendor/tinymce/tinymce.min.js"></script>
- <script src="assets/vendor/php-email-form/validate.js"></script>
- <!-- Template Main JS File -->
- <script src="assets/js/main.js"></script>
- <!-- Ark Cards JS File -->
- <script src="assets/js/ark.js"></script>
- <script>
- // 檢查是否可存取該頁面
- checkRoute();
- var url = 'https://api.ptt.cx:8750/api/v1/nft/';
- var access_token = get_access_token();
- var headers = {'Authorization': 'Bearer ' + access_token}
- let Data;
- let category;
- let imgurl;
- $('.blk-file').hide();
- $('.btn-changeImg').click(function() {
- $('.blk-imgurl').hide();
- $('.blk-file').show();
- $(this).hide();
- })
- function getpathId(){
- let id = window.location.search.split('?').pop();
- return id.split('=')[1];
- }
- const id = Number(getpathId());
- axios({
- method: 'get',
- url: `https://api.ptt.cx:8750/api/v1/nft/${id}`,
- headers: {
- 'accept': 'application/json',
- 'Authorization': `Bearer ${access_token}`
- },
- }).then(res => {
- Data = {...res.data}
- category = Data.catagory;
- imgurl = Data.imgurl;
- console.log(Data);
- $('#title').val(res.data.title);
- $('#desc').val(res.data.context);
- $('#imgUrl').text(res.data.imgurl);
- // $('#img').attr('src', res.data.imgurl);
- if(res.data.is_active) {
- $('#is_active_checkbox').attr('checked', true)
- } else {
- $('#is_active_checkbox').attr('checked', false)
- }
-
- }).catch(err => {
- console.log(err);
- window.location.replace('./login.html');
- })
- document.getElementById('image').addEventListener('change', handleFileSelect, false);
- let imageFile;
- function handleFileSelect(evt) {
- let files = evt.target.files; // FileList object
- // use the 1st file from the list
- let f = files[0];
- imageFile = f
-
- let reader = new FileReader();
- // Closure to capture the file information.
- reader.onload = (function(theFile) {
- return function(e) {
-
- };
- })(f);
- // Read in the image file as a data URL.
- reader.readAsText(f);
- }
- $("#nft_add_form").submit(function(e) {
- e.preventDefault();
- var title = $('#title').val();
- var image = $('#image').val();
- var context = $('#desc').val();
- if(image) {
- image = $('#image').val();
- let front = image.split(/(\\|\/)/g).pop();
- let type = front.split('.').pop();
- if(type == 'jpg' || type == 'jpeg') {
- type = 'jpeg';
- } else if (type == 'png') {
- type = 'png';
- }
- console.log(front,type);
- image = imageFile;
- } else {
- image = '';
- }
- console.log('title = ' + title + ', image = ' + image); // test
-
- if (!title) {
- Swal.fire({
- title: '注意',
- icon: 'error',
- text: '請輸入NFT名稱',
- confirmButtonColor: '#3085d6'
- })
-
- return false;
- }
- // 資料庫欄位型態是tinyint(1),所以另外用is_active_checkbox、is_active欄位來做轉換
- // if ($("#is_active_checkbox").is(':checked')) {
- // $('#is_active').val(1);
- // } else {
- // $('#is_active').val(0);
- // }
-
- let data = {
- catagory: category,
- is_active: $("#is_active_checkbox").is(':checked'),
- title,
- imgurl,
- context
- }
- var bodyFormData = new FormData();
- bodyFormData.append('title', title);
- bodyFormData.append('context', context);
- bodyFormData.append('catagory', category);
- bodyFormData.append('image', image);
- bodyFormData.append('is_active', $("#is_active_checkbox").is(':checked'));
- console.log(data)
-
- for (var pair of bodyFormData.entries()) {
- console.log(pair[0]+ '=' + pair[1]);
- }
- axios({
- method: 'put',
- url: `https://api.ptt.cx:8750/api/v1/nft/${id}`,
- headers: {
- 'accept': 'application/json',
- 'Authorization': `Bearer ${access_token}`,
- 'Content-Type': 'multipart/form-data'
- },
- data: bodyFormData
- }).then(res => {
- console.log(res.data)
- Swal.fire({
- title: '成功',
- icon: 'success',
- text: '編輯成功',
- confirmButtonColor: '#3085d6'
- });
- window.setTimeout(() => {
- window.location.href = 'nft.html';
- }, 2000);
- }).catch(err => {
- console.log(err);
- Swal.fire({
- title: '錯誤',
- icon: 'success',
- text: '請稍後再試',
- confirmButtonColor: '#3085d6'
- });
- })
- return false;
- });
- $('#btn_nft_delete').click(function() {
- axios({
- method: 'delete',
- url: `https://api.ptt.cx:8750/api/v1/nft/${id}`,
- headers: {
- 'accept': 'application/json',
- 'Authorization': `Bearer ${access_token}`,
- }
- }).then(res => {
- console.log(res.data)
- Swal.fire({
- title: '成功',
- icon: 'success',
- text: '刪除成功',
- confirmButtonColor: '#3085d6'
- });
- window.setTimeout(() => {
- window.location.href = 'nft.html';
- }, 2000);
- }).catch(err => {
- console.log(err);
- Swal.fire({
- title: '錯誤',
- icon: 'success',
- text: '請稍後再試',
- confirmButtonColor: '#3085d6'
- });
- })
- })
- </script>
- </body>
- </html>
|