nft_edit.html 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta content="width=device-width, initial-scale=1.0" name="viewport">
  6. <title>Ark Cards</title>
  7. <meta content="" name="description">
  8. <meta content="" name="keywords">
  9. <!-- Favicons -->
  10. <link href="assets/img/favicon.png" rel="icon">
  11. <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
  12. <!-- Google Fonts -->
  13. <link href="https://fonts.gstatic.com" rel="preconnect">
  14. <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">
  15. <!-- Vendor CSS Files -->
  16. <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  17. <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
  18. <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  19. <link href="assets/vendor/quill/quill.snow.css" rel="stylesheet">
  20. <link href="assets/vendor/quill/quill.bubble.css" rel="stylesheet">
  21. <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
  22. <link href="assets/vendor/simple-datatables/style.css" rel="stylesheet">
  23. <!-- Template Main CSS File -->
  24. <link href="assets/css/style.css" rel="stylesheet">
  25. <!-- Ark Cards -->
  26. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  27. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  28. <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  29. <!-- =======================================================
  30. * Template Name: NiceAdmin - v2.2.0
  31. * Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
  32. * Author: BootstrapMade.com
  33. * License: https://bootstrapmade.com/license/
  34. ======================================================== -->
  35. </head>
  36. <body>
  37. <!-- ======= Header ======= -->
  38. <header id="header" class="header fixed-top d-flex align-items-center">
  39. <div class="d-flex align-items-center justify-content-between">
  40. <a href="index.html" class="logo d-flex align-items-center">
  41. <!-- <img src="assets/img/logo.png" alt=""> -->
  42. <img src="assets/img/ark_logo.png" alt="Ark Cards">
  43. <span class="d-none d-lg-block">Ark Cards</span>
  44. </a>
  45. <i class="bi bi-list toggle-sidebar-btn"></i>
  46. </div>
  47. <!--
  48. <div class="search-bar">
  49. <form class="search-form d-flex align-items-center" method="POST" action="#">
  50. <input type="text" name="query" placeholder="Search" title="Enter search keyword">
  51. <button type="submit" title="Search"><i class="bi bi-search"></i></button>
  52. </form>
  53. </div>
  54. <nav class="header-nav ms-auto">
  55. <ul class="d-flex align-items-center">
  56. <li class="nav-item d-block d-lg-none">
  57. <a class="nav-link nav-icon search-bar-toggle " href="#">
  58. <i class="bi bi-search"></i>
  59. </a>
  60. </li>
  61. <li class="nav-item dropdown">
  62. <a class="nav-link nav-icon" href="#" data-bs-toggle="dropdown">
  63. <i class="bi bi-bell"></i>
  64. <span class="badge bg-primary badge-number">4</span>
  65. </a>
  66. <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications">
  67. <li class="dropdown-header">
  68. You have 4 new notifications
  69. <a href="#"><span class="badge rounded-pill bg-primary p-2 ms-2">View all</span></a>
  70. </li>
  71. <li>
  72. <hr class="dropdown-divider">
  73. </li>
  74. <li class="notification-item">
  75. <i class="bi bi-exclamation-circle text-warning"></i>
  76. <div>
  77. <h4>Lorem Ipsum</h4>
  78. <p>Quae dolorem earum veritatis oditseno</p>
  79. <p>30 min. ago</p>
  80. </div>
  81. </li>
  82. <li>
  83. <hr class="dropdown-divider">
  84. </li>
  85. <li class="notification-item">
  86. <i class="bi bi-x-circle text-danger"></i>
  87. <div>
  88. <h4>Atque rerum nesciunt</h4>
  89. <p>Quae dolorem earum veritatis oditseno</p>
  90. <p>1 hr. ago</p>
  91. </div>
  92. </li>
  93. <li>
  94. <hr class="dropdown-divider">
  95. </li>
  96. <li class="notification-item">
  97. <i class="bi bi-check-circle text-success"></i>
  98. <div>
  99. <h4>Sit rerum fuga</h4>
  100. <p>Quae dolorem earum veritatis oditseno</p>
  101. <p>2 hrs. ago</p>
  102. </div>
  103. </li>
  104. <li>
  105. <hr class="dropdown-divider">
  106. </li>
  107. <li class="notification-item">
  108. <i class="bi bi-info-circle text-primary"></i>
  109. <div>
  110. <h4>Dicta reprehenderit</h4>
  111. <p>Quae dolorem earum veritatis oditseno</p>
  112. <p>4 hrs. ago</p>
  113. </div>
  114. </li>
  115. <li>
  116. <hr class="dropdown-divider">
  117. </li>
  118. <li class="dropdown-footer">
  119. <a href="#">Show all notifications</a>
  120. </li>
  121. </ul>
  122. </li>
  123. <li class="nav-item dropdown">
  124. <a class="nav-link nav-icon" href="#" data-bs-toggle="dropdown">
  125. <i class="bi bi-chat-left-text"></i>
  126. <span class="badge bg-success badge-number">3</span>
  127. </a>
  128. <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow messages">
  129. <li class="dropdown-header">
  130. You have 3 new messages
  131. <a href="#"><span class="badge rounded-pill bg-primary p-2 ms-2">View all</span></a>
  132. </li>
  133. <li>
  134. <hr class="dropdown-divider">
  135. </li>
  136. <li class="message-item">
  137. <a href="#">
  138. <img src="assets/img/messages-1.jpg" alt="" class="rounded-circle">
  139. <div>
  140. <h4>Maria Hudson</h4>
  141. <p>Velit asperiores et ducimus soluta repudiandae labore officia est ut...</p>
  142. <p>4 hrs. ago</p>
  143. </div>
  144. </a>
  145. </li>
  146. <li>
  147. <hr class="dropdown-divider">
  148. </li>
  149. <li class="message-item">
  150. <a href="#">
  151. <img src="assets/img/messages-2.jpg" alt="" class="rounded-circle">
  152. <div>
  153. <h4>Anna Nelson</h4>
  154. <p>Velit asperiores et ducimus soluta repudiandae labore officia est ut...</p>
  155. <p>6 hrs. ago</p>
  156. </div>
  157. </a>
  158. </li>
  159. <li>
  160. <hr class="dropdown-divider">
  161. </li>
  162. <li class="message-item">
  163. <a href="#">
  164. <img src="assets/img/messages-3.jpg" alt="" class="rounded-circle">
  165. <div>
  166. <h4>David Muldon</h4>
  167. <p>Velit asperiores et ducimus soluta repudiandae labore officia est ut...</p>
  168. <p>8 hrs. ago</p>
  169. </div>
  170. </a>
  171. </li>
  172. <li>
  173. <hr class="dropdown-divider">
  174. </li>
  175. <li class="dropdown-footer">
  176. <a href="#">Show all messages</a>
  177. </li>
  178. </ul>
  179. </li>
  180. <li class="nav-item dropdown pe-3">
  181. <a class="nav-link nav-profile d-flex align-items-center pe-0" href="#" data-bs-toggle="dropdown">
  182. <img src="assets/img/profile-img.jpg" alt="Profile" class="rounded-circle">
  183. <span class="d-none d-md-block dropdown-toggle ps-2">K. Anderson</span>
  184. </a>
  185. <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow profile">
  186. <li class="dropdown-header">
  187. <h6>Kevin Anderson</h6>
  188. <span>Web Designer</span>
  189. </li>
  190. <li>
  191. <hr class="dropdown-divider">
  192. </li>
  193. <li>
  194. <a class="dropdown-item d-flex align-items-center" href="users-profile.html">
  195. <i class="bi bi-person"></i>
  196. <span>My Profile</span>
  197. </a>
  198. </li>
  199. <li>
  200. <hr class="dropdown-divider">
  201. </li>
  202. <li>
  203. <a class="dropdown-item d-flex align-items-center" href="users-profile.html">
  204. <i class="bi bi-gear"></i>
  205. <span>Account Settings</span>
  206. </a>
  207. </li>
  208. <li>
  209. <hr class="dropdown-divider">
  210. </li>
  211. <li>
  212. <a class="dropdown-item d-flex align-items-center" href="pages-faq.html">
  213. <i class="bi bi-question-circle"></i>
  214. <span>Need Help?</span>
  215. </a>
  216. </li>
  217. <li>
  218. <hr class="dropdown-divider">
  219. </li>
  220. <li>
  221. <a class="dropdown-item d-flex align-items-center" href="#">
  222. <i class="bi bi-box-arrow-right"></i>
  223. <span>Sign Out</span>
  224. </a>
  225. </li>
  226. </ul>
  227. </li> -->
  228. </ul>
  229. </nav>
  230. </header>
  231. <!-- ======= Sidebar ======= -->
  232. <aside id="sidebar" class="sidebar">
  233. <ul class="sidebar-nav" id="sidebar-nav">
  234. <li class="nav-item">
  235. <a class="nav-link collapsed" href="transaction.html">
  236. <i class="bi bi-grid"></i>
  237. <span>交易記錄</span>
  238. </a>
  239. </li>
  240. <li class="nav-item">
  241. <a class="nav-link collapsed" href="nft.html">
  242. <i class="bi bi-grid"></i>
  243. <span>NFT管理</span>
  244. </a>
  245. </li>
  246. <li class="nav-item">
  247. <a class="nav-link collapsed" href="user.html">
  248. <i class="bi bi-grid"></i>
  249. <span>會員帳號管理</span>
  250. </a>
  251. </li>
  252. <!-- <li class="nav-item">
  253. <a class="nav-link collapsed" href="mint.html">
  254. <i class="bi bi-grid"></i>
  255. <span>Mint管理</span>
  256. </a>
  257. </li> -->
  258. <!-- <li class="nav-item">
  259. <a class="nav-link collapsed" href="index.html">
  260. <i class="bi bi-grid"></i>
  261. <span>Dashboard</span>
  262. </a>
  263. </li>
  264. <li class="nav-item">
  265. <a class="nav-link collapsed" data-bs-target="#components-nav" data-bs-toggle="collapse" href="#">
  266. <i class="bi bi-menu-button-wide"></i><span>Components</span><i class="bi bi-chevron-down ms-auto"></i>
  267. </a>
  268. <ul id="components-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
  269. <li>
  270. <a href="components-alerts.html">
  271. <i class="bi bi-circle"></i><span>Alerts</span>
  272. </a>
  273. </li>
  274. <li>
  275. <a href="components-accordion.html">
  276. <i class="bi bi-circle"></i><span>Accordion</span>
  277. </a>
  278. </li>
  279. <li>
  280. <a href="components-badges.html">
  281. <i class="bi bi-circle"></i><span>Badges</span>
  282. </a>
  283. </li>
  284. <li>
  285. <a href="components-breadcrumbs.html">
  286. <i class="bi bi-circle"></i><span>Breadcrumbs</span>
  287. </a>
  288. </li>
  289. <li>
  290. <a href="components-buttons.html">
  291. <i class="bi bi-circle"></i><span>Buttons</span>
  292. </a>
  293. </li>
  294. <li>
  295. <a href="components-cards.html">
  296. <i class="bi bi-circle"></i><span>Cards</span>
  297. </a>
  298. </li>
  299. <li>
  300. <a href="components-carousel.html">
  301. <i class="bi bi-circle"></i><span>Carousel</span>
  302. </a>
  303. </li>
  304. <li>
  305. <a href="components-list-group.html">
  306. <i class="bi bi-circle"></i><span>List group</span>
  307. </a>
  308. </li>
  309. <li>
  310. <a href="components-modal.html">
  311. <i class="bi bi-circle"></i><span>Modal</span>
  312. </a>
  313. </li>
  314. <li>
  315. <a href="components-tabs.html">
  316. <i class="bi bi-circle"></i><span>Tabs</span>
  317. </a>
  318. </li>
  319. <li>
  320. <a href="components-pagination.html">
  321. <i class="bi bi-circle"></i><span>Pagination</span>
  322. </a>
  323. </li>
  324. <li>
  325. <a href="components-progress.html">
  326. <i class="bi bi-circle"></i><span>Progress</span>
  327. </a>
  328. </li>
  329. <li>
  330. <a href="components-spinners.html">
  331. <i class="bi bi-circle"></i><span>Spinners</span>
  332. </a>
  333. </li>
  334. <li>
  335. <a href="components-tooltips.html">
  336. <i class="bi bi-circle"></i><span>Tooltips</span>
  337. </a>
  338. </li>
  339. </ul>
  340. </li>
  341. <li class="nav-item">
  342. <a class="nav-link " data-bs-target="#forms-nav" data-bs-toggle="collapse" href="#">
  343. <i class="bi bi-journal-text"></i><span>Forms</span><i class="bi bi-chevron-down ms-auto"></i>
  344. </a>
  345. <ul id="forms-nav" class="nav-content collapse show" data-bs-parent="#sidebar-nav">
  346. <li>
  347. <a href="nft_add.html" class="active">
  348. <i class="bi bi-circle"></i><span>Form Elements</span>
  349. </a>
  350. </li>
  351. <li>
  352. <a href="forms-layouts.html">
  353. <i class="bi bi-circle"></i><span>Form Layouts</span>
  354. </a>
  355. </li>
  356. <li>
  357. <a href="forms-editors.html">
  358. <i class="bi bi-circle"></i><span>Form Editors</span>
  359. </a>
  360. </li>
  361. <li>
  362. <a href="forms-validation.html">
  363. <i class="bi bi-circle"></i><span>Form Validation</span>
  364. </a>
  365. </li>
  366. </ul>
  367. </li>
  368. <li class="nav-item">
  369. <a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="collapse" href="#">
  370. <i class="bi bi-layout-text-window-reverse"></i><span>Tables</span><i class="bi bi-chevron-down ms-auto"></i>
  371. </a>
  372. <ul id="tables-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
  373. <li>
  374. <a href="tables-general.html">
  375. <i class="bi bi-circle"></i><span>General Tables</span>
  376. </a>
  377. </li>
  378. <li>
  379. <a href="user.html">
  380. <i class="bi bi-circle"></i><span>Data Tables</span>
  381. </a>
  382. </li>
  383. </ul>
  384. </li>
  385. <li class="nav-item">
  386. <a class="nav-link collapsed" data-bs-target="#charts-nav" data-bs-toggle="collapse" href="#">
  387. <i class="bi bi-bar-chart"></i><span>Charts</span><i class="bi bi-chevron-down ms-auto"></i>
  388. </a>
  389. <ul id="charts-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
  390. <li>
  391. <a href="charts-chartjs.html">
  392. <i class="bi bi-circle"></i><span>Chart.js</span>
  393. </a>
  394. </li>
  395. <li>
  396. <a href="charts-apexcharts.html">
  397. <i class="bi bi-circle"></i><span>ApexCharts</span>
  398. </a>
  399. </li>
  400. <li>
  401. <a href="charts-echarts.html">
  402. <i class="bi bi-circle"></i><span>ECharts</span>
  403. </a>
  404. </li>
  405. </ul>
  406. </li>
  407. <li class="nav-item">
  408. <a class="nav-link collapsed" data-bs-target="#icons-nav" data-bs-toggle="collapse" href="#">
  409. <i class="bi bi-gem"></i><span>Icons</span><i class="bi bi-chevron-down ms-auto"></i>
  410. </a>
  411. <ul id="icons-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
  412. <li>
  413. <a href="icons-bootstrap.html">
  414. <i class="bi bi-circle"></i><span>Bootstrap Icons</span>
  415. </a>
  416. </li>
  417. <li>
  418. <a href="icons-remix.html">
  419. <i class="bi bi-circle"></i><span>Remix Icons</span>
  420. </a>
  421. </li>
  422. <li>
  423. <a href="icons-boxicons.html">
  424. <i class="bi bi-circle"></i><span>Boxicons</span>
  425. </a>
  426. </li>
  427. </ul>
  428. </li>
  429. <li class="nav-heading">Pages</li>
  430. <li class="nav-item">
  431. <a class="nav-link collapsed" href="users-profile.html">
  432. <i class="bi bi-person"></i>
  433. <span>Profile</span>
  434. </a>
  435. </li>
  436. <li class="nav-item">
  437. <a class="nav-link collapsed" href="pages-faq.html">
  438. <i class="bi bi-question-circle"></i>
  439. <span>F.A.Q</span>
  440. </a>
  441. </li>
  442. <li class="nav-item">
  443. <a class="nav-link collapsed" href="pages-contact.html">
  444. <i class="bi bi-envelope"></i>
  445. <span>Contact</span>
  446. </a>
  447. </li>
  448. <li class="nav-item">
  449. <a class="nav-link collapsed" href="pages-register.html">
  450. <i class="bi bi-card-list"></i>
  451. <span>Register</span>
  452. </a>
  453. </li>
  454. <li class="nav-item">
  455. <a class="nav-link collapsed" href="login.html">
  456. <i class="bi bi-box-arrow-in-right"></i>
  457. <span>Login</span>
  458. </a>
  459. </li>
  460. <li class="nav-item">
  461. <a class="nav-link collapsed" href="pages-error-404.html">
  462. <i class="bi bi-dash-circle"></i>
  463. <span>Error 404</span>
  464. </a>
  465. </li>
  466. <li class="nav-item">
  467. <a class="nav-link collapsed" href="pages-blank.html">
  468. <i class="bi bi-file-earmark"></i>
  469. <span>Blank</span>
  470. </a>
  471. </li> -->
  472. </ul>
  473. </aside>
  474. <main id="main" class="main">
  475. <div class="pagetitle">
  476. <h1>NFT 管理</h1>
  477. <nav>
  478. <ol class="breadcrumb">
  479. <li class="breadcrumb-item"><a href="index.html">Home</a></li>
  480. <li class="breadcrumb-item active">NFT_Add</li>
  481. </ol>
  482. </nav>
  483. </div><!-- End Page Title -->
  484. <section class="section">
  485. <div class="row">
  486. <div class="col-lg-6">
  487. <div class="card">
  488. <div class="card-body">
  489. <h5 class="card-title">NFT</h5>
  490. <form id="nft_add_form" method="post" enctype="multipart/form-data">
  491. <div class="row mb-3">
  492. <label for="inputText" class="col-sm-2 col-form-label">名稱</label>
  493. <div class="col-sm-10">
  494. <input id="title" name="title" type="text" class="form-control">
  495. </div>
  496. </div>
  497. <div class="row mb-3">
  498. <label for="inputDesc" class="col-sm-2 col-form-label">描述</label>
  499. <div class="col-sm-10">
  500. <input id="desc" name="inputDesc" type="text" class="form-control">
  501. </div>
  502. </div>
  503. <!-- <div class="row mb-3">
  504. <div class="col-12 text-center">
  505. <img src="" alt="" id="img" width="60" height="60">
  506. </div>
  507. </div> -->
  508. <div class="row mb-3">
  509. <label for="inputNumber" class="col-sm-2 col-form-label">圖片</label>
  510. <div class="col-sm-10 blk-file">
  511. <input id="image" name="image" class="form-control" type="file">
  512. </div>
  513. <div class="col-sm-10 blk-imgurl">
  514. <div id="imgUrl"></div>
  515. </div>
  516. <span class="btn-changeImg btn">更改圖片</span>
  517. </div>
  518. <div class="row mb-3">
  519. <legend class="col-form-label col-sm-2 pt-0">顯示</legend>
  520. <div class="col-sm-10">
  521. <div class="form-check">
  522. <input id="is_active_checkbox" name="is_active_checkbox" class="form-check-input" type="checkbox">
  523. <!-- <label class="form-check-label" for="is_active"></label> -->
  524. <input id="is_active" name="is_active" type="text" class="form-control d-none">
  525. </div>
  526. </div>
  527. </div>
  528. <div class="row mb-3">
  529. <div class="text-center">
  530. <button id="btn_nft_add" type="submit" class="btn btn-primary">編輯完成</button>
  531. <span id="btn_nft_delete" class="btn btn-danger">刪除</span>
  532. </div>
  533. </div>
  534. </form>
  535. <!-- General Form Elements -->
  536. <!-- <form>
  537. <div class="row mb-3">
  538. <label for="inputText" class="col-sm-2 col-form-label">Text</label>
  539. <div class="col-sm-10">
  540. <input type="text" class="form-control">
  541. </div>
  542. </div>
  543. <div class="row mb-3">
  544. <label for="inputEmail" class="col-sm-2 col-form-label">Email</label>
  545. <div class="col-sm-10">
  546. <input type="email" class="form-control">
  547. </div>
  548. </div>
  549. <div class="row mb-3">
  550. <label for="inputPassword" class="col-sm-2 col-form-label">Password</label>
  551. <div class="col-sm-10">
  552. <input type="password" class="form-control">
  553. </div>
  554. </div>
  555. <div class="row mb-3">
  556. <label for="inputNumber" class="col-sm-2 col-form-label">Number</label>
  557. <div class="col-sm-10">
  558. <input type="number" class="form-control">
  559. </div>
  560. </div>
  561. <div class="row mb-3">
  562. <label for="inputNumber" class="col-sm-2 col-form-label">File Upload</label>
  563. <div class="col-sm-10">
  564. <input class="form-control" type="file" id="formFile">
  565. </div>
  566. </div>
  567. <div class="row mb-3">
  568. <label for="inputDate" class="col-sm-2 col-form-label">Date</label>
  569. <div class="col-sm-10">
  570. <input type="date" class="form-control">
  571. </div>
  572. </div>
  573. <div class="row mb-3">
  574. <label for="inputTime" class="col-sm-2 col-form-label">Time</label>
  575. <div class="col-sm-10">
  576. <input type="time" class="form-control">
  577. </div>
  578. </div>
  579. <div class="row mb-3">
  580. <label for="inputColor" class="col-sm-2 col-form-label">Color Picker</label>
  581. <div class="col-sm-10">
  582. <input type="color" class="form-control form-control-color" id="exampleColorInput" value="#4154f1" title="Choose your color">
  583. </div>
  584. </div>
  585. <div class="row mb-3">
  586. <label for="inputPassword" class="col-sm-2 col-form-label">Textarea</label>
  587. <div class="col-sm-10">
  588. <textarea class="form-control" style="height: 100px"></textarea>
  589. </div>
  590. </div>
  591. <fieldset class="row mb-3">
  592. <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
  593. <div class="col-sm-10">
  594. <div class="form-check">
  595. <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
  596. <label class="form-check-label" for="gridRadios1">
  597. First radio
  598. </label>
  599. </div>
  600. <div class="form-check">
  601. <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
  602. <label class="form-check-label" for="gridRadios2">
  603. Second radio
  604. </label>
  605. </div>
  606. <div class="form-check disabled">
  607. <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios" value="option" disabled>
  608. <label class="form-check-label" for="gridRadios3">
  609. Third disabled radio
  610. </label>
  611. </div>
  612. </div>
  613. </fieldset>
  614. <div class="row mb-3">
  615. <legend class="col-form-label col-sm-2 pt-0">Checkboxes</legend>
  616. <div class="col-sm-10">
  617. <div class="form-check">
  618. <input class="form-check-input" type="checkbox" id="gridCheck1">
  619. <label class="form-check-label" for="gridCheck1">
  620. Example checkbox
  621. </label>
  622. </div>
  623. <div class="form-check">
  624. <input class="form-check-input" type="checkbox" id="gridCheck2" checked>
  625. <label class="form-check-label" for="gridCheck2">
  626. Example checkbox 2
  627. </label>
  628. </div>
  629. </div>
  630. </div>
  631. <div class="row mb-3">
  632. <label class="col-sm-2 col-form-label">Disabled</label>
  633. <div class="col-sm-10">
  634. <input type="text" class="form-control" value="Read only / Disabled" disabled>
  635. </div>
  636. </div>
  637. <div class="row mb-3">
  638. <label class="col-sm-2 col-form-label">Select</label>
  639. <div class="col-sm-10">
  640. <select class="form-select" aria-label="Default select example">
  641. <option selected>Open this select menu</option>
  642. <option value="1">One</option>
  643. <option value="2">Two</option>
  644. <option value="3">Three</option>
  645. </select>
  646. </div>
  647. </div>
  648. <div class="row mb-3">
  649. <label class="col-sm-2 col-form-label">Multi Select</label>
  650. <div class="col-sm-10">
  651. <select class="form-select" multiple aria-label="multiple select example">
  652. <option selected>Open this select menu</option>
  653. <option value="1">One</option>
  654. <option value="2">Two</option>
  655. <option value="3">Three</option>
  656. </select>
  657. </div>
  658. </div>
  659. <div class="row mb-3">
  660. <label class="col-sm-2 col-form-label">Submit Button</label>
  661. <div class="col-sm-10">
  662. <button type="submit" class="btn btn-primary">Submit Form</button>
  663. </div>
  664. </div>
  665. </form> -->
  666. </div>
  667. </div>
  668. </div>
  669. <!-- <div class="col-lg-6">
  670. <div class="card">
  671. <div class="card-body">
  672. <h5 class="card-title">Advanced Form Elements</h5>
  673. <form>
  674. <div class="row mb-5">
  675. <label class="col-sm-2 col-form-label">Switches</label>
  676. <div class="col-sm-10">
  677. <div class="form-check form-switch">
  678. <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
  679. <label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label>
  680. </div>
  681. <div class="form-check form-switch">
  682. <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
  683. <label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label>
  684. </div>
  685. <div class="form-check form-switch">
  686. <input class="form-check-input" type="checkbox" id="flexSwitchCheckDisabled" disabled>
  687. <label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label>
  688. </div>
  689. <div class="form-check form-switch">
  690. <input class="form-check-input" type="checkbox" id="flexSwitchCheckCheckedDisabled" checked disabled>
  691. <label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label>
  692. </div>
  693. </div>
  694. </div>
  695. <div class="row mb-5">
  696. <label class="col-sm-2 col-form-label">Ranges</label>
  697. <div class="col-sm-10">
  698. <div>
  699. <label for="customRange1" class="form-label">Example range</label>
  700. <input type="range" class="form-range" id="customRange1">
  701. </div>
  702. <div>
  703. <label for="disabledRange" class="form-label">Disabled range</label>
  704. <input type="range" class="form-range" id="disabledRange" disabled>
  705. </div>
  706. <div>
  707. <label for="customRange2" class="form-label">Min and max with steps</label>
  708. <input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange2">
  709. </div>
  710. </div>
  711. </div>
  712. <div class="row mb-3">
  713. <label class="col-sm-2 col-form-label">Floating labels</label>
  714. <div class="col-sm-10">
  715. <div class="form-floating mb-3">
  716. <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
  717. <label for="floatingInput">Email address</label>
  718. </div>
  719. <div class="form-floating mb-3">
  720. <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
  721. <label for="floatingPassword">Password</label>
  722. </div>
  723. <div class="form-floating mb-3">
  724. <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea" style="height: 100px;"></textarea>
  725. <label for="floatingTextarea">Comments</label>
  726. </div>
  727. <div class="form-floating mb-3">
  728. <select class="form-select" id="floatingSelect" aria-label="Floating label select example">
  729. <option selected>Open this select menu</option>
  730. <option value="1">One</option>
  731. <option value="2">Two</option>
  732. <option value="3">Three</option>
  733. </select>
  734. <label for="floatingSelect">Works with selects</label>
  735. </div>
  736. </div>
  737. </div>
  738. <div class="row mb-5">
  739. <label class="col-sm-2 col-form-label">Input groups</label>
  740. <div class="col-sm-10">
  741. <div class="input-group mb-3">
  742. <span class="input-group-text" id="basic-addon1">@</span>
  743. <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
  744. </div>
  745. <div class="input-group mb-3">
  746. <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2">
  747. <span class="input-group-text" id="basic-addon2">@example.com</span>
  748. </div>
  749. <label for="basic-url" class="form-label">Your vanity URL</label>
  750. <div class="input-group mb-3">
  751. <span class="input-group-text" id="basic-addon3">https://example.com/users/</span>
  752. <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3">
  753. </div>
  754. <div class="input-group mb-3">
  755. <span class="input-group-text">$</span>
  756. <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
  757. <span class="input-group-text">.00</span>
  758. </div>
  759. <div class="input-group mb-3">
  760. <input type="text" class="form-control" placeholder="Username" aria-label="Username">
  761. <span class="input-group-text">@</span>
  762. <input type="text" class="form-control" placeholder="Server" aria-label="Server">
  763. </div>
  764. <div class="input-group">
  765. <span class="input-group-text">With textarea</span>
  766. <textarea class="form-control" aria-label="With textarea"></textarea>
  767. </div>
  768. </div>
  769. </div>
  770. </form>
  771. </div>
  772. </div>
  773. </div> -->
  774. </div>
  775. </section>
  776. </main><!-- End #main -->
  777. <!-- ======= Footer ======= -->
  778. <footer id="footer" class="footer">
  779. <div class="copyright">
  780. &copy; Copyright <strong><span>Ark Cards</span></strong>. All Rights Reserved
  781. </div>
  782. <div class="credits">
  783. <!-- All the links in the footer should remain intact. -->
  784. <!-- You can delete the links only if you purchased the pro version. -->
  785. <!-- Licensing information: https://bootstrapmade.com/license/ -->
  786. <!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -->
  787. Designed by <a href="https://ai.choozmo.com/">Choozmo</a>
  788. </div>
  789. </footer><!-- End Footer -->
  790. <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
  791. <!-- Vendor JS Files -->
  792. <script src="assets/vendor/apexcharts/apexcharts.min.js"></script>
  793. <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  794. <script src="assets/vendor/chart.js/chart.min.js"></script>
  795. <script src="assets/vendor/echarts/echarts.min.js"></script>
  796. <script src="assets/vendor/quill/quill.min.js"></script>
  797. <script src="assets/vendor/simple-datatables/simple-datatables.js"></script>
  798. <script src="assets/vendor/tinymce/tinymce.min.js"></script>
  799. <script src="assets/vendor/php-email-form/validate.js"></script>
  800. <!-- Template Main JS File -->
  801. <script src="assets/js/main.js"></script>
  802. <!-- Ark Cards JS File -->
  803. <script src="assets/js/ark.js"></script>
  804. <script>
  805. // 檢查是否可存取該頁面
  806. checkRoute();
  807. var url = 'https://api.ptt.cx:8750/api/v1/nft/';
  808. var access_token = get_access_token();
  809. var headers = {'Authorization': 'Bearer ' + access_token}
  810. let Data;
  811. let category;
  812. let imgurl;
  813. $('.blk-file').hide();
  814. $('.btn-changeImg').click(function() {
  815. $('.blk-imgurl').hide();
  816. $('.blk-file').show();
  817. $(this).hide();
  818. })
  819. function getpathId(){
  820. let id = window.location.search.split('?').pop();
  821. return id.split('=')[1];
  822. }
  823. const id = Number(getpathId());
  824. axios({
  825. method: 'get',
  826. url: `https://api.ptt.cx:8750/api/v1/nft/${id}`,
  827. headers: {
  828. 'accept': 'application/json',
  829. 'Authorization': `Bearer ${access_token}`
  830. },
  831. }).then(res => {
  832. Data = {...res.data}
  833. category = Data.catagory;
  834. imgurl = Data.imgurl;
  835. console.log(Data);
  836. $('#title').val(res.data.title);
  837. $('#desc').val(res.data.context);
  838. $('#imgUrl').text(res.data.imgurl);
  839. // $('#img').attr('src', res.data.imgurl);
  840. if(res.data.is_active) {
  841. $('#is_active_checkbox').attr('checked', true)
  842. } else {
  843. $('#is_active_checkbox').attr('checked', false)
  844. }
  845. }).catch(err => {
  846. console.log(err);
  847. window.location.replace('./login.html');
  848. })
  849. document.getElementById('image').addEventListener('change', handleFileSelect, false);
  850. let imageFile;
  851. function handleFileSelect(evt) {
  852. let files = evt.target.files; // FileList object
  853. // use the 1st file from the list
  854. let f = files[0];
  855. imageFile = f
  856. let reader = new FileReader();
  857. // Closure to capture the file information.
  858. reader.onload = (function(theFile) {
  859. return function(e) {
  860. };
  861. })(f);
  862. // Read in the image file as a data URL.
  863. reader.readAsText(f);
  864. }
  865. $("#nft_add_form").submit(function(e) {
  866. e.preventDefault();
  867. var title = $('#title').val();
  868. var image = $('#image').val();
  869. var context = $('#desc').val();
  870. if(image) {
  871. image = $('#image').val();
  872. let front = image.split(/(\\|\/)/g).pop();
  873. let type = front.split('.').pop();
  874. if(type == 'jpg' || type == 'jpeg') {
  875. type = 'jpeg';
  876. } else if (type == 'png') {
  877. type = 'png';
  878. }
  879. console.log(front,type);
  880. image = imageFile;
  881. } else {
  882. image = '';
  883. }
  884. console.log('title = ' + title + ', image = ' + image); // test
  885. if (!title) {
  886. Swal.fire({
  887. title: '注意',
  888. icon: 'error',
  889. text: '請輸入NFT名稱',
  890. confirmButtonColor: '#3085d6'
  891. })
  892. return false;
  893. }
  894. // 資料庫欄位型態是tinyint(1),所以另外用is_active_checkbox、is_active欄位來做轉換
  895. // if ($("#is_active_checkbox").is(':checked')) {
  896. // $('#is_active').val(1);
  897. // } else {
  898. // $('#is_active').val(0);
  899. // }
  900. let data = {
  901. catagory: category,
  902. is_active: $("#is_active_checkbox").is(':checked'),
  903. title,
  904. imgurl,
  905. context
  906. }
  907. var bodyFormData = new FormData();
  908. bodyFormData.append('title', title);
  909. bodyFormData.append('context', context);
  910. bodyFormData.append('catagory', category);
  911. bodyFormData.append('image', image);
  912. bodyFormData.append('is_active', $("#is_active_checkbox").is(':checked'));
  913. console.log(data)
  914. for (var pair of bodyFormData.entries()) {
  915. console.log(pair[0]+ '=' + pair[1]);
  916. }
  917. axios({
  918. method: 'put',
  919. url: `https://api.ptt.cx:8750/api/v1/nft/${id}`,
  920. headers: {
  921. 'accept': 'application/json',
  922. 'Authorization': `Bearer ${access_token}`,
  923. 'Content-Type': 'multipart/form-data'
  924. },
  925. data: bodyFormData
  926. }).then(res => {
  927. console.log(res.data)
  928. Swal.fire({
  929. title: '成功',
  930. icon: 'success',
  931. text: '編輯成功',
  932. confirmButtonColor: '#3085d6'
  933. });
  934. window.setTimeout(() => {
  935. window.location.href = 'nft.html';
  936. }, 2000);
  937. }).catch(err => {
  938. console.log(err);
  939. Swal.fire({
  940. title: '錯誤',
  941. icon: 'success',
  942. text: '請稍後再試',
  943. confirmButtonColor: '#3085d6'
  944. });
  945. })
  946. return false;
  947. });
  948. $('#btn_nft_delete').click(function() {
  949. axios({
  950. method: 'delete',
  951. url: `https://api.ptt.cx:8750/api/v1/nft/${id}`,
  952. headers: {
  953. 'accept': 'application/json',
  954. 'Authorization': `Bearer ${access_token}`,
  955. }
  956. }).then(res => {
  957. console.log(res.data)
  958. Swal.fire({
  959. title: '成功',
  960. icon: 'success',
  961. text: '刪除成功',
  962. confirmButtonColor: '#3085d6'
  963. });
  964. window.setTimeout(() => {
  965. window.location.href = 'nft.html';
  966. }, 2000);
  967. }).catch(err => {
  968. console.log(err);
  969. Swal.fire({
  970. title: '錯誤',
  971. icon: 'success',
  972. text: '請稍後再試',
  973. confirmButtonColor: '#3085d6'
  974. });
  975. })
  976. })
  977. </script>
  978. </body>
  979. </html>