nft_add.html 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051
  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="title" 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" required>
  495. </div>
  496. </div>
  497. <div class="row mb-3">
  498. <label for="image" class="col-sm-2 col-form-label">圖片</label>
  499. <div class="col-sm-10">
  500. <input id="image" name="image" class="form-control" type="file" required>
  501. </div>
  502. </div>
  503. <div class="row mb-3">
  504. <label for="content" class="col-sm-2 col-form-label">描述</label>
  505. <div class="col-sm-10">
  506. <input id="content" name="content" class="form-control" type="text">
  507. </div>
  508. </div>
  509. <div class="row mb-3">
  510. <label for="uid" class="col-sm-2 col-form-label">識別號</label>
  511. <div class="col-sm-10">
  512. <input id="uid" name="uid" class="form-control" type="number" placeholder="4 - 9位數字" required>
  513. </div>
  514. </div>
  515. <div class="row mb-3">
  516. <label for="toaddress" class="col-sm-2 col-form-label">目標地址</label>
  517. <div class="col-sm-10">
  518. <input type="text" class="form-control" id="toaddress" name="toaddress" required>
  519. </div>
  520. </div>
  521. <div class="row mb-3">
  522. <label for="amount" class="col-sm-2 col-form-label">數量</label>
  523. <div class="col-sm-10">
  524. <input type="number" class="form-control" id="amount" name="amount" required>
  525. </div>
  526. </div>
  527. <div class="row mb-3">
  528. <legend class="col-form-label col-sm-2 pt-0">顯示</legend>
  529. <div class="col-sm-10">
  530. <div class="form-check">
  531. <input id="is_active_checkbox" name="is_active_checkbox" class="form-check-input" type="checkbox">
  532. <!-- <label class="form-check-label" for="is_active"></label> -->
  533. <input id="is_active" name="is_active" type="text" class="form-control d-none">
  534. </div>
  535. </div>
  536. </div>
  537. <div class="row mb-3">
  538. <div class="text-center">
  539. <button id="btn_nft_add" type="submit" class="btn btn-primary">送出</button>
  540. </div>
  541. </div>
  542. </form>
  543. <!-- General Form Elements -->
  544. <!-- <form>
  545. <div class="row mb-3">
  546. <label for="inputText" class="col-sm-2 col-form-label">Text</label>
  547. <div class="col-sm-10">
  548. <input type="text" class="form-control">
  549. </div>
  550. </div>
  551. <div class="row mb-3">
  552. <label for="inputEmail" class="col-sm-2 col-form-label">Email</label>
  553. <div class="col-sm-10">
  554. <input type="email" class="form-control">
  555. </div>
  556. </div>
  557. <div class="row mb-3">
  558. <label for="inputPassword" class="col-sm-2 col-form-label">Password</label>
  559. <div class="col-sm-10">
  560. <input type="password" class="form-control">
  561. </div>
  562. </div>
  563. <div class="row mb-3">
  564. <label for="inputNumber" class="col-sm-2 col-form-label">Number</label>
  565. <div class="col-sm-10">
  566. <input type="number" class="form-control">
  567. </div>
  568. </div>
  569. <div class="row mb-3">
  570. <label for="inputNumber" class="col-sm-2 col-form-label">File Upload</label>
  571. <div class="col-sm-10">
  572. <input class="form-control" type="file" id="formFile">
  573. </div>
  574. </div>
  575. <div class="row mb-3">
  576. <label for="inputDate" class="col-sm-2 col-form-label">Date</label>
  577. <div class="col-sm-10">
  578. <input type="date" class="form-control">
  579. </div>
  580. </div>
  581. <div class="row mb-3">
  582. <label for="inputTime" class="col-sm-2 col-form-label">Time</label>
  583. <div class="col-sm-10">
  584. <input type="time" class="form-control">
  585. </div>
  586. </div>
  587. <div class="row mb-3">
  588. <label for="inputColor" class="col-sm-2 col-form-label">Color Picker</label>
  589. <div class="col-sm-10">
  590. <input type="color" class="form-control form-control-color" id="exampleColorInput" value="#4154f1" title="Choose your color">
  591. </div>
  592. </div>
  593. <div class="row mb-3">
  594. <label for="inputPassword" class="col-sm-2 col-form-label">Textarea</label>
  595. <div class="col-sm-10">
  596. <textarea class="form-control" style="height: 100px"></textarea>
  597. </div>
  598. </div>
  599. <fieldset class="row mb-3">
  600. <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
  601. <div class="col-sm-10">
  602. <div class="form-check">
  603. <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
  604. <label class="form-check-label" for="gridRadios1">
  605. First radio
  606. </label>
  607. </div>
  608. <div class="form-check">
  609. <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
  610. <label class="form-check-label" for="gridRadios2">
  611. Second radio
  612. </label>
  613. </div>
  614. <div class="form-check disabled">
  615. <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios" value="option" disabled>
  616. <label class="form-check-label" for="gridRadios3">
  617. Third disabled radio
  618. </label>
  619. </div>
  620. </div>
  621. </fieldset>
  622. <div class="row mb-3">
  623. <legend class="col-form-label col-sm-2 pt-0">Checkboxes</legend>
  624. <div class="col-sm-10">
  625. <div class="form-check">
  626. <input class="form-check-input" type="checkbox" id="gridCheck1">
  627. <label class="form-check-label" for="gridCheck1">
  628. Example checkbox
  629. </label>
  630. </div>
  631. <div class="form-check">
  632. <input class="form-check-input" type="checkbox" id="gridCheck2" checked>
  633. <label class="form-check-label" for="gridCheck2">
  634. Example checkbox 2
  635. </label>
  636. </div>
  637. </div>
  638. </div>
  639. <div class="row mb-3">
  640. <label class="col-sm-2 col-form-label">Disabled</label>
  641. <div class="col-sm-10">
  642. <input type="text" class="form-control" value="Read only / Disabled" disabled>
  643. </div>
  644. </div>
  645. <div class="row mb-3">
  646. <label class="col-sm-2 col-form-label">Select</label>
  647. <div class="col-sm-10">
  648. <select class="form-select" aria-label="Default select example">
  649. <option selected>Open this select menu</option>
  650. <option value="1">One</option>
  651. <option value="2">Two</option>
  652. <option value="3">Three</option>
  653. </select>
  654. </div>
  655. </div>
  656. <div class="row mb-3">
  657. <label class="col-sm-2 col-form-label">Multi Select</label>
  658. <div class="col-sm-10">
  659. <select class="form-select" multiple aria-label="multiple select example">
  660. <option selected>Open this select menu</option>
  661. <option value="1">One</option>
  662. <option value="2">Two</option>
  663. <option value="3">Three</option>
  664. </select>
  665. </div>
  666. </div>
  667. <div class="row mb-3">
  668. <label class="col-sm-2 col-form-label">Submit Button</label>
  669. <div class="col-sm-10">
  670. <button type="submit" class="btn btn-primary">Submit Form</button>
  671. </div>
  672. </div>
  673. </form> -->
  674. </div>
  675. </div>
  676. </div>
  677. <!-- <div class="col-lg-6">
  678. <div class="card">
  679. <div class="card-body">
  680. <h5 class="card-title">Advanced Form Elements</h5>
  681. <form>
  682. <div class="row mb-5">
  683. <label class="col-sm-2 col-form-label">Switches</label>
  684. <div class="col-sm-10">
  685. <div class="form-check form-switch">
  686. <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
  687. <label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label>
  688. </div>
  689. <div class="form-check form-switch">
  690. <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
  691. <label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label>
  692. </div>
  693. <div class="form-check form-switch">
  694. <input class="form-check-input" type="checkbox" id="flexSwitchCheckDisabled" disabled>
  695. <label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label>
  696. </div>
  697. <div class="form-check form-switch">
  698. <input class="form-check-input" type="checkbox" id="flexSwitchCheckCheckedDisabled" checked disabled>
  699. <label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label>
  700. </div>
  701. </div>
  702. </div>
  703. <div class="row mb-5">
  704. <label class="col-sm-2 col-form-label">Ranges</label>
  705. <div class="col-sm-10">
  706. <div>
  707. <label for="customRange1" class="form-label">Example range</label>
  708. <input type="range" class="form-range" id="customRange1">
  709. </div>
  710. <div>
  711. <label for="disabledRange" class="form-label">Disabled range</label>
  712. <input type="range" class="form-range" id="disabledRange" disabled>
  713. </div>
  714. <div>
  715. <label for="customRange2" class="form-label">Min and max with steps</label>
  716. <input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange2">
  717. </div>
  718. </div>
  719. </div>
  720. <div class="row mb-3">
  721. <label class="col-sm-2 col-form-label">Floating labels</label>
  722. <div class="col-sm-10">
  723. <div class="form-floating mb-3">
  724. <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
  725. <label for="floatingInput">Email address</label>
  726. </div>
  727. <div class="form-floating mb-3">
  728. <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
  729. <label for="floatingPassword">Password</label>
  730. </div>
  731. <div class="form-floating mb-3">
  732. <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea" style="height: 100px;"></textarea>
  733. <label for="floatingTextarea">Comments</label>
  734. </div>
  735. <div class="form-floating mb-3">
  736. <select class="form-select" id="floatingSelect" aria-label="Floating label select example">
  737. <option selected>Open this select menu</option>
  738. <option value="1">One</option>
  739. <option value="2">Two</option>
  740. <option value="3">Three</option>
  741. </select>
  742. <label for="floatingSelect">Works with selects</label>
  743. </div>
  744. </div>
  745. </div>
  746. <div class="row mb-5">
  747. <label class="col-sm-2 col-form-label">Input groups</label>
  748. <div class="col-sm-10">
  749. <div class="input-group mb-3">
  750. <span class="input-group-text" id="basic-addon1">@</span>
  751. <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
  752. </div>
  753. <div class="input-group mb-3">
  754. <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2">
  755. <span class="input-group-text" id="basic-addon2">@example.com</span>
  756. </div>
  757. <label for="basic-url" class="form-label">Your vanity URL</label>
  758. <div class="input-group mb-3">
  759. <span class="input-group-text" id="basic-addon3">https://example.com/users/</span>
  760. <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3">
  761. </div>
  762. <div class="input-group mb-3">
  763. <span class="input-group-text">$</span>
  764. <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
  765. <span class="input-group-text">.00</span>
  766. </div>
  767. <div class="input-group mb-3">
  768. <input type="text" class="form-control" placeholder="Username" aria-label="Username">
  769. <span class="input-group-text">@</span>
  770. <input type="text" class="form-control" placeholder="Server" aria-label="Server">
  771. </div>
  772. <div class="input-group">
  773. <span class="input-group-text">With textarea</span>
  774. <textarea class="form-control" aria-label="With textarea"></textarea>
  775. </div>
  776. </div>
  777. </div>
  778. </form>
  779. </div>
  780. </div>
  781. </div> -->
  782. </div>
  783. </section>
  784. </main><!-- End #main -->
  785. <!-- ======= Footer ======= -->
  786. <footer id="footer" class="footer">
  787. <div class="copyright">
  788. &copy; Copyright <strong><span>Ark Cards</span></strong>. All Rights Reserved
  789. </div>
  790. <div class="credits">
  791. <!-- All the links in the footer should remain intact. -->
  792. <!-- You can delete the links only if you purchased the pro version. -->
  793. <!-- Licensing information: https://bootstrapmade.com/license/ -->
  794. <!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -->
  795. Designed by <a href="https://ai.choozmo.com/">Choozmo</a>
  796. </div>
  797. </footer><!-- End Footer -->
  798. <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
  799. <!-- Vendor JS Files -->
  800. <script src="assets/vendor/apexcharts/apexcharts.min.js"></script>
  801. <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  802. <script src="assets/vendor/chart.js/chart.min.js"></script>
  803. <script src="assets/vendor/echarts/echarts.min.js"></script>
  804. <script src="assets/vendor/quill/quill.min.js"></script>
  805. <script src="assets/vendor/simple-datatables/simple-datatables.js"></script>
  806. <script src="assets/vendor/tinymce/tinymce.min.js"></script>
  807. <script src="assets/vendor/php-email-form/validate.js"></script>
  808. <!-- Template Main JS File -->
  809. <script src="assets/js/main.js"></script>
  810. <!-- Ark Cards JS File -->
  811. <script src="assets/js/ark.js"></script>
  812. <script>
  813. // 檢查是否可存取該頁面
  814. checkRoute();
  815. var url = 'https://api.ptt.cx:8750/api/v1/nft/';
  816. var access_token = get_access_token();
  817. var headers = {'Authorization': 'Bearer ' + access_token,
  818. 'accept': 'application/json',
  819. 'Content-Type': 'multipart/form-data'
  820. }
  821. document.getElementById('image').addEventListener('change', handleFileSelect, false);
  822. let imageFile;
  823. function handleFileSelect(evt) {
  824. let files = evt.target.files; // FileList object
  825. // use the 1st file from the list
  826. let f = files[0];
  827. imageFile = f
  828. let reader = new FileReader();
  829. // Closure to capture the file information.
  830. reader.onload = (function(theFile) {
  831. return function(e) {
  832. };
  833. })(f);
  834. // Read in the image file as a data URL.
  835. reader.readAsText(f);
  836. }
  837. $("#nft_add_form").submit(function(e) {
  838. e.preventDefault();
  839. const form = document.querySelector('#nft_add_form');
  840. var bodyFormData = new FormData();
  841. var title = $('#title').val();
  842. var desc = $('#content').val();
  843. var uid = $('#uid').val();
  844. var amount = $('#amount').val();
  845. var toaddress = $('#toaddress').val();
  846. // var image = $('#image').val();
  847. // let front = image.split(/(\\|\/)/g).pop();
  848. // let type = front.split('.').pop();
  849. // if(type == 'jpg' || type == 'jpeg') {
  850. // type = 'jpeg';
  851. // } else if (type == 'png') {
  852. // type = 'png';
  853. // }
  854. // console.log(front,type);
  855. // image =`@${front};type=image/${type}`;
  856. console.log(title, desc, uid, amount, toaddress, imageFile);
  857. let isActive = $("#is_active_checkbox").is(':checked');
  858. bodyFormData.append('title', title);
  859. bodyFormData.append('context', desc);
  860. bodyFormData.append('catagory', '');
  861. bodyFormData.append('hash', '');
  862. bodyFormData.append('uid', uid);
  863. bodyFormData.append('amount', amount);
  864. bodyFormData.append('address', toaddress);
  865. bodyFormData.append('image', imageFile);
  866. bodyFormData.append('is_active', isActive);
  867. for (var pair of bodyFormData.entries()) {
  868. console.log(pair[0]+ '=' + pair[1]);
  869. }
  870. if (!title) {
  871. Swal.fire({
  872. title: '注意',
  873. icon: 'error',
  874. text: '請輸入NFT名稱',
  875. confirmButtonColor: '#3085d6'
  876. })
  877. return false;
  878. }
  879. if (!image) {
  880. Swal.fire({
  881. title: '注意',
  882. icon: 'error',
  883. text: '請上傳NFT圖片',
  884. confirmButtonColor: '#3085d6'
  885. })
  886. return false;
  887. }
  888. // 資料庫欄位型態是tinyint(1),所以另外用is_active_checkbox、is_active欄位來做轉換
  889. if ($("#is_active_checkbox").is(':checked')) {
  890. $('#is_active').val(1);
  891. } else {
  892. $('#is_active').val(0);
  893. }
  894. console.log(bodyFormData);
  895. // var formData = new FormData($("#nft_add_form")[0]);
  896. axios({
  897. method: 'post',
  898. url: `https://api.ptt.cx:8750/api/v1/nft/`,
  899. headers: headers,
  900. data: bodyFormData
  901. }).then(res => {
  902. Data = {...res.data}
  903. console.log(Data);
  904. Swal.fire({
  905. title: '成功',
  906. icon: 'success',
  907. text: '新增成功',
  908. confirmButtonColor: '#3085d6'
  909. });
  910. window.setTimeout(() => {
  911. window.location.href = 'nft.html';
  912. }, 2000);
  913. }).catch(err => {
  914. console.log(err);
  915. Swal.fire({
  916. title: '錯誤',
  917. icon: 'success',
  918. text: '請稍後再試',
  919. confirmButtonColor: '#3085d6'
  920. });
  921. })
  922. return false;
  923. });
  924. </script>
  925. </body>
  926. </html>