001002003004005006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054055056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089090091092093094095096097098099100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
<?php // (2022.8.1, 차재복, Cha Jae Bok, http://www.ktword.co.kr) # 세션 스타트 (매 웹페이지 마다 필요) session_start(); // 세션 변수 : 사용자 타입 ('일반사용자 0' or '테스트편집자 1' or '정식편집자 2' or '종합관리자 3') $_SESSION['user_type'] = ( empty($_SESSION['user_name']) ? '일반사용자' : $_SESSION['user_name'] ); # db 접속 (dbi) include_once "../base_utils/db_conn.php"; # 모바일 셋팅, 모바일 여부 확인 루틴 (출처 : http://mobiledetect.net/) require_once '../../mobiledetect/Mobile_Detect.php'; $detect = new Mobile_Detect; // mobile 이면, 모바일 디스플레이 셋팅 및 화면 폭 넓힘 $isMobile = 0; if ( $detect->isMobile() and !($detect->isTablet())) { // 순수 모바일 기기 (not tablet) echo "<meta name='viewport' content='user-scalable=yes, width=device-width, initial-scale=1.0' />"; echo "<style type='text/css'> body { width : 200% ; } </style>"; $isMobile = 1; } # 전달 파라미터 $no = $_REQUEST['no']; if ( isset($_REQUEST['no']) and !empty($no) and !is_numeric($no) or $no<0 ) exit; // 해킹방지 (수치 ≥ 0) # css echo "<style> * { font-size: 13px; } a:link { text-decoration: none; } div.src_list, div.hidden { display : none; margin:5 5 10 20px; } div.src_list { border : 1px dotted gray; padding : 7px; } div#div_2, div#div_3, div#div_4 { margin-left : 20px; } div#mobile_desktop { display : none; border:1px gray solid; padding:5px; } </style>"."\n"; # 자바스크립트 전역변수 echo "<script>"; echo "var glob_var = { 'isMobile' : '{$isMobile}', 'menuType' : '{$menuType}', 'user_type' : '{$_SESSION['user_type']}' }"; echo "</script>"."\n"; # php 유틸리티 인클루드 // 서버 데이터 가져오기 함수 include "../navigation/naviFetch.php"; // 소스 리스트 배열화 include "./dev_testing_srcs.php"; $src_list = src_list(); # 상단 제목줄 $title = '개선 / 개발 / 시험 중'; include "../base_utils/top_section.php"; # 줄바꿈 echo "\n"."<hr>"."\n"; # dropdown 메뉴 echo "1. dropdown 메뉴"; // 소스 공개 src_display('소스 ∨', $src_list[2]['src']); // dev_testing_srcs.php // css 로드 echo "<link rel='stylesheet' href='../navigation/short_navi.css' type='text/css'>"; // 화면 출력 echo "<div id='dropdownDiv'>"; echo " 1) click 버전 : " ; echo "<div class='treeDiv' data-menutype='clickMenu' style='display:inline-block;'> <span class='subMenu' data-id='0' data-direction='v' style='position:relative;'> <span class='bullet'>▷</span><span class='title'>Top</span> </span> </div>"; echo " 2) mouseover 버전 : " ; echo "<div class='treeDiv' data-menutype='moverMenu' style='display:inline-block;'> <span class='subMenu' data-id='0' data-direction='v' style='position:relative;'> <span class='bullet'>▷</span><span class='title'>Top</span> </span> </div>"; echo "</div>"; # 줄바꿈 echo "\n"."<hr>"."\n"; # 확장 메뉴 echo "2. 단순 펼침 메뉴"; // 소스 공개 src_display('소스 ∨', $src_list[3]['src']); // dev_testing_srcs.php // 출력 echo "<div id='div_2'>"; $src_url = "/test/testing/dev_testing.js(subTreeOut,word,0)/navi_base.js/fetchDataCreateOl(out)(naviFetch.php,ajaxPromise())"; echo "1) <a href=$src_url class='subTreeOut' data-type='word' data-id='0'>용어해설 기본 분류 ∨</a> "; echo "<br>"; $src_url = "/test/testing/dev_testing.js(subTreeOut,manual,389)"; echo "2) <a href=$src_url class='subTreeOut' data-type='manual' data-id='389'>용어해설 관점별 분류 ∨</a> "; echo "<br>"; $src_url = "/test/testing/dev_testing.js(subTreeOut,manual,0)"; echo "3) <a href=$src_url class='subTreeOut' data-type='manual' data-id='0'>관리 메뉴얼 ∨</a> "; echo "<br>"; $src_url = "/test/testing/dev_testing.js(subTreeOut,manual,182)"; echo "4) <a href=$src_url class='subTreeOut' data-type='manual' data-id='182'>개인 영어 단어장 ∨</a> "; echo "<br>"; $src_url = "/test/testing/dev_testing.js(subTreeOut,source,0)"; echo "5) <a href=$src_url class='subTreeOut' data-type='source' data-id='0'>소스 폴더 ∨</a> "; $src_url = "/test/testing/dev_testing.js(subTreeOut,src_tree,0)"; echo "6) <a href=$src_url class='subTreeOut' data-type='src_tree' data-id='0'>소스 역할 트리 ∨</a> "; $src_url = "/test/testing/dev_testing.js(subTreeOut,db_table,0)"; echo "7) <a href=$src_url class='subTreeOut' data-type='db_table' data-id='0'>소스 db 테이블 칼럼 ∨</a> "; echo "</div>"; // css echo "<link rel='stylesheet' href='../navigation/navi_base.css' type='text/css'>"; # 줄바꿈 echo "\n"."<hr>"."\n"; # 용어해설 echo "3. 용어 해설"; echo "<div id='div_3'>"; // 용어해설 편집 echo "1) <a href='/test/edit/edit.php' id='editTesting'>용어해설 편집 ∨</a>"; // * 용어해설 편집 보여주기 창을, 이곳에서 자바스크립트로 보여줌 * // 소스 공개 src_display('소스 ∨', $src_list[4]['src']); // dev_testing_srcs.php // 용어해설 검색 echo "<br>"; echo "2) 용어해설 검색"; // 특정 검색 include_once "../search/special_srch_utils.php"; echo "<div id='div_4'>"; echo "2-1) <a href=#' class='toggle'>특정 검색 ∨</a>"; echo "<div class='hidden'>"; $arr = choice_v2(); foreach($arr as $key => $value) { echo "<a href='/test/search/special_srch.php?ch={$key}' data-ch='{$key}' class='special'>".$value['alias']."</a>"; if(count($arr) != $key) echo ", "; } echo "</div>"; // 소스 공개 src_display('소스 ∨', $src_list[5]['src']); // dev_testing_srcs.php echo "<br>"; echo "2-2) 매칭 검색 "; echo "<br>"; echo "2-3) 어순 검색 "; echo "</div>"; // 용어해설 링크 echo "3) 용어해설 링크 "; echo "</div>"; # 줄바꿈 echo "\n"."<hr>"."\n"; # 알고리즘 코딩 테스트 echo "6. 자료구조 및 알고리즘 (with 자바스크립트)<br>"; echo "<span style='margin-left:20px;'>1) 에라토스테네스의 체(Eratosthenes' Sieve) : </span>"; echo "<input onkeyup='showSieveOfEratosthenes(this);' type='text' size='2'>"; echo "<button type='button' onclick='showSieveOfEratosthenes(this);'>Click</button>"; // 소스 공개 src_display('소스 ∨', $src_list[6]['src']); // dev_testing_srcs.php echo "<br>"; echo "<span style='margin-left:20px;'> 2) 검색 (선형검색, 이진검색) : </span>"; echo "<input onkeyup='showSearchAlgorithm(this);' type='text' size='2'>"; echo "<button type='button' onclick='showSearchAlgorithm(this);'>Click</button>"; // 소스 공개 src_display('소스 ∨', $src_list[7]['src']); // dev_testing_srcs.php echo "<br>"; echo "<span style='margin-left:20px;'> 3) 스택 : </span>"; // 소스 공개 src_display('소스 ∨', $src_list[9]['src']); // dev_testing_srcs.php # 줄바꿈 echo "\n"."<hr>"."\n"; # 화면 크기,위치,Mobile/Desktop 구분 등 echo "7. 레이아웃 (화면 크기,위치,Mobile/Desktop 구분 등) 시험 중"; echo ( $isMobile ? " (mobile) " : " (no mobile) " ); echo " "; // 소스 공개 src_display('소스 ∨', $src_list[8]['src']); // dev_testing_srcs.php // 버튼 및 보이기 div echo " "; echo "<button type='button' onclick='isMobileOrDesktop()'>Click (Toggle)</button>"." "; echo "<div id='mobile_desktop'></div>"; # 줄바꿈 echo "\n"."<hr>"."\n"; # 소스 이력 echo "ㅇ 총괄 소스 : "; // 소스 공개 src_display('1) 기본 소스 ∨', $src_list[0]['src']); // dev_testing_srcs.php // 소스 공개 src_display('2) 공통 소스 ∨', $src_list[1]['src']); // dev_testing_srcs.php echo "<br>"; echo " ㅇ 최근 수정 : "; include_once "../base_utils/common_utils.php"; echo recent_src_updated($dbi,'1'); echo " <a href='/test/open_src/open_src_files_list.php?ch=history'>. . . . .</a> "; # 줄바꿈 echo "\n"."<hr>"."\n"; # 바닥글 // 저작권 include_once "../base_utils/copyright.php"; // 접속 통계 처리 include_once "../base_utils/stat_utils.php"; html_access("dev_testing",$dbi); # 자바스크립트 로드 foreach($src_list as $value) { foreach($value['src'] as $file_info) { // 파일명 확장자가 'js'인 경우에 만 스크립트 로드 실행 if(substr(strrchr($file_info['file'],'.'),1)=='js') { // 소스 설명 echo "<!-- ". $file_info['desc'] ." -->"."\n"; // 소스 로드 echo "<script type='text/javascript' src='../{$file_info['dir']}/{$file_info['file']}?dd=".date("YmdH")."'></script>"."\n"; } } }; // MathJax 로드 include_once "../base_utils/mathjax_config.php"; ?>