소스 파일 : /view/view.php (2021-06-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
<?php // (2023.12.10, 차재복, Cha Jae Bok, http://www.ktword.co.kr) 

# view.php
	// 제일 핵심 스크립트 파일로써, db 연결 등 환경설정 및 전체 화면 구조/구성을 결정함
	// 화면 구성 : 상단부(홈페이지 링크,검색 폼 등),우단부(navigation menu),타이틀부(제목,날짜 등),중간 body text 부,하단부(copyright,소스개방 등)
	// 각 부분 마다 출력을 담당함 (이때, 타 스크립트 파일 또는 함수를 호출하는 경우가 많음)

# 세션 설정
	// 세션 스타트 (매 웹페이지 마다 필요)
	session_start();

	// 세션 변수에 따른 사용자 타입 설정 ('일반사용자' or '테스트편집자' or '관리편집자')
	$_SESSION['user_type'] = ( empty($_SESSION['user_name']) ? '일반사용자' : $_SESSION['user_name'] );

# 전달 파라미터 설정 및 해킹 방어 ---------------------------------------------
	include "view_anti_hack.php";
		// no(m_temp1), ...

# db 연결 및 html 헤더부 -------------------------------------------------
	include_once "../base_utils/config.php";

# 함수 포함 (주요 `사용자정의함수` 불러오기) --------------------------------
	include_once "view_utils.php";

# css -----------------------------------------------------------------------------------
	echo "<link rel='stylesheet' type='text/css' href='view.css' />";	

# 최상단 header top 보이기 -------------------------------
	// 헤더부 css
	echo "<link rel='stylesheet' type='text/css' href='view_top.css' />";
	// 헤더부 출력 (홈페이지 안내, navi 메뉴 켜기/끄기, 검색 form 등)
	include "view_top_section.php";


# body 보여주기 ******************************************************

	//// 용어 해설 `보기` 화면
	if ( empty($m_opt) and !($_REQUEST['gita_choice']=='search_1' or $_REQUEST['gita_choice']=='search_2' or $_REQUEST['gita_choice']=='search_3') ) {

		// css 미세 조정 (navi menu 활성화되면, body의 폭 조정)
		if ($nav==2) {
			echo "<style type='text/css'> div#body { width : 73%; } </style>";
		}

		// 용어해설 보이기 루틴 입수
		include "view_word.php";

	///// dict_history 화면
	} else if ($m_opt=='history') {

		echo "<div id='body'>";
//			include "dict_history_v2.php";
		echo "</div>";
	
	///// 용어별 search_first_v2 화면
	} else if ($m_opt=='search' and empty($_REQUEST[gita_choice])) {

		echo "<div id='body'>";
//			include "search_first_v2.php";
		echo "</div>";

	///// 분야별 search 및 map 화면
	} else if ($_REQUEST[gita_choice]=='search_1' or $_REQUEST[gita_choice]=='search_2' or $_REQUEST[gita_choice]=='search_3') {

//		include "abbr_srch_grp.php";
	
	}

/*
    ///// 분류 Map node 총괄 summary 설명 보여주기 화면
    if ( empty($m_temp1) and !isset($_SERVER[QUERY]) and empty($m_opt) and  !($_REQUEST[gita_choice]=='search_1' or $_REQUEST[gita_choice]=='search_2' or $_REQUEST[gita_choice]=='search_3') ) {

		echo "<div id='body' >";
			include "view_summary.php";
		echo "</div>";

	}
*/

# ****************************************************** body 보여주기 끝

/*
# nav 메뉴 리스트 ------------------------------------------
if ( $nav != '0' and !empty($nav) and empty($m_opt) ) {

	// style
	echo "<link rel='stylesheet' type='text/css' href='view_contents.css' />";

	// jquery 기능 구현 소스 불러오기
	echo "<script type='text/javascript' src='view_contents.js' charset='UTF-8'></script>";

	// 배열 출력 처리
	echo "<div id='contents'>";

		$set = $choiced_set;
		$cur_path = $choiced_cur_path;
		include_once "view_contents_display.php";

	echo "</div>";

}
# ---------------------------------- nav 메뉴 리스트 끝
*/

# 하단에 추가검색버튼 및 최근수정이력
	echo "<div id='search_button' style='clear:both; width:100%;'>";
		echo "<hr>";
			// 용어별 검색 Form
				echo "<form action='/test/search/srch.php' name='srch_form' method='post' style='display:inline-block;'>";
					echo "<input type='text' name='m_search' size=15>";
					echo "<button type='submit'>검색</button>";

					echo "<input type='hidden' name='opt' value='search'>";
					echo "<input type='hidden' name='m_text'>";
				echo "</form>";
			// (편집자용) 편집 버튼 
				if ($_SESSION['user_type'] == '종합관리자') {
					echo "&nbsp;&nbsp;&nbsp;&nbsp;";	
					echo "<form action='../edit/edit.php' method=post style='display:inline; margin:0; padding:0;'>";
						echo "<input type=submit name=m_submit_edit value='편집' style='padding:0'>";
						echo "<input type=hidden name=no value={$m_temp1}>";
						echo "<input type=hidden name=win value='new'>";
					echo "</form>";
				}
			// 요약목록 ($choiced_id : view_word.php로부터 넘어옴)
//			echo " &nbsp;&nbsp;&nbsp; <a href='../yoyak/yoyak.php?id={$choiced_id}'>요약목록</a>";
	echo "</div>";

# 자바스크립트 로드
    // (캐시 방지)
    $cache = "?dd=".date("YmdH"); // 시간 주기로, 자바스크립트 파일 재로드 (캐시 방지)

	// jquery api 원본 버젼 1.11.0 다운로드 (google api cdn 이용)
	echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>";

    // 자바스크립트 공통 함수 모음
	echo "<script type='text/javascript' src='../base_utils/common_utils.js'></script>";

	echo "<script type='text/javascript' src='../navigation/short_navi.js'></script>";	// navigation용 메뉴 지원 함수들

    // load 이벤트
	echo "<script type='text/javascript' src='./view.js{$cache}'></script>";					// load 이벤트

    // 펼침 메뉴용
    // (캐시 방지)
    echo "<script src='/test/navigation/navi_base.js{$cache}' type='text/javascript'></script>";
    echo "<script src='/test/navigation/navi_base_moreShow.js{$cache}' type='text/javascript'></script>";

# 저작권
	echo "<hr style='clear:both;'>";
	include_once "../base_utils/copyright.php";

# 수평선
	echo "<hr>";


#  통계처리 요청 (stat_page)
//	include "../base_utils/stat_utils.php";
	include "../../cjb/stat_utils.php";
	if ($_REQUEST['parm']=='onedrive') {
		html_access('onedrive',$dbi);
	} else {
//echo "<br>".$m_search."<br>";
		html_access('view.php',$dbi,$m_temp1,$m_search);
	}

?>



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