CCTI XML 문서 보기: 두 판 사이의 차이

Classics Wiki
새 문서: <html lang="ko"> <head> <meta charset="UTF-8"> <title>ID 리다이렉트</title> <style> body { font-family: sans-serif; padding: 20px; } .container { display: flex; gap: 10px; } input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; } button { padding: 8px 15px; cursor: pointer; background-color: #007bff; color: white; border: none; border-radius: 4px; } button:hover { background-color: #0056b3; } </style> </hea...
 
편집 요약 없음
1번째 줄: 1번째 줄:
<!DOCTYPE html>
<html lang="ko">
<html lang="ko">
<head>
<head>
     <meta charset="UTF-8">
     <meta charset="UTF-8">
     <title>ID 리다이렉트</title>
     <title>ID 및 프로젝트 리다이렉트</title>
     <style>
     <style>
         body { font-family: sans-serif; padding: 20px; }
         body { font-family: sans-serif; padding: 20px; line-height: 1.6; }
         .container { display: flex; gap: 10px; }
         .container { display: flex; flex-direction: column; gap: 10px; max-width: 300px; }
         input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
        .input-group { display: flex; flex-direction: column; gap: 5px; }
         button { padding: 8px 15px; cursor: pointer; background-color: #007bff; color: white; border: none; border-radius: 4px; }
        label { font-size: 0.9em; font-weight: bold; color: #555; }
         input { padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
         button {  
            padding: 10px;  
            cursor: pointer;  
            background-color: #007bff;  
            color: white;  
            border: none;  
            border-radius: 4px;  
            font-weight: bold;
            margin-top: 10px;
        }
         button:hover { background-color: #0056b3; }
         button:hover { background-color: #0056b3; }
     </style>
     </style>
13번째 줄: 25번째 줄:
<body>
<body>


     <h2>ID 입력 후 이동</h2>
     <h2>데이터 조회</h2>
    <p>프로젝트와 ID를 입력하고 이동하기 버튼을 누르세요.</p>
 
     <div class="container">
     <div class="container">
         <input type="text" id="userId" placeholder="ID를 입력하세요" onkeypress="if(event.keyCode==13) redirectToUrl()">
         <div class="input-group">
            <label for="projectInput">프로젝트 (Project)</label>
            <input type="text" id="projectInput" placeholder="프로젝트를 입력하세요">
        </div>
 
        <div class="input-group">
            <label for="userId">아이디 (ID)</label>
            <input type="text" id="userId" placeholder="ID를 입력하세요"  
                  onkeypress="if(event.keyCode==13) redirectToUrl()">
        </div>
 
         <button onclick="redirectToUrl()">이동하기</button>
         <button onclick="redirectToUrl()">이동하기</button>
     </div>
     </div>
21번째 줄: 45번째 줄:
     <script>
     <script>
         function redirectToUrl() {
         function redirectToUrl() {
             // 입력창의 값을 가져옵니다.
             // 입력창의 값을 가져옵니다.
             const idValue = document.getElementById('userId').value;
            const projectValue = document.getElementById('projectInput').value.trim();
             const idValue = document.getElementById('userId').value.trim();


             if (idValue.trim() === "") {
            // 유효성 검사 (두 값 모두 입력되어야 함)
                 alert("ID를 입력해주세요.");
             if (projectValue === "" || idValue === "") {
                 alert("프로젝트와 ID를 모두 입력해주세요.");
                 return;
                 return;
             }
             }


             // 2. 입력받은 id 값을 가지고 지정된 URL로 redirect
             // 요청하신 URL 구조에 맞게 매개변수 설정
             const targetUrl = `http://app.vaquitalab.com/viewxml?id=${idValue}`;
             const baseUrl = "https://kstoryhub.visualasia.com/aistory/ccti_retrieve";
            const server = "kstorydata.visualasia.com";
            const db = "aiclassics2601";
           
            // 최종 URL 생성
            const targetUrl = `${baseUrl}?server=${server}&db=${db}&project=${encodeURIComponent(projectValue)}&id=${encodeURIComponent(idValue)}`;
 
            // 리다이렉트 실행
             window.location.href = targetUrl;
             window.location.href = targetUrl;
         }
         }

2026년 4월 27일 (월) 00:39 판

<!DOCTYPE html> ID 및 프로젝트 리다이렉트

데이터 조회

프로젝트와 ID를 입력하고 이동하기 버튼을 누르세요.