소스 파일 : /testing/dev_testing.php (2021-07-24)     소스 설명 : (개발 테스트) 메인 파일   (Run)
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<?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 "&nbsp;&nbsp;&nbsp; 1) click 버전 &nbsp; : &nbsp; "	;
		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 "&nbsp;&nbsp;&nbsp; 2) mouseover 버전 &nbsp; : &nbsp; "	;
		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> &nbsp; ";
		$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> &nbsp; ";
		$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) 용어해설 링크 &nbsp; ";

	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 " &nbsp; ";

	// 소스 공개
	src_display('소스 ∨', $src_list[8]['src']);			// dev_testing_srcs.php

	// 버튼 및 보이기 div
	echo "&nbsp;&nbsp;&nbsp;";
	echo "<button type='button' onclick='isMobileOrDesktop()'>Click (Toggle)</button>"." &nbsp; ";

	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 " &nbsp; <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";

?>



Copyrightⓒ written by 차재복 (Cha Jae Bok)               기술용어해설 후원
"본 웹사이트 내 모든 저작물은 원출처를 밝히는 한 자유롭게 사용(상업화포함) 가능합니다"