<?php // (2018.7.23, 차재복, Cha Jae Bok, http://www.ktword.co.kr)
# yoyak_contents_ajax.php
// navigation menu에서 '▷'를 클릭하면, Ajax에 의해, 이 스크립트가 수행됨
# 세션 스타트 (매 웹페이지 마다 필요)
session_start();
# db 접속
include_once "../base_utils/db_conn.php";
# 전달 변수
$id = $_REQUEST['id'];
if ( isset($_REQUEST['id']) and !empty($id) and !is_numeric($id) or $id<0 ) exit; // 해킹방지 (수치>0)
$id = substr($id,0,10); // 해킹 방지 (글자 수 제한)
if(empty($id)) $id=0; // 디폴트
$win = $_REQUEST['win'];
# html 헤더부 ------------------------------------------------------------
// html 및 utf-8 선언
echo "<meta http-equiv='content-type' content='text/html; charset=utf-8'>";
# 쿼리문 (db 쿼리 -> php 배열)
include_once "yoyak_contents_db_qry.php";
$result_set = tbl_read($id, $dbi);
$set = $result_set['set'];
$cur_path = $result_set['cur_path'];
# 배열 출력
// navi 목록을 좌측에 출력하는 함수 루틴
include_once "./yoyak_contents_display.php";
// navi 목록을 좌측에 출력하는 함수 루틴 중 편집자용
if ( !empty($_SESSION['user_name']) ) include_once "./yoyak_contents_display_edit.php";
// navi 목록 출력
contents_display($set, $cur_path, $id, $dbi);
?>